1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./EsfuhbQ_.js","./BNo1M3_d.js","./BFMX5MT1.js","./entry.DjK8rLvx.css","./C6ahHraB.js","./CUVTqrYa.js","./C9_l-fYa.js","./DXvOZ2wd.js","./Dzx1h-I5.js"])))=>i.map(i=>d[i]); 2import{_ as Mu,o as L,c as B,b as Au,j as Ue,D as So,v as E,a as R,t as ce,n as ze,h as ge,d as ue,w as Ee,x as Tt,ak as ks,e as $e,al as Is,a7 as Pu,y as pe,B as rt,F as Oe,am as Nr,r as zt,f as zn,G as $r,H as Du,T as fo,i as Xe,q as vo,k as on,l as Fa,C as Tu,P as zu,V as fi,ag as Ss,u as H0,an as Pl,ad as U0,ah as ni,I as Fr,ao as W0,a8 as vi,m as jr,ap as Ru,aq as Dl,M as G0,ar as q0,a3 as V0,as as K0,a9 as Z0,at as Tl,au as X0,av as Y0,S as Q0,aa as gi,aw as J0,p as oi,ax as Wi,W as ef,Y as tf}from"./BFMX5MT1.js";import{b as nf,a as of,u as rf}from"./C6ahHraB.js";import{u as af}from"./CUVTqrYa.js";import{u as sf}from"./C9_l-fYa.js";import{u as lf}from"./DXvOZ2wd.js";const cf={},df={xmlns:"http://www.w3.org/2000/svg",class:"hidden","aria-hidden":"true"};function uf(e,t){return L(),B("svg",df,[...t[0]||(t[0]=[Au('<symbol id="strain-sativa" viewBox="0 0 24 24"><path d="M12.0012 19.6086L11.9873 24M12.0012 19.6086C12.0012 19.6086 15.0966 19.3742 17.2963 18.9028C19.5798 18.4133 21.3704 17.616 21.3704 17.616L16.5773 16.593C16.5773 16.593 21.3704 13.5239 23 11.0452C20.1481 10.9664 15.6667 13.0124 15.6667 13.0124C15.6667 13.0124 18.1111 7.89736 18.5185 4.82831C16.4815 6.36284 13.2222 11.0482 13.2222 11.0482C13.2222 11.0482 13.2222 4.31681 12.2979 1.34511C12.2217 1.14782 12.2078 1 12 1C11.7806 1 11.7806 1.14211 11.702 1.34804C10.7778 4.82831 10.7778 10.9664 10.7778 10.9664C10.7778 10.9664 7.51852 6.36284 5.48148 4.82831C5.99426 8.05011 8.33333 13.0124 8.33333 13.0124C8.33333 13.0124 4.25926 10.9693 1 11.0482C1.9977 12.2607 7.51852 16.593 7.51852 16.593L2.62963 17.616C2.62963 17.616 5.07329 18.5039 6.7037 18.9028C8.7391 19.4008 12.0012 19.6086 12.0012 19.6086Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol><symbol id="strain-indica" viewBox="0 0 24 24"><path d="M12 19v4.2m0-4.3S4.8 18.2.7 14.4c2.2-.4 4-.5 6.3-.1a19 19 0 0 1-3.8-8c2.5 1 4.4 2.3 6.2 4.3 0-3.3.7-6.6 2.2-9.5.1-.2.1-.3.4-.3.3 0 .3.1.4.3 1.5 3 2.1 6.2 2.2 9.5 1.8-2 3.7-3.3 6.2-4.4a18 18 0 0 1-3.8 8.1c2.3-.4 4.1-.3 6.3.1C19 18.5 12 19 12 19Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol><symbol id="strain-hybrid" viewBox="0 0 24 24"><path d="M6.02562 21.3846C6.43948 20.7643 10.2505 13.7988 10.9419 12.5342C10.9543 12.5121 10.9716 12.4934 10.9925 12.4797C11.0134 12.4659 11.0372 12.4576 11.062 12.4555C11.0867 12.4533 11.1115 12.4574 11.1344 12.4673C11.1572 12.4771 11.1774 12.4926 11.1932 12.5123L18.5853 21.384C18.5797 18.2891 17.7673 15.2523 16.2326 12.5905C16.2252 12.5796 16.2219 12.5663 16.2233 12.5531C16.2248 12.5399 16.2308 12.5277 16.2403 12.5187C16.2498 12.5097 16.2621 12.5045 16.275 12.5042C16.2879 12.5038 16.3005 12.5083 16.3105 12.5168C18.1974 13.9585 20.2227 15.1978 22.3547 16.2154C22.3547 16.2154 22.5745 12.6266 18.7938 9.90052C18.778 9.88967 18.766 9.87403 18.7593 9.85579C18.7526 9.83756 18.7516 9.81764 18.7565 9.7988C18.7613 9.77995 18.7718 9.76313 18.7862 9.75068C18.8009 9.73823 18.8188 9.73075 18.8377 9.72929C21.5484 9.43658 22.3547 8.46154 22.3547 8.46154C22.3547 8.46154 18.93 5.47178 15.0142 7.08523C14.9958 7.09384 14.9755 7.0971 14.9554 7.09465C14.9353 7.09221 14.9163 7.08416 14.9004 7.07137C14.8845 7.05858 14.8723 7.04155 14.8651 7.02212C14.8579 7.00268 14.856 6.9816 14.8597 6.96117C15.2861 4.83855 16.0743 2 16.0743 2C16.0743 2 12.534 3.49908 11.136 5.73218C11.1118 5.77112 11.0739 5.79892 11.0303 5.80976C10.9866 5.82059 10.9405 5.81363 10.9017 5.79034C7.39474 3.75883 4.76952 4.58526 4.76952 4.58526L8.36697 8.28643C8.3793 8.29842 8.38772 8.31407 8.391 8.33121C8.3943 8.34835 8.39232 8.36612 8.38535 8.38205C8.37837 8.39797 8.36674 8.41125 8.35207 8.42006C8.33741 8.42886 8.32044 8.43275 8.30352 8.43117C6.84742 8.26982 5.37743 8.55458 4.07807 9.24973C2.77871 9.94486 1.70788 11.0194 1 12.3385C3.00951 12.056 5.04598 12.0403 7.05937 12.2919C7.08074 12.2954 7.10075 12.3049 7.11728 12.3193C7.13379 12.3336 7.14618 12.3524 7.15309 12.3735C7.16001 12.3946 7.16121 12.4172 7.15652 12.4389C7.15184 12.4606 7.14149 12.4806 7.12658 12.4968C6.55504 13.1319 4.67154 15.7405 6.02562 21.3846Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol><symbol id="strain-blend" viewBox="0 0 24 24">
2<path d="M12 10.8v12m.2-5.7c6-1.6 10.1-4 8.3-10.9-4.7 1.3-7.6 3.1-8.5 6.1M3.5 1.2c6.9 1.8 9.9 5 8.3 10.9-6-1.6-10.1-4-8.3-11Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol><symbol id="icon-cart" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M3 3h2l.4 2M7 13h10l4-8H5.4m0 0L7 13m0 0l-2.5 5M7 13l2.5 5m0 0h7.5"></path></symbol><symbol id="icon-berry" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.31253 10.625C5.31253 10.625 5.21878 4.375 9.68753 0.625C10.1875 3.8125 11.7188 6.6875 14.5938 8.75M7.18753 0.625H11.5625" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5.3125 19.375C7.72875 19.375 9.6875 17.4162 9.6875 15C9.6875 12.5838 7.72875 10.625 5.3125 10.625C2.89625 10.625 0.9375 12.5838 0.9375 15C0.9375 17.4162 2.89625 19.375 5.3125 19.375Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.6875 17.5C17.1037 17.5 19.0625 15.5412 19.0625 13.125C19.0625 10.7088 17.1037 8.75 14.6875 8.75C12.2713 8.75 10.3125 10.7088 10.3125 13.125C10.3125 15.5412 12.2713 17.5 14.6875 17.5Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol><symbol id="icon-citrus" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.5 4.5C11.366 4.5 14.5 7.63401 14.5 11.5C14.5 11.8746 14.4706 12.2423 14.4139 12.601L11.2157 9.40381C10.1557 10.4639 9.5 11.9283 9.5 13.5459C9.5 15.0832 10.0922 16.4822 11.0609 17.5273C10.018 18.1454 8.80041 18.5 7.5 18.5C3.63401 18.5 0.5 15.366 0.5 11.5C0.5 7.63401 3.63401 4.5 7.5 4.5ZM7.5 4.5L4.91165 3.98233C3.50938 3.70188 2.5 2.47063 2.5 1.04059V0.5L5.08835 1.01767C6.49062 1.29812 7.5 2.52937 7.5 3.95941V5.5M7.5 4.5V5.5M7.5 5.5C7.5 4.27427 8.19253 3.15374 9.28885 2.60557L9.5 2.5M12.4902 10.7745L12.4388 10.7231C12.0566 10.3408 11.6489 9.93316 11.2157 9.5C10.1557 10.5601 9.5 12.0245 9.5 13.6421C9.5 14.0333 9.53834 14.4155 9.61146 14.7852C9.68682 15.1662 9.79911 15.5338 9.94446 15.8844C10.2414 16.6003 10.6762 17.2447 11.2157 17.7843C11.7553 18.3238 12.3997 18.7586 13.1156 19.0555C13.4662 19.2009 13.8338 19.3132 14.2148 19.3885C14.5845 19.4617 14.9667 19.5 15.3579 19.5C16.9755 19.5 18.4399 18.8443 19.5 17.7843C19.0668 17.3511 18.6592 16.9434 18.2769 16.5612L18.2255 16.5098M12.4902 10.7745C11.7563 11.5084 11.3024 12.5223 11.3024 13.6421M12.4902 10.7745L12.7207 11.0049C12.8
213 11.0973 12.9038 11.1881 12.993 11.2772L13.509 11.7932C13.5918 11.876 13.673 11.9573 13.7526 12.0369L14.8276 13.1118C15.0187 13.3029 15.1954 13.4797 15.3579 13.6421M11.3024 13.6421C11.3024 15.8819 13.1181 17.6976 15.3579 17.6976M11.3024 13.6421C11.3024 13.9129 11.329 14.1775 11.3796 14.4334L15.3579 13.6421M15.3579 17.6976C16.4777 17.6976 17.4916 17.2437 18.2255 16.5098M15.3579 17.6976C14.8079 17.6976 14.2835 17.5881 13.8053 17.3898L15.3579 13.6421M18.2255 16.5098L17.9951 16.2793C17.9027 16.187 17.8119 16.0962 17.7228 16.007L17.2068 15.491C17.124 15.4082 17.0427 15.327 16.9631 15.2474L15.8882 14.1724C15.6971 13.9813 15.5203 13.8046 15.3579 13.6421" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol><symbol id="icon-fruity" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.0001 3.02344L12.8462 3.07475C11.1465 3.6413 10.0001 5.23187 10.0001 7.02344V4.48285C10.0001 3.05281 8.99075 1.82156 7.58848 1.54111L5.00013 1.02344V1.56403C5.00013 2.99407 6.00951 4.22531 7.41178 4.50577L10.0001 5.02344M13.8417 5.77214C14.8887 5.70044 15.913 6.10031 16.6346 6.86241C17.3111 7.5769 17.6927 8.51713 17.7092 9.49548L17.7065 9.72185L17.6807 10.3534C17.6256 11.7028 17.4085 13.04 17.0345 14.3364L16.887 14.8206L16.5198 15.9632C16.0677 17.3702 14.9449 18.4599 13.525 18.8696C12.9221 19.0436 12.1006 19.0061 11.0605 18.7572L10.7715 18.6841C10.2659 18.5495 9.7339 18.5495 9.22833 18.6841C8.05062 18.9976 7.13293 19.0594 6.47528 18.8696C5.05537 18.4599 3.93256 17.3702 3.48046 15.9632L3.1133 14.8206C2.64852 13.3741 2.38153 11.8714 2.31957 10.3534L2.2938 9.72185C2.25059 8.66311 2.63716 7.63186 3.36567 6.86241C4.08722 6.10031 5.11154 5.70044 6.15858 5.77214L6.77668 5.81446C7.66539 5.87531 8.74009 6.52751 10.0008 7.77108C11.1677 6.58595 12.164 5.94132 12.9898 5.83718L13.2236 5.81446L13.8417 5.77214Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol><symbol id="icon-nutty" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 5V15M6.58579 5.58579C5.80474 6.36683 5.80474 7.63316 6.58579 8.41421C7.05193 8.88036 7.69093 9.0683 8.29645 8.97804M12.4142 15.4142C13.1953 14.6332 13.1953 13.3668 12.4142 12.5858M14.3678 8.53934C13.782 7.95355 12.8322 7.95355 12.2464 8.53934M5.64645 13.4C6.23223 13.9858 7.18198 13.9858 7.76777 13.4M10 18.5C15 18.5 17 14.5 17 10.6176C17 6.53922 14.6667 3.5 10 1.5C5.33333 3.5 3 6.53922 3 10.6176C3 14.5 5 18.5 10 18.5ZM10 4.17157L11.0619 5.23319C11.3417 5.08434 11.661 5 12 5C13.1046 5 14 5.89543 14 7C14 7.41214 13.8753 7.79516 13.6617 8.11342C14.4408 8.38486 15 9.12713 15 10C15 10.3644 14.9025 10.7061 14.7322 11.0003C14.9025 11.2939 15 11.6356 15 12C15 13.1046 14.1046 14 13 14C13 15.1046 12.1046 16 11 16C10.6357 16 10.2941 15.9026 9.99993 15.7324C9.70666 15.9024 9.36473 16 9 16C7.89543 16 7 15.1046 7 14L6.85074 13.9945C5.81588 13.9182 5 13.0544 5 12C5 11.6356 5.09747 11.2939 5.26776 10.9997C5.09747 10.7061 5 10.3644 5 10C5 9.12713 5.55917 8.38486 6.33884 8.11187C6.12466 7.79516 6 7.41214 6 7C6 5.89543 6.89543 5 8 5C8.339 5 8.65831 5.08434 8.93807 5.23319L10 4.17157Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol><symbol id="icon-skunky" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M16.6544 12.4512C17.0784 12.586 17.6317 12.7616 18.1744 12.4844L19.2783 14.1284C19.2083 14.2353 18.9827 14.3972 18.9191 14.4156L17.1866 14.2033C15.8947 14.039 14.6671 14.9824 13.707 15.7285L13.2882 16.0501C12.9123 16.3305 12.2898 17.2881 12.2898 17.8498V18.6481L11.4716 18.648V17.7108C11.4716 16.5544 11.0515 16.0167 10.15 16.0167C9.96197 16.0167 9.75521 16.0384 9.53925 16.0615C9.20401 16.0988 8.84086 16.1403 8.48444 16.0799C8.12048 16.0163 7.7908 15.9047 7.5012 15.8064C6.96007 15.6232 6.49604 15.5064 6.14686 15.6916C5.52369 16.0219 5.47205 17.0131 5.47291 17.9611V18.6474H4.65456V17.6731C4.65456 17.2256 4.52259 15.9079 4.13296 14.9071C4.10213 14.8279 4.04409 14.7632 3.97057 14.7235C2.07174 13.7036 0.729402 11.5584 0.706652 9.5079C0.688237 7.87035 1.49864 6.50558 2.99387 5.66009C4.09989 5.00246 5.51505 4.90492 7.01346 4.80128C8.99097 4.66526 11.1848 4.51334 12.6534 2.84931C11.9538 4.99814 9.45057 5.29935 7.37274 5.54849C6.82196 5.61531 6.30204 5.67725 5.85923 5.7717C3.13241 6.34369 2.40252 7.93003 2.20963 8.82441C1.88165 10.3475 2.57123 12.0823 3.88482 13.044C4.94674 13.8192 6.18962 13.9019 7.29564 13.2676C7.64608 13.0676 7.92845 12.8625 8.17759 12.6808C9.02719 12.0656 9.37764 11.81 10.9132 12.8312C11.6304 13.3081 12.6632 13.994 13.6471 13.994C13.8055 13.994 13.9639 13.9773 14.1184 13.9373C14.6511 13.8012 15.0824 13.4268 15.3992 12.8244C15.7477 12.162 16.0508 12.2576 16.6544 12.4512M16.3916 11.1473C16.954 11.1473 17.4456 11.3973 17.7372 11.8332L17.7
2751 11.8896C17.5292 11.9776 17.2571 11.9012 16.8692 11.778C16.2479 11.5815 15.3987 11.3092 14.7736 12.4971C14.5508 12.9203 14.2792 13.1675 13.9433 13.2527C13.1265 13.465 11.9872 12.697 11.3041 12.2423C9.44933 11.0083 8.78251 11.3695 7.76213 12.1099C7.52818 12.2802 7.26214 12.473 6.94532 12.6559C5.7757 13.3262 4.78771 12.8303 4.30222 12.4747C3.22341 11.6855 2.63342 10.2136 2.90016 8.9739C3.17094 7.71791 4.27332 6.82675 6.00491 6.46236C6.41729 6.37558 6.92204 6.31518 7.45732 6.25072C9.68372 5.98357 12.9322 5.59155 13.473 2.49113C14.0773 3.65587 14.2005 4.66592 13.8386 5.50352C13.1531 7.08875 10.7218 8.21345 6.61369 8.84348C5.36927 9.03474 4.49778 9.9471 4.55011 10.6355C4.58526 11.0999 5.07578 11.5727 6.39733 11.0631C8.65973 9.9135 10.6144 10.1323 12.4569 11.7563C12.8097 12.0675 13.1941 12.2258 13.5993 12.2258C14.2137 12.2258 14.7617 11.8758 15.3145 11.4883C15.628 11.2681 16.0104 11.1473 16.3919 11.1473L16.3916 11.1473ZM18.2356 13.2048C18.2356 13.0185 18.0844 12.8672 17.898 12.8672C17.7116 12.8672 17.5604 13.0185 17.5604 13.2048C17.5604 13.3912 17.7121 13.5424 17.898 13.5424C18.0844 13.5424 18.2356 13.3912 18.2356 13.2048ZM14.4867 5.78387C15.0328 4.52146 14.7235 3.00476 13.5688 1.27464C13.5191 1.19987 13.4863 1.13862 13.4356 1.09147C13.2888 0.956286 13.0495 0.973029 12.9212 1.12788C12.8824 1.17462 12.8648 1.22386 12.8392 1.27743C11.6597 3.77336 9.37844 3.931 6.96425 4.09743C5.44992 4.20178 3.88394 4.31018 2.64038 5.04817C0.917621 6.02333 -0.0207238 7.61006 0.000347313 9.51632C0.0255981 11.8059 1.43394 14.1055 3.51912 15.282C3.84599 16.192 3.9484 17.3423 3.9484 17.6735V19.0007C3.9484 19.1963 4.10674 19.3543 4.30205 19.3543H5.82646C6.02163 19.3543 6.18011 19.196 6.18011 19.0007V17.9154C6.17969 16.9594 6.27972 16.4219 6.47852 16.3167C6.5957 16.2547 6.91251 16.3535 7.27497 16.4754C7.58858 16.5826 7.9446 16.7023 8.36256 16.7754C8.78777 16.8501 9.21941 16.807 9.6149 16.7634C9.80575 16.7434 9.98572 16.7226 10.1505 16.7226C10.4673 16.7226 10.7653 16.7226 10.7653 17.711V19.0011C10.7653 19.1967 10.9236 19.3547 11.1189 19.3547H12.6433C12.8377 19.3547 12.9962 19.1964 12.9962 19.0011V17.8499C12.9962 17.5679 13.4649 16.7995 13.711 16.6163L14.141 16.2867C15.0461 15.5834 16.0689 14.7702 17.1009 14.9047L18.8945 15.1211C19.2257 15.1211 19.7298 14.7823 19.9138 14.4384C20.0326 14.2152 20.0286 13.9788 19.9018 13.7892L18.7165 12.0245L18.3245 11.4401C17.8984 10.8057 17.1941 10.4425 16.3922 10.4425C15.8669 10.4425 15.3406 10.6081 14.9093 10.9101C14.1926 11.4141 13.539 11.7689 12.9246 11.2278C10.9418 9.48057 8.67321 9.19903 6.32788 10.3126C6.03506 10.4518 5.72103 10.5902 5.39068 10.5902C5.3007 10.5902 5.25508 10.5735 5.25508 10.5855C5.25187 10.563 5.26066 10.4691 5.36264 10.3194C5.56227 10.0258 6.03702 9.64744 6.72144 9.54265C11.1471 8.86241 13.6874 7.63321 14.4871 5.78413L14.4867 5.78387Z" fill="currentColor"></path><path d="M16.6544 12.4512C17.0784 12.586 17.6317 12.7616 18.1744 12.4844L19.2783 14.1284C19.2083 14.2353 18.9827 14.3972 18.9191 14.4156L17.1866 14.2033C15.8947 14.039 14.6671 14.9824 13.707 15.7285L13.2882 16.0501C12.9123 16.3305 12.2898 17.2881 12.2898 17.8498V18.6481L11.4716 18.648V17.7108C11.4716 16.5544 11.0515 16.0167 10.15 16.0167C9.96197 16.0167 9.75521 16.0384 9.53925 16.0615C9.20401 16.0988 8.84086 16.1403 8.48444 16.0799C8.12048 16.0163 7.7908 15.9047 7.5012 15.8064C6.96007 15.6232 6.49604 15.5064 6.14686 15.6916C5.52369 16.0219 5.47205 17.0131 5.47291 17.9611V18.6474H4.65456V17.6731C4.65456 17.2256 4.52259 15.9079 4.13296 14.9071C4.10213 14.8279 4.04409 14.7632 3.97057 14.7235C2.07174 13.7036 0.729402 11.5584 0.706652 9.5079C0.688237 7.87035 1.49864 6.50558 2.99387 5.66009C4.09989 5.00246 5.51505 4.90492 7.01346 4.80128C8.99097 4.66526 11.1848 4.51334 12.6534 2.84931C11.9538 4.99814 9.45057 5.29935 7.37274 5.54849C6.82196 5.61531 6.30204 5.67725 5.85923 5.7717C3.13241 6.34369 2.40252 7.93003 2.20963 8.82441C1.88165 10.3475 2.57123 12.0823 3.88482 13.044C4.94674 13.8192 6.18962 13.9019 7.29564 13.2676C7.64608 13.0676 7.92845 12.8625 8.17759 12.6808C9.02719 12.0656 9.37764 11.81 10.9132 12.8312C11.6304 13.3081 12.6632 13.994 13.6471 13.994C13.8055 13.994 13.9639 13.9773 14.1184 13.9373C14.6511 13.8012 15.0824 13.4268 15.3992 12.8244C15.7477 12.162 16.0508 12.2576 16.6544 12.4512M16.3916 11.1473C16.954 11.1473 17.4456 11.3973 17.7372 11.8332L17.7
2751 11.8896C17.5292 11.9776 17.2571 11.9012 16.8692 11.778C16.2479 11.5815 15.3987 11.3092 14.7736 12.4971C14.5508 12.9203 14.2792 13.1675 13.9433 13.2527C13.1265 13.465 11.9872 12.697 11.3041 12.2423C9.44933 11.0083 8.78251 11.3695 7.76213 12.1099C7.52818 12.2802 7.26214 12.473 6.94532 12.6559C5.7757 13.3262 4.78771 12.8303 4.30222 12.4747C3.22341 11.6855 2.63342 10.2136 2.90016 8.9739C3.17094 7.71791 4.27332 6.82675 6.00491 6.46236C6.41729 6.37558 6.92204 6.31518 7.45732 6.25072C9.68372 5.98357 12.9322 5.59155 13.473 2.49113C14.0773 3.65587 14.2005 4.66592 13.8386 5.50352C13.1531 7.08875 10.7218 8.21345 6.61368 8.84348C5.36927 9.03474 4.49778 9.9471 4.55011 10.6355C4.58526 11.0999 5.07578 11.5727 6.39733 11.0631C8.65973 9.9135 10.6144 10.1323 12.4569 11.7563C12.8097 12.0675 13.1941 12.2258 13.5993 12.2258C14.2137 12.2258 14.7617 11.8758 15.3145 11.4883C15.628 11.2681 16.0104 11.1473 16.3919 11.1473L16.3916 11.1473ZM18.2356 13.2048C18.2356 13.0185 18.0844 12.8672 17.898 12.8672C17.7116 12.8672 17.5604 13.0185 17.5604 13.2048C17.5604 13.3912 17.7121 13.5425 17.898 13.5425C18.0844 13.5425 18.2356 13.3912 18.2356 13.2048ZM14.4867 5.78387C15.0328 4.52146 14.7235 3.00476 13.5688 1.27464C13.5191 1.19987 13.4863 1.13862 13.4356 1.09147C13.2888 0.956286 13.0495 0.973029 12.9212 1.12788C12.8824 1.17462 12.8648 1.22386 12.8392 1.27743C11.6597 3.77336 9.37844 3.931 6.96425 4.09743C5.44992 4.20178 3.88394 4.31018 2.64038 5.04817C0.917621 6.02333 -0.0207238 7.61006 0.000347313 9.51632C0.0255981 11.8059 1.43394 14.1056 3.51912 15.282C3.84599 16.192 3.9484 17.3423 3.9484 17.6735V19.0007C3.9484 19.1963 4.10674 19.3543 4.30205 19.3543H5.82646C6.02163 19.3543 6.18011 19.196 6.18011 19.0007V17.9154C6.17969 16.9594 6.27972 16.4219 6.47852 16.3167C6.5957 16.2547 6.91251 16.3535 7.27497 16.4754C7.58858 16.5826 7.9446 16.7023 8.36256 16.7754C8.78777 16.8501 9.21941 16.807 9.6149 16.7634C9.80575 16.7434 9.98572 16.7226 10.1505 16.7226C10.4673 16.7226 10.7653 16.7226 10.7653 17.711V19.0011C10.7653 19.1967 10.9236 19.3547 11.1189 19.3547H12.6433C12.8377 19.3547 12.9961 19.1964 12.9961 19.0011V17.8499C12.9961 17.5679 13.4649 16.7995 13.711 16.6163L14.141 16.2867C15.0461 15.5834 16.0689 14.7702 17.1009 14.9047L18.8945 15.1211C19.2257 15.1211 19.7298 14.7823 19.9138 14.4384C20.0326 14.2152 20.0286 13.9788 19.9018 13.7892L18.7165 12.0245L18.3245 11.4401C17.8984 10.8057 17.1941 10.4425 16.3922 10.4425C15.8669 10.4425 15.3406 10.6081 14.9093 10.9101C14.1926 11.4141 13.539 11.7689 12.9246 11.2278C10.9418 9.48057 8.67321 9.19903 6.32788 10.3126C6.03506 10.4518 5.72103 10.5902 5.39068 10.5902C5.3007 10.5902 5.25508 10.5735 5.25508 10.5855C5.25187 10.563 5.26066 10.4691 5.36264 10.3194C5.56227 10.0258 6.03702 9.64744 6.72144 9.54265C11.1471 8.86241 13.6874 7.63321 14.4871 5.78413L14.4867 5.78387Z" stroke="currentColor" stroke-width="0.2"></path></symbol><symbol id="icon-tropical" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.0004 7.99982C12.466 10.9523 13.7763 13.5963 10.6731 17.1494M2.49939 19.3719C3.27894 18.5794 4.20855 17.9502 5.23394 17.521C6.25934 17.0918 7.35997 16.8711 8.47158 16.8719C12.2591 16.8719 14.9997 19.3719 14.9997 19.3719H2.49939Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.05907 13C9.31099 12.616 11.6307 8.304 12.0516 7.5212C12.0591 7.5075 12.0697 7.4959 12.0824 7.48741C12.0951 7.47892 12.1096 7.47378 12.1247 7.47244C12.1397 7.47111 12.1548 7.47361 12.1687 7.47973C12.1826 7.48585 12.1949 7.49542 12.2045 7.5076L16.7041 12.9996C16.7007 11.0837 16.2062 9.20381 15.272 7.556C15.2675 7.54925 15.2655 7.54103 15.2664 7.53286C15.2672 7.52469 15.2709 7.51712 15.2767 7.51155C15.2825 7.50599 15.29 7.50281 15.2978 7.50259C15.3057 7.50238 15.3134 7.50516 15.3194 7.5104C16.468 8.40288 17.7008 9.17008 18.9985 9.8C18.9985 9.8 19.1323 7.5784 16.831 5.8908C16.8214 5.88408 16.8141 5.8744 16.81 5.86311C16.8059 5.85182 16.8053 5.83949 16.8083 5.82783C16.8112 5.81616 16.8176 5.80575 16.8264 5.79804C16.8353 5.79033 16.8462 5.7857 16.8577 5.7848C18.5077 5.6036 18.9985 5 18.9985 5C18.9985 5 16.9139 3.1492 14.5304 4.148C14.5192 4.15333 14.5068 4.15535 14.4946 4.15383C14.4824 4.15232 14.4708 4.14734 14.4611 4.13942C14.4514 4.1315 14.444 4.12096 14.4396 4.10893C14.4352 4.0969 14.4341 4.08385 14.4363 4.0712C14.6959 2.7572 15.1757 1 15.1757 1C15.1757 1 13.0207 1.928 12.1697 3.3104C12.155 3.3345 12.1319 3.35171 12.1054 3.35842C12.0788 3.36513 12.0508 3.36082 12.0271 3.3464C9.89245 2.0888 8.29449 2.6004 8.29449 2.6004L10.4842 4.8916C10.4918 4.89902 10.4969 4.90871 10.4989 4.91932C10.5009 4.92993 10.4997 4.94093 10.4954 4.95079C10.4912 4.96065 10.4841 4.96887 10.4752 4.97432C10.4662 4.97977 10.4559 4.98218 10.4456 4.9812C9.5593 4.88132 8.66452 5.0576 7.87361 5.48793C7.08269 5.91825 6.43088 6.58344 6 7.4C7.22318 7.22512 8.46277 7.21544 9.68831 7.3712C9.70132 7.37337 9.7135 7.37923 9.72356 7.38812C9.73361 7.39702 9.74115 7.40862 9.74536 7.42167C9.74957 7.43473 9.7503 7.44874 9.74745 7.46219C9.7446 7.47564 9.7383 7.48802 9.72922 7.498C9.38133 7.8912 8.23485 9.506 9.05907 13Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.74939 11.2484C5.1301 11.2484 6.24939 10.1291 6.24939 8.74841C6.24939 7.3677 5.1301 6.24841 3.74939 6.24841C2.36868 6.24841 1.24939 7.3677 1.24939 8.74841C1.24939 10.1291 2.36868 11.2484 3.74939 11.2484Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol>
2<symbol id="icon-cheesy" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M19.375 9.375L9.375 0.625C9.375 0.625 0.625 1.65625 0.625 6.875M19.375 9.375L0.625 6.875M19.375 9.375V14.5L18.9062 14.4062C18.4918 14.4063 18.0944 14.5709 17.8014 14.8639C17.5084 15.1569 17.3438 15.5543 17.3438 15.9688C17.3438 16.3832 17.5084 16.7806 17.8014 17.0736C18.0944 17.3666 18.4918 17.5312 18.9062 17.5312L19.375 17.4375V19.375L0.625 16.875V6.875M15.625 11.875C15.625 12.3928 15.2053 12.8125 14.6875 12.8125C14.1697 12.8125 13.75 12.3928 13.75 11.875C13.75 11.3572 14.1697 10.9375 14.6875 10.9375C15.2053 10.9375 15.625 11.3572 15.625 11.875ZM12.5 14.6875C12.5 15.5504 11.8004 16.25 10.9375 16.25C10.0746 16.25 9.375 15.5504 9.375 14.6875C9.375 13.8246 10.0746 13.125 10.9375 13.125C11.8004 13.125 12.5 13.8246 12.5 14.6875ZM8.78125 11.25C8.78125 11.5952 8.50143 11.875 8.15625 11.875C7.81107 11.875 7.53125 11.5952 7.53125 11.25C7.53125 10.9048 7.81107 10.625 8.15625 10.625C8.50143 10.625 8.78125 10.9048 8.78125 11.25ZM5.625 14.375C5.625 14.7202 5.34518 15 5 15C4.65482 15 4.375 14.7202 4.375 14.375C4.375 14.0298 4.65482 13.75 5 13.75C5.34518 13.75 5.625 14.0298 5.625 14.375ZM5 10.625C5 11.3154 4.44036 11.875 3.75 11.875C3.05964 11.875 2.5 11.3154 2.5 10.625C2.5 9.93464 3.05964 9.375 3.75 9.375C4.44036 9.375 5 9.93464 5 10.625Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol><symbol id="icon-earthy" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18.4919 6.77984H15.4948V5.26799C15.7196 5.39043 15.9714 5.45599 16.2277 5.4588C16.258 5.4588 16.2882 5.45781 16.3187 5.45613C16.8977 5.38875 17.431 5.11109 17.8156 4.67668C18.7761 3.72434 18.9781 1.76044 18.998 1.53948C19.0112 1.39337 18.9583 1.24894 18.8537 1.14513C18.7491 1.04147 18.6035 0.988931 18.4562 1.00196C18.2334 1.02185 16.2532 1.22204 15.2929 2.17465C15.1868 2.28042 15.0874 2.39235 14.9953 2.51017C14.9032 2.39235 14.8038 2.28042 14.6977 2.17465C13.7374 1.22205 11.7571 1.02172 11.5344 1.00196C11.3871 0.988932 11.2415 1.04147 11.1369 1.14513C11.0323 1.24894 10.9794 1.39337 10.9924 1.53948C11.0125 1.76041 11.2143 3.72434 12.1749 4.67668H12.175C12.5597 5.11109 13.0929 5.38875 13.6719 5.45613C13.7024 5.45781 13.7326 5.4588 13.7629 5.4588C14.0192 5.45599 14.271 5.39043 14.4958 5.26813V6.77984H5.50441V5.26799C5.72914 5.39043 5.98087 5.45599 6.23725 5.45879C6.26748 5.45879 6.29771 5.45781 6.32821 5.45613C6.90722 5.38875 7.4406 5.11109 7.82521 4.67668C8.78561 3.72433 8.9876 1.76043 9.00764 1.53948C9.02077 1.39337 8.9678 1.24893 8.86328 1.14513C8.75861 1.04146 8.61297 0.988927 8.46565 1.00196C8.24289 1.02185 6.26265 1.22204 5.30239 2.17465C5.19631 2.28041 5.09687 2.39235 5.00477 2.51016C4.91267 2.39235 4.81323 2.28042 4.70729 2.17465C3.74689 1.22205 1.76667 1.02182 1.54392 1.00196C1.3966 0.988928 1.25096 1.04146 1.14644 1.14513C1.04177 1.24893 0.988942 1.39337 1.00194 1.53948C1.022 1.7604 1.22385 3.72433 2.18437 4.67668H2.18451C2.56915 5.11109 3.10238 5.38874 3.68139 5.45613C3.7119 5.45781 3.74213 5.45879 3.77236 5.45879C4.02873 5.45599 4.28046 5.39043 4.50534 5.26813V6.77983H1.50821C1.4462 6.78039 1.38504 6.79272 1.32769 6.81598C1.3089 6.82466 1.29082 6.83461 1.27345 6.84553C1.21666 6.87243 1.16708 6.91264 1.12923 6.96265C1.10677 6.98913 1.08713 7.01785 1.07089 7.04852C1.05874 7.07136 1.04843 7.09531 1.04023 7.11983C1.03543 7.13398 1.02625 7.14575 1.02272 7.1606V7.16046C1.01975 7.18259 1.0182 7.20486 1.01834 7.227C1.01424 7.24297 1.01099 7.25894 1.00859 7.27519V18.5047C1.00859 18.7783 1.23234 19 1.50819 19H18.4919C18.7678 19 18.9915 18.7782 18.9915 18.5047V7.27519C18.9915 7.0016 18.7678 6.77985 18.4919 6.77985L18.4919 6.77984ZM15.9992 2.87506C16.5554 2.45213 17.2127 2.17964 17.9068 2.08396C17.8105 2.77249 17.5356 3.42434 17.1093 3.97588C16.8927 4.23238 16.593 4.40581 16.2613 4.46677C16.0609 4.47042 15.8694 4.38468 15.7397 4.2331C15.5876 4.10394 15.5014 3.9144 15.5044 3.71589C15.5657 3.38709 15.7407 3.08982 15.9992 2.87507L15.9992 2.87506ZM14.2509 4.23338C14.1209 4.38482 13.9295 4.47041 13.7291 4.46677C13.3975 4.40597 13.0978 4.23239 12.8813 3.97602C12.4548 3.42433 12.1801 2.77248 12.0837 2.08409C12.7778 2.17963 13.4351 2.45226 13.9912 2.87505C14.2499 3.08981 14.4247 3.38707 14.4862 3.71586C14.4892 3.91451 14.4029 4.10405 14.2509 4.23337L14.2509 4.23338ZM6.00868 2.87506C6.56495 2.45227 7.22221 2.17964 7.91632 2.0841C7.81998 2.77249 7.54523 3.42434 7.11879 3.97602C6.90225 4.23239 6.60252 4.40595 6.27099 4.46677C6.07055 4.47042 5.87901 4.38468 5.74919 4.2331C5.5972 4.10394 5.5109 3.9144 5.51386 3.71589C5.57517 3.38709 5.75018 3.08982 6.00869 2.87507L6.00868 2.87506ZM4.26037 4.23338C4.13056 4.38482 3.93902 4.47055 3.73871 4.46677C3.40705 4.40597 3.1073 4.23239 2.89077 3.97602C2.46447 3.42433 2.18957 2.77248 2.09324 2.08409C2.78735 2.17963 3.44461 2.45226 4.00088 2.87505C4.25937 3.08981 4.43438 3.38707 4.49571 3.71586C4.49867 3.91451 4.41236 4.10405 4.26038 4.23337L4.26037 4.23338ZM2.00765 18.0091V8.17043C3.44223 9.1949 6.50137 12.0673 6.66301 18.0091H2.00765ZM3.11493 7.7702H7.04383C7.78104 8.17954 12.1255 10.8955 12.3212 18.0088L7.6629 18.0089C7.51501 12.2791 4.82354 9.17187 3.11493 7.76998V7.7702ZM13.3199 18.0091C13.171 12.2782 10.4826 9.17066 8.77449 7.77056H12.7052C13.4443 8.18101 17.7916 10.8947 17.9854 18.0091H13.3199ZM14.4358 7.77056H17.9924V12.7839V12.7837C17.2631 10.8362 16.0379 9.10919 14.4358 7.77042V7.77056Z" fill="currentColor"></path></symbol><symbol id="icon-chemical" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.6142 12.3134L12.4638 7.99176C12.3642 7.79139 12.3124 7.57062 12.3126 7.34683V1.32684H7.68743V7.34712C7.68746 7.57051 7.63571 7.79087 7.53624 7.99089L5.38639 12.3134M14.6142 12.3134L16.0891 15.2767C16.293 15.6585 16.3848 16.0901 16.3539 16.5218C16.2987 17.1152 16.022 17.6661 15.5789 18.0646C15.1358 18.4632 14.5589 18.6802 13.963
218.6725H6.02987C5.46816 18.6801 4.92208 18.4875 4.48937 18.1292C4.05666 17.771 3.76555 17.2705 3.66812 16.7172C3.59065 16.2236 3.6763 15.7181 3.9121 15.2776L5.38639 12.3134M14.6142 12.3134H5.38639M6.8202 1.32684H13.1799M10.2891 6.5302C10.2891 6.8495 10.0303 7.10835 9.71095 7.10835C9.39165 7.10835 9.1328 6.8495 9.1328 6.5302C9.1328 6.21089 9.39165 5.95205 9.71095 5.95205C10.0303 5.95205 10.2891 6.21089 10.2891 6.5302ZM11.4454 9.9991C11.4454 10.3184 11.1866 10.5773 10.8673 10.5773C10.548 10.5773 10.2891 10.3184 10.2891 9.9991C10.2891 9.6798 10.548 9.42095 10.8673 9.42095C11.1866 9.42095 11.4454 9.6798 11.4454 9.9991ZM7.68743 14.6243C7.68743 14.9436 7.42858 15.2025 7.10928 15.2025C6.78997 15.2025 6.53113 14.9436 6.53113 14.6243C6.53113 14.305 6.78997 14.0462 7.10928 14.0462C7.42858 14.0462 7.68743 14.305 7.68743 14.6243ZM12.8908 15.4915C12.8908 16.1301 12.3731 16.6478 11.7345 16.6478C11.0959 16.6478 10.5782 16.1301 10.5782 15.4915C10.5782 14.8529 11.0959 14.3352 11.7345 14.3352C12.3731 14.3352 12.8908 14.8529 12.8908 15.4915Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol><symbol id="icon-floral" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.18647 12.4089C3.36287 14.1124 3.53614 16.0792 3.54289 16.1691C3.55639 16.3221 3.68008 16.4458 3.83313 16.4593C3.86012 16.4615 4.06497 16.4796 4.38674 16.4796C5.10912 16.4796 6.41192 16.3829 7.5889 15.8112C8.20765 17.6023 9.72663 18.8716 9.79414 18.9278C9.85489 18.9774 9.92913 19.0022 10.0012 19.0022C10.0732 19.0022 10.1475 18.9774 10.206 18.928C10.2735 18.8718 11.7925 17.6025 12.4113 15.8114C13.5904 16.3829 14.8934 16.4797 15.6156 16.4797C15.9352 16.4797 16.1399 16.4617 16.1669 16.4595C16.3221 16.4438 16.4436 16.3223 16.4571 16.1692C16.4661 16.0815 16.6394 14.1125 15.8135 12.4091C17.6025 11.7903 18.8694 10.2757 18.9257 10.2082C19.0248 10.0889 19.0248 9.91565 18.9257 9.79872C18.8695 9.73122 17.6003 8.21444 15.8135 7.59569C16.6371 5.89226 16.466 3.92768 16.4571 3.83771C16.4436 3.68466 16.3221 3.56097 16.1669 3.54747C16.0791 3.54072 14.1101 3.36288 12.4089 4.18647C11.7878 2.3997 10.2733 1.13283 10.2059 1.07428C10.0866 0.975239 9.91328 0.975239 9.79414 1.07428C9.72664 1.13048 8.20986 2.40191 7.59111 4.18647C5.88768 3.36287 3.9231 3.53835 3.83313 3.54747C3.68008 3.56317 3.55859 3.68466 3.54289 3.83771C3.53394 3.92545 3.36065 5.89226 4.18647 7.59569C2.39749 8.21681 1.13062 9.73125 1.07428 9.79872C0.975239 9.91802 0.975239 10.0913 1.07428 10.2082C1.13283 10.2778 2.3997 11.7922 4.18647 12.4089V12.4089ZM4.17297 15.8316C4.15728 15.2375 4.19777 13.7951 4.8211 12.5844C5.10018 12.643 5.38146 12.6722 5.66274 12.6722C7.22223 12.6722 8.57687 11.7743 9.46577 10.9934C9.46797 10.9912 9.47033 10.9912 9.47472 10.9889C9.47692 10.9867 9.47927 10.9843 9.47927 10.9821L9.48382 10.9776C9.48602 10.9754 9.49057 10.9708 9.49277 10.9663C9.55352 10.9123 9.60971 10.8583 9.66826 10.8043C9.67046 10.892 9.67501 10.9821 9.68176 11.0788C9.61207 12.114 9.32843 13.5429 8.37201 14.4993C8.15367 14.7176 7.90395 14.9088 7.62721 15.0686C6.37368 15.8046 4.79847 15.8473 4.17297 15.8316L4.17297 15.8316ZM11.9047 15.2667C11.5402 16.6686 10.4578 17.8118 10.001 18.2439C9.56888 17.8344 8.58109 16.7857 8.16699 15.4783C8.40323 15.323 8.62613 15.152 8.82187 14.954C9.92455 13.8513 10.2463 12.2513 10.3206 11.1038C10.3274 10.9958 10.3319 10.8967 10.3341 10.8022C10.3926 10.8562 10.4466 10.9124 10.5074 10.9642C10.5074 10.9642 10.5074 10.9664 10.5096 10.9664L10.5118 10.9686C11.2026 11.7539 12.0284 12.9759 12.0284 14.3373C12.0286 14.6479 11.9881 14.9608 11.9047 15.2667L11.9047 15.2667ZM15.8292 15.8316C15.2351 15.8473 13.7949 15.8068 12.5866 15.1835C12.6451 14.9044 12.6743 14.6209 12.6743 14.3396C12.6743 12.7915 11.7787 11.439 11.0091 10.5569C11.0023 10.5479 10.9956 10.5388 10.9866 10.5299C10.9305 10.4646 10.8697 10.4016 10.8112 10.3385C10.8943 10.3363 10.9844 10.3318 11.0767 10.325C12.1141 10.3947 13.5454 10.6784 14.5016 11.6348C14.7132 11.8464 14.9044 12.0961 15.0664 12.3752C15.8022 13.6262 15.8451 15.2014 15.8292 15.8316L15.8292 15.8316ZM18.2439 10.0034C17.8344 10.4355 16.7813 11.4233 15.4804 11.8328C15.3228 11.5966 15.1519 11.3715 14.9605 11.1803C13.8579 10.0776 12.2557 9.75585 11.1057 9.68159C11.0023 9.67484 10.9032 9.67029 10.8109 9.66809C10.8695 9.60515 10.9302 9.53985 10.991 9.47C11.7719 8.78595 12.9824 7.9758 14.3416 7.9758C14.6477 7.9758 14.9582 8.0185 15.2665 8.10185C16.6687 8.46429 17.8117 9.54657 18.2439 10.0033L18.2439 10.0034ZM15.8292 4.17312C15.8449 4.76724 15.8068
26.20288 15.1811 7.41812C14.902 7.35957 14.6207 7.33038 14.3395 7.33038C12.7732 7.33038 11.414 8.23716 10.5499 8.99784C10.4711 9.06534 10.4014 9.13063 10.3339 9.19358C10.3317 9.10803 10.3272 9.02029 10.3204 8.92579C10.3901 7.88841 10.6738 6.45951 11.6302 5.50093C11.8485 5.28259 12.0983 5.09142 12.375 4.93161C13.6285 4.19777 15.2014 4.15727 15.8292 4.17314L15.8292 4.17312ZM8.09748 4.7357C8.46196 3.33602 9.54441 2.19062 10.0012 1.75848C10.4333 2.17021 11.4211 3.22346 11.8352 4.52192C11.599 4.67716 11.3761 4.84825 11.1803 5.04399C10.0777 6.14888 9.75586 7.74883 9.67939 8.89881C9.67264 9.00225 9.66809 9.1013 9.66589 9.19359C9.60514 9.13505 9.53985 9.07665 9.4678 9.01355C8.78375 8.22824 7.97144 7.01533 7.97144 5.66291C7.97363 5.35447 8.01413 5.044 8.09748 4.73571L8.09748 4.7357ZM4.17297 4.17312C4.76476 4.15743 6.20727 4.19557 7.4156 4.81888C7.35705 5.09796 7.32785 5.38145 7.32785 5.66273C7.32785 7.22222 8.23464 8.58361 8.99532 9.45226C9.06281 9.5287 9.12811 9.60075 9.19106 9.66825C9.10551 9.67045 9.01777 9.675 8.92327 9.68175C8.07045 9.62555 6.50863 9.37801 5.49841 8.36762C5.28682 8.15603 5.09565 7.90631 4.93363 7.62719C4.19995 6.37615 4.15712 4.80099 4.17295 4.17312L4.17297 4.17312ZM4.52395 8.16952C4.68155 8.40811 4.85249 8.63083 5.04385 8.82202C6.15095 9.92912 7.75091 10.2509 8.89868 10.3251C9.00212 10.3319 9.09897 10.3364 9.19346 10.3386C9.13491 10.4016 9.07652 10.4647 9.01797 10.53C9.01797 10.5322 9.01577 10.5322 9.01577 10.5345C8.23046 11.2208 7.01977 12.0287 5.66513 12.0287C5.35905 12.0287 5.04855 11.986 4.74026 11.9027C3.33837 11.5404 2.19519 10.4579 1.76305 10.0033C2.16786 9.57153 3.22112 8.58137 4.52395 8.16948L4.52395 8.16952Z" fill="currentColor" stroke="currentColor" stroke-width="0.2"></path></symbol><symbol id="icon-gasoline/diesel" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.2069 10.6H6.58621C6.09236 10.6 5.61873 10.7896 5.26952 11.1272C4.92032 11.4648 4.72414 11.9226 4.72414 12.4V16.6C4.72414 17.0774 4.52796 17.5352 4.17875 17.8728C3.82954 18.2104 3.35592 18.4 2.86207 18.4C2.36822 18.4 1.89459 18.2104 1.54539 17.8728C1.19618 17.5352 1 17.0774 1 16.6V6.4M1 6.4L3.48276 4M1 6.4L3.48276 8.8V10H1M7.2069 19V2.2C7.2069 1.88174 7.33768 1.57652 7.57049 1.35147C7.80329 1.12643 8.11904 1 8.44828 1H16.5172C16.8465 1 17.1622 1.12643 17.395 1.35147C17.6278 1.57652 17.7586 1.88174 17.7586 2.2V19M5.96552 19H19M7.2069 8.2H17.7586M12.7931 10.6H15.2759V14.8H12.7931V10.6Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol><symbol id="icon-menthol" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.2942 7.01249C16.1928 6.98372 16.0837 7.01163 16.0088 7.08566L15.7522 7.33882C15.7186 6.87979 15.6305 6.25217 15.4093 5.6335C15.0031 4.49712 14.4871 3.85176 14.4653 3.82465C14.3699 3.70644 14.1996 3.6813 14.0738 3.76651L13.5199 4.14192C13.4297 3.78024 13.2169 3.264 12.7225 2.68123C11.5638 1.31531 10.4468 0.748936 10.3999 0.725499C10.3213 0.686171 10.2292 0.684237 10.1491 0.72048C10.1013 0.742038 8.96113 1.26389 7.74472 2.58339C7.22522 3.14703 6.99049 3.6549 6.88502 4.01264L6.34745 3.61575C6.22532 3.52546 6.05435 3.5437 5.95406 3.65785C5.93116 3.68392 5.38788 4.30856 4.9332 5.42773C4.68529 6.03789 4.57034 6.6624 4.51711 7.11984L4.27149 6.85656C4.19958 6.77957 4.09191 6.74723 3.98947 6.77177C3.88715 6.79626 3.8058 6.87397 3.7767 6.97518C3.76232 7.02486 3.42593 8.2056 3.50808 9.27475C3.54473 9.77739 3.6437 10.2736 3.80267 10.7519L3.49807 10.6464C3.4044 10.614 3.30081 10.6311 3.22261 10.692C3.14441 10.753 3.10234 10.8493 3.1109 10.9481C3.11514 10.9959 3.22083 12.1308 3.8597 13.1796C4.07714 13.5382 4.33179 13.8728 4.6195 14.1779C4.54231 14.186 4.47155 14.2246 4.42288 14.285C4.37415 14.3453 4.35142 14.4226 4.3597 14.4998C4.36439 14.5433 4.48853 15.5755 5.79083 16.545C5.87168 16.6052 5.95214 16.6625 6.03215 16.7169L5.78051 16.8017C5.67429 16.8374 5.59783 16.9308 5.58369 17.042C5.56951 17.1531 5.62015 17.2627 5.71404 17.3239C6.14429 17.5839 6.61373 17.7725 7.10428 17.8821C8.12066 18.113 9.08769 17.9663 9.91478 17.458C10.7194 17.9981 11.6794 18.1827 12.7048 17.9917C13.0459 17.9274 13.3791 17.827 13.6989 17.6925C13.8427 17.6334 13.9826 17.5652 14.1175 17.4884C14.2137 17.4309 14.2686 17.3236 14.2589 17.212C14.2493 17.1004 14.1768 17.0042 14.0721 16.9641L13.8255 16.8699C13.9078 16.8185 13.9907 16.7644 14.0744 16.7072C15.4168 15.79 15.5852 14.7639 15.5917 14.7207C15.6158 14.5611 15.5062 14.4123 15.3466 14.388C15.6471 14.0946 15.9158 13.7704 16.1484 13.4208C16.8316 12.3981 16.9863 11.2686 16.9925 11.221C17.0053 11.1225 16.9674 11.0241 16.8917 10.9599C16.8159 10.8956 16.7127 10.8743 16.6177 10.9029L16.3104 10.9959C16.4896 10.525 16.6096 10.0337 16.6679 9.53316C16.796 8.46808 16.5107 7.27
2516 16.4985 7.22492C16.4737 7.12246 16.3956 7.04137 16.2942 7.01249ZM7.47961 15.8055C8.18062 16.0397 8.91061 16.1757 9.64884 16.2098L9.63306 16.9444C8.93124 17.3859 8.13131 17.5112 7.25271 17.3159C7.04438 17.2692 6.83991 17.2068 6.64111 17.1292L6.81644 17.0702C6.92746 17.0327 7.00547 16.9325 7.01471 16.8158C7.02377 16.6989 6.96234 16.5879 6.8585 16.5337C6.60748 16.4 6.36728 16.247 6.14031 16.0758C5.47229 15.5785 5.17363 15.0828 5.04206 14.769L5.39713 14.7759C5.52711 14.7785 5.64306 14.6951 5.68201 14.5712C5.72085 14.4474 5.6735 14.3126 5.56546 14.2403C5.55913 14.236 4.92444 13.8029 4.35958 12.8754C4.02883 12.3323 3.85763 11.7512 3.77223 11.3603L4.23315 11.5199C4.34891 11.56 4.47722 11.5239 4.55494 11.4291C4.6326 11.3345 4.64307 11.2015 4.5813 11.0957C4.5773 11.0889 4.18138 10.3997 4.09138 9.22974C4.04885 8.67742 4.13576 8.07309 4.21805 7.65655L4.55019 8.01236C4.63232 8.10049 4.76 8.12922 4.87194 8.08483C4.98394 8.04026 5.05718 7.93182 5.05648 7.81128C5.05645 7.8001 5.05597 6.68033 5.47523 5.64801C5.6723 5.15639 5.92581 4.68951 6.23059 4.25659L6.9188 4.76477C7.01019 4.83384 7.13351 4.84345 7.23445 4.78908C7.33393 4.73561 7.39284 4.62881 7.38483 4.51616C7.38052 4.28466 7.53968 3.6696 8.17509 2.98012C8.70296 2.40475 9.30544 1.90226 9.96633 1.4861L9.9021 4.45434C9.85281 4.40014 9.8056 4.34619 9.76054 4.29261C9.39841 3.86208 8.93208 4.21629 9.3124 4.66856C9.49084 4.87923 9.68182 5.07897 9.88453 5.26652L9.84521 7.09181C9.49552 6.83035 8.99889 6.42134 8.59869 5.94443C8.23786 5.58712 7.77178 5.94169 8.15059 6.3205C8.74863 7.03322 9.51764 7.58871 9.82999 7.80042L9.7965 9.35906C9.31638 9.13916 8.47808 8.70051 7.82347 8.06642C7.5219 7.76199 7.02547 8.09559 7.41645 8.48657C8.2603 9.30412 9.344 9.80912 9.78296 9.99292L9.75053 11.5012C9.10073 11.3036 7.64599 10.7517 6.43175 9.5036C6.12601 9.19968 5.6504 9.54955 6.01234 9.91148C7.43432 11.3732 9.11971 11.9397 9.73735 12.1081L9.70563 13.58C9.4147 13.5437 9.12661 13.4883 8.84301 13.4142C8.2111 13.2517 7.23114 12.9124 6.15134 12.2186C5.68369 11.9188 5.30482 12.37 5.83502 12.7107C7.58892 13.8377 9.10069 14.105 9.69292 14.1681L9.66154 15.6247C8.98014 15.5913 8.30633 15.465 7.65921 15.249C7.25271 15.0445 6.9147 15.5506 7.47961 15.8055ZM16.0871 9.46339C15.9482 10.6186 15.5209 11.3031 15.5171 11.3092C15.4509 11.4123 15.456 11.5457 15.5298 11.6434C15.6037 11.7413 15.7306 11.7827 15.848 11.7472L16.3139 11.6061C16.2116 11.9935 16.0154 12.5668 15.662 13.0959C15.0573 14.0008 14.4043 14.4091 14.3986 14.4127C14.2873 14.4803 14.2342 14.6132 14.2681 14.7389C14.3019 14.8645 14.4148 14.9526 14.5449 14.9551L14.8982 14.962C14.7527 15.2713 14.4329 15.7543 13.7447 16.2244C13.5104 16.3866 13.2636 16.5302 13.007 16.6539C12.9011 16.704 12.8352 16.8124 12.8397 16.9295C12.8442 17.0466 12.9182 17.1498 13.0276 17.1916L13.1994 17.2571C12.997 17.327 12.7898 17.3815 12.5793 17.42C11.6934 17.5807 10.8998 17.4245 10.2179 16.9563L10.234 16.2212C10.9738 16.216 11.7095 16.1087 12.4199 15.9022C12.9403 15.8055 12.9174 15.1486 12.2622 15.339C11.6069 15.5294 10.9287 15.6292 10.2463 15.6361L10.2777 14.1795C10.7269 14.1494 11.708 14.0234 12.9403 13.505C13.3723 13.3228 13.7918 13.1122 14.1959 12.8744C14.758 12.5449 14.3986 12.0771 13.8997 12.37C12.2619 13.3317 10.8556 13.5439 10.2906 13.5908L10.3223 12.1199C10.7705 12.0137 11.2088 11.8699 11.6327 11.6899C12.5583 11.3046 13.4073 10.7564 14.139 10.0712C14.6054 9.62946 14.1648 9.24106 13.7367 9.64629C12.47 10.8456 10.9934 11.3404 10.335 11.5127L10.3675 10.0051C10.4518 9.97355 10.5594 9.93167 10.685 9.87886C11.2232 9.65242 12.0849 9.22802 12.7973 8.59244C13.2867 8.15575 12.8062 7.80027 12.4079 8.15575C11.7269 8.76353 10.8707 9.16904 10.3813 9.37012L10.4148 7.81259C10.7356 7.61346 11.5282 7.08848 12.1568 6.39932C12.5166 6.00493 12.0652 5.63149 11.7245 6.00493C11.3043 6.46613 10.7908 6.85498 10.4301 7.10279L10.4694 5.2789C10.6801 5.09947 10.8797 4.90726 11.067 4.70353C11.6327 4.25659 11.1819 3.88319 10.6349 4.30917C10.5879 4.36069 10.5385 4.41264 10.4869 4.4648L10.5507 1.49888C11.1946 1.93773 11.7754 2.46305 12.2765 3.05987C12.8816 3.77318 13.0141 4.39387 12.9997 4.6249C12.9868 4.73712 13.0412 4.84655 13.1384 4.90425C13.2372 4.96257 13.3608 4.95815 13.4552 4.89282L14.1648 4.41185C14.4504 4.85619 14.6833 5.33228 14.8587 5.83049C15.2332 6.87821 15.1846 7.99686 15.184 8.00784C15.178 8.12836 15.2467 8.24001 15.3567 8.28936C15.4667 8.33853 15.5958 8.31527 15.6816 8.23059L16.0286 7.88809C16.0927 8.30766 16.1533 8.91393 16.0871 9.46339Z" fill="currentColor" stroke="currentColor" stroke-width="0.2"></path></symbol><symbol id="icon-piney" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.8219 16.9852L10.2719 10.1983V7.79991L15.3389 13.0304C15.3884 13.0815 15.4625 13.1069 15.5366 13.1069C15.6108 13.1069 15.6849 13.0815 15.7344 13.0304C15.8332 12.9284 15.8332 12.7497 15.7344 12.6477L10.2967 7.00903V4.61061L14.2515 8.69303C14.301 8.74411 14.3751 8.76956 14.4492 8.76956C14.5234 8.76956 14.5975 8.74411 14.647 8.69303C14.7458 8.59105 14.7458 8.41236 14.647 8.31039L10.2719 3.79409V1.39567L13.3368 4.55952C13.3863 4.6106 13.4604 4.63605 13.5346 4.63605C13.6087 4.63605 13.6828 4.6106 13.7323 4.55952C13.8311 4.45754 13.8311 4.27885 13.7323 4.17688L10.1977 0.528207C10.099 0.426226 9.92586 0.426226 9.82707 0.528207L6.29249 4.17688C6.19369 4.27886 6.19369 4.45755 6.29249 4.55952C6.39128 4.6615 6.56438 4.6615 6.66317 4.55952L9.72809 1.39567V3.79409L5.40266 8.28474C5.30387 8.38672 5.30387 8.5654 5.40266 8.66738C5.50145 8.76936 5.67455 8.76936 5.77334 8.66738L9.7281 4.58496V6.98338L4.29042 12.6221C4.19163 12.7241 4.19163 12.9028 4.29042 13.0047C4.38921 13.1067 4.56231 13.1067 4.6611 13.0047L9.72803 7.77425V10.1727L3.1781 16.9851C3.07931 17.087 3.07931 17.2657 3.1781 17.3677C3.27689 17.4697 3.44999 17.4697 3.54878 17.3677L9.72796 10.9891V18.9869H7.35507C7.20679 18.9869 7.08317 19.1145 7.08317 19.2676C7.08317 19.4207 7.20679 19.5483 7.35507 19.5483H12.6197C12.768 19.5483 12.8916 19.4207 12.8916 19.2676C12.8916 19.1145 12.768 18.9869 12.6197 18.9869H10.2468L10.247 16.0274V10.9892L16.4262 17.3678C16.4757 17.4189 16.5498 17.4444
216.6239 17.4444C16.6981 17.4444 16.7722 17.4189 16.8217 17.3678C16.9205 17.2657 16.9208 17.0873 16.8219 16.9852Z" fill="currentColor" stroke="currentColor" stroke-width="0.4"></path></symbol><symbol id="icon-pungent" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.8219 16.9852L10.2719 10.1983V7.79991L15.3389 13.0304C15.3884 13.0815 15.4625 13.1069 15.5366 13.1069C15.6108 13.1069 15.6849 13.0815 15.7344 13.0304C15.8332 12.9284 15.8332 12.7497 15.7344 12.6477L10.2967 7.00903V4.61061L14.2515 8.69303C14.301 8.74411 14.3751 8.76956 14.4492 8.76956C14.5234 8.76956 14.5975 8.74411 14.647 8.69303C14.7458 8.59105 14.7458 8.41236 14.647 8.31039L10.2719 3.79409V1.39567L13.3368 4.55952C13.3863 4.6106 13.4604 4.63605 13.5346 4.63605C13.6087 4.63605 13.6828 4.6106 13.7323 4.55952C13.8311 4.45754 13.8311 4.27885 13.7323 4.17688L10.1977 0.528207C10.099 0.426226 9.92586 0.426226 9.82707 0.528207L6.29249 4.17688C6.19369 4.27886 6.19369 4.45755 6.29249 4.55952C6.39128 4.6615 6.56438 4.6615 6.66317 4.55952L9.72809 1.39567V3.79409L5.40266 8.28474C5.30387 8.38672 5.30387 8.5654 5.40266 8.66738C5.50145 8.76936 5.67455 8.76936 5.77334 8.66738L9.7281 4.58496V6.98338L4.29042 12.6221C4.19163 12.7241 4.19163 12.9028 4.29042 13.0047C4.38921 13.1067 4.56231 13.1067 4.6611 13.0047L9.72803 7.77425V10.1727L3.1781 16.9851C3.07931 17.087 3.07931 17.2657 3.1781 17.3677C3.27689 17.4697 3.44999 17.4697 3.54878 17.3677L9.72796 10.9891V18.9869H7.35507C7.20679 18.9869 7.08317 19.1145 7.08317 19.2676C7.08317 19.4207 7.20679 19.5483 7.35507 19.5483H12.6197C12.768 19.5483 12.8916 19.4207 12.8916 19.2676C12.8916 19.1145 12.768 18.9869 12.6197 18.9869H10.2468L10.247 16.0274V10.9892L16.4262 17.3678C16.4757 17.4189 16.5498 17.4444 16.6239 17.4444C16.6981 17.4444 16.7722 17.4189 16.8217 17.3678C16.9205 17.2657 16.9208 17.0873 16.8219 16.9852Z" fill="currentColor" stroke="currentColor" stroke-width="0.4"></path></symbol><symbol id="icon-spicy/herbal" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.47412 14.4692L2.38037 17.563M17.4741 2.59424C17.4741 2.59424 15.8491 2.03174 14.8179 3.03174C14.6722 3.17743 14.5566 3.35038 14.4778 3.54073C14.3989 3.73107 14.3584 3.93509 14.3584 4.14112C14.3584 4.55721 14.5236 4.95627 14.8179 5.25049C15.1121 5.54471 15.5111 5.71001 15.9272 5.71001C16.3433 5.71001 16.7424 5.54471 17.0366 5.25049C18.0054 4.28174 17.4741 2.59424 17.4741 2.59424ZM13.0679 5.03174C13.0679 3.65674 11.5054 2.84424 11.5054 2.84424C11.5054 2.84424 9.94287 3.62549 9.94287 5.03174C9.94287 5.44614 10.1075 5.84357 10.4005 6.13659C10.6935 6.42962 11.091 6.59424 11.5054 6.59424C11.9198 6.59424 12.3172 6.42962 12.6102 6.13659C12.9033 5.84357 13.0679 5.44614 13.0679 5.03174ZM14.9429 6.90674C16.3179 6.90674 17.1304 8.46924 17.1304 8.46924C17.1304 8.46924 16.3491 10.0317 14.9429 10.0317C14.5285 10.0317 14.131 9.86712 13.838 9.57409C13.545 9.28107 13.3804 8.88364 13.3804 8.46924C13.3804 8.05484 13.545 7.65741 13.838 7.36439C14.131 7.07136 14.5285 6.90674 14.9429 6.90674ZM9.91162 8.21924C9.91162 6.84424 8.34912 6.03174 8.34912 6.03174C8.34912 6.03174 6.78662 6.81299 6.78662 8.21924C6.78662 8.63364 6.95124 9.03107 7.24427 9.32409C7.53729 9.61712 7.93472 9.78174 8.34912 9.78174C8.76352 9.78174 9.16095 9.61712 9.45398 9.32409C9.747 9.03107 9.91162 8.63364 9.91162 8.21924ZM11.7866 10.0942C13.1616 10.0942 13.9741 11.6567 13.9741 11.6567C13.9741 11.6567 13.1929 13.2192 11.7866 13.2192C11.3722 13.2192 10.9748 13.0546 10.6818 12.7616C10.3887 12.4686 10.2241 12.0711 10.2241 11.6567C10.2241 11.2423 10.3887 10.8449 10.6818 10.5519C10.9748 10.2589 11.3722 10.0942 11.7866 10.0942ZM6.81787 11.313C6.81787 9.93799 5.25537 9.12549 5.25537 9.12549C5.25537 9.12549 3.69287 9.90674 3.69287 11.313C3.69287 11.7274 3.85749 12.1248 4.15052 12.4178C4.44354 12.7109 4.84097 12.8755 5.25537 12.8755C5.66977 12.8755 6.0672 12.7109 6.36023 12.4178C6.65325 12.1248 6.81787 11.7274 6.81787 11.313ZM8.69287 13.188C10.0679 13.188 10.8804 14.7505 10.8804 14.7505C10.8804 14.7505 10.0991 16.313 8.69287 16.313C8.27847 16.313 7.88104 16.1484 7.58802 15.8553C7.29499 15.5623 7.13037 15.1649 7.13037 14.7505C7.13037 14.3361 7.29499 13.9387 7.58802 13.6456C7.88104 13.3526 8.27847 13.188 8.69287 13.188Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol><symbol id="icon-sweet" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.9903 14.1418C17.3213 15.4324 16.3497 16.5418 15.1584 17.375C13.9672 18.2082 12.5918 18.7405 11.15 18.9262C9.7082 19.112 8.24285 18.9457 6.87931 18.4416C5.51
2578 17.9376 4.29464 17.1107 3.32035 16.0318M17.9903 14.1418C18.7465 12.6831 19.0888 11.0452 18.9804 9.40582C18.8719 7.7664 18.3167 6.18794 17.375 4.84159C16.4333 3.49523 15.141 2.43234 13.6382 1.76816C12.1355 1.10398 10.4795 0.863838 8.85 1.07378C7.22045 1.28372 5.67947 1.93573 4.39411 2.95912C3.10875 3.98251 2.12806 5.33824 1.55836 6.87931C0.988659 8.42039 0.851684 10.088 1.16228 11.7014C1.47289 13.3148 2.21921 14.8124 3.32035 16.0318M17.9903 14.1418C15.4104 13.0018 15.1703 15.5818 14.2103 15.4018C13.2503 15.2218 12.9504 14.4118 12.4104 15.2818C11.8704 16.1518 11.0003 16.1818 10.0403 16.0018C9.08035 15.8218 9.02035 16.2118 8.15035 16.6018C7.28035 16.9918 6.05035 16.1818 6.41035 14.8018C6.77035 13.4218 5.00035 13.2718 4.61035 14.2018C4.22035 15.1318 3.89035 15.9418 3.32035 16.0318M5.81035 4.60178L7.01035 5.80178M4.61035 8.20177L3.41035 9.40177M4.01035 11.8018H5.21035M8.21035 3.40178H10.6104M13.6104 4.60178L12.4104 5.80178M15.4103 7.60178L16.6103 8.20177M15.4103 10.6018V11.8018M13.0104 10.0018C13.0104 11.6586 11.6672 13.0018 10.0104 13.0018C8.3535 13.0018 7.01035 11.6586 7.01035 10.0018C7.01035 8.34492 8.3535 7.00178 10.0104 7.00178C11.6672 7.00178 13.0104 8.34492 13.0104 10.0018Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol><symbol id="icon-woody" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.81407 4.52359C1.70503 4.55974 0 6.28671 0 8.40423C0 9.88157 0.839235 11.1543 2.05841 11.8096C0.839235 12.466 0 13.7377 0 15.2161C0 17.3566 1.74118 19.0978 3.88167 19.0978H16.118C20.0807 19.0978 21.5411 13.75 17.9432 11.8115C21.5383 9.87869 20.0969 4.51973 16.1191 4.51973H11.7877L8.72799 1.46581C7.72121 0.463712 6.01128 1.18854 6.01128 2.59359C6.01128 3.51088 6.73996 3.98139 7.27808 4.51978C4.91964 4.51872 3.7169 4.52529 3.81407 4.52359ZM7.15272 2.14028C7.74723 1.54577 8.12145 2.20321 10.441 4.51891H8.62729C7.53374 3.42624 6.53078 2.76222 7.15272 2.14028ZM0.952346 8.40434C0.952346 6.78966 2.26596 5.47523 3.88145 5.47523C5.49695 5.47523 6.81056 6.78966 6.81056 8.40434C6.81056 10.019 5.49695 11.3334 3.88145 11.3334C2.26596 11.3334 0.952346 10.0198 0.952346 8.40434ZM3.88145 18.1455C2.2659 18.1455 0.952346 16.8311 0.952346 15.2164C0.952346 13.6017 2.26596 12.2873 3.88145 12.2873C5.49695 12.2873 6.81056 13.6017 6.81056 15.2164C6.81056 16.8309 5.49695 18.1455 3.88145 18.1455ZM18.9815 15.8249H14.5206C14.2578 15.8249 14.0443 16.0384 14.0443 16.3012C14.0443 16.564 14.2578 16.7775 14.5206 16.7775H18.5871C18.067 17.5967 17.1582 18.1453 16.1189 18.1453L6.40003 18.1455C7.22778 17.433 7.76318 16.391 7.76318 15.2164C7.76318 14.8803 7.70705 14.5592 7.62603 14.2477H11.2362C11.499 14.2477 11.7125 14.0342 11.7125 13.7714C11.7125 13.5086 11.499 13.2951 11.2362 13.2951H7.23456C7.01449 12.9122 6.73446 12.5741 6.40109 12.2873H16.1232C17.9567 12.2909 19.374 13.9817 18.9815 15.8249ZM14.5206 9.96692H18.5909C18.0708 10.7851 17.1629 11.3339 16.1238 11.3348C16.1219 11.3348 16.121 11.3339 16.1191 11.3339H6.40025C7.228 10.6214 7.7634 9.57933 7.7634 8.40479C7.7634 8.06863 7.70727 7.74758 7.62626 7.43606H11.2364C11.4992 7.43606 11.7127 7.22259 11.7127 6.95978C11.7127 6.69698 11.4992 6.4835 11.2364 6.4835H7.23478C7.01386 6.09865 6.73086 5.75868 6.39663 5.47182H16.1204C17.737 5.47182 19.0523 6.78734 19.0523 8.40371C19.0523 8.61336 19.0285 8.81705 18.9866 9.01438H14.5219C14.2591 9.01438 14.0456 9.22786 14.0456 9.49066C14.0456 9.75368 14.2567 9.96692 14.5206 9.96692Z" fill="currentColor"></path><path d="M5.80229 8.40505C5.80229 7.34574 4.9403 6.48375 3.88099 6.48375C2.82169 6.48375 1.9597 7.34487 1.9597 8.40505C1.9597 9.46522 2.82169 10.3263 3.88099 10.3263C4.9403 10.3263 5.80229 9.46522 5.80229 8.40505ZM2.91314 8.40505C2.91314 7.87072 3.34753 7.43632 3.88187 7.43632C4.4162 7.43632 4.8506 7.87071 4.8506 8.40505C4.8506 8.93938 4.4162 9.37378 3.88187 9.37378C3.34753 9.37378 2.91314 8.93938 2.91314 8.40505Z" fill="currentColor"></path><path d="M3.88099 13.2946C2.82169 13.2946 1.9597 14.1558 1.9597 15.2159C1.9597 16.2761 2.82169 17.1372 3.88099 17.1372C4.9403 17.1372 5.80229 16.2761 5.80229 15.2159C5.80229 14.1558 4.9403 13.2946 3.88099 13.2946ZM3.88099 16.1838C3.34667 16.1838 2.91227 15.7494 2.91227 15.2151C2.91227 14.6807 3.34666 14.2463 3.88099 14.2463C4.41533 14.2463 4.84972 14.6807 4.84972 15.2151C4.84972 15.7494 4.41533 16.1838 3.88099 16.1838Z" fill="currentColor"></path></symbol>
2<symbol id="icon-hoppy" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.99988 1.06824C10.301 1.06828 10.5448 1.31313 10.5448 1.61414V2.29187C10.545 2.34355 10.5851 2.38699 10.6366 2.39148C14.3469 2.7149 17.312 5.83602 17.6395 9.92273C17.6635 10.2202 17.4435 10.4813 17.1464 10.5087C16.7402 10.5465 16.6414 10.5428 16.4257 10.5409C16.3731 10.5405 16.329 10.5812 16.3251 10.6337C16.2163 12.0773 15.7202 13.2892 15.4628 13.8329L15.3075 14.1376C15.2032 14.3233 15.0008 14.4302 14.7928 14.4139H14.7919C14.7632 14.412 14.3596 14.3795 13.7772 14.2323C13.7508 14.2256 13.7222 14.2296 13.6991 14.244C13.6874 14.2513 13.6775 14.2612 13.6698 14.2723L13.6542 14.3094C13.364 15.7209 12.5538 16.8381 11.7958 17.6141C11.0381 18.3899 10.3381 18.8186 10.2802 18.8534C10.1937 18.9053 10.0971 18.9315 9.99988 18.9315C9.90262 18.9315 9.80577 18.9061 9.7196 18.8544C9.66163 18.8196 8.96166 18.3898 8.20398 17.6141C7.44601 16.838 6.63565 15.7209 6.34558 14.3094C6.34009 14.2827 6.32378 14.2595 6.30066 14.245C6.28915 14.2378 6.27669 14.2324 6.26355 14.2303L6.22351 14.2323C5.64369 14.3786 5.24105 14.4114 5.20789 14.4139H5.20691C5.02636 14.428 4.84833 14.3494 4.73621 14.204L4.69226 14.1376C4.65348 14.0686 3.81962 12.5569 3.67468 10.6337C3.67162 10.5946 3.64659 10.5624 3.61218 10.5487L3.5741 10.5419L3.28503 10.5399C3.18266 10.5363 3.0563 10.5276 2.85339 10.5087L2.74597 10.4882C2.50514 10.4158 2.33926 10.1831 2.36023 9.92273C2.68785 5.83557 5.65305 2.71463 9.36316 2.39148C9.41474 2.38699 9.45482 2.34362 9.45496 2.29187V1.61414C9.45496 1.31298 9.69885 1.06824 9.99988 1.06824ZM12.0594 13.5741C12.0196 13.5529 11.9702 13.5608 11.9393 13.5936C11.1293 14.4596 10.3434 14.9454 10.2802 14.9833C10.1938 15.0351 10.097 15.0604 9.99988 15.0604C9.90269 15.0604 9.80616 15.0349 9.7196 14.9833C9.65611 14.9452 8.87028 14.4604 8.06042 13.5946C8.03725 13.5698 8.0037 13.5592 7.97156 13.5643L7.94031 13.5751C7.77094 13.6654 7.60268 13.7453 7.43738 13.8173C7.39535 13.8356 7.37127 13.8804 7.37878 13.9257C7.65796 15.6046 8.88177 16.8358 9.64441 17.4569L9.93933 17.6854L9.94128 17.6874C9.9765 17.7119 10.024 17.711 10.0585 17.6854C10.7453 17.1769 12.3012 15.8365 12.621 13.9257C12.6285 13.8805 12.6043 13.8357 12.5624 13.8173C12.3971 13.7451 12.2289 13.6642 12.0594 13.5741ZM9.95105 6.80554L9.91492 6.83972C9.25571 7.91211 8.2737 8.85742 7.3739 9.42273C7.34365 9.44173 7.3257 9.4759 7.32703 9.5116C7.39195 11.2574 8.56077 12.7995 9.93933 13.8153C9.96965 13.8375 10.0102 13.841 10.0438 13.8241C10.049 13.8215 10.0529 13.8168 10.0575 13.8134L10.0585 13.8143C11.4311 12.7975 12.6088 11.2528 12.6727 9.5116C12.674 9.47591 12.6561 9.44172 12.6259 9.42273C11.7288 8.85938 10.7444 7.91261 10.0848 6.83972C10.0666 6.81037 10.0345 6.79285 9.99988 6.79285C9.98244 6.79286 9.96576 6.79726 9.95105 6.80554ZM6.14734 10.0409C5.70979 10.2142 5.15131 10.3613 4.83972 10.4198C4.78976 10.4292 4.75406 10.4746 4.75769 10.5253C4.84003 11.6755 5.21609 12.6779 5.45007 13.205C5.46924 13.2481 5.51617 13.2724 5.56238 13.2626C5.56346 13.2623 5.56424 13.2609 5.56531 13.2606C5.9565 13.1858 6.56884 13.0327 7.21277 12.7235C7.23873 12.711 7.25785 12.6869 7.2655 12.6591C7.27297 12.6315 7.26848 12.6019 7.25281 12.578C6.71655 11.7701 6.39011 10.8674 6.28308 10.12C6.27869 10.0898 6.26068 10.0631 6.23425 10.0477C6.20783 10.0325 6.1757 10.0297 6.14734 10.0409ZM13.7655 10.0477C13.7523 10.0554 13.7406 10.0657 13.7323 10.078L13.7167 10.12C13.607 10.8859 13.2783 11.7785 12.7479 12.578C12.7321 12.602 12.7268 12.6313 12.7343 12.6591C12.7419 12.6869 12.7619 12.711 12.788 12.7235C13.4321 13.0326 14.0442 13.1869 14.4354 13.2616L14.4384 13.2626C14.4844 13.2721 14.5306 13.248 14.5497 13.205C14.7836 12.6778 15.1599 11.6756 15.2421 10.5253C15.2457 10.4747 15.2107 10.4293 15.161 10.4198C14.8493 10.3614 14.2903 10.2143 13.8524 10.0409C13.824 10.0297 13.7919 10.0325 13.7655 10.0477ZM9.99988 3.4491C6.82225 3.44912 4.09862 5.99242 3.53113 9.33777C3.52623 9.36705 3.53422 9.3973 3.55359 9.4198C3.57301 9.44227 3.60201 9.45453 3.63171 9.45398C6.16202 9.40654 8.46914 7.71478 9.49695 5.27332C9.58213 5.07141 9.78063 4.93933 9.99988 4.93933C10.1916 4.93934 10.3677 5.03974 10.4657 5.20007L10.5028 5.27332C11.5544 7.77234 13.8844 9.40776 16.368 9.45398C16.3978 9.45453 16.4267 9.44229 16.4462 9.4198C16.4655 9.3973 16.4735 9.36704 16.4686 9.33777C15.9188 6.09696 13.3458 3.60847 10.2968 3.45593L9.99988 3.4491Z" fill="currentColor" stroke-width="0" stroke-linejoin="round"></path></symbol><symbol id="icon-sour" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 18.9594C5.05868 18.9594 1.0405 14.9411 1.0405 9.99991C1.0405 5.05868 5.05877 1.04041 10 1.04041C14.9412 1.04041 18.9595 5.05868 18.9595 9.99991C18.9595 14.9411 14.9412 18.9594 10 18.9594ZM10 1.7768C5.46633 1.7768 1.77689 5.46615 1.77689 9.99991C1.77689 14.5337 5.46624 18.223 10 18.223C14.5338 18.223 18.2231 14.5337 18.2231 9.99991C18.2231 5.46615 14.5338 1.7768 10 1.7768ZM10.4049 13.6289C10.7878 13.6142 10.9744 13.2705 11.1241 12.9931C11.1535 12.9392 11.1953 12.8656 11.2321 12.8041C11.2713 12.863 11.3131 12.939 11.3425 12.9931C11.4922 13.2656 11.7033 13.6289 12.1084 13.6265C12.4939 13.6167 12.6582 13.2411 12.867 12.7673C12.9014 12.6887 12.9382 12.6027 12.9798 12.5144C13.0632 12.3303 12.9822 12.1118 12.7981 12.0258C12.6115 11.9425 12.3956 12.0235 12.3096 12.2075C12.2678 12.3008 12.2286 12.3868 12.1942 12.4678C12.1524 12.5635 12.1035 12.6739 12.0617 12.7623C12.0346 12.7181 12.0102 12.6715 11.9905 12.6347C11.8408 12.3647 11.6395 11.994 11.2319 11.994H11.2295C10.832 11.9964 10.6306 12.3647 10.4834 12.6347C10.4613 12.6739 10.4342 12.7231 10.4073 12.7696C10.3902 12.7279 10.3729 12.6887 10.3582 12.6542C10.2478 12.3892 10.0735 11.9867 9.67089 12.0062C9.30516 12.0233 9.10637 12.3719 8.94677 12.6493C8.93941 12.664 8.92965 12.6787 8.92229 12.6935V12.6911C8.80688 12.3966 8.6473 11.994 8.23739 11.9914C7.70968 11.9817 7.40763 12.4332 7.03711 13.0665C6.93403 13.2408 6.99293 13.4667 7.16724 13.5697C7.34155 13.6728 7.56739 13.6139 7.67045 13.4396C7.77592 13.2603 7.99936 12.8775 8.1516 12.7621C8.18105 12.8234 8.2129 12.9044 8.23499 12.9609C8.34542 13.2432 8.49764 13.6187 8.8952 13.6211C9.24124 13.6137 9.4255 13.2946 9.58487 13.0148C9.60696 12.978 9.63144 12.9314 9.6609 12.8872C9.66826 12.9043 9.67562 12.9191 9.68059 12.9338C9.79342 13.2088 9.96533 13.6211 10.385 13.6211C10.3877 13.6312 10.3976 13.6289 10.4049 13.6289ZM8.16569 8.73843C8.17065 8.50762 8.05765 8.26705 7.84173 8.04876C7.5373 7.73953 6.94574 7.41059 6.19711 7.41059C5.99336 7.41059 5.82898 7.57514 5.82898 7.77872C5.82898 7.98248 5.99353 8.14685 6.19711 8.14685C6.9286 8.14685 7.41213 8.59119 7.43181 8.72128C7.40458 8.86117 6.94074 9.26372 6.19694 9.26372C5.99318 9.26372 5.82881 9.42827 5.82881 9.63185C
25.82881 9.8356 5.99335 9.99998 6.19694 9.99998C7.31144 10.0001 8.15578 9.33496 8.16569 8.73843ZM14.1663 9.63206C14.1663 9.4283 14.0018 9.26393 13.7982 9.26393C13.052 9.26393 12.5906 8.86138 12.5635 8.73127C12.5832 8.59138 13.0667 8.14706 13.7982 8.14706C14.002 8.14706 14.1663 7.98252 14.1663 7.77893C14.1663 7.57518 14.0018 7.4108 13.7982 7.4108C13.0496 7.4108 12.4555 7.73972 12.1536 8.04897C11.9375 8.26745 11.8247 8.50804 11.8296 8.73864C11.8394 9.33517 12.6839 10.0004 13.8008 10.0004C13.9994 10.0002 14.1663 9.83564 14.1663 9.63206Z" fill="currentColor" stroke="currentColor" stroke-width="0.2"></path></symbol><symbol id="icon-spice" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.5291 8.50946C11.5291 8.50946 11.5291 6.28445 10.4166 5.14546L8.13863 2.89396C6.70826 1.4636 4.72165 1.83444 3.29129 3.29129C1.83444 4.72165 1.4636 6.70826 2.89396 8.13863L5.14546 10.3901C6.28445 11.5291 8.50946 11.5291 8.50946 11.5291" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.8931 11.9L15.2639 12.2708M13.7806 13.7806L14.8931 14.8931M11.9 14.8931L13.0125 16.0056M16.7738 13.7806L17.8863 14.8931M16.4029 16.403L16.7738 16.7738M14.1514 17.1446L14.8931 17.8863M8.15558 11.883L11.9015 8.13678L13.7743 10.0098L10.0286 13.756L8.15558 11.883Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol><symbol id="icon-subtle-spice" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.6733 5.10229V6.93892C13.6733 7.10129 13.6088 7.25701 13.494 7.37182C13.3792 7.48663 13.2234 7.55113 13.0611 7.55113H6.93899C6.77662 7.55113 6.62091 7.48663 6.50609 7.37182C6.39128 7.25701 6.32678 7.10129 6.32678 6.93892V5.10229M7.5512 11.2244V7.55113M12.4489 11.2244V7.55113M13.6733 19.1831V11.8366C13.6733 11.6742 13.6088 11.5185 13.494 11.4037C13.3792 11.2889 13.2234 11.2244 13.0611 11.2244H6.93899C6.77662 11.2244 6.62091 11.2889 6.50609 11.4037C6.39128 11.5185 6.32678 11.6742 6.32678 11.8366V19.1831H13.6733Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M13.6733 2.65356H6.32675C5.98863 2.65356 5.71454 2.92766 5.71454 3.26577V4.49019C5.71454 4.8283 5.98863 5.1024 6.32675 5.1024H13.6733C14.0114 5.1024 14.2855 4.8283 14.2855 4.49019V3.26577C14.2855 2.92766 14.0114 2.65356 13.6733 2.65356Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol><symbol id="icon-strawberry" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.61951 1.63042C5.99451 2.01901 8.23637 3.36413 9.99997 5.2174C11.7337 3.39402 13.3478 2.13858 15.3804 1.63042M9.99997 1.03259V5.2174M6.41299 8.20654V9.4022M7.60865 11.
21957V12.3913M12.3913 11.1957V12.3913M9.99997 8.20654V9.4022M9.99997 14.1848V15.3805M13.5869 8.20654V9.4022" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10 5.21735C7.78803 4.23093 2.82605 3.57332 2.82605 9.04346C2.82605 14.5136 8.35597 18.9674 9.97011 18.9674C11.5842 18.9674 17.1739 14.3342 17.1739 8.86411C17.1739 3.39397 12.0027 4.41028 10 5.21735Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol><symbol id="icon-dessert-like" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.361 1.9a.208.208 0 0 1-.206-.207V.87c0-.113.094-.206.206-.206.113 0 .207.093.207.206v.824c.018.113-.075.207-.207.207Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M1.981 4.73a2.384 2.384 0 0 0 2.38 2.38 2.383 2.383 0 0 0 2.38-2.38 2.384 2.384 0 0 0-2.38-2.38 2.383 2.383 0 0 0-2.38 2.38Zm.431 0c0-1.069.862-1.95 1.95-1.95A1.94 1.94 0 0 1 6.31 4.748a1.96 1.96 0 0 1-1.949 1.95 1.964 1.964 0 0 1-1.949-1.969ZM18.773 11.926a.229.229 0 0 1-.168-.075l-2.68-3.205a.669.669 0 0 0-.506-.224.67.67 0 0 0-.506.224l-2.541 2.889 1.94 2.364a15.362 15.362 0 0 1 4.443-.66c.112 0 .206.093.206.205a.208.208 0 0 1-.206.206c-4.676 0-7.98 2.216-8.88 2.896a7.797 7.797 0 0 0 3.161.702c.314-.324 1.97-1.878 5.737-1.93.113 0 .207.094.207.207a.208.208 0 0 1-.207.206c-2.897.027-4.484 1-5.127 1.518h3.104c.112 0 .206.094.206.206a.208.208 0 0 1-.206.206h-3.618c-1.687 0-3.28-.487-4.61-1.406-3.75-2.596-7.766-2.41-7.993-2.399H.52c-.112 0-.224-.074-.224-.187 0-.112.075-.225.187-.225.108-.012 1.841-.116 4.117.527l3.848-4.388c.3-.337.712-.524 1.162-.524.45 0 .862.187 1.162.524l1.327 1.618 2.477-2.836a1.07 1.07 0 0 1 .825-.375c.319 0 .619.132.825.375l2.698 3.224a.228.228 0 0 1-.018.3.35.35 0 0 1-.132.037Zm-9.31 4.417c.399-.318 1.983-1.495 4.41-2.305l-3.42-4.173a1.108 1.108 0 0 0-.844-.375c-.319 0-.637.131-.843.375l-3.72 4.24c1.167.37 2.452.94 3.72 1.813.224.154.457.296.698.425Z" fill="currentColor"></path><path d="M2.656 2.2a.206.206 0 0 0 .187.112.142.142 0 0 0 .094-.038.212.212 0 0 0 .075-.28L2.6 1.28a.212.212 0 0 0-.281-.075.212.212 0 0 0-.075.281l.412.712ZM1.719 3.418c-.038 0-.075 0-.113-.038l-.712-.412C.801 2.912.763 2.78.82 2.687c.057-.094.188-.132.281-.075l.713.412c.093.056.13.188.075.281-.02.075-.094.113-.17.113ZM.5 4.954h.807c.13 0 .224-.093.224-.206a.208.208 0 0 0-.206-.206H.501a.208.208 0 0 0-.207.206c0 .113.094.206.207.206ZM1.007 6.885a.206.206 0 0 1-.188-.113.212.212 0 0 1 .075-.28l.712-.413a.212.212 0 0 1 .281.075.212.212 0 0 1-.074.28l-.713.413c-.018.038-.056.038-.093.038ZM2.319 8.272c.037.037.075.037.112.037.075 0 .15-.037.188-.112l.393-.713c.056-.093.019-.224-.075-.28-.093-.057-.225-.02-.281.074l-.412.713c-.057.093-.02.224.075.28ZM4.361 8.834a.208.208 0 0 1-.206-.206v-.825c0-.112.094-.206.206-.206.113 0 .207.094.207.206v.825c.018.093-.075.206-.207.206ZM6.123 8.197a.206.206 0 0 0 .188.112.143.143 0 0 0 .093-.037.212.212 0 0 0 .075-.281l-.412-.713a.212.212 0 0 0-.281-.075.212.212 0 0 0-.075.281l.412.713ZM7.735 6.885c-.038 0-.075 0-.113-.038l-.712-.412c-.094-.056-.131-.188-.075-.281.057-.094.188-.131.281-.075l.713.412c.093.056.13.188.074.281a.2.2 0 0 1-.168.113ZM7.416 4.954h.825c.112 0 .225-.093.206-.206a.208.208 0 0 0-.206-.206h-.825a.208.208 0 0 0-.206.206c0 .113.094.206.206.206ZM7.023 3.418a.206.206 0 0 1-.188-.113.212.212 0 0 1 .075-.28l.712-.413a.212.212 0 0 1 .281.075.212.212 0 0 1-.075.28l-.712.413c-.037.038-.075.038-.093.038ZM5.786 2.274c.037.038.075.038.112.038.075 0 .15-.038.188-.113l.393-.712c.056-.093.019-.225-.075-.28-.093-.057-.225-.02-.28.074l-.413.712c-.056.094-.019.225.075.281ZM7.791 18.748a.345.345 0 0 1-.131-.038C3.76 15.59.719 15.912.495 15.935l-.013.002a.212.212 0 0 1-.244-.169.212.212 0 0 1 .169-.244h.001c.152-.021 3.33-.475 7.514 2.83a.211.211 0 0 1 .038.3.196.196 0 0 1-.169.094Z" fill="currentColor"></path><path d="M4.361 1.9a.208.208 0 0 1-.206-.207V.87c0-.113.094-.206.206-.206.113 0 .207.093.207.206v.824c.018.113-.075.207-.207.207Z" stroke="currentColor" stroke-width=".5"></path><path clip-rule="evenodd" d="M1.981 4.73a2.384 2.384 0 0 0 2.38 2.38 2.383 2.383 0 0 0 2.38-2.38 2.384 2.384 0 0 0-2.38-2.38 2.383 2.383 0 0 0-2.38 2.38Zm.431 0c0-1.069.862-1.95 1.95-1.95A1.94 1.94 0 0 1 6.31 4.748a1.96 1.96 0 0 1-1.949 1.95 1.964 1.964 0 0 1-1.949-1.969ZM18.773 11.926a.229.229 0 0 1-.168-.075l-2.68-3.205a.669.669 0 0 0-.506-.224.67.67 0 0 0-.506.224l-2.541 2.889 1.94 2.364a15.362 15.362 0 0 1 4.443-.66c.112 0 .206.093.206.205a.208.208 0 0 1-.206.206c-4.676 0-7.98 2.216-8.88 2.896a7.797 7.797 0 0 0 3.161.702c.314-.324 1.97-1.878 5.737-1.93.113 0 .207.094.207.207a.208.208 0 0 1-.207.206c-2.897.027-4.484 1-5.127 1.518h3.104c.112 0 .206.094.206.206a.208.208 0 0 1-.206.206h-3.618c-1.687 0-3.28-.487-4.61-1.406-3.7
25-2.596-7.766-2.41-7.993-2.399H.52c-.112 0-.224-.074-.224-.187 0-.112.075-.225.187-.225.108-.012 1.841-.116 4.117.527l3.848-4.388c.3-.337.712-.524 1.162-.524.45 0 .862.187 1.162.524l1.327 1.618 2.477-2.836a1.07 1.07 0 0 1 .825-.375c.319 0 .619.132.825.375l2.698 3.224a.228.228 0 0 1-.018.3.35.35 0 0 1-.132.037Zm-9.31 4.417c.399-.318 1.983-1.495 4.41-2.305l-3.42-4.173a1.108 1.108 0 0 0-.844-.375c-.319 0-.637.131-.843.375l-3.72 4.24c1.167.37 2.452.94 3.72 1.813.224.154.457.296.698.425Z" stroke="currentColor" stroke-width=".5"></path><path d="M2.656 2.2a.206.206 0 0 0 .187.112.142.142 0 0 0 .094-.038.212.212 0 0 0 .075-.28L2.6 1.28a.212.212 0 0 0-.281-.075.212.212 0 0 0-.075.281l.412.712ZM1.719 3.418c-.038 0-.075 0-.113-.038l-.712-.412C.801 2.912.763 2.78.82 2.687c.057-.094.188-.132.281-.075l.713.412c.093.056.13.188.075.281-.02.075-.094.113-.17.113ZM.5 4.954h.807c.13 0 .224-.093.224-.206a.208.208 0 0 0-.206-.206H.501a.208.208 0 0 0-.207.206c0 .113.094.206.207.206ZM1.007 6.885a.206.206 0 0 1-.188-.113.212.212 0 0 1 .075-.28l.712-.413a.212.212 0 0 1 .281.075.212.212 0 0 1-.074.28l-.713.413c-.018.038-.056.038-.093.038ZM2.319 8.272c.037.037.075.037.112.037.075 0 .15-.037.188-.112l.393-.713c.056-.093.019-.224-.075-.28-.093-.057-.225-.02-.281.074l-.412.713c-.057.093-.02.224.075.28ZM4.361 8.834a.208.208 0 0 1-.206-.206v-.825c0-.112.094-.206.206-.206.113 0 .207.094.207.206v.825c.018.093-.075.206-.207.206ZM6.123 8.197a.206.206 0 0 0 .188.112.143.143 0 0 0 .093-.037.212.212 0 0 0 .075-.281l-.412-.713a.212.212 0 0 0-.281-.075.212.212 0 0 0-.075.281l.412.713ZM7.735 6.885c-.038 0-.075 0-.113-.038l-.712-.412c-.094-.056-.131-.188-.075-.281.057-.094.188-.131.281-.075l.713.412c.093.056.13.188.074.281a.2.2 0 0 1-.168.113ZM7.416 4.954h.825c.112 0 .225-.093.206-.206a.208.208 0 0 0-.206-.206h-.825a.208.208 0 0 0-.206.206c0 .113.094.206.206.206ZM7.023 3.418a.206.206 0 0 1-.188-.113.212.212 0 0 1 .075-.28l.712-.413a.212.212 0 0 1 .281.075.212.212 0 0 1-.075.28l-.712.413c-.037.038-.075.038-.093.038ZM5.786 2.274c.037.038.075.038.112.038.075 0 .15-.038.188-.113l.393-.712c.056-.093.019-.225-.075-.28-.093-.057-.225-.02-.28.074l-.413.712c-.056.094-.019.225.075.281ZM7.791 18.748a.345.345 0 0 1-.131-.038C3.76 15.59.719 15.912.495 15.935l-.013.002a.212.212 0 0 1-.244-.169.212.212 0 0 1 .169-.244h.001c.152-.021 3.33-.475 7.514 2.83a.211.211 0 0 1 .038.3.196.196 0 0 1-.169.094Z" stroke="currentColor" stroke-width=".5"></path></symbol><symbol id="icon-creamy" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.4948 0.91596C14.6036 0.662145 14.486 0.368206 14.2322 0.259428C13.9784 0.15065 13.6844 0.268226 13.5757 0.522041L12.3138 3.46632C12.169 3.43923 12.0223 3.4207 11.8746 3.41094C11.3658 3.37733 10.8555 3.44843 10.3753 3.61987C9.89509 3.7913 9.45515 4.05942 9.08268 4.40764C8.83147 4.6425 8.61455 4.91042 8.43756 5.20344C8.16348 5.1139 7.87657 5.06572 7.58634 5.06136L7.58243 5.06131C7.11333 5.05794 6.65032 5.16758 6.23256 5.38098C5.81479 5.59439 5.45457 5.90526 5.18236 6.28731C4.91015 6.66936 4.73395 7.11136 4.66868 7.5759C4.62147 7.91183 4.63328 8.25241 4.70257 8.5825C4.69429 8.60074 4.68703 8.61962 4.6809 8.63909C4.1723 10.2521 3.8929 11.9285 3.85086 13.6193L3.85071 13.6317C3.85071 15.2626 4.49858 16.8267 5.6518 17.9799C6.80502 19.1332 8.36912 19.781 10 19.781C11.6309 19.781 13.195 19.1332 14.3482 17.9799C15.5015 16.8267 16.1493 15.2626 16.1493 13.6317L16.1492 13.6191C16.1066 11.9285 15.8272 10.2523 15.3192 8.63924C15.2865 8.53556 15.2223 8.44839 15.139 8.387C15.228 8.13826 15.2906 7.88011 15.3252 7.6168C15.3916 7.11126 15.3536 6.59745 15.2136 6.10716C15.0736 5.61687 14.8345 5.16052 14.511 4.76632C14.1876 4.37211 13.7868 4.04844 13.3333 3.81532C13.3112 3.80393 13.2889 3.79278 13.2666 3.78185L14.4948 0.91596ZM11.9064 4.417L11.1545 6.17135C11.0458 6.42517 11.1633 6.71911 11.4171 6.82788C11.671 6.93666 11.9649 6.81909 12.0737 6.56527L12.872 4.70256C12.8734 4.70327 12.8747 4.70397 12.8761 4.70468C13.2079 4.87527 13.5013 5.11213 13.7379 5.40059C13.9746 5.68906 14.1496 6.02301 14.252 6.38179C14.3545 6.74057 14.3823 7.11655 14.3337 7.4865C14.2971 7.76518 14.2177 8.03596 14.0988 8.28945H5.66496C5.63428 8.1 5.63206 7.90638 5.65895 7.71505C5.70188 7.40953 5.81776 7.11885 5.99678 6.86759C6.17581 6.61632 6.41271 6.41187 6.68746 6.27152C6.96163 6.13147 7.26543 6.05937 7.57327 6.06128C7.8732
26.0661 8.16764 6.14259 8.432 6.28439C8.55515 6.35044 8.70032 6.36194 8.83233 6.31611C8.96434 6.27028 9.07114 6.17129 9.12687 6.04314C9.27565 5.70096 9.49304 5.39294 9.76561 5.13812C10.0382 4.8833 10.3601 4.6871 10.7115 4.56165C11.0629 4.4362 11.4363 4.38417 11.8086 4.40877C11.8413 4.41093 11.8739 4.41367 11.9064 4.417ZM14.3874 9.28945H5.52847C5.11582 10.7031 4.88788 12.1647 4.85071 13.6378C4.85233 15.0013 5.39466 16.3086 6.35891 17.2728C7.32459 18.2385 8.63434 18.781 10 18.781C11.3657 18.781 12.6754 18.2385 13.6411 17.2728C14.6054 16.3086 15.1477 15.0014 15.1493 13.6379C15.1117 12.1648 14.8837 10.7032 14.4715 9.28945H14.4083C14.4014 9.28959 14.3944 9.28959 14.3874 9.28945Z" fill="currentColor"></path></symbol><symbol id="icon-softwood" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.05841 10.9125C0.839235 11.5689 0 12.8406 0 14.319C0 16.4595 1.74118 18.2006 3.88167 18.2006H16.118C20.0807 18.2006 21.5411 12.8529 17.9432 10.9143C17.4889 10.6229 16.5378 10.4745 16.1191 10.4368H6.40025C2.85181 10.4368 2.6445 10.6906 2.05841 10.9125ZM0.952346 14.3193C0.952346 15.934 2.2659 17.2484 3.88145 17.2484C5.49695 17.2484 6.81056 15.9337 6.81056 14.3193C6.81056 12.7046 5.49695 11.3902 3.88145 11.3902C2.26596 11.3902 0.952346 12.7046 0.952346 14.3193ZM14.5206 14.9278H18.9815C19.374 13.0845 17.9567 11.3937 16.1232 11.3901H6.40109C6.73446 11.677 7.01449 12.015 7.23456 12.398H11.2362C11.499 12.398 11.7125 12.6115 11.7125 12.8743C11.7125 13.1371 11.499 13.3506 11.2362 13.3506H7.62603C7.70705 13.6621 7.76318 13.9831 7.76318 14.3193C7.76318 15.4938 7.22778 16.5359 6.40003 17.2484L16.1189 17.2482C17.1582 17.2482 18.067 16.6996 18.5871 15.8803H14.5206C14.2578 15.8803 14.0443 15.6669 14.0443 15.4041C14.0443 15.1413 14.2578 14.9278 14.5206 14.9278Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M3.88099 12.3975C2.82169 12.3975 1.9597 13.2586 1.9597 14.3188C1.9597 15.379 2.82169 16.2401 3.88099 16.2401C4.9403 16.2401 5.80229 15.379 5.80229 14.3188C5.80229 13.2586 4.9403 12.3975 3.88099 12.3975ZM2.91227 14.3179C2.91227 14.8523 3.34667 15.2867 3.88099 15.2867C4.41533 15.2867 4.84972 14.8523 4.84972 14.3179C4.84972 13.7836 4.41533 13.3492 3.88099 13.3492C3.34666 13.3492 2.91227 13.7836 2.91227 14.3179Z" fill="currentColor"></path><path d="M11.4088 10.6017L12.8618 8.16075M16.6484 1.79938L14.2391 5.84685M12.8618 8.16075L11.4088 2.95206M12.8618 8.16075L14.2391 5.84685M14.2391 5.84685L19.3729 4.7335" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol><symbol id="icon-lemon" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.9128 5.47964C12.9729 4.77512 12.8151 4.06915 12.4608 3.45722C12.1066 2.8453 11.5729 2.35695 10.932 2.05823M19.0053 5.56968C17.5047 2.83855 14.4134 3.34876 13.333 5.53966C15.3138 8.48088 18.255 6.8302 19.0053 5.56968Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.1734 9.92151C13.8732 7.94069 13.333 7.73061 13.333 7.28042C13.333 6.83023 13.6632 5.95987 13.333 5.62974C13.0029 5.2996 12.1625 5.59973 11.6823 5.62974C11.2021 5.65975 10.9921 5.08952 9.04125 4.78939C7.09044 4.48927 4.92955 5.80981 3.45894 7.28042C1.98833 8.75103 1.05795 10.0716 0.997926 12.2025C0.937901 14.3333 1.74824 14.0932 1.80826 14.6635C1.86828 15.2337 1.14799 16.4942 1.80826 17.1245C2.46853 17.7547 3.69904 17.0344 4.26928 17.1245C4.83951 17.2145 5.01959 18.0249 6.73029 17.9348C8.441 17.8448 9.85158 17.2745 11.6523 15.4738C13.4531 13.6731 14.4735 11.9023 14.1734 9.92151V9.92151Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol><symbol id="icon-leaf-loader" viewBox="0 0 20 20" fill="none"><path d="M10.0012 15.7906L9.98699 19.3677M10.0012 15.7906C10.0012 15.7906 3.97234 15.1973 0.551147 12.0299C2.41014 11.6496 3.90553 11.5788 5.79518 11.9165C4.1322 9.8 3.22517 7.79939 2.70074 5.17496C4.77466 6.11275 6.29844 7.14732 7.87406 8.81734C7.90243 6.10079 8.45275 3.34188 9.69525 0.915769C9.7756 0.748024 9.77561 0.632263 9.99998 0.632263C10.2125 0.632263 10.2267 0.752672 10.3047 0.913384C11.5448 3.34165 12.0976 6.09828 12.1259 8.81496C13.6991 7.14731 15.2251 6.11261 17.2992 5.17483C16.7725 7.8016 15.8677 9.79755 14.2048 11.9164C16.0945 11.5786 17.5874 11.6494 19.4488 12.0298C15.7564 15.4434 10.0012 15.7906 10.0012 15.7906Z" stroke="currentColor" fill="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol>',32)])])}const hf=Object.assign(Mu(cf,[["render",uf]]),{__name:"SvgSprite"}),mf={key:1,"aria-hidden":"true",class:"pointer-events-none absolute inset-0 transition-[box-shadow] duration-200 group-hover/editor:[box-shadow:inset_2px_0_0_#a855f7,inset_-2px_0_0_#a855f7,0_2px_0_#a855f7,0_-2px_0_#a855f7,0_0_18px_2px_rgba(168,85,247,0.35)]"},pf=["aria-label"],gf={key:0,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","aria-hidden":"true"},ff={key:1,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","aria-hidden":"true"},vf=["aria-label"],yf={key:0,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","aria-hidden":"true"},bf={key:1,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","aria-hidden":"true"},wf={__name:"HeaderMessageBanner",setup(e){const t=Ue("inEditor"),n=pe(()=>Ue("customization").value?.homepage?.message_banner),o=pe(()=>n.value?.message),i=pe(()=>n.value?.allow_close),r=pe(()=>({left:"text-left",center:"text-center",right:"text-right"})[n.value?.align]||"text-center"),a=pe(()=>!!n.value?.show),s=pe(()=>a.value&&o.value),l=rt(!1),c=pe(()=>s.value&&(t.value||!i.value||!l.value)),d=pe(()=>o.value&&(t.value||c.value)),u=()=>{typeof window>"u"||window.parent===window||window.parent.postMessage({type:"editor:open-section",section:"message_banner"},"*")},m=()=>{typeof window>"u"||window.parent===window||window.parent.postMessage({type:"editor:toggle-section-visibility",section:"message_banner"},"*")};So(()=>
2{if(s.value&&o.value){const p=JSON.parse(localStorage.getItem("hidden-banners"))??[];l.value=p.includes(o.value)}});const g=()=>{l.value=!0;const p=JSON.parse(localStorage.getItem("hidden-banners"))??[];p.push(o.value),localStorage.setItem("hidden-banners",JSON.stringify(p))};return(p,f)=>{const v=ks,y=Is;return E(d)?(L(),B("div",{key:0,class:ze(["relative rounded-t-3xl py-2 -mt-[1px] -ml-[1px] -mr-[1px] text-xs sm:text-sm [text-wrap:pretty]",[E(i)?"pl-3 sm:pl-4 lg:px-10 pr-9 sm:pr-10":"px-4",E(r),E(t)&&"group/editor cursor-pointer"]]),style:Pu({color:E(n).txt_colour,"background-color":E(n).bg_colour}),onClick:f[1]||(f[1]=b=>E(t)?u():null)},[R("span",{class:ze(["whitespace-pre-line",E(t)&&!E(a)?"opacity-50 group-hover/editor:opacity-100 transition-opacity":""])},ce(E(o)),3),E(i)?(L(),B("button",{key:0,onClick:f[0]||(f[0]=b=>E(t)||g()),class:"absolute right-3 sm:right-4 top-2.5","aria-label":"Close banner"},[...f[2]||(f[2]=[R("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])])):ge("",!0),E(t)?(L(),B("span",mf)):ge("",!0),E(t)?(L(),B("div",{key:2,class:ze(["absolute top-0 right-0 z-50 transition-opacity duration-200",E(a)?"opacity-0 group-hover/editor:opacity-100":""])},[ue(y,null,{default:Ee(()=>[R("button",{type:"button",onClick:Tt(u,["stop"]),"aria-label":"Banner settings",class:"relative group/tip w-7 h-7 rounded-[7px] text-white/90 flex items-center justify-center hover:bg-white/20 hover:text-white transition-colors duration-150 cursor-pointer"},[f[4]||(f[4]=R("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","aria-hidden":"true"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1)),ue(v,null,{default:Ee(()=>[...f[3]||(f[3]=[$e("Settings",-1)])]),_:1})]),R("button",{type:"button",onClick:Tt(m,["stop"]),"aria-label":E(a)?"Hide this section":"Show this section",class:ze(["relative group/tip h-7 px-2.5 rounded-[7px] text-[10px] font-semibold tracking-widest uppercase flex items-center gap-1.5 transition-colors duration-150 cursor-pointer hover:bg-white/20 hover:text-white",E(a)?"text-white/90":"bg-white/15 text-white/60"])},[E(a)?(L(),B("svg",gf,[...f[5]||(f[5]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"},null,-1),R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},null,-1)])])):(L(),B("svg",ff,[...f[6]||(f[6]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 3l18 18M10.5 10.677a2 2 0 002.823 2.823M9.363 5.365A9.466 9.466 0 0112 5c4.478 0 8.268 2.943 9.542 7a10.025 10.025 0 01-4.132 5.411M6.34 6.34A10.027 10.027 0 002.458 12C3.732 16.057 7.523 19 12 19c1.232 0 2.412-.221 3.5-.625"},null,-1)])])),$e(" "+ce(E(a)?"Visible":"Hidden")+" ",1),ue(v,null,{default:Ee(()=>[...f[7]||(f[7]=[$e("Visibility",-1)])]),_:1})],10,pf)]),_:1})],2)):ge("",!0)],6)):E(t)?(L(),B("div",{key:1,class:"relative group/editor rounded-t-3xl py-2 -mt-[1px] -ml-[1px] -mr-[1px] text-xs sm:text-sm cursor-pointer bg-brand-neutral-50",onClick:u},[R("div",{class:ze(["flex items-center justify-center px-4",{"opacity-50 group-hover/editor:opacity-100 transition-opacity":!E(a)}])},[...f[8]||(f[8]=[R("span",{class:"inline-flex items-center gap-1.5 font-medium text-brand-neutral-400"},[R("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4v16m8-8H4"})]),$e(" Add a banner message ")],-1)])],2),f[14]||(f[14]=R("span",{"aria-hidden":"true",class:"pointer-events-none absolute inset-0 transition-[box-shadow] duration-200 group-hover/editor:[box-shadow:inset_2px_0_0_#a855f7,inset_-2px_0_0_#a855f7,0_2px_0_#a855f7,0_-2px_0_#a855f7,0_0_18px_2px_rgba(168,85,247,0.35)]"},null,-1)),R("div",{class:ze(["absolute top-0 right-0 z-50 transition-opacity duration-200",E(a)?"opacity-0 group-hover/editor:opacity-100":""])},[ue(y,null,{default:Ee(()=>[R("button",{type:"button",onClick:Tt(u,["stop"]),"aria-label":"Banner settings",class:"relative group/tip w-7 h-7 rounded-[7px] text-white/90 flex items-center justify-center hover:bg-white/20 hover:text-white transition-colors duration-150 cursor-pointer"},[f[10]||(f[10]=R("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","aria-hidden":"true"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1)),ue(v,null,{default:Ee(()=>[...f[9]||(f[9]=[$e("Settings",-1)])]),_:1})]),R("button",{type:"button",onClick:Tt(m,["stop"]),"aria-label":E(a)?"Hide this section":"Show this section",class:ze(["relative group/tip h-7 px-2.5 rounded-[7px] text-[10px] font-semibold tracking-widest uppercase flex items-center gap-1.5 transition-colors duration-150 cursor-pointer hover:bg-white/20 hover:text-white",E(a)?"text-white/90":"bg-white/15 text-white/60"])},[E(a)?(L(),B("svg",yf,[...f[11]||(f[11]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"},null,-1),R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},null,-1)])])):(L(),B("svg",bf,[...f[12]||(f[12]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 3l18 18M10.5 10.677a2 2 0 002.823 2.823M9.363 5.365A9.466 9.466 0 0112 5c4.478 0 8.268 2.943 9.542 7a10.025 10.025 0 01-4.132 5.411M6.34 6.34A10.027 10.027 0 002.458 12C3.732 16.057 7.523 19 12 19c1.232 0 2.412-.221 3.5-.625"},null,-1)])])),$e(" "+ce(E(a)?"Visible":"Hidden")+" ",1),ue(v,null,{default:Ee(()=>[...f[13]||(f[13]=[$e("Visibility",-1)])]),_:1})],10,vf)]),_:1})],2)])):ge("",!0)}}},xf=["aria-expanded"],Cf={class:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2"},kf={key:0,"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 6h16M4 12h16M4 18h16"},If={key:1,"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},Sf={__name:"HeaderMobileHamburgerBtn",props:{showMobileMenu:{required:!0,type:Boolean}},emits:["toggle"],setup(e){return(t,n)=>(L(),B("button",{onClick:n[0]||(n[0]=o=>t.$emit("toggle")),class:"lg:hidden p-3 text-brand-neutral-600 hover:text-brand-primary hover:bg-brand-neutral-50 rounded-xl transition-all duration-200 focus:ring-2 focus:ring-brand-primary focus:ring-offset-2","aria-label":"Toggle mobile menu","aria-expanded":e.showMobileMenu},[(L(),B("svg",Cf,[e.showMobileMenu?(L(),B("path",If)):(L(),B("path",kf))]))],8,xf))}},Mf={class:"flex-1 text-left max-w-[180px]"},Af={class:"text-[12px] leading-snug font-bold text-brand-neutral-800 group-hover:text-brand-primary-800 truncate transition-colors"},Pf={class:"text-[12px] leading-snug text-brand-neutral-500 group-hover:text-brand-primary-800 truncate transition-colors"},Df={class:"font-semibold text-brand-primary-700"},Tf={key:1,class:"text-xs group-hover:text-brand-primary-800 transition-colors"},zf={__name:"HeaderStoreSelectorButton",emits:["dialog:open"],setup(e){const t=Ue("currentStore");return(n,o)=>(L(),B("button",{onClick:o[0]||(o[0]=i=>n.$emit("dialog:open")),class:"hidden lg:flex items-center gap-2 ml-8 px-2 py-2 min-w-[190px] group transition-all duration-200 border border-brand-neutral-100 rounded-2xl hover:border-brand-accent-500 hover:shadow-[0_0_0_2px_#fed7aa]"},[o[1]||(o[1]=R("svg",{class:"w-6 h-6 flex-shrink-0 text-brand-neutral-400 group-hover:text-brand-primary-800 transition-colors",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[R("path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5"}),R("path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244"}),R("path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05"})],-1)),R("div",Mf,[E(t)?(L(),B(Oe,{key:0},[R("div",Af,ce(E(t).name),1),R("div",Pf,[R("span",Df,ce(E(Nr)(E(t).location?.city)),1),E(t).location?.address?(L(),B(Oe,{key:0},[$e(", "+ce(E(t).location.address),1)],64)):ge("",!0)])],64)):(L(),B("div",Tf,"Select Store"))]),o[2]||(o[2]=R("svg",{class:"w-4 h-4 flex-shrink-0 text-brand-neutral-400 group-hover:text-brand-primary-800 transition-colors",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})],-1))]))}},Rf={class:"p-1.5"},Ef=["onMouseenter"],_f={class:"w-full flex items-center justify-between px-3 py-2 text-sm text-brand-neutral-600 hover:text-brand-neutral-900 hover:bg-brand-neutral-50 rounded-lg transition-colors duration-150 font-medium text-left"},Lf=208,Eu={__name:"HeaderDesktopDropdownMenu",props:{items:{type:Array,required:!0}},setup(e){const t=rt(null),n=rt([]),o=rt({});let i=null;function r(s){clearTimeout(i);const l=n.value.find(c=>c.querySelector("button")?.textContent?.trim()===s);if(l){const c=l.getBoundingClientRect();o.value[s]=c.right+Lf>window.innerWidth?"left":"right"}t.value=s}function a(){i=setTimeout(()=>{t.value=null},150)}return(s,l)=>{const c=zn,d=Eu;return L(),B("div",Rf,[(L(!0),B(Oe,null,zt(e.items,u=>(L(),B(Oe,{key:u.label},[(u.children||[]).length?(L(),B("div",{key:0,class:"relative",ref_for:!0,ref_key:"flyoutRefs",ref:n,onMouseenter:m=>r(u.label),onMouseleave:a},[R("button",_f,[ue(c,{to:u.to,class:"flex-1"},{default:Ee(()=>[$e(ce(u.label),1)]),_:2},1032,["to"]),(L(),B("svg",{class:ze(["w-3.5 h-3.5 ml-2 flex-shrink-0",E(o)[u.label]==="left"?"rotate-180":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...l[0]||(l[0]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2))]),ue(fo,{"enter-active-class":"transition ease-out duration-200","enter-from-class":E(o)[u.label]==="left"?"opacity-0 -translate-x-1":"opacity-0 translate-x-1","enter-to-class":"opacity-100 translate-x-0","leave-active-class":"transition ease-in duration-150","leave-from-class":"opacity-100 translate-x-0","leave-to-class":E(o)[u.label]==="left"?"opacity-0 -translate-x-1":"opacity-0 translate-x-1"},{default:Ee(()=>[$r(R("div",{class:ze(["absolute top-0 w-52 bg-brand-surface-primary rounded-xl shadow-lg border border-brand-neutral-100 z-50",E(o)[u.label]==="left"?"right-full mr-1":"left-full ml-1"])},[ue(d,{items:u.children},null,8,["items"])],2),[[Du,E(t)===u.label]])]),_:2},1032,["enter-from-class","leave-to-class"])],40,Ef)):(L(),Xe(c,{key:1,to:u.to,class:"block px-3 py-2 text-sm text-brand-neutral-600 hover:text-brand-neutral-900 hover:bg-brand-neutral-50 rounded-lg transition-colors duration-150 font-medium"},{default:Ee(()=>[$e(ce(u.label),1)]),_:2},1032,["to"]))],64))),128))])}}},_u=()=>{const e=Ue("customization");return{navItems:pe(()=>e.value?.top_navigation||[{label:"Shop Now",to:"/shop"},{label:"Contact",to:"/contact"}])}},Of={class:"hidden lg:flex px-3 xl:px-6 items-center"},Nf=["onMouseenter"],zl="text-brand-neutral-600 hover:text-brand-primary font-medium transition-all duration-200 px-2 xl:px-3 py-2 text-sm xl:text-base whitespace-nowrap focu
2s-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand-primary",$f=208,Ff={__name:"HeaderDesktopLinks",setup(e){const t=rt(null),n=rt([]),o=rt({});let i=null;const{navItems:r}=_u();function a(l){clearTimeout(i);const d=r.value.filter(m=>(m.children||[]).length).findIndex(m=>m.label===l),u=n.value[d];if(u){const m=u.getBoundingClientRect();o.value[l]=m.left+$f>window.innerWidth?"right":"left"}t.value=l}function s(){i=setTimeout(()=>{t.value=null},150)}return(l,c)=>{const d=zn,u=Eu;return L(),B("nav",Of,[(L(!0),B(Oe,null,zt(E(r),m=>(L(),B(Oe,{key:m.label},[(m.children||[]).length?(L(),B("div",{key:0,class:"relative",ref_for:!0,ref_key:"dropdownRefs",ref:n,onMouseenter:g=>a(m.label),onMouseleave:s},[ue(d,{to:m.to,class:ze([zl,"inline-flex items-center gap-1"])},{default:Ee(()=>[$e(ce(m.label)+" ",1),(L(),B("svg",{class:ze(["w-3.5 h-3.5 transition-transform duration-200",{"rotate-180":E(t)===m.label}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...c[0]||(c[0]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)])],2))]),_:2},1032,["to"]),ue(fo,{"enter-active-class":"transition ease-out duration-200","enter-from-class":"opacity-0 translate-y-1","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"transition ease-in duration-150","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 translate-y-1"},{default:Ee(()=>[$r(R("div",{class:ze(["absolute top-full mt-1 w-52 bg-brand-surface-primary rounded-xl shadow-lg border border-brand-neutral-100 z-50",E(o)[m.label]==="right"?"right-0":"left-0"])},[c[1]||(c[1]=R("div",{class:"h-[3px] bg-gradient-to-r from-brand-primary to-transparent mx-1 rounded-t-xl"},null,-1)),ue(u,{items:m.children},null,8,["items"])],2),[[Du,E(t)===m.label]])]),_:2},1024)],40,Nf)):(L(),Xe(d,{key:1,to:m.to,class:ze(zl)},{default:Ee(()=>[$e(ce(m.label),1)]),_:2},1032,["to"]))],64))),128))])}}},jf={class:"text-center"},Lu={__name:"HeaderSearchProcessing",props:{searchingTextClass:{required:!1,type:String,default:"text-sm"}},setup(e){return(t,n)=>(L(),B("div",jf,[R("div",{class:ze(["inline-flex items-center gap-2 text-brand-neutral-500",[e.searchingTextClass]])},[...n[0]||(n[0]=[R("svg",{class:"animate-spin h-4 w-4",fill:"none",viewBox:"0 0 24 24"},[R("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),R("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1),$e(" Searching... ",-1)])],2)]))}},Br=()=>{const e=rt(""),{getProducts:t}=Tu(),{productMatchesSearch:n}=nf(),o=rt({show:!1,results:[],searching:!1,totalMatches:0}),i=()=>{o.value.show=!1},r={redirect(){if(e.value.trim()){i();let p=on().params.prefix;p=p?`/${p}`:"",Fa(`${p}/shop?search=${encodeURIComponent(e.value.trim())}`)}},inputFocus(){e.value.length>=2&&(o.value.show=!0)},inputBlur(){o.value.show=!1}},a={promise:void 0,async get(){return this.promise?this.promise:this.promise=new Promise(async p=>p(await t()))}},s=rt(void 0);let l=null;const c=async()=>{o.value.searching=!0,o.value.show=!0,s.value===void 0&&(s.value=await a.get()),l=setTimeout(()=>{d()},300)};vo(e,async p=>{if(l&&clearTimeout(l),!p||p.trim().length<2){o.value.results=[],o.value.show=!1;return}await c()});const d=()=>{const p=e.value.trim();if(!p||p.length<2){o.value.results=[],o.value.totalMatches=0,o.value.show=!1;return}o.value.searching=!0;const f=s.value.filter(v=>n(v,p));o.value.totalMatches=f.length,o.value.results=f.slice(0,6),o.value.show=f.length>0||p.length>=2,o.value.searching=!1};return{searchQuery:e,spotlight:o,handleSearch:r,closeSpotlight:i,getProductImage:p=>p.images&&p.images.length>0?p.images[0]:"/images/placeholder-product.png",getProductPrice:p=>{if(p.options?.length>0){const f=y=>+(y.discounted_price||y.price),v=p.options.reduce((y,b)=>f(b)<f(y)?b:y);return{price:v.discounted_price||v.price,original:v.discounted_price?v.price:null,onSale:!!v.discounted_price,count:p.options.length}}return{price:null,original:null,onSale:!1,count:0}},navigateToProduct:(p,f)=>{let v=on().params.prefix;v=v?`/${v}`:"",Fa(`${v}/category/${p.category_slug}/${p.slug}`),f("spotlight:close")}}},Bf={class:"divide-y divide-brand-neutral-100"},Hf=["onMousedown"],Uf={class:"w-14 h-14 flex-shrink-0 p-1"},Wf=["src","alt"],Gf={class:"flex-1 min-w-0 space-y-1"},qf={class:"text-[10px] text-brand-neutral-500 font-normal uppercase leading-none"},Vf={class:"font-semibold text-xs text-brand-neutral-800 truncate"},Kf={class:"flex-shrink-0 text-right"},Zf={class:"block text-[10px] text-brand-neutral-500 font-normal leading-tight"},Xf={class:"text-sm font-bold text-brand-neutral-800"},Yf={key:0,class:"block text-[10px] text-brand-neutral-500 line-through"},Qf={__name:"HeaderDesktopSearchResults",props:{items:{required:!0,type:Array},totalMatches:{required:!0,type:Number}},emits:["search:redirect","spotlight:close"],setup(e,{emit:t}){const{getProductImage:n,getProductPrice:o,navigateToProduct:i}=Br(),r=t;return(a,s)=>(L(),B("div",Bf,[(L(!0),B(Oe,null,zt(e.items,l=>(L(),B("button",{onMousedown:Tt(c=>E(i)(l,r),["prevent"]),key:l.id,class:"w-full flex items-center gap-1 p-1 hover:bg-brand-neutral-50 transition-colors text-left group"},[R("div",Uf,[R("img",{src:E(n)(l),alt:l.name,class:"w-full h-full object-contain rounded-lg border border-brand-neutral-100 bg-white"},null,8,Wf)]),R("div",Gf,[R("p",qf,ce(l.brand?.name),1),R("h4",Vf,ce(l.name),1)]),R("div",Kf,[E(o)(l).price?(L(),B(Oe,{key:0},[E(o)(l).count>1?(L(),B(Oe,{key:0},[R("span",Zf,ce(E(o)(l).count)+" Options from ",1),R("span",Xf," $"+ce((+E(o)(l).price).toFixed(2)),1)],64)):(L(),B(Oe,{key:1},[E(o)(l).onSale?(L(),B("span",Yf," $"+ce((+E(o)(l).original).toFixed(2)),1)):ge("",!0),R("span",{class:ze([E(o)(l).onSale?"text-brand-secondary":"text-brand-neutral-800","text-sm font-bold"])}," $"+ce((+E(o)(l).price).toFixed(2)),3)],64))],64)):ge("",!0)]),s[1]||(s[1]=R("svg",{class:"w-4 h-4 text-brand-neutral-300 group-hover:text-brand-primary-800 transition-colors flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1))],40,Hf))),128)),e.totalMatches>e.items.length?(L(),B("button",{key:0,onMousedown:s[0]||(s[0]=Tt(l=>a.$emit("search:redirect"),["prevent"])),class:"w-[calc(100%-1.5rem)] mx-3 mt-2 mb-3 p-2.5 text-sm font-medium text-brand-primary-on-surface bg-brand-primary/5 hover:bg-brand-primary/10 rounded-xl transition-colors text-center"}," View all "+ce(e.totalMatches)+" results ",33)):ge("",!0)]))}},Jf={class:"p-4 text-center"},ev={class:"text-sm text-brand-neutral-500"},tv={__name:"HeaderDesktopSearchNoResults",props:{searchQuery:{required:!0,type:String}},emits:["redirect"],setup(e){return(t,n)=>(L(),B("div",Jf,[R("div",ev,'No products found for "'+ce(e.searchQuery)+'"',1),R("button",{onMousedown:n[0]||(n[0]=Tt(o=>t.$emit("redirect"),["prevent"])),class:"mt-2 text-sm font-medium text-brand-primary-on-surface hover:underline"}," Search all products ",32)]))}},nv={class:"hidden lg:flex items-center relative mr-2","data-search-container":""},ov={key:0,class:"absolute top-full left-0 right-0 mt-2 bg-brand-surface-primary border border-brand-neutral-100 rounded-xl shadow-xl overflow-hidden z-50 min-w-[320px]"},iv={__name:"HeaderDesktopSearch",setup(e){const{searchQuery:t,spotlight:n,handleSearch:o,closeSpotlight:i}=Br();return(r,a)=>{const s=Lu,l=Qf,c=tv;return L(),B("div",nv,[a[4]||(a[4]=R("svg",{class:"absolute left-3.5 w-5 h-5 text-brand-neutral-400 z-10",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),$r(R("input",{ref:"desktopSearchInput","onUpdate:modelValue":a[0]||(a[0]=d=>Ss(t)?t.value=d:null),type:"text",placeholder:"Search products...",class:"pl-11 pr-4 py-2.5 w-40 xl:w-64 border border-brand-neutral-100 rounded-3xl text-sm text-brand-neutral-900 hover:border-brand-primary focus:outline-none focus:border-brand-primary focus:ring-3 focus:ring-brand-primary/30 transition-all duration-200 bg-brand-surface-secondary focus:bg-brand-surface-primary placeholder-brand-neutral-400",onKeyup:a[1]||(a[1]=fi((...d)=>E(o).redirect&&E(o).redirect(...d),["enter"])),onFocus:a[2]||(a[2]=(...d)=>E(o).inputFocus&&E(o).inputFocus(...d)),onBlur:a[3]||(a[3]=(...d)=>E(o).inputBlur&&E(o).inputBlur(...d))},null,544),[[zu,E(t)]]),E(n).show?(L(),B("div",ov,[E(n).searching?(L(),Xe(s,{key:0,class:"p-4"})):E(n).results.length>0?(L(),Xe(l,{key:1,items:E(n).results,"onSearch:redirect":E(o).redirect,"total-matches":E(n).totalMatches,"onSpotlight:close":E(i)},null,8,["items","onSearch:redirect","total-matches","onSpotlight:close"])):E(t).length>=2?(L(),Xe(c,{key:2,"search-query":E(t),onRedirect:E(o).redirect},null,8,["search-query","onRedirect"])):ge("",!0)])):ge("",!0)])}}},rv=["aria-label"],av={__name:"HeaderRightIcons",emits:["search-modal:show"],setup(e){const t=H0().state.isGuest,n=pe(()=>Ue("currentStore").value?.disable_ordering),o=af();So(()=>
2{["cart","checkout","cart-pref","checkout-pref"].includes(on().name)||setTimeout(()=>{o.actions.fetchCart()},200)});const i=o.state.cartItemsCount;return(r,a)=>{const s=zn;return L(),B(Oe,null,[R("button",{onClick:a[0]||(a[0]=l=>r.$emit("search-modal:show")),class:"lg:hidden p-1.5 text-brand-neutral-600 hover:text-brand-primary hover:bg-brand-neutral-50 rounded-lg transition-all duration-200","aria-label":"Toggle search"},[...a[1]||(a[1]=[R("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)])]),ue(s,{to:E(t)?"/auth/login":"/auth/profile",class:"p-1.5 lg:p-0 lg:w-[42px] lg:h-[42px] flex items-center justify-center text-brand-neutral-600 hover:text-brand-primary hover:bg-brand-neutral-50 rounded-xl transition-all duration-200","aria-label":"User profile"},{default:Ee(()=>[...a[2]||(a[2]=[R("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})],-1)])]),_:1},8,["to"]),E(n)?ge("",!0):(L(),Xe(s,{key:0,to:"/cart",class:"relative p-1.5 lg:p-0 lg:w-[42px] lg:h-[42px] flex items-center justify-center text-brand-neutral-600 hover:text-brand-primary hover:bg-brand-neutral-50 rounded-xl transition-all duration-200","aria-label":"Shopping cart"},{default:Ee(()=>[a[3]||(a[3]=R("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor","stroke-width":"2"},[R("use",{href:"#icon-cart"})],-1)),E(i)>0?(L(),B("span",{key:0,class:"absolute -top-1 -right-1 bg-brand-primary text-[var(--color-primary-text)] text-xs rounded-full h-5 w-5 flex items-center justify-center min-w-[20px] font-bold","aria-label":`${E(i)} items in cart`},ce(E(i)>99?"99+":E(i)),9,rv)):ge("",!0)]),_:1}))],64)}}},Rl="categoryTabsScrollPosition",sv={__name:"HeaderProductCategoryLinks",props:{hasFilter:{type:Boolean,default:!1}},setup(e){const t=pe(()=>Ue("customization").value?.homepage?.category_links?.links),n=pe(()=>t.value?t.value.map(({type:a})=>{const s=a.replace(/ /g,"-");return{slug:s,name:ni[s]?.name||s,description:ni[s].description}}):U0.filter(a=>ni[a]).map(a=>({slug:a,name:ni[a].name,description:ni[a].description}))),o=rt(null),i=()=>{o.value&&sessionStorage.setItem(Rl,o.value.scrollLeft.toString())},r=()=>{if(o.value){const a=sessionStorage.getItem(Rl);a&&(o.value.scrollLeft=parseInt(a,10))}};return So(()=>{o.value&&(r(),o.value.addEventListener("scroll",i))}),(a,s)=>{const l=zn;return L(),B("div",{class:ze(["xl:[mask-image:linear-gradient(to_right,transparent_0%,black_20px,black_calc(100%-20px),transparent_100%)] xl:[-webkit-mask-image:linear-gradient(to_right,transparent_0%,black_20px,black_calc(100%-20px),transparent_100%)] xl:pr-0",e.hasFilter?"[mask-image:linear-gradient(to_right,transparent_0%,black_20px,black_calc(100%-60px),transparent_100%)] [-webkit-mask-image:linear-gradient(to_right,transparent_0%,black_20px,black_calc(100%-60px),transparent_100%)] pr-14":"[mask-image:linear-gradient(to_right,transparent_0%,black_20px,black_calc(100%-20px),transparent_100%)] [-webkit-mask-image:linear-gradient(to_right,transparent_0%,black_20px,black_calc(100%-20px),transparent_100%)]"])},[R("div",{ref_key:"scrollContainer",ref:o,class:"flex items-center space-x-2 sm:space-x-3 lg:space-x-4 overflow-x-auto py-2 md:py-3 px-4 snap-x snap-mandatory scroll-pl-4 [&::-webkit-scrollbar]:h-0 md:[&::-webkit-scrollbar]:h-1 [scrollbar-width:none] md:[scrollbar-width:thin] [&::-webkit-scrollbar-track]:bg-brand-neutral-100 [&::-webkit-scrollbar-track]:rounded-full [&::-webkit-scrollbar-thumb]:bg-brand-neutral-300 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:hover:bg-brand-neutral-400"},[ue(l,{to:"/shop",onClick:i,class:ze(["flex-shrink-0 px-3 py-1.5 text-xs font-medium rounded-lg transition-all duration-200 snap-start",[["shop","shop-pref"].includes((a._.provides[Pl]||a.$route).name)?"bg-brand-primary text-[var(--color-primary-text)]":"text-brand-neutral-600 hover:text-brand-neutral-900 hover:bg-brand-neutral-100"]])},{default:Ee(()=>[...s[0]||(s[0]=[$e(" All Products ",-1)])]),_:1},8,["class"]),(L(!0),B(Oe,null,zt(E(n),c=>(L(),Xe(l,{key:c.slug,onClick:i,to:`/category/${c.slug}`,class:ze(["flex-shrink-0 px-3 py-1.5 text-xs font-medium rounded-lg transition-all duration-200 capitalize snap-start",[((a._.provides[Pl]||a.$route).params.category||"").startsWith(c.slug)?"bg-brand-primary text-[var(--color-primary-text)]":"text-brand-neutral-600 hover:text-brand-neutral-900 hover:bg-brand-neutral-100"]])},{default:Ee(()=>[$e(ce(c.name),1)]),_:2},1032,["to","class"]))),128))],512)],2)}}},lv={class:"nav-band-surface bg-brand-surface-primary border-t border-brand-neutral-200 rounded-b-3xl relative"},cv={key:0,class:"px-1.5 py-0.5 bg-brand-primary text-[var(--color-primary-text)] text-xs rounded-full font-medium min-w-[20px] text-center"},dv={__name:"HeaderProductCategory",setup(e){const t=rt(0),n=r=>{t.value=r},o=of();So(()=>{o.on("applied-filters:changed-count",n)}
2),Fr(()=>{o.off("applied-filters:changed-count",n)});const i=pe(()=>["shop","category-category","promo-id","shop-pref","category-category-pref","promo-id-pref","collection-slug","collection-slug-pref"].includes(on().name));return(r,a)=>{const s=sv;return L(),B("div",lv,[ue(s,{"has-filter":E(i)},null,8,["has-filter"]),E(i)?(L(),B("button",{key:0,onClick:a[0]||(a[0]=l=>E(o).emit("mobile-filters:show")),"aria-label":"Open filters",class:"nav-band-surface xl:hidden absolute right-0 top-0 bottom-0 px-4 bg-brand-surface-primary border-l border-brand-neutral-200 rounded-br-3xl flex items-center gap-1"},[a[1]||(a[1]=R("svg",{class:"w-5 h-5 text-brand-neutral-600",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[R("path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"})],-1)),E(t)>0?(L(),B("span",cv,ce(E(t)),1)):ge("",!0)])):ge("",!0)])}}},uv={class:"flex items-center justify-between p-6 border-b border-brand-neutral-100"},hv={__name:"HeaderMobileMenuHeader",emits:["menu:close"],setup(e){return(t,n)=>(L(),B("div",uv,[R("button",{onClick:n[0]||(n[0]=o=>t.$emit("menu:close")),class:"p-2 text-brand-neutral-600 hover:text-brand-primary hover:bg-brand-neutral-50 rounded-xl transition-all duration-200","aria-label":"Close menu"},[...n[1]||(n[1]=[R("svg",{class:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])])]))}},mv={class:"border-b border-brand-neutral-100 last:border-b-0"},pv={class:"flex items-center justify-between"},gv=["aria-expanded","aria-label"],fv={class:"overflow-hidden"},Ou={__name:"HeaderMobileMenuAccordionItem",props:{item:{type:Object,required:!0},depth:{type:Number,default:0}},emits:["menu:close"],setup(e){const t=e,n=rt(!1),o=pe(()=>{const r=["pl-6","pl-10","pl-14","pl-[4.5rem]"];return r[Math.min(t.depth,r.length-1)]}),i=pe(()=>t.depth===0?"text-base":"text-sm");return(r,a)=>{const s=zn,l=Ou;return L(),B("div",mv,[(e.item.children||[]).length?(L(),B(Oe,{key:0},[R("div",pv,[ue(s,{to:e.item.to,class:ze(["flex-1 py-3 font-semibold text-brand-neutral-700 hover:text-brand-primary hover:bg-brand-neutral-50 transition-all duration-200",[E(o),E(i)]]),onClick:a[0]||(a[0]=c=>r.$emit("menu:close"))},{default:Ee(()=>[$e(ce(e.item.label),1)]),_:1},8,["to","class"]),R("button",{onClick:a[1]||(a[1]=c=>n.value=!E(n)),class:"px-4 py-3 text-brand-neutral-500","aria-expanded":E(n),"aria-label":`Toggle ${e.item.label} submenu`},[(L(),B("svg",{class:ze(["h-4 w-4 transform transition-transform duration-200",E(n)?"rotate-180":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...a[4]||(a[4]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)])],2))],8,gv)]),R("div",{class:ze(["grid transition-[grid-template-rows] duration-300 ease-in-out",E(n)?"grid-rows-[1fr]":"grid-rows-[0fr]"])},[R("div",fv,[(L(!0),B(Oe,null,zt(e.item.children,c=>(L(),Xe(l,{key:c.label,item:c,depth:e.depth+1,"onMenu:close":a[2]||(a[2]=d=>r.$emit("menu:close"))},null,8,["item","depth"]))),128))])],2)],64)):(L(),Xe(s,{key:1,to:e.item.to,class:ze(["block py-3 font-medium text-brand-neutral-600 hover:text-brand-primary hover:bg-brand-surface-primary transition-all duration-200",[E(o),E(i)]]),onClick:a[3]||(a[3]=c=>r.$emit("menu:close"))},{default:Ee(()=>[$e(ce(e.item.label),1)]),_:1},8,["to","class"]))])}}},vv={__name:"HeaderMobileMenuLinks",emits:["menu:close"],setup(e){const{navItems:t}=_u();return(n,o)=>{const i=zn,r=Ou;return L(),B("div",null,[ue(i,{to:"/",class:"block px-6 py-4 text-base font-semibold text-brand-neutral-700 hover:text-brand-primary hover:bg-brand-neutral-50 transition-all duration-200 border-b border-brand-neutral-100",onClick:o[0]||(o[0]=a=>n.$emit("menu:close"))},{default:Ee(()=>[...o[2]||(o[2]=[$e(" Home ",-1)])]),_:1}),(L(!0),B(Oe,null,zt(E(t),a=>(L(),Xe(r,{key:a.label,item:a,depth:0,"onMenu:close":o[1]||(o[1]=s=>n.$emit("menu:close"))},null,8,["item"]))),128))])}}},Nu=(e,{authoredDark:t=!1}={})=>pe(()=>{const n=e();return(t?n==="light":n==="dark")?"":null}),yv={class:"fixed inset-0 z-[100] lg:hidden"},bv=["data-theme-inverted"],wv={class:"py-2"},xv={class:"flex-1 min-w-0"},Cv={class:"font-semibold"},kv={key:0,class:"text-xs text-brand-neutral-500 truncate"},Iv={class:"text-brand-primary-600 font-semibold"},Sv={__name:"HeaderMobileMenu",emits:["menu:close","store:select"],setup(e){const t=Nu(()=>Ue("customization").value?.theme?.nav_theme),n=Ue("currentStore");return(o,i)=>{const r=hv,a=vv;return L(),B("div",yv,[R("div",{class:"fixed inset-0 bg-black opacity-50 transition-opacity duration-300",onClick:i[0]||(i[0]=s=>o.$emit("menu:close")),"aria-hidden":"true"}),R("div",{"data-theme-inverted":E(t),class:"fixed top-3 left-3 bottom-3 rounded-2xl w-80 max-w-[calc(100vw-1.5rem)] bg-brand-surface-primary shadow-2xl transform transition-transform duration-300 ease-in-out overflow-y-auto"},[ue(r,{"onMenu:close":i[1]||(i[1]=s=>o.$emit("menu:close"))}),R("div",wv,[R("button",{onClick:i[2]||(i[2]=s=>o.$emit("store:select")),class:"flex items-center gap-3 w-full px-6 py-4 text-left text-brand-neutral-700 hover:text-brand-primary hover:bg-brand-neutral-50 transition-all duration-200 border-b border-brand-neutral-100"},[i[4]||(i[4]=R("svg",{class:"w-6 h-6 text-brand-primary-on-surface flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[R("path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5"}),R("path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244"}),R("path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05"})],-1)),R("div",xv,[R("div",Cv,ce(E(n)?.name||"Select Store"),1),E(n)?(L(),B("div",kv,[R("span",Iv,ce(E(Nr)(E(n).location?.city)),1),E(n).location?.address?(L(),B(Oe,{key:0},[$e(", "+ce(E(n).location.address),1)],64)):ge("",!0)])):ge("",!0)]),i[5]||(i[5]=R("svg",{class:"w-4 h-4 text-brand-neutral-400 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1))]),ue(a,{"onMenu:close":i[3]||(i[3]=s=>o.$emit("menu:close"))})])],8,bv)])}}},Mv={class:"flex-1 relative"},Av={__name:"HeaderMobileSearchInput",emits:["search:input","search:close","search:redirect"],setup(e){const t=rt(null);return(n,o)=>(L(),B("div",Mv,[$r(R("input",{ref:"searchInput","onUpdate:modelValue":o[0]||(o[0]=i=>Ss(t)?t.value=i:null),type:"text",placeholder:"Search products...",class:"w-full pl-10 pr-12 py-2.5 text-base text-brand-neutral-900 border border-brand-neutral-100 rounded-3xl bg-brand-neutral-50 focus:bg-brand-surface-primary focus:outline-none focus:border-brand-primary transition-all duration-200 placeholder-brand-neutral-400",onInput:o[1]||(o[1]=i=>n.$emit("search:input",E(t))),onKeyup:[o[2]||(o[2]=fi(i=>n.$emit("search:redirect"),["enter"])),o[3]||(o[3]=fi(i=>n.$emit("search:close"),["escape"]))]},null,544),[[zu,E(t)]]),o[6]||(o[6]=R("div",{class:"absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none"},[R("svg",{class:"h-5 w-5 text-brand-neutral-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})])],-1)),R("button",{onClick:o[4]||(o[4]=i=>n.$emit("search:redirect")),class:"absolute inset-y-0 right-0 pr-1.5 flex items-center","aria-label":"Submit search"},[...o[5]||(o[5]=[R("span",{class:"p-1.5 text-brand-primary-on-surface hover:bg-brand-primary hover:text-[var(--color-primary-text)] rounded-full transition-all duration-200"},[R("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M14 5l7 7m0 0l-7 7m7-7H3"})])],-1)])])]))}},Pv={__name:"HeaderMobileSearchCloseBtn",emits:["search:close"],setup(e){return(t,n)=>(L(),B("button",{onClick:n[0]||(n[0]=o=>t.$emit("search:close")),class:"p-2.5 text-brand-neutral-600 hover:text-brand-primary hover:bg-brand-neutral-100 rounded-full transition-all duration-200","aria-label":"Close search"},[...n[1]||(n[1]=[R("svg",{class:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])]))}},Dv={class:"bg-white rounded-xl border border-brand-neutral-100 divide-y divide-brand-neutral-100"},Tv=["onClick"],zv={class:"w-11 h-11 flex-shrink-0"},Rv=["src","alt"],Ev={class:"flex-1 min-w-0"},_v={class:"text-[9px] text-brand-neutral-500 uppercase leading-none"},Lv={class:"font-medium text-xs text-brand-neutral-800 truncate mt-0.5"},Ov={class:"flex-shrink-0 text-right"},Nv={class:"block text-[9px] text-brand-neutral-500 leading-tight"},$v={class:"text-xs font-bold text-brand-neutral-800"},Fv={key:0,class:"block text-[9px] text-brand-neutral-500 line-through"},jv={__name:"HeaderMobileSearchResults",props:{items:{required:!0,type:Array}},emits:["spotlight:close","search:close"],setup(e,{emit:t}){const n=t,{getProductImage:o,getProductPrice:i,navigateToProduct:r}=Br();return(a,s)=>(L(),B("div",Dv,[(L(!0),B(Oe,null,zt(e.items,l=>(L(),B("button",{key:l.id,onClick:c=>{E(r)(l,n),a.$emit("search:close")},class:"w-full flex items-center gap-1.5 p-1.5 hover:bg-brand-neutral-50 transition-colors text-left group"},[R("div",zv,[R("img",{src:E(o)(l),alt:l.name,class:"w-full h-full object-contain rounded-md border border-brand-neutral-100 bg-white"},null,8,Rv)]),R("div",Ev,[R("p",_v,ce(l.brand?.name),1),R("h4",Lv,ce(l.name),1)]),R("div",Ov,[E(i)(l).price?(L(),B(Oe,{key:0},[E(i)(l).count>1?(L(),B(Oe,{key:0},[R("span",Nv,ce(E(i)(l).count)+" Options from ",1),R("span",$v," $"+ce((+E(i)(l).price).toFixed(2)),1)],64)):(L(),B(Oe,{key:1},[E(i)(l).onSale?(L(),B("span",Fv," $"+ce((+E(i)(l).original).toFixed(2)),1)):ge("",!0),R("span",{class:ze([E(i)(l).onSale?"text-brand-secondary":"text-brand-neutral-800","text-xs font-bold"])}," $"+ce((+E(i)(l).price).toFixed(2)),3)],64))],64)):ge("",!0)]),s[0]||(s[0]=R("svg",{class:"w-3.5 h-3.5 text-brand-neutral-300 group-hover:text-brand-primary-800 transition-colors flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1))],8,Tv))),128))]))}},Bv={class:"fixed inset-0 z-[100]"},Hv={class:"fixed top-0 left-0 right-0 max-h-screen flex flex-col bg-white shadow-xl border-b border-brand-neutral-100 rounded-b-2xl"},Uv={class:"flex-shrink-0 px-3 py-3 sm:px-6 sm:py-4"},Wv={class:"max-w-screen-2xl mx-auto flex items-center space-x-2 sm:space-x-4"},Gv={key:0,class:"flex-1 overflow-y-auto px-3 pb-3 sm:px-6 sm:pb-4"},qv={class:"max-w-screen-2xl mx-auto"},Vv={key:2,class:"p-3 text-center text-xs text-brand-neutral-500"},Kv={__name:"HeaderMobileSearch",emits:["search:close"],setup(e,{emit:t}){const n=t,{searchQuery:o,handleSearch:i,spotlight:r}=Br(),a=()=>{o.value.trim()&&(i.redirect(),n("search:close"))};return(s,l)=>{const c=Av,d=Pv,u=Lu,m=jv;return L(),B("div",Bv,[R("div",{class:"fixed inset-0 bg-black opacity-50",onClick:l[0]||(l[0]=g=>s.$emit("search:close")),"aria-hidden":"true"}),R("div",Hv,[R("div",Uv,[R("div",Wv,[ue(c,{"onSearch:input":l[1]||(l[1]=g=>o.value=g),"onSearch:close":l[2]||(l[2]=g=>s.$emit("search:close")),"onSearch:redirect":a}),ue(d,{"onSearch:close":l[3]||(l[3]=g=>s.$emit("search:close"))})])]),E(r).show||E(r).searching?(L(),B("div",Gv,[R("div",qv,[R("div",null,[E(r).searching?(L(),Xe(u,{key:0,class:"p-3","searching-text-class":"text-xs"})):E(r).results.length>0?(L(),B(Oe,{key:1},[ue(m,{"onSearch:close":l[4]||(l[4]=g=>s.$emit("search:close")),items:E(r).results},null,8,["items"]),E(r).totalMatches>E(r).results.length?(L(),B("button",{key:0,onClick:l[5]||(l[5]=g=>{E(i).redirect(),s.$emit("search:close")}),class:"w-full mt-2 p-2.5 text-xs font-medium text-brand-primary-on-surface bg-brand-primary/5 hover:bg-brand-primary/10 rounded-xl transition-colors text-center"}," View all "+ce(E(r).totalMatches)+" results ",1)):ge("",!0)],64)):E(o).length>=2?(L(),B("div",Vv,' No products found for "'+ce(E(o))+'" ',1)):ge("",!0)])])])):ge("",!0)])])}}},Zv={class:"flex items-center justify-between p-6 border-b border-brand-neutral-100 flex-shrink-0"},Xv={__name:"HeaderStoreSelectorModalHeader",emits:["close"],setup(e){return(t,n)=>(L(),B("div",Zv,[n[2]||(n[2]=R("div",null,[R("h2",{class:"text-xl font-bold text-brand-neutral-900"}," Select a Store "),R("p",{class:"text-sm text-brand-neutral-600 mt-1"}," Choose a location to view inventory ")],-1)),R("button",{onClick:n[0]||(n[0]=o=>t.$emit("close")),class:"p-2 mb-auto text-brand-neutral-600 hover:text-brand-primary hover:bg-brand-neutral-50 rounded-xl transition-all duration-200","aria-label":"Close dialog"},[...n[1]||(n[1]=[R("svg",{class:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]))}},Yv={},Qv={class:"flex-1 flex items-center justify-center p-8"};function Jv(e,t){return L(),B("div",Qv,[...t[0]||(t[0]=[Au('<div class="text-center"><svg class="w-12 h-12 text-brand-neutral-400 mx-auto mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
2<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z"></path></svg><p class="text-brand-neutral-600">No stores available</p></div>',1)])])}const e2=Object.assign(Mu(Yv,[["render",Jv]]),{__name:"HeaderStoreSelectorModalEmpty"}),t2={class:"mx-6 mt-4 p-4 bg-red-50 border border-red-200 rounded-xl flex items-start gap-3"},n2={class:"flex-1"},o2={class:"text-sm text-red-700"},i2={__name:"HeaderStoreSelectorModalSwitchError",props:{switchError:{required:!0}},emits:["close"],setup(e){return(t,n)=>(L(),B("div",t2,[n[2]||(n[2]=R("svg",{class:"w-5 h-5 text-red-500 flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),R("div",n2,[R("p",o2,ce(e.switchError),1)]),R("button",{onClick:n[0]||(n[0]=o=>t.$emit("close")),class:"text-red-400 hover:text-red-600 transition-colors","aria-label":"Dismiss error"},[...n[1]||(n[1]=[R("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]))}},r2=["disabled"],a2={class:"flex items-start justify-between gap-3"},s2={class:"flex-1 min-w-0"},l2={class:"text-xs mt-1"},c2={key:0,class:"font-semibold text-brand-neutral-700"},d2={class:"text-brand-neutral-500"},u2={key:0,class:"text-[11px] text-brand-neutral-400 mt-1"},h2={key:0,class:"flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center bg-brand-primary transition-all duration-200"},m2={key:0,class:"w-4 h-4 text-white animate-spin",fill:"none",viewBox:"0 0 24 24"},p2={key:1,class:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},g2={__name:"HeaderStoreSelectorModalStoreCard",props:{store:{type:Object,required:!0},isSelected:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,i=()=>{!n.isDisabled&&!n.isLoading&&o("select",n.store)};return(r,a)=>(L(),B("button",{onClick:i,disabled:e.isDisabled||e.isLoading,class:ze(["w-full p-4 rounded-xl border transition-all duration-200 text-left group",e.isLoading?"border-brand-primary bg-brand-primary/5 curs
2or-wait":e.isSelected?"border-brand-primary bg-brand-primary/5":e.isDisabled?"border-brand-neutral-100 bg-brand-neutral-50 opacity-50 cursor-not-allowed":"border-brand-neutral-100 hover:border-brand-primary/50 bg-white hover:bg-brand-neutral-50"])},[R("div",a2,[R("div",s2,[R("h3",{class:ze(["text-sm font-semibold truncate transition-colors",e.isDisabled?"text-brand-neutral-500":"text-brand-neutral-900 group-hover:text-brand-primary"])},ce(e.store.name),3),R("p",l2,[e.store.location?.city?(L(),B("span",c2,ce(E(Nr)(e.store.location.city)),1)):ge("",!0),R("span",d2,[e.store.location?.address?(L(),B(Oe,{key:0},[$e(", "+ce(e.store.location.address),1)],64)):ge("",!0),e.store.location?.postal_code?(L(),B(Oe,{key:1},[$e(", "+ce(e.store.location.postal_code),1)],64)):ge("",!0)])]),e.store.phone?(L(),B("p",u2,ce(e.store.phone),1)):ge("",!0)]),e.isLoading||e.isSelected?(L(),B("div",h2,[e.isLoading?(L(),B("svg",m2,[...a[0]||(a[0]=[R("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),R("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(L(),B("svg",p2,[...a[1]||(a[1]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)])]))])):ge("",!0)])],10,r2))}},$u=e=>{const t=n=>{document.body.classList.toggle("overflow-hidden",n)};Ss(e)?vo(e,n=>{t(n)},{immediate:!0}):t(e),Fr(()=>{t(!1)})},f2={key:2,class:"flex-1 overflow-y-auto p-6"},v2={class:"flex flex-wrap gap-6"},y2={class:"text-base md:text-lg font-semibold text-brand-primary-600 mb-1"},b2={class:"space-y-2"},w2={__name:"HeaderStoreSelectorModal",props:{isOpen:{type:Boolean,default:!1}},emits:["close"],setup(e,{emit:t}){const n=e,o=Ue("currentStore"),{isOpen:i}=W0(n);$u(i);const r=t,{groupStoresByProvince:a,buildChangeStoreRedirectUrl:s}=Ru(),l=Ue("chainStores"),c=rt(a(l.value)),d=rt({storeId:null,error:null,selectStore:async u=>{if(u.id===o.value.id){r("close");return}d.value.storeId=u.id,d.value.error=null;try{location.href=s(u)}catch{d.value.error="Failed to switch store. Please try again."}finally{d.value.storeId=null}}});return(u,m)=>{const g=Xv,p=e2,f=i2,v=g2,y=jr;return L(),Xe(y,null,{default:Ee(()=>[(L(),Xe(vi,{to:"body"},[ue(fo,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-all duration-200 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:Ee(()=>[E(i)?(L(),B("div",{key:0,class:"fixed inset-0 z-[100] flex items-center justify-center bg-black bg-opacity-75 p-4",onClick:m[2]||(m[2]=Tt(b=>u.$emit("close"),["self"])),onKeydown:m[3]||(m[3]=fi(b=>u.$emit("close"),["esc"]))},[ue(fo,{"enter-active-class":"transition-all duration-300 ease-out delay-100","enter-from-class":"opacity-0 scale-95 translate-y-4","enter-to-class":"opacity-100 scale-100 translate-y-0","leave-active-class":"transition-all duration-200 ease-in","leave-from-class":"opacity-100 scale-100 translate-y-0","leave-to-class":"opacity-0 scale-95 translate-y-4"},{default:Ee(()=>[E(i)?(L(),B("div",{key:0,ref:"dialogContent",class:ze(["relative w-full max-h-[85vh] bg-white rounded-2xl shadow-2xl overflow-hidden flex flex-col",Object.keys(E(c)).length<=1?"max-w-md":"max-w-4xl"]),tabindex:"-1"},[ue(g,{onClose:m[0]||(m[0]=b=>u.$emit("close"))}),Object.keys(E(c)).length===0?(L(),Xe(p,{key:0})):ge("",!0),E(d).error?(L(),Xe(f,{key:1,onClose:m[1]||(m[1]=b=>E(d).error=null),"switch-error":E(d).error},null,8,["switch-error"])):ge("",!0),Object.keys(E(c)).length>0?(L(),B("div",f2,[R("div",v2,[(L(!0),B(Oe,null,zt(E(c),(b,w)=>(L(),B("div",{key:w,class:ze(["min-w-0",Object.keys(E(c)).length>=3?"w-full md:w-[calc(50%-0.75rem)] lg:w-[calc(33.33%-1rem)]":"w-full md:w-[calc(50%-0.75rem)] lg:w-[calc(33.33%-1rem)] grow"])},[R("h3",y2,ce(E(Nr)(w)),1),m[4]||(m[4]=R("div",{class:"border-t border-brand-primary-200 mb-2"},null,-1)),R("div",b2,[(L(!0),B(Oe,null,zt(b,x=>(L(),Xe(v,{key:x.id,store:x,"is-selected":x.id===E(o).id,"is-loading":x.id===E(d).storeId,"is-disabled":E(d).storeId!==null&&x.id!==E(d).storeId,onSelect:E(d).selectStore},null,8,["store","is-selected","is-loading","is-disabled","onSelect"]))),128))])],2))),128))])])):ge("",!0)],2)):ge("",!0)]),_:1})],32)):ge("",!0)]),_:1})]))]),_:1})}}},x2=["data-theme-inverted"],C2={key:0,"aria-hidden":"true",class:"pointer-events-none absolute -inset-x-px inset-y-0 z-10 transition-[box-shadow] duration-200 group-hover/editor:[box-shadow:inset_2px_0_0_#a855f7,inset_-2px_0_0_#a855f7,0_2px_0_#a855f7,0_-2px_0_#a855f7,0_0_18px_2px_rgba(168,85,247,0.35)]"},k2={class:"flex justify-between"},I2={class:"flex items-center p-2 sm:px-4"},S2={class:"flex-shrink-0"},M2=["src"],A2={key:1,class:"w-8 h-8 mr-2 text-brand-primary-on-surface",viewBox:"0 0 34 33",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},P2={class:"my-auto"},D2={class:"max-w-screen-2xl mx-auto px-3 sm:px-4"},T2={class:"flex justify-between items-center md:h-16 my-1"},z2={class:"flex items-center space-x-1 lg:space-x-2"},R2={class:"relative"},E2={key:0,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","aria-hidden":"true"},_2={key:1,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","aria-hidden":"true"},L2={class:"absolute right-0 top-full mt-1.5 z-50 w-36 rounded-[8px] bg-white border border-[#e2e8f0] shadow-[0_4px_12px_rgba(0,0,0,0.12)] p-1 font-[lato,helvetica,sans-serif]"},O2=["onClick"],N2={key:0,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","aria-hidden":"true"},$2={key:1,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","aria-hidden":"true"},F2={__name:"Header",setup(e){const t=pe(()=>["category-category-id","shop","category-category","promo-id","collection-slug","category-category-id-pref","shop-pref","category-category-pref","promo-id-pref","collection-slug-pref","provided-content-id","provided-content-id-pref"].includes(on().name)),n=pe(()=>{const f="sticky top-3 lg:top-4 z-[60] max-w-screen-2xl mx-auto";return t.value?`${f} before:content-[''] before:absolute before:left-1/2 before:-translate-x-1/2 before:w-screen before:-top-3 before:lg:-top-4 before:h-10 before:bg-gray-50 before:[mask-image:linear-gradient(to_top,transparent,rgba(0,0,0,0.85))] before:[-webkit-mask-image:linear-gradient(to_top,transparent,rgba(0,0,0,0.85))]`:f}),o=rt({mobileMenu:!1,storeSelect:!1,mobileSearch:!1,open(f){this.closeAll(),o.value[f]=!0},closeAll(){Object.entries(o.value).forEach(([f,v])=>{typeof v=="boolean"&&(o.value[f]=!1)})},toggle(f){o.value[f]=!o.value[f]}}),i=pe(()=>Ue("customization").value?.theme?.store_logo||null),r=Nu(()=>Ue("customization").value?.theme?.nav_theme),a=Ue("inEditor"),s=()=>{typeof window>"u"||window.parent===window||window.parent.postMessage({type:"editor:open-section",section:"navigation"},"*")},l=rt(!1),c=[{value:"light",label:"Light"},{value:"dark",label:"Dark"}],d=pe(()=>Ue("customization").value?.theme?.nav_theme==="dark"?"dark":"light"),u=pe(()=>d.value==="dark"?"Dark":"Light"),m=f=>{l.value=!1,!(typeof window>"u"||window.parent===window)&&window.parent.postMessage({type:"editor:set-section-theme",section:"navigation",theme:f},"*")},g=rt(null);let p=null;return So(()=>{g.value&&(p=new ResizeObserver(([f])=>{document.documentElement.style.setProperty("--header-height",`${f.target.offsetHeight}px`)}),p.observe(g.value))}),Fr(()=>{p?.disconnect()}),(f,v)=>{const y=wf,b=Sf,w=zn,x=zf,k=Ff,I=iv,S=av,A=dv,M=ks,P=Is,T=Sv,D=Kv,F=w2;return L(),B("div",{ref_key:"headerEl",ref:g,class:ze(E(n))},[R("nav",{"data-theme-inverted":E(r),class:"relative bg-brand-surface-primary backdrop-blur-md border border-brand-neutral-100 shadow-lg rounded-3xl mx-2 xl:mx-2",role:"navigation","aria-label":"Main navigation"},[ue(y),R("div",{class:ze(E(a)&&"relative group/editor")},[E(a)?(L(),B("span",C2)):ge("",!0),R("div",k2,[R("div",I2,[ue(b,{"show-mobile-menu":E(o).mobileMenu,onToggle:v[0]||(v[0]=N=>
2E(o).toggle("mobileMenu"))},null,8,["show-mobile-menu"]),R("div",S2,[ue(w,{to:"/",class:"flex items-center group","aria-label":"Go to homepage"},{default:Ee(()=>[E(i)?(L(),B("img",{key:0,src:E(i),class:"max-w-[calc(100vw-218px)] sm:max-w-[200px] max-h-[60px] object-contain sm:mr-2"},null,8,M2)):(L(),B("svg",A2,[...v[6]||(v[6]=[R("path",{d:"M17.1137 1.3291L16.7162 1.63281C17.0783 1.356 17.1107 1.33201 17.1137 1.33008H17.1147L17.1156 1.33203C17.1165 1.33323 17.1172 1.33514 17.1186 1.33691C17.1213 1.34062 17.1257 1.34537 17.1303 1.35156C17.1394 1.36401 17.1515 1.38189 17.1674 1.4043C17.1993 1.44936 17.2447 1.51419 17.3002 1.59961C17.4114 1.77054 17.5658 2.02231 17.7445 2.35547C18.1022 3.0221 18.559 4.01463 18.9691 5.33496C19.6668 7.58089 20.2238 10.7698 19.9408 14.9141C21.9239 11.8949 24.6044 9.38149 27.7709 7.59766L28.5658 7.15039L28.515 8.06152C28.3332 11.3335 26.882 15.4339 24.1215 19.2754C25.9075 18.5842 27.4631 18.275 28.6898 18.1484C29.504 18.0644 30.1713 18.0612 30.6625 18.0791C30.908 18.088 31.1088 18.1024 31.2592 18.1143C31.3382 18.1205 31.3913 18.125 31.4418 18.1289C31.4652 18.1307 31.4836 18.132 31.4975 18.1328C31.5089 18.1335 31.5146 18.1338 31.516 18.1338H32.517L31.9164 18.9336C29.6639 21.9309 26.5112 24.0982 22.9506 25.1416C24.1697 25.5331 25.3307 26.0968 26.3969 26.8193L27.3568 27.4697L26.225 27.7217C23.6578 28.2922 20.1693 27.8328 17.5873 26.4082C17.5452 28.297 17.644 29.5407 17.6664 30.3701C17.6728 30.6057 17.6726 30.8187 17.6596 31.0039C17.6468 31.1853 17.6198 31.3721 17.5531 31.54C17.4819 31.7196 17.3611 31.8875 17.1684 32C16.9866 32.106 16.79 32.1337 16.6166 32.1338C16.4538 32.1338 16.2629 32.1072 16.0863 32.001C15.9009 31.8893 15.788 31.7244 15.7211 31.5537C15.6056 31.2588 15.598 30.856 15.6039 30.4268C15.6152 29.615 15.6925 28.3844 15.644 26.4824C14.4767 27.0926 13.1329 27.5168 11.7982 27.7393C10.1733 28.0101 8.52054 27.9903 7.18106 27.6152L6.22012 27.3457L7.01114 26.7373C7.92836 26.0318 9.15028 25.4782 10.4633 25.0947C7.69623 24.2275 5.57688 22.9077 4.0795 21.7119C3.15542 20.9739 2.46655 20.2829 2.00723 19.7734C1.77758 19.5187 1.60514 19.3088 1.48868 19.1611C1.43054 19.0874 1.38614 19.0291 1.35587 18.9883C1.34077 18.9679 1.3289 18.9518 1.32071 18.9404C1.31661 18.9347 1.31331 18.9301 1.31094 18.9268C1.3098 18.9251 1.30875 18.9239 1.30801 18.9229L1.30704 18.9209V18.9199L0.857819 18.2793L1.62833 18.1416H1.6293L1.63028 18.1406C1.63129 18.1404 1.63273 18.1409 1.63419 18.1406L1.68692 18.1318C1.72135 18.1266 1.7704 18.12 1.8334 18.1123C1.96017 18.0969 2.14426 18.0784 2.3793 18.0645C2.84932 18.0366 3.52622 18.0268 4.37051 18.0977C5.664 18.2063 7.34945 18.5042 9.28458 19.2109C6.46754 15.4299 5.08914 11.3314 4.81778 8.0752L4.74063 7.1416L5.55899 7.59668C8.76417 9.37606 11.4746 11.9057 13.4682 14.9541C13.1612 10.7927 13.7205 7.59635 14.4272 5.3457C14.8439 4.01836 15.3101 3.02222 15.6762 2.35352C15.8591 2.0193 16.0173 1.76702 16.1313 1.5957C16.1883 1.51002 16.2343 1.44459 16.267 1.39941C16.2834 1.37682 16.2966 1.35917 16.3061 1.34668C16.3106 1.3407 16.314 1.33569 16.3168 1.33203C16.3182 1.33018 16.3198 1.32838 16.3207 1.32715L16.3217 1.3252H16.3227C16.3261 1.32753 16.3586 1.35216 16.6742 1.59961L16.3227 1.32422L16.7211 0.816406L17.1137 1.3291Z",fill:"currentColor"},null,-1)])]))]),_:1})]),ue(x,{"onDialog:open":v[1]||(v[1]=N=>
2E(o).open("storeSelect"))})]),R("div",P2,[R("div",D2,[R("div",T2,[ue(k),R("div",z2,[ue(I),ue(S,{"onSearchModal:show":v[2]||(v[2]=N=>E(o).open("mobileSearch"))})])])])])]),E(t)?(L(),Xe(A,{key:1})):ge("",!0),E(a)?(L(),B("div",{key:2,class:ze(["absolute top-0 right-0 z-50 transition-opacity duration-200",E(l)?"":"opacity-0 group-hover/editor:opacity-100"])},[ue(P,null,{default:Ee(()=>[R("button",{type:"button",onClick:s,"aria-label":"Navigation settings",class:"relative group/tip w-7 h-7 rounded-[7px] text-white/90 flex items-center justify-center hover:bg-white/20 hover:text-white transition-colors duration-150 cursor-pointer"},[v[8]||(v[8]=R("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","aria-hidden":"true"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1)),ue(M,null,{default:Ee(()=>[...v[7]||(v[7]=[$e("Settings",-1)])]),_:1})]),R("div",R2,[R("button",{type:"button",onClick:v[3]||(v[3]=Tt(N=>l.value=!E(l),["stop"])),"aria-label":"Navigation theme",class:ze(["relative group/tip h-7 px-2.5 rounded-[7px] text-[10px] font-semibold tracking-widest uppercase flex items-center gap-1.5 text-white/90 hover:bg-white/20 hover:text-white transition-colors duration-150 cursor-pointer",E(l)?"bg-white/20 text-white":""])},[E(d)==="dark"?(L(),B("svg",E2,[...v[9]||(v[9]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"},null,-1)])])):(L(),B("svg",_2,[...v[10]||(v[10]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z"},null,-1)])])),$e(" "+ce(E(u))+" ",1),ue(M,null,{default:Ee(()=>[...v[11]||(v[11]=[$e("Theme",-1)])]),_:1})],2),E(l)?(L(),B(Oe,{key:0},[R("div",{class:"fixed inset-0 z-40",onClick:v[4]||(v[4]=Tt(N=>l.value=!1,["stop"]))}),R("div",L2,[(L(),B(Oe,null,zt(c,N=>R("button",{key:N.value,type:"button",onClick:Tt(W=>m(N.value),["stop"]),class:ze(["w-full flex items-center gap-2 px-2.5 py-2 text-xs font-medium text-left rounded-[6px] transition-colors duration-150 cursor-pointer",E(d)===N.value?"bg-[#362C8B] text-white":"text-[#334155] hover:bg-[#f1f5f9]"])},[N.value==="dark"?(L(),B("svg",N2,[...v[12]||(v[12]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"},null,-1)])])):(L(),B("svg",$2,[...v[13]||(v[13]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z"},null,-1)])])),$e(" "+ce(N.label),1)],10,O2)),64))])],64)):ge("",!0)])]),_:1})],2)):ge("",!0)],2)],8,x2),(L(),Xe(vi,{to:"body"},[E(o).mobileMenu?(L(),Xe(T,{key:0,"onStore:select":v[5]||(v[5]=N=>E(o).open("storeSelect")),"onMenu:close":E(o).closeAll},null,8,["onMenu:close"])):ge("",!0)])),(L(),Xe(vi,{to:"body"},[ue(fo,{"enter-active-class":"transition-opacity duration-200 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-opacity duration-150 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:Ee(()=>[E(o).mobileSearch?(L(),Xe(D,{key:0,"onSearch:close":E(o).closeAll},null,8,["onSearch:close"])):ge("",!0)]),_:1})])),ue(F,{"is-open":E(o).storeSelect,onClose:E(o).closeAll},null,8,["is-open","onClose"])],2)}}},j2={key:0,class:"text-center mb-4 sm:mb-6"},B2={id:"promo-modal-title",class:"text-lg sm:text-2xl font-bold text-brand-neutral-900 mb
2-1 sm:mb-2"},H2={__name:"PromoModalModalHeader",props:{title:{type:String,default:null}},setup(e){return(t,n)=>e.title?(L(),B("div",j2,[R("h2",B2,ce(e.title),1)])):ge("",!0)}};function ja(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function El(e,t,n,o,i,r,a){try{var s=e[r](a),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(o,i)}function Fu(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var r=e.apply(t,n);function a(l){El(r,o,i,a,s,"next",l)}function s(l){El(r,o,i,a,s,"throw",l)}a(void 0)})}}function ju(e,t,n){return t=br(t),(function(o,i){if(i&&(typeof i=="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r})(o)})(e,Hu()?Reflect.construct(t,n||[],br(e).constructor):t.apply(e,n))}function Ms(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function As(e,t,n){return t&&(function(o,i){for(var r=0;r<i.length;r++){var a=i[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(o,Uu(a.key),a)}})(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yt(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ps(e))||t){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return a=l.done,l},e:function(l){s=!0,r=l},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw r}}}}function oe(e,t,n){return(t=Uu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function br(e){return br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},br(e)}function Bu(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ba(e,t)}function Hu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hu=function(){return!!e})()}function _l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,o)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_l(Object(n),!0).forEach(function(o){oe(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_l(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Hr(e,t){if(e==null)return{};var n,o,i=(function(a,s){if(a==null)return{};var l={};for(var c in a)if({}.hasOwnProperty.call(a,c)){if(s.indexOf(c)!==-1)continue;l[c]=a[c]}return l})(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function yi(){var e,t,n=typeof Symbol=="function"?Symbol:{},o=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function r(g,p,f,v){var y=p&&p.prototype instanceof s?p:s,b=Object.create(y.prototype);return jt(b,"_invoke",(function(w,x,k){var I,S,A,M=0,P=k||[],T=!1,D={p:0,n:0,v:e,a:F,f:F.bind(e,4),d:function(N,W){return I=N,S=0,A=e,D.n=W,a}};function F(N,W){for(S=N,A=W,t=0;!T&&M&&!_&&t<P.length;t++){var _,G=P[t],q=D.p,O=G[2];N>3?(_=O===W)&&(A=G[(S=G[4])?5:(S=3,3)],G[4]=G[5]=e):G[0]<=q&&((_=N<2&&q<G[1])?(S=0,D.v=W,D.n=G[1]):q<O&&(_=N<3||G[0]>W||W>O)&&(G[4]=N,G[5]=W,D.n=O,S=0))}if(_||N>1)return a;throw T=!0,W}return function(N,W,_){if(M>1)throw TypeError("Generator is already running");for(T&&W===1&&F(W,_),S=W,A=_;(t=S<2?e:A)||!T;){I||(S?S<3?(S>1&&(D.n=-1),F(S,A)):D.n=A:D.v=A);try{if(M=2,I){if(S||(N="next"),t=I[N]){if(!(t=t.call(I,A)))throw TypeError("iterator result is not an object");
3if(!t.done)return t;A=t.value,S<2&&(S=0)}else S===1&&(t=I.return)&&t.call(I),S<2&&(A=TypeError("The iterator does not provide a '"+N+"' method"),S=1);I=e}else if((t=(T=D.n<0)?A:w.call(x,D))!==a)break}catch(G){I=e,S=1,A=G}finally{M=1}}return{value:t,done:T}}})(g,f,v),!0),b}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var d=[][o]?t(t([][o]())):(jt(t={},o,function(){return this}),t),u=c.prototype=s.prototype=Object.create(d);function m(g){return Object.setPrototypeOf?Object.setPrototypeOf(g,c):(g.__proto__=c,jt(g,i,"GeneratorFunction")),g.prototype=Object.create(u),g}return l.prototype=c,jt(u,"constructor",c),jt(c,"constructor",l),l.displayName="GeneratorFunction",jt(c,i,"GeneratorFunction"),jt(u),jt(u,i,"Generator"),jt(u,o,function(){return this}),jt(u,"toString",function(){return"[object Generator]"}),(yi=function(){return{w:r,m}})()}function jt(e,t,n,o){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}jt=function(r,a,s,l){function c(d,u){jt(r,d,function(m){return this._invoke(d,u,m)})}a?i?i(r,a,{value:s,enumerable:!l,configurable:!l,writable:!l}):r[a]=s:(c("next",0),c("throw",1),c("return",2))},jt(e,t,n,o)}function Ba(e,t){return Ba=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Ba(e,t)}function X(e,t){return(function(n){if(Array.isArray(n))return n})(e)||(function(n,o){var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var r,a,s,l,c=[],d=!0,u=!1;try{if(s=(i=i.call(n)).next,o!==0)for(;!(d=(r=s.call(i)).done)&&(c.push(r.value),c.length!==o);d=!0);}catch(m){u=!0,a=m}finally{try{if(!d&&i.return!=null&&(l=i.return(),Object(l)!==l))return}finally{if(u)throw a}}return c}})(e,t)||Ps(e,t)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 4In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function zi(e){return(function(t){if(Array.isArray(t))return ja(t)})(e)||(function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)})(e)||Ps(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 5In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Uu(e){var t=(function(n,o){if(typeof n!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var r=i.call(n,o);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(n)})(e,"string");return typeof t=="symbol"?t:t+""}function yo(e){return yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yo(e)}function Ps(e,t){if(e){if(typeof e=="string")return ja(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ja(e,t):void 0}}var Ur,De,Wu,co,Ll,Gu,qu,Vu,Ds,Ha,Ua,Ku,bi={},Zu=[],U2=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ri=Array.isArray;function Pn(e,t){for(var n in t)e[n]=t[n];return e}function Ts(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function h(e,t,n){var o,i,r,a={};for(r in t)r=="key"?o=t[r]:r=="ref"?i=t[r]:a[r]=t[r];if(arguments.length>2&&(a.children=arguments.length>3?Ur.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(r in e.defaultProps)a[r]===void 0&&(a[r]=e.defaultProps[r]);return hr(e,a,o,i,null)}function hr(e,t,n,o,i){var r={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Wu,__i:-1,__u:0};return i==null&&De.vnode!=null&&De.vnode(r),r}function fe(e){return e.children}function fn(e,t){this.props=e,this.context=t}function Go(e,t){if(t==null)return e.__?Go(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Go(e):null}function Xu(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Xu(e)}}function Wa(e){(!e.__d&&(e.__d=!0)&&co.push(e)&&!wr.__r++||Ll!=De.debounceRendering)&&((Ll=De.debounceRendering)||Gu)(wr)}function wr(){for(var e,t,n,o,i,r,a,s=1;co.length;)co.length>s&&co.sort(qu),e=co.shift(),s=co.length,e.__d&&(n=void 0,o=void 0,i=(o=(t=e).__v).__e,r=[],a=[],t.__P&&((n=Pn({},o)).__v=o.__v+1,De.vnode&&De.vnode(n),zs(t.__P,n,o,t.__n,t.__P.namespaceURI,32&o.__u?[i]:null,r,i??Go(o),!!(32&o.__u),a),n.__v=o.__v,n.__.__k[n.__i]=n,Ju(r,n,a),o.__e=o.__=null,n.__e!=i&&Xu(n)));wr.__r=0}function Yu(e,t,n,o,i,r,a,s,l,c,d){var u,m,g,p,f,v,y,b=o&&o.__k||Zu,w=t.length;for(l=(function(x,k,I,S,A){var M,P,T,D,F,N=I.length,W=N,_=0;for(x.__k=new Array(A),M=0;M<A;M++)(P=k[M])!=null&&typeof P!="boolean"&&typeof P!="function"?(typeof P=="string"||typeof P=="number"||typeof P=="bigint"||P.constructor==String?P=x.__k[M]=hr(null,P,null,null,null):Ri(P)?P=x.__k[M]=hr(fe,{children:P},null,null,null):P.constructor===void 0&&P.__b>0?P=x.__k[M]=hr(P.type,P.props,P.key,P.ref?P.ref:null,P.__v):x.__k[M]=P,D=M+_,P.__=x,P.__b=x.__b+1,T=null,(F=P.__i=W2(P,I,D,W))!=-1&&(W--,(T=I[F])&&(T.__u|=2)),T==null||T.__v==null?(F==-1&&(A>N?_--:A<N&&_++),typeof P.type!="function"&&(P.__u|=4)):F!=D&&(F==D-1?_--:F==D+1?_++:(F>D?_--:_++,P.__u|=4))):x.__k[M]=null;if(W)for(M=0;M<N;M++)(T=I[M])!=null&&!(2&T.__u)&&(T.__e==S&&(S=Go(T)),th(T,T));return S})(n,t,b,l,w),u=0;u<w;u++)(g=n.__k[u])!=null&&(m=g.__i==-1?bi:b[g.__i]||bi,g.__i=u,v=zs(e,g,m,
vendor: 4,413 bytes, line 5
5i,r,a,s,l,c,d),p=g.__e,g.ref&&m.ref!=g.ref&&(m.ref&&Rs(m.ref,null,g),d.push(g.ref,g.__c||p,g)),f==null&&p!=null&&(f=p),(y=!!(4&g.__u))||m.__k===g.__k?l=Qu(g,l,e,y):typeof g.type=="function"&&v!==void 0?l=v:p&&(l=p.nextSibling),g.__u&=-7);return n.__e=f,l}function Qu(e,t,n,o){var i,r;if(typeof e.type=="function"){for(i=e.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=e,t=Qu(i[r],t,n,o));return t}e.__e!=t&&(o&&(t&&e.type&&!t.parentNode&&(t=Go(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function xr(e,t){return t=t||[],e==null||typeof e=="boolean"||(Ri(e)?e.some(function(n){xr(n,t)}):t.push(e)),t}function W2(e,t,n,o){var i,r,a,s=e.key,l=e.type,c=t[n],d=c!=null&&!(2&c.__u);if(c===null&&s==null||d&&s==c.key&&l==c.type)return n;if(o>(d?1:0)){for(i=n-1,r=n+1;i>=0||r<t.length;)if((c=t[a=i>=0?i--:r++])!=null&&!(2&c.__u)&&s==c.key&&l==c.type)return a}return-1}function Ol(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||U2.test(t)?n:n+"px"}function Gi(e,t,n,o,i){var r,a;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||Ol(e.style,t,"");if(n)for(t in n)o&&n[t]==o[t]||Ol(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")r=t!=(t=t.replace(Vu,"$1")),a=t.toLowerCase(),t=a in e||t=="onFocusOut"||t=="onFocusIn"?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?o?n.u=o.u:(n.u=Ds,e.addEventListener(t,r?Ua:Ha,r)):e.removeEventListener(t,r?Ua:Ha,r);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Nl(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Ds++;else if(t.t<n.u)return;return n(De.event?De.event(t):t)}}}function zs(e,t,n,o,i,r,a,s,l,c){var d,u,m,g,p,f,v,y,b,w,x,k,I,S,A,M,P,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),r=[s=t.__e=n.__e]),(d=De.__b)&&d(t);e:if(typeof T=="function")try{if(y=t.props,b="prototype"in T&&T.prototype.render,w=(d=T.contextType)&&o[d.__c],x=d?w?w.props.value:d.__:o,n.__c?v=(u=t.__c=n.__c).__=u.__E:(b?t.__c=u=new T(y,x):(t.__c=u=new fn(y,x),u.constructor=T,u.render=q2),w&&w.sub(u),u.state||(u.state={}),u.__n=o,m=u.__d=!0,u.__h=[],u._sb=[]),b&&u.__s==null&&(u.__s=u.state),b&&T.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Pn({},u.__s)),Pn(u.__s,T.getDerivedStateFromProps(y,u.__s))),g=u.props,p=u.state,u.__v=t,m)b&&T.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),b&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(b&&T.getDerivedStateFromProps==null&&y!==g&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(y,x),t.__v==n.__v||!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(y,u.__s,x)===!1){for(t.__v!=n.__v&&(u.props=y,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(D){D&&(D.__=t)}),k=0;k<u._sb.length;k++)u.__h.push(u._sb[k]);u._sb=[],u.__h.length&&a.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(y,u.__s,x),b&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(g,p,f)})}if(u.context=x,u.props=y,u.__P=e,u.__e=!1,I=De.__r,S=0,b){for(u.state=u.__s,u.__d=!1,I&&I(t),d=u.render(u.props,u.state,u.context),A=0;A<u._sb.length;A++)u.__h.push(u._sb[A]);u._sb=[]}else do u.__d=!1,I&&I(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++S<25);u.state=u.__s,u.getChildContext!=null&&(o=Pn(Pn({},o),u.getChildContext())),b&&!m&&u.getSnapshotBeforeUpdate!=null&&(f=u.getSnapshotBeforeUpdate(g,p)),M=d,d!=null&&d.type===fe&&d.key==null&&(M=eh(d.props.children)),s=Yu(e,Ri(M)?M:[M],t,n,o,i,r,a,s,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&a.push(u),v&&(u.__E=u.__=null)}catch(D){if(t.__v=null,l||r!=null)if(D.then){for(t.__u|=l?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;r[r.indexOf(s)]=null,t.__e=s}else{for(P=r.length;P--;)Ts(r[P]);Ga(t)}else t.__e=n.__e,t.__k=n.__k,D.then||Ga(t);De.__e(D,t,n)}else r==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=G2(n.__e,t,n,o,i,r,a,l,c);return(d=De.diffed)&&d(t),128&t.__u?void 0:s}
vendor: 3,851 bytes, line 5
5function Ga(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(Ga)}function Ju(e,t,n){for(var o=0;o<n.length;o++)Rs(n[o],n[++o],n[++o]);De.__c&&De.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(r){r.call(i)})}catch(r){De.__e(r,i.__v)}})}function eh(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Ri(e)?e.map(eh):Pn({},e)}function G2(e,t,n,o,i,r,a,s,l){var c,d,u,m,g,p,f,v=n.props||bi,y=t.props,b=t.type;if(b=="svg"?i="http://www.w3.org/2000/svg":b=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),r!=null){for(c=0;c<r.length;c++)if((g=r[c])&&"setAttribute"in g==!!b&&(b?g.localName==b:g.nodeType==3)){e=g,r[c]=null;break}}if(e==null){if(b==null)return document.createTextNode(y);e=document.createElementNS(i,b,y.is&&y),s&&(De.__m&&De.__m(t,r),s=!1),r=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(r=r&&Ur.call(e.childNodes),!s&&r!=null)for(v={},c=0;c<e.attributes.length;c++)v[(g=e.attributes[c]).name]=g.value;for(c in v)if(g=v[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=g;else if(!(c in y)){if(c=="value"&&"defaultValue"in y||c=="checked"&&"defaultChecked"in y)continue;Gi(e,c,null,g,i)}}for(c in y)g=y[c],c=="children"?m=g:c=="dangerouslySetInnerHTML"?d=g:c=="value"?p=g:c=="checked"?f=g:s&&typeof g!="function"||v[c]===g||Gi(e,c,g,v[c],i);if(d)s||u&&(d.__html==u.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),Yu(t.type=="template"?e.content:e,Ri(m)?m:[m],t,n,o,b=="foreignObject"?"http://www.w3.org/1999/xhtml":i,r,a,r?r[0]:n.__k&&Go(n,0),s,l),r!=null)for(c=r.length;c--;)Ts(r[c]);s||(c="value",b=="progress"&&p==null?e.removeAttribute("value"):p!=null&&(p!==e[c]||b=="progress"&&!p||b=="option"&&p!=v[c])&&Gi(e,c,p,v[c],i),c="checked",f!=null&&f!=e[c]&&Gi(e,c,f,v[c],i))}return e}function Rs(e,t,n){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&t==null||(e.__u=e(t))}else e.current=t}catch(i){De.__e(i,n)}}function th(e,t,n){var o,i;if(De.unmount&&De.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||Rs(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(r){De.__e(r,t)}o.base=o.__P=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&th(o[i],t,n||typeof e.type!="function");n||Ts(e.__e),e.__c=e.__=e.__e=void 0}function q2(e,t,n){return this.constructor(e,n)}function Cr(e,t,n){var o,i,r;t==document&&(t=document.documentElement),De.__&&De.__(e,t),o=t.__k,i=[],r=[],zs(t,e=t.__k=h(fe,null,[e]),o||bi,bi,t.namespaceURI,o?null:t.firstChild?Ur.call(t.childNodes):null,i,o?o.__e:t.firstChild,!1,r),Ju(i,e,r)}function Rn(e){function t(n){var o,i;return this.getChildContext||(o=new Set,(i={})[t.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(r){this.props.value!=r.value&&o.forEach(function(a){a.__e=!0,Wa(a)})},this.sub=function(r){o.add(r);var a=r.componentWillUnmount;r.componentWillUnmount=function(){o&&o.delete(r),a&&a.call(r)}}),n.children}return t.__c="__cC"+Ku++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,o){return n.children(o)}).contextType=t,t}Ur=Zu.slice,De={__e:function(e,t,n,o){for(var i,r,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((r=i.constructor)&&r.getDerivedStateFromError!=null&&(i.setState(r.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,o||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},Wu=0,fn.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Pn({},this.state),typeof e=="function"&&(e=e(Pn({},n),this.props)),e&&Pn(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Wa(this))},fn.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Wa(this))},fn.prototype.render=fe,co=[],Gu=typeof Promise=="function"?Promise.prototype.then.bind(Prom
vendor: 4,168 bytes, lines 5-27
5ise.resolve()):setTimeout,qu=function(e,t){return e.__v.__b-t.__v.__b},wr.__r=0,Vu=/(PointerCapture)$|Capture$/i,Ds=0,Ha=Nl(!1),Ua=Nl(!0),Ku=0;var bo,ot,va,$l,wi=0,nh=[],dt=De,Fl=dt.__b,jl=dt.__r,Bl=dt.diffed,Hl=dt.__c,Ul=dt.unmount,Wl=dt.__;function Ei(e,t){dt.__h&&dt.__h(ot,e,wi||t),wi=0;var n=ot.__H||(ot.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function $(e){return wi=1,oh(ih,e)}function oh(e,t,n){var o=Ei(bo++,2);if(o.t=e,!o.__c&&(o.__=[ih(void 0,t),function(s){var l=o.__N?o.__N[0]:o.__[0],c=o.t(l,s);l!==c&&(o.__N=[c,o.__[1]],o.__c.setState({}))}],o.__c=ot,!ot.__f)){var i=function(s,l,c){if(!o.__c.__H)return!0;var d=o.__c.__H.__.filter(function(m){return!!m.__c});if(d.every(function(m){return!m.__N}))return!r||r.call(this,s,l,c);var u=o.__c.props!==s;return d.forEach(function(m){if(m.__N){var g=m.__[0];m.__=m.__N,m.__N=void 0,g!==m.__[0]&&(u=!0)}}),r&&r.call(this,s,l,c)||u};ot.__f=!0;var r=ot.shouldComponentUpdate,a=ot.componentWillUpdate;ot.componentWillUpdate=function(s,l,c){if(this.__e){var d=r;r=void 0,i(s,l,c),r=d}a&&a.call(this,s,l,c)},ot.shouldComponentUpdate=i}return o.__N||o.__}function H(e,t){var n=Ei(bo++,3);!dt.__s&&_s(n.__H,t)&&(n.__=e,n.u=t,ot.__H.__h.push(n))}function Es(e,t){var n=Ei(bo++,4);!dt.__s&&_s(n.__H,t)&&(n.__=e,n.u=t,ot.__h.push(n))}function Q(e){return wi=5,ee(function(){return{current:e}},[])}function ee(e,t){var n=Ei(bo++,7);return _s(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Y(e,t){return wi=8,ee(function(){return e},t)}function En(e){var t=ot.context[e.__c],n=Ei(bo++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(ot)),t.props.value):e.__}function V2(){for(var e;e=nh.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(mr),e.__H.__h.forEach(qa),e.__H.__h=[]}catch(t){e.__H.__h=[],dt.__e(t,e.__v)}}dt.__b=function(e){ot=null,Fl&&Fl(e)},dt.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Wl&&Wl(e,t)},dt.__r=function(e){jl&&jl(e),bo=0;var t=(ot=e.__c).__H;t&&(va===ot?(t.__h=[],ot.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(mr),t.__h.forEach(qa),t.__h=[],bo=0)),va=ot},dt.diffed=function(e){Bl&&Bl(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(nh.push(t)!==1&&$l===dt.requestAnimationFrame||(($l=dt.requestAnimationFrame)||K2)(V2)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),va=ot=null},dt.__c=function(e,t){t.some(function(n){try{n.__h.forEach(mr),n.__h=n.__h.filter(function(o){return!o.__||qa(o)})}catch(o){t.some(function(i){i.__h&&(i.__h=[])}),t=[],dt.__e(o,n.__v)}}),Hl&&Hl(e,t)},dt.unmount=function(e){Ul&&Ul(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{mr(o)}catch(i){t=i}}),n.__H=void 0,t&&dt.__e(t,n.__v))};var Gl=typeof requestAnimationFrame=="function";function K2(e){var t,n=function(){clearTimeout(o),Gl&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,35);Gl&&(t=requestAnimationFrame(n))}function mr(e){var t=ot,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),ot=t}function qa(e){var t=ot;e.__c=e.__(),ot=t}function _s(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function ih(e,t){return typeof t=="function"?t(e):t}var Z2=`/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */ 6@layer properties; 7@layer theme, base, components, utilities; 8@layer theme { 9 :root, :host { 10 --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", 11 "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; 12 --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", 13 "Courier New", monospace; 14 --color-red-500: oklch(63.7% 0.237 25.331); 15 --color-red-600: oklch(57.7% 0.245 27.325); 16 --color-yellow-500: oklch(79.5% 0.184 86.047); 17 --color-green-500: oklch(72.3% 0.219 149.579); 18 --color-teal-500: oklch(70.4% 0.14 182.503); 19 --color-blue-500: oklch(62.3% 0.214 259.815); 20 --color-indigo-500: oklch(58.5% 0.233 277.117); 21 --color-purple-500: oklch(62.7% 0.265 303.9); 22 --color-pink-500: oklch(65.6% 0.241 354.308); 23 --color-gray-300: oklch(87.2% 0.01 258.338); 24 --color-white: #fff; 25 --spacing: 0.25rem; 26 --container-sm: 24rem; 27 --text-xs: 0.75rem;
28 --text-xs--line-height: calc(1 / 0.75); 29 --text-sm: 0.875rem; 30 --text-sm--line-height: calc(1.25 / 0.875); 31 --text-base: 1rem; 32 --text-base--line-height: calc(1.5 / 1); 33 --text-lg: 1.125rem; 34 --text-lg--line-height: calc(1.75 / 1.125); 35 --text-xl: 1.25rem; 36 --text-xl--line-height: calc(1.75 / 1.25); 37 --font-weight-medium: 500; 38 --font-weight-semibold: 600; 39 --font-weight-bold: 700; 40 --leading-relaxed: 1.625; 41 --radius-md: 0.375rem; 42 --radius-lg: 0.5rem; 43 --radius-xl: 0.75rem; 44 --radius-2xl: 1rem; 45 --ease-out: cubic-bezier(0, 0, 0.2, 1); 46 --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); 47 --animate-spin: spin 1s linear infinite; 48 --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; 49 --default-transition-duration: 150ms; 50 --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); 51 --default-font-family: var(--font-sans); 52 --default-mono-font-family: var(--font-mono); 53 --color-bg-app: var(--ep-background-app); 54 --color-bg-surface: var(--ep-background-surface); 55 --color-bg-surface-alt: var(--ep-background-surface-alt); 56 --color-bg-elevated: var(--ep-background-elevated); 57 --color-bg-overlay: var(--ep-background-overlay); 58 --color-bg-input: var(--ep-background-input); 59 --color-fg-primary: var(--ep-foreground-primary); 60 --color-fg-secondary: var(--ep-foreground-secondary); 61 --color-fg-muted: var(--ep-foreground-muted); 62 --color-fg-disabled: var(--ep-foreground-disabled); 63 --color-fg-on-accent: var(--ep-foreground-on-accent); 64 --color-border-default: var(--ep-border-default); 65 --color-border-subtle: var(--ep-border-subtle); 66 --color-border-strong: var(--ep-border-strong); 67 --color-accent: var(--ep-accent-primary); 68 --color-accent-hover: var(--ep-accent-primary-hover); 69 --color-accent-light: var(--ep-accent-primary-light); 70 --color-accent-fg: var(--ep-accent-primary-foreground); 71 --color-interactive-hover: var(--ep-interactive-hover); 72 --color-interactive-active: var(--ep-interactive-active); 73 --color-interactive-selected: var(--ep-interactive-selected); 74 --color-interactive-focus-ring: var(--ep-interactive-focus-ring); 75 --color-state-error: var(--ep-state-error); 76 --color-state-error-light: var(--ep-state-error-light); 77 --color-state-warning: var(--ep-state-warning); 78 --color-state-warning-light: var(--ep-state-warning-light); 79 --color-state-success: var(--ep-state-success); 80 --color-state-success-light: var(--ep-state-success-light); 81 --color-state-info-light: var(--ep-state-info-light); 82 --color-tooltip-bg: var(--ep-tooltip-background); 83 --color-tooltip-fg: var(--ep-tooltip-foreground); 84 } 85} 86@layer base { 87 *, ::after, ::before, ::backdrop, ::file-selector-button { 88 box-sizing: border-box; 89 margin: 0; 90 padding: 0; 91 border: 0 solid; 92 } 93 html, :host { 94 line-height: 1.5; 95 -webkit-text-size-adjust: 100%; 96 -moz-tab-size: 4; 97 -o-tab-size: 4; 98 tab-size: 4; 99 font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); 100 font-feature-settings: var(--default-font-feature-settings, normal); 101 font-variation-settings: var(--default-font-variation-settings, normal); 102 -webkit-tap-highlight-color: transparent; 103 } 104 hr { 105 height: 0; 106 color: inherit; 107 border-top-width: 1px; 108 } 109 abbr:where([title]) { 110 -webkit-text-decoration: underline dotted; 111 text-decoration: underline dotted; 112 } 113 h1, h2, h3, h4, h5, h6 { 114 font-size: inherit; 115 font-weight: inherit; 116 } 117 a { 118 color: inherit; 119 -webkit-text-decoration: inherit; 120 text-decoration: inherit; 121 } 122 b, strong { 123 font-weight: bolder; 124 } 125 code, kbd, samp, pre { 126 font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); 127 font-feature-settings: var(--default-mono-font-feature-settings, normal); 128 font-variation-settings: var(--default-mono-font-variation-settings, normal); 129 font-size: 1em; 130 } 131 small { 132 font-size: 80%; 133 } 134 sub, sup { 135 font-size: 75%; 136 line-height: 0; 137 position: relative; 138 vertical-align: baseline; 139 } 140 sub { 141 bottom: -0.25em; 142 } 143 sup { 144 top: -0.5em; 145 } 146 table { 147 text-indent: 0; 148 border-color: inherit; 149 border-collapse: collapse; 150 } 151 :-moz-focusring { 152 outline: auto; 153 } 154 progress { 155 vertical-align: baseline; 156 } 157 summary { 158 display: list-item; 159 } 160 ol, ul, menu { 161 list-style: none; 162 } 163 img, svg, video, canvas, audio, iframe, embed, object { 164 display: block; 165 vertical-align: middle; 166 } 167 img, video { 168 max-width: 100%; 169 height: auto; 170 } 171 button, input, select, optgroup, textarea, ::file-selector-button { 172 font: inherit; 173 font-feature-settings: inherit; 174 font-variation-settings: inherit; 175 letter-spacing: inherit; 176 color: inherit; 177 border-radius: 0; 178 background-color: transparent; 179 opacity: 1; 180 } 181 :where(select:is([multiple], [size])) optgroup { 182 font-weight: bolder; 183 } 184 :where(select:is([multiple], [size])) optgroup option { 185 padding-inline-start: 20px; 186 } 187 ::file-selector-button { 188 margin-inline-end: 4px; 189 } 190 ::-moz-placeholder { 191 opacity: 1; 192 } 193 ::placeholder { 194 opacity: 1; 195 } 196 @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) { 197 ::-moz-placeholder { 198 color: currentcolor; 199 @supports (color: color-mix(in lab, red, red)) { 200 color: color-mix(in oklab, currentcolor 50%, transparent); 201 } 202 } 203 ::placeholder { 204 color: currentcolor; 205 @supports (color: color-mix(in lab, red, red)) { 206 color: color-mix(in oklab, currentcolor 50%, transparent); 207 } 208 } 209 } 210 textarea { 211 resize: vertical; 212 } 213 ::-webkit-search-decoration { 214 -webkit-appearance: none; 215 } 216 ::-webkit-date-and-time-value { 217 min-height: 1lh; 218 text-align: inherit; 219 } 220 ::-webkit-datetime-edit { 221 display: inline-flex; 222 } 223 ::-webkit-datetime-edit-fields-wrapper { 224 padding: 0; 225 } 226 ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-d
226ay-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field { 227 padding-block: 0; 228 } 229 ::-webkit-calendar-picker-indicator { 230 line-height: 1; 231 } 232 :-moz-ui-invalid { 233 box-shadow: none; 234 } 235 button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button { 236 -webkit-appearance: button; 237 -moz-appearance: button; 238 appearance: button; 239 } 240 ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { 241 height: auto; 242 } 243 [hidden]:where(:not([hidden="until-found"])) { 244 display: none !important; 245 } 246} 247@layer utilities { 248 .pointer-events-auto { 249 pointer-events: auto; 250 } 251 .pointer-events-none { 252 pointer-events: none; 253 } 254 .invisible { 255 visibility: hidden; 256 } 257 .visible { 258 visibility: visible; 259 } 260 .absolute { 261 position: absolute; 262 } 263 .fixed { 264 position: fixed; 265 } 266 .relative { 267 position: relative; 268 } 269 .static { 270 position: static; 271 } 272 .sticky { 273 position: sticky; 274 } 275 .inset-0 { 276 inset: calc(var(--spacing) * 0); 277 } 278 .inset-x-0 { 279 inset-inline: calc(var(--spacing) * 0); 280 } 281 .inset-y-0 { 282 inset-block: calc(var(--spacing) * 0); 283 } 284 .top-0 { 285 top: calc(var(--spacing) * 0); 286 } 287 .top-1 { 288 top: calc(var(--spacing) * 1); 289 } 290 .top-1\\/2 { 291 top: calc(1/2 * 100%); 292 } 293 .top-4 { 294 top: calc(var(--spacing) * 4); 295 } 296 .top-6 { 297 top: calc(var(--spacing) * 6); 298 } 299 .right-0 { 300 right: calc(var(--spacing) * 0); 301 } 302 .right-1 { 303 right: calc(var(--spacing) * 1); 304 } 305 .right-2 { 306 right: calc(var(--spacing) * 2); 307 } 308 .right-4 { 309 right: calc(var(--spacing) * 4); 310 } 311 .bottom-0 { 312 bottom: calc(var(--spacing) * 0); 313 } 314 .left-0 { 315 left: calc(var(--spacing) * 0); 316 } 317 .left-1\\/2 { 318 left: calc(1/2 * 100%); 319 } 320 .z-3 { 321 z-index: 3; 322 } 323 .z-10 { 324 z-index: 10; 325 } 326 .z-40 { 327 z-index: 40; 328 } 329 .z-50 { 330 z-index: 50; 331 } 332 .z-100 { 333 z-index: 100; 334 } 335 .col-start-1 { 336 grid-column-start: 1; 337 } 338 .row-start-1 { 339 grid-row-start: 1; 340 } 341 .container { 342 width: 100%; 343 @media (width >= 40rem) { 344 max-width: 40rem; 345 } 346 @media (width >= 48rem) { 347 max-width: 48rem; 348 } 349 @media (width >= 64rem) { 350 max-width: 64rem; 351 } 352 @media (width >= 80rem) { 353 max-width: 80rem; 354 } 355 @media (width >= 96rem) { 356 max-width: 96rem; 357 } 358 } 359 .mx-4 { 360 margin-inline: calc(var(--spacing) * 4); 361 } 362 .my-2 { 363 margin-block: calc(var(--spacing) * 2); 364 } 365 .my-4 { 366 margin-block: calc(var(--spacing) * 4); 367 } 368 .-mt-1 { 369 margin-top: calc(var(--spacing) * -1); 370 } 371 .mt-0\\.5 { 372 margin-top: calc(var(--spacing) * 0.5); 373 } 374 .mt-1 { 375 margin-top: calc(var(--spacing) * 1); 376 } 377 .mt-2 { 378 margin-top: calc(var(--spacing) * 2); 379 } 380 .mt-3 { 381 margin-top: calc(var(--spacing) * 3); 382 } 383 .mt-4 { 384 margin-top: calc(var(--spacing) * 4); 385 } 386 .mt-5 { 387 margin-top: calc(var(--spacing) * 5); 388 } 389 .mt-6 { 390 margin-top: calc(var(--spacing) * 6); 391 } 392 .mt-8 { 393 margin-top: calc(var(--spacing) * 8); 394 } 395 .-mr-1 { 396 margin-right: calc(var(--spacing) * -1); 397 } 398 .mr-1\\.5 { 399 margin-right: calc(var(--spacing) * 1.5); 400 } 401 .mr-2 { 402 margin-right: calc(var(--spacing) * 2); 403 } 404 .mr-3 { 405 margin-right: calc(var(--spacing) * 3); 406 } 407 .mr-4 { 408 margin-right: calc(var(--spacing) * 4); 409 } 410 .mb-1 { 411 margin-bottom: calc(var(--spacing) * 1); 412 } 413 .mb-1\\.5 { 414 margin-bottom: calc(var(--spacing) * 1.5); 415 } 416 .mb-2 { 417 margin-bottom: calc(var(--spacing) * 2); 418 } 419 .mb-3 { 420 margin-bottom: calc(var(--spacing) * 3); 421 } 422 .mb-4 { 423 margin-bottom: calc(var(--spacing) * 4); 424 } 425 .mb-6 { 426 margin-bottom: calc(var(--spacing) * 6); 427 } 428 .ml-1 { 429 margin-left: calc(var(--spacing) * 1); 430 } 431 .ml-2 { 432 margin-left: calc(var(--spacing) * 2); 433 } 434 .block { 435 display: block; 436 } 437 .contents { 438 display: contents; 439 } 440 .flex { 441 display: flex; 442 } 443 .grid { 444 display: grid; 445 } 446 .hidden { 447 display: none; 448 } 449 .inline { 450 display: inline; 451 } 452 .inline-block { 453 display: inline-block; 454 } 455 .inline-flex { 456 display: inline-flex; 457 } 458 .h-1 { 459 height: calc(var(--spacing) * 1); 460 } 461 .h-1\\.5 { 462 height: calc(var(--spacing) * 1.5); 463 } 464 .h-2 { 465 height: calc(var(--spacing) * 2); 466 } 467 .h-3 { 468 height: calc(var(--spacing) * 3); 469 } 470 .h-3\\.5 { 471 height: calc(var(--spacing) * 3.5); 472 } 473 .h-4 { 474 height: calc(var(--spacing) * 4); 475 } 476 .h-5 { 477 height: calc(var(--spacing) * 5); 478 } 479 .h-6 { 480 height: calc(var(--spacing) * 6); 481 } 482 .h-7 { 483 height: calc(var(--spacing) * 7); 484 } 485 .h-8 { 486 height: calc(var(--spacing) * 8); 487 } 488 .h-9 { 489 height: calc(var(--spacing) * 9); 490 } 491 .h-10 { 492 height: calc(var(--spacing) * 10); 493 } 494 .h-12 { 495 height: calc(var(--spacing) * 12); 496 } 497 .h-16 { 498 height: calc(var(--spacing) * 16); 499 } 500 .h-18 { 501 height: calc(var(--spacing) * 18); 502 } 503 .h-\\[32px\\] { 504 height: 32px; 505 } 506 .h-full { 507 height: 100%; 508 } 509 .h-px { 510 height: 1px; 511 } 512 .max-h-48 { 513 max-height: calc(var(--spacing) * 48); 514 } 515 .max-h-60 { 516 max-height: calc(var(--spacing) * 60); 517 } 518 .min-h-0 { 519 min-height: calc(var(--spacing) * 0); 520 } 521 .\\!w-full { 522 width: 100% !important; 523 } 524 .w-2 { 525 width: calc(var(--spacing) * 2); 526 } 527 .w-3 { 528 width: calc(var(--spacing) * 3); 529 } 530 .w-3\\.5 { 531 width: calc(var(--spacing) * 3.5); 532 } 533 .w-4 {
534 width: calc(var(--spacing) * 4); 535 } 536 .w-5 { 537 width: calc(var(--spacing) * 5); 538 } 539 .w-6 { 540 width: calc(var(--spacing) * 6); 541 } 542 .w-8 { 543 width: calc(var(--spacing) * 8); 544 } 545 .w-9 { 546 width: calc(var(--spacing) * 9); 547 } 548 .w-10 { 549 width: calc(var(--spacing) * 10); 550 } 551 .w-12 { 552 width: calc(var(--spacing) * 12); 553 } 554 .w-16 { 555 width: calc(var(--spacing) * 16); 556 } 557 .w-18 { 558 width: calc(var(--spacing) * 18); 559 } 560 .w-32 { 561 width: calc(var(--spacing) * 32); 562 } 563 .w-\\[32px\\] { 564 width: 32px; 565 } 566 .w-auto { 567 width: auto; 568 } 569 .w-full { 570 width: 100%; 571 } 572 .w-px { 573 width: 1px; 574 } 575 .max-w-\\[150px\\] { 576 max-width: 150px; 577 } 578 .max-w-\\[180px\\] { 579 max-width: 180px; 580 } 581 .max-w-\\[240px\\] { 582 max-width: 240px; 583 } 584 .max-w-sm { 585 max-width: var(--container-sm); 586 } 587 .min-w-0 { 588 min-width: calc(var(--spacing) * 0); 589 } 590 .min-w-\\[8rem\\] { 591 min-width: 8rem; 592 } 593 .min-w-\\[32px\\] { 594 min-width: 32px; 595 } 596 .min-w-\\[120px\\] { 597 min-width: 120px; 598 } 599 .min-w-\\[200px\\] { 600 min-width: 200px; 601 } 602 .flex-1 { 603 flex: 1; 604 } 605 .flex-shrink-0 { 606 flex-shrink: 0; 607 } 608 .shrink-0 { 609 flex-shrink: 0; 610 } 611 .-translate-x-1\\/2 { 612 --tw-translate-x: calc(calc(1/2 * 100%) * -1); 613 translate: var(--tw-translate-x) var(--tw-translate-y); 614 } 615 .translate-x-\\[1px\\] { 616 --tw-translate-x: 1px; 617 translate: var(--tw-translate-x) var(--tw-translate-y); 618 } 619 .-translate-y-1\\/2 { 620 --tw-translate-y: calc(calc(1/2 * 100%) * -1); 621 translate: var(--tw-translate-x) var(--tw-translate-y); 622 } 623 .translate-y-\\[1px\\] { 624 --tw-translate-y: 1px; 625 translate: var(--tw-translate-x) var(--tw-translate-y); 626 } 627 .scale-95 { 628 --tw-scale-x: 95%; 629 --tw-scale-y: 95%; 630 --tw-scale-z: 95%; 631 scale: var(--tw-scale-x) var(--tw-scale-y); 632 } 633 .scale-100 { 634 --tw-scale-x: 100%; 635 --tw-scale-y: 100%; 636 --tw-scale-z: 100%; 637 scale: var(--tw-scale-x) var(--tw-scale-y); 638 } 639 .rotate-45 { 640 rotate: 45deg; 641 } 642 .rotate-180 { 643 rotate: 180deg; 644 } 645 .transform { 646 transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,); 647 } 648 .animate-pulse { 649 animation: var(--animate-pulse); 650 } 651 .animate-spin { 652 animation: var(--animate-spin); 653 } 654 .cursor-default { 655 cursor: default; 656 } 657 .cursor-grab { 658 cursor: grab; 659 } 660 .cursor-not-allowed { 661 cursor: not-allowed; 662 } 663 .cursor-pointer { 664 cursor: pointer; 665 } 666 .touch-none { 667 touch-action: none; 668 } 669 .resize { 670 resize: both; 671 } 672 .appearance-none { 673 -webkit-appearance: none; 674 -moz-appearance: none; 675 appearance: none; 676 } 677 .grid-cols-1 { 678 grid-template-columns: repeat(1, minmax(0, 1fr)); 679 } 680 .grid-cols-2 { 681 grid-template-columns: repeat(2, minmax(0, 1fr)); 682 } 683 .grid-cols-6 { 684 grid-template-columns: repeat(6, minmax(0, 1fr)); 685 } 686 .flex-col { 687 flex-direction: column; 688 } 689 .flex-row { 690 flex-direction: row; 691 } 692 .flex-wrap { 693 flex-wrap: wrap; 694 } 695 .items-center { 696 align-items: center; 697 } 698 .items-end { 699 align-items: flex-end; 700 } 701 .items-start { 702 align-items: flex-start; 703 } 704 .justify-between { 705 justify-content: space-between; 706 } 707 .justify-center { 708 justify-content: center; 709 } 710 .justify-end { 711 justify-content: flex-end; 712 } 713 .justify-start { 714 justify-content: flex-start; 715 } 716 .gap-1 { 717 gap: calc(var(--spacing) * 1); 718 } 719 .gap-2 { 720 gap: calc(var(--spacing) * 2); 721 } 722 .gap-3 { 723 gap: calc(var(--spacing) * 3); 724 } 725 .gap-4 { 726 gap: calc(var(--spacing) * 4); 727 } 728 .space-y-2 { 729 :where(& > :not(:last-child)) { 730 --tw-space-y-reverse: 0; 731 margin-block-start: calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse)); 732 margin-block-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse))); 733 } 734 } 735 .space-y-3 { 736 :where(& > :not(:last-child)) { 737 --tw-space-y-reverse: 0; 738 margin-block-start: calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse)); 739 margin-block-end: calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse))); 740 } 741 } 742 .space-y-4 { 743 :where(& > :not(:last-child)) { 744 --tw-space-y-reverse: 0; 745 margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse)); 746 margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse))); 747 } 748 } 749 .space-y-5 { 750 :where(& > :not(:last-child)) { 751 --tw-space-y-reverse: 0; 752 margin-block-start: calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse)); 753 margin-block-end: calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse))); 754 } 755 } 756 .space-y-6 { 757 :where(& > :not(:last-child)) { 758 --tw-space-y-reverse: 0; 759 margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse)); 760 margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse))); 761 } 762 } 763 .gap-x-1 { 764 -moz-column-gap: calc(var(--spacing) * 1); 765 column-gap: calc(var(--spacing) * 1); 766 } 767 .space-x-2 { 768 :where(& > :not(:last-child)) { 769 --tw-space-x-reverse: 0; 770 margin-inline-start: calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse)); 771 margin-inline-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse))); 772 } 773 } 774 .space-x-3 { 775 :where(& > :not(:last-child)) { 776 --tw-space-x-reverse: 0; 777 margin-inline-start: calc(calc(var(--spacing) * 3) * var(--tw-space-x-reverse)); 778 margin-inline-end: calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-x-reverse))); 779 } 780 } 781 .gap-y-4 { 782 row-gap: calc(var(--spacing) * 4); 783 } 784 .divide-y { 785 :where(& > :not(:last-child)) { 786 --tw-divide-y-reverse: 0; 787 border-bottom-style: var(--tw-border-style); 788 border-top-style: var(--tw-border-style); 789 border-top-width: calc(1px * var(--tw-divide-y-reverse)); 790 border-bottom-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))); 791 } 792 } 793 .divide-border-subtle { 794 :where(& > :not(:last-child)) { 795 border-color: var(--color-border-subtle); 796 } 797 } 798 .truncate { 799 overflow: hidden; 800 text-overflow: ellipsis; 801 white-space: nowrap; 802 } 803 .overflow-auto { 804 overflow: auto; 805 } 806 .overflow-hidden { 807 overflow: hidden; 808 } 809 .overflow-x-auto { 810 overflow-x: auto; 811 } 812 .overflow-y-auto { 813 overflow-y: auto; 814 } 815 .rounded { 816 border-radius: 0.25rem; 817 } 818 .rounded-\\[3px\\] { 819 border-radius: 3px; 820 } 821 .rounded-full { 822 border-radius: calc(infinity * 1px); 823 } 824 .rounded-lg { 825 border-radius: var(--radius-lg); 826 } 827 .rounded-md { 828 border-radius: var(--radius-md); 829 } 830 .rounded-none { 831 border-radius: 0; 832 } 833 .rounded-xl { 834 border-radius: var(--radius-xl); 835 } 836 .rounded-t-2xl { 837 border-top-left-radius: var(--radius-2xl); 838 border-top-right-radius: var(--radius-2xl); 839 } 840 .rounded-t-lg { 841 border-top-left-radius: var(--radius-lg); 842 border-top-right-radius: var(--radius-lg); 843 } 844 .rounded-l-md { 845 border-top-left-radius: var(--radius-md); 846 border-bottom-left-radius: var(--radius-md); 847 } 848 .rounded-r-md { 849 border-top-right-radius: var(--radius-md); 850 border-bottom-right-radius: var(--radius-md); 851 } 852 .border { 853 border-style: var(--tw-border-style); 854 border-width: 1px; 855 } 856 .border-0 { 857 border-style: var(--tw-border-style); 858 border-width: 0px; 859 } 860 .border-2 { 861 border-style: var(--tw-border-style); 862 border-width: 2px; 863 } 864 .border-3 { 865 border-style: var(--tw-border-style); 866 border-width: 3px; 867 } 868 .border-4 { 869 border-style: var(--tw-border-style); 870 border-width: 4px; 871 } 872 .border-t { 873 border-top-style: var(--tw-border-style); 874 border-top-width: 1px; 875 } 876 .border-r { 877 border-right-style: var(--tw-border-style); 878 border-right-width: 1px; 879 } 880 .border-r-0 { 881 border-right-style: var(--tw-border-style); 882 border-right-width: 0px; 883 } 884 .border-b { 885 border-bottom-style: var(--tw-border-style); 886 border-bottom-width: 1px; 887 } 888 .border-b-2 { 889 border-bottom-style: var(--tw-border-style); 890 border-bottom-width: 2px; 891 } 892 .border-l { 893 border-left-style: var(--tw-border-style); 894 border-left-width: 1px; 895 } 896 .border-none { 897 --tw-border-style: none; 898 border-style: none; 899 } 900 .border-\\[\\#cfd4da\\] { 901 border-color: #cfd4da; 902 } 903 .border-accent { 904 border-color: var(--color-accent); 905 } 906 .border-border-default { 907 border-color: var(--color-border-default); 908 } 909 .border-border-strong { 910 border-color: var(--color-border-strong); 911 } 912 .border-border-subtle { 913 border-color: var(--color-border-subtle); 914 } 915 .border-gray-300 { 916 border-color: var(--color-gray-300); 917 } 918 .border-state-error { 919 border-color: var(--color-state-error); 920 } 921 .border-transparent { 922 border-color: transparent; 923 } 924 .border-t-accent { 925 border-top-color: var(--color-accent); 926 } 927 .border-r-accent { 928 border-right-color: var(--color-accent); 929 } 930 .border-b-accent { 931 border-bottom-color: var(--color-accent); 932 } 933 .border-b-transparent { 934 border-bottom-color: transparent; 935 } 936 .bg-\\[\\#f8f9fa\\] { 937 background-color: #f8f9fa; 938 } 939 .bg-accent { 940 background-color: var(--color-accent); 941 } 942 .bg-accent-light { 943 background-color: var(--color-accent-light); 944 } 945 .bg-accent\\/10 { 946 background-color: var(--color-accent); 947 @supports (color: color-mix(in lab, red, red)) { 948 background-color: color-mix(in oklab, var(--color-accent) 10%, transparent); 949 } 950 } 951 .bg-bg-app { 952 background-color: var(--color-bg-app); 953 } 954 .bg-bg-elevated { 955 background-color: var(--color-bg-elevated); 956 } 957 .bg-bg-input { 958 background-color: var(--color-bg-input); 959 } 960 .bg-bg-overlay { 961 background-color: var(--color-bg-overlay); 962 } 963 .bg-bg-surface { 964 background-color: var(--color-bg-surface); 965 } 966 .bg-bg-surface-alt { 967 background-color: var(--color-bg-surface-alt); 968 } 969 .bg-bg-surface\\/80 { 970 background-color: var(--color-bg-surface); 971 @supports (color: color-mix(in lab, red, red)) { 972 background-color: color-mix(in oklab, var(--color-bg-surface) 80%, transparent); 973 } 974 } 975 .bg-blue-500 { 976 background-color: var(--color-blue-500); 977 } 978 .bg-border-default { 979 background-color: var(--color-border-default); 980 } 981 .bg-border-subtle { 982 background-color: var(--color-border-subtle); 983 } 984 .bg-green-500 { 985 background-color: var(--color-green-500); 986 } 987 .bg-indigo-500 { 988 background-color: var(--color-indigo-500); 989 } 990 .bg-inherit { 991 background-color: inherit; 992 } 993 .bg-interactive-hover { 994 background-color: var(--color-interactive-hover); 995 } 996 .bg-interactive-selected { 997 background-color: var(--color-interactive-selected); 998 } 999 .bg-pink-500 { 1000 background-color: var(--color-pink-500); 1001 } 1002 .bg-purple-500 { 1003 background-color: var(--color-purple-500); 1004 } 1005 .bg-red-500 { 1006 background-color: var(--color-red-500); 1007 } 1008 .bg-state-error { 1009 background-color: var(--color-state-error); 1010 } 1011 .bg-state-error-light { 1012 background-color: var(--color-state-error-light); 1013 } 1014 .bg-state-info-light { 1015 background-color: var(--color-state-info-light); 1016 } 1017 .bg-state-success-light { 1018 background-color: var(--color-state-success-light); 1019 } 1020 .bg-state-warning-light { 1021 background-color: var(--color-state-warning-light); 1022 } 1023 .bg-teal-500 { 1024 background-color: var(--color-teal-500); 1025 } 1026 .bg-tooltip-bg { 1027 background-color: var(--color-tooltip-bg); 1028 } 1029 .bg-transparent { 1030 background-color: transparent; 1031 } 1032 .bg-white { 1033 background-color: var(--color-white); 1034 } 1035 .bg-yellow-500 { 1036 background-color: var(--color-yellow-500); 1037 } 1038 .p-0 { 1039 padding: calc(var(--spacing) * 0); 1040 } 1041 .p-0\\.5 { 1042 padding: calc(var(--spacing) * 0.5); 1043 } 1044 .p-1 { 1045 padding: calc(var(--spacing) * 1); 1046 } 1047 .p-1\\.5 { 1048 padding: calc(var(--spacing) * 1.5); 1049 } 1050 .p-2 { 1051 padding: calc(var(--spacing) * 2); 1052 } 1053 .p-3 { 1054 padding: calc(var(--spacing) * 3); 1055 } 1056 .p-4 { 1057 padding: calc(var(--spacing) * 4); 1058 } 1059 .p-5 { 1060 padding: calc(var(--spacing) * 5); 1061 } 1062 .p-6 { 1063 padding: calc(var(--spacing) * 6); 1064 } 1065 .p-8 { 1066 padding: calc(var(--spacing) * 8); 1067 } 1068 .p-\\[5px\\] { 1069 padding: 5px; 1070 } 1071 .px-1 { 1072 padding-inline: calc(var(--spacing) * 1); 1073 } 1074 .px-2 { 1075 padding-inline: calc(var(--spacing) * 2); 1076 } 1077 .px-3 { 1078 padding-inline: calc(var(--spacing) * 3); 1079 } 1080 .px-4 { 1081 padding-inline: calc(var(--spacing) * 4); 1082 } 1083 .px-5 { 1084 padding-inline: calc(var(--spacing) * 5); 1085 } 1086 .px-6 { 1087 padding-inline: calc(var(--spacing) * 6); 1088 } 1089 .py-1 { 1090 padding-block: calc(var(--spacing) * 1); 1091 } 1092 .py-1\\.5 { 1093 padding-block: calc(var(--spacing) * 1.5); 1094 } 1095 .py-2 { 1096 padding-block: calc(var(--spacing) * 2); 1097 } 1098 .py-2\\.5 { 1099 padding-block: calc(var(--spacing) * 2.5); 1100 } 1101 .py-3 { 1102 padding-block: calc(var(--spacing) * 3); 1103 } 1104 .py-4 { 1105 padding-block: calc(var(--spacing) * 4); 1106 } 1107 .pt-2 { 1108 padding-top: calc(var(--spacing) * 2); 1109 } 1110 .pt-3 { 1111 padding-top: calc(var(--spacing) * 3); 1112 } 1113 .pt-4 { 1114 padding-top: calc(var(--spacing) * 4); 1115 } 1116 .pr-2 { 1117 padding-right: calc(var(--spacing) * 2); 1118 } 1119 .pr-3 { 1120 padding-right: calc(var(--spacing) * 3); 1121 } 1122 .pr-6 { 1123 padding-right: calc(var(--spacing) * 6); 1124 } 1125 .pr-7 { 1126 padding-right: calc(var(--spacing) * 7); 1127 } 1128 .pr-9 { 1129 padding-right: calc(var(--spacing) * 9); 1130 } 1131 .pr-10 { 1132 padding-right: calc(var(--spacing) * 10); 1133 } 1134 .pb-3 { 1135 padding-bottom: calc(var(--spacing) * 3); 1136 } 1137 .pb-4 { 1138 padding-bottom: calc(var(--spacing) * 4); 1139 } 1140 .pl-2 { 1141 padding-left: calc(var(--spacing) * 2); 1142 } 1143 .pl-3 { 1144 padding-left: calc(var(--spacing) * 3); 1145 } 1146 .pl-4 { 1147 padding-left: calc(var(--spacing) * 4); 1148 } 1149 .pl-6 { 1150 padding-left: calc(var(--spacing) * 6); 1151 } 1152 .pl-8 { 1153 padding-left: calc(var(--spacing) * 8); 1154 } 1155 .text-center { 1156 text-align: center; 1157 } 1158 .text-left { 1159 text-align: left; 1160 } 1161 .text-right { 1162 text-align: right; 1163 } 1164 .text-base { 1165 font-size: var(--text-base);
1166 line-height: var(--tw-leading, var(--text-base--line-height)); 1167 } 1168 .text-lg { 1169 font-size: var(--text-lg); 1170 line-height: var(--tw-leading, var(--text-lg--line-height)); 1171 } 1172 .text-sm { 1173 font-size: var(--text-sm); 1174 line-height: var(--tw-leading, var(--text-sm--line-height)); 1175 } 1176 .text-xl { 1177 font-size: var(--text-xl); 1178 line-height: var(--tw-leading, var(--text-xl--line-height)); 1179 } 1180 .text-xs { 1181 font-size: var(--text-xs); 1182 line-height: var(--tw-leading, var(--text-xs--line-height)); 1183 } 1184 .text-\\[13px\\] { 1185 font-size: 13px; 1186 } 1187 .leading-none { 1188 --tw-leading: 1; 1189 line-height: 1; 1190 } 1191 .leading-relaxed { 1192 --tw-leading: var(--leading-relaxed); 1193 line-height: var(--leading-relaxed); 1194 } 1195 .font-bold { 1196 --tw-font-weight: var(--font-weight-bold); 1197 font-weight: var(--font-weight-bold); 1198 } 1199 .font-medium { 1200 --tw-font-weight: var(--font-weight-medium); 1201 font-weight: var(--font-weight-medium); 1202 } 1203 .font-semibold { 1204 --tw-font-weight: var(--font-weight-semibold); 1205 font-weight: var(--font-weight-semibold); 1206 } 1207 .whitespace-nowrap { 1208 white-space: nowrap; 1209 } 1210 .text-accent { 1211 color: var(--color-accent); 1212 } 1213 .text-accent-fg { 1214 color: var(--color-accent-fg); 1215 } 1216 .text-fg-disabled { 1217 color: var(--color-fg-disabled); 1218 } 1219 .text-fg-muted { 1220 color: var(--color-fg-muted); 1221 } 1222 .text-fg-on-accent { 1223 color: var(--color-fg-on-accent); 1224 } 1225 .text-fg-primary { 1226 color: var(--color-fg-primary); 1227 } 1228 .text-fg-secondary { 1229 color: var(--color-fg-secondary); 1230 } 1231 .text-red-600 { 1232 color: var(--color-red-600); 1233 } 1234 .text-state-error { 1235 color: var(--color-state-error); 1236 } 1237 .text-state-success { 1238 color: var(--color-state-success); 1239 } 1240 .text-state-warning { 1241 color: var(--color-state-warning); 1242 } 1243 .text-tooltip-fg { 1244 color: var(--color-tooltip-fg); 1245 } 1246 .text-white { 1247 color: var(--color-white); 1248 } 1249 .uppercase { 1250 text-transform: uppercase; 1251 } 1252 .italic { 1253 font-style: italic; 1254 } 1255 .underline { 1256 text-decoration-line: underline; 1257 } 1258 .placeholder-fg-muted { 1259 &::-moz-placeholder { 1260 color: var(--color-fg-muted); 1261 } 1262 &::placeholder { 1263 color: var(--color-fg-muted); 1264 } 1265 } 1266 .accent-accent { 1267 accent-color: var(--color-accent); 1268 } 1269 .opacity-0 { 1270 opacity: 0%; 1271 } 1272 .opacity-50 { 1273 opacity: 50%; 1274 } 1275 .opacity-100 { 1276 opacity: 100%; 1277 } 1278 .shadow {
1279 --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); 1280 box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); 1281 } 1282 .shadow-2xl { 1283 --tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / 0.25)); 1284 box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); 1285 } 1286 .shadow-lg { 1287 --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); 1288 box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); 1289 } 1290 .shadow-md { 1291 --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); 1292 box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
1292dow); 1293 } 1294 .shadow-sm { 1295 --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); 1296 box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); 1297 } 1298 .ring { 1299 --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); 1300 box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); 1301 } 1302 .ring-1 { 1303 --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); 1304 box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); 1305 } 1306 .ring-2 { 1307 --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); 1308 box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
1308dow); 1309 } 1310 .ring-accent { 1311 --tw-ring-color: var(--color-accent); 1312 } 1313 .ring-border-default { 1314 --tw-ring-color: var(--color-border-default); 1315 } 1316 .ring-interactive-focus-ring { 1317 --tw-ring-color: var(--color-interactive-focus-ring); 1318 } 1319 .outline { 1320 outline-style: var(--tw-outline-style); 1321 outline-width: 1px; 1322 } 1323 .outline-1 { 1324 outline-style: var(--tw-outline-style); 1325 outline-width: 1px; 1326 } 1327 .outline-2 { 1328 outline-style: var(--tw-outline-style); 1329 outline-width: 2px; 1330 } 1331 .-outline-offset-1 { 1332 outline-offset: calc(1px * -1); 1333 } 1334 .outline-offset-2 { 1335 outline-offset: 2px; 1336 } 1337 .outline-accent { 1338 outline-color: var(--color-accent); 1339 } 1340 .outline-border-default { 1341 outline-color: var(--color-border-default); 1342 } 1343 .backdrop-blur { 1344 --tw-backdrop-blur: blur(8px); 1345 backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,); 1346 } 1347 .transition { 1348 transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, backdrop-filter, display, content-visibility, overlay, pointer-events; 1349 transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); 1350 transition-duration: var(--tw-duration, var(--default-transition-duration)); 1351 } 1352 .transition-\\[height\\] { 1353 transition-property: height; 1354 transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); 1355 transition-duration: var(--tw-duration, var(--default-transition-duration)); 1356 } 1357 .transition-all { 1358 transition-property: all; 1359 transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); 1360 transition-duration: var(--tw-duration, var(--default-transition-duration)); 1361 } 1362 .transition-colors { 1363 transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to; 1364 transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); 1365 transition-duration: var(--tw-duration, var(--default-transition-duration)); 1366 } 1367 .transition-opacity { 1368 transition-property: opacity; 1369 transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); 1370 transition-duration: var(--tw-duration, var(--default-transition-duration)); 1371 } 1372 .transition-transform { 1373 transition-property: transform, translate, scale, rotate; 1374 transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); 1375 transition-duration: var(--tw-duration, var(--default-transition-duration)); 1376 } 1377 .duration-150 { 1378 --tw-duration: 150ms; 1379 transition-duration: 150ms; 1380 } 1381 .duration-200 { 1382 --tw-duration: 200ms; 1383 transition-duration: 200ms; 1384 } 1385 .duration-300 { 1386 --tw-duration: 300ms; 1387 transition-duration: 300ms; 1388 } 1389 .ease-in-out { 1390 --tw-ease: var(--ease-in-out); 1391 transition-timing-function: var(--ease-in-out); 1392 } 1393 .ease-out { 1394 --tw-ease: var(--ease-out); 1395 transition-timing-function: var(--ease-out); 1396 } 1397 .outline-none { 1398 --tw-outline-style: none; 1399 outline-style: none; 1400 } 1401 .select-none { 1402 -webkit-user-select: none; 1403 -moz-user-select: none; 1404 user-select: none; 1405 } 1406 .group-hover\\:opacity-100 { 1407 &:is(:where(.group):hover *) { 1408 @media (hover: hover) { 1409 opacity: 100%; 1410 } 1411 } 1412 } 1413 .peer-checked\\:opacity-100 { 1414 &:is(:where(.peer):checked ~ *) { 1415 opacity: 100%; 1416 } 1417 } 1418 .placeholder\\:text-fg-muted { 1419 &::-moz-placeholder { 1420 color: var(--color-fg-muted); 1421 } 1422 &::placeholder { 1423 color: var(--color-fg-muted); 1424 } 1425 } 1426 .first\\:mt-0 { 1427 &:first-child { 1428 margin-top: calc(var(--spacing) * 0); 1429 } 1430 } 1431 .checked\\:border-accent { 1432 &:checked { 1433 border-color: var(--color-accent); 1434 } 1435 } 1436 .checked\\:bg-accent { 1437 &:checked { 1438 background-color: var(--color-accent); 1439 } 1440 } 1441 .hover\\:border-accent { 1442 &:hover { 1443 @media (hover: hover) { 1444 border-color: var(--color-accent); 1445 } 1446 } 1447 } 1448 .hover\\:border-border-default { 1449 &:hover { 1450 @media (hover: hover) { 1451 border-color: var(--color-border-default); 1452 } 1453 } 1454 } 1455 .hover\\:border-state-error { 1456 &:hover { 1457 @media (hover: hover) { 1458 border-color: var(--color-state-error); 1459 } 1460 } 1461 } 1462 .hover\\:border-b-accent { 1463 &:hover { 1464 @media (hover: hover) { 1465 border-bottom-color: var(--color-accent); 1466 } 1467 } 1468 } 1469 .hover\\:border-b-fg-muted { 1470 &:hover { 1471 @media (hover: hover) { 1472 border-bottom-color: var(--color-fg-muted); 1473 } 1474 } 1475 } 1476 .hover\\:\\!bg-accent-hover { 1477 &:hover { 1478 @media (hover: hover) { 1479 background-color: var(--color-accent-hover) !important; 1480 } 1481 } 1482 } 1483 .hover\\:bg-accent { 1484 &:hover { 1485 @media (hover: hover) { 1486 background-color: var(--color-accent); 1487 } 1488 } 1489 } 1490 .hover\\:bg-accent-hover { 1491 &:hover { 1492 @media (hover: hover) { 1493 background-color: var(--color-accent-hover); 1494 } 1495 } 1496 } 1497 .hover\\:bg-bg-surface { 1498 &:hover { 1499 @media (hover: hover) { 1500 background-color: var(--color-bg-surface); 1501 } 1502 } 1503 } 1504 .hover\\:bg-border-default { 1505 &:hover { 1506 @media (hover: hover) { 1507 background-color: var(--color-border-default); 1508 } 1509 } 1510 } 1511 .hover\\:bg-interactive-hover { 1512 &:hover { 1513 @media (hover: hover) { 1514 background-color: var(--color-interactive-hover); 1515 } 1516 } 1517 } 1518 .hover\\:bg-state-error-light { 1519 &:hover { 1520 @media (hover: hover) { 1521 background-color: var(--color-state-error-light); 1522 } 1523 } 1524 } 1525 .hover\\:bg-state-error\\/90 { 1526 &:hover { 1527 @media (hover: hover) { 1528 background-color: var(--color-state-error); 1529 @supports (color: color-mix(in lab, red, red)) { 1530 background-color: color-mix(in oklab, var(--color-state-error) 90%, transparent); 1531 } 1532 } 1533 } 1534 } 1535 .hover\\:bg-transparent { 1536 &:hover { 1537 @media (hover: hover) { 1538 background-color: transparent; 1539 } 1540 } 1541 } 1542 .hover\\:text-accent-hover { 1543 &:hover { 1544 @media (hover: hover) { 1545 color: var(--color-accent-hover); 1546 } 1547 } 1548 } 1549 .hover\\:text-fg-on-accent { 1550 &:hover { 1551 @media (hover: hover) { 1552 color: var(--color-fg-on-accent); 1553 } 1554 } 1555 } 1556 .hover\\:text-fg-primary { 1557 &:hover { 1558 @media (hover: hover) { 1559 color: var(--color-fg-primary); 1560 } 1561 } 1562 } 1563 .hover\\:text-fg-secondary { 1564 &:hover { 1565 @media (hover: hover) { 1566 color: var(--color-fg-secondary); 1567 } 1568 } 1569 }
1570 .hover\\:shadow-md { 1571 &:hover { 1572 @media (hover: hover) { 1573 --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); 1574 box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); 1575 } 1576 } 1577 } 1578 .hover\\:ring { 1579 &:hover { 1580 @media (hover: hover) { 1581 --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); 1582 box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); 1583 } 1584 } 1585 } 1586 .hover\\:ring-0 { 1587 &:hover { 1588 @media (hover: hover) { 1589 --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); 1590 box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
1590dow); 1591 } 1592 } 1593 } 1594 .hover\\:ring-accent { 1595 &:hover { 1596 @media (hover: hover) { 1597 --tw-ring-color: var(--color-accent); 1598 } 1599 } 1600 } 1601 .hover\\:ring-transparent { 1602 &:hover { 1603 @media (hover: hover) { 1604 --tw-ring-color: transparent; 1605 } 1606 } 1607 } 1608 .focus\\:border-accent { 1609 &:focus { 1610 border-color: var(--color-accent); 1611 } 1612 } 1613 .focus\\:border-blue-500 { 1614 &:focus { 1615 border-color: var(--color-blue-500); 1616 } 1617 } 1618 .focus\\:border-state-error { 1619 &:focus { 1620 border-color: var(--color-state-error); 1621 } 1622 } 1623 .focus\\:border-transparent { 1624 &:focus { 1625 border-color: transparent; 1626 } 1627 } 1628 .focus\\:ring-1 { 1629 &:focus { 1630 --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); 1631 box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); 1632 } 1633 } 1634 .focus\\:ring-2 { 1635 &:focus { 1636 --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); 1637 box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
1637dow); 1638 } 1639 } 1640 .focus\\:ring-accent { 1641 &:focus { 1642 --tw-ring-color: var(--color-accent); 1643 } 1644 } 1645 .focus\\:ring-blue-500 { 1646 &:focus { 1647 --tw-ring-color: var(--color-blue-500); 1648 } 1649 } 1650 .focus\\:outline-none { 1651 &:focus { 1652 --tw-outline-style: none; 1653 outline-style: none; 1654 } 1655 } 1656 .active\\:cursor-grabbing { 1657 &:active { 1658 cursor: grabbing; 1659 } 1660 } 1661 .active\\:bg-interactive-active { 1662 &:active { 1663 background-color: var(--color-interactive-active); 1664 } 1665 } 1666 .disabled\\:cursor-not-allowed { 1667 &:disabled { 1668 cursor: not-allowed; 1669 } 1670 } 1671 .disabled\\:opacity-40 { 1672 &:disabled { 1673 opacity: 40%; 1674 } 1675 } 1676 .disabled\\:opacity-50 { 1677 &:disabled { 1678 opacity: 50%; 1679 } 1680 } 1681 .disabled\\:hover\\:bg-transparent { 1682 &:disabled { 1683 &:hover { 1684 @media (hover: hover) { 1685 background-color: transparent; 1686 } 1687 } 1688 } 1689 } 1690 .disabled\\:hover\\:ring-0 { 1691 &:disabled { 1692 &:hover { 1693 @media (hover: hover) { 1694 --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); 1695 box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-sha
1695dow); 1696 } 1697 } 1698 } 1699 } 1700 .sm\\:grid-cols-2 { 1701 @media (width >= 40rem) { 1702 grid-template-columns: repeat(2, minmax(0, 1fr)); 1703 } 1704 } 1705 .md\\:flex { 1706 @media (width >= 48rem) { 1707 display: flex; 1708 } 1709 } 1710 .md\\:h-auto { 1711 @media (width >= 48rem) { 1712 height: auto; 1713 } 1714 } 1715 .md\\:max-h-\\[80vh\\] { 1716 @media (width >= 48rem) { 1717 max-height: 80vh; 1718 } 1719 } 1720 .md\\:w-\\[28rem\\] { 1721 @media (width >= 48rem) { 1722 width: 28rem; 1723 } 1724 } 1725 .md\\:w-\\[32rem\\] { 1726 @media (width >= 48rem) { 1727 width: 32rem; 1728 } 1729 } 1730 .md\\:w-\\[36rem\\] { 1731 @media (width >= 48rem) { 1732 width: 36rem; 1733 } 1734 } 1735 .md\\:w-\\[48rem\\] { 1736 @media (width >= 48rem) { 1737 width: 48rem; 1738 } 1739 } 1740 .md\\:max-w-\\[90vw\\] { 1741 @media (width >= 48rem) { 1742 max-width: 90vw; 1743 } 1744 } 1745 .md\\:flex-none { 1746 @media (width >= 48rem) { 1747 flex: none; 1748 } 1749 } 1750 .md\\:items-center { 1751 @media (width >= 48rem) { 1752 align-items: center; 1753 } 1754 } 1755 .md\\:justify-center { 1756 @media (width >= 48rem) { 1757 justify-content: center; 1758 } 1759 } 1760 .md\\:rounded-lg { 1761 @media (width >= 48rem) { 1762 border-radius: var(--radius-lg); 1763 } 1764 } 1765 .md\\:border { 1766 @media (width >= 48rem) { 1767 border-style: var(--tw-border-style); 1768 border-width: 1px; 1769 } 1770 } 1771 .md\\:border-border-subtle { 1772 @media (width >= 48rem) { 1773 border-color: var(--color-border-subtle); 1774 } 1775 } 1776 .md\\:shadow-lg { 1777 @media (width >= 48rem) {
1778 --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); 1779 box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); 1780 } 1781 } 1782} 1783@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap'); 1784:host { 1785 --tw-translate-x: 0; 1786 --tw-translate-y: 0; 1787 --tw-translate-z: 0; 1788 --tw-rotate-x: rotateX(0); 1789 --tw-rotate-y: rotateY(0); 1790 --tw-rotate-z: rotateZ(0); 1791 --tw-skew-x: skewX(0); 1792 --tw-skew-y: skewY(0); 1793 --tw-border-style: solid; 1794 --tw-gradient-from: #0000; 1795 --tw-gradient-via: #0000; 1796 --tw-gradient-to: #0000; 1797 --tw-gradient-from-position: 0%; 1798 --tw-gradient-via-position: 50%; 1799 --tw-gradient-to-position: 100%; 1800 --tw-shadow: 0 0 #0000; 1801 --tw-inset-shadow: 0 0 #0000; 1802 --tw-ring-shadow: 0 0 #0000; 1803 --tw-inset-ring-shadow: 0 0 #0000; 1804 --tw-ring-offset-width: 0px; 1805 --tw-ring-offset-color: #fff; 1806 --tw-ring-offset-shadow: 0 0 #0000; 1807 --tw-outline-style: solid; 1808 display: flex; 1809 flex-direction: column; 1810 overflow: hidden; 1811 width: 100%; 1812 height: 100%; 1813 font-family: 'Open Sans', system-ui, sans-serif; 1814 color: var(--ep-foreground-primary); 1815 background-color: var(--ep-background-surface); 1816} 1817:host *::-webkit-scrollbar {
1818 width: 8px; 1819 height: 8px; 1820} 1821:host *::-webkit-scrollbar-track { 1822 background: var(--ep-scrollbar-track); 1823} 1824:host *::-webkit-scrollbar-thumb { 1825 background: var(--ep-scrollbar-thumb); 1826 border-radius: 4px; 1827} 1828:host *::-webkit-scrollbar-thumb:hover { 1829 background: var(--ep-scrollbar-thumb-hover); 1830} 1831@property --tw-translate-x { 1832 syntax: "*"; 1833 inherits: false; 1834 initial-value: 0; 1835} 1836@property --tw-translate-y { 1837 syntax: "*"; 1838 inherits: false; 1839 initial-value: 0; 1840} 1841@property --tw-translate-z { 1842 syntax: "*"; 1843 inherits: false; 1844 initial-value: 0; 1845} 1846@property --tw-scale-x { 1847 syntax: "*"; 1848 inherits: false; 1849 initial-value: 1; 1850} 1851@property --tw-scale-y { 1852 syntax: "*"; 1853 inherits: false; 1854 initial-value: 1; 1855} 1856@property --tw-scale-z { 1857 syntax: "*"; 1858 inherits: false; 1859 initial-value: 1; 1860} 1861@property --tw-rotate-x { 1862 syntax: "*"; 1863 inherits: false; 1864} 1865@property --tw-rotate-y { 1866 syntax: "*"; 1867 inherits: false; 1868} 1869@property --tw-rotate-z { 1870 syntax: "*"; 1871 inherits: false; 1872} 1873@property --tw-skew-x { 1874 syntax: "*"; 1875 inherits: false; 1876} 1877@property --tw-skew-y { 1878 syntax: "*"; 1879 inherits: false; 1880} 1881@property --tw-space-y-reverse { 1882 syntax: "*"; 1883 inherits: false; 1884 initial-value: 0; 1885} 1886@property --tw-space-x-reverse { 1887 syntax: "*"; 1888 inherits: false; 1889 initial-value: 0; 1890} 1891@property --tw-divide-y-reverse { 1892 syntax: "*"; 1893 inherits: false; 1894 initial-value: 0; 1895} 1896@property --tw-border-style { 1897 syntax: "*"; 1898 inherits: false; 1899 initial-value: solid; 1900} 1901@property --tw-leading { 1902 syntax: "*"; 1903 inherits: false; 1904} 1905@property --tw-font-weight { 1906 syntax: "*"; 1907 inherits: false; 1908} 1909@property --tw-shadow { 1910 syntax: "*"; 1911 inherits: false; 1912 initial-value: 0 0 #0000; 1913} 1914@property --tw-shadow-color { 1915 syntax: "*"; 1916 inherits: false; 1917} 1918@property --tw-shadow-alpha { 1919 syntax: "<percentage>"; 1920 inherits: false; 1921 initial-value: 100%; 1922} 1923@property --tw-inset-shadow { 1924 syntax: "*"; 1925 inherits: false; 1926 initial-value: 0 0 #0000; 1927} 1928@property --tw-inset-shadow-color { 1929 syntax: "*"; 1930 inherits: false; 1931} 1932@property --tw-inset-shadow-alpha { 1933 syntax: "<percentage>"; 1934 inherits: false; 1935 initial-value: 100%; 1936} 1937@property --tw-ring-color { 1938 syntax: "*"; 1939 inherits: false; 1940} 1941@property --tw-ring-shadow { 1942 syntax: "*"; 1943 inherits: false; 1944 initial-value: 0 0 #0000; 1945} 1946@property --tw-inset-ring-color { 1947 syntax: "*"; 1948 inherits: false; 1949} 1950@property --tw-inset-ring-shadow { 1951 syntax: "*"; 1952 inherits: false; 1953 initial-value: 0 0 #0000; 1954} 1955@property --tw-ring-inset { 1956 syntax: "*"; 1957 inherits: false; 1958} 1959@property --tw-ring-offset-width { 1960 syntax: "<length>"; 1961 inherits: false; 1962 initial-value: 0px; 1963} 1964@property --tw-ring-offset-color { 1965 syntax: "*"; 1966 inherits: false; 1967 initial-value: #fff; 1968} 1969@property --tw-ring-offset-shadow { 1970 syntax: "*"; 1971 inherits: false; 1972 initial-value: 0 0 #0000; 1973} 1974@property --tw-outline-style { 1975 syntax: "*"; 1976 inherits: false; 1977 initial-value: solid; 1978} 1979@property --tw-backdrop-blur { 1980 syntax: "*"; 1981 inherits: false; 1982} 1983@property --tw-backdrop-brightness { 1984 syntax: "*"; 1985 inherits: false; 1986} 1987@property --tw-backdrop-contrast { 1988 syntax: "*"; 1989 inherits: false; 1990} 1991@property --tw-backdrop-grayscale { 1992 syntax: "*"; 1993 inherits: false; 1994} 1995@property --tw-backdrop-hue-rotate { 1996 syntax: "*"; 1997 inherits: false; 1998} 1999@property --tw-backdrop-invert { 2000 syntax: "*"; 2001 inherits: false; 2002} 2003@property --tw-backdrop-opacity { 2004 syntax: "*"; 2005 inherits: false; 2006} 2007@property --tw-backdrop-saturate { 2008 syntax: "*"; 2009 inherits: false; 2010} 2011@property --tw-backdrop-sepia { 2012 syntax: "*"; 2013 inherits: false; 2014} 2015@property --tw-duration { 2016 syntax: "*"; 2017 inherits: false; 2018} 2019@property --tw-ease { 2020 syntax: "*"; 2021 inherits: false; 2022} 2023@keyframes spin { 2024 to { 2025 transform: rotate(360deg); 2026 } 2027} 2028@keyframes pulse { 2029 50% { 2030 opacity: 0.5; 2031 } 2032} 2033@layer properties { 2034 @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) { 2035 *, ::before, ::after, ::backdrop { 2036 --tw-translate-x: 0; 2037 --tw-translate-y: 0; 2038 --tw-translate-z: 0; 2039 --tw-scale-x: 1; 2040 --tw-scale-y: 1; 2041 --tw-scale-z: 1; 2042 --tw-rotate-x: initial; 2043 --tw-rotate-y: initial; 2044 --tw-rotate-z: initial; 2045 --tw-skew-x: initial; 2046 --tw-skew-y: initial; 2047 --tw-space-y-reverse: 0; 2048 --tw-space-x-reverse: 0; 2049 --tw-divide-y-reverse: 0; 2050 --tw-border-style: solid; 2051 --tw-leading: initial; 2052 --tw-font-weight: initial; 2053 --tw-shadow: 0 0 #0000; 2054 --tw-shadow-color: initial; 2055 --tw-shadow-alpha: 100%; 2056 --tw-inset-shadow: 0 0 #0000; 2057 --tw-inset-shadow-color: initial; 2058 --tw-inset-shadow-alpha: 100%; 2059 --tw-ring-color: initial; 2060 --tw-ring-shadow: 0 0 #0000; 2061 --tw-inset-ring-color: initial; 2062 --tw-inset-ring-shadow: 0 0 #0000; 2063 --tw-ring-inset: initial; 2064 --tw-ring-offset-width: 0px; 2065 --tw-ring-offset-color: #fff; 2066 --tw-ring-offset-shadow: 0 0 #0000; 2067 --tw-outline-style: solid; 2068 --tw-backdrop-blur: initial; 2069 --tw-backdrop-brightness: initial; 2070 --tw-backdrop-contrast: initial; 2071 --tw-backdrop-grayscale: initial; 2072 --tw-backdrop-hue-rotate: initial; 2073 --tw-backdrop-invert: initial; 2074 --tw-backdrop-opacity: initial; 2075 --tw-backdrop-saturate: initial; 2076 --tw-backdrop-sepia: initial; 2077 --tw-duration: initial; 2078 --tw-ease: initial; 2079 } 2080 } 2081} 2082`,X2=0;function C(e,t,n,o,i,r){t||(t={});var a,s,l=t;if("ref"in l)for(s in l={},t)s=="ref"?a=t[s]:l[s]=t[s];var c={type:e,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--X2,__i:-1,__u:0,__source:i,__self:r};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return De.vnode&&De.vnode(c),c}var Wr=(e=>(e[e.Degree0=0]="Degree0",e[e.Degree90=1]="Degree90",e[e.Degree180=2]="Degree180",e[e.Degree270=3]="Degree270",e))(Wr||{});function Y2(e){return{x:Math.floor(e.x),y:Math.floor(e.y)}}function Q2(e){return{width:Math.ceil(e.width),height:Math.ceil(e.height)}}function ax(e){return{origin:Y2(e.origin),size:Q2(e.size)}}function Va(e){const{width:t,height:n}=e;return{width:n,height:t}}function kr(e,t,n){return{width:(e=t%2==0?e:Va(e)).width*n,height:e.height*n}}function sx(e){const t=[e.p1.x,e.p2.x,e.p3.x,e.p4.x],n=[e.p1.y,e.p2.y,e.p3.y,e.p4.y];return{origin:{x:Math.min(...t),y:Math.min(...n)}
vendor: 5,461 bytes, line 2082
2082,size:{width:Math.max(...t)-Math.min(...t),height:Math.max(...n)-Math.min(...n)}}}function lx(e){return{p1:{x:e.origin.x,y:e.origin.y},p2:{x:e.origin.x+e.size.width,y:e.origin.y},p3:{x:e.origin.x+e.size.width,y:e.origin.y+e.size.height},p4:{x:e.origin.x,y:e.origin.y+e.size.height}}}function rh(e,t,n){let o=t.x,i=t.y;switch(n){case 0:o=t.x,i=t.y;break;case 1:o=e.height-t.y,i=t.x;break;case 2:o=e.width-t.x,i=e.height-t.y;break;case 3:o=t.y,i=e.width-t.x}return{x:o,y:i}}function pr(e,t){return{x:e.x*t,y:e.y*t}}function rn(e){if(e.length===0)return{origin:{x:0,y:0},size:{width:0,height:0}};const t=e.map(r=>r.x),n=e.map(r=>r.y),o=Math.min(...t),i=Math.min(...n);return{origin:{x:o,y:i},size:{width:Math.max(...t)-o,height:Math.max(...n)-i}}}function vn(e,t){return{origin:{x:e.origin.x-t,y:e.origin.y-t},size:{width:e.size.width+2*t,height:e.size.height+2*t}}}function Ls(e,t,n){let o=t.origin.x,i=t.origin.y,r=t.size;switch(n){case 0:break;case 1:o=e.height-t.origin.y-t.size.height,i=t.origin.x,r=Va(t.size);break;case 2:o=e.width-t.origin.x-t.size.width,i=e.height-t.origin.y-t.size.height;break;case 3:o=t.origin.y,i=e.width-t.origin.x-t.size.width,r=Va(t.size)}return{origin:{x:o,y:i},size:{width:r.width,height:r.height}}}function ah(e,t){return{origin:{x:e.origin.x*t,y:e.origin.y*t},size:{width:e.size.width*t,height:e.size.height*t}}}function J2(e,t,n,o){return ah(Ls(e,t,n),o)}const ey={origin:{x:0,y:0},size:{width:0,height:0}};function Os(e){if(e.length===0)return null;let t=e[0].origin.x,n=e[0].origin.y,o=e[0].origin.x+e[0].size.width,i=e[0].origin.y+e[0].size.height;for(const r of e)t=Math.min(t,r.origin.x),n=Math.min(n,r.origin.y),o=Math.max(o,r.origin.x+r.size.width),i=Math.max(i,r.origin.y+r.size.height);return{origin:{x:t,y:n},size:{width:o-t,height:i-n}}}function qi(e){const t=e%360;return t<0?t+360:t}function wo(e){return{x:e.origin.x+e.size.width/2,y:e.origin.y+e.size.height/2}}function xo(e,t,n){const o=n*Math.PI/180,i=Math.cos(o),r=Math.sin(o),a=e.x-t.x,s=e.y-t.y;return{x:t.x+a*i-s*r,y:t.y+a*r+s*i}}function sh(e,t,n){return e.map(o=>xo(o,t,n))}function Xn(e,t,n){return rn(sh([{x:e.origin.x,y:e.origin.y},{x:e.origin.x+e.size.width,y:e.origin.y},{x:e.origin.x+e.size.width,y:e.origin.y+e.size.height},{x:e.origin.x,y:e.origin.y+e.size.height}],n,t))}function Ns(e,t){return Xn(e,t,wo(e))}function lh(e,t,n){const o=n*Math.PI/180,i=Math.cos(o),r=Math.sin(o),a=1-i,s=r,l=-r,c=1-i,d=a*c-s*l,u=wo(e);if(Math.abs(d)<1e-10)return u;const m=wo(t),g=m.x-(i*u.x-r*u.y),p=m.y-(r*u.x+i*u.y);return{x:(c*g-s*p)/d,y:(-l*g+a*p)/d}}function cx(e,t,n,o){const i=e.origin.x,r=e.origin.y,a=e.size.width,s=e.size.height,l=n/a,c=o/s,d=n/s,u=o/a;switch(t){case 0:return{a:l,b:0,c:0,d:c,e:-l*i,f:-c*r};case 3:return{a:0,b:-u,c:d,d:0,e:-d*r,f:u*(i+a)};case 2:return{a:-l,b:0,c:0,d:-c,e:l*(i+a),f:c*(r+s)};case 1:return{a:0,b:u,c:-d,d:0,e:d*(r+s),f:-u*i}}}function ql(e,t){const n=Math.min(t.width/e.width,t.height/e.height,1);return{width:e.width*n,height:e.height*n}}class ch{isEnabled(){return!1}debug(){}info(){}warn(){}error(){}perf(){}}class dh{isEnabled(){return!0}debug(t,n,...o){console.debug(`${t}.${n}`,...o)}info(t,n,...o){console.info(`${t}.${n}`,...o)}warn(t,n,...o){console.warn(`${t}.${n}`,...o)}error(t,n,...o){console.error(`${t}.${n}`,...o)}perf(t,n,o,i,...r){console.info(`${t}.${n}.${o}.${i}`,...r)}}class ty{constructor(t,n){this.logger=t,this.level=n}isEnabled(t){return this.level<={debug:0,info:1,warn:2,error:3}[t]}debug(t,n,...o){this.level<=0&&this.logger.debug(t,n,...o)}info(t,n,...o){this.level<=1&&this.logger.info(t,n,...o)}warn(t,n,...o){this.level<=2&&this.logger.warn(t,n,...o)}error(t,n,...o){this.level<=3&&this.logger.error(t,n,...o)}perf(t,n,o,i,...r){this.logger.perf(t,n,o,i,...r)}}class uh{constructor(){this.marks=new Map}isEnabled(){return!1}debug(t,n,...o){}info(t,n,...o){}warn(t,n,...o){}error(t,n,...o){}perf(t,n,o,i,r,...a){const s=`${t}.${n}.${o}.${i}.${r}`;switch(i){case"Begin":globalThis.performance.mark(s,{detail:a}),this.marks.set(`${t}.${n}.${o}.${r}`,Date.now());break;case"End":globalThis.performance.mark(s,{detail:a});const l=`${t}.${n}.${o}.Measure.${r}`,c=`${t}.${n}.${o}.Begin.${r}`;globalThis.performance.measure(l,c,s);const d=this.marks.get(`${t}.${n}.${o}.${r}`);if(d){const u=Date.now()-d;console.info(`â±ï¸ ${t}.${n}.${o}.${r}: ${u}ms`),this.marks.delete(`${t}.${n}.${o}.${r}`)}}}}class hh{constructor(t){this.loggers=t}isEnabled(t){return this.loggers.some(n=>n.isEnabled(t))}debug(t,n,...o){for(const i of this.loggers)i.debug(t,n,...o)}info(t,n,...o){for(const i of this.loggers)i.info(t,n,...o)}warn(t,n,...o){for(const i of this.loggers)i.warn(t,n,...o)}error(t,n,...o){for(const i of this.loggers)i.error(t,n,...o)}perf(t,n,o,i,...r){for(const a of this.loggers)a.perf(t,n,o,i,...r)}}var Gn=(e=>(e[e.Pending=0]="Pending",e[e.Resolved=1]="Resolved",e[e.Rejected=2]="Rejected",e[e.Aborted=3]="Aborted",e))(Gn||{});class Oo extends Error{constructor(t){super(`Task aborted: ${JSON.stringify(t)}`),this.name="TaskAbortedError",this.reason=t}}class gr extends Error{constructor(t){super(`Task rejected: ${JSON.stringify(t)}`),this.name="TaskRejectedError",this.reason=t}}class de{constructor(){this.state={stage:0},this.resolvedCallbacks=[],this.rejectedCallbacks=[],this._promise=null,this.progressCbs=[]}toPromise(){return this._promise||(this._promise=new Promise((t,n)=>{this.wait(o=>t(o),o=>{o.type==="abort"?n(new Oo(o.reason)):n(new gr(o.reason))})})),this._promise}
2082wait(t,n){switch(this.state.stage){case 0:this.resolvedCallbacks.push(t),this.rejectedCallbacks.push(n);break;case 1:t(this.state.result);break;case 2:n({type:"reject",reason:this.state.reason});break;case 3:n({type:"abort",reason:this.state.reason})}}resolve(t){if(this.state.stage===0){this.state={stage:1,result:t};for(const n of this.resolvedCallbacks)try{n(t)}catch{}this.resolvedCallbacks=[],this.rejectedCallbacks=[]}}reject(t){if(this.state.stage===0){this.state={stage:2,reason:t};for(const n of this.rejectedCallbacks)try{n({type:"reject",reason:t})}catch{}this.resolvedCallbacks=[],this.rejectedCallbacks=[]}}abort(t){if(this.state.stage===0){this.state={stage:3,reason:t};for(const n of this.rejectedCallbacks)try{n({type:"abort",reason:t})}catch{}this.resolvedCallbacks=[],this.rejectedCallbacks=[]}}fail(t){t.type==="abort"?this.abort(t.reason):this.reject(t.reason)}onProgress(t){this.progressCbs.push(t)}progress(t){for(const n of this.progressCbs)n(t)}static all(t){const n=new de;if(t.length===0)return n.resolve([]),n;const o=new Array(t.length);let i=0,r=!1;return t.forEach((a,s)=>{a.wait(l=>{r||(o[s]=l,i++,i===t.length&&(r=!0,n.resolve(o)))},l=>{r||(r=!0,l.type==="abort"?n.abort(l.reason):n.reject(l.reason))})}),n}static allSettled(t){const n=new de;if(t.length===0)return n.resolve([]),n;const o=new Array(t.length);let i=0;return t.forEach((r,a)=>{r.wait(s=>{o[a]={status:"resolved",value:s},i++,i===t.length&&n.resolve(o)},s=>{o[a]={status:s.type==="abort"?"aborted":"rejected",reason:s.reason},i++,i===t.length&&n.resolve(o)})}),n}static race(t){const n=new de;if(t.length===0)return n.reject("No tasks provided"),n;let o=!1;return t.forEach(i=>{i.wait(r=>{o||(o=!0,n.resolve(r))},r=>{o||(o=!0,r.type==="abort"?n.abort(r.reason):n.reject(r.reason))})}),n}static withProgress(t,n){const o=de.all(t);if(n){let i=0;t.forEach(r=>{r.wait(()=>{i++,n(i,t.length)},()=>{i++,n(i,t.length)})})}return o}}const ny=Object.freeze(["Â","â","â ","\uFEFF","￾","ï¿¿"]),oy=new RegExp(`[${ny.join("")}]`,"g");function dx(e){return e.replace(oy,"")}var Gr=(e=>(e[e.Unknown=0]="Unknown",e[e.XYZ=1]="XYZ",e[e.FitPage=2]="FitPage",e[e.FitHorizontal=3]="FitHorizontal",e[e.FitVertical=4]="FitVertical",e[e.FitRectangle=5]="FitRectangle",e[e.FitBoundingBox=6]="FitBoundingBox",e[e.FitBoundingBoxHorizontal=7]="FitBoundingBoxHorizontal",e[e.FitBoundingBoxVertical=8]="FitBoundingBoxVertical",e))(Gr||{}),iy=(e=>(e[e.NotSet=0]="NotSet",e[e.True=1]="True",e[e.False=2]="False",e[e.Unknown=3]="Unknown",e))(iy||{}),Ge=(e=>(e[e.Unknown=-1]="Unknown",e[e.Courier=0]="Courier",e[e.Courier_Bold=1]="Courier_Bold",e[e.Courier_BoldOblique=2]="Courier_BoldOblique",e[e.Courier_Oblique=3]="Courier_Oblique",e[e.Helvetica=4]="Helvetica",e[e.Helvetica_Bold=5]="Helvetica_Bold",e[e.Helvetica_BoldOblique=6]="Helvetica_BoldOblique",e[e.Helvetica_Oblique=7]="Helvetica_Oblique",e[e.Times_Roman=8]="Times_Roman",e[e.Times_Bold=9]="Times_Bold",e[e.Times_BoldItalic=10]="Times_BoldItalic",e[e.Times_Italic=11]="Times_Italic",e[e.Symbol=12]="Symbol",e[e.ZapfDingbats=13]="ZapfDingbats",e))(Ge||{}),ut=(e=>(e[e.Left=0]="Left",e[e.Center=1]="Center",e[e.Right=2]="Right",e))(ut||{}),Bt=(e=>(e[e.Top=0]="Top",e[e.Middle=1]="Middle",e[e.Bottom=2]="Bottom",e))(Bt||{}),xe=(e=>(e[e.Normal=0]="Normal",e[e.Multiply=1]="Multiply",e[e.Screen=2]="Screen",e[e.Overlay=3]="Overlay",e[e.Darken=4]="Darken",e[e.Lighten=5]="Lighten",e[e.ColorDodge=6]="ColorDodge",e[e.ColorBurn=7]="ColorBurn",e[e.HardLight=8]="HardLight",e[e.SoftLight=9]="SoftLight",e[e.Difference=10]="Difference",e[e.Exclusion=11]="Exclusion",e[e.Hue=12]="Hue",e[e.Saturation=13]="Saturation",e[e.Color=14]="Color",e[e.Luminosity=15]="Luminosity",e))(xe||{}),ry=(e=>(e[e.Contain=0]="Contain",e[e.Cover=1]="Cover",e[e.Stretch=2]="Stretch",e))(ry||{}),Kn=(e=>(e[e.Unsupported=0]="Unsupported",e[e.Goto=1]="Goto",e[e.RemoteGoto=2]="RemoteGoto",e[e.URI=3]="URI",e[e.LaunchAppOrOpenFile=4]="LaunchAppOrOpenFile",e))(Kn||{});const ux=1,hx=2,mx=4;var z=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXT=1]="TEXT",e[e.LINK=2]="LINK",e[e.FREETEXT=3]="FREETEXT",e[e.LINE=4]="LINE",e[e.SQUARE=5]="SQUARE",e[e.CIRCLE=6]="CIRCLE",e[e.POLYGON=7]="POLYGON",e[e.POLYLINE=8]="POLYLINE",e[e.HIGHLIGHT=9]="HIGHLIGHT",e[e.UNDERLINE=10]="UNDERLINE",e[e.SQUIGGLY=11]="SQUIGGLY",e[e.STRIKEOUT=12]="STRIKEOUT",e[e.STAMP=13]="STAMP",e[e.CARET=14]="CARET",e[e.INK=15]="INK",e[e.POPUP=16]="POPUP",e[e.FILEATTACHMENT=17]="FILEATTACHMENT",e[e.SOUND=18]="SOUND",e[e.MOVIE=19]="MOVIE",e[e.WIDGET=20]="WIDGET",e[e.SCREEN=21]="SCREEN",e[e.PRINTERMARK=22]="PRINTERMARK",e[e.TRAPNET=23]="TRAPNET",e[e.WATERMARK=24]="WATERMARK",e[e.THREED=25]="THREED",e[e.RICHMEDIA=26]="RICHMEDIA",e[e.XFAWIDGET=27]="XFAWIDGET",e[e.REDACT=28]="REDACT",e))(z||{}),ay=(e=>(e[e.Normal=0]="Normal",e[e.Rollover=1]="Rollover",e[e.Down=2]="Down",e))(ay||{}),Ne=(e=>(e[e.Unknown=-1]="Unknown",e[e.Comment=0]="Comment",e[e.Key=1]="Key",e[e.Note=2]="Note",e[e.Help=3]="Help",e[e.NewParagraph=4]="NewParagraph",e[e.Paragraph=5]="Paragraph",e[e.Insert=6]="Insert",e[e.Graph=7]="Graph",e[e.PushPin=8]="PushPin",e[e.Paperclip=9]="Paperclip",e[e.Tag=10]="Tag",e[e.Speaker=11]="Speaker",e[e.Mic=12]="Mic",e[e.Approved=13]="Approved",e[e.Experimental=14]="Experimental",e[e.NotApproved=1
20825]="NotApproved",e[e.AsIs=16]="AsIs",e[e.Expired=17]="Expired",e[e.NotForPublicRelease=18]="NotForPublicRelease",e[e.Confidential=19]="Confidential",e[e.Final=20]="Final",e[e.Sold=21]="Sold",e[e.Departmental=22]="Departmental",e[e.ForComment=23]="ForComment",e[e.TopSecret=24]="TopSecret",e[e.Draft=25]="Draft",e[e.ForPublicRelease=26]="ForPublicRelease",e[e.Completed=27]="Completed",e[e.Void=28]="Void",e[e.PreliminaryResults=29]="PreliminaryResults",e[e.InformationOnly=30]="InformationOnly",e[e.Rejected=31]="Rejected",e[e.Witness=32]="Witness",e[e.InitialHere=33]="InitialHere",e[e.SignHere=34]="SignHere",e[e.Accepted=35]="Accepted",e[e.Custom=36]="Custom",e[e.Image=37]="Image",e))(Ne||{}),Ie=(e=>(e[e.None=0]="None",e[e.Square=1]="Square",e[e.Circle=2]="Circle",e[e.Diamond=3]="Diamond",e[e.OpenArrow=4]="OpenArrow",e[e.ClosedArrow=5]="ClosedArrow",e[e.Butt=6]="Butt",e[e.ROpenArrow=7]="ROpenArrow",e[e.RClosedArrow=8]="RClosedArrow",e[e.Slash=9]="Slash",e[e.Unknown=10]="Unknown",e))(Ie||{}),ln=(e=>(e[e.Unknown=0]="Unknown",e[e.Reply=1]="Reply",e[e.Group=2]="Group",e))(ln||{}),ye=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.PUSHBUTTON=1]="PUSHBUTTON",e[e.CHECKBOX=2]="CHECKBOX",e[e.RADIOBUTTON=3]="RADIOBUTTON",e[e.COMBOBOX=4]="COMBOBOX",e[e.LISTBOX=5]="LISTBOX",e[e.TEXTFIELD=6]="TEXTFIELD",e[e.SIGNATURE=7]="SIGNATURE",e[e.XFA=8]="XFA",e[e.XFA_CHECKBOX=9]="XFA_CHECKBOX",e[e.XFA_COMBOBOX=10]="XFA_COMBOBOX",e[e.XFA_IMAGEFIELD=11]="XFA_IMAGEFIELD",e[e.XFA_LISTBOX=12]="XFA_LISTBOX",e[e.XFA_PUSHBUTTON=13]="XFA_PUSHBUTTON",e[e.XFA_SIGNATURE=14]="XFA_SIGNATURE",e[e.XFA_TEXTFIELD=15]="XFA_TEXTFIELD",e))(ye||{}),sy=(e=>(e[e.Color=0]="Color",e[e.InteriorColor=1]="InteriorColor",e[e.OverlayColor=2]="OverlayColor",e))(sy||{}),Te=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.SOLID=1]="SOLID",e[e.DASHED=2]="DASHED",e[e.BEVELED=3]="BEVELED",e[e.INSET=4]="INSET",e[e.UNDERLINE=5]="UNDERLINE",e[e.CLOUDY=6]="CLOUDY",e))(Te||{}),be=(e=>(e[e.NONE=0]="NONE",e[e.READONLY=1]="READONLY",e[e.REQUIRED=2]="REQUIRED",e[e.NOEXPORT=4]="NOEXPORT",e[e.TEXT_MULTIPLINE=4096]="TEXT_MULTIPLINE",e[e.TEXT_PASSWORD=8192]="TEXT_PASSWORD",e[e.TEXT_FILESELECT=1048576]="TEXT_FILESELECT",e[e.TEXT_DONOTSPELLCHECK=4194304]="TEXT_DONOTSPELLCHECK",e[e.TEXT_DONOTSCROLL=8388608]="TEXT_DONOTSCROLL",e[e.TEXT_COMB=16777216]="TEXT_COMB",e[e.TEXT_RICHTEXT=33554432]="TEXT_RICHTEXT",e[e.BUTTON_NOTOGGLETOOFF=16384]="BUTTON_NOTOGGLETOOFF",e[e.BUTTON_RADIO=32768]="BUTTON_RADIO",e[e.BUTTON_PUSHBUTTON=65536]="BUTTON_PUSHBUTTON",e[e.BUTTON_RADIOSINUNISON=33554432]="BUTTON_RADIOSINUNISON",e[e.CHOICE_COMBO=131072]="CHOICE_COMBO",e[e.CHOICE_EDIT=262144]="CHOICE_EDIT",e[e.CHOICE_SORT=524288]="CHOICE_SORT",e[e.CHOICE_MULTL_SELECT=2097152]="CHOICE_MULTL_SELECT",e[e.CHOICE_DONOTSPELLCHECK=4194304]="CHOICE_DONOTSPELLCHECK",e[e.CHOICE_COMMITONSELCHANGE=67108864]="CHOICE_COMMITONSELCHANGE",e))(be||{}),ly=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXT=1]="TEXT",e[e.PATH=2]="PATH",e[e.IMAGE=3]="IMAGE",e[e.SHADING=4]="SHADING",e[e.FORM=5]="FORM",e))(ly||{});const Ka=Object.freeze({1:"invisible",2:"hidden",4:"print",8:"noZoom",16:"noRotate",32:"noView",64:"readOnly",128:"locked",256:"toggleNoView"}),cy=Object.entries(Ka).reduce((e,[t,n])=>(e[n]=Number(t),e),{});function px(e){return Object.keys(Ka).filter(t=>(e&t)!==0).map(t=>Ka[t])}function gx(e){return e.reduce((t,n)=>t|cy[n],0)}function ho(e){return e.exportValue!=null&&e.field.value===e.exportValue}var dy=(e=>(e[e.KEY_STROKE=12]="KEY_STROKE",e[e.FORMAT=13]="FORMAT",e[e.VALIDATE=14]="VALIDATE",e[e.CALCULATE=15]="CALCULATE",e))(dy||{}),uy=(e=>(e.Keystroke="keystroke",e.Format="format",e.Validate="validate",e.Calculate="calculate",e))(uy||{}),hy=(e=>(e.DocumentNamed="document_named",e.WidgetKeystroke="widget_keystroke",e.WidgetFormat="widget_format",e.WidgetValidate="widget_validate",e.WidgetCalculate="widget_calculate",e))(hy||{}),my=(e=>(e[e.Create=0]="Create",e[e.Read=1]="Read",e[e.Update=2]="Update",e[e.Delete=3]="Delete",e))(my||{}),di=(e=>(e[e.None=0]="None",e[e.MatchCase=1]="MatchCase",e[e.MatchWholeWord=2]="MatchWholeWord",e[e.MatchConsecutive=4]="MatchConsecutive",e))(di||{}),j=(e=>(e[e.Print=4]="Print",e[e.ModifyContents=8]="ModifyContents",e[e.CopyContents=16]="CopyContents",e[e.ModifyAnnotations=32]="ModifyAnnotations",e[e.FillForms=256]="FillForms",e[e.ExtractForAccessibility=512]="ExtractForAccessibility",e[e.AssembleDocument=1024]="AssembleDocument",e[e.PrintHighQuality=2048]="PrintHighQuality",e[e.AllowAll=3900]="AllowAll",e))(j||{});
vendor: 4,747 bytes, line 2082
2082class py extends Error{constructor(t,n){const o=t.map(i=>j[i]).join(", ");super(`Permission denied. Required: ${o}`),this.requiredFlags=t,this.currentPermissions=n,this.name="PermissionDeniedError"}}var gy=(e=>(e[e.Display=0]="Display",e[e.Print=1]="Print",e))(gy||{}),Z=(e=>(e[e.Ok=0]="Ok",e[e.Unknown=1]="Unknown",e[e.NotFound=2]="NotFound",e[e.WrongFormat=3]="WrongFormat",e[e.Password=4]="Password",e[e.Security=5]="Security",e[e.PageError=6]="PageError",e[e.XFALoad=7]="XFALoad",e[e.XFALayout=8]="XFALayout",e[e.Cancelled=9]="Cancelled",e[e.Initialization=10]="Initialization",e[e.NotReady=11]="NotReady",e[e.NotSupport=12]="NotSupport",e[e.LoadDoc=13]="LoadDoc",e[e.DocNotOpen=14]="DocNotOpen",e[e.CantCloseDoc=15]="CantCloseDoc",e[e.CantCreateNewDoc=16]="CantCreateNewDoc",e[e.CantImportPages=17]="CantImportPages",e[e.CantCreateAnnot=18]="CantCreateAnnot",e[e.CantSetAnnotRect=19]="CantSetAnnotRect",e[e.CantSetAnnotContent=20]="CantSetAnnotContent",e[e.CantRemoveInkList=21]="CantRemoveInkList",e[e.CantAddInkStoke=22]="CantAddInkStoke",e[e.CantReadAttachmentSize=23]="CantReadAttachmentSize",e[e.CantReadAttachmentContent=24]="CantReadAttachmentContent",e[e.CantFocusAnnot=25]="CantFocusAnnot",e[e.CantSelectText=26]="CantSelectText",e[e.CantSelectOption=27]="CantSelectOption",e[e.CantCheckField=28]="CantCheckField",e[e.CantSetAnnotString=29]="CantSetAnnotString",e[e.CantDeletePage=30]="CantDeletePage",e))(Z||{});class se{static create(){return new de}static resolve(t){const n=new de;return n.resolve(t),n}static reject(t){const n=new de;return n.reject(t),n}static abort(t){const n=new de;return n.reject(t),n}}function fx(e){const t=n=>(o=>Math.max(0,Math.min(255,o)))(n).toString(16).padStart(2,"0");return`#${t(e.red)}${t(e.green)}${t(e.blue)}`}function fy(e){/^#?[0-9a-f]{3}$/i.test(e)&&(e=e.replace(/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i,"#$1$1$2$2$3$3").toLowerCase());const[,t,n,o]=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e)??(()=>{throw new Error(`Invalid hex colour: "${e}"`)})();return{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16)}}function vx(e){return(t=>Math.max(0,Math.min(255,t)))(e)/255}function yx(e){return((t,n=255)=>Math.max(0,Math.min(n,t)))(Math.round(255*e))}function bx(e){if(!e?.startsWith("D:")||e.length<16)return;const t=+e.slice(2,6),n=+e.slice(6,8)-1,o=+e.slice(8,10),i=+e.slice(10,12),r=+e.slice(12,14),a=+e.slice(14,16);return new Date(Date.UTC(t,n,o,i,r,a))}function wx(e=new Date){const t=(n,o=2)=>n.toString().padStart(o,"0");return`D:${e.getUTCFullYear()}${t(e.getUTCMonth()+1)}${t(e.getUTCDate())}${t(e.getUTCHours())}${t(e.getUTCMinutes())}${t(e.getUTCSeconds())}`}const Za=Object.freeze([{id:ut.Left,label:"Left",css:"left"},{id:ut.Center,label:"Center",css:"center"},{id:ut.Right,label:"Right",css:"right"}]),Vl=Za.reduce((e,t)=>(e[t.id]=t,e),{});function $s(e){return(function(t){return Vl[t]??Vl[ut.Left]})(e).css}Za.reduce((e,t)=>(e[t.css]=t.id,e),{}),Za.map(e=>({value:e.id,label:e.label}));var mh=(e=>(e.Courier="Courier",e.Helvetica="Helvetica",e.Times="Times",e.Symbol="Symbol",e.ZapfDingbats="ZapfDingbats",e.Unknown="Unknown",e))(mh||{});const vy=Ge.Helvetica,ph={id:Ge.Helvetica,family:"Helvetica",bold:!1,italic:!1,label:"Helvetica",css:"Helvetica, Arial, sans-serif"},Fs=Object.freeze([{id:Ge.Courier,family:"Courier",bold:!1,italic:!1,label:"Courier",css:"Courier, monospace"},{id:Ge.Courier_Bold,family:"Courier",bold:!0,italic:!1,label:"Courier Bold",css:"Courier, monospace"},{id:Ge.Courier_BoldOblique,family:"Courier",bold:!0,italic:!0,label:"Courier Bold Oblique",css:"Courier, monospace"},{id:Ge.Courier_Oblique,family:"Courier",bold:!1,italic:!0,label:"Courier Oblique",css:"Courier, monospace"},ph,{id:Ge.Helvetica_Bold,family:"Helvetica",bold:!0,italic:!1,label:"Helvetica Bold",css:"Helvetica, Arial, sans-serif"},{id:Ge.Helvetica_BoldOblique,family:"Helvetica",bold:!0,italic:!0,label:"Helvetica Bold Oblique",css:"Helvetica, Arial, sans-serif"},{id:Ge.Helvetica_Oblique,family:"Helvetica",bold:!1,italic:!0,label:"Helvetica Oblique",css:"Helvetica, Arial, sans-serif"},{id:Ge.Times_Roman,family:"Times",bold:!1,italic:!1,label:"Times Roman",css:'"Times New Roman", Times, serif'},{id:Ge.Times_Bold,family:"Times",bold:!0,italic:!1,label:"Times Bold",css:'"Times New Roman", Times, serif'},{id:Ge.Times_BoldItalic,family:"Times",bold:!0,italic:!0,label:"Times Bold Italic",css:'"Times New Roman", Times, serif'},{id:Ge.Times_Italic,family:"Times",bold:!1,italic:!0,label:"Times Italic",css:'"Times New Roman", Times, serif'},{id:Ge.Symbol,family:"Symbol",bold:!1,italic:!1,label:"Symbol",css:"Symbol, serif"},{id:Ge.ZapfDingbats,family:"ZapfDingbats",bold:!1,italic:!1,label:"Zapf Dingbats",css:"ZapfDingbats, serif"}]),yy=Fs.reduce((e,t)=>
2082(e[t.id]=t,e),{}),gh=new Map;for(const e of Fs)gh.set(`${e.family}_${e.bold}_${e.italic}`,e.id);function qr(e){return yy[e]??ph}function Kl(e){return qr(e).family}function ii(e){return qr(e).bold}function ri(e){return qr(e).italic}function ro(e,{bold:t,italic:n}){return gh.get(`${e}_${t}_${n}`)??vy}function Yn(e){const t=qr(e);return{fontFamily:t.css,fontWeight:t.bold?"bold":"normal",fontStyle:t.italic?"italic":"normal"}}Object.values(mh).filter(e=>e!=="Unknown").map(e=>({value:e,label:e}));const by=[...new Set(Fs.map(e=>e.family))];function Zl(e){switch(e){case"Courier":return"Courier";case"Helvetica":default:return"Helvetica";case"Times":return"Times";case"Symbol":return"Symbol";case"ZapfDingbats":return"ZapfDingbats"}}const Ir=Object.freeze([{id:xe.Normal,label:"Normal",css:"normal"},{id:xe.Multiply,label:"Multiply",css:"multiply"},{id:xe.Screen,label:"Screen",css:"screen"},{id:xe.Overlay,label:"Overlay",css:"overlay"},{id:xe.Darken,label:"Darken",css:"darken"},{id:xe.Lighten,label:"Lighten",css:"lighten"},{id:xe.ColorDodge,label:"Color Dodge",css:"color-dodge"},{id:xe.ColorBurn,label:"Color Burn",css:"color-burn"},{id:xe.HardLight,label:"Hard Light",css:"hard-light"},{id:xe.SoftLight,label:"Soft Light",css:"soft-light"},{id:xe.Difference,label:"Difference",css:"difference"},{id:xe.Exclusion,label:"Exclusion",css:"exclusion"},{id:xe.Hue,label:"Hue",css:"hue"},{id:xe.Saturation,label:"Saturation",css:"saturation"},{id:xe.Color,label:"Color",css:"color"},{id:xe.Luminosity,label:"Luminosity",css:"luminosity"}]),Xl=Ir.reduce((e,t)=>(e[t.id]=t,e),{});function No(e){return(function(t){return Xl[t]??Xl[xe.Normal]})(e).css}Ir.reduce((e,t)=>(e[t.css]=t.id,e),{}),Ir.map(e=>({value:e.id,label:e.label}));const wy=Ir.map(e=>e.id);function Yl(e){if(e instanceof ch)return{type:"noop"};if(e instanceof dh)return{type:"console"};if(e instanceof uh)return{type:"perf"};if(e instanceof ty){const t=e;return{type:"level",config:{level:t.level,logger:Yl(t.logger)}}}return e instanceof hh?{type:"all",config:{loggers:e.loggers.map(Yl)}}:{type:"noop"}}const xy=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function xx(e){return xy.test(e)}function Ce(){var e;if(typeof((e=globalThis.crypto)==null?void 0:e.randomUUID)=="function")return globalThis.crypto.randomUUID();const t=(function(o){var i;if(typeof((i=globalThis.crypto)==null?void 0:i.getRandomValues)=="function")return globalThis.crypto.getRandomValues(new Uint8Array(o));if(typeof require=="function")try{const{randomBytes:a}=require("crypto");return a(o)}catch{}const r=new Uint8Array(o);for(let a=0;a<o;a++)r[a]=Math.floor(256*Math.random());return r})(16);t[6]=15&t[6]|64,t[8]=63&t[8]|128;const n=Array.from(t,o=>o.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}class ui extends de{constructor(t={}){super(),this.children=new Map,this.childResults=[],this.completedCount=0,this.expectedCount=0,this.isFinalized=!1,this.config={aggregate:t.aggregate??(n=>n),onChildComplete:t.onChildComplete??(()=>{}),failFast:t.failFast??!0}}addChild(t,n){if(this.state.stage!==Gn.Pending)return this.state.stage===Gn.Aborted&&t.abort(this.state.reason),this;const o=n??this.expectedCount;return this.expectedCount=Math.max(this.expectedCount,o+1),this.children.set(t,o),t.wait(i=>this.handleChildSuccess(t,i,o),i=>this.handleChildError(t,i,o)),this}finalize(){return this.isFinalized||(this.isFinalized=!0,this.expectedCount===0&&this.resolve(this.config.aggregate([]))),this}handleChildSuccess(t,n,o){if(this.state.stage!==Gn.Pending)return;this.childResults[o]=n,this.completedCount++,this.children.delete(t);const i=this.config.onChildComplete(this.completedCount,this.expectedCount,n,o);if(i!==void 0&&this.progress(i),this.completedCount===this.expectedCount){const r=this.config.aggregate(this.childResults);this.resolve(r)}}handleChildError(t,n,o){if(this.state.stage===Gn.Pending){if(this.children.delete(t),this.config.failFast){for(const[i]of this.children)i.abort("Sibling task failed");this.children.clear(),this.fail(n)}else if(this.childResults[o]=void 0,this.completedCount++,this.completedCount===this.expectedCount){const i=this.config.aggregate(this.childResults);this.resolve(i)}}}abort(t){for(const[n]of this.children)n.abort(t);this.children.clear(),super.abort(t)}reject(t){for(const[n]of this.children)n.abort(t);this.children.clear(),super.reject(t)}getPendingCount(){return this.children.size}getCompletedCount(){return this.completedCount}static gather(t){const n=new ui({aggregate:o=>o,onChildComplete:(o,i)=>({completed:o,total:i})});return t.forEach((o,i)=>n.addChild(o,i)),n.finalize(),n}static gatherIndexed(t){const n=new ui({aggregate:o=>{const i={};return o.forEach((r,a)=>{i[a]=r}),i},onChildComplete:(o,i,r,a)=>({page:a,result:r})});return t.forEach((o,i)=>n.addChild(o,i)),n.finalize(),n}static gatherFrom(t,n){const o=new ui(n);return t.forEach((i,r)=>o.addChild(i,r)),o.finalize(),o}static first(t){let n=!1;const o=new ui({aggregate:i=>i[0],failFast:!1});return o.handleChildSuccess=(i,r)=>{if(!n){n=!0;for(const[a]of o.children)a!==i&&a.abort("Race won by sibling");o.resolve(r)}},t.forEach((i,r)=>o.addChild(i,r)),o.finalize(),o}}class ya{constructor(t){this.parentTask=t,this.activeChild=null,this.disposed=!1;const n=t.abort.bind(t);t.abort=o=>{var i;this.disposed=!0,(i=this.activeChild)==null||i.abort(o),n(o)}}run(t){return new Promise((n,o)=>
2082{if(this.disposed||this.parentTask.state.stage!==Gn.Pending)return void o(new Oo("Sequence aborted"));const i=t();this.activeChild=i,i.wait(r=>{this.activeChild=null,n(r)},r=>{this.activeChild=null,r.type==="abort"?o(new Oo(r.reason)):o(new gr(r.reason))})})}runWithProgress(t,n){return new Promise((o,i)=>{if(this.disposed||this.parentTask.state.stage!==Gn.Pending)return void i(new Oo("Sequence aborted"));const r=t();this.activeChild=r,r.onProgress(a=>{this.parentTask.progress(n(a))}),r.wait(a=>{this.activeChild=null,o(a)},a=>{this.activeChild=null,a.type==="abort"?i(new Oo(a.reason)):i(new gr(a.reason))})})}execute(t,n){t().catch(o=>{o instanceof Oo||(o instanceof gr?this.parentTask.reject(o.reason):this.parentTask.reject(n(o)))})}}function Ql(e){if(e.byteLength<4)return null;const t=new Uint8Array(e);return t[0]===137&&t[1]===80&&t[2]===78&&t[3]===71?(function(n){if(n.byteLength<24)return null;const o=new DataView(n),i=o.getUint32(16),r=o.getUint32(20);return i===0||r===0?null:{mimeType:"image/png",width:i,height:r}})(e):t[0]===255&&t[1]===216&&t[2]===255?(function(n){const o=new Uint8Array(n);let i=2;for(;i+4<o.byteLength;){if(o[i]!==255)return null;const r=o[i+1];if(r>=192&&r<=195){if(i+9>o.byteLength)return null;const a=new DataView(n,i+5),s=a.getUint16(0),l=a.getUint16(2);return l===0||s===0?null:{mimeType:"image/jpeg",width:l,height:s}}r===216||r===217?i+=2:r===255?i+=1:i+=2+(o[i+2]<<8|o[i+3])}return null})(e):t[0]===37&&t[1]===80&&t[2]===68&&t[3]===70?{mimeType:"application/pdf"}:null}function vt(){}class Jl{constructor(){this.dependencyGraph=new Map}addNode(t,n=[]){this.dependencyGraph.set(t,new Set(n))}hasCircularDependencies(){const t=new Set,n=new Set,o=i=>{t.add(i),n.add(i);const r=this.dependencyGraph.get(i)||new Set;for(const a of r)if(t.has(a)){if(n.has(a))return!0}else if(o(a))return!0;return n.delete(i),!1};for(const i of this.dependencyGraph.keys())if(!t.has(i)&&o(i))return!0;return!1}resolveLoadOrder(){if(this.hasCircularDependencies())throw new Error("Circular dependencies detected");const t=[],n=new Set,o=new Set,i=r=>{if(o.has(r))throw new Error("Circular dependency");if(n.has(r))return;o.add(r);const a=this.dependencyGraph.get(r)||new Set;for(const s of a)i(s);o.delete(r),n.add(r),t.push(r)};for(const r of this.dependencyGraph.keys())n.has(r)||i(r);return t}}class Lt extends Error{constructor(t){super(t),this.name="PluginRegistrationError"}}class Eo extends Error{constructor(t){super(t),this.name="PluginNotFoundError"}}
2082class Cy extends Error{constructor(t){super(t),this.name="CircularDependencyError"}}class ky extends Error{constructor(t){super(t),this.name="PluginConfigurationError"}}class Iy{constructor(t,n){this.store=t,this.pluginId=n}getState(){return this.store.getState().plugins[this.pluginId]}dispatch(t){return this.store.dispatchToPlugin(this.pluginId,t)}subscribeToState(t){return this.store.subscribeToPlugin(this.pluginId,(n,o,i)=>{t(n,o,i)})}onAction(t,n){return this.store.onAction(t,(o,i,r)=>{n(o,i.plugins[this.pluginId],r.plugins[this.pluginId])})}}const Vr="START_LOADING_DOCUMENT",fh="UPDATE_DOCUMENT_LOADING_PROGRESS",Kr="SET_DOCUMENT_LOADED",js="SET_DOCUMENT_ERROR",Bs="RETRY_LOADING_DOCUMENT",Zr="CLOSE_DOCUMENT",Hs="SET_ACTIVE_DOCUMENT",Us="REORDER_DOCUMENTS",Ws="MOVE_DOCUMENT",Gs="UPDATE_DOCUMENT_SECURITY",Zo="REFRESH_PAGES",Xr="SET_SCALE",Yr="SET_ROTATION",Sy=[Vr,fh,Kr,Zr,Hs,js,Bs,"REFRESH_DOCUMENT",Zo,"SET_PAGES",Xr,Yr,"SET_DEFAULT_SCALE","SET_DEFAULT_ROTATION",Us,Ws,Gs],ec=(e,t,n,o,i,r,a)=>({type:Vr,payload:{documentId:e,name:t,scale:n,rotation:o,passwordProvided:i,autoActivate:r,permissions:a}}),tc=(e,t)=>({type:Zr,payload:{documentId:e,nextActiveDocumentId:t}}),Vi=(e,t)=>({type:Zo,payload:{documentId:e,pageIndexes:t}}),nc=(e,t)=>({type:Yr,payload:{rotation:e,documentId:t}});class My{constructor(t,n){this.initialCoreState=n,this.pluginReducers={},this.listeners=[],this.pluginListeners={},this.isDispatching=!1,this.state={core:n,plugins:{}},this.coreReducer=t}addPluginReducer(t,n,o){this.state.plugins[t]=o,this.pluginReducers[t]=n}dispatchToCore(t){if(!this.coreReducer)return this.getState();if(this.isDispatching)throw new Error("Reducers may not dispatch actions. To trigger cascading actions, dispatch from a listener callback instead.");const n=this.getState();try{this.isDispatching=!0,this.state.core=this.coreReducer(this.state.core,t)}finally{this.isDispatching=!1}return this.listeners.forEach(o=>{const i=this.getState();o(t,i,n)}),this.getState()}dispatchToPlugin(t,n,o=!0){if(this.isDispatching)throw new Error("Reducers may not dispatch actions. To trigger cascading actions, dispatch from a listener callback instead.");const i=this.getState(),r=this.pluginReducers[t];if(!r)return i.plugins[t];const a=i.plugins[t];try{this.isDispatching=!0;const s=r(a,n);this.state.plugins[t]=s}finally{this.isDispatching=!1}return o&&this.listeners.forEach(s=>{const l=this.getState();s(n,l,i)}),this.pluginListeners[t]&&this.pluginListeners[t].forEach(s=>{const l=this.getState().plugins[t];s(n,l,a)}),this.getState().plugins[t]}dispatch(t){if(this.isDispatching)throw new Error("Reducers may not dispatch actions. To trigger cascading actions, dispatch from a listener callback instead.");const n=this.getState();try{this.isDispatching=!0,this.isCoreAction(t)&&(this.state.core=this.coreReducer(this.state.core,t));for(const o in this.pluginReducers){const i=this.pluginReducers[o],r=n.plugins[o];i&&(this.state.plugins[o]=i(r,t))}}finally{this.isDispatching=!1}return this.listeners.forEach(o=>{const i=this.getState();o(t,i,n)}),this.getState()}getState(){if(this.isDispatching)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return{core:{...this.state.core},plugins:{...this.state.plugins}}}subscribe(t){if(this.isDispatching)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state.");return this.listeners.push(t),()=>{if(this.isDispatching)throw new Error("You may not unsubscribe from a store listener while the reducer is executing.");this.listeners=this.listeners.filter(n=>n!==t)}}subscribeToPlugin(t,n){if(!(t in this.state.plugins))throw new Error(`Plugin state not found for plugin "${t}". Did you forget to call addPluginReducer?`);if(this.isDispatching)throw new Error("You may not call store.subscribeToPlugin() while the reducer is executing.");return this.pluginListeners[t]||(this.pluginListeners[t]=[]),this.pluginListeners[t].push(n),()=>{if(this.isDispatching)throw new Error("You may not unsubscribe from a store listener while the reducer is executing.");this.pluginListeners[t]=this.pluginListeners[t].filter(o=>o!==n),this.pluginListeners[t].length===0&&delete this.pluginListeners[t]}}onAction(t,n){return this.subscribe((o,i,r)=>{o.type===t&&n(o,i,r)})}getPluginStore(t){if(!(t in this.state.plugins))throw new Error(`Plugin state not found for plugin "${t}". Did you forget to call addPluginReducer?`);return new Iy(this,t)}isCoreAction(t){return Sy.includes(t.type)}destroy(){var t,n;this.listeners.length=0;for(const o in this.pluginListeners)(n=(t=this.pluginListeners[o])==null?void 0:t.splice)==null||n.call(t,0);this.pluginListeners={},this.pluginReducers={},this.state.plugins={},this.state.core={...this.initialCoreState}}}j.Print,j.ModifyContents,j.CopyContents,j.ModifyAnnotations,j.FillForms,j.ExtractForAccessibility,j.AssembleDocument,j.PrintHighQuality;const Ay=[j.Print,j.ModifyContents,j.CopyContents,j.ModifyAnnotations,j.FillForms,j.ExtractForAccessibility,j.AssembleDocument,j.PrintHighQuality],Py={[j.Print]:"print",[j.ModifyContents]:"modifyContents",[j.CopyContents]:"copyContents",[j.ModifyAnnotations]:"modifyAnnotations",[j.FillForms]:"fillForms",[j.ExtractForAccessibility]:"extractForAccessibility",[j.AssembleDocument]:"assembleDocument",[j.PrintHighQuality]:"printHighQuality"};function oc(e,t){if(!e)return;if(t in e)return e[t];const n=Py[t];return n&&n in e?e[n]:void 0}function Sr(e,t,n){var o;const i=e.documents[t],r=i?.permissions,a=e.globalPermissions,s=((o=i?.document)==null?void 0:o.permissions)??j.AllowAll,l=oc(r?.overrides,n);if(l!==void 0)return l;const c=oc(a?.overrides,n);return c!==void 0?c:!(r?.enforceDocumentPermissions??a?.enforceDocumentPermissions??!0)||(s&n)!==0}function ic(e,t){return Ay.reduce((n,o)=>Sr(e,t,o)?n|o:n,0)}function Dy(e,t,n){const o=e.activeDocumentId;if(o!==t)return o;if(n!==void 0)return n&&e.documents[n]?n:null;const i=e.documentOrder.indexOf(t);return i===-1?null:i>0?e.documentOrder[i-1]:i<e.documentOrder.length-1?e.documentOrder[i+1]:null}const Ty=(e,t)=>{switch(t.type){case Vr:{const{documentId:n,name:o,scale:i,rotation:r,passwordProvided:a,autoActivate:s=!0,permissions:l}=t.payload,c={id:n,name:o,status:"loading",loadingProgress:0,error:null,document:null,scale:i??e.defaultScale,rotation:r??e.defaultRotation,passwordProvided:a??!1,pageRefreshVersions:{},permissions:l,loadStartedAt:Date.now()};return{...e,documents:{...e.documents,[n]:c},documentOrder:[...e.documentOrder,n],activeDocumentId:s||!e.activeDocumentId?n:e.activeDocumentId}}case fh:{const{documentId:n,progress:o}=t.payload,i=e.documents[n];return i&&i.status==="loading"?{...e,documents:{...e.documents,[n]:{...i,loadingProgress:o}}}:e}case Kr:{const{documentId:n,document:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,status:"loaded",document:o,error:null,errorCode:void 0,errorDetails:void 0,passwordProvided:void 0,loadedAt:Date.now()}}}:e}case js:{const{documentId:n,error:o,errorCode:i,errorDetails:r}=t.payload,a=e.documents[n];return a?{...e,documents:{...e.documents,[n]:{...a,status:"error",error:o,errorCode:i,errorDetails:r}}}:e}case Bs:{const{documentId:n,passwordProvided:o}=t.payload,i=e.documents[n];return i&&i.status==="error"?{...e,documents:{...e.documents,[n]:{...i,status:"loading",loadingProgress:0,error:null,errorCode:void 0,errorDetails:void 0,passwordProvided:o??!1,loadStartedAt:Date.now()}}}:e}case Zr:{const{documentId:n,nextActiveDocumentId:o}=t.payload,{[n]:i,...r}=e.documents;return{...e,documents:r,documentOrder:e.documentOrder.filter(a=>a!==n),activeDocumentId:Dy(e,n,o)}}case Ws:{const{documentId:n,toIndex:o}=t.payload,i=(function(r,a,s){const l=r.indexOf(a);if(l===-1||s<0||s>=r.length||l===s)return null;const c=[...r];return c.splice(l,1),c.splice(s,0,a),c})(e.documentOrder,n,o);return i?{...e,documentOrder:i}:e}case Us:return{...e,documentOrder:t.payload};case Hs:return{...e,activeDocumentId:t.payload};case Xr:{const{scale:n,documentId:o}=t.payload,i=o??e.activeDocumentId;if(!i)return e;const r=e.documents[i];return r?{...e,documents:{...e.documents,[i]:{...r,scale:n}}}:e}case Yr:{const{rotation:n,documentId:o}=t.payload,i=o??e.activeDocumentId;if(!i)return e;const r=e.documents[i];return r?{...e,documents:{...e.documents,[i]:{...r,rotation:n}}}:e}case Zo:{const{documentId:n,pageIndexes:o}=t.payload,i=e.documents[n];if(!i)return e;const r={...i.pageRefreshVersions};for(const a of o)r[a]=(r[a]||0)+1;return{...e,documents:{...e.documents,[n]:{...i,pageRefreshVersions:r}}}}case Gs:{const{documentId:n,permissions:o,isOwnerUnlocked:i}=t.payload,r=e.documents[n];return r?.document?{...e,documents:{...e.documents,[n]:{...r,document:{...r.document,permissions:o,isOwnerUnlocked:i}}}}:e}default:return e}};class zy{constructor(t,n){this.plugins=new Map,this.manifests=new Map,this.capabilities=new Map,this.status=new Map,this.configurations=new Map,this.initPromise=null,this.pendingRegistrations=[],this.processingRegistrations=[],this.initialized=!1,this.isInitializing=!1,this.pluginsReadyPromise=null,this.destroyed=!1,this.resolver=new Jl,this.engine=t,this.initialCoreState=(o=>({documents:{},documentOrder:[],activeDocumentId:null,defaultScale:o?.defaultScale??1,defaultRotation:o?.defaultRotation??Wr.Degree0,globalPermissions:o?.permissions}))(n),this.store=new My(Ty,this.initialCoreState),this.logger=n?.logger??new ch}getLogger(){return this.logger}registerPlugin(t,n){if(this.initialized&&!this.isInitializing)throw new Lt("Cannot register plugins after initialization");this.validateManifest(t.manifest),this.store.addPluginReducer(t.manifest.id,t.reducer,typeof t.initialState=="function"?t.initialState(this.initialCoreState,{...t.manifest.defaultConfig,...n}):t.initialState),this.pendingRegistrations.push({package:t,config:n})}getStore(){return this.store}getEngine(){return this.engine}pluginsReady(){return this.pluginsReadyPromise||(this.pluginsReadyPromise=(async()=>{this.initialized||await this.initialize();const t=Array.from(this.plugins.values()).map(n=>typeof n.ready=="function"?n.ready():Promise.resolve());await Promise.all(t)})()),this.pluginsReadyPromise}async initialize(){if(this.destroyed)throw new Lt("Registry has been destroyed");return this.initPromise||(this.initPromise=(async()=>
vendor: 2,459 bytes, line 2082
2082{if(this.initialized)throw new Lt("Registry is already initialized");this.isInitializing=!0;try{if(this.destroyed)return;for(;this.pendingRegistrations.length>0;){if(this.destroyed)return;this.processingRegistrations=[...this.pendingRegistrations],this.pendingRegistrations=[];for(const n of this.processingRegistrations){const o=new Set,i=[...n.package.manifest.requires,...n.package.manifest.optional];for(const r of i){const a=this.processingRegistrations.find(s=>s.package.manifest.provides.includes(r));a&&o.add(a.package.manifest.id)}this.resolver.addNode(n.package.manifest.id,[...o])}const t=this.resolver.resolveLoadOrder();for(const n of t){const o=this.processingRegistrations.find(i=>i.package.manifest.id===n);this.instantiatePlugin(o.package.manifest,o.package.create,o.config)}for(const n of t)await this.runPluginInitialization(n);this.processingRegistrations=[],this.resolver=new Jl}this.initialized=!0}catch(t){throw t instanceof Error?new Cy(`Failed to resolve plugin dependencies: ${t.message}`):t}finally{this.isInitializing=!1}})()),this.initPromise}instantiatePlugin(t,n,o){const i={...t.defaultConfig,...o};this.validateConfig(t.id,i,t.defaultConfig);const r=n(this,i);this.validatePlugin(r);for(const a of t.provides){if(this.capabilities.has(a))throw new Lt(`Capability ${a} is already provided by plugin ${this.capabilities.get(a)}`);this.capabilities.set(a,t.id)}this.plugins.set(t.id,r),this.manifests.set(t.id,t),this.status.set(t.id,"registered"),this.configurations.set(t.id,i)}async runPluginInitialization(t){const n=this.plugins.get(t);if(!n)return;const o=this.manifests.get(t),i=this.configurations.get(t);for(const r of o.requires)if(!this.capabilities.has(r))throw new Lt(`Missing required capability: ${r} for plugin ${t}`);this.logger.debug("PluginRegistry","InitializePlugin",`Initializing plugin ${t}`);try{n.initialize&&await n.initialize(i),this.status.set(t,"active"),this.logger.info("PluginRegistry","PluginInitialized",`Plugin ${t} initialized successfully`)}catch(r){throw this.status.set(t,"error"),this.logger.error("PluginRegistry","InitializationFailed",`Plugin ${t} initialization failed`,{error:r}),r}}getPluginConfig(t){const n=this.configurations.get(t);if(!n)throw new Eo(`Configuration for plugin ${t} not found`);return n}validateConfig(t,n,o){const i=Object.keys(o).filter(r=>!n.hasOwnProperty(r));if(i.length>0)throw new ky(`Missing required configuration keys for plugin ${t}: ${i.join(", ")}`)}
2082async updatePluginConfig(t,n){const o=this.getPlugin(t);if(!o)throw new Eo(`Plugin ${t} not found`);const i=this.manifests.get(t),r=this.configurations.get(t);if(!i||!r)throw new Eo(`Plugin ${t} not found`);const a={...r,...n};this.validateConfig(t,a,i.defaultConfig),this.configurations.set(t,a),o.initialize&&await o.initialize(a)}registerPluginBatch(t){for(const n of t)this.registerPlugin(n.package,n.config)}async unregisterPlugin(t){const n=this.plugins.get(t);if(!n)throw new Eo(`Plugin ${t} is not registered`);const o=this.manifests.get(t);if(!o)throw new Eo(`Manifest for plugin ${t} not found`);for(const[i,r]of this.manifests.entries())if(i!==t&&[...r.requires,...r.optional].some(a=>o.provides.includes(a)))throw new Lt(`Cannot unregister plugin ${t}: plugin ${i} depends on it`);try{n.destroy&&await n.destroy();for(const i of o.provides)this.capabilities.delete(i);this.plugins.delete(t),this.manifests.delete(t),this.status.delete(t)}catch(i){throw i instanceof Error?new Error(`Failed to unregister plugin ${t}: ${i.message}`):i}}getPlugin(t){return this.plugins.get(t)||null}getCapabilityProvider(t){const n=this.capabilities.get(t);return n?this.getPlugin(n):null}hasCapability(t){return this.capabilities.has(t)}getAllPlugins(){return Array.from(this.plugins.values())}getPluginStatus(t){const n=this.status.get(t);if(!n)throw new Eo(`Plugin ${t} not found`);return n}validatePlugin(t){if(!t.id)throw new Lt("Plugin must have an id")}validateManifest(t){if(!t.id)throw new Lt("Manifest must have an id");if(!t.name)throw new Lt("Manifest must have a name");if(!t.version)throw new Lt("Manifest must have a version");if(!Array.isArray(t.provides))throw new Lt("Manifest must have a provides array");if(!Array.isArray(t.requires))throw new Lt("Manifest must have a requires array");if(!Array.isArray(t.optional))throw new Lt("Manifest must have an optional array")}isDestroyed(){return this.destroyed}async destroy(){var t;if(this.destroyed)throw new Lt("Registry has already been destroyed");this.destroyed=!0;try{await this.initPromise}catch{}for(const n of Array.from(this.plugins.values()).reverse())await((t=n.destroy)==null?void 0:t.call(n));this.store.destroy(),this.plugins.clear(),this.manifests.clear(),this.capabilities.clear(),this.status.clear(),this.pendingRegistrations.length=0,this.processingRegistrations.length=0}}function Ke(e,t){return{package:e,config:t}}function Ry(e){return"autoMountElements"in e&&typeof e.autoMountElements=="function"}class Ye{constructor(t,n){if(this.id=t,this.registry=n,this.cooldownActions={},this.debouncedTimeouts={},this.unsubscribeFromState=null,this.unsubscribeFromCoreStore=null,this.unsubscribeFromStartLoadingDocument=null,this.unsubscribeFromSetDocumentLoaded=null,this.unsubscribeFromCloseDocument=null,this.unsubscribeFromSetScale=null,this.unsubscribeFromSetRotation=null,t!==this.constructor.id)throw new Error(`Plugin ID mismatch: ${t} !== ${this.constructor.id}`);this.engine=this.registry.getEngine(),this.logger=this.registry.getLogger(),this.coreStore=this.registry.getStore(),this.pluginStore=this.coreStore.getPluginStore(this.id),this.unsubscribeFromState=this.pluginStore.subscribeToState((o,i,r)=>{this.onStoreUpdated(r,i)}),this.unsubscribeFromCoreStore=this.coreStore.subscribe((o,i,r)=>{this.onCoreStoreUpdated(r,i),i.core.activeDocumentId!==r.core.activeDocumentId&&this.onActiveDocumentChanged(r.core.activeDocumentId,i.core.activeDocumentId)}),this.unsubscribeFromStartLoadingDocument=this.coreStore.onAction(Vr,o=>{this.onDocumentLoadingStarted(o.payload.documentId)}),this.unsubscribeFromSetDocumentLoaded=this.coreStore.onAction(Kr,o=>{this.onDocumentLoaded(o.payload.documentId)}),this.unsubscribeFromCloseDocument=this.coreStore.onAction(Zr,o=>{this.onDocumentClosed(o.payload.documentId)}),this.unsubscribeFromSetScale=this.coreStore.onAction(Xr,(o,i)=>{const r=o.payload.documentId??i.core.activeDocumentId;r&&this.onScaleChanged(r,o.payload.scale)}),this.unsubscribeFromSetRotation=this.coreStore.onAction(Yr,(o,i)=>{const r=o.payload.documentId??i.core.activeDocumentId;r&&this.onRotationChanged(r,o.payload.rotation)}),this.readyPromise=new Promise(o=>{this.readyResolve=o}),this.readyResolve()}provides(){if(!this._capability){const t=this.buildCapability();this._capability=Object.freeze(t)}return this._capability}get state(){return this.pluginStore.getState()}get coreState(){return this.coreStore.getState()}getState(){return this.pluginStore.getState()}getCoreState(){return this.coreStore.getState()}dispatchCoreAction(t){return this.coreStore.dispatchToCore(t)}
vendor: 4,134 bytes, line 2082
2082dispatchToAllPlugins(t){return this.coreStore.dispatch(t)}dispatch(t){return this.pluginStore.dispatch(t)}cooldownDispatch(t,n=100){const o=Date.now();return o-(this.cooldownActions[t.type]||0)>=n&&(this.cooldownActions[t.type]=o,this.dispatch(t),!0)}debouncedDispatch(t,n=100){const o=t.type;this.debouncedTimeouts[o]&&clearTimeout(this.debouncedTimeouts[o]),this.debouncedTimeouts[o]=setTimeout(()=>{this.dispatch(t),delete this.debouncedTimeouts[o]},n)}cancelDebouncedDispatch(t){this.debouncedTimeouts[t]&&(clearTimeout(this.debouncedTimeouts[t]),delete this.debouncedTimeouts[t])}subscribe(t){return this.pluginStore.subscribeToState(t)}subscribeToCoreStore(t){return this.coreStore.subscribe(t)}onStoreUpdated(t,n){}onCoreStoreUpdated(t,n){}onDocumentLoadingStarted(t){}onDocumentLoaded(t){}onDocumentClosed(t){}onActiveDocumentChanged(t,n){}onScaleChanged(t,n){}onRotationChanged(t,n){}destroy(){Object.values(this.debouncedTimeouts).forEach(t=>{clearTimeout(t)}),this.debouncedTimeouts={},this.unsubscribeFromState&&(this.unsubscribeFromState(),this.unsubscribeFromState=null),this.unsubscribeFromCoreStore&&(this.unsubscribeFromCoreStore(),this.unsubscribeFromCoreStore=null),this.unsubscribeFromStartLoadingDocument&&(this.unsubscribeFromStartLoadingDocument(),this.unsubscribeFromStartLoadingDocument=null),this.unsubscribeFromSetDocumentLoaded&&(this.unsubscribeFromSetDocumentLoaded(),this.unsubscribeFromSetDocumentLoaded=null),this.unsubscribeFromCloseDocument&&(this.unsubscribeFromCloseDocument(),this.unsubscribeFromCloseDocument=null),this.unsubscribeFromSetScale&&(this.unsubscribeFromSetScale(),this.unsubscribeFromSetScale=null),this.unsubscribeFromSetRotation&&(this.unsubscribeFromSetRotation(),this.unsubscribeFromSetRotation=null)}ready(){return this.readyPromise}markReady(){this.readyResolve()}resetReady(){this.readyPromise=new Promise(t=>{this.readyResolve=t})}getActiveDocumentId(){const t=this.coreState.core.activeDocumentId;if(!t)throw new Error("No active document");return t}getActiveDocumentIdOrNull(){return this.coreState.core.activeDocumentId}getCoreDocument(t){const n=t??this.getActiveDocumentIdOrNull();return n?this.coreState.core.documents[n]??null:null}getCoreDocumentOrThrow(t){const n=this.getCoreDocument(t);if(!n)throw new Error(`Document not found: ${t??"active"}`);return n}getDocumentPermissions(t){const n=t??this.coreState.core.activeDocumentId;return n?ic(this.coreState.core,n):j.AllowAll}checkPermission(t,...n){const o=t??this.coreState.core.activeDocumentId;return!o||n.every(i=>Sr(this.coreState.core,o,i))}requirePermission(t,...n){const o=t??this.coreState.core.activeDocumentId;if(!o)return;const i=[];for(const r of n)Sr(this.coreState.core,o,r)||i.push(r);if(i.length>0){const r=ic(this.coreState.core,o);throw new py(i,r)}}}class Mr{constructor(t,n){this.handler=t,this.options=n,this.lastRun=0,this.handle=o=>{this.options.mode==="debounce"?this.debounce(o):this.throttle(o)}}debounce(t){this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{this.handler(t),this.timeoutId=void 0},this.options.wait)}throttle(t){if(this.options.mode==="debounce")return;const n=Date.now(),o=this.options.throttleMode||"leading-trailing";n-this.lastRun>=this.options.wait&&(o==="leading-trailing"&&this.handler(t),this.lastRun=n),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{this.handler(t),this.lastRun=Date.now(),this.timeoutId=void 0},this.options.wait-(n-this.lastRun))}destroy(){this.timeoutId&&window.clearTimeout(this.timeoutId)}}class Xa{constructor(t,n){this.handler=t,this.options=n,this.controls=new Map,this.handle=o=>{const i=String(this.options.keyExtractor(o));let r=this.controls.get(i);r||(r=new Mr(this.handler,this.baseOptions),this.controls.set(i,r)),r.handle(o)},this.baseOptions={mode:n.mode,wait:n.wait,...n.mode==="throttle"&&"throttleMode"in n?{throttleMode:n.throttleMode}:{}}}destroy(){for(const t of this.controls.values())t.destroy();this.controls.clear()}}function Ya(e){return"keyExtractor"in e}function ve(e,t,n){return e<t?t:e>n?n:e}function Co(e,t,n){if(e===t)return!0;
2082if(e==null||t==null)return e===t;const o=typeof e;if(o!==typeof t)return!1;if(o==="object"){n||(n=new Set);const i=(function(s,l){return`${rc(s)}__${rc(l)}`})(e,t);if(n.has(i))return!0;n.add(i);const r=Array.isArray(e),a=Array.isArray(t);return r&&a?(function(s,l,c){if(s.length!==l.length)return!1;const d=new Array(l.length).fill(!1);e:for(let u=0;u<s.length;u++){const m=s[u];for(let g=0;g<l.length;g++)if(!d[g]&&Co(m,l[g],c)){d[g]=!0;continue e}return!1}return!0})(e,t,n):!r&&!a&&(function(s,l,c){const d=Object.keys(s).sort(),u=Object.keys(l).sort();if(d.length!==u.length)return!1;for(let m=0;m<d.length;m++)if(d[m]!==u[m])return!1;for(const m of d)if(!Co(s[m],l[m],c))return!1;return!0})(e,t,n)}return!1}let Ey=0;const ba=new WeakMap;function rc(e){return ba.has(e)||ba.set(e,++Ey),ba.get(e)}function xt(){const e=new Set;return{emit:(t=void 0)=>e.forEach(n=>n(t)),on:t=>(e.add(t),()=>e.delete(t)),off:t=>e.delete(t),clear:()=>e.clear()}}function Ae(e,t=Co){const n=new Set,o=new Map;let i=e;const r=(a,s)=>{let l=a,c=()=>{};if(s){if(Ya(s)){const d=new Xa(a,s);l=d.handle,c=()=>d.destroy()}else{const d=new Mr(a,s);l=d.handle,c=()=>d.destroy()}o.set(a,{wrapped:l,destroy:c})}return i!==void 0&&l(i),n.add(l),()=>{n.delete(l),c(),o.delete(a)}};return{get value(){return i},emit(a=void 0){i!==void 0&&t(i,a)||(i=a,(s=>{n.forEach(l=>l(s))})(a))},on:r,off(a){const s=o.get(a);s?(n.delete(s.wrapped),s.destroy(),o.delete(a)):n.delete(a)},clear(){n.clear(),o.forEach(a=>a.destroy()),o.clear()},select:(a,s=Co)=>(l,c)=>{let d;if(i!==void 0){const u=a(i);d=u,l(u)}return r(u=>{const m=a(u);d!==void 0&&s(d,m)||(d=m,l(m))},c)}}}function et(e,t){const n=t?.cache??!0,o=t?.equality??Co,i=new Map,r=new Map,a=new Map,s=new Set,l=new Map,c=d=>String(d);return{emit(d,u){const m=c(d);if(n){const f=i.get(m);if(f!==void 0&&o(f,u))return;i.set(m,u)}const g=r.get(m);g&&g.forEach(f=>f(u));const p=e(d,u);s.forEach(f=>f(p))},forScope(d){const u=c(d);return(m,g)=>{const p=(b=>{let w=r.get(b);return w||(w=new Set,r.set(b,w)),w})(u),f=(b=>{let w=a.get(b);return w||(w=new Map,a.set(b,w)),w})(u);let v=m,y=()=>{};if(g){if(Ya(g)){const b=new Xa(m,g);v=b.handle,y=()=>b.destroy()}else{const b=new Mr(m,g);v=b.handle,y=()=>b.destroy()}f.set(m,{wrapped:v,destroy:y})}if(n){const b=i.get(u);b!==void 0&&v(b)}return p.add(v),()=>{p.delete(v),y(),f.delete(m),p.size===0&&r.delete(u),f.size===0&&a.delete(u)}}},onGlobal:(d,u)=>{let m=d,g=()=>{};if(u){if(Ya(u)){const p=new Xa(d,u);m=p.handle,g=()=>p.destroy()}else{const p=new Mr(d,u);m=p.handle,g=()=>p.destroy()}l.set(d,{wrapped:m,destroy:g})}return s.add(m),()=>{s.delete(m),g(),l.delete(d)}},getValue:d=>n?i.get(c(d)):void 0,getScopes:()=>Array.from(n?i.keys():r.keys()),clearScope(d){const u=c(d);n&&i.delete(u);const m=r.get(u);m&&(m.clear(),r.delete(u));const g=a.get(u);g&&(g.forEach(p=>p.destroy()),g.clear(),a.delete(u))},clear(){n&&i.clear(),r.forEach(d=>d.clear()),r.clear(),a.forEach(d=>{d.forEach(u=>u.destroy()),d.clear()}),a.clear(),s.clear(),l.forEach(d=>d.destroy()),l.clear()}}}class _y{constructor(t){this.autoMountElements=[],this.package=t}addUtility(t){return this.autoMountElements.push({component:t,type:"utility"}),this}addWrapper(t){return this.autoMountElements.push({component:t,type:"wrapper"}),this}build(){return{...this.package,autoMountElements:()=>this.autoMountElements}}}function cn(e){return new _y(e)}const qs=Rn({registry:null,coreState:null,isInitializing:!0,pluginsReady:!1,activeDocumentId:null,activeDocument:null,documents:{},documentStates:[]});function Ly({plugins:e,children:t}){const{utilities:n,wrappers:o}=ee(()=>{const r=[],a=[];for(const s of e){const l=s.package;if(Ry(l)){const c=l.autoMountElements()||[];for(const d of c)d.type==="utility"?r.push(d.component):d.type==="wrapper"&&a.push(d.component)}}return{utilities:r,wrappers:a}},[e]),i=C(fe,{children:[t,n.map((r,a)=>C(r,{},`utility-${a}`))]});return C(fe,{children:o.reduce((r,a)=>C(a,{children:r}),i)})}function Oy({engine:e,config:t,logger:n,onInitialized:o,plugins:i,children:r,autoMountDomElements:a=!0}){const[s,l]=$(null),[c,d]=$(null),[u,m]=$(!0),[g,p]=$(!1),f=Q(o);H(()=>{f.current=o},[o]),H(()=>{const b={...t,logger:t?.logger??n},w=new zy(e,b);w.registerPluginBatch(i);let x;return(async()=>{var k;if(await w.initialize(),w.isDestroyed())return;const I=w.getStore();d(I.getState().core);const S=I.subscribe((A,M,P)=>{I.isCoreAction(A)&&M.core!==P.core&&d(M.core)});if(await((k=f.current)==null?void 0:k.call(f,w)),!w.isDestroyed())return w.pluginsReady().then(()=>{w.isDestroyed()||p(!0)}),l(w),m(!1),S;S()})().then(k=>{x=k}).catch(console.error),()=>{x?.(),w.destroy(),l(null),d(null),m(!0),p(!1)}},[e,i]);const v=ee(()=>{const b=c?.activeDocumentId??null,w=c?.documents??{},x=c?.documentOrder??[],k=b&&w[b]?w[b]:null,I=x.map(S=>w[S]).filter(S=>S!=null);return{registry:s,coreState:c,isInitializing:u,pluginsReady:g,activeDocumentId:b,activeDocument:k,documents:w,documentStates:I}},[s,c,u,g]),y=typeof r=="function"?r(v):r;return C(qs.Provider,{value:v,children:g&&a?C(Ly,{plugins:i,children:y}):y})}function $t(e){const{registry:t}
2082=(function(){const o=En(qs);if(o===void 0)throw new Error("useCapability must be used within a PDFContext.Provider");const{registry:i,isInitializing:r}=o;if(r)return o;if(i===null)throw new Error("PDF registry failed to initialize properly");return o})();if(t===null)return{plugin:null,isLoading:!0,ready:new Promise(()=>{})};const n=t.getPlugin(e);if(!n)throw new Error(`Plugin ${e} not found`);return{plugin:n,isLoading:!1,ready:n.ready()}}function at(e){const{plugin:t,isLoading:n,ready:o}=$t(e);if(!t)return{provides:null,isLoading:n,ready:o};if(!t.provides)throw new Error(`Plugin ${e} does not provide a capability`);return{provides:t.provides(),isLoading:n,ready:o}}function Ar(){const{coreState:e}=En(qs);return e}function At(e){const t=Ar();return ee(()=>t&&e?t.documents[e]??null:null,[t,e])}j.Print,j.ModifyContents,j.CopyContents,j.ModifyAnnotations,j.FillForms,j.ExtractForAccessibility,j.AssembleDocument,j.PrintHighQuality;const Ny=[j.Print,j.ModifyContents,j.CopyContents,j.ModifyAnnotations,j.FillForms,j.ExtractForAccessibility,j.AssembleDocument,j.PrintHighQuality],$y={[j.Print]:"print",[j.ModifyContents]:"modifyContents",[j.CopyContents]:"copyContents",[j.ModifyAnnotations]:"modifyAnnotations",[j.FillForms]:"fillForms",[j.ExtractForAccessibility]:"extractForAccessibility",[j.AssembleDocument]:"assembleDocument",[j.PrintHighQuality]:"printHighQuality"};function ac(e,t){if(!e)return;if(t in e)return e[t];const n=$y[t];return n&&n in e?e[n]:void 0}function wa(e,t,n){var o;const i=e.documents[t],r=i?.permissions,a=e.globalPermissions,s=((o=i?.document)==null?void 0:o.permissions)??j.AllowAll,l=ac(r?.overrides,n);if(l!==void 0)return l;const c=ac(a?.overrides,n);return c!==void 0?c:!(r?.enforceDocumentPermissions??a?.enforceDocumentPermissions??!0)||(s&n)!==0}function Qr(e){const t=Ar();return ee(()=>{var n,o;if(!t)return{permissions:j.AllowAll,pdfPermissions:j.AllowAll,hasPermission:()=>!0,hasAllPermissions:()=>!0,canPrint:!0,canModifyContents:!0,canCopyContents:!0,canModifyAnnotations:!0,canFillForms:!0,canExtractForAccessibility:!0,canAssembleDocument:!0,canPrintHighQuality:!0};const i=(function(a,s){return Ny.reduce((l,c)=>wa(a,s,c)?l|c:l,0)})(t,e),r=a=>wa(t,e,a);return{permissions:i,pdfPermissions:((o=(n=t.documents[e])==null?void 0:n.document)==null?void 0:o.permissions)??j.AllowAll,hasPermission:r,hasAllPermissions:(...a)=>a.every(s=>wa(t,e,s)),canPrint:r(j.Print),canModifyContents:r(j.ModifyContents),canCopyContents:r(j.CopyContents),canModifyAnnotations:r(j.ModifyAnnotations),canFillForms:r(j.FillForms),canExtractForAccessibility:r(j.ExtractForAccessibility),canAssembleDocument:r(j.AssembleDocument),canPrintHighQuality:r(j.PrintHighQuality)}},[t,e])}const Fy="https://cdn.jsdelivr.net/npm/@embedpdf/[email protected]/dist/pdfium.wasm";Rn(void 0);const vh="viewport",jy={id:vh,name:"Viewport Plugin",version:"1.0.0",provides:["viewport"],requires:[],optional:[],defaultConfig:{viewportGap:10,scrollEndDelay:300}},yh="INIT_VIEWPORT_STATE",bh="CLEANUP_VIEWPORT_STATE",wh="REGISTER_VIEWPORT",xh="UNREGISTER_VIEWPORT",Ch="SET_VIEWPORT_METRICS",kh="SET_VIEWPORT_SCROLL_METRICS",Ih="SET_VIEWPORT_GAP",Sh="SET_SCROLL_ACTIVITY",Mh="SET_SMOOTH_SCROLL_ACTIVITY",Ah="ADD_VIEWPORT_GATE",Ph="REMOVE_VIEWPORT_GATE";function sc(e,t){return{type:Mh,payload:{documentId:e,isSmoothScrolling:t}}}const By={viewportMetrics:{width:0,height:0,scrollTop:0,scrollLeft:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0,clientLeft:0,clientTop:0,relativePosition:{x:0,y:0}},isScrolling:!1,isSmoothScrolling:!1,gates:new Set},lc={viewportGap:0,documents:{},activeViewports:new Set,activeDocumentId:null},Dh=class extends Ye{constructor(e,t,n){var o;super(e,t),this.id=e,this.viewportResize$=Ae(),this.viewportMetrics$=Ae(),this.scrollMetrics$=Ae(),this.scrollActivity$=Ae(),this.gateState$=Ae(),this.scrollRequests$=new Map,n.viewportGap&&this.dispatch((o=n.viewportGap,{type:Ih,payload:o})),this.scrollEndDelay=n.scrollEndDelay||100}onDocumentLoadingStarted(e){this.dispatch((function(t){return{type:yh,payload:{documentId:t}}})(e)),this.scrollRequests$.set(e,xt()),this.logger.debug("ViewportPlugin","DocumentOpened",`Initialized viewport state for document: ${e}`)}onDocumentClosed(e){var t;this.dispatch((function(n){return{type:bh,payload:{documentId:n}}})(e)),(t=this.scrollRequests$.get(e))==null||t.clear(),this.scrollRequests$.delete(e),this.logger.debug("ViewportPlugin","DocumentClosed",`Cleaned up viewport state for document: ${e}`)}buildCapability(){return{getViewportGap:()=>this.state.viewportGap,getMetrics:()=>this.getMetrics(),scrollTo:e=>this.scrollTo(e),isScrolling:()=>this.isScrolling(),isSmoothScrolling:()=>this.isSmoothScrolling(),isGated:e=>this.isGated(e),hasGate:(e,t)=>
2082this.hasGate(e,t),getGates:e=>this.getGates(e),forDocument:e=>this.createViewportScope(e),gate:(e,t)=>this.gate(e,t),releaseGate:(e,t)=>this.releaseGate(e,t),isViewportMounted:e=>this.state.activeViewports.has(e),onViewportChange:this.viewportMetrics$.on,onViewportResize:this.viewportResize$.on,onScrollChange:this.scrollMetrics$.on,onScrollActivity:this.scrollActivity$.on,onGateChange:this.gateState$.on}}createViewportScope(e){return{getMetrics:()=>this.getMetrics(e),scrollTo:t=>this.scrollTo(t,e),isScrolling:()=>this.isScrolling(e),isSmoothScrolling:()=>this.isSmoothScrolling(e),isGated:()=>this.isGated(e),hasGate:t=>this.hasGate(t,e),getGates:()=>this.getGates(e),gate:t=>this.gate(t,e),releaseGate:t=>this.releaseGate(t,e),onViewportChange:t=>this.viewportMetrics$.on(n=>{n.documentId===e&&t(n.metrics)}),onScrollChange:t=>this.scrollMetrics$.on(n=>{n.documentId===e&&t(n.scrollMetrics)}),onScrollActivity:t=>this.scrollActivity$.on(n=>{n.documentId===e&&t(n.activity)}),onGateChange:t=>this.gateState$.on(n=>{n?.documentId===e&&t(n)})}}registerViewport(e){if(!this.state.documents[e])throw new Error(`Cannot register viewport for ${e}: document state not found. Document must be opened before registering viewport.`);this.state.activeViewports.has(e)||(this.dispatch((function(t){return{type:wh,payload:{documentId:t}}})(e)),this.logger.debug("ViewportPlugin","RegisterViewport",`Registered viewport (DOM mounted) for document: ${e}`))}unregisterViewport(e){this.registry.isDestroyed()||this.state.activeViewports.has(e)&&(this.dispatch((function(t){return{type:xh,payload:{documentId:t}}})(e)),this.logger.debug("ViewportPlugin","UnregisterViewport",`Unregistered viewport (DOM unmounted) for document: ${e}. State preserved.`))}setViewportResizeMetrics(e,t){if(this.registry.isDestroyed())return;this.dispatch((function(o,i){return{type:Ch,payload:{documentId:o,metrics:i}}})(e,t));const n=this.state.documents[e];n&&this.viewportResize$.emit({documentId:e,metrics:n.viewportMetrics})}setViewportScrollMetrics(e,t){if(this.registry.isDestroyed())return;const n=this.state.documents[e];n&&(t.scrollTop===n.viewportMetrics.scrollTop&&t.scrollLeft===n.viewportMetrics.scrollLeft||(this.dispatch((function(o,i){return{type:kh,payload:{documentId:o,scrollMetrics:i}}})(e,t)),this.bumpScrollActivity(e),this.scrollMetrics$.emit({documentId:e,scrollMetrics:t})))}onScrollRequest(e,t){const n=this.scrollRequests$.get(e);if(!n)throw new Error(`Cannot subscribe to scroll requests for ${e}: document state not initialized`);return n.on(t)}gate(e,t){const n=this.state.documents[t];n?n.gates.has(e)||(this.dispatch((function(o,i){return{type:Ah,payload:{documentId:o,key:i}}})(t,e)),this.logger.debug("ViewportPlugin","GateAdded",`Added gate '${e}' for document: ${t}. Total gates: ${n.gates.size+1}`)):this.logger.warn("ViewportPlugin","GateViewport",`Cannot gate viewport for ${t}: document not found`)}releaseGate(e,t){const n=this.state.documents[t];n?n.gates.has(e)&&(this.dispatch((function(o,i){return{type:Ph,payload:{documentId:o,key:i}}})(t,e)),this.logger.debug("ViewportPlugin","GateReleased",`Released gate '${e}' for document: ${t}. Remaining gates: ${n.gates.size-1}`)):this.logger.warn("ViewportPlugin","ReleaseGate",`Cannot release gate for ${t}: document not found`)}getViewportState(e){const t=e??this.getActiveDocumentId(),n=this.state.documents[t];if(!n)throw new Error(`Viewport state not found for document: ${t}`);return n}getMetrics(e){return this.getViewportState(e).viewportMetrics}isScrolling(e){return this.getViewportState(e).isScrolling}isSmoothScrolling(e){return this.getViewportState(e).isSmoothScrolling}isGated(e){return this.getViewportState(e).gates.size>0}hasGate(e,t){return this.getViewportState(t).gates.has(e)}getGates(e){const t=this.getViewportState(e);return Array.from(t.gates)}scrollTo(e,t){const n=t??this.getActiveDocumentId(),o=this.getViewportState(n),{x:i,y:r,alignX:a,alignY:s,behavior:l="auto"}=e;l==="smooth"&&this.dispatch(sc(n,!0));const c=o.viewportMetrics;let d=i,u=r;a!==void 0&&(d=i-c.clientWidth*(a/100)),s!==void 0&&(u=r-c.clientHeight*(s/100));const m=this.scrollRequests$.get(n);m&&m.emit({x:d,y:u,behavior:l})}bumpScrollActivity(e){this.debouncedDispatch((function(t,n){return{type:Sh,payload:{documentId:t,isScrolling:n}}})(e,!1),this.scrollEndDelay),this.debouncedDispatch(sc(e,!1),this.scrollEndDelay)}onStoreUpdated(e,t){for(const n in t.documents){const o=e.documents[n],i=t.documents[n];if(o!==i&&(this.viewportMetrics$.emit({documentId:n,metrics:i.viewportMetrics}),!o||o.isScrolling===i.isScrolling&&o.isSmoothScrolling===i.isSmoothScrolling||this.scrollActivity$.emit({documentId:n,activity:{isScrolling:i.isScrolling,isSmoothScrolling:i.isSmoothScrolling}}
vendor: 5,982 bytes, line 2082
2082),o&&o.gates!==i.gates)){const r=Array.from(o.gates),a=Array.from(i.gates),s=a.find(c=>!r.includes(c)),l=r.find(c=>!a.includes(c));this.gateState$.emit({documentId:n,isGated:i.gates.size>0,gates:a,addedGate:s,removedGate:l}),this.logger.debug("ViewportPlugin","GateStateChanged",`Gate state changed for document ${n}. Gates: [${a.join(", ")}], Gated: ${i.gates.size>0}`)}}}async initialize(e){this.logger.info("ViewportPlugin","Initialize","Viewport plugin initialized")}async destroy(){this.viewportMetrics$.clear(),this.viewportResize$.clear(),this.scrollMetrics$.clear(),this.scrollActivity$.clear(),this.gateState$.clear(),this.scrollRequests$.forEach(e=>e.clear()),this.scrollRequests$.clear(),super.destroy()}};Dh.id="viewport";let Jr=Dh;const Hy={manifest:jy,create:(e,t)=>new Jr(vh,e,t),reducer:(e=lc,t)=>{switch(t.type){case yh:{const{documentId:n}=t.payload;return{...e,documents:{...e.documents,[n]:{...By,gates:new Set}}}}case bh:{const{documentId:n}=t.payload,{[n]:o,...i}=e.documents,r=new Set(e.activeViewports);return r.delete(n),{...e,documents:i,activeViewports:r,activeDocumentId:e.activeDocumentId===n?null:e.activeDocumentId}}case wh:{const{documentId:n}=t.payload,o=new Set(e.activeViewports);return o.add(n),{...e,activeViewports:o,activeDocumentId:e.activeDocumentId??n}}case xh:{const{documentId:n}=t.payload,o=new Set(e.activeViewports);return o.delete(n),{...e,activeViewports:o}}case"SET_ACTIVE_VIEWPORT_DOCUMENT":return{...e,activeDocumentId:t.payload};case Ih:return{...e,viewportGap:t.payload};case Ch:{const{documentId:n,metrics:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,viewportMetrics:{width:o.width,height:o.height,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft,clientWidth:o.clientWidth,clientHeight:o.clientHeight,scrollWidth:o.scrollWidth,scrollHeight:o.scrollHeight,clientLeft:o.clientLeft,clientTop:o.clientTop,relativePosition:{x:o.scrollWidth<=o.clientWidth?0:o.scrollLeft/(o.scrollWidth-o.clientWidth),y:o.scrollHeight<=o.clientHeight?0:o.scrollTop/(o.scrollHeight-o.clientHeight)}}}}}:e}case kh:{const{documentId:n,scrollMetrics:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,viewportMetrics:{...i.viewportMetrics,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft},isScrolling:!0}}}:e}case Sh:{const{documentId:n,isScrolling:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,isScrolling:o}}}:e}case Mh:{const{documentId:n,isSmoothScrolling:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,isSmoothScrolling:o}}}:e}case Ah:{const{documentId:n,key:o}=t.payload,i=e.documents[n];if(!i)return e;const r=new Set(i.gates);return r.add(o),{...e,documents:{...e.documents,[n]:{...i,gates:r}}}}case Ph:{const{documentId:n,key:o}=t.payload,i=e.documents[n];if(!i)return e;const r=new Set(i.gates);return r.delete(o),{...e,documents:{...e.documents,[n]:{...i,gates:r}}}}default:return e}},initialState:lc},Th=Rn(null),Qa=()=>at(Jr.id);function Uy(e){const{plugin:t}=$t(Jr.id),n=Q(null);return Es(()=>{if(!t)return;const o=n.current;if(!o)return;try{t.registerViewport(e)}catch(s){return void console.error(`Failed to register viewport for document ${e}:`,s)}const i=()=>{t.setViewportScrollMetrics(e,{scrollTop:o.scrollTop,scrollLeft:o.scrollLeft})};o.addEventListener("scroll",i);const r=new ResizeObserver(()=>{t.setViewportResizeMetrics(e,{width:o.offsetWidth,height:o.offsetHeight,clientWidth:o.clientWidth,clientHeight:o.clientHeight,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft,scrollWidth:o.scrollWidth,scrollHeight:o.scrollHeight,clientLeft:o.clientLeft,clientTop:o.clientTop})});r.observe(o);const a=t.onScrollRequest(e,({x:s,y:l,behavior:c="auto"})=>{requestAnimationFrame(()=>{o.scrollTo({left:s,top:l,behavior:c})})});return()=>{t.unregisterViewport(e),r.disconnect(),o.removeEventListener("scroll",i),a()}},[t,e]),n}function Wy({children:e,documentId:t,...n}){const[o,i]=$(0),r=Uy(t),{provides:a}=Qa(),s=(d=>{const{provides:u}=Qa(),[m,g]=$(u?.isGated(d)??!1);return H(()=>{if(u)return g(u.isGated(d)),u.onGateChange(p=>{p.documentId===d&&g(p.isGated)})},[u,d]),m})(t);H(()=>{a&&i(a.getViewportGap())},[a]);const{style:l,...c}=n;return C(Th.Provider,{value:r,children:C("div",{...c,ref:r,style:{width:"100%",height:"100%",overflow:"auto",...typeof l=="object"?l:{},padding:`${o}px`},children:!s&&e})})}var Ht=(e=>(e.Vertical="vertical",e.Horizontal="horizontal",e))(Ht||{});class zh{constructor(t){this.pageGap=t.pageGap??20,this.viewportGap=t.viewportGap??20,this.bufferSize=t.bufferSize??2}getCenteringOffsetX(t,n){return!n||t.width>=n.width?0:(n.width-t.width)/2}getCenteringOffsetY(t,n){return 0}getVisibleRange(t,n,o){const i=this.getScrollOffset(t),r=i,a=i+this.getClientSize(t);let s=0;for(;s<n.length&&(n[s].offset+this.getItemSizeAlongScrollAxis(n[s]))*o<=r;)s++;let l=s;for(;l<n.length&&n[l].offset*o<=a;)l++;return{start:Math.max(0,s-this.bufferSize),end:Math.min(n.length-1,l+this.bufferSize-1)}}handleScroll(t,n,o){const i=this.getVisibleRange(t,n,o),r=n.slice(i.start,i.end+1),a=this.getTotalContentSize(n),s=this.calculatePageVisibility(r,t,o,a),l=s.map(v=>v.pageNumber),c=n.slice(i.start,i.end+1).flatMap(v=>v.index),d=this.determineCurrentPage(s),u=n[i.start],m=n[i.end],g=u?u.offset*o:0,p=n[n.length-1],f=m?(p.offset+this.getItemSizeAlongScrollAxis(p))*o-(m.offset+this.getItemSizeAlongScrollAxis(m))*o:0;return{currentPage:d,visiblePages:l,pageVisibilityMetrics:s,renderedPageIndexes:c,scrollOffset:{x:t.scrollLeft,y:t.scrollTop},startSpacing:g,endSpacing:f}}calculatePageVisibility(t,n,o,i){const r=[];return t.forEach(a=>{const s=this.getCenteringOffsetX(a,i),l=this.getCenteringOffsetY(a,i);a.pageLayouts.forEach(c=>{const d=(a.x+s)*o,u=(a.y+l)*o,m=d+c.x*o,g=u+c.y*o,p=c.rotatedWidth*o,f=c.rotatedHeight*o,v=n.scrollLeft,y=n.scrollTop,b=v+n.clientWidth,w=y+n.clientHeight,x=Math.max(m,v),k=Math.max(g,y),I=Math.min(m+p,b),S=Math.min(g+f,w);if(x<I&&k<S){const A=I-x,M=S-k,P=p*f,T=A*M;
2082r.push({pageNumber:c.pageNumber,viewportX:x-v,viewportY:k-y,visiblePercentage:T/P*100,original:{pageX:(x-m)/o,pageY:(k-g)/o,visibleWidth:A/o,visibleHeight:M/o,scale:1},scaled:{pageX:x-m,pageY:k-g,visibleWidth:A,visibleHeight:M,scale:o}})}})}),r}determineCurrentPage(t){if(t.length===0)return 1;const n=Math.max(...t.map(i=>i.visiblePercentage)),o=t.filter(i=>i.visiblePercentage===n);return o.length===1?o[0].pageNumber:o.sort((i,r)=>i.pageNumber-r.pageNumber)[0].pageNumber}getRectLocationForPage(t,n,o){const i=n.find(l=>l.pageNumbers.includes(t));if(!i)return null;const r=i.pageLayouts.find(l=>l.pageNumber===t);if(!r)return null;const a=this.getCenteringOffsetX(i,o),s=this.getCenteringOffsetY(i,o);return{origin:{x:i.x+r.x+a,y:i.y+r.y+s},size:{width:r.width,height:r.height}}}getScrollPositionForPage(t,n,o,i,r){const a=this.getTotalContentSize(n),s=this.getRectLocationForPage(t,n,a);if(!s)return null;const l=pr(s.origin,o);if(r){const c=(function(d,u,m,g){return pr(rh(d,u,m),g)})({width:s.size.width,height:s.size.height},{x:r.x,y:r.y},i,o);return{x:l.x+c.x+this.viewportGap,y:l.y+c.y+this.viewportGap}}return{x:l.x+this.viewportGap,y:l.y+this.viewportGap}}getRectPositionForPage(t,n,o,i,r){const a=this.getTotalContentSize(n),s=this.getRectLocationForPage(t,n,a);if(!s)return null;const l=pr(s.origin,o),c=J2({width:s.size.width,height:s.size.height},r,i,o);return{origin:{x:l.x+c.origin.x,y:l.y+c.origin.y},size:c.size}}}class Gy extends zh{constructor(t){super(t)}createVirtualItems(t){let n=0;return t.map((o,i)=>{let r=0;const a=o.map(d=>{const u={pageNumber:d.index+1,pageIndex:d.index,x:r,y:0,width:d.size.width,height:d.size.height,rotatedWidth:d.rotatedSize.width,rotatedHeight:d.rotatedSize.height,elevated:!1};return r+=d.rotatedSize.width+this.pageGap,u}),s=o.reduce((d,u,m)=>d+u.rotatedSize.width+(m<o.length-1?this.pageGap:0),0),l=Math.max(...o.map(d=>d.rotatedSize.height)),c={id:`item-${i}`,x:0,y:n,offset:n,width:s,height:l,pageLayouts:a,pageNumbers:o.map(d=>d.index+1),index:i};return n+=l+this.pageGap,c})}getTotalContentSize(t){return t.length===0?{width:0,height:0}:{width:Math.max(...t.map(n=>n.width)),height:t[t.length-1].y+t[t.length-1].height}}getScrollOffset(t){return t.scrollTop}getClientSize(t){return t.clientHeight}getItemSizeAlongScrollAxis(t){return t.height}}class qy extends zh{constructor(t){super(t)}createVirtualItems(t){let n=0;return t.map((o,i)=>{let r=0;const a=o.map(d=>{const u={pageNumber:d.index+1,pageIndex:d.index,x:r,y:0,width:d.size.width,height:d.size.height,rotatedWidth:d.rotatedSize.width,rotatedHeight:d.rotatedSize.height,elevated:!1};return r+=d.rotatedSize.width+this.pageGap,u}),s=o.reduce((d,u,m)=>d+u.rotatedSize.width+(m<o.length-1?this.pageGap:0),0),l=Math.max(...o.map(d=>d.rotatedSize.height)),c={id:`item-${i}`,x:n,y:0,offset:n,width:s,height:l,pageLayouts:a,pageNumbers:o.map(d=>d.index+1),index:i};return n+=s+this.pageGap,c})}getTotalContentSize(t){return t.length===0?{width:0,height:0}:{width:t[t.length-1].x+t[t.length-1].width,height:Math.max(...t.map(n=>n.height))}}getScrollOffset(t){return t.scrollLeft}getClientSize(t){return t.clientWidth}getItemSizeAlongScrollAxis(t){return t.width}getCenteringOffsetX(t,n){return 0}getCenteringOffsetY(t,n){return!n||t.height>=n.height?0:(n.height-t.height)/2}}const Rh="INIT_SCROLL_STATE",Eh="CLEANUP_SCROLL_STATE",_h="UPDATE_DOCUMENT_SCROLL_STATE",Lh="SET_SCROLL_STRATEGY";function ai(e,t){return{type:_h,payload:{documentId:e,state:t}}}const Vy={isChanging:!1,targetPage:1,fromPage:1,startTime:0},Oh=class extends Ye{constructor(e,t,n){var o,i,r;super(e,t),this.id=e,this.config=n,this.elevatedPages=new Map,this.strategies=new Map,this.layoutReady=new Set,this.initialLayoutFired=new Set,this.scrollerLayoutEmitters=new Map,this.pageChange$=Ae(),this.scroll$=Ae(),this.layoutChange$=Ae(),this.pageChangeState$=Ae(),this.layoutReady$=Ae(),this.state$=Ae(),this.viewport=this.registry.getPlugin("viewport").provides(),this.spread=((o=this.registry.getPlugin("spread"))==null?void 0:o.provides())??null,this.viewport.onScrollActivity(s=>{const l=this.getDocumentState(s.documentId);l?.pageChangeState.isChanging&&!s.activity.isSmoothScrolling&&this.completePageChange(s.documentId)}),(i=this.spread)==null||i.onSpreadChange(s=>{this.refreshDocumentLayout(s.documentId)});const a=(r=this.registry.getPlugin("interaction-manager"))==null?void 0:r.provides();a&&a.onPageActivityChange(s=>{let l=this.elevatedPages.get(s.documentId);s.hasActivity?(l||(l=new Set,this.elevatedPages.set(s.documentId,l)),l.add(s.pageIndex)):l?.delete(s.pageIndex),this.pushScroller
2082Layout(s.documentId)}),this.viewport.onViewportChange(s=>{const l=this.getDocumentState(s.documentId);if(!l)return;const c=this.computeMetrics(s.documentId,s.metrics);this.layoutReady.has(s.documentId)?this.commitMetrics(s.documentId,c):this.commitMetrics(s.documentId,{...c,scrollOffset:l.scrollOffset})})}onDocumentLoadingStarted(e){const t=this.getCoreDocument(e);if(!t)return;const n=this.createDocumentState(t);this.dispatch((function(i,r){return{type:Rh,payload:{documentId:i,state:r}}})(e,n));const o=this.createStrategy(n.strategy);this.strategies.set(e,o),this.scrollerLayoutEmitters.set(e,Ae())}onDocumentLoaded(e){var t;const n=this.getCoreDocument(e);n&&(this.dispatch(ai(e,{totalPages:((t=n.document)==null?void 0:t.pageCount)??0})),this.refreshDocumentLayout(e),this.logger.debug("ScrollPlugin","DocumentOpened",`Initialized scroll state for document: ${e}`))}onDocumentClosed(e){this.strategies.delete(e),this.layoutReady.delete(e),this.initialLayoutFired.delete(e),this.elevatedPages.delete(e);const t=this.scrollerLayoutEmitters.get(e);t&&(t.clear(),this.scrollerLayoutEmitters.delete(e)),this.dispatch((function(n){return{type:Eh,payload:n}})(e)),this.logger.debug("ScrollPlugin","DocumentClosed",`Cleaned up scroll state for document: ${e}`)}onScaleChanged(e){const t=this.coreState.core.documents[e];if(!t||t.status!=="loaded")return;const n=this.viewport.forDocument(e),o=this.computeMetrics(e,n.getMetrics());this.commitMetrics(e,o)}onRotationChanged(e){this.refreshDocumentLayout(e)}onScrollerData(e,t){const n=this.scrollerLayoutEmitters.get(e);if(!n)throw new Error(`No scroller layout emitter found for document: ${e}`);return n.on(t)}getScrollerLayout(e){const t=this.getDocumentState(e),n=this.getCoreDocumentOrThrow(e);if(!t||!n)throw new Error(`Cannot get scroller layout for document: ${e}`);return o=t,i=n.scale,r=this.elevatedPages.get(e),{startSpacing:o.startSpacing,endSpacing:o.endSpacing,totalWidth:o.totalContentSize.width*i,totalHeight:o.totalContentSize.height*i,pageGap:o.pageGap*i,strategy:o.strategy,items:o.renderedPageIndexes.map(a=>({...o.virtualItems[a],pageLayouts:o.virtualItems[a].pageLayouts.map(s=>({...s,rotatedWidth:s.rotatedWidth*i,rotatedHeight:s.rotatedHeight*i,width:s.width*i,height:s.height*i,elevated:r?.has(s.pageIndex)??!1}))}))};var o,i,r}setLayoutReady(e){if(this.layoutReady.has(e))return;const t=this.getDocumentState(e);if(!t)return;this.layoutReady.add(e);const n=!this.initialLayoutFired.has(e);n&&this.initialLayoutFired.add(e),this.viewport.forDocument(e).scrollTo({...t.scrollOffset,behavior:"instant"}),this.layoutReady$.emit({documentId:e,isInitial:n,pageNumber:t.currentPage,totalPages:t.totalPages})}clearLayoutReady(e){this.layoutReady.delete(e)}buildCapability(){return{getCurrentPage:()=>this.getCurrentPage(),getTotalPages:()=>this.getTotalPages(),getPageChangeState:()=>this.getPageChangeState(),scrollToPage:e=>this.scrollToPage(e),scrollToNextPage:e=>this.scrollToNextPage(e),scrollToPreviousPage:e=>this.scrollToPreviousPage(e),getMetrics:e=>this.getMetrics(e),getLayout:()=>this.getLayout(),getRectPositionForPage:(e,t,n,o)=>this.getRectPositionForPage(e,t,n,o),forDocument:e=>this.createScrollScope(e),setScrollStrategy:(e,t)=>this.setScrollStrategyForDocument(e,t),getPageGap:()=>this.state.defaultPageGap,onPageChange:this.pageChange$.on,onScroll:this.scroll$.on,onLayoutChange:this.layoutChange$.on,onLayoutReady:this.layoutReady$.on,onPageChangeState:this.pageChangeState$.on,onStateChange:this.state$.on}}createScrollScope(e){return{getCurrentPage:()=>this.getCurrentPage(e),getTotalPages:()=>this.getTotalPages(e),getPageChangeState:()=>this.getPageChangeState(e),scrollToPage:t=>this.scrollToPage(t,e),scrollToNextPage:t=>this.scrollToNextPage(t,e),scrollToPreviousPage:t=>this.scrollToPreviousPage(t,e),getSpreadPagesWithRotatedSize:()=>this.getSpreadPagesWithRotatedSize(e),getMetrics:t=>this.getMetrics(t,e),getLayout:()=>this.getLayout(e),getRectPositionForPage:(t,n,o,i)=>this.getRectPositionForPage(t,n,o,i,e),setScrollStrategy:t=>this.setScrollStrategyForDocument(t,e),onPageChange:t=>this.pageChange$.on(n=>{n.documentId===e&&t(n)}),onScroll:t=>this.scroll$.on(n=>{n.documentId===e&&t(n.metrics)}),onLayoutChange:t=>this.layoutChange$.on(n=>{n.documentId===e&&t(n.layout)})}}getDocumentState(e){const t=e??this.getActiveDocumentId();return this.state.documents[t]??null}getDocumentStateOrThrow(e){const t=this.getDocumentState(e);if(!t)throw new Error(`Scroll state not found for document: ${e??"active"}`);return t}getStrategy(e){const t=e??this.getActiveDocumentId(),n=this.strategies.get(t);if(!n)throw new Error(`Strategy not found for document: ${t}`);return n}createStrategy(e){const t={pageGap:this.state.defaultPageGap,viewportGap:this.viewport.getViewportGap(),bufferSize:this.state.defaultBufferSize};return e===Ht.Horizontal?new qy(t):new Gy(t)}createDocumentState(e){var t;return{virtualItems:[],totalPages:((t=e.document)==null?void 0:t.pageCount)??0,currentPage:1,totalContentSize:{
2082width:0,height:0},strategy:this.state.defaultStrategy,pageGap:this.state.defaultPageGap,visiblePages:[],pageVisibilityMetrics:[],renderedPageIndexes:[],scrollOffset:{x:0,y:0},startSpacing:0,endSpacing:0,pageChangeState:Vy}}startPageChange(e,t,n="smooth"){const o=this.getDocumentState(e);if(!o)return;const i={isChanging:!0,targetPage:t,fromPage:o.currentPage,startTime:Date.now()};this.dispatch(ai(e,{pageChangeState:i,currentPage:t})),this.pageChange$.emit({documentId:e,pageNumber:t,totalPages:o.totalPages}),n==="instant"&&this.completePageChange(e)}completePageChange(e){const t=this.getDocumentState(e);if(!t||!t.pageChangeState.isChanging)return;const n={isChanging:!1,targetPage:t.pageChangeState.targetPage,fromPage:t.pageChangeState.fromPage,startTime:t.pageChangeState.startTime};this.dispatch(ai(e,{pageChangeState:n}))}computeLayout(e,t){const n=this.getStrategy(e),o=n.createVirtualItems(t);return{virtualItems:o,totalContentSize:n.getTotalContentSize(o)}}computeMetrics(e,t,n){const o=this.getCoreDocumentOrThrow(e),i=this.getDocumentState(e),r=this.getStrategy(e);if(!i)throw new Error(`Document state not found: ${e}`);return r.handleScroll(t,n??i.virtualItems,o.scale)}commitMetrics(e,t){const n=this.getDocumentState(e);if(!n)return;const o=n.pageChangeState.isChanging,i=o&&t.currentPage!==n.currentPage?{...t,currentPage:n.currentPage}:t;this.dispatch(ai(e,i)),this.scroll$.emit({documentId:e,metrics:i}),o||t.currentPage===n.currentPage||this.pageChange$.emit({documentId:e,pageNumber:t.currentPage,totalPages:n.totalPages}),this.pushScrollerLayout(e)}pushScrollerLayout(e){const t=this.scrollerLayoutEmitters.get(e);if(t)try{const n=this.getScrollerLayout(e);t.emit(n)}catch{}}refreshDocumentLayout(e){const t=this.coreState.core.documents[e],n=this.getDocumentState(e);if(!t||!n||t.status!=="loaded")return;const o=this.getSpreadPagesWithRotatedSize(e),i=this.computeLayout(e,o),r=this.viewport.forDocument(e),a=this.computeMetrics(e,r.getMetrics(),i.virtualItems);this.dispatch(ai(e,{...i,...a})),this.layoutChange$.emit({documentId:e,layout:i}),this.pushScrollerLayout(e)}getSpreadPagesWithRotatedSize(e){var t,n;const o=e??this.getActiveDocumentId(),i=this.coreState.core.documents[o];if(!i)throw new Error(`Document ${o} not loaded`);return(((t=this.spread)==null?void 0:t.forDocument(o).getSpreadPages())||((n=i.document)==null?void 0:n.pages.map(r=>[r]))||[]).map(r=>r.map(a=>{const s=((a.rotation??0)+i.rotation)%4;return{...a,rotatedSize:kr(a.size,s,1)}}))}getCurrentPage(e){return this.getDocumentStateOrThrow(e).currentPage}getTotalPages(e){return this.getDocumentStateOrThrow(e).totalPages}getPageChangeState(e){return this.getDocumentStateOrThrow(e).pageChangeState}scrollToPage(e,t){var n;const o=t??this.getActiveDocumentId(),i=this.getDocumentStateOrThrow(o),r=this.getStrategy(o),a=this.getCoreDocumentOrThrow(o),{pageNumber:s,behavior:l="smooth",pageCoordinates:c,alignX:d,alignY:u}=e;this.startPageChange(o,s,l);const m=(n=a.document)==null?void 0:n.pages[s-1],g=((m?.rotation??0)+a.rotation)%4,p=r.getScrollPositionForPage(s,i.virtualItems,a.scale,g,c);p?this.viewport.forDocument(o).scrollTo({...p,behavior:l,alignX:d,alignY:u}):this.completePageChange(o)}scrollToNextPage(e="smooth",t){const n=t??this.getActiveDocumentId(),o=this.getDocumentStateOrThrow(n),i=this.getStrategy(n),r=this.getCoreDocumentOrThrow(n),a=o.virtualItems.findIndex(s=>s.pageNumbers.includes(o.currentPage));if(a>=0&&a<o.virtualItems.length-1){const s=o.virtualItems[a+1].pageNumbers[0];this.startPageChange(n,s,e);const l=i.getScrollPositionForPage(s,o.virtualItems,r.scale,r.rotation);l?this.viewport.forDocument(n).scrollTo({...l,behavior:e}):this.completePageChange(n)}}scrollToPreviousPage(e="smooth",t){const n=t??this.getActiveDocumentId(),o=this.getDocumentStateOrThrow(n),i=this.getStrategy(n),r=this.coreState.core.documents[n],a=o.virtualItems.findIndex(s=>s.pageNumbers.includes(o.currentPage));if(a>0){const s=o.virtualItems[a-1].pageNumbers[0];this.startPageChange(n,s,e);const l=i.getScrollPositionForPage(s,o.virtualItems,r.scale,r.rotation);l?this.viewport.forDocument(n).scrollTo({...l,behavior:e}):this.completePageChange(n)}}getMetrics(e,t){const n=t??this.getActiveDocumentId();if(e)return this.computeMetrics(n,e);const o=this.viewport.forDocument(n);return this.computeMetrics(n,o.getMetrics())}getLayout(e){const t=this.getDocumentStateOrThrow(e);return{virtualItems:t.virtualItems,totalContentSize:t.totalContentSize}}getRectPositionForPage(e,t,n,o,i){var r;const a=i??this.getActiveDocumentId(),s=this.getDocumentStateOrThrow(a),l=this.getStrategy(a),c=this.getCoreDocumentOrThrow(a);let d=o;if(d===void 0){const u=(r=c.document)==null?void 0:r.pages[e];d=((u?.rotation??0)+c.rotation)%4}return l.getRectPositionForPage(e+1,s.virtualItems,n??c.scale,d,t)}setScrollStrategyForDocument(e,t){const n=t??this.getActiveDocumentId(),o=this.getDocumentState(n);if(!o||o.strategy===e)return;const i=this.createStrategy(e);this.strategies.set(n,i),this.dispatch((function(r,a){return{type:Lh,payload:{documentId:r,strategy:a}}})(n,e)),this.refreshDocumentLayout(n)}onStoreUpdated(e,t){for(const n in t.documents){const o=e.documents[n],i=t.documents[n];o!==i&&(this.state$.emit(i),o?.pageChangeState!==i.pageChangeState&&this.pageChangeState$.emit({documentId:n,state:i.pageChangeState}
2082),this.pushScrollerLayout(n))}}async initialize(){this.logger.info("ScrollPlugin","Initialize","Scroll plugin initialized")}async destroy(){this.strategies.clear(),this.layoutReady.clear(),this.initialLayoutFired.clear(),this.elevatedPages.clear();for(const e of this.scrollerLayoutEmitters.values())e.clear();this.scrollerLayoutEmitters.clear(),this.pageChange$.clear(),this.scroll$.clear(),this.layoutChange$.clear(),this.pageChangeState$.clear(),this.layoutReady$.clear(),this.state$.clear(),super.destroy()}};Oh.id="scroll";let Vs=Oh;const cc="scroll",Ky={manifest:{id:cc,name:"Scroll Plugin",version:"1.0.0",provides:["scroll"],requires:["viewport"],optional:["spread","interaction-manager"],defaultConfig:{defaultPageGap:10,defaultBufferSize:4,defaultStrategy:Ht.Vertical}},create:(e,t)=>new Vs(cc,e,t),reducer:(e,t)=>{switch(t.type){case Rh:{const{documentId:n,state:o}=t.payload;return{...e,documents:{...e.documents,[n]:o}}}case Eh:{const{[t.payload]:n,...o}=e.documents;return{...e,documents:o}}case _h:{const{documentId:n,state:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,...o}}}:e}case Lh:{const{documentId:n,strategy:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,strategy:o}}}:e}default:return e}},initialState:(e,t)=>((n,o)=>({defaultStrategy:o.defaultStrategy??Ht.Vertical,defaultPageGap:o.defaultPageGap??10,defaultBufferSize:o.defaultBufferSize??2,documents:{}}))(0,t)},Mo=()=>at(Vs.id),Nh=e=>{const{provides:t}=Mo(),[n,o]=$(1),[i,r]=$(1);return H(()=>{if(!t||!e)return;const a=t.forDocument(e);return o(a.getCurrentPage()),r(a.getTotalPages()),t.onPageChange(s=>{s.documentId===e&&(o(s.pageNumber),r(s.totalPages))})},[t,e]),{provides:t?.forDocument(e)??null,state:{currentPage:n,totalPages:i}}};function Zy({documentId:e,renderPage:t,...n}){const{plugin:o}=$t(Vs.id),[i,r]=$({layout:null,docId:null});H(()=>{if(!o||!e)return;const s=o.onScrollerData(e,l=>{r({layout:l,docId:e})});return()=>{s(),r({layout:null,docId:null}),o.clearLayoutReady(e)}},[o,e]);const a=i.docId===e?i.layout:null;return Es(()=>{o&&e&&a&&o.setLayoutReady(e)},[o,e,a]),a?C("div",{...n,style:{width:`${a.totalWidth}px`,height:`${a.totalHeight}px`,position:"relative",boxSizing:"border-box",margin:"0 auto",...a.strategy===Ht.Horizontal&&{display:"flex",flexDirection:"row"}},children:[C("div",{style:{...a.strategy===Ht.Horizontal?{width:a.startSpacing,height:"100%",flexShrink:0}:{height:a.startSpacing,width:"100%"}}}),C("div",{style:{gap:a.pageGap,display:"flex",alignItems:"center",position:"relative",boxSizing:"border-box",...a.strategy===Ht.Horizontal?{flexDirection:"row",minHeight:"100%"}:{flexDirection:"column",minWidth:"fit-content"}},children:a.items.map(s=>C("div",{style:{display:"flex",justifyContent:"center",gap:a.pageGap},children:s.pageLayouts.map(l=>C("div",{style:{width:`${l.rotatedWidth}px`,height:`${l.rotatedHeight}px`,position:"relative",zIndex:l.elevated?1:void 0},children:t({...l})},l.pageNumber))},s.pageNumbers[0]))}),C("div",{style:{...a.strategy===Ht.Horizontal?{width:a.endSpacing,height:"100%",flexShrink:0}:{height:a.endSpacing,width:"100%"}}})]}):null}var Ot=(e=>(e.None="none",e.Odd="odd",e.Even="even",e))(Ot||{});const $h="SPREAD/INIT_STATE",Fh="SPREAD/CLEANUP_STATE",jh="SPREAD/SET_SPREAD_MODE",Bh="SPREAD/SET_PAGE_GROUPING";function dc(e,t){return{type:Bh,payload:{documentId:e,grouping:t}}}const Hh=class extends Ye{constructor(e,t,n){var o;super(e,t),this.spreadEmitter$=Ae(),this.defaultSpreadMode=n.defaultSpreadMode??Ot.None,this.viewport=((o=t.getPlugin("viewport"))==null?void 0:o.provides())??null}onDocumentLoadingStarted(e){var t;const n={spreadMode:this.defaultSpreadMode};this.dispatch((function(o,i){return{type:$h,payload:{documentId:o,state:i}}})(e,n)),(t=this.viewport)==null||t.gate("spread",e),this.logger.debug("SpreadPlugin","DocumentOpened",`Initialized spread state for document: ${e}`)}onDocumentLoaded(e){var t;const n=this.coreState.core.documents[e];if(n?.document){const o=this.calculatePageGrouping(e,n.document.pages.length);this.dispatch(dc(e,o))}(t=this.viewport)==null||t.releaseGate("spread",e)}onDocumentClosed(e){this.dispatch((function(t){return{type:Fh,payload:t}}
vendor: 5,835 bytes, line 2082
2082)(e)),this.logger.debug("SpreadPlugin","DocumentClosed",`Cleaned up spread state for document: ${e}`)}buildCapability(){return{setSpreadMode:e=>this.setSpreadModeForDocument(e),getSpreadMode:()=>this.getSpreadModeForDocument(),getSpreadPages:()=>this.getSpreadPages(),forDocument:e=>this.createSpreadScope(e),onSpreadChange:this.spreadEmitter$.on}}createSpreadScope(e){return{setSpreadMode:t=>this.setSpreadModeForDocument(t,e),getSpreadMode:()=>this.getSpreadModeForDocument(e),getSpreadPages:()=>this.getSpreadPages(e),onSpreadChange:t=>this.spreadEmitter$.on(n=>{n.documentId===e&&t(n.spreadMode)})}}getDocumentState(e){const t=e??this.getActiveDocumentId();return this.state.documents[t]??null}getDocumentStateOrThrow(e){const t=this.getDocumentState(e);if(!t)throw new Error(`Spread state not found for document: ${e??"active"}`);return t}setSpreadModeForDocument(e,t){const n=t??this.getActiveDocumentId(),o=this.getDocumentStateOrThrow(n),i=this.coreState.core.documents[n];if(!i?.document)throw new Error(`Document ${n} not loaded`);if(o.spreadMode!==e){this.dispatch((function(a,s){return{type:jh,payload:{documentId:a,spreadMode:s}}})(n,e));const r=this.calculatePageGrouping(n,i.document.pages.length);this.dispatch(dc(n,r)),this.spreadEmitter$.emit({documentId:n,spreadMode:e})}}getSpreadModeForDocument(e){return this.getDocumentStateOrThrow(e).spreadMode}calculatePageGrouping(e,t){switch(this.getDocumentStateOrThrow(e).spreadMode){case Ot.None:return Array.from({length:t},(n,o)=>[o]);case Ot.Odd:return Array.from({length:Math.ceil(t/2)},(n,o)=>{const i=[2*o];return 2*o+1<t&&i.push(2*o+1),i});case Ot.Even:return[[0],...Array.from({length:Math.ceil((t-1)/2)},(n,o)=>{const i=[1+2*o];return 1+2*o+1<t&&i.push(1+2*o+1),i})];default:return Array.from({length:t},(n,o)=>[o])}}getSpreadPages(e){const t=e??this.getActiveDocumentId(),n=this.coreState.core.documents[t],o=this.getDocumentStateOrThrow(t);if(!n?.document)throw new Error(`Document ${t} not loaded`);const i=o.pageGrouping??[],r=n.document.pages;return i.map(a=>a.map(s=>r[s]).filter(Boolean))}onStoreUpdated(e,t){for(const n in t.documents){const o=e.documents[n],i=t.documents[n];o?.spreadMode!==i.spreadMode&&this.logger.debug("SpreadPlugin","SpreadModeChanged",`Spread mode changed for document ${n}: ${o?.spreadMode??Ot.None} -> ${i.spreadMode}`)}}async initialize(e){this.logger.info("SpreadPlugin","Initialize","Spread plugin initialized")}async destroy(){this.spreadEmitter$.clear(),super.destroy()}};Hh.id="spread";let Xy=Hh;const Uh="spread",Yy={id:Uh,name:"Spread Plugin",version:"1.0.0",provides:["spread"],requires:[],optional:["viewport"],defaultConfig:{}};Ot.None;const uc={documents:{},activeDocumentId:null},Qy={manifest:Yy,create:(e,t)=>new Xy(Uh,e,t),reducer:(e=uc,t)=>{switch(t.type){case $h:{const{documentId:n,state:o}=t.payload;return{...e,documents:{...e.documents,[n]:o},activeDocumentId:e.activeDocumentId??n}}case Fh:{const n=t.payload,{[n]:o,...i}=e.documents;return{...e,documents:i,activeDocumentId:e.activeDocumentId===n?null:e.activeDocumentId}}case"SPREAD/SET_ACTIVE_DOCUMENT":return{...e,activeDocumentId:t.payload};case jh:{const{documentId:n,spreadMode:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,spreadMode:o}}}:e}case Bh:{const{documentId:n,grouping:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,pageGrouping:o}}}:e}default:return e}},initialState:uc},Dt="ui",Jy={id:Dt,name:"UI Plugin",version:"1.0.0",provides:["ui"],requires:[],optional:["i18n"],defaultConfig:{schema:{id:"empty",version:"1.0.0",toolbars:{},menus:{},sidebars:{},modals:{},selectionMenus:{}}}},Wh="UI/INIT_STATE",Gh="UI/CLEANUP_STATE",qh="UI/SET_ACTIVE_TOOLBAR",Vh="UI/CLOSE_TOOLBAR_SLOT",Kh="UI/SET_ACTIVE_SIDEBAR",Zh="UI/CLOSE_SIDEBAR_SLOT",Xh="UI/SET_SIDEBAR_TAB",Yh="UI/OPEN_MODAL",Qh="UI/CLOSE_MODAL",Jh="UI/CLEAR_MODAL",em="UI/OPEN_MENU",tm="UI/CLOSE_MENU",nm="UI/CLOSE_ALL_MENUS",om="UI/SET_OVERLAY_ENABLED",im="UI/SET_DISABLED_CATEGORIES",rm="UI/SET_HIDDEN_ITEMS",hc=(e,t,n,o,i,r)=>({type:Kh,payload:{documentId:e,placement:t,slot:n,sidebarId:o,activeTab:i,props:r}}),mc=(e,t,n)=>({type:Zh,payload:{documentId:e,placement:t,slot:n}}),pc=(e,t)=>({type:em,payload:{documentId:e,menuState:t}}),gc=(e,t)=>({type:tm,payload:{documentId:e,menuId:t}}),fc=(e,t,n)=>({type:om,payload:{documentId:e,overlayId:t,enabled:n}}),Ki=e=>({type:im,payload:{categories:e}}),Zi=e=>({type:rm,payload:{hiddenItems:e}});function eb(e,t){if(!t)return e;const n={...e};for(const[o,i]of Object.entries(t))n[o]?n[o]={...n[o],...i,items:i.items??n[o].items,responsive:i.responsive??n[o].responsive}:n[o]=i;return n}function tb(e,t){if(!t)return e;const n={...e};for(const[o,i]of Object.entries(t))n[o]?n[o]={...n[o],...i,items:i.items??n[o].items}:n[o]=i;return n}function nb(e,t){if(!t)return e;const n={...e};for(const[o,i]of Object.entries(t))n[o]?n[o]={...n[o],...i,content:i.content??n[o].content}:n[o]=i;return n}function Pr(e,t){var n;if(!((n=e.responsive)!=null&&n.breakpoints))return null;const o=(function(l,c,d){if(!d||!c?.groups)return l;const u=c.groups.find(g=>g.locales.includes(d));if(!u)return l;const m={};for(const[g,p]of Object.entries(l)){const f=u.breakpoints[g];f?m[g]={minWidth:p.minWidth,maxWidth:p.maxWidth,hide:f.replaceHide?f.replaceHide:[...p.hide||[],...f.hide||[]],show:f.replaceShow?f.replaceShow:[...p.show||[],...f.show||[]]}:m[g]=p}return m})(e.responsive.breakpoints,e.responsive.localeOverrides,t),i=new Map,r=new Map;for(const[l,c]of Object.entries(o))r.set(l,{minWidth:c.minWidth,maxWidth:c.maxWidth});const a=new Set,s=l=>{l.forEach(c=>{a.add(c.id),c.type==="group"&&c.items&&s(c.items),c.type==="tab-group"&&c.tabs&&s(c.tabs),c.type==="section"&&c.items&&s(c.items)})};s(e.items);for(const l of a){const c=[];let d=!0;Array.from(Object.entries(o)).sort((m,g)=>
2082(m[1].minWidth??0)-(g[1].minWidth??0)).forEach(([m,g],p)=>{var f,v;const y=(f=g.hide)==null?void 0:f.includes(l),b=(v=g.show)==null?void 0:v.includes(l);(y||b)&&(c.push({breakpointId:m,minWidth:g.minWidth,maxWidth:g.maxWidth,visible:b||!y,priority:p}),p===0&&(d=b||!y))}),c.length>0&&i.set(l,{itemId:l,shouldRender:!0,visibilityRules:c,defaultVisible:d})}return{items:i,breakpoints:r}}const am="data-epdf",sm="data-epdf-s",lm="data-epdf-i",Ks="data-epdf-cat",Zs="data-epdf-dis",cm="data-epdf-hid",An={ROOT:`[${am}]`,STYLES:`[${sm}]`,ITEM:e=>`[${lm}="${e}"]`,CATEGORIES:e=>`[${Ks}~="${e}"]`,DISABLED_CATEGORY:e=>`[${Zs}~="${e}"]`,HIDDEN_ITEM:e=>`[${cm}~="${e}"]`},ob={useContainerQueries:!0};function ib(e,t={}){const n={...ob,...t.config},o=t.locale,i=dm(e,o),r=[];r.push((function(c){return`/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ */ 2083/* EmbedPDF UI Stylesheet - Auto-generated${c?` (locale: ${c})`:""} */ 2084/* DO NOT EDIT MANUALLY - This file is generated from your UI schema */ 2085/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ */`})(o));const a=(function(c,d){const u=[],m=d.useContainerQueries?"@container":"@media",g=new Set;return c.responsiveItems.forEach((p,f)=>{if(g.has(f))return;g.add(f);const v=(function(y,b,w){if(b.visibilityRules.length===0)return null;const x=[],k=An.ITEM(y);b.defaultVisible||x.push(`${k} { display: none; }`);for(const I of b.visibilityRules){const S=[];if(I.minWidth!==void 0&&S.push(`(min-width: ${I.minWidth}px)`),I.maxWidth!==void 0&&S.push(`(max-width: ${I.maxWidth}px)`),S.length>0){const A=I.visible?"flex":"none";x.push(`${w} ${S.join(" and ")} { 2086 ${k} { display: ${A}; } 2087}`)}}return x.length>0?x.join(` 2088`):null})(f,p,m);v&&u.push(v)}),u.length===0?"":`/* âââ Responsive Visibility Rules âââ */ 2089/* Items show/hide based on container width */ 2090 2091${u.join(` 2092 2093`)}`})(i,n);a&&r.push(a);const s=(function(c){if(c.categories.size===0)return"";const d=[],u=Array.from(c.categories).sort();for(const m of u)d.push(`${An.ROOT}[${Zs}~="${m}"] [${Ks}~="${m}"] { 2094 display: none !important; 2095}`);return`/* âââ Category Visibility Rules âââ */ 2096/* Items hide when ANY of their categories is disabled */ 2097/* Use: data-disabled-categories="category1 category2" on root element */ 2098 2099${d.join(` 2100 2101`)}`})(i);s&&r.push(s);const l=(function(c,d){if(c.dependencies.length===0)return"";const u=[],m=d.useContainerQueries?"@container":"@media";for(const g of c.dependencies){const p=ub(g,c,m);p.length>0&&u.push(...p)}return u.length===0?"":`/* âââ Dependency Visibility Rules âââ */ 2102/* Container elements hide when all their dependencies are hidden */ 2103 2104${u.join(` 2105 2106`)}`})(i,n);return l&&r.push(l),r.filter(c=>c.trim()).join(` 2107 2108`)}function Xi(e,t){const n=new Set(t),o=[];return e.forEach((i,r)=>{i.some(a=>n.has(a))&&o.push(r)}),o}function dm(e,t){const n=new Set,o=new Map,i=[],r=new Map,a=new Map;for(const[s,l]of Object.entries(e.menus))rb(s,l,n,o,i,r,a,t);for(const[s,l]of Object.entries(e.toolbars))sb(s,l,n,o,i,a,t);for(const[s,l]of Object.entries(e.sidebars))cb(s,l,n,o,i);for(const[s,l]of Object.entries(e.selectionMenus||{}))db(s,l,n,o,i,a,t);return{categories:n,itemCategories:o,dependencies:i,menuBreakpoints:r,responsiveItems:a}}function rb(e,t,n,o,i,r,a,s){Tn(e,t.categories,t.visibilityDependsOn,n,o,i),um(t.items,n,o,i);const l=Pr(t,s);l&&l.items.forEach((d,u)=>{a.set(u,d)});const c=(function(d,u,m){var g;const p=[],f=Pr(d,m);if((g=d.responsive)!=null&&g.breakpoints&&f){const v=Array.from(f.breakpoints.entries()).sort((y,b)=>(y[1].minWidth??0)-(b[1].minWidth??0));for(const[y,b]of v){const w=ab(f,b),x=new Set;for(const k of w){const I=u.get(k);I&&I.forEach(S=>x.add(S))}p.push({minWidth:b.minWidth,maxWidth:b.maxWidth,visibleItemIds:w,visibleCategories:x})}}else{const v=[],y=new Set;hm(d.items,u,v,y),p.push({visibleItemIds:v,visibleCategories:y})}return p})(t,o,s);r.set(e,c)}function um(e,t,n,o){for(const i of e)Tn(i.id,i.categories,i.visibilityDependsOn,t,n,o),i.type==="section"&&um(i.items,t,n,o)}function hm(e,t,n,o){for(const i of e){n.push(i.id);const r=t.get(i.id);r&&r.forEach(a=>o.add(a)),i.type==="section"&&hm(i.items,t,n,o)}}function ab(e,t){const n=[];
2108return e.items.forEach((o,i)=>{let r=o.defaultVisible;for(const a of o.visibilityRules)(a.minWidth===void 0||t.minWidth!==void 0&&t.minWidth>=a.minWidth)&&(a.maxWidth===void 0||t.maxWidth!==void 0&&t.maxWidth<=a.maxWidth)&&(r=a.visible);r&&n.push(i)}),n}function sb(e,t,n,o,i,r,a){Tn(e,t.categories,t.visibilityDependsOn,n,o,i);const s=Pr(t,a);s&&s.items.forEach((l,c)=>{r.set(c,l)}),mm(t.items,n,o,i)}function mm(e,t,n,o){for(const i of e)Tn(i.id,i.categories,i.visibilityDependsOn,t,n,o),i.type==="group"&&i.items&&mm(i.items,t,n,o),i.type==="tab-group"&&i.tabs&&lb(i.tabs,t,n,o)}function lb(e,t,n,o){for(const i of e)Tn(i.id,i.categories,i.visibilityDependsOn,t,n,o)}function cb(e,t,n,o,i){if(Tn(e,t.categories,t.visibilityDependsOn,n,o,i),t.content.type==="tabs")for(const r of t.content.tabs)Tn(r.id,r.categories,r.visibilityDependsOn,n,o,i)}function db(e,t,n,o,i,r,a){if(Tn(e,t.categories,t.visibilityDependsOn,n,o,i),t.responsive){const s=Pr(t,a);s&&s.items.forEach((l,c)=>{r.set(c,l)})}pm(t.items,n,o,i)}function pm(e,t,n,o){for(const i of e)Tn(i.id,i.categories,i.visibilityDependsOn,t,n,o),i.type==="group"&&i.items&&pm(i.items,t,n,o)}function Tn(e,t,n,o,i,r){var a;t?.length&&(t.forEach(s=>o.add(s)),i.set(e,t)),n&&(n.menuId||(a=n.itemIds)!=null&&a.length)&&r.push({itemId:e,dependsOnMenuId:n.menuId,dependsOnItemIds:n.itemIds})}function ub(e,t,n,o){var i;const r=[];if(e.dependsOnMenuId){const a=t.menuBreakpoints.get(e.dependsOnMenuId);if(a&&a.length>0){r.push(`/* "${e.itemId}" depends on menu "${e.dependsOnMenuId}" */`);for(const s of a){if(s.visibleItemIds.length===0)continue;const l=s.visibleItemIds.sort().map(u=>An.HIDDEN_ITEM(u)).join(""),c=`${An.ROOT}${l} ${An.ITEM(e.itemId)} { 2109 display: none !important; 2110}`,d=[];s.minWidth!==void 0&&d.push(`(min-width: ${s.minWidth}px)`),s.maxWidth!==void 0&&d.push(`(max-width: ${s.maxWidth}px)`),d.length>0?r.push(`${n} ${d.join(" and ")} { 2111 ${c} 2112}`):r.push(c)}}}if((i=e.dependsOnItemIds)!=null&&i.length){r.push(`/* "${e.itemId}" depends on items: ${e.dependsOnItemIds.join(", ")} */`);const a=e.dependsOnItemIds.sort().map(s=>An.HIDDEN_ITEM(s)).join("");r.push(`${An.ROOT}${a} ${An.ITEM(e.itemId)} { 2113 display: none !important; 2114}`)}return r}function yt(e,t){var n;return{[lm]:e.id,[Ks]:((n=e.categories)==null?void 0:n.join(" "))||void 0,...t}}const gm=class extends Ye{constructor(e,t,n){var o,i;if(super(e,t),this.cachedStylesheet=null,this.cachedLocale=null,this.i18n=null,this.i18nCleanup=null,this.categoryChanged$=Ae(),this.stylesheetInvalidated$=xt(),this.toolbarChanged$=et((r,a)=>({documentId:r,...a}),{cache:!1}),this.sidebarChanged$=et((r,a)=>({documentId:r,...a}),{cache:!1}),this.modalChanged$=et((r,a)=>({documentId:r,...a}),{cache:!1}),this.menuChanged$=et((r,a)=>({documentId:r,...a}),{cache:!1}),this.overlayChanged$=et((r,a)=>({documentId:r,...a}),{cache:!1}),this.schema=n.schema,this.stylesheetConfig=n.stylesheetConfig||{},this.itemCategories=dm(this.schema).itemCategories,(o=n.disabledCategories)==null?void 0:o.length){this.dispatch(Ki(n.disabledCategories));const r=Xi(this.itemCategories,n.disabledCategories);this.dispatch(Zi(r))}this.i18n=((i=t.getPlugin("i18n"))==null?void 0:i.provides())??null,this.i18n&&(this.i18nCleanup=this.i18n.onLocaleChange(({currentLocale:r})=>{this.handleLocaleChange(r)}),this.cachedLocale=this.i18n.getLocale())}async initialize(){this.logger.info("UIPlugin","Initialize","UI plugin initialized")}async destroy(){this.i18nCleanup&&(this.i18nCleanup(),this.i18nCleanup=null),this.toolbarChanged$.clear(),this.sidebarChanged$.clear(),this.modalChanged$.clear(),this.menuChanged$.clear(),this.overlayChanged$.clear(),this.stylesheetInvalidated$.clear(),super.destroy()}onDocumentLoadingStarted(e){this.dispatch(((t,n)=>({type:Wh,payload:{documentId:t,schema:n}}))(e,this.schema))}onDocumentClosed(e){this.dispatch((t=>({type:Gh,payload:{documentId:t}}))(e)),this.toolbarChanged$.clearScope(e),this.sidebarChanged$.clearScope(e),this.modalChanged$.clearScope(e),this.menuChanged$.clearScope(e),this.overlayChanged$.clearScope(e)}handleLocaleChange(e){this.cachedLocale!==e&&(this.logger.debug("UIPlugin","LocaleChange",`Locale changed: ${this.cachedLocale} -> ${e}`),this.cachedLocale=e,this.invalidateStylesheet(),this.stylesheetInvalidated$.emit())}getStylesheet(){var e;const t=((e=this.i18n)==null?void 0:e.getLocale())??null;return this.cachedStylesheet&&this.cachedLocale===t||(this.cachedStylesheet=ib(this.schema,{config:this.stylesheetConfig,locale:t??void 0}),this.cachedLocale=t),this.cachedStylesheet}getLocale(){var e;return((e=this.i18n)==null?void 0:e.getLocale())??null}invalidateStylesheet(){this.cachedStylesheet=null}onStylesheetInvalidated(e){return this.stylesheetInvalidated$.on(e)}disableCategoryImpl(e){const t=new Set(this.state.disabledCategories);if(!t.has(e)){t.add(e);const n=Array.from(t);this.dispatch(Ki(n));const o=Xi(this.itemCategories,n);this.dispatch(Zi(o)),this.categoryChanged$.emit({disabledCategories:n,hiddenItems:o})}}enableCategoryImpl(e){const t=new Set(this.state.disabledCategories);if(t.has(e)){t.delete(e);const n=Array.from(t);this.dispatch(Ki(n));const o=Xi(this.itemCategories,n);this.dispatch(Zi(o)),this.categoryChanged$.emit({disabledCategories:n,hiddenItems:o})}}toggleCategoryImpl(e){this.state.disabledCategories.includes(e)?this.enableCategoryImpl(e):this.disableCategoryImpl(e)}setDisabledCategoriesImpl(e){this.dispatch(Ki(e));const t=Xi(this.itemCategories,e);this.dispatch(Zi(t)),this.categoryChanged$.emit({disabledCategories:e,hiddenItems:t})}buildCapability(){return{setActiveToolbar:(e,t,n,o)=>
vendor: 13,576 bytes, line 2114
2114this.setToolbarForDocument(e,t,n,o),setActiveSidebar:(e,t,n,o,i,r)=>this.setSidebarForDocument(e,t,n,o,i,r),toggleSidebar:(e,t,n,o,i,r)=>this.toggleSidebarForDocument(e,t,n,o,i,r),openModal:(e,t,n)=>this.openModalForDocument(e,t,n),openMenu:(e,t,n,o)=>this.openMenuForDocument(e,t,n,o),toggleMenu:(e,t,n,o)=>this.toggleMenuForDocument(e,t,n,o),enableOverlay:(e,t)=>this.enableOverlayForDocument(e,t),disableOverlay:(e,t)=>this.disableOverlayForDocument(e,t),toggleOverlay:(e,t)=>this.toggleOverlayForDocument(e,t),forDocument:e=>this.createUIScope(e),getSchema:()=>this.schema,mergeSchema:e=>{var t,n;this.schema=(t=this.schema,n=e,{...t,...n,toolbars:eb(t.toolbars,n.toolbars),menus:tb(t.menus,n.menus),sidebars:nb(t.sidebars,n.sidebars)})},disableCategory:e=>this.disableCategoryImpl(e),enableCategory:e=>this.enableCategoryImpl(e),toggleCategory:e=>this.toggleCategoryImpl(e),setDisabledCategories:e=>this.setDisabledCategoriesImpl(e),getDisabledCategories:()=>this.state.disabledCategories,isCategoryDisabled:e=>this.state.disabledCategories.includes(e),getHiddenItems:()=>this.state.hiddenItems,onToolbarChanged:this.toolbarChanged$.onGlobal,onSidebarChanged:this.sidebarChanged$.onGlobal,onModalChanged:this.modalChanged$.onGlobal,onMenuChanged:this.menuChanged$.onGlobal,onOverlayChanged:this.overlayChanged$.onGlobal,onCategoryChanged:this.categoryChanged$.on}}createUIScope(e){return{setActiveToolbar:(t,n,o)=>this.setToolbarForDocument(t,n,o,e),getActiveToolbar:(t,n)=>this.getToolbarForDocument(t,n,e),closeToolbarSlot:(t,n)=>this.closeToolbarForDocument(t,n,e),isToolbarOpen:(t,n,o)=>this.isToolbarOpenForDocument(t,n,o,e),setActiveSidebar:(t,n,o,i,r)=>this.setSidebarForDocument(t,n,o,e,i,r),getActiveSidebar:(t,n)=>this.getSidebarForDocument(t,n,e),closeSidebarSlot:(t,n)=>this.closeSidebarForDocument(t,n,e),toggleSidebar:(t,n,o,i,r)=>this.toggleSidebarForDocument(t,n,o,e,i,r),isSidebarOpen:(t,n,o)=>this.isSidebarOpenForDocument(t,n,o,e),setSidebarTab:(t,n)=>this.setSidebarTabForDocument(t,n,e),getSidebarTab:t=>this.getSidebarTabForDocument(t,e),openModal:(t,n)=>this.openModalForDocument(t,n,e),closeModal:()=>this.closeModalForDocument(e),clearModal:()=>this.clearModalForDocument(e),getActiveModal:()=>this.getActiveModalForDocument(e),isModalOpen:()=>this.isModalOpenForDocument(e),openMenu:(t,n,o)=>this.openMenuForDocument(t,n,o,e),closeMenu:t=>this.closeMenuForDocument(t,e),toggleMenu:(t,n,o)=>this.toggleMenuForDocument(t,n,o,e),closeAllMenus:()=>this.closeAllMenusForDocument(e),isMenuOpen:t=>this.isMenuOpenForDocument(t,e),getOpenMenus:()=>this.getOpenMenusForDocument(e),enableOverlay:t=>this.enableOverlayForDocument(t,e),disableOverlay:t=>this.disableOverlayForDocument(t,e),toggleOverlay:t=>this.toggleOverlayForDocument(t,e),isOverlayEnabled:t=>this.isOverlayEnabledForDocument(t,e),getEnabledOverlays:()=>this.getEnabledOverlaysForDocument(e),getSchema:()=>this.schema,getState:()=>this.getDocumentStateOrThrow(e),onToolbarChanged:this.toolbarChanged$.forScope(e),onSidebarChanged:this.sidebarChanged$.forScope(e),onModalChanged:this.modalChanged$.forScope(e),onMenuChanged:this.menuChanged$.forScope(e),onOverlayChanged:this.overlayChanged$.forScope(e)}}getDocumentState(e){const t=e??this.getActiveDocumentId();return this.state.documents[t]??null}getDocumentStateOrThrow(e){const t=this.getDocumentState(e);if(!t)throw new Error(`UI state not found for document: ${e??"active"}`);return t}setToolbarForDocument(e,t,n,o){const i=o??this.getActiveDocumentId();this.dispatch(((r,a,s,l)=>({type:qh,payload:{documentId:r,placement:a,slot:s,toolbarId:l}}))(i,e,t,n)),this.toolbarChanged$.emit(i,{placement:e,slot:t,toolbarId:n})}getToolbarForDocument(e,t,n){const o=`${e}-${t}`,i=this.getDocumentStateOrThrow(n).activeToolbars[o];return i?.isOpen?i.toolbarId:null}closeToolbarForDocument(e,t,n){const o=n??this.getActiveDocumentId();this.dispatch(((i,r,a)=>({type:Vh,payload:{documentId:i,placement:r,slot:a}}))(o,e,t)),this.toolbarChanged$.emit(o,{placement:e,slot:t,toolbarId:""})}isToolbarOpenForDocument(e,t,n,o){const i=`${e}-${t}`,r=this.getDocumentStateOrThrow(o).activeToolbars[i];return!(!r||!r.isOpen)&&(!n||r.toolbarId===n)}setSidebarForDocument(e,t,n,o,i,r){const a=o??this.getActiveDocumentId();this.dispatch(hc(a,e,t,n,i,r)),this.sidebarChanged$.emit(a,{placement:e,slot:t,sidebarId:n})}getSidebarForDocument(e,t,n){const o=`${e}-${t}`,i=this.getDocumentStateOrThrow(n).activeSidebars[o];return i?.isOpen?i.sidebarId:null}closeSidebarForDocument(e,t,n){const o=n??this.getActiveDocumentId();this.dispatch(mc(o,e,t)),this.sidebarChanged$.emit(o,{placement:e,slot:t,sidebarId:""})}toggleSidebarForDocument(e,t,n,o,i,r){const a=o??this.getActiveDocumentId(),s=`${e}-${t}`,l=this.getDocumentStateOrThrow(a).activeSidebars[s];l?.sidebarId===n&&l?.isOpen?(this.dispatch(mc(a,e,t)),this.sidebarChanged$.emit(a,{placement:e,slot:t,sidebarId:""})):(this.dispatch(hc(a,e,t,n,i,r)),this.sidebarChanged$.emit(a,{placement:e,slot:t,sidebarId:n}))}isSidebarOpenForDocument(e,t,n,o){const i=`${e}-${t}`,r=this.getDocumentStateOrThrow(o).activeSidebars[i];return!(!r||!r.isOpen)&&(!n||r.sidebarId===n)}setSidebarTabForDocument(e,t,n){const o=n??this.getActiveDocumentId();this.dispatch(((i,r,a)=>({type:Xh,payload:{documentId:i,sidebarId:r,tabId:a}}))(o,e,t))}getSidebarTabForDocument(e,t){return this.getDocumentStateOrThrow(t).sidebarTabs[e]??null}openModalForDocument(e,t,n){const o=n??this.getActiveDocumentId();this.dispatch(((i,r,a)=>({type:Yh,payload:{documentId:i,modalId:r,props:a}}))(o,e,t)),this.modalChanged$.emit(o,{modalId:e,isOpen:!0})}closeModalForDocument(e){const t=e??this.getActiveDocumentId(),n=this.getDocumentStateOrThrow(t).activeModal;this.dispatch((o=>({type:Qh,payload:{documentId:o}}))(t)),this.modalChanged$.emit(t,{modalId:n?.modalId??null,isOpen:!1})}clearModalForDocument(e){const t=e??this.getActiveDocumentId();this.dispatch((n=>({type:Jh,payload:{documentId:n}}))(t))}getActiveModalForDocument(e){return this.getDocumentStateOrThrow(e).activeModal}isModalOpenForDocument(e){const t=this.getDocumentStateOrThrow(e).activeModal;return t?.isOpen??!1}openMenuForDocument(e,t,n,o){const i=o??this.getActiveDocumentId();this.dispatch(pc(i,{menuId:e,triggeredByCommandId:t,triggeredByItemId:n})),this.menuChanged$.emit(i,{menuId:e,isOpen:!0})}closeMenuForDocument(e,t){const n=t??this.getActiveDocumentId();this.dispatch(gc(n,e)),this.menuChanged$.emit(n,{menuId:e,isOpen:!1})}toggleMenuForDocument(e,t,n,o){const i=o??this.getActiveDocumentId();this.getDocumentStateOrThrow(i).openMenus[e]?(this.dispatch(gc(i,e)),this.menuChanged$.emit(i,{menuId:e,isOpen:!1})):(this.dispatch(pc(i,{menuId:e,triggeredByCommandId:t,triggeredByItemId:n})),this.menuChanged$.emit(i,{menuId:e,isOpen:!0}))}closeAllMenusForDocument(e){const t=e??this.getActiveDocumentId();this.dispatch((n=>({type:nm,payload:{documentId:n}}))(t))}isMenuOpenForDocument(e,t){return!!this.getDocumentStateOrThrow(t).openMenus[e]}getOpenMenusForDocument(e){return Object.values(this.getDocumentStateOrThrow(e).openMenus)}enableOverlayForDocument(e,t){const n=t??this.getActiveDocumentId();this.dispatch(fc(n,e,!0)),this.overlayChanged$.emit(n,{overlayId:e,isEnabled:!0})}disableOverlayForDocument(e,t){const n=t??this.getActiveDocumentId();this.dispatch(fc(n,e,!1)),this.overlayChanged$.emit(n,{overlayId:e,isEnabled:!1})}toggleOverlayForDocument(e,t){const n=t??this.getActiveDocumentId();this.isOverlayEnabledForDocument(e,n)?this.disableOverlayForDocument(e,n):this.enableOverlayForDocument(e,n)}isOverlayEnabledForDocument(e,t){return this.getDocumentStateOrThrow(t).enabledOverlays[e]??!0}getEnabledOverlaysForDocument(e){const t=this.getDocumentStateOrThrow(e).enabledOverlays;return Object.entries(t).filter(([,n])=>n).map(([n])=>n)}};gm.id="ui";let Xs=gm;const ao={activeToolbars:{},activeSidebars:{},activeModal:null,openMenus:{},sidebarTabs:{},enabledOverlays:{}},vc={documents:{},disabledCategories:[],hiddenItems:[]};function fm(e,t){const n=(function(o){return o.ui??null})(e);return n?.documents[t]??null}function vm(e,t){return`${e}-${t}`}function _o(e,t,n,o,i){const r=(function(a,s,l,c){const d=fm(a,s);return d?d.activeToolbars[vm(l,c)]??null:null})(e,t,n,o);return!(!r||!r.isOpen)&&(!i||r.toolbarId===i)}function pn(e,t,n,o,i){const r=(function(a,s,l,c){const d=fm(a,s);return d?d.activeSidebars[vm(l,c)]??null:null})(e,t,n,o);return!(!r||!r.isOpen)&&(!i||r.sidebarId===i)}const hb={manifest:Jy,create:(e,t)=>new Xs(Dt,e,t),reducer:(e=vc,t)=>{var n;switch(t.type){case Wh:{const{documentId:o,schema:i}=t.payload,r={};Object.values(i.toolbars).forEach(s=>{if(s.permanent&&s.position){const l=`${s.position.placement}-${s.position.slot}`;r[l]={toolbarId:s.id,isOpen:!0}}});const a={};return i.overlays&&Object.values(i.overlays).forEach(s=>{a[s.id]=s.defaultEnabled??!0}),{...e,documents:{...e.documents,[o]:{...ao,activeToolbars:r,enabledOverlays:a}}}}case Gh:{const{documentId:o}=t.payload,{[o]:i,...r}=e.documents;return{...e,documents:r}}case qh:{const{documentId:o,placement:i,slot:r,toolbarId:a}=t.payload,s=e.documents[o]||ao,l=`${i}-${r}`;return{...e,documents:{...e.documents,[o]:{...s,activeToolbars:{...s.activeToolbars,[l]:{toolbarId:a,isOpen:!0}}}}}}case Vh:{const{documentId:o,placement:i,slot:r}=t.payload,a=e.documents[o];if(!a)return e;const s=`${i}-${r}`,l=a.activeToolbars[s];return l?{...e,documents:{...e.documents,[o]:{...a,activeToolbars:{...a.activeToolbars,[s]:{...l,isOpen:!1}}}}}:e}case Kh:{const{documentId:o,placement:i,slot:r,sidebarId:a,activeTab:s,props:l}=t.payload,c=e.documents[o]||ao,d=`${i}-${r}`;return{...e,documents:{...e.documents,[o]:{...c,activeSidebars:{...c.activeSidebars,[d]:{sidebarId:a,isOpen:!0,props:l}},...s&&{sidebarTabs:{...c.sidebarTabs,[a]:s}}}}}}case Zh:{const{documentId:o,placement:i,slot:r}=t.payload,a=e.documents[o];if(!a)return e;const s=`${i}-${r}`,l=a.activeSidebars[s];return l?{...e,documents:{...e.documents,[o]:{...a,activeSidebars:{...a.activeSidebars,[s]:{...l,isOpen:!1}}}}}:e}case Xh:{const{documentId:o,sidebarId:i,tabId:r}=t.payload,a=e.documents[o]||ao;return{...e,documents:{...e.documents,[o]:{...a,sidebarTabs:{...a.sidebarTabs,[i]:r}}}}}case Yh:{const{documentId:o,modalId:i,props:r}=t.payload,a=e.documents[o]||ao;return{...e,documents:{...e.documents,[o]:{...a,activeModal:{modalId:i,isOpen:!0,props:r},openMenus:{}}}}}case Qh:{const{documentId:o}=t.payload,i=e.documents[o];return i?.activeModal?{...e,documents:{...e.documents,[o]:{...i,activeModal:{...i.activeModal,isOpen:!1}}}}:e}case Jh:{const{documentId:o}=t.payload,i=e.documents[o];return i?(n=i.activeModal)!=null&&n.isOpen?e:{...e,documents:{...e.documents,[o]:{...i,activeModal:null}}}:e}case em:{const{documentId:o,menuState:i}=t.payload,r=e.documents[o]||ao;return{...e,documents:{...e.documents,[o]:{...r,openMenus:{[i.menuId]:i}}}}}case tm:{const{documentId:o,menuId:i}=t.payload,r=e.documents[o];if(!r)return e;const{[i]:a,...s}=r.openMenus;return{...e,documents:{...e.documents,[o]:{...r,openMenus:s}}}}case nm:{const{documentId:o}=t.payload,i=e.documents[o];return i?{...e,documents:{...e.documents,[o]:{...i,openMenus:{}}}}:e}case om:{const{documentId:o,overlayId:i,enabled:r}=t.payload,a=e.documents[o]||ao;return{...e,documents:{...e.documents,[o]:{...a,enabledOverlays:{...a.enabledOverlays,[i]:r}}}}}case im:return{...e,disabledCategories:t.payload.categories};case rm:return{...e,hiddenItems:t.payload.hiddenItems};default:return e}},initialState:vc},Ao=()=>at(Xs.id),ym=e=>{const{provides:t}=Ao(),[n,o]=$(null);return H(()=>{if(!t)return;const i=t.forDocument(e);o(i.getState());const r=i.onToolbarChanged(()=>o(i.getState())),a=i.onSidebarChanged(()=>o(i.getState())),s=i.onModalChanged(()=>o(i.getState())),l=i.onMenuChanged(()=>o(i.getState())),c=i.onOverlayChanged(()=>o(i.getState()));return()=>{r(),a(),s(),l(),c()}},[t,e]),n},bm=Rn(null);function wm(){const e=En(bm);if(!e)throw new Error("useUIContainer must be used within a UIProvider");return e}const xm=Rn(null);function mb({children:e}){const t=Q(new Map),n={register:Y((o,i,r)=>{const a=`${o}:${i}`;t.current.set(a,r)},[]),unregister:Y((o,i)=>{const r=`${o}:${i}`;t.current.delete(r)},[]),getAnchor:Y((o,i)=>{const r=`${o}:${i}`;return t.current.get(r)||null},[])};return C(xm.Provider,{value:n,children:e})}function Cm(){const e=En(xm);if(!e)throw new Error("useAnchorRegistry must be used within UIProvider");return e}function km(e,t){const n=Cm(),o=Q(null),i=Q(e),r=Q(t);return i.current=e,r.current=t,Y(a=>{const s=o.current;o.current=a,a?a!==s&&n.register(i.current,r.current,a):s&&n.unregister(i.current,r.current)},[n])}const Im=Rn(null);function pb({children:e,initialComponents:t={}}){const n=Q(new Map(Object.entries(t))),o={register:Y((i,r)=>{n.current.set(i,r)},[]),unregister:Y(i=>{n.current.delete(i)},[]),get:Y(i=>n.current.get(i),[]),has:Y(i=>n.current.has(i),[]),getRegisteredIds:Y(()=>Array.from(n.current.keys()),[])};return C(Im.Provider,{value:o,children:e})}function ea(){const e=(function(){const t=En(Im);if(!t)throw new Error("useComponentRegistry must be used within UIProvider");return t})();return{renderCustomComponent:(t,n,o)=>{const i=e.get(t);return i?C(i,{documentId:n,...o||{}}):(console.error(`Component "${t}" not found in registry`),null)}}}const Sm=Rn(null);function gb({children:e,renderers:t}){return C(Sm.Provider,{value:t,children:e})}function Ys(){const e=En(Sm);if(!e)throw new Error("useRenderers must be used within UIProvider");return e}function Yi(e,t){var n;const{provides:o}=Ao(),i=Ys(),r=Y(s=>{var l;const c=o?.getSchema(),d=(l=c?.selectionMenus)==null?void 0:l[e];
2114return!d||!s.selected?null:C(i.selectionMenu,{schema:d,documentId:t,props:s})},[o,i,e,t]),a=o?.getSchema();if((n=a?.selectionMenus)!=null&&n[e])return r}function fb({container:e,documentId:t}){const n=ym(t),{provides:o}=Ao(),i=Cm(),r=Ys(),[a,s]=$(null),l=n?.openMenus||{},c=o?.getSchema();if(H(()=>{const u=Object.keys(l);if(u.length>0){const m=u[0];if(!m)return void s(null);const g=l[m];if(g&&g.triggeredByItemId){const p=i.getAnchor(t,g.triggeredByItemId);s({menuId:m,anchorEl:p})}else s(null)}else s(null)},[l,i,t]),!a||!c)return null;const d=c.menus[a.menuId];return d?C(r.menu,{schema:d,documentId:t,anchorEl:a.anchorEl,onClose:()=>{a&&o?.forDocument(t).closeMenu(a.menuId)},container:e}):(console.warn(`Menu "${a.menuId}" not found in schema`),null)}function vb({children:e,style:t,...n}){const{plugin:o}=$t(Xs.id),{provides:i}=Ao(),[r,a]=$([]),[s,l]=$([]),c=Q(null),d=Q(null),u=Q(null),m=Q(null),g=ee(()=>({containerRef:m,getContainer:()=>m.current}),[]),p=Y(w=>{const x=u.current;if(u.current=w,m.current=w,w&&w!==x&&o){const k=(function(M){const P=M.getRootNode();return P instanceof ShadowRoot?P:document.head})(w);d.current=k;const I=k.querySelector(An.STYLES);if(I)return c.current=I,void(I.textContent=o.getStylesheet());const S=o.getStylesheet(),A=document.createElement("style");A.setAttribute(sm,""),A.textContent=S,k instanceof ShadowRoot?k.insertBefore(A,k.firstChild):k.appendChild(A),c.current=A}},[o]);H(()=>()=>{var w;(w=c.current)!=null&&w.parentNode&&!u.current&&c.current.remove(),c.current=null,d.current=null},[]),H(()=>{if(o)return o.onStylesheetInvalidated(()=>{c.current&&(c.current.textContent=o.getStylesheet())})},[o]),H(()=>
2114{if(i)return a(i.getDisabledCategories()),l(i.getHiddenItems()),i.onCategoryChanged(({disabledCategories:w,hiddenItems:x})=>{a(w),l(x)})},[i]);const f=ee(()=>r.length>0?r.join(" "):void 0,[r]),v=ee(()=>s.length>0?s.join(" "):void 0,[s]),y=ee(()=>{const w={containerType:"inline-size"};return t&&typeof t=="object"?{...w,...t}:w},[t]),b={[am]:"",[Zs]:f,[cm]:v};return C(bm.Provider,{value:g,children:C("div",{ref:p,...b,...n,style:y,children:e})})}function yb({children:e,documentId:t,components:n={},renderers:o,menuContainer:i,...r}){return C(mb,{children:C(pb,{initialComponents:n,children:C(gb,{renderers:o,children:C(vb,{...r,children:[e,C(fb,{documentId:t,container:i})]})})})})}const Mm=class extends Ye{constructor(e,t,n){super(e,t),this.id=e,this.documentOpened$=Ae(),this.documentClosed$=Ae(),this.activeDocumentChanged$=Ae(),this.documentError$=Ae(),this.documentOrderChanged$=Ae(),this.openFileRequest$=xt(),this.loadOptions=new Map,this.maxDocuments=n?.maxDocuments}buildCapability(){return{openFileDialog:e=>this.openFileDialog(e),openDocumentUrl:e=>this.openDocumentUrl(e),openDocumentBuffer:e=>this.openDocumentBuffer(e),retryDocument:(e,t)=>this.retryDocument(e,t),closeDocument:e=>this.closeDocument(e),closeAllDocuments:()=>this.closeAllDocuments(),setActiveDocument:e=>{if(!this.isDocumentOpen(e))throw new Error(`Cannot set active document: ${e} is not open`);this.dispatchCoreAction((t=>({type:Hs,payload:t}))(e))},getActiveDocumentId:()=>this.coreState.core.activeDocumentId,getActiveDocument:()=>{var e;const t=this.coreState.core.activeDocumentId;return t?((e=this.coreState.core.documents[t])==null?void 0:e.document)??null:null},getDocumentOrder:()=>this.coreState.core.documentOrder,moveDocument:(e,t)=>{this.dispatchCoreAction(((n,o)=>({type:Ws,payload:{documentId:n,toIndex:o}}))(e,t))},swapDocuments:(e,t)=>{const n=this.coreState.core.documentOrder,o=n.indexOf(e),i=n.indexOf(t);if(o===-1||i===-1)throw new Error("One or both documents not found in order");const r=[...n];[r[o],r[i]]=[r[i],r[o]],this.dispatchCoreAction((a=>({type:Us,payload:a}))(r))},getDocument:e=>{var t;return((t=this.coreState.core.documents[e])==null?void 0:t.document)??null},getDocumentState:e=>this.coreState.core.documents[e]??null,getOpenDocuments:()=>this.coreState.core.documentOrder.map(e=>this.coreState.core.documents[e]).filter(e=>e!==null),isDocumentOpen:e=>this.isDocumentOpen(e),getDocumentCount:()=>Object.keys(this.coreState.core.documents).length,getDocumentIndex:e=>this.coreState.core.documentOrder.indexOf(e),setDocumentEncryption:(e,t)=>this.setDocumentEncryption(e,t),unlockOwnerPermissions:(e,t)=>this.unlockOwnerPermissions(e,t),removeEncryption:e=>this.removeEncryption(e),onDocumentOpened:this.documentOpened$.on,onDocumentClosed:this.documentClosed$.on,onDocumentError:this.documentError$.on,onActiveDocumentChanged:this.activeDocumentChanged$.on,onDocumentOrderChanged:this.documentOrderChanged$.on}}isDocumentOpen(e){return!!this.coreState.core.documents[e]}onDocumentLoaded(e){const t=this.coreState.core.documents[e];t&&t.status==="loaded"&&(this.loadOptions.delete(e),this.documentOpened$.emit(t),this.logger.info("DocumentManagerPlugin","DocumentOpened",`Document ${e} opened successfully`,{name:t.name}))}onDocumentClosed(e){this.loadOptions.delete(e),this.documentClosed$.emit(e),this.logger.info("DocumentManagerPlugin","DocumentClosed",`Document ${e} closed`)}onActiveDocumentChanged(e,t){this.activeDocumentChanged$.emit({previousDocumentId:e,currentDocumentId:t}),this.logger.info("DocumentManagerPlugin","ActiveDocumentChanged",`Active document changed from ${e} to ${t}`)}onCoreStoreUpdated(e,t){e.core.documentOrder!==t.core.documentOrder&&this.documentOrderChanged$.emit({order:t.core.documentOrder})}onOpenFileRequest(e){return this.openFileRequest$.on(e)}openDocumentUrl(e){const t=new de,n=e.documentId||this.generateDocumentId(),o=this.checkDocumentLimit();if(o)return t.reject(o),t;const i=e.name??this.extractNameFromUrl(e.url);this.loadOptions.set(n,e),this.dispatchCoreAction(ec(n,i,e.scale,e.rotation,!!e.password,e.autoActivate,e.permissions)),this.logger.info("DocumentManagerPlugin","OpenD
2114ocumentUrl",`Starting to load document from URL: ${e.url}`,{documentId:n,passwordProvided:!!e.password});const r={id:n,url:e.url},a=this.engine.openDocumentUrl(r,{password:e.password,mode:e.mode,requestOptions:e.requestOptions,normalizeRotation:!0});return t.resolve({documentId:n,task:a}),this.handleLoadTask(n,a,"OpenDocumentUrl"),t}openDocumentBuffer(e){const t=new de,n=this.checkDocumentLimit();if(n)return t.reject(n),t;const o=e.documentId||this.generateDocumentId();this.loadOptions.set(o,e),this.dispatchCoreAction(ec(o,e.name,e.scale,e.rotation,!!e.password,e.autoActivate,e.permissions)),this.logger.info("DocumentManagerPlugin","OpenDocumentBuffer",`Starting to load document from buffer: ${e.name}`,{documentId:o,passwordProvided:!!e.password});const i={id:o,content:e.buffer},r=this.engine.openDocumentBuffer(i,{password:e.password,normalizeRotation:!0});return t.resolve({documentId:o,task:r}),this.handleLoadTask(o,r,"OpenDocumentBuffer"),t}retryDocument(e,t){const n=new de,o=this.validateRetry(e);if(!o.valid)return n.reject(o.error),n;const i={...this.loadOptions.get(e),...t?.password&&{password:t.password}};this.loadOptions.set(e,i),this.dispatchCoreAction(((a,s)=>({type:Bs,payload:{documentId:a,passwordProvided:s}}))(e,!!t?.password)),this.logger.info("DocumentManagerPlugin","RetryDocument",`Retrying to load document ${e}`,{passwordProvided:!!t?.password});const r="url"in i?this.retryUrlDocument(e,i):this.retryBufferDocument(e,i);return n.resolve({documentId:e,task:r}),this.handleLoadTask(e,r,"RetryDocument"),n}openFileDialog(e){const t=new de;return this.openFileRequest$.emit({task:t,options:e}),t}closeDocument(e){const t=new de,n=this.coreState.core.documents[e];return n?(n.status==="loaded"&&n.document?this.engine.closeDocument(n.document).wait(()=>{this.dispatchCoreAction(tc(e)),t.resolve()},o=>{this.logger.error("DocumentManagerPlugin","CloseDocument",`Failed to close document ${e}`,o),t.fail(o)}):(this.logger.info("DocumentManagerPlugin","CloseDocument",`Closing document ${e} in ${n.status} state (skipping engine close)`),this.dispatchCoreAction(tc(e)),t.resolve()),t):(this.logger.warn("DocumentManagerPlugin","CloseDocument",`Cannot close document ${e}: not found in state`),t.resolve(),t)}closeAllDocuments(){const e=Object.keys(this.coreState.core.documents),t=e.map(n=>this.closeDocument(n));return this.logger.info("DocumentManagerPlugin","CloseAllDocuments",`Closing ${e.length} documents`),de.all(t)}setDocumentEncryption(e,t){const n=new de,o=this.coreState.core.documents[e];return o?.document?(this.logger.info("DocumentManagerPlugin","SetDocumentEncryption",`Setting encryption on document ${e}`,{hasUserPassword:!!t.userPassword,allowedFlags:t.allowedFlags}),this.engine.setDocumentEncryption(o.document,t.userPassword??"",t.ownerPassword,t.allowedFlags).wait(i=>{i&&this.logger.info("DocumentManagerPlugin","SetDocumentEncryption",`Encryption set successfully on document ${e}`),n.resolve(i)},i=>{this.logger.error("DocumentManagerPlugin","SetDocumentEncryption",`Failed to set encryption on document ${e}`,i),n.fail(i)}),n):(n.reject({code:Z.DocNotOpen,message:`Document ${e} is not open`}),n)}unlockOwnerPermissions(e,t){const n=new de,o=this.coreState.core.documents[e];if(!o?.document)return n.reject({code:Z.DocNotOpen,message:`Document ${e} is not open`}),n;const i=o.document;return this.logger.info("DocumentManagerPlugin","UnlockOwnerPermissions",`Attempting to unlock owner permissions on document ${e}`),this.engine.unlockOwnerPermissions(i,t).wait(r=>{r&&(this.logger.info("DocumentManagerPlugin","UnlockOwnerPermissions",`Owner permissions unlocked on document ${e}`),this.dispatchCoreAction(((s,l,c)=>({type:Gs,payload:{documentId:s,permissions:l,isOwnerUnlocked:c}}))(e,4294967295,!0))),n.resolve(r)},r=>{this.logger.error("DocumentManagerPlugin","UnlockOwnerPermissions",`Failed to unlock owner permissions on document ${e}`,r),n.fail(r)}),n}removeEncryption(e){const t=new de,n=this.coreState.core.documents[e];return n?.document?(this.logger.info("DocumentManagerPlugin","RemoveEncryption",`Marking document ${e} for encryption removal on save`),this.engine.removeEncryption(n.document).wait(o=>{o&&this.logger.info("DocumentManagerPlugin","RemoveEncryption",`Document ${e} marked for encryption removal`),t.resolve(o)},o=>{this.logger.error("DocumentManagerPlugin","RemoveEncryption",`Failed to mark document ${e} for encryption removal`,o),t.fail(o)}),t):(t.reject({code:Z.DocNotOpen,message:`Document ${e} is not open`}),t)}checkDocumentLimit(){return this.maxDocuments&&Object.keys(this.coreState.core.documents).length>=this.maxDocuments?{code:Z.Unknown,message:`Maximum number of documents (${this.maxDocuments}) reached`}:null}validateRetry(e){const t=this.coreState.core.documents[e];return t?t.status==="loaded"?{valid:!1,error:{code:Z.Unknown,message:`Document ${e} is already loaded successfully`}}:t.status!=="error"?{valid:!1,error:{code:Z.Unknown,message:`Document ${e} is not in error state (current state: ${t.status})`}}:this.loadOptions.has(e)?{valid:!0}:{valid:!1,error:{code:Z.Unknown,message:`No retry information available for document ${e}`}}:{valid:!1,error:{code:Z.NotFound,message:`Document ${e} not found`}}}retryUrlDocument(e,t){const n={id:e,url:t.url};return this.engine.openDocumentUrl(n,{password:t.password,mode:t.mode,requestOptions:t.requestOptions})}retryBufferDocument(e,t){const n={id:e,content:t.buffer};return this.engine.openDocumentBuffer(n,{password:t.password,normalizeRotation:!0})}
2114handleLoadTask(e,t,n){t.wait(o=>{this.dispatchCoreAction(((i,r)=>({type:Kr,payload:{documentId:i,document:r}}))(e,o))},o=>{this.handleLoadError(e,o,n)})}handleLoadError(e,t,n){var o,i,r;const a=((o=t.reason)==null?void 0:o.message)||"Failed to load document";this.logger.error("DocumentManagerPlugin",n,"Failed to load document",t),this.dispatchCoreAction(((s,l,c,d)=>({type:js,payload:{documentId:s,error:l,errorCode:c,errorDetails:d}}))(e,a,(i=t.reason)==null?void 0:i.code,t.reason)),this.documentError$.emit({documentId:e,message:a,code:(r=t.reason)==null?void 0:r.code,reason:t.reason})}generateDocumentId(){return`doc-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}extractNameFromUrl(e){try{const t=new URL(e),n=t.pathname.split("/").pop();if(!n)return;let o=decodeURIComponent(n);return o.toLowerCase().endsWith(".pdf")||(o+=".pdf"),o}catch{return}}async initialize(e){var t;if(this.logger.info("DocumentManagerPlugin","Initialize","Document Manager Plugin initialized",{maxDocuments:this.maxDocuments,initialDocumentsCount:((t=e.initialDocuments)==null?void 0:t.length)??0}),e.initialDocuments&&e.initialDocuments.length>0)for(const n of e.initialDocuments)try{"buffer"in n?this.openDocumentBuffer(n):"url"in n&&this.openDocumentUrl(n)}catch(o){this.logger.error("DocumentManagerPlugin","Initialize","Failed to initiate initial document load",o)}}async destroy(){await this.closeAllDocuments().toPromise(),this.loadOptions.clear(),this.documentOpened$.clear(),this.documentClosed$.clear(),this.activeDocumentChanged$.clear(),this.documentOrderChanged$.clear(),this.documentError$.clear(),super.destroy()}};Mm.id="document-manager";let Ja=Mm;const yc="document-manager";function bb({documentId:e,children:t}){const n=At(e);return n?C(fe,{children:t({documentState:n,isLoading:n.status==="loading",isError:n.status==="error",isLoaded:n.status==="loaded"})}):null}const Xo=()=>at(Ja.id),wb=cn({manifest:{id:yc,name:"Document Manager Plugin",version:"1.0.0",provides:["document-manager"],requires:[],optional:[],defaultConfig:{maxDocuments:10}},create:(e,t)=>new Ja(yc,e,t),reducer:e=>e,initialState:{}}).addUtility(function(){const{plugin:e}=$t(Ja.id),{provides:t}=Xo(),n=Q(null),o=Q(null),i=Q(void 0);return H(()=>{if(e?.onOpenFileRequest)return e.onOpenFileRequest(({task:r,options:a})=>{var s;o.current=r,i.current=a,(s=n.current)==null||s.click()})},[e]),C("input",{ref:n,type:"file",accept:"application/pdf",style:{display:"none"},onChange:async r=>{var a,s,l,c,d;const u=(a=r.currentTarget.files)==null?void 0:a[0];if(!u||!t)return;const m=await u.arrayBuffer();t.openDocumentBuffer({name:u.name,buffer:m,documentId:(s=i.current)==null?void 0:s.documentId,scale:(l=i.current)==null?void 0:l.scale,rotation:(c=i.current)==null?void 0:c.rotation,autoActivate:(d=i.current)==null?void 0:d.autoActivate}).wait(g=>{var p;(p=o.current)==null||p.resolve(g)},g=>{var p;(p=o.current)==null||p.fail(g)})}})}).build(),Am="commands",xb={id:Am,name:"Commands Plugin",version:"1.0.0",provides:["commands"],requires:[],optional:["i18n","ui"],defaultConfig:{commands:{}}},Pm="COMMANDS/SET_DISABLED_CATEGORIES",Qi=e=>({type:Pm,payload:e}),Dm=class extends Ye{constructor(e,t,n){var o;super(e,t),this.commands=new Map,this.i18n=null,this.shortcutMap=new Map,this.commandExecuted$=xt(),this.commandStateChanged$=xt(),this.shortcutExecuted$=xt(),this.categoryChanged$=Ae(),this.previousStates=new Map;const i=t.getPlugin("i18n");this.i18n=i?.provides()??null,(o=n.disabledCategories)!=null&&o.length&&this.dispatch(Qi(n.disabledCategories)),Object.values(n.commands).forEach(r=>{this.registerCommand(r)}),this.registry.getStore().subscribe((r,a)=>{this.onGlobalStoreChange(a)})}onDocumentClosed(e){this.previousStates.delete(e),this.logger.debug("CommandsPlugin","DocumentClosed",`Cleaned up command state cache for document: ${e}`)}async initialize(){this.logger.info("CommandsPlugin","Initialize","Commands plugin initialized")}async destroy(){this.commandExecuted$.clear(),this.commandStateChanged$.clear(),this.shortcutExecuted$.clear(),this.categoryChanged$.clear(),this.commands.clear(),this.shortcutMap.clear(),this.previousStates.clear(),super.destroy()}disableCategoryImpl(e){const t=new Set(this.state.disabledCategories);t.has(e)||(t.add(e),this.dispatch(Qi(Array.from(t))),this.categoryChanged$.emit({disabledCategories:Array.from(t)}))}enableCategoryImpl(e){const t=new Set(this.state.disabledCategories);t.has(e)&&(t.delete(e),this.dispatch(Qi(Array.from(t))),this.categoryChanged$.emit({disabledCategories:Array.from(t)}))}toggleCategoryImpl(e){this.state.disabledCategories.includes(e)?this.enableCategoryImpl(e):this.disableCategoryImpl(e)}setDisabledCategoriesImpl(e){this.dispatch(Qi(e)),this.categoryChanged$.emit({disabledCategories:e})}isCommandCategoryDisabled(e){var t;return!!((t=e.categories)!=null&&t.length)&&e.categories.some(n=>this.state.disabledCategories.includes(n))}buildCapability(){return{resolve:(e,t)=>
2114this.resolve(e,t),execute:(e,t,n="ui")=>this.execute(e,t,n),getAllCommands:e=>this.getAllCommands(e),getCommandsByCategory:(e,t)=>this.getCommandsByCategory(e,t),getCommandByShortcut:e=>this.getCommandByShortcut(e),getAllShortcuts:()=>new Map(this.shortcutMap),forDocument:e=>this.createCommandScope(e),registerCommand:e=>this.registerCommand(e),unregisterCommand:e=>this.unregisterCommand(e),disableCategory:e=>this.disableCategoryImpl(e),enableCategory:e=>this.enableCategoryImpl(e),toggleCategory:e=>this.toggleCategoryImpl(e),setDisabledCategories:e=>this.setDisabledCategoriesImpl(e),getDisabledCategories:()=>this.state.disabledCategories,isCategoryDisabled:e=>this.state.disabledCategories.includes(e),onCommandExecuted:this.commandExecuted$.on,onCommandStateChanged:this.commandStateChanged$.on,onShortcutExecuted:this.shortcutExecuted$.on,onCategoryChanged:this.categoryChanged$.on}}createCommandScope(e){return{resolve:t=>this.resolve(t,e),execute:(t,n="ui")=>this.execute(t,e,n),getAllCommands:()=>this.getAllCommands(e),getCommandsByCategory:t=>this.getCommandsByCategory(t,e),onCommandStateChanged:t=>this.commandStateChanged$.on(n=>{if(n.documentId===e){const{documentId:o,...i}=n;t(i)}})}}resolve(e,t){const n=t??this.getActiveDocumentId(),o=this.commands.get(e);if(!o)throw new Error(`Command not found: ${e}`);const i=this.registry.getStore().getState(),r=this.resolveLabel(o,i,n),a=o.shortcuts?Array.isArray(o.shortcuts)?o.shortcuts:[o.shortcuts]:void 0,s=this.resolveDynamic(o.disabled,i,n)??!1,l=this.isCommandCategoryDisabled(o),c=s||l;return{id:o.id,label:r,icon:this.resolveDynamic(o.icon,i,n),iconProps:this.resolveDynamic(o.iconProps,i,n),active:this.resolveDynamic(o.active,i,n)??!1,disabled:c,visible:this.resolveDynamic(o.visible,i,n)??!0,shortcuts:a,shortcutLabel:o.shortcutLabel,categories:o.categories,description:o.description,execute:()=>o.action({registry:this.registry,state:i,documentId:n,logger:this.logger})}}resolveLabel(e,t,n){const o=this.resolveDynamic(e.labelKey,t,n);if(o&&this.i18n){const i=this.resolveDynamic(e.labelParams,t,n);return this.i18n.t(o,{params:i,documentId:n})}return e.label?e.label:e.id}resolveDynamic(e,t,n){if(e!==void 0)return typeof e=="function"?e({registry:this.registry,state:t,documentId:n,logger:this.logger}):e}execute(e,t,n="ui"){const o=t??this.getActiveDocumentId(),i=this.resolve(e,o);i.disabled?this.logger.warn("CommandsPlugin","ExecutionBlocked",`Command '${e}' is disabled for document '${o}'`):i.visible?(i.execute(),this.commandExecuted$.emit({commandId:e,documentId:o,source:n}),this.logger.debug("CommandsPlugin","CommandExecuted",`Command '${e}' executed for document '${o}' (source: ${n})`)):this.logger.warn("CommandsPlugin","ExecutionBlocked",`Command '${e}' is not visible for document '${o}'`)}registerCommand(e){this.commands.has(e.id)&&this.logger.warn("CommandsPlugin","CommandOverwrite",`Command '${e.id}' already exists and will be overwritten`),this.commands.set(e.id,e),e.shortcuts&&(Array.isArray(e.shortcuts)?e.shortcuts:[e.shortcuts]).forEach(t=>{const n=this.normalizeShortcut(t);this.shortcutMap.set(n,e.id)}),this.logger.debug("CommandsPlugin","CommandRegistered",`Command '${e.id}' registered`)}unregisterCommand(e){const t=this.commands.get(e);t&&(t.shortcuts&&(Array.isArray(t.shortcuts)?t.shortcuts:[t.shortcuts]).forEach(n=>{const o=this.normalizeShortcut(n);this.shortcutMap.delete(o)}),this.commands.delete(e),this.logger.debug("CommandsPlugin","CommandUnregistered",`Command '${e}' unregistered`))}getCommandByShortcut(e){const t=this.normalizeShortcut(e),n=this.shortcutMap.get(t);return n?this.commands.get(n)??null:null}normalizeShortcut(e){return e.toLowerCase().split("+").sort().join("+")}getAllCommands(e){const t=e??this.getActiveDocumentId();return Array.from(this.commands.keys()).map(n=>this.resolve(n,t))}getCommandsByCategory(e,t){const n=t??this.getActiveDocumentId();return Array.from(this.commands.values()).filter(o=>{var i;return(i=o.categories)==null?void 0:i.includes(e)}).map(o=>this.resolve(o.id,n))}onGlobalStoreChange(e){Object.keys(e.core.documents).forEach(t=>{this.detectCommandChanges(t,e)})}detectCommandChanges(e,t){const n=t.core.documents[e];if(!n||n.status!=="loaded")return;const o=this.previousStates.get(e)??new Map;this.commands.forEach((i,r)=>{const a=this.resolve(r,e),s=o.get(r);if(!s)return void o.set(r,a);const l={};s.active!==a.active&&(l.active=a.active),s.disabled!==a.disabled&&(l.disabled=a.disabled),s.visible!==a.visible&&(l.visible=a.visible),s.label!==a.label&&(l.label=a.label),s.icon!==a.icon&&(l.icon=a.icon),Co(s.iconProps,a.iconProps)||(l.iconProps=a.iconProps),Object.keys(l).length>0&&(o.set(r,a),this.commandStateChanged$.emit({commandId:r,documentId:e,changes:l}))}),this.previousStates.set(e,o)}};Dm.id="commands";let Tm=Dm;const bc={disabledCategories:[]},zm=()=>at(Tm.id),nn=(e,t)=>{const{provides:n}=zm(),[o,i]=$(()=>n?n.resolve(e,t):null);return H(()=>n?(i(n.resolve(e,t)),n.onCommandStateChanged(r=>{r.commandId===e&&r.documentId===t&&i(n.resolve(e,t))})):void i(null),[n,e,t]),o},Cb=cn({manifest:xb,create:(e,t)=>
2114new Tm(Am,e,t),reducer:(e=bc,t)=>t.type===Pm?{...e,disabledCategories:t.payload}:e,initialState:bc}).addUtility(function(){const{provides:e}=zm();return H(()=>{if(!e)return;const t=(function(n){return o=>{const i=o.composedPath()[0]||o.target;if((i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.isContentEditable)&&o.key!=="Tab")return;const r=(function(l){const c=[];l.ctrlKey&&c.push("ctrl"),l.shiftKey&&c.push("shift"),l.altKey&&c.push("alt"),l.metaKey&&c.push("meta");let d=l.key.toLowerCase();return d===" "&&(d="space"),["control","shift","alt","meta"].includes(d)?null:[...c,d].sort().join("+")})(o);if(!r)return;const a=n.getCommandByShortcut(r);if(!a)return;const s=n.resolve(a.id);!s.disabled&&s.visible&&(o.preventDefault(),o.stopPropagation(),n.execute(a.id,void 0,"keyboard"))}})(e);return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e]),null}).build(),Rm="i18n",kb={id:Rm,name:"I18n Plugin",version:"1.0.0",provides:["i18n"],requires:[],optional:[],defaultConfig:{defaultLocale:"en",locales:[{code:"en",name:"English",translations:{commands:{zoom:{in:"Zoom In",out:"Zoom Out",fitWidth:"Fit to Width",fitPage:"Fit to Page",automatic:"Automatic",level:"Zoom Level ({level}%)",inArea:"Zoom In Area"},fullscreen:{enter:"Enter Full Screen",exit:"Exit Full Screen"},rotate:{clockwise:"Rotate Clockwise",counterclockwise:"Rotate Counter-Clockwise"},menu:"Menu",sidebar:"Sidebar",search:"Search",comment:"Comment",download:"Download",print:"Print",openFile:"Open PDF",save:"Save",settings:"Settings",view:"View",annotate:"Annotate",shapes:"Shapes",redact:"Redact",fillAndSign:"Fill and Sign",form:"Form",pan:"Pan",pointer:"Pointer",undo:"Undo",redo:"Redo",copy:"Copy",screenshot:"Screenshot",nextPage:"Next Page",previousPage:"Previous Page"}}},{code:"es",name:"Español",translations:{commands:{zoom:{in:"Acercar",out:"Alejar",fitWidth:"Ajustar al ancho",fitPage:"Ajustar a la página",automatic:"Automático",level:"Nivel de zoom ({level}%)",inArea:"Acercar área"},fullscreen:{enter:"Pantalla completa",exit:"Salir de pantalla completa"},rotate:{clockwise:"Girar a la derecha",counterclockwise:"Girar a la izquierda"},menu:"Menú",sidebar:"Barra lateral",search:"Buscar",comment:"Comentario",download:"Descargar",print:"Imprimir",openFile:"Abrir PDF",save:"Guardar",settings:"Configuración",view:"Ver",annotate:"Anotar",shapes:"Formas",redact:"Redactar",fillAndSign:"Rellenar y firmar",form:"Formulario",pan:"Desplazar",pointer:"Puntero",undo:"Deshacer",redo:"Rehacer",copy:"Copiar",screenshot:"Captura de pantalla",nextPage:"Página siguiente",previousPage:"Página anterior"}}}]}},Em="I18N/SET_LOCALE",_m="I18N/REGISTER_LOCALE",wc=e=>({type:Em,payload:e}),xc=e=>({type:_m,payload:e}),Lm=class extends Ye{constructor(e,t,n){super(e,t),this.locales=new Map,this.paramResolvers=new Map,this.paramsCache=new Map,this.localeChange$=xt(),this.paramsChanged$=et((o,i)=>({documentId:o,...i}),{cache:!1}),this.config=n,n.locales.forEach(o=>{this.locales.set(o.code,o),this.dispatch(xc(o.code))}),n.paramResolvers&&Object.entries(n.paramResolvers).forEach(([o,i])=>{this.paramResolvers.set(o,i)}),this.dispatch(wc(n.defaultLocale)),this.registry.getStore().subscribe((o,i)=>{this.detectParamChanges(i)})}async initialize(){this.logger.info("I18nPlugin","Initialize","I18n plugin initialized")}async destroy(){this.localeChange$.clear(),this.paramsChanged$.clear(),this.paramResolvers.clear(),this.paramsCache.clear(),super.destroy()}onDocumentClosed(e){this.paramsCache.delete(e),this.paramsChanged$.clearScope(e),this.logger.debug("I18nPlugin","DocumentClosed",`Cleaned up params cache for document: ${e}`)}buildCapability(){return{t:(e,t)=>this.translate(e,t),forDocument:e=>this.createI18nScope(e),registerParamResolver:(e,t)=>this.registerParamResolver(e,t),unregisterParamResolver:e=>this.unregisterParamResolver(e),setLocale:e=>this.setLocale(e),getLocale:()=>this.state.currentLocale,getAvailableLocales:()=>[...this.state.availableLocales],getLocaleInfo:e=>this.locales.get(e)??null,registerLocale:e=>this.registerLocale(e),hasLocale:e=>this.locales.has(e),onLocaleChange:this.localeChange$.on,onParamsChanged:this.paramsChanged$.onGlobal}}createI18nScope(e){return{t:(t,n)=>this.translate(t,{documentId:e,...n}),onParamsChanged:this.paramsChanged$.forScope(e)}}translate(e,t){const n=this.locales.get(this.state.currentLocale),o=this.config.fallbackLocale?this.locales.get(this.config.fallbackLocale):null;let i=this.getNestedValue(n?.translations,e);if(!i&&o&&(i=this.getNestedValue(o.translations,e)),!i){if(!t?.fallback)return this.logger.warn("I18
2114nPlugin","MissingTranslation",`Translation not found for key: ${e}`),e;i=t.fallback}let r=t?.params;return!r&&this.paramResolvers.has(e)&&(r=this.resolveParams(e,t?.documentId)),this.interpolate(i,r)}resolveParams(e,t){const n=this.paramResolvers.get(e);if(!n)return;const o=this.registry.getStore().getState();try{return n({state:o,documentId:t})}catch(i){return void this.logger.error("I18nPlugin","ParamResolverError",`Error resolving params for key "${e}":`,i)}}getNestedValue(e,t){if(!e)return;const n=t.split(".");let o=e;for(const i of n){if(o==null)return;o=o[i]}return typeof o=="string"?o:void 0}interpolate(e,t){return t?e.replace(/\{(\w+)\}/g,(n,o)=>{const i=t[o];return i!==void 0?String(i):n}):e}detectParamChanges(e){Object.keys(e.core.documents).forEach(t=>{this.detectDocumentParamChanges(t,e)})}detectDocumentParamChanges(e,t){const n=this.paramsCache.get(e),o=[];this.paramResolvers.forEach((i,r)=>{try{const a=i({state:t,documentId:e});Co(n?.get(r),a)||(o.push(r),this.paramsCache.has(e)||this.paramsCache.set(e,new Map),this.paramsCache.get(e).set(r,a))}catch(a){this.logger.error("I18nPlugin","ParamDetectionError",`Error detecting param changes for key "${r}":`,a)}}),o.length>0&&(this.paramsChanged$.emit(e,{changedKeys:o}),this.logger.debug("I18nPlugin","ParamsChanged",`Translation params changed for document ${e}:`,o))}registerParamResolver(e,t){this.paramResolvers.has(e)&&this.logger.warn("I18nPlugin","ResolverOverwrite",`Param resolver for "${e}" already exists and will be overwritten`),this.paramResolvers.set(e,t),this.paramsCache.forEach(n=>{n.delete(e)}),this.logger.debug("I18nPlugin","ResolverRegistered",`Param resolver registered for: ${e}`)}unregisterParamResolver(e){this.paramResolvers.delete(e)&&(this.paramsCache.forEach(t=>{t.delete(e)}),this.logger.debug("I18nPlugin","ResolverUnregistered",`Param resolver unregistered for: ${e}`))}setLocale(e){if(!this.locales.has(e))return void this.logger.warn("I18nPlugin","LocaleNotFound",`Locale '${e}' is not registered`);const t=this.state.currentLocale;t!==e&&(this.dispatch(wc(e)),this.localeChange$.emit({previousLocale:t,currentLocale:e}),this.logger.info("I18nPlugin","LocaleChanged",`Locale changed to: ${e}`))}registerLocale(e){this.locales.has(e.code)?this.logger.warn("I18nPlugin","LocaleAlreadyRegistered",`Locale '${e.code}' is already registered`):(this.locales.set(e.code,e),this.dispatch(xc(e.code)),this.logger.info("I18nPlugin","LocaleRegistered",`Locale registered: ${e.code}`))}};Lm.id="i18n";let Om=Lm;const Cc={currentLocale:"en",availableLocales:[]},Ib={manifest:kb,create:(e,t)=>new Om(Rm,e,t),reducer:(e=Cc,t)=>{switch(t.type){case Em:{const n=t.payload;return e.availableLocales.includes(n)?{...e,currentLocale:n}:(console.warn(`I18nPlugin: Locale '${n}' not available`),e)}case _m:{const n=t.payload;return e.availableLocales.includes(n)?e:{...e,availableLocales:[...e.availableLocales,n]}}default:return e}},initialState:Cc},qe=e=>{const{provides:t}=at(Om.id),[,n]=oh(i=>i+1,0),o=Y((i,r)=>t?t.t(i,{documentId:e,params:r?.params,fallback:r?.fallback}):r?.fallback??i,[t,e]);return H(()=>{if(!t)return;const i=t.onLocaleChange(()=>{n()}),r=e?t.forDocument(e).onParamsChanged(()=>{n()}):t.onParamsChanged(()=>{n()});return()=>{i(),r()}},[t,e]),{translate:o,locale:t?.getLocale()??"en"}};var Mt=(e=>(e.Automatic="automatic",e.FitPage="fit-page",e.FitWidth="fit-width",e))(Mt||{}),lo=(e=>(e[e.Center=0]="Center",e[e.Top=1]="Top",e))(lo||{});const Qs="zoom",Sb={id:Qs,name:"Zoom Plugin",version:"1.0.0",provides:["zoom"],requires:["viewport","scroll"],optional:["interaction-manager","spread"],defaultConfig:{defaultZoomLevel:Mt.Automatic,minZoom:.2,maxZoom:60,zoomStep:.1,zoomRanges:[{min:.2,max:.5,step:.05},{min:.5,max:1,step:.1},{min:1,max:2,step:.2},{min:2,max:4,step:.4},{min:4,max:10,step:.8},{min:10,max:20,step:1.6},{min:20,max:40,step:3.2},{min:40,max:60,step:6.4}],presets:[{name:"Fit Page",value:Mt.FitPage},{name:"Fit Width",value:Mt.FitWidth},{name:"Automatic",value:Mt.Automatic},{name:"25%",value:.25},{name:"50%",value:.5},{name:"100%",value:1},{name:"125%",value:1.25},{name:"150%",value:1.5},{name:"200%",value:2},{name:"400%",value:4},{name:"800%",value:8},{name:"1600%",value:16}]}}
2114,Nm="ZOOM/INIT_STATE",$m="ZOOM/CLEANUP_STATE",Fm="ZOOM/SET_ZOOM_LEVEL",jm="ZOOM/SET_MARQUEE_ZOOM_ACTIVE",Bm={zoomLevel:Mt.Automatic,currentZoomLevel:1,isMarqueeZoomActive:!1},kc={documents:{},activeDocumentId:null},Hm=class extends Ye{constructor(e,t,n){var o,i,r;super(e,t),this.zoom$=xt(),this.state$=Ae(),this.viewportPlugin=t.getPlugin("viewport"),this.viewport=this.viewportPlugin.provides(),this.scroll=t.getPlugin("scroll").provides();const a=t.getPlugin("interaction-manager");this.interactionManager=a?.provides()??null;const s=t.getPlugin("spread");this.spread=s?.provides()??null,this.minZoom=n.minZoom??.25,this.maxZoom=n.maxZoom??10,this.zoomStep=n.zoomStep??.1,this.defaultZoomLevel=n.defaultZoomLevel,this.presets=n.presets??[],this.zoomRanges=this.normalizeRanges(n.zoomRanges??[]),this.viewport.onViewportResize(l=>this.recalcAuto(l.documentId,lo.Top),{mode:"debounce",wait:150,keyExtractor:l=>l.documentId}),(o=this.spread)==null||o.onSpreadChange(l=>{this.recalcAuto(l.documentId,lo.Top)}),(i=this.interactionManager)==null||i.registerMode({id:"marqueeZoom",scope:"page",exclusive:!0,cursor:"zoom-in"}),(r=this.interactionManager)==null||r.onModeChange(l=>{const c=l.activeMode==="marqueeZoom",d=this.getDocumentState(l.documentId);var u;d&&d.isMarqueeZoomActive!==c&&this.dispatch((u=l.documentId,{type:jm,payload:{documentId:u,isActive:c}}))})}onDocumentLoadingStarted(e){this.viewport.gate("zoom",e);const t={...Bm,zoomLevel:this.defaultZoomLevel};this.dispatch((function(n,o){return{type:Nm,payload:{documentId:n,state:o}}})(e,t)),this.logger.debug("ZoomPlugin","DocumentOpened",`Initialized zoom state for document: ${e}`)}onDocumentLoaded(e){this.recalcAuto(e,lo.Top)}onDocumentClosed(e){this.dispatch((function(t){return{type:$m,payload:t}})(e)),this.logger.debug("ZoomPlugin","DocumentClosed",`Cleaned up zoom state for document: ${e}`)}onRotationChanged(e){this.recalcAuto(e,lo.Top)}buildCapability(){return{requestZoom:(e,t)=>this.requestZoom(e,t),requestZoomBy:(e,t)=>this.requestZoomBy(e,t),zoomIn:()=>this.zoomIn(),zoomOut:()=>this.zoomOut(),zoomToArea:(e,t)=>this.zoomToArea(e,t),enableMarqueeZoom:()=>this.enableMarqueeZoom(),disableMarqueeZoom:()=>this.disableMarqueeZoom(),toggleMarqueeZoom:()=>this.toggleMarqueeZoom(),isMarqueeZoomActive:()=>this.isMarqueeZoomActive(),getState:()=>this.getDocumentStateOrThrow(),forDocument:e=>this.createZoomScope(e),registerMarqueeOnPage:e=>this.registerMarqueeOnPage(e),getPresets:()=>this.presets,onZoomChange:this.zoom$.on,onStateChange:this.state$.on}}createZoomScope(e){return{requestZoom:(t,n)=>this.requestZoom(t,n,e),requestZoomBy:(t,n)=>this.requestZoomBy(t,n,e),zoomIn:()=>this.zoomIn(e),zoomOut:()=>this.zoomOut(e),zoomToArea:(t,n)=>this.zoomToArea(t,n,e),enableMarqueeZoom:()=>this.enableMarqueeZoom(e),disableMarqueeZoom:()=>this.disableMarqueeZoom(e),toggleMarqueeZoom:()=>this.toggleMarqueeZoom(e),isMarqueeZoomActive:()=>this.isMarqueeZoomActive(e),getState:()=>this.getDocumentStateOrThrow(e),onZoomChange:t=>this.zoom$.on(n=>{n.documentId===e&&t(n)}),onStateChange:t=>this.state$.on(n=>{n.documentId===e&&t(n.state)})}}getDocumentState(e){const t=e??this.getActiveDocumentId();return this.state.documents[t]??null}getDocumentStateOrThrow(e){const t=this.getDocumentState(e);if(!t)throw new Error(`Zoom state not found for document: ${e??"active"}`);return t}requestZoom(e,t,n){this.handleRequest({level:e,center:t},n)}requestZoomBy(e,t,n){const o=n??this.getActiveDocumentId(),i=this.getDocumentStateOrThrow(o).currentZoomLevel,r=this.toZoom(i+e);this.handleRequest({level:r,center:t},o)}zoomIn(e){const t=e??this.getActiveDocumentId(),n=this.getDocumentStateOrThrow(t).currentZoomLevel;this.handleRequest({level:n,delta:this.stepFor(n)},t)}zoomOut(e){const t=e??this.getActiveDocumentId(),n=this.getDocumentStateOrThrow(t).currentZoomLevel;this.handleRequest({level:n,delta:-this.stepFor(n)},t)}zoomToArea(e,t,n){const o=n??this.getActiveDocumentId();this.handleZoomToArea(o,e,t)}enableMarqueeZoom(e){var t;const n=e??this.getActiveDocumentId();(t=this.interactionManager)==null||t.forDocument(n).activate("marqueeZoom")}disableMarqueeZoom(e){var t;const n=e??this.getActiveDocumentId();(t=this.interactionManager)==null||t.forDocument(n).activateDefaultMode()}toggleMarqueeZoom(e){var t;const n=e??this.getActiveDocumentId(),o=(t=this.interactionManager)==null?void 0:t.forDocument(n);o?.getActiveMode()==="marqueeZoom"?o.activateDefaultMode():o?.activate("marqueeZoom")}isMarqueeZoomActive(e){var t;const n=e??this.getActiveDocumentId();return((t=this.interactionManager)==null?void 0:t.forDocument(n).getActiveMode())==="marqueeZoom"}handleRequest({level:e,delta:t=0,center:n,focus:o=lo.Center,align:i="keep"},r){const a=r??this.getActiveDocumentId(),s=this.getDocumentStateOrThrow(a);if(!this.coreState.core.documents[a])return;const l=this.viewport.forDocument(a),c=l.getMetrics(),d=s.currentZoomLevel;if(c.clientWidth===0||c.clientHeight===0)return;const u=typeof e=="number"?e:this.computeZoomForMode(a,e,c);if(u===!1)return;const m=ve(u+t,this.minZoom,this.maxZoom),g=Math.floor(1e3*m)/1e3,p=n??{vx:c.clientWidth/2,vy:o===lo.Top?0:c.clientHeight/2},{desiredScrollLeft:f,desiredScrollTop:v}=this.computeScrollForZoomChange(a,c,d,g,p,i);isNaN(f)||isNaN(v)||this.viewportPlugin.setViewportScrollMetrics(a,{scrollLeft:f,scrollTop:v}),this.dispatch((function(b,w,x){return{type:Fm,payload:{documentId:b,zoomLevel:w,currentZoomLevel:x}}})(a,typeof e=="number"?g:e,g)),this.dispatchCoreAction(((b,w)=>({type:Xr,payload:{scale:b,documentId:w}}))(g,a)),this.viewport.isGated(a)&&this.viewport.releaseGate("zoom",a),l.scrollTo({x:f,y:v,behavior:"instant"});const y={documentId:a,oldZoom:d,newZoom:g,level:e,center:p,desiredScrollLeft:f,desiredScrollTop:v,viewport:c};this.zoom$.emit(y)}computeZoomForMode(e,t,n){if(!this.coreState.core.documents[e])return!1;const o=this.scroll.forDocument(e),i=o?this.scroll.getPageGap():0,r=this.viewport.getViewportGap(),a=o.getSpreadPagesWithRotatedSize();if(!a.length||n.clientWidth===0||n.clientHeight===0)return!1;const s=n.clientWidth-2*r,l=n.clientHeight-2*r;if(s<=0||l<=0)return!1;let c=0,d=0;
vendor: 2,918 bytes, line 2114
2114switch(a.forEach(u=>{const m=u.reduce((p,f,v)=>p+f.rotatedSize.width+(v?i:0),0),g=Math.max(...u.map(p=>p.rotatedSize.height));c=Math.max(c,m),d=Math.max(d,g)}),t){case Mt.FitWidth:return s/c;case Mt.FitPage:return Math.min(s/c,l/d);case Mt.Automatic:return Math.min(s/c,1);default:return 1}}computeScrollForZoomChange(e,t,n,o,i,r="keep"){const a=this.scroll.forDocument(e).getLayout(),s=this.viewport.getViewportGap(),l=a.totalContentSize.width,c=a.totalContentSize.height,d=t.clientWidth-2*s,u=t.clientHeight-2*s,m=(k,I,S)=>I*S<k?(k-I*S)/2:0,g=m(d,l,n),p=m(u,c,n),f=m(d,l,o),v=m(u,c,o),y=(t.scrollLeft+i.vx-s-g)/n*o+s+f,b=(t.scrollTop+i.vy-s-p)/n*o+s+v,w=r==="center"?y-t.clientWidth/2:y-i.vx,x=r==="center"?b-t.clientHeight/2:b-i.vy;return{desiredScrollLeft:Math.max(0,w),desiredScrollTop:Math.max(0,x)}}handleZoomToArea(e,t,n){const o=this.coreState.core.documents[e];if(!o)return;const i=o.rotation,r=this.viewport.forDocument(e).getMetrics(),a=this.viewport.getViewportGap(),s=this.getDocumentStateOrThrow(e).currentZoomLevel,l=r.clientWidth-2*a,c=r.clientHeight-2*a,d=this.scroll.forDocument(e).getLayout(),u=d.virtualItems.find(A=>A.pageLayouts.some(M=>M.pageIndex===t));if(!u)return;const m=u.pageLayouts.find(A=>A.pageIndex===t),g=Ls({width:m.width,height:m.height},n,i),p=this.toZoom(Math.min(l/g.size.width,c/g.size.height)),f=u.x+m.x,v=u.y+m.y,y=f+g.origin.x+g.size.width/2,b=v+g.origin.y+g.size.height/2,w=(A,M,P)=>M*P<A?(A-M*P)/2:0,x=w(l,d.totalContentSize.width,s),k=w(c,d.totalContentSize.height,s),I=a+x+y*s-r.scrollLeft,S=a+k+b*s-r.scrollTop;this.handleRequest({level:p,center:{vx:I,vy:S},align:"center"},e)}recalcAuto(e,t){const n=this.getDocumentState(e);n&&(n.zoomLevel!==Mt.Automatic&&n.zoomLevel!==Mt.FitPage&&n.zoomLevel!==Mt.FitWidth||this.handleRequest({level:n.zoomLevel,focus:t},e))}normalizeRanges(e){return[...e].filter(t=>t.step>0&&t.max>t.min).sort((t,n)=>t.min-n.min)}stepFor(e){const t=this.zoomRanges.find(n=>e>=n.min&&e<n.max);return t?t.step:this.zoomStep}toZoom(e){return parseFloat(ve(e,this.minZoom,this.maxZoom).toFixed(2))}registerMarqueeOnPage(e){if(!this.interactionManager)return this.logger.warn("ZoomPlugin","MissingDependency","Interaction manager plugin not loaded, marquee zoom disabled"),()=>{};const t=this.coreState.core.documents[e.documentId];if(!t||!t.document)return this.logger.warn("ZoomPlugin","DocumentNotFound","Document not found"),()=>{};const n=t.document.pages[e.pageIndex];if(!n)return this.logger.warn("ZoomPlugin","PageNotFound",`Page ${e.pageIndex} not found`),()=>{};const o=(function(i){const{pageSize:r,scale:a,minDragPx:s=5,onPreview:l,onCommit:c,onSmallDrag:d}=i;let u=null,m=null;return{onPointerDown:(g,p)=>{var f;u=g,m={origin:{x:g.x,y:g.y},size:{width:0,height:0}},l?.(m),(f=p.setPointerCapture)==null||f.call(p)},onPointerMove:g=>{if(!u)return;const p=ve(g.x,0,r.width),f=ve(g.y,0,r.height);m={origin:{x:Math.min(u.x,p),y:Math.min(u.y,f)}
2114,size:{width:Math.abs(p-u.x),height:Math.abs(f-u.y)}},l?.(m)},onPointerUp:(g,p)=>{var f;m&&(Math.max(m.size.width,m.size.height)*a>s?c?.(m):d?.()),u=null,m=null,l?.(null),(f=p.releasePointerCapture)==null||f.call(p)},onPointerCancel:(g,p)=>{var f;u=null,m=null,l?.(null),(f=p.releasePointerCapture)==null||f.call(p)}}})({pageSize:n.size,scale:e.scale,onPreview:e.callback.onPreview,onCommit:i=>{var r,a;this.zoomToArea(e.pageIndex,i,e.documentId),(a=(r=e.callback).onCommit)==null||a.call(r,i)},onSmallDrag:()=>{var i,r;this.zoomIn(e.documentId),(r=(i=e.callback).onSmallDrag)==null||r.call(i)}});return this.interactionManager.registerHandlers({documentId:e.documentId,modeId:"marqueeZoom",handlers:o,pageIndex:e.pageIndex})}onStoreUpdated(e,t){for(const n in t.documents){const o=e.documents[n],i=t.documents[n];o&&i&&(o.currentZoomLevel!==i.currentZoomLevel||o.zoomLevel!==i.zoomLevel||o.isMarqueeZoomActive!==i.isMarqueeZoomActive)&&this.state$.emit({documentId:n,state:i})}}async initialize(){this.logger.info("ZoomPlugin","Initialize","Zoom plugin initialized")}async destroy(){this.zoom$.clear(),this.state$.clear(),super.destroy()}};Hm.id="zoom";let Um=Hm;const Mb={manifest:Sb,create:(e,t)=>new Um(Qs,e,t),reducer:(e=kc,t)=>{switch(t.type){case Nm:{const{documentId:n,state:o}=t.payload;return{...e,documents:{...e.documents,[n]:o},activeDocumentId:e.activeDocumentId??n}}case $m:{const n=t.payload,{[n]:o,...i}=e.documents;return{...e,documents:i,activeDocumentId:e.activeDocumentId===n?null:e.activeDocumentId}}case"ZOOM/SET_ACTIVE_DOCUMENT":return{...e,activeDocumentId:t.payload};case Fm:{const{documentId:n,zoomLevel:o,currentZoomLevel:i}=t.payload,r=e.documents[n];return r?{...e,documents:{...e.documents,[n]:{...r,zoomLevel:o,currentZoomLevel:i}}}:e}case jm:{const{documentId:n,isActive:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,isMarqueeZoomActive:o}}}:e}default:return e}},initialState:kc},Js=()=>at(Um.id);function Ic(e){const[t,n]=[e[0],e[1]],o=n.clientX-t.clientX,i=n.clientY-t.clientY;return Math.hypot(o,i)}function Ab(e,t={}){const{provides:n}=at("viewport"),{provides:o}=Js(),i=En(Th),r=Q(null);return Es(()=>{const a=r.current,s=i?.current;if(a&&s&&o)return(function({element:l,container:c,documentId:d,zoomProvides:u,viewportGap:m=0,options:g={}}){const{enablePinch:p=!0,enableWheel:f=!0}=g;if(typeof window>"u")return()=>{};const v=u.forDocument(d),y=()=>v.getState();let b=0,w=1,x=!1,k=0,I=null,S=1,A=0,M=0,P=0,T=0,D=0,F=0,N=0,W=0,_=0,G=0,q=0,O=0,V=0;const te=(we,_e,Pe)=>Math.min(Math.max(we,_e),Pe),he=()=>{const we=c.clientWidth-2*m,_e=l.offsetWidth,Pe=_e<we?(we-_e)/2:0;l.style.marginLeft=`${Pe}px`},ne=we=>{const _e=A*we,Pe=M*we;let We=_*(1-we);const It=W-_e/2-P,je=G-V*we-P,dn=Math.max(0,_e-N),_n=.3*N,un=Math.min(1,dn/_n);let Be=It+(je-It)*un;return Pe>F-2*O&&(We=te(T+We,F-O-Pe,O)-T),_e>D-2*O&&(Be=te(P+Be,D-O-_e,O)-P),{tx:Be,ty:We,blend:un,finalWidth:_e}},K=we=>{w=we;const{tx:_e,ty:Pe}=ne(we);l.style.transformOrigin="0 0",l.style.transform=`translate(${_e}px, ${Pe}px) scale(${we})`},le=()=>{l.style.transform="none",l.style.transformOrigin="0 0",w=1},ie=()=>{const{tx:we,finalWidth:_e}=ne(w),Pe=(w-1)*b;let We,It=q;if(_e<=N)We=W;else{const je=1-w;We=Math.abs(je)>.001?P+we/je:G}v.requestZoomBy(Pe,{vx:We,vy:It}),le(),b=0},Fe=(we,_e)=>{const Pe=c.getBoundingClientRect(),We=l.getBoundingClientRect();O=m,A=We.width,M=We.height,P=We.left-Pe.left,T=We.top-Pe.top,D=Pe.width,F=Pe.height,N=c.clientWidth,W=c.clientLeft+N/2;const It=we-We.left;_=_e-We.top,G=we-Pe.left,q=_e-Pe.top,V=A<N?G*A/N:It},He=we=>{if(we.touches.length!==2)return;x=!0,b=y().currentZoomLevel,k=Ic(we.touches);const _e=(function(Pe){const[We,It]=[Pe[0],Pe[1]];return{x:(We.clientX+It.clientX)/2,y:(We.clientY+It.clientY)/2}})(we.touches);Fe(_e.x,_e.y),we.preventDefault()},it=we=>{if(!x||we.touches.length!==2)return;const _e=Ic(we.touches);K(_e/k),we.preventDefault()},Ve=we=>{x&&(we.touches.length>=2||(x=!1,ie()))},kt=we=>{if(!we.ctrlKey&&!we.metaKey)return;we.preventDefault(),I===null?(b=y().currentZoomLevel,S=1,Fe(we.clientX,we.clientY)):clearTimeout(I);const _e=1-.01*we.deltaY;S*=_e,S=Math.max(.1,Math.min(10,S)),K(S),I=setTimeout(()=>{I=null,ie(),S=1},150)},Qe=v.onStateChange(()=>he()),lt=new ResizeObserver(()=>he());return lt.observe(l),lt.observe(c),he(),p&&(c.addEventListener("touchstart",He,{passive:!1}),c.addEventListener("touchmove",it,{passive:!1}),c.addEventListener("touchend",Ve),c.addEventListener("touchcancel",Ve)),f&&c.addEventListener("wheel",kt,{passive:!1}),()=>{p&&(c.removeEventListener("touchstart",He),c.removeEventListener("touchmove",it),c.removeEventListener("touchend",Ve),c.removeEventListener("touchcancel",Ve)),f&&c.removeEventListener("wheel",kt),I&&clearTimeout(I),Qe(),lt.disconnect(),le(),l.style.marginLeft=""}})({element:a,container:s,documentId:e,zoomProvides:o,viewportGap:n?.getViewportGap()||0,options:t})},[n,o,e,i,t.enablePinch,t.enableWheel]),{elementRef:r}}function Pb({children:e,documentId:t,style:n,enablePinch:o=!0,enableWheel:i=!0,...r}){const a=ee(()=>({enablePinch:o,enableWheel:i}),[o,i]),{elementRef:s}=Ab(t,a);return C("div",{ref:s,...r,style:{...n,display:"inline-block",overflow:"visible",boxSizing:"border-box"},children:e})}const Db=({documentId:e,pageIndex:t,scale:n,className:o,stroke:i="rgba(33,150,243,0.8)",fill:r="rgba(33,150,243,0.15)"})=>{const{provides:a}=Js(),s=At(e),[l,c]=$(null),d=ee(()=>n!==void 0?n:s?.scale??1,[n,s?.scale]);return H(()=>
2114{if(a)return a.registerMarqueeOnPage({documentId:e,pageIndex:t,scale:d,callback:{onPreview:c}})},[a,e,t,d]),l?C("div",{style:{position:"absolute",pointerEvents:"none",left:l.origin.x*d,top:l.origin.y*d,width:l.size.width*d,height:l.size.height*d,border:`1px solid ${i}`,background:r,boxSizing:"border-box"},className:o}):null},Wm=class extends Ye{constructor(e,t,n){super(e,t),this.config=n}buildCapability(){return{renderPage:e=>this.renderPage(e),renderPageRect:e=>this.renderPageRect(e),renderPageRaw:e=>this.renderPageRaw(e),renderPageRectRaw:e=>this.renderPageRectRaw(e),forDocument:e=>this.createRenderScope(e)}}createRenderScope(e){return{renderPage:t=>this.renderPage(t,e),renderPageRect:t=>this.renderPageRect(t,e),renderPageRaw:t=>this.renderPageRaw(t,e),renderPageRectRaw:t=>this.renderPageRectRaw(t,e)}}renderPage({pageIndex:e,options:t},n){const o=n??this.getActiveDocumentId(),i=this.coreState.core.documents[o];if(!i?.document)throw new Error(`Document ${o} not loaded`);const r=i.document.pages.find(s=>s.index===e);if(!r)throw new Error(`Page ${e} not found in document ${o}`);const a={...t??{},withForms:t?.withForms??this.config.withForms??!1,withAnnotations:t?.withAnnotations??this.config.withAnnotations??!1,imageType:t?.imageType??this.config.defaultImageType??"image/png",imageQuality:t?.imageQuality??this.config.defaultImageQuality??.92};return this.engine.renderPage(i.document,r,a)}renderPageRect({pageIndex:e,rect:t,options:n},o){const i=o??this.getActiveDocumentId(),r=this.coreState.core.documents[i];if(!r?.document)throw new Error(`Document ${i} not loaded`);const a=r.document.pages.find(l=>l.index===e);if(!a)throw new Error(`Page ${e} not found in document ${i}`);const s={...n??{},withForms:n?.withForms??this.config.withForms??!1,withAnnotations:n?.withAnnotations??this.config.withAnnotations??!1,imageType:n?.imageType??this.config.defaultImageType??"image/png",imageQuality:n?.imageQuality??this.config.defaultImageQuality??.92};return this.engine.renderPageRect(r.document,a,t,s)}renderPageRaw({pageIndex:e,options:t},n){const o=n??this.getActiveDocumentId(),i=this.coreState.core.documents[o];if(!i?.document)throw new Error(`Document ${o} not loaded`);const r=i.document.pages.find(s=>s.index===e);if(!r)throw new Error(`Page ${e} not found in document ${o}`);const a={...t??{},withForms:t?.withForms??this.config.withForms??!1,withAnnotations:t?.withAnnotations??this.config.withAnnotations??!1};return this.engine.renderPageRaw(i.document,r,a)}renderPageRectRaw({pageIndex:e,rect:t,options:n},o){const i=o??this.getActiveDocumentId(),r=this.coreState.core.documents[i];if(!r?.document)throw new Error(`Document ${i} not loaded`);const a=r.document.pages.find(l=>l.index===e);if(!a)throw new Error(`Page ${e} not found in document ${i}`);const s={...n??{},withForms:n?.withForms??this.config.withForms??!1,withAnnotations:n?.withAnnotations??this.config.withAnnotations??!1};return this.engine.renderPageRectRaw(r.document,a,t,s)}async initialize(e){this.logger.info("RenderPlugin","Initialize","Render plugin initialized")}async destroy(){super.destroy()}};Wm.id="render";let Gm=Wm;const Sc="render",Tb={manifest:{id:Sc,name:"Render Plugin",version:"1.0.0",provides:["render"],requires:[],optional:[],defaultConfig:{}},create:(e,t)=>new Gm(Sc,e,t),reducer:()=>{},initialState:{}};function zb({documentId:e,pageIndex:t,scale:n,dpr:o,style:i,...r}){const{provides:a}=at(Gm.id),s=At(e),[l,c]=$(null),d=Q(null),u=ee(()=>s&&s.pageRefreshVersions[t]||0,[s,t]),m=ee(()=>n!==void 0?n:s?.scale??1,[n,s?.scale]),g=ee(()=>o!==void 0?o:window.devicePixelRatio,[o]);return H(()=>{if(!a)return;const p=a.forDocument(e).renderPage({pageIndex:t,options:{scaleFactor:m,dpr:g}});return p.wait(f=>{const v=URL.createObjectURL(f);c(v),d.current=v},vt),()=>{d.current?(URL.revokeObjectURL(d.current),d.current=null):p.abort({code:Z.Cancelled,message:"canceled render task"})}},[e,t,m,g,a,u]),C(fe,{children:l&&C("img",{src:l,onLoad:()=>{d.current&&(URL.revokeObjectURL(d.current),d.current=null)},...r,style:{width:"100%",height:"100%",...i||{}}})})}const qm="rotate",Rb={id:qm,name:"Rotate Plugin",version:"1.0.0",provides:["rotate"],requires:[],optional:[],defaultConfig:{}},Vm="ROTATE/INIT_STATE",Km="ROTATE/CLEANUP_STATE",Zm="ROTATE/SET_ROTATION",Xm=class extends Ye{constructor(e,t,n){super(e,t),this.rotate$=Ae(),this.defaultRotation=n.defaultRotation??0}onDocumentLoadingStarted(e){const t={rotation:this.defaultRotation};this.dispatch((function(n,o){return{type:Vm,payload:{documentId:n,state:o}}})(e,t)),this.dispatchCoreAction(nc(this.defaultRotation,e)),this.logger.debug("RotatePlugin","DocumentOpened",`Initialized rotation state for document: ${e}`)}onDocumentClosed(e){this.dispatch((function(t){return{type:Km,payload:t}}
2114)(e)),this.logger.debug("RotatePlugin","DocumentClosed",`Cleaned up rotation state for document: ${e}`)}buildCapability(){return{setRotation:e=>this.setRotationForDocument(e),getRotation:()=>this.getRotationForDocument(),rotateForward:()=>this.rotateForward(),rotateBackward:()=>this.rotateBackward(),forDocument:e=>this.createRotateScope(e),onRotateChange:this.rotate$.on}}createRotateScope(e){return{setRotation:t=>this.setRotationForDocument(t,e),getRotation:()=>this.getRotationForDocument(e),rotateForward:()=>this.rotateForward(e),rotateBackward:()=>this.rotateBackward(e),onRotateChange:t=>this.rotate$.on(n=>{n.documentId===e&&t(n.rotation)})}}getDocumentState(e){const t=e??this.getActiveDocumentId();return this.state.documents[t]??null}getDocumentStateOrThrow(e){const t=this.getDocumentState(e);if(!t)throw new Error(`Rotation state not found for document: ${e??"active"}`);return t}setRotationForDocument(e,t){const n=t??this.getActiveDocumentId(),o=this.coreState.core.documents[n];if(!o?.document)throw new Error(`Document ${n} not loaded`);this.dispatch((function(i,r){return{type:Zm,payload:{documentId:i,rotation:r}}})(n,e)),this.dispatchCoreAction(nc(e,n)),this.rotate$.emit({documentId:n,rotation:e})}getRotationForDocument(e){return this.getDocumentStateOrThrow(e).rotation}rotateForward(e){const t=e??this.getActiveDocumentId(),n=this.getRotationForDocument(t),o=(n+1)%4;this.setRotationForDocument(o,t)}rotateBackward(e){const t=e??this.getActiveDocumentId(),n=this.getRotationForDocument(t),o=(n+3)%4;this.setRotationForDocument(o,t)}getMatrixAsString(e){return(function(t,n,o){const[i,r,a,s,l,c]=(function(d,u,m){let g=1,p=0,f=0,v=1,y=0,b=0;switch(d){case 1:g=0,p=1,f=-1,v=0,y=m;break;case 2:g=-1,p=0,f=0,v=-1,y=u,b=m;break;case 3:g=0,p=-1,f=1,v=0,b=u}return[g,p,f,v,y,b]})(t,n,o);return`matrix(${i},${r},${a},${s},${l},${c})`})(e.rotation,e.width,e.height)}onStoreUpdated(e,t){for(const n in t.documents){const o=e.documents[n],i=t.documents[n];o?.rotation!==i.rotation&&this.logger.debug("RotatePlugin","RotationChanged",`Rotation changed for document ${n}: ${o?.rotation??0} -> ${i.rotation}`)}}async initialize(e){this.logger.info("RotatePlugin","Initialize","Rotate plugin initialized")}async destroy(){this.rotate$.clear(),super.destroy()}};Xm.id="rotate";let Ym=Xm;const Mc={documents:{},activeDocumentId:null},Eb={manifest:Rb,create:(e,t)=>new Ym(qm,e,t),reducer:(e=Mc,t)=>{switch(t.type){case Vm:{const{documentId:n,state:o}=t.payload;return{...e,documents:{...e.documents,[n]:o},activeDocumentId:e.activeDocumentId??n}}case Km:{const n=t.payload,{[n]:o,...i}=e.documents;return{...e,documents:i,activeDocumentId:e.activeDocumentId===n?null:e.activeDocumentId}}case"ROTATE/SET_ACTIVE_DOCUMENT":return{...e,activeDocumentId:t.payload};case Zm:{const{documentId:n,rotation:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,rotation:o}}}:e}default:return e}},initialState:Mc};function _b({children:e,documentId:t,pageIndex:n,rotation:o,scale:i,style:r,...a}){var s,l,c,d;const{plugin:u}=$t(Ym.id),m=At(t),g=(l=(s=m?.document)==null?void 0:s.pages)==null?void 0:l[n],p=((c=g?.size)==null?void 0:c.width)??0,f=((d=g?.size)==null?void 0:d.height)??0,v=g?.rotation??0,y=m?.rotation??0,b=o!==void 0?o:(v+y)%4,w=i??m?.scale??1,x=u?.getMatrixAsString({width:p*w,height:f*w,rotation:b})??"matrix(1, 0, 0, 1, 0, 0)";return g?C("div",{...a,style:{position:"absolute",transformOrigin:"0 0",transform:x,...r},children:e}):null}const Qm="SEARCH/INIT_STATE",Jm="SEARCH/CLEANUP_STATE",ep="SEARCH/START_SEARCH_SESSION",tp="SEARCH/STOP_SEARCH_SESSION",np="SEARCH/SET_SEARCH_FLAGS",op="SEARCH/SET_SHOW_ALL_RESULTS",ip="SEARCH/START_SEARCH",rp="SEARCH/SET_SEARCH_RESULTS",ap="SEARCH/APPEND_SEARCH_RESULTS",sp="SEARCH/SET_ACTIVE_RESULT_INDEX";function Ac(e,t){return{type:op,payload:{documentId:e,showAll:t}}}function xa(e,t,n,o){return{type:rp,payload:{documentId:e,results:t,total:n,activeResultIndex:o}}}function Pc(e,t){return{type:sp,payload:{documentId:e,index:t}}}const Dr={flags:[],results:[],total:0,activeResultIndex:-1,showAllResults:!0,query:"",loading:!1,active:!1},Dc={documents:{}},Hn=(e,t,n)=>{const o=e.documents[t]||Dr;return{...e,documents:{...e.documents,[t]:{...o,...n}}}},lp=class extends Ye{constructor(e,t,n){super(e,t),this.searchStop$=Ae(),this.searchStart$=Ae(),this.searchResult$
2114=Ae(),this.searchActiveResultChange$=Ae(),this.searchResultState$=Ae(),this.searchState$=Ae(),this.currentTask=new Map,this.pluginConfig=n}onDocumentLoadingStarted(e){const t={...Dr,flags:this.pluginConfig.flags||[],showAllResults:this.pluginConfig.showAllResults??!0};this.dispatch((function(n,o){return{type:Qm,payload:{documentId:n,state:o}}})(e,t))}onDocumentClosed(e){this.stopSearchSession(e),this.dispatch((function(t){return{type:Jm,payload:t}})(e)),this.currentTask.delete(e)}async initialize(){}onStoreUpdated(e,t){for(const n in t.documents){const o=e.documents[n],i=t.documents[n];o!==i&&(this.searchState$.emit({documentId:n,state:i}),o&&o.results===i.results&&o.activeResultIndex===i.activeResultIndex&&o.showAllResults===i.showAllResults&&o.active===i.active||this.searchResultState$.emit({documentId:n,state:{results:i.results,activeResultIndex:i.activeResultIndex,showAllResults:i.showAllResults,active:i.active}}))}}buildCapability(){const e=n=>n??this.getActiveDocumentId(),t=n=>{const o=e(n),i=this.state.documents[o];if(!i)throw new Error(`Search state not found for document ${o}`);return i};return{startSearch:n=>this.startSearchSession(e(n)),stopSearch:n=>this.stopSearchSession(e(n)),searchAllPages:(n,o)=>this.searchAllPages(n,e(o)),nextResult:n=>this.nextResult(e(n)),previousResult:n=>this.previousResult(e(n)),goToResult:(n,o)=>this.goToResult(n,e(o)),setShowAllResults:(n,o)=>this.dispatch(Ac(e(o),n)),getShowAllResults:n=>t(n).showAllResults,getFlags:n=>t(n).flags,setFlags:(n,o)=>this.setFlags(n,e(o)),getState:n=>t(n),forDocument:this.createSearchScope.bind(this),onSearchResult:this.searchResult$.on,onSearchStart:this.searchStart$.on,onSearchStop:this.searchStop$.on,onActiveResultChange:this.searchActiveResultChange$.on,onSearchResultStateChange:this.searchResultState$.on,onStateChange:this.searchState$.on}}createSearchScope(e){const t=()=>{const n=this.state.documents[e];if(!n)throw new Error(`Search state not found for document ${e}`);return n};return{startSearch:()=>this.startSearchSession(e),stopSearch:()=>this.stopSearchSession(e),searchAllPages:n=>this.searchAllPages(n,e),nextResult:()=>this.nextResult(e),previousResult:()=>this.previousResult(e),goToResult:n=>this.goToResult(n,e),setShowAllResults:n=>this.dispatch(Ac(e,n)),getShowAllResults:()=>t().showAllResults,getFlags:()=>t().flags,setFlags:n=>this.setFlags(n,e),getState:t,onSearchResult:n=>this.searchResult$.on(o=>{o.documentId===e&&n(o.results)}),onSearchStart:n=>this.searchStart$.on(o=>{o.documentId===e&&n()}),onSearchStop:n=>this.searchStop$.on(o=>{o.documentId===e&&n()}),onActiveResultChange:n=>this.searchActiveResultChange$.on(o=>{o.documentId===e&&n(o.index)}),onSearchResultStateChange:n=>this.searchResultState$.on(o=>{o.documentId===e&&n(o.state)}),onStateChange:n=>this.searchState$.on(o=>{o.documentId===e&&n(o.state)})}}setFlags(e,t){this.dispatch((function(o,i){return{type:np,payload:{documentId:o,flags:i}}})(t,e));const n=this.state.documents[t];n?.active&&this.searchAllPages(n.query,t,!0)}notifySearchStart(e){this.searchStart$.emit({documentId:e})}notifySearchStop(e){this.searchStop$.emit({documentId:e})}notifyActiveResultChange(e,t){this.searchActiveResultChange$.emit({documentId:e,index:t})}startSearchSession(e){this.getCoreDocument(e)&&(this.dispatch((function(t){return{type:ep,payload:{documentId:t}}})(e)),this.notifySearchStart(e))}stopSearchSession(e){var t;const n=this.state.documents[e];if(!n?.active)return;const o=this.currentTask.get(e);if(o){try{(t=o.abort)==null||t.call(o,{code:Z.Cancelled,message:"search stopped"})}catch{}this.currentTask.delete(e)}this.dispatch((function(i){return{type:tp,payload:{documentId:i}}})(e)),this.notifySearchStop(e)}searchAllPages(e,t,n=!1){var o;const i=this.state.documents[t];if(!i)return se.reject({code:Z.NotFound,message:"Search state not initialized"});const r=this.getCoreDocument(t);if(!r?.document)return se.reject({code:Z.NotFound,message:"Document not loaded"});const a=e.trim();if(i.query===a&&!n)return se.resolve({results:i.results,total:i.total});const s=this.currentTask.get(t);if(s){try{(o=s.abort)==null||o.call(s,{code:Z.Cancelled,message:"new search"})}catch{}this.currentTask.delete(t)}if(this.dispatch((function(c,d){return{type:ip,payload:{documentId:c,query:d}}})(t,a)),!a)return this.dispatch(xa(t,[],0,-1)),se.resolve({results:[],total:0});i.active||this.startSearchSession(t);const l=this.engine.searchAllPages(r.document,a,{flags:i.flags});return this.currentTask.set(t,l),l.onProgress(c=>{var d;(d=c?.results)!=null&&d.length&&this.currentTask.get(t)===l&&(this.dispatch((function(u,m){return{type:ap,payload:{documentId:u,results:m}}})(t,c.results)),this.state.documents[t].activeResultIndex===-1&&(this.dispatch(Pc(t,0)),this.notifyActiveResultChange(t,0)))}),l.wait(c=>{this.currentTask.delete(t);const d=c.total>0?0:-1;this.dispatch(xa(t,c.results,c.total,d)),this.searchResult$.emit({documentId:t,results:c}),c.total>0&&this.notifyActiveResultChange(t,0)},c=>{var d;((d=c?.reason)==null?void 0:d.code)!==Z.Cancelled&&(console.error("Error during search:",c),this.dispatch(xa(t,[],0,-1))),this.currentTask.delete(t)}),l}nextResult(e){const t=this.state.documents[e];if(!t||t.results.length===0)return-1;const n=t.activeResultIndex>=t.results.length-1?0:t.activeResultIndex+1;return this.goToResult(n,e)}previousResult(e){const t=this.state.documents[e];if(!t||t.results.length===0)return-1;const n=t.activeResultIndex<=0?t.results.length-1:t.activeResultIndex-1;return this.goToResult(n,e)}goToResult(e,t){const n=this.state.documents[t];return!n||n.results.length===0||e<0||e>=n.results.length?-1:(this.dispatch(Pc(t,e)),this.notifyActiveResultChange(t,e),e)}async destroy(){for(const e of Object.keys(this.state.documents))this.stopSearchSession(e);this.searchResult$.clear(),this.searchStart$.clear(),this.searchStop$.clear(),this.searchActiveResultChange$.clear(),this.searchResultState$.clear(),this.searchState$.clear(),super.destroy()}};lp.id="search";let cp=lp;const Tc="search",Lb={manifest:{id:Tc,name:"Search Plugin",version:"1.0.0",provides:["search"],requires:[],optional:[],defaultConfig:{flags:[]}},create:(e,t)=>
2114new cp(Tc,e,t),reducer:(e=Dc,t)=>{switch(t.type){case Qm:return{...e,documents:{...e.documents,[t.payload.documentId]:t.payload.state}};case Jm:{const n=t.payload,{[n]:o,...i}=e.documents;return{...e,documents:i}}case ep:return Hn(e,t.payload.documentId,{active:!0});case tp:return Hn(e,t.payload.documentId,{results:[],total:0,activeResultIndex:-1,query:"",loading:!1,active:!1});case np:return Hn(e,t.payload.documentId,{flags:t.payload.flags});case op:return Hn(e,t.payload.documentId,{showAllResults:t.payload.showAll});case ip:return Hn(e,t.payload.documentId,{loading:!0,query:t.payload.query,results:[],total:0,activeResultIndex:-1});case ap:{const{documentId:n,results:o}=t.payload,i=e.documents[n];if(!i)return e;const r=[...i.results,...o],a=i.activeResultIndex===-1&&r.length>0?0:i.activeResultIndex;return Hn(e,n,{results:r,total:r.length,activeResultIndex:a,loading:!0})}case rp:{const{documentId:n,results:o,total:i,activeResultIndex:r}=t.payload;return Hn(e,n,{results:o,total:i,activeResultIndex:r,loading:!1})}case sp:return Hn(e,t.payload.documentId,{activeResultIndex:t.payload.index});default:return e}},initialState:Dc},dp=()=>at(cp.id);function Ob({documentId:e,pageIndex:t,scale:n,style:o,highlightColor:i="#FFFF00",activeHighlightColor:r="#FFBF00",...a}){const{provides:s}=dp(),[l,c]=$(null),d=At(e),u=ee(()=>s?.forDocument(e),[s,e]),m=ee(()=>n!==void 0?n:d?.scale??1,[n,d?.scale]);return H(()=>{if(!u)return void c(null);const g=u.getState();return c({results:g.results,activeResultIndex:g.activeResultIndex,showAllResults:g.showAllResults,active:g.active}),u.onSearchResultStateChange(p=>{c(p)})},[u]),!l||!l.active?null:C("div",{style:{...o,pointerEvents:"none"},...a,children:l.results.map((g,p)=>({result:g,originalIndex:p})).filter(({result:g})=>g.pageIndex===t).filter(({originalIndex:g})=>l.showAllResults||g===l.activeResultIndex).map(({result:g,originalIndex:p})=>g.rects.map((f,v)=>C("div",{style:{position:"absolute",top:f.origin.y*m,left:f.origin.x*m,width:f.size.width*m,height:f.size.height*m,backgroundColor:p===l.activeResultIndex?r:i,mixBlendMode:"multiply",transform:"scale(1.02)",transformOrigin:"center",transition:"opacity .3s ease-in-out",opacity:1}},`${p}-${v}`)))})}const uo="selection",Nb={id:uo,name:"Selection Plugin",version:"1.0.0",provides:["selection"],requires:["interaction-manager"],optional:["viewport","scroll"],defaultConfig:{menuHeight:40}},up="SELECTION/INIT_STATE",hp="SELECTION/CLEANUP_STATE",mp="SELECTION/CACHE_PAGE_GEOMETRY",pp="SELECTION/SET_SELECTION",gp="SELECTION/START_SELECTION",fp="SELECTION/END_SELECTION",vp="SELECTION/CLEAR_SELECTION",yp="SELECTION/SET_RECTS",bp="SELECTION/SET_SLICES",wp="SELECTION/EVICT_PAGE_GEOMETRY",zc=(e,t)=>({type:pp,payload:{documentId:e,selection:t}}),Rc=e=>({type:gp,payload:{documentId:e}}),Ec=e=>({type:fp,payload:{documentId:e}}),_c=(e,t)=>({type:yp,payload:{documentId:e,rects:t}}),Lc=(e,t)=>({type:bp,payload:{documentId:e,slices:t}}),xp={geometry:{},rects:{},slices:{},selection:null,active:!1,selecting:!1},Oc={documents:{}},gn=(e,t,n)=>({...e,documents:{...e.documents,[t]:n}});function hi(e,t){return e.rects[t]??[]}function $o(e,t){return Os(hi(e,t))}function Ca(e){const t=[],n=e.rects;for(const o in n){const i=Number(o),r=Os(n[i]);r&&t.push({page:i,rect:r})}return t}function Nc(e,t){const n=e.rects[t]||[];if(n.length===0)return null;const o=$o(e,t);return o?{pageIndex:t,rect:o,segmentRects:n}:null}function $c(e){const t=[],n=Object.keys(e.rects).map(Number);for(const o of n){const i=e.rects[o]||[];if(i.length===0)continue;const r=$o(e,o);r&&t.push({pageIndex:o,rect:r,segmentRects:i})}return t}function Ji(e,t,n=1.5){for(const s of e.runs){if(!(t.y>=s.rect.y&&t.y<=s.rect.y+s.rect.height&&t.x>=s.rect.x&&t.x<=s.rect.x+s.rect.width))continue;const l=s.glyphs.findIndex(c=>{const d=c.tightX??c.x,u=c.tightY??c.y,m=c.tightWidth??c.width,g=c.tightHeight??c.height;return t.x>=d&&t.x<=d+m&&t.y>=u&&t.y<=u+g});if(l!==-1)return s.charStart+l}if(n<=0)return-1;const o=(function(s,l){let c=0,d=0;for(const u of s.runs)for(const m of u.glyphs)m.flags!==2&&(c+=m.height,d++);return d===0?0:c/d*l})(e,n),i=o/2;let r=-1,a=1/0;for(const s of e.runs)if(!(t.y<s.rect.y-i||t.y>s.rect.y+s.rect.height+i||t.x<s.rect.x-i||t.x>s.rect.x+s.rect.width+i))for(let l=0;l<s.glyphs.length;l++){const c=s.glyphs[l];if(c.flags===2)continue;
2114const d=c.tightX??c.x,u=c.tightY??c.y,m=c.tightWidth??c.width,g=c.tightHeight??c.height,p=d-i,f=d+m+i,v=u-i,y=u+g+i;if(t.x<p||t.x>f||t.y<v||t.y>y)continue;const b=Math.min(Math.abs(t.x-d),Math.abs(t.x-(d+m)))+Math.min(Math.abs(t.y-u),Math.abs(t.y-(u+g)));b<a&&(a=b,r=s.charStart+l)}return r}function Fc(e,t,n){if(!e||!t||n<e.start.page||n>e.end.page)return null;const o=n===e.start.page?e.start.index:0,i=t.runs[t.runs.length-1],r=i.charStart+i.glyphs.length-1;return{from:o,to:n===e.end.page?e.end.index:r}}function jc(e,t,n,o=!0){const i=[];for(const r of e.runs){const a=r.charStart,s=a+r.glyphs.length-1;if(s<t||a>n)continue;const l=Math.max(t,a)-a,c=Math.min(n,s)-a;let d=1/0,u=-1/0,m=1/0,g=-1/0,p=0,f=0,v=-1/0;const y=()=>{d!==1/0&&p>0&&i.push({rect:{origin:{x:d,y:m},size:{width:u-d,height:g-m}},charCount:p,fontSize:r.fontSize}),d=1/0,u=-1/0,m=1/0,g=-1/0,p=0,f=0,v=-1/0};for(let b=l;b<=c;b++){const w=r.glyphs[b];if(w.flags!==2){if(p>0&&v>-1/0){const x=Math.abs(w.x-v),k=f/p;k>0&&x>2.5*k&&y()}d=Math.min(d,w.x),u=Math.max(u,w.x+w.width),m=Math.min(m,w.y),g=Math.max(g,w.y+w.height),p++,f+=w.width,v=w.x+w.width}}y()}return o?(function(r){const a=[];let s=null,l=null;for(const c of r)s&&l?Fb(s,c)?l=Cp(l,c.rect):(a.push(l),l=c.rect):l=c.rect,s=c;return l&&!es(l)&&a.push(l),a})(i):i.map(r=>r.rect)}function Cp(e,t){const n=Math.min(e.origin.x,t.origin.x),o=Math.min(e.origin.y,t.origin.y);return{origin:{x:n,y:o},size:{width:Math.max(e.origin.x+e.size.width,t.origin.x+t.size.width)-n,height:Math.max(e.origin.y+e.size.height,t.origin.y+t.size.height)-o}}}function es(e){return e.size.width<=0||e.size.height<=0}function $b(e,t){if(es(e)||es(t))return 0;const n=Cp(e,t);return n.size.height===e.size.height||n.size.height===t.size.height?1:(function(i,r){const a=Math.max(i.origin.x,r.origin.x),s=Math.max(i.origin.y,r.origin.y),l=Math.min(i.origin.x+i.size.width,r.origin.x+r.size.width),c=Math.min(i.origin.y+i.size.height,r.origin.y+r.size.height);return{origin:{x:a,y:s},size:{width:Math.max(0,l-a),height:Math.max(0,c-s)}}})(e,t).size.height/n.size.height}function Fb(e,t){if(e.fontSize!=null&&t.fontSize!=null&&e.fontSize>0&&t.fontSize>0&&Math.max(e.fontSize,t.fontSize)/Math.min(e.fontSize,t.fontSize)>1.5)return!1;const n=e.rect,o=t.rect;if($b(n,o)<.8)return!1;const i=1*n.size.width/e.charCount,r=1*o.size.width/t.charCount,a=n.origin.x-i,s=n.origin.x+n.size.width+i,l=o.origin.x-r;return a<o.origin.x+o.size.width+r&&s>l}function er(e,t){for(let n=0;n<e.runs.length;n++){const o=e.runs[n],i=t-o.charStart;if(i>=0&&i<o.glyphs.length)return{runIdx:n,localIdx:i}}return null}function Bc(e){return e===1||e===2}function Hc(e){return e.rect.width===0&&e.rect.height===0}function Uc(e,t,n,o){const i=Math.max(t,o)-Math.min(e,n),r=Math.max(0,Math.min(t,o)-Math.max(e,n));return i!==0&&r/i>=.5}const kp=class extends Ye{constructor(e,t,n){var o,i,r;super(e,t),this.enabledModesPerDoc=new Map,this.selecting=new Map,this.anchor=new Map,this.hasTextAnchor=new Map,this.marqueePage=new Map,this.pageCallbacks=new Map,this.geoAccessOrder=new Map,this.menuPlacement$=et((s,l)=>({documentId:s,placement:l})),this.selChange$=et((s,l)=>({documentId:s,selection:l,modeId:this.interactionManagerCapability.forDocument(s).getActiveMode()})),this.textRetrieved$=et((s,l)=>({documentId:s,text:l})),this.copyToClipboard$=et((s,l)=>({documentId:s,text:l}),{cache:!1}),this.beginSelection$=et((s,l)=>({documentId:s,page:l.page,index:l.index,modeId:l.modeId}),{cache:!1}),this.endSelection$=et((s,l)=>({documentId:s,modeId:l.modeId}),{cache:!1}),this.marqueeChange$=et((s,l)=>({documentId:s,pageIndex:l.pageIndex,rect:l.rect,modeId:l.modeId}),{cache:!1}),this.marqueeEnd$=et((s,l)=>({documentId:s,pageIndex:l.pageIndex,rect:l.rect,modeId:l.modeId}),{cache:!1}),this.emptySpaceClick$=et((s,l)=>({documentId:s,pageIndex:l.pageIndex,modeId:l.modeId}),{cache:!1}),this.viewportCapability=null,this.scrollCapability=null,this.config=n,this.menuHeight=n.menuHeight??40;const a=t.getPlugin("interaction-manager");if(!a)throw new Error("SelectionPlugin: InteractionManagerPlugin is required.");this.interactionManagerCapability=a.provides(),this.viewportCapability=((o=t.getPlugin("viewport"))==null?void 0:o.provides())??null,this.scrollCapability=((i=t.getPlugin("scroll"))==null?void 0:i.provides())??null,this.coreStore.onAction(Zo,s=>{const{documentId:l,pageIndexes:c}=s.payload,d=c.map(u=>this.getNewPageGeometryAndCache(l,u));de.all(d).wait(()=>
2114{c.forEach(u=>{this.notifyPage(l,u)})},vt)}),(r=this.viewportCapability)==null||r.onViewportChange(s=>{this.recalculateMenuPlacement(s.documentId)},{mode:"throttle",wait:100})}onDocumentLoadingStarted(e){var t;this.dispatch(((o,i)=>({type:up,payload:{documentId:o,state:i}}))(e,xp));const n=((t=this.config.marquee)==null?void 0:t.enabled)!==!1;this.enabledModesPerDoc.set(e,new Map([["pointerMode",{enableSelection:!0,showSelectionRects:!0,enableMarquee:n,showMarqueeRects:!0}]])),this.pageCallbacks.set(e,new Map),this.geoAccessOrder.set(e,[]),this.selecting.set(e,!1),this.anchor.set(e,void 0),this.hasTextAnchor.set(e,!1)}onDocumentClosed(e){this.dispatch((t=>({type:hp,payload:t}))(e)),this.enabledModesPerDoc.delete(e),this.pageCallbacks.delete(e),this.geoAccessOrder.delete(e),this.selecting.delete(e),this.hasTextAnchor.delete(e),this.anchor.delete(e),this.marqueePage.delete(e),this.selChange$.clearScope(e),this.textRetrieved$.clearScope(e),this.copyToClipboard$.clearScope(e),this.beginSelection$.clearScope(e),this.endSelection$.clearScope(e),this.menuPlacement$.clearScope(e),this.marqueeChange$.clearScope(e),this.marqueeEnd$.clearScope(e),this.emptySpaceClick$.clearScope(e)}async initialize(){}async destroy(){this.selChange$.clear(),this.textRetrieved$.clear(),this.copyToClipboard$.clear(),this.beginSelection$.clear(),this.endSelection$.clear(),this.menuPlacement$.clear(),this.marqueeChange$.clear(),this.marqueeEnd$.clear(),this.emptySpaceClick$.clear(),super.destroy()}buildCapability(){const e=t=>t??this.getActiveDocumentId();return{getFormattedSelection:t=>$c(this.getDocumentState(e(t))),getFormattedSelectionForPage:(t,n)=>Nc(this.getDocumentState(e(n)),t),getHighlightRectsForPage:(t,n)=>hi(this.getDocumentState(e(n)),t),getHighlightRects:t=>this.getDocumentState(e(t)).rects,getBoundingRectForPage:(t,n)=>$o(this.getDocumentState(e(n)),t),getBoundingRects:t=>Ca(this.getDocumentState(e(t))),getSelectedText:t=>this.getSelectedText(e(t)),clear:t=>this.clearSelection(e(t)),copyToClipboard:t=>this.copyToClipboard(e(t)),getState:t=>this.getDocumentState(e(t)),enableForMode:(t,n,o)=>{var i;return(i=this.enabledModesPerDoc.get(e(o)))==null?void 0:i.set(t,{...n})},isEnabledForMode:(t,n)=>{var o;return((o=this.enabledModesPerDoc.get(e(n)))==null?void 0:o.has(t))??!1},setMarqueeEnabled:(t,n)=>this.setMarqueeEnabled(e(n),t),isMarqueeEnabled:t=>this.isMarqueeEnabled(e(t)),forDocument:this.createSelectionScope.bind(this),onCopyToClipboard:this.copyToClipboard$.onGlobal,onSelectionChange:this.selChange$.onGlobal,onTextRetrieved:this.textRetrieved$.onGlobal,onBeginSelection:this.beginSelection$.onGlobal,onEndSelection:this.endSelection$.onGlobal,onMarqueeChange:this.marqueeChange$.onGlobal,onMarqueeEnd:this.marqueeEnd$.onGlobal,onEmptySpaceClick:this.emptySpaceClick$.onGlobal}}createSelectionScope(e){return{getFormattedSelection:()=>$c(this.getDocumentState(e)),getFormattedSelectionForPage:t=>Nc(this.getDocumentState(e),t),getHighlightRectsForPage:t=>hi(this.getDocumentState(e),t),getHighlightRects:()=>this.getDocumentState(e).rects,getBoundingRectForPage:t=>$o(this.getDocumentState(e),t),getBoundingRects:()=>Ca(this.getDocumentState(e)),getSelectedText:()=>this.getSelectedText(e),clear:()=>this.clearSelection(e),copyToClipboard:()=>this.copyToClipboard(e),getState:()=>this.getDocumentState(e),setMarqueeEnabled:t=>this.setMarqueeEnabled(e,t),isMarqueeEnabled:()=>this.isMarqueeEnabled(e),onSelectionChange:this.selChange$.forScope(e),onTextRetrieved:this.textRetrieved$.forScope(e),onCopyToClipboard:this.copyToClipboard$.forScope(e),onBeginSelection:this.beginSelection$.forScope(e),onEndSelection:this.endSelection$.forScope(e),onMarqueeChange:this.marqueeChange$.forScope(e),onMarqueeEnd:this.marqueeEnd$.forScope(e),onEmptySpaceClick:this.emptySpaceClick$.forScope(e)}}getDocumentState(e){const t=this.state.documents[e];if(!t)throw new Error(`Selection state not found for document: ${e}`);return t}onMenuPlacement(e,t){return this.menuPlacement$.forScope(e)(t)}registerSelectionOnPage(e){var t;const{documentId:n,pageIndex:o,onRectsChange:i}=e,r=this.state.documents[n];if(!r)return this.logger.warn("SelectionPlugin","RegisterFailed",`Cannot register selection on page ${o} for document ${n}: document state not initialized.`),()=>{};(t=this.pageCallbacks.get(n))==null||t.set(o,i);const a=this.getOrLoadGeometry(n,o),s=this.interactionManagerCapability.forDocument(n),l=this.enabledModesPerDoc.get(n);i({rects:hi(r,o),boundingRect:$o(r,o)}),a.wait(u=>{const m=this.getDocumentState(n),g=m.selection;if(!g||o<g.start.page||o>g.end.page)return;const p=Fc(g,u,o);if(!p)return;const f=jc(u,p.from,p.to);this.dispatch(_c(n,{...m.rects,[o]:f})),this.dispatch(Lc(n,{...m.slices,[o]:{start:p.from,count:p.to-p.from+1}})),this.notifyPage(n,o)},vt);const c=(function(u){const m=u.minDragDistance??3,g=u.toleranceFactor??1.5;let p=null,f=null,v=!1,y=0;function b(){var w;p=null,f=null,v=!1,(w=u.setHasTextAnchor)==null||w.call(u,!1)}return{onPointerDown:(w,x,k)=>{var I,S;if(x.target===x.currentTarget&&((I=u.onEmptySpaceClick)==null||I.call(u,k)),!u.isEnabled(k))return;const A=Date.now();(y===0||A-y>=500)&&u.onClear(k);const M=u.getGeometry();if(!M)return;const P=Ji(M,w,g);P!==-1&&(p=P,f=w,v=!1,(S=u.setHasTextAnchor)==null||S.call(u,!0))},onPointerMove:(w,x,k)=>{if(!u.isEnabled(k))return;const I=u.getGeometry();if(!I)return;const S=Ji(I,w,g);if(u.setCursor(S!==-1?"text":null),p!==null&&f&&!v){const A=w.x-f.x,M=w.y-f.y;return void(Math.sqrt(A*A+M*M)>=m&&(v=!0,u.onBegin(p,k),S!==-1&&u.onUpdate(S,k)))}u.isSelecting()&&S!==-1&&u.onUpdate(S,k)},onPointerUp:(w,x,k)=>{u.isEnabled(k)&&v&&u.onEnd(k),b()},onDoubleClick:(w,x,k)=>{var I;if(!u.isEnabled(k))return;const S=u.getGeometry();if(!S)return;const A=Ji(S,w,g);A!==-1&&(y=Date.now(),(I=u.onWordSelect)==null||I.call(u,A,k))},onClick:(w,x,k)=>{var I;if(!u.isEnabled(k)||y===0)return;if(Date.now()-y>500)return void(y=0);y=0;const S=u.getGeometry();if(!S)return;const A=Ji(S,w,g);A!==-1&&((I=u.onLineSelect)==null||I.call(u,A,k))},onHandlerActiveEnd:w=>{b(),u.isEnabled(w)&&u.onClear(w)}}})({getGeometry:()=>this.getDocumentState(n).geometry[o],isEnabled:u=>{const m=l?.get(u);return!!m&&m.enableSelection!==!1},onBegin:(u,m)=>this.beginSelection(n,o,u,m),onUpdate:(u,m)=>this.updateSelection(n,o,u,m),onEnd:u=>this.endSelection(n,u),onClear:u=>this.clearSelection(n,u),isSelecting:()=>this.selecting.get(n)??!1,setCursor:u=>u?s.setCursor("selection-text",u,10):s.removeCursor("selection-text"),onEmptySpaceClick:u=>this.emptySpaceClick$.emit(n,{pageIndex:o,modeId:u}),onWordSelect:(u,m)=>this.selectWord(n,o,u,m),onLineSelect:(u,m)=>this.selectLine(n,o,u,m),setHasTextAnchor:u=>this.hasTextAnchor.set(n,u),minDragDistance:this.config.minSelectionDragDistance,toleranceFactor:this.config.toleranceFactor}),d=this.interactionManagerCapability.registerAlways({scope:{type:"page",documentId:n,pageIndex:o},handlers:c});return()=>{var u;d(),(u=this.pageCallbacks.get(n))==null||u.delete(o),a.abort({code:Z.Cancelled,message:"Cleanup"})}}registerMarqueeOnPage(e){var t;const{documentId:n,pageIndex:o,scale:i,onRectChange:r}=e;if(!this.state.documents[n])return this.logger.warn("SelectionPlugin","RegisterMarqueeFailed",`Cannot register marquee on page ${o} for document ${n}: document state not initialized.`),()=>{};const a=this.coreState.core.documents[n];if(!a||!a.document)return this.logger.warn("SelectionPlugin","DocumentNotFound",`Cannot register marquee on page ${o}: document not found`),()=>{};const s=a.document.pages[o];if(!s)return this.logger.warn("SelectionPlugin","PageNotFound",`Cannot register marquee on page ${o}: page not found`),()=>{};const l=s.size,c=((t=this.config.marquee)==null?void 0:t.minDragPx)??5,d=()=>{var m;const g=this.interactionManagerCapability.forDocument(n).getActiveMode(),p=(m=this.enabledModesPerDoc.get(n))==null?void 0:m.get(g);return p?.showMarqueeRects!==!1},u=(function(m){const{pageSize:g,scale:p,minDragPx:f=5}=m;let v=null,y=null;return{onPointerDown:(b,w,x)=>{var k,I;
2114m.isEnabled(x)&&((k=m.isTextSelecting)!=null&&k.call(m)||(v=b,y={origin:{x:b.x,y:b.y},size:{width:0,height:0}},m.onBegin(b,x),(I=w.setPointerCapture)==null||I.call(w)))},onPointerMove:(b,w,x)=>{if(!v||!m.isEnabled(x))return;const k=ve(b.x,0,g.width),I=ve(b.y,0,g.height);y={origin:{x:Math.min(v.x,k),y:Math.min(v.y,I)},size:{width:Math.abs(k-v.x),height:Math.abs(I-v.y)}},m.onChange(y,x)},onPointerUp:(b,w,x)=>{var k;m.isEnabled(x)&&(y&&v&&(Math.max(y.size.width,y.size.height)*p>f?m.onEnd(y,x):m.onCancel(x)),v=null,y=null,(k=w.releasePointerCapture)==null||k.call(w))},onPointerCancel:(b,w,x)=>{var k;m.isEnabled(x)&&(v=null,y=null,m.onCancel(x),(k=w.releasePointerCapture)==null||k.call(w))}}})({pageSize:l,scale:i,minDragPx:c,isEnabled:m=>{var g;const p=(g=this.enabledModesPerDoc.get(n))==null?void 0:g.get(m);return p?.enableMarquee===!0},isTextSelecting:()=>(this.selecting.get(n)??!1)||(this.hasTextAnchor.get(n)??!1),onBegin:(m,g)=>this.beginMarquee(n,o,m,g),onChange:(m,g)=>{this.updateMarquee(n,o,m,g),r(d()?m:null)},onEnd:(m,g)=>{this.endMarquee(n,o,m,g),r(null)},onCancel:m=>{this.cancelMarquee(n,m),r(null)}});return this.interactionManagerCapability.registerAlways({scope:{type:"page",documentId:n,pageIndex:o},handlers:u})}getPlacementMetrics(e,t,n,o){var i;const r=(i=this.scrollCapability)==null?void 0:i.forDocument(e),a=r?.getRectPositionForPage(t,n);if(!a)return null;const s=a.origin.y-o.scrollTop,l=a.origin.y+a.size.height-o.scrollTop;return{pageIndex:t,rect:n,spaceAbove:s,spaceBelow:o.clientHeight-l,isBottomVisible:l>0&&l<=o.clientHeight,isTopVisible:s>=0&&s<o.clientHeight}}emitMenuPlacement(e,t){this.menuPlacement$.emit(e,t),t?this.interactionManagerCapability.claimPageActivity(e,"selection-menu",t.pageIndex):this.interactionManagerCapability.releasePageActivity(e,"selection-menu")}recalculateMenuPlacement(e){const t=this.state.documents[e];if(!t)return;if(t.selecting||t.selection===null)return void this.emitMenuPlacement(e,null);const n=Ca(t);if(n.length===0)return void this.emitMenuPlacement(e,null);const o=n[n.length-1];if(!this.viewportCapability||!this.scrollCapability)return void this.emitMenuPlacement(e,{pageIndex:o.page,rect:o.rect,spaceAbove:0,spaceBelow:1/0,suggestTop:!1,isVisible:!0});const i=this.viewportCapability.forDocument(e).getMetrics(),r=n[0],a=this.getPlacementMetrics(e,o.page,o.rect,i),s=this.getPlacementMetrics(e,r.page,r.rect,i);a&&a.isBottomVisible&&a.spaceBelow>this.menuHeight?this.emitMenuPlacement(e,{...a,suggestTop:!1,isVisible:!0}):s&&s.isTopVisible?this.emitMenuPlacement(e,{...s,suggestTop:!0,isVisible:!0}):a&&a.isBottomVisible?this.emitMenuPlacement(e,{...a,suggestTop:!1,isVisible:!0}):this.emitMenuPlacement(e,null)}notifyPage(e,t){var n,o;const i=(n=this.pageCallbacks.get(e))==null?void 0:n.get(t);if(i){const r=this.getDocumentState(e),a=this.interactionManagerCapability.forDocument(e).getActiveMode(),s=(o=this.enabledModesPerDoc.get(e))==null?void 0:o.get(a);i(s&&(s.showSelectionRects??s.showRects)!==!1?{rects:hi(r,t),boundingRect:$o(r,t)}:{rects:[],boundingRect:null})}}notifyAllPages(e){var t;(t=this.pageCallbacks.get(e))==null||t.forEach((n,o)=>{this.notifyPage(e,o)})}getNewPageGeometryAndCache(e,t){const n=this.getCoreDocument(e);if(!n||!n.document)return se.reject({code:Z.NotFound,message:"Doc Not Found"});const o=n.document.pages.find(r=>r.index===t),i=this.engine.getPageGeometry(n.document,o);return i.wait(r=>{this.dispatch(((a,s,l)=>({type:mp,payload:{documentId:a,page:s,geo:l}}))(e,t,r)),this.touchGeometry(e,t)},vt),i}getOrLoadGeometry(e,t){const n=this.getDocumentState(e).geometry[t];return n?(this.touchGeometry(e,t),se.resolve(n)):this.getNewPageGeometryAndCache(e,t)}touchGeometry(e,t){const n=this.geoAccessOrder.get(e);if(!n)return;const o=n.indexOf(t);o>-1&&n.splice(o,1),n.push(t),this.evictGeometryIfNeeded(e)}evictGeometryIfNeeded(e){const t=this.config.maxCachedGeometries??50,n=this.geoAccessOrder.get(e);if(!n||n.length<=t)return;const o=this.pageCallbacks.get(e),i=[];for(;n.length-i.length>t;){const r=n.find(a=>!i.includes(a)&&!o?.has(a));if(r===void 0)break;i.push(r)}if(i.length!==0){for(const r of i){const a=n.indexOf(r);a>-1&&n.splice(a,1)}this.dispatch(((r,a)=>({type:wp,payload:{documentId:r,pages:a}}))(e,i))}}beginSelection(e,t,n,o){this.selecting.set(e,!0),this.anchor.set(e,{page:t,index:n}),this.dispatch(Rc(e)),this.beginSelection$.emit(e,{page:t,index:n,modeId:o}),this.recalculateMenuPlacement(e)}endSelection(e,t){this.selecting.set(e,!1),this.anchor.set(e,void 0),this.dispatch(Ec(e)),this.endSelection$.emit(e,{modeId:t}),this.recalculateMenuPlacement(e)}clearSelection(e,t){this.selecting.set(e,!1),this.anchor.set(e,void 0),this.dispatch((n=>({type:vp,payload:{documentId:n}}))(e)),this.selChange$.emit(e,null),this.emitMenuPlacement(e,null),this.notifyAllPages(e)}selectWord(e,t,n,o){const i=this.getDocumentState(e).geometry[t];if(!i)return;const r=(function(a,s){if(!er(a,s))return null;const l=(function(u){if(u.runs.length===0)return 0;const m=u.runs[u.runs.length-1];return m.charStart+m.glyphs.length})(a);if(l===0)return null;
vendor: 6,127 bytes, lines 2114-2115
2114let c=s;for(;c>0;){const u=er(a,c-1);if(!u||Bc(a.runs[u.runIdx].glyphs[u.localIdx].flags))break;c--}let d=s;for(;d<l-1;){const u=er(a,d+1);if(!u||Bc(a.runs[u.runIdx].glyphs[u.localIdx].flags))break;d++}return{from:c,to:d}})(i,n);r&&this.applyInstantSelection(e,t,r.from,r.to,o)}selectLine(e,t,n,o){const i=this.getDocumentState(e).geometry[t];if(!i)return;const r=(function(a,s){const l=er(a,s);if(!l)return null;const c=a.runs[l.runIdx],d=c.rect.y,u=c.rect.y+c.rect.height;let m=c.charStart,g=c.charStart+c.glyphs.length-1;for(let p=l.runIdx-1;p>=0;p--){const f=a.runs[p];if(!Hc(f)){if(!Uc(f.rect.y,f.rect.y+f.rect.height,d,u))break;m=f.charStart}}for(let p=l.runIdx+1;p<a.runs.length;p++){const f=a.runs[p];if(!Hc(f)){if(!Uc(f.rect.y,f.rect.y+f.rect.height,d,u))break;g=f.charStart+f.glyphs.length-1}}return{from:m,to:g}})(i,n);r&&this.applyInstantSelection(e,t,r.from,r.to,o)}applyInstantSelection(e,t,n,o,i){const r={start:{page:t,index:n},end:{page:t,index:o}};this.selecting.set(e,!1),this.anchor.set(e,void 0),this.dispatch(Rc(e)),this.dispatch(zc(e,r)),this.updateRectsAndSlices(e,r),this.dispatch(Ec(e)),this.selChange$.emit(e,r),this.beginSelection$.emit(e,{page:t,index:n,modeId:i}),this.endSelection$.emit(e,{modeId:i});for(let a=r.start.page;a<=r.end.page;a++)this.notifyPage(e,a);this.recalculateMenuPlacement(e)}updateSelection(e,t,n,o){if(!this.selecting.get(e)||!this.anchor.get(e))return;const i=this.anchor.get(e),r=t>i.page||t===i.page&&n>=i.index,a={start:r?i:{page:t,index:n},end:r?{page:t,index:n}:i};this.dispatch(zc(e,a)),this.updateRectsAndSlices(e,a),this.selChange$.emit(e,a);for(let s=a.start.page;s<=a.end.page;s++)this.notifyPage(e,s)}updateRectsAndSlices(e,t){const n=this.getDocumentState(e),o={},i={};for(let r=t.start.page;r<=t.end.page;r++){const a=n.geometry[r],s=Fc(t,a,r);s&&(o[r]=jc(a,s.from,s.to),i[r]={start:s.from,count:s.to-s.from+1})}this.dispatch(_c(e,o)),this.dispatch(Lc(e,i))}getSelectedText(e){if(!this.checkPermission(e,j.CopyContents))return this.logger.debug("SelectionPlugin","GetSelectedText",`Cannot get selected text: document ${e} lacks CopyContents permission`),se.reject({code:Z.Security,message:"Document lacks CopyContents permission"});const t=this.getCoreDocument(e),n=this.getDocumentState(e);if(!t?.document||!n.selection)return se.reject({code:Z.NotFound,message:"Doc Not Found or No Selection"});const o=n.selection,i=[];for(let a=o.start.page;a<=o.end.page;a++){const s=n.slices[a];s&&i.push({pageIndex:a,charIndex:s.start,charCount:s.count})}if(i.length===0)return se.resolve([]);const r=this.engine.getTextSlices(t.document,i);return r.wait(a=>{this.textRetrieved$.emit(e,a)},vt),r}copyToClipboard(e){if(!this.checkPermission(e,j.CopyContents))return void this.logger.debug("SelectionPlugin","CopyToClipboard",`Cannot copy to clipboard: document ${e} lacks CopyContents permission`);this.getSelectedText(e).wait(t=>{this.copyToClipboard$.emit(e,t.join(` 2115`))},vt)}beginMarquee(e,t,n,o){this.marqueePage.set(e,t)}updateMarquee(e,t,n,o){this.marqueeChange$.emit(e,{pageIndex:t,rect:n,modeId:o})}endMarquee(e,t,n,o){this.marqueeEnd$.emit(e,{pageIndex:t,rect:n,modeId:o}),this.marqueeChange$.emit(e,{pageIndex:t,rect:null,modeId:o}),this.marqueePage.delete(e)}cancelMarquee(e,t){const n=this.marqueePage.get(e);n!==void 0&&(this.marqueeChange$.emit(e,{pageIndex:n,rect:null,modeId:t}),this.marqueePage.delete(e))}setMarqueeEnabled(e,t){const n=this.enabledModesPerDoc.get(e);if(!n)return;const o=n.get("pointerMode");o?o.enableMarquee=t:t&&n.set("pointerMode",{enableMarquee:!0})}isMarqueeEnabled(e){var t;const n=(t=this.enabledModesPerDoc.get(e))==null?void 0:t.get("pointerMode");return n?.enableMarquee!==!1}};kp.id="selection";let el=kp;const jb={manifest:Nb,create:(e,t)=>new el(uo,e,t),reducer:(e=Oc,t)=>{switch(t.type){case up:{const{documentId:n,state:o}=t.payload;return gn(e,n,o)}case hp:{const n=t.payload,{[n]:o,...i}=e.documents;return{...e,documents:i}}case mp:{const{documentId:n,page:o,geo:i}=t.payload,r=e.documents[n];return r?gn(e,n,{...r,geometry:{...r.geometry,[o]:i}}):e}case pp:{const{documentId:n,selection:o}=t.payload,i=e.documents[n];return i?gn(e,n,{...i,selection:o,active:!0}):e}case gp:{const{documentId:n}=t.payload,o=e.documents[n];return o?gn(e,n,{...o,selecting:!0,selection:null,rects:{}}):e}case fp:{const{documentId:n}=t.payload,o=e.documents[n];return o?gn(e,n,{...o,selecting:!1}):e}case vp:{const{documentId:n}=t.payload,o=e.documents[n];return o?gn(e,n,{...o,selecting:!1,selection:null,rects:{},active:!1}):e}case yp:{const{documentId:n,rects:o}=t.payload,i=e.documents[n];return i?gn(e,n,{...i,rects:o}):e}case bp:{const{documentId:n,slices:o}=t.payload,i=e.documents[n];return i?gn(e,n,{...i,slices:o}):e}case wp:{const{documentId:n,pages:o}=t.payload,i=e.documents[n];if(!i)return e;const r={...i.geometry},a={...i.rects},s={...i.slices};for(const l of o)delete r[l],delete a[l],delete s[l];return gn(e,n,{...i,geometry:r,rects:a,slices:s})}case"SELECTION/RESET":{const{documentId:n}=t.payload;return e.documents[n]?gn(e,n,xp):e}default:return e}},initialState:Oc};function Ip(e,t){const{width:n,height:o}=e.size;switch(t%4){case 1:return{matrix:`matrix(0, -1, 1, 0, 0, ${o})`,width:o,height:n};case 2:return{matrix:`matrix(-1, 0, 0, -1, ${n}, ${o})`,width:n,height:o};case 3:return{matrix:`matrix(0, 1, -1, 0, ${n}, 0)`,width:o,height:n};default:return{matrix:"matrix(1, 0, 0, 1, 0, 0)",width:n,height:o}}}const Bb="onDblClick";function xi({children:e,...t}){const{rect:n,rotation:o}=t,{matrix:i,width:r,height:a}=Ip(n,o),s=Q(null);return H(()=>{const l=s.current;if(!l)return;const c=u=>{u.stopPropagation()},d=u=>{u.stopPropagation()};return l.addEventListener("pointerdown",c,{capture:!0}),l.addEventListener("touchstart",d,{capture:!0,passive:!0}),()=>{l.removeEventListener("pointerdown",c,{capture:!0}),l.removeEventListener("touchstart",d,{capture:!0})}},[]),C(fe,{children:e({menuWrapperProps:{style:{position:"absolute",left:n.origin.x,top:n.origin.y,transform:i,transformOrigin:"0 0",width:r,height:a,pointerEvents:"none",zIndex:3},ref:l=>{s.current=l}},matrix:i,rect:{origin:{x:n.origin.x,y:n.origin.y}
2115,size:{width:r,height:a}}})})}function Sp(e,t,n,o=!1){if(!t)return e;let{origin:{x:i,y:r},size:{width:a,height:s}}=e;const l=t.minWidth??1,c=t.minHeight??1,d=t.maxWidth,u=t.maxHeight;if(n&&a>0&&s>0){const m=a/s;a<l&&(a=l,s=a/m),s<c&&(s=c,a=s*m),d!==void 0&&a>d&&(a=d,s=a/m),u!==void 0&&s>u&&(s=u,a=s*m)}else a=Math.max(l,a),s=Math.max(c,s),d!==void 0&&(a=Math.min(d,a)),u!==void 0&&(s=Math.min(u,s));return t.boundingBox&&!o&&(i=Math.max(0,Math.min(i,t.boundingBox.width-a)),r=Math.max(0,Math.min(r,t.boundingBox.height-s))),{origin:{x:i,y:r},size:{width:a,height:s}}}function Wc(e,t,n){const i=Ns(e,t);return i.origin.x>=-1e-6&&i.origin.y>=-1e-6&&i.origin.x+i.size.width<=n.width+1e-6&&i.origin.y+i.size.height<=n.height+1e-6}function tr(e,t,n,o,i){const{startRect:r,maintainAspectRatio:a=!1,annotationRotation:s=0,constraints:l}=n,c=(function(m){return{x:m.includes("e")?"left":m.includes("w")?"right":"center",y:m.includes("s")?"top":m.includes("n")?"bottom":"center"}})(t),d=r.size.width/r.size.height||1;let u=(function(m,g,p){let f=m.origin.x,v=m.origin.y,y=m.size.width,b=m.size.height;return p.x==="left"?y+=g.x:p.x==="right"&&(f+=g.x,y-=g.x),p.y==="top"?b+=g.y:p.y==="bottom"&&(v+=g.y,b-=g.y),{origin:{x:f,y:v},size:{width:y,height:b}}})(r,e,c);if(a&&(u=(function(m,g,p,f){let{x:v,y}=m.origin,{width:b,height:w}=m.size;if(p.x==="center"||p.y==="center")p.y==="center"?(w=b/f,y=g.origin.y+(g.size.height-w)/2):(b=w*f,v=g.origin.x+(g.size.width-b)/2);else{const x=Math.abs(b-g.size.width),k=Math.abs(w-g.size.height),I=x+k;if(I===0)b=g.size.width,w=g.size.height;else{const S=x/I,A=k/I,M=b/f;b=S*b+A*(w*f),w=S*M+A*w}}return p.x==="right"&&(v=g.origin.x+g.size.width-b),p.y==="bottom"&&(y=g.origin.y+g.size.height-w),{origin:{x:v,y},size:{width:b,height:w}}})(u,r,c,d)),o&&(u=(function(m,g,p,f,v){if(!f)return m;let{x:y,y:b}=m.origin,{width:w,height:x}=m.size;w=Math.max(1,w),x=Math.max(1,x);const k=p.x==="left"?g.origin.x:g.origin.x+g.size.width,I=p.y==="top"?g.origin.y:g.origin.y+g.size.height,S=p.x==="left"?f.width-k:p.x==="right"?k:2*Math.min(g.origin.x,f.width-g.origin.x-g.size.width)+g.size.width,A=p.y==="top"?f.height-I:p.y==="bottom"?I:2*Math.min(g.origin.y,f.height-g.origin.y-g.size.height)+g.size.height;if(v){const M=w>S?S/w:1,P=x>A?A/x:1,T=Math.min(M,P);T<1&&(w*=T,x*=T)}else w=Math.min(w,S),x=Math.min(x,A);return y=p.x==="left"?k:p.x==="right"?k-w:g.origin.x+(g.size.width-w)/2,b=p.y==="top"?I:p.y==="bottom"?I-x:g.origin.y+(g.size.height-x)/2,y=Math.max(0,Math.min(y,f.width-w)),b=Math.max(0,Math.min(b,f.height-x)),{origin:{x:y,y:b},size:{width:w,height:x}}})(u,r,c,l?.boundingBox,a)),u=Sp(u,l,a,i),i&&(u=(function(m,g,p){let f,v;return f=p.x==="left"?g.origin.x:p.x==="right"?g.origin.x+g.size.width-m.size.width:g.origin.x+(g.size.width-m.size.width)/2,v=p.y==="top"?g.origin.y:p.y==="bottom"?g.origin.y+g.size.height-m.size.height:g.origin.y+(g.size.height-m.size.height)/2,{origin:{x:f,y:v},size:m.size}})(u,r,c)),s!==0){const m=(function(y,b){return{x:b.x==="left"?y.origin.x:b.x==="right"?y.origin.x+y.size.width:y.origin.x+y.size.width/2,y:b.y==="top"?y.origin.y:b.y==="bottom"?y.origin.y+y.size.height:y.origin.y+y.size.height/2}})(r,c),g={x:r.origin.x+r.size.width/2,y:r.origin.y+r.size.height/2},p={x:u.origin.x+u.size.width/2,y:u.origin.y+u.size.height/2},f=xo(m,g,s),v=xo(m,p,s);u={origin:{x:u.origin.x+(f.x-v.x),y:u.origin.y+(f.y-v.y)},size:u.size}}return u}const Hb={n:0,ne:45,e:90,se:135,s:180,sw:225,w:270,nw:315},Ub=["ns-resize","nesw-resize","ew-resize","nwse-resize","ns-resize","nesw-resize","ew-resize","nwse-resize"];function Wb(e,t,n=0){const o=((Hb[e]+90*t+n)%360+360)%360,i=Math.round(o/45)%8;return Ub[i]}function Gb(e,t,n){const o=-e/2;return n==="center"?o:n==="outside"?o-t:o+t}class qb{constructor(t,n){this.config=t,this.onUpdate=n,this.state="idle",this.startPoint=null,this.startElement=null,this.startRotationElement=null,this.gestureRotationCenter=null,this.activeHandle=null,this.currentPosition=null,this.activeVertexIndex=null,this.startVertices=[],this.currentVertices=[],this.rotationCenter=null,this.centerScreen=null,this.initialRotation=0,this.lastComputedRotation=0,this.rotationDelta=0,this.rotationSnappedAngle=null,this.currentVertices=t.vertices||[]}updateConfig(t){this.config={...this.config,...t},this.state!=="vertex-editing"&&(this.currentVertices=t.vertices||[])}startDrag(t,n){this.state="dragging",this.startPoint={x:t,y:n},this.startElement={...this.config.element},this.startRotationElement=this.config.rotationElement?{...this.config.rotationElement}:null,this.currentPosition={...this.config.element},this.onUpdate({state:"start",transformData:{type:"move",changes:{rect:this.startElement}}})}startResize(t,n,o){this.state="resizing",this.activeHandle=t,this.startPoint={x:n,y:o},this.startElement={...this.config.element},this.currentPosition={...this.config.element},this.onUpdate({state:"start",transformData:{type:"resize",changes:{rect:this.startElement},metadata:{handle:this.activeHandle,maintainAspectRatio:this.config.maintainAspectRatio}}})}startVertexEdit(t,n,o){this.currentVertices=[...this.config.vertices??this.currentVertices],t<0||t>=this.currentVertices.length||(this.state="vertex-editing",this.activeVertexIndex=t,this.startPoint={x:n,y:o},this.startVertices=[...this.currentVertices],this.gestureRotationCenter=this.config.rotationCenter??{x:this.config.element.origin.x+this.config.element.size.width/2,y:this.config.element.origin.y+this.config.element.size.height/2},this.onUpdate({state:"start",transformData:{type:"vertex-edit",changes:{vertices:this.startVertices},metadata:{vertexIndex:t}}}))}startRotation(t,n,o=0,i){this.state="rotating",this.startPoint={x:t,y:n},this.startElement={...this.config.element},this.rotationCenter=this.config.rotationCenter??{x:this.config.element.origin.x+this.config.element.size.width/2,y:this.config.element.origin.y+this.config.element.size.height/2};const{scale:r=1}=this.config,a=this.config.rotationElement??this.config.element,s=a.size.width*r,l=a.size.height*r,c=i??Math.max(s,l)/2+35,d=(o+90*(this.config.pageRotation??0))*Math.PI/180;this.centerScreen={x:t-c*Math.sin(d),y:n+c*Math.cos(d)},this.initialRotation=o,this.lastComputedRotation=o,this.rotationDelta=0,this.rotationSnappedAngle=null,this.onUpdate({state:"start",transformData:{type:"rotate",changes:{rotation:o},metadata:{rotationAngle:o,rotationDelta:0,rotationCenter:this.rotationCenter,isSnapped:!1}}})}move(t,n,o,i){if(this.state!=="idle"&&this.startPoint)if(o===void 0||o!==0){if(this.state==="dragging"&&this.startElement){const r=this.calculateDelta(t,n),a=this.calculateDragPosition(r);this.currentPosition=a,this.onUpdate({state:"move",transformData:{type:"move",changes:{rect:a}}})}else if(this.state==="resizing"&&this.activeHandle&&this.startElement){const r=(function(a,s,l){const{annotationRotation:c=0,constraints:d}=l,u=d?.boundingBox;if(c!==0&&u){const m=tr(a,s,l,!1,!0);if(Wc(m,c,u))return m;let g=tr({x:0,y:0},s,l,!1,!0),p=0,f=1;for(let v=0;v<20;v+=1){const y=(p+f)/2,b=tr({x:a.x*y,y:a.y*y},s,l,!1,!0);Wc(b,c,u)?(g=b,p=y):f=y}return g}return tr(a,s,l,!0,!1)})(this.calculateLocalDelta(t,n),this.activeHandle,{startRect:this.startElement,maintainAspectRatio:this.config.maintainAspectRatio||!!i,annotationRotation:this.config.annotationRotation,constraints:this.config.constraints});this.currentPosition=r,this.onUpdate({state:"move",transformData:{type:"resize",changes:{rect:r},metadata:{handle:this.activeHandle,maintainAspectRatio:this.config.maintainAspectRatio||!!i}}})}else if(this.state==="vertex-editing"&&this.activeVertexIndex!==null){const r=this.calculateVertexPosition(t,n);this.currentVertices=r,this.onUpdate({state:"move",transformData:{type:"vertex-edit",changes:{vertices:r},metadata:{vertexIndex:this.activeVertexIndex}}})}else if(this.state==="rotating"&&this.rotationCenter){const r=this.calculateAngleFromMouse(t,n),a=this.applyRotationSnapping(r),s=qi(a.angle),l=s-this.lastComputedRotation,c=l>180?l-360:l<-180?l+360:l;this.rotationDelta+=c,this.lastComputedRotation=s,this.rotationSnappedAngle=a.isSnapped?s:null,this.onUpdate({state:"move",transformData:{type:"rotate",changes:{rotation:s},metadata:{rotationAngle:s,rotationDelta:this.rotationDelta,rotationCenter:this.rotationCenter,isSnapped:a.isSnapped,snappedAngle:this.rotationSnappedAngle??void 0,cursorPosition:{clientX:t,clientY:n}}}})}}else this.end()}end(){if(this.state==="idle")return;const t=this.state,n=this.activeHandle,o=this.activeVertexIndex;if(t==="vertex-editing")this.onUpdate({state:"end",transformData:{type:"vertex-edit",changes:{vertices:this.currentVertices},metadata:{vertexIndex:o||void 0}}});else if(t==="rotating")this.onUpdate({state:"end",transformData:{type:"rotate",changes:{rotation:this.lastComputedRotation},metadata:{rotationAngle:this.lastComputedRotation,rotationDelta:this.rotationDelta,rotationCenter:this.rotationCenter||void 0,isSnapped:this.rotationSnappedAngle!==null,snappedAngle:this.rotationSnappedAngle??void 0}}});else{const i=this.currentPosition||this.config.element;this.onUpdate({state:"end",transformData:{type:t==="dragging"?"move":"resize",changes:{rect:i},metadata:t==="dragging"?void 0:{handle:n||void 0,maintainAspectRatio:this.config.maintainAspectRatio}}})}this.reset()}cancel(){this.state!=="idle"&&(this.state==="vertex-editing"?this.onUpdate({state:"end",transformData:{type:"vertex-edit",changes:{vertices:this.startVertices},metadata:{vertexIndex:this.activeVertexIndex||void 0}}}):this.state==="rotating"?this.onUpdate({state:"end",transformData:{type:"rotate",changes:{rotation:this.initialRotation},metadata:{rotationAngle:this.initialRotation,rotationDelta:0,rotationCenter:this.rotationCenter||void 0,isSnapped:!1}}}):this.startElement&&this.onUpdate({state:"end",transformData:{type:this.state==="dragging"?"move":"resize",changes:{rect:this.startElement},metadata:this.state==="dragging"?void 0:{handle:this.activeHandle||void 0,maintainAspectRatio:this.config.maintainAspectRatio}}}),this.reset())}reset(){this.state="idle",this.startPoint=null,this.startElement=null,this.startRotationElement=null,this.gestureRotationCenter=null,this.activeHandle=null,this.currentPosition=null,this.activeVertexIndex=null,this.startVertices=[],this.rotationCenter=null,this.centerScreen=null,this.initialRotation=0,this.lastComputedRotation=0,this.rotationDelta=0,this.rotationSnappedAngle=null}calculateDelta(t,n){if(!this.startPoint)return{x:0,y:0};const o={x:t-this.startPoint.x,y:n-this.startPoint.y};return this.transformDelta(o)}transformDelta(t){const{pageRotation:n=0,scale:o=1}=this.config,i=n*Math.PI/2,r=Math.cos(i),a=Math.sin(i),s=t.x/o,l=t.y/o;return{x:r*s+a*l,y:-a*s+r*l}}calculateLocalDelta(t,n){const o=this.calculateDelta(t,n),{annotationRotation:i=0}=this.config;if(i===0)return o;const r=i*Math.PI/180,a=Math.cos(r),s=Math.sin(r);return{x:a*o.x+s*o.y,y:-s*o.x+a*o.y}}clampPoint(t){var n;const o=(n=this.config.constraints)==null?void 0:n.boundingBox;if(!o)return t;const{annotationRotation:i=0}=this.config;if(i===0)return{x:Math.max(0,Math.min(t.x,o.width)),y:Math.max(0,Math.min(t.y,o.height))};const r=this.gestureRotationCenter??this.config.rotationCenter??{x:this.config.element.origin.x+this.config.element.size.width/2,y:this.config.element.origin.y+this.config.element.size.height/2},a=xo(t,r,i),s=Math.max(0,Math.min(a.x,o.width)),l=Math.max(0,Math.min(a.y,o.height));return s===a.x&&l===a.y?t:xo({x:s,y:l},r,-i)}calculateVertexPosition(t,n){if(this.activeVertexIndex===null)return this.startVertices;const o=this.calculateLocalDelta(t,n),i=[...this.startVertices],r=i[this.activeVertexIndex],a={x:r.x+o.x,y:r.y+o.y};return i[this.activeVertexIndex]=this.clampPoint(a),i}calculateDragPosition(t){if(!this.startElement)return this.config.element;const n={origin:{x:this.startElement.origin.x+t.x,y:this.startElement.origin.y+t.y}
2115,size:{width:this.startElement.size.width,height:this.startElement.size.height}},{annotationRotation:o=0,constraints:i}=this.config,r=i?.boundingBox;if(o!==0&&r){let a,s,l,c;if(this.startRotationElement)a=this.startRotationElement.size.width,s=this.startRotationElement.size.height,l=this.startRotationElement.origin.x-this.startElement.origin.x,c=this.startRotationElement.origin.y-this.startElement.origin.y;else{const m=Math.abs(o*Math.PI/180),g=Math.abs(Math.cos(m)),p=Math.abs(Math.sin(m)),f=n.size.width,v=n.size.height;a=f*g+v*p,s=f*p+v*g,l=(f-a)/2,c=(v-s)/2}let{x:d,y:u}=n.origin;return d=Math.max(-l,Math.min(d,r.width-a-l)),u=Math.max(-c,Math.min(u,r.height-s-c)),{origin:{x:d,y:u},size:n.size}}return Sp(n,i,this.config.maintainAspectRatio??!1)}calculateAngleFromMouse(t,n){if(!this.centerScreen)return this.initialRotation;const o=t-this.centerScreen.x,i=n-this.centerScreen.y;if(Math.sqrt(o*o+i*i)<10)return this.lastComputedRotation;const r=90*(this.config.pageRotation??0),a=Math.atan2(i,o)*(180/Math.PI)+90-r;return qi(Math.round(a))}applyRotationSnapping(t){const n=this.config.rotationSnapAngles??[0,90,180,270],o=this.config.rotationSnapThreshold??4,i=qi(t);for(const r of n){const a=qi(r),s=Math.abs(i-a);if(Math.min(s,360-s)<=o)return{angle:a,isSnapped:!0,snapTarget:a}}return{angle:i,isSnapped:!1}}}function Mp(e){var t,n,o,i,r,a;const{controller:s,resizeUI:l,vertexUI:c,rotationUI:d,includeVertices:u=!1,includeRotation:m=!1,currentRotation:g=0,handleAttrs:p,vertexAttrs:f,rotationAttrs:v}=e,{dragProps:y,createResizeProps:b,createVertexProps:w,createRotationProps:x}=(function(S){const{onUpdate:A,enabled:M=!0,...P}=S,T=Q(null),D=Q(A),F=Q(null),N=Q(null);H(()=>{D.current=A},[A]),H(()=>{T.current?T.current.updateConfig(P):T.current=new qb(P,K=>{var le;return(le=D.current)==null?void 0:le.call(D,K)})},[P.element,P.rotationCenter,P.rotationElement,P.constraints,P.maintainAspectRatio,P.pageRotation,P.annotationRotation,P.scale,P.vertices]);const W=Y(K=>{var le,ie;const Fe=F.current,He=N.current,it=K??Fe;if(He&&it!==null)try{(le=He.hasPointerCapture)!=null&&le.call(He,it)&&((ie=He.releasePointerCapture)==null||ie.call(He,it))}catch{}F.current=null,N.current=null},[]),_=Y(K=>{var le;F.current!==null&&F.current!==K.pointerId&&((le=T.current)==null||le.end(),W(F.current));const ie=K.currentTarget;F.current=K.pointerId,N.current=ie;try{ie.setPointerCapture(K.pointerId)}catch{}},[W]);H(()=>{const K=globalThis,le=Fe=>{var He;const it=F.current;it!==null&&Fe.pointerId===it&&((He=T.current)==null||He.end(),W(Fe.pointerId))},ie=()=>{var Fe;F.current!==null&&((Fe=T.current)==null||Fe.end(),W())};return K.addEventListener("pointerup",le,!0),K.addEventListener("pointercancel",le,!0),K.addEventListener("blur",ie,!0),()=>{K.removeEventListener("pointerup",le,!0),K.removeEventListener("pointercancel",le,!0),K.removeEventListener("blur",ie,!0)}},[W]),H(()=>()=>{var K;F.current!==null&&((K=T.current)==null||K.end(),W())},[W]);const G=Y(K=>{var le;M&&(K.preventDefault(),K.stopPropagation(),(le=T.current)==null||le.startDrag(K.clientX,K.clientY),_(K))},[M,_]),q=Y(K=>{var le;K.preventDefault(),K.stopPropagation();const ie=F.current;ie!==null&&K.pointerId!==ie||((le=T.current)==null||le.move(K.clientX,K.clientY,K.buttons,K.shiftKey),F.current===K.pointerId&&K.buttons===0&&W(K.pointerId))},[W]),O=Y(K=>{var le;K.preventDefault(),K.stopPropagation();const ie=F.current;ie!==null&&K.pointerId!==ie||((le=T.current)==null||le.end(),W(K.pointerId))},[W]),V=Y(K=>{var le;const ie=F.current;ie!==null&&K.pointerId===ie&&((le=T.current)==null||le.end(),W(K.pointerId))},[W]),te=Y(K=>({onPointerDown:le=>{var ie;M&&(le.preventDefault(),le.stopPropagation(),(ie=T.current)==null||ie.startResize(K,le.clientX,le.clientY),_(le))},onPointerMove:q,onPointerUp:O,onPointerCancel:O,onLostPointerCapture:V}),[M,q,O,V,_]),he=Y(K=>({onPointerDown:le=>{var ie;M&&(le.preventDefault(),le.stopPropagation(),(ie=T.current)==null||ie.startVertexEdit(K,le.clientX,le.clientY),_(le))},onPointerMove:q,onPointerUp:O,onPointerCancel:O,onLostPointerCapture:V}),[M,q,O,V,_]),ne=Y((K=0,le)=>({onPointerDown:ie=>{var Fe;if(!M)return;ie.preventDefault(),ie.stopPropagation();const He=ie.currentTarget.getBoundingClientRect(),it=He.left+He.width/2,Ve=He.top+He.height/2;(Fe=T.current)==null||Fe.startRotation(it,Ve,K,le),_(ie)},onPointerMove:q,onPointerUp:O,onPointerCancel:O,onLostPointerCapture:V}),[M,q,O,V,_]);return{dragProps:M?{onPointerDown:G,onPointerMove:q,onPointerUp:O,onPointerCancel:O,onLostPointerCapture:V}:{},createResizeProps:te,createVertexProps:he,createRotationProps:ne}}
2115)(s),k=ee(()=>(function(S,A={}){const{handleSize:M=8,spacing:P=1,offsetMode:T="outside",includeSides:D=!1,zIndex:F=3,rotationAwareCursor:N=!0}=A,W=(S.pageRotation??0)%4,_=S.annotationRotation??0,G=q=>({[q]:Gb(M,P,T)+"px"});return[["nw",{...G("top"),...G("left")}],["ne",{...G("top"),...G("right")}],["sw",{...G("bottom"),...G("left")}],["se",{...G("bottom"),...G("right")}],...D?[["n",{...G("top"),left:`calc(50% - ${M/2}px)`}],["s",{...G("bottom"),left:`calc(50% - ${M/2}px)`}],["w",{...G("left"),top:`calc(50% - ${M/2}px)`}],["e",{...G("right"),top:`calc(50% - ${M/2}px)`}]]:[]].map(([q,O])=>({handle:q,style:{position:"absolute",width:M+"px",height:M+"px",borderRadius:"50%",zIndex:F,cursor:N?Wb(q,W,_):"default",pointerEvents:"auto",touchAction:"none",...O},attrs:{"data-epdf-handle":q}}))})(s,l).map(S=>{var A;return{key:(A=S.attrs)==null?void 0:A["data-epdf-handle"],style:S.style,...b(S.handle),...S.attrs??{},...p?.(S.handle)??{}}}),[s.element.origin.x,s.element.origin.y,s.element.size.width,s.element.size.height,s.scale,s.pageRotation,s.annotationRotation,s.maintainAspectRatio,l?.handleSize,l?.spacing,l?.offsetMode,l?.includeSides,l?.zIndex,l?.rotationAwareCursor,b,p]),I=ee(()=>u?(function(A,M={},P){const{vertexSize:T=12,zIndex:D=4}=M,F=A.element,N=A.scale??1;return(P??A.vertices??[]).map((W,_)=>({handle:"nw",style:{position:"absolute",left:(W.x-F.origin.x)*N-T/2+"px",top:(W.y-F.origin.y)*N-T/2+"px",width:T+"px",height:T+"px",borderRadius:"50%",cursor:"pointer",zIndex:D,pointerEvents:"auto",touchAction:"none"},attrs:{"data-epdf-vertex":_}}))})(s,c,s.vertices).map((A,M)=>({key:M,style:A.style,...w(M),...A.attrs??{},...f?.(M)??{}})):[],[u,s.element.origin.x,s.element.origin.y,s.element.size.width,s.element.size.height,s.scale,s.vertices,c?.vertexSize,c?.zIndex,w,f]);return{dragProps:y,resize:k,vertices:I,rotation:ee(()=>{if(!m)return null;const S=(function(A,M={},P=0){const{handleSize:T=16,zIndex:D=5,showConnector:F=!0,connectorWidth:N=1}=M,W=A.scale??1,_=A.element,G=A.rotationElement??_,q=A.rotationCenter??{x:_.origin.x+_.size.width/2,y:_.origin.y+_.size.height/2};G.size.width,G.size.height;const O=(q.x-G.origin.x)*W,V=(q.y-G.origin.y)*W,te=P*Math.PI/180,he=M.margin??35,ne=_.size.height*W/2+he;return{handleStyle:{position:"absolute",left:O+ne*Math.sin(te)-T/2+"px",top:V-ne*Math.cos(te)-T/2+"px",width:T+"px",height:T+"px",borderRadius:"50%",cursor:"grab",zIndex:D,pointerEvents:"auto",touchAction:"none"},connectorStyle:F?{position:"absolute",left:O-N/2+"px",top:V-ne+"px",width:N+"px",height:ne+"px",transformOrigin:"center bottom",transform:`rotate(${P}deg)`,zIndex:D-1,pointerEvents:"none"}:{},radius:ne,attrs:{"data-epdf-rotation-handle":!0}}})(s,d,g);return{handle:{style:S.handleStyle,...x(g,S.radius),...S.attrs??{},...v?.()??{}},connector:{style:S.connectorStyle,"data-epdf-rotation-connector":!0}}},[m,s.element.origin.x,s.element.origin.y,s.element.size.width,s.element.size.height,(t=s.rotationCenter)==null?void 0:t.x,(n=s.rotationCenter)==null?void 0:n.y,(o=s.rotationElement)==null?void 0:o.origin.x,(i=s.rotationElement)==null?void 0:i.origin.y,(r=s.rotationElement)==null?void 0:r.size.width,(a=s.rotationElement)==null?void 0:a.size.height,s.scale,g,d?.handleSize,d?.margin,d?.zIndex,d?.showConnector,d?.connectorWidth,x,v])}}const ta=()=>at(el.id),Ap=()=>$t(el.id);function Vb({documentId:e,pageIndex:t,scale:n,rotation:o,background:i="rgba(33,150,243)",selectionMenu:r}){var a,s;const{plugin:l}=Ap(),c=At(e),d=(s=(a=c?.document)==null?void 0:a.pages)==null?void 0:s[t],[u,m]=$([]),[g,p]=$(null),[f,v]=$(null);H(()=>{if(l&&e)return l.registerSelectionOnPage({documentId:e,pageIndex:t,onRectsChange:({rects:x,boundingRect:k})=>{m(x),p(k)}})},[l,e,t]),H(()=>{if(l&&e)return l.onMenuPlacement(e,x=>{v(x)})},[l,e]);const y=ee(()=>n!==void 0?n:c?.scale??1,[n,c?.scale]),b=ee(()=>o!==void 0?o:((d?.rotation??0)+(c?.rotation??0))%4,[o,d?.rotation,c?.rotation]),w=r&&f&&f.pageIndex===t&&f.isVisible;return g?C(fe,{children:[C("div",{style:{position:"absolute",left:g.origin.x*y,top:g.origin.y*y,width:g.size.width*y,height:g.size.height*y,mixBlendMode:"multiply",isolation:"isolate",pointerEvents:"none"},children:u.map((x,k)=>C("div",{style:{position:"absolute",left:(x.origin.x-g.origin.x)*y,top:(x.origin.y-g.origin.y)*y,width:x.size.width*y,height:x.size.height*y,background:i}},k))}),w&&C(xi,{rect:{origin:{x:f.rect.origin.x*y,y:f.rect.origin.y*y}
vendor: 4,430 bytes, line 2115
2115,size:{width:f.rect.size.width*y,height:f.rect.size.height*y}},rotation:b,children:x=>r({...x,context:{type:"selection",pageIndex:t},selected:!0,placement:f})})]}):null}const Kb=({documentId:e,pageIndex:t,scale:n,className:o,background:i,borderColor:r,borderStyle:a="dashed",stroke:s,fill:l})=>{const{plugin:c}=Ap(),d=At(e),[u,m]=$(null),g=r??s??"rgba(0,122,204,0.8)",p=i??l??"rgba(0,122,204,0.15)",f=ee(()=>n!==void 0?n:d?.scale??1,[n,d?.scale]);return H(()=>{if(c&&e)return c.registerMarqueeOnPage({documentId:e,pageIndex:t,scale:f,onRectChange:m})},[c,e,t,f]),u?C("div",{style:{position:"absolute",pointerEvents:"none",left:u.origin.x*f,top:u.origin.y*f,width:u.size.width*f,height:u.size.height*f,border:`1px ${a} ${g}`,background:p,boxSizing:"border-box",zIndex:1e3},className:o}):null};function Zb({documentId:e,pageIndex:t,scale:n,rotation:o,background:i,textStyle:r,marqueeStyle:a,marqueeClassName:s,selectionMenu:l}){return C(fe,{children:[C(Vb,{documentId:e,pageIndex:t,scale:n,rotation:o,background:r?.background??i,selectionMenu:l}),C(Kb,{documentId:e,pageIndex:t,scale:n,background:a?.background,borderColor:a?.borderColor,borderStyle:a?.borderStyle,className:s})]})}const Xb=cn(jb).addUtility(function(){const{provides:e}=ta();return H(()=>{if(e)return e.onCopyToClipboard(({text:t})=>{navigator.clipboard.writeText(t)})},[e]),null}).build(),Pp="tiling",Yb={id:Pp,name:"Tiling Plugin",version:"1.0.0",provides:["tiling"],requires:["render","scroll","viewport"],optional:[],defaultConfig:{tileSize:768,overlapPx:2.5,extraRings:0}},Dp="TILING/INIT_STATE",Tp="TILING/CLEANUP_STATE",zp="TILING/UPDATE_VISIBLE_TILES",Rp="TILING/MARK_TILE_STATUS",Gc=(e,t)=>({type:zp,payload:{documentId:e,tiles:t}}),qc=(e,t,n,o)=>({type:Rp,payload:{documentId:e,pageIndex:t,tileId:n,status:o}}),Qb={visibleTiles:{}};function Vc({tileSize:e=768,overlapPx:t=2.5,extraRings:n=0,scale:o,rotation:i,page:r,metric:a}){const s=r.size.width*o,l=r.size.height*o,c=e-t,d=(function(I,S,A,M){return ah(Ls(I,S,(4-A)%4),1/M)})(kr(r.size,i,o),{origin:{x:a.scaled.pageX,y:a.scaled.pageY},size:{width:a.scaled.visibleWidth,height:a.scaled.visibleHeight}},i,1),u=d.origin.x,m=d.origin.y,g=u+d.size.width,p=m+d.size.height,f=Math.floor((s-1)/c),v=Math.floor((l-1)/c),y=Math.max(0,Math.floor(u/c)-n),b=Math.min(f,Math.floor((g-1)/c)+n),w=Math.max(0,Math.floor(m/c)-n),x=Math.min(v,Math.floor((p-1)/c)+n),k=[];for(let I=y;I<=b;I++){const S=I*c,A=Math.min(e,s-S),M=S/o,P=A/o;for(let T=w;T<=x;T++){const D=T*c,F=Math.min(e,l-D),N=D/o,W=F/o;k.push({id:`p${r.index}-${o}-x${S}-y${D}-w${A}-h${F}`,col:I,row:T,pageRect:{origin:{x:M,y:N},size:{width:P,height:W}},screenRect:{origin:{x:S,y:D},size:{width:A,height:F}},status:"queued",srcScale:o,isFallback:!1})}}return k}const Ep=class extends Ye{constructor(e,t,n){super(e,t),this.tileRendering$=Ae(),this.config=n,this.renderCapability=this.registry.getPlugin("render").provides(),this.scrollCapability=this.registry.getPlugin("scroll").provides(),this.viewportCapability=this.registry.getPlugin("viewport").provides(),this.scrollCapability.onScroll(o=>this.calculateVisibleTiles(o.documentId,o.metrics),{mode:"throttle",wait:50,throttleMode:"trailing"}),this.coreStore.onAction(Zo,o=>this.recalculateTiles(o.payload))}onDocumentLoadingStarted(e){this.dispatch(((t,n)=>({type:Dp,payload:{documentId:t,state:n}}))(e,Qb))}onDocumentClosed(e){this.dispatch((t=>({type:Tp,payload:t}))(e))}onScaleChanged(e){this.recalculateTilesForDocument(e)}onRotationChanged(e){this.recalculateTilesForDocument(e)}recalculateTilesForDocument(e){const t=this.scrollCapability.forDocument(e),n=this.viewportCapability.forDocument(e),o=t.getMetrics(n.getMetrics());this.calculateVisibleTiles(e,o)}async recalculateTiles(e){const{documentId:t,pageIndexes:n}=e,o=this.getCoreDocument(t);if(!o||!o.document)return;const i=this.scrollCapability.forDocument(t),r=this.viewportCapability.forDocument(t),a=i.getMetrics(r.getMetrics()),s={},l=Date.now(),c=o.scale;for(const d of n){const u=a.pageVisibilityMetrics.find(p=>p.pageNumber===d+1);if(!u)continue;const m=o.document.pages[d];if(!m)continue;const g=((m.rotation??0)+o.rotation)%4;s[d]=Vc({page:m,metric:u,scale:c,rotation:g,tileSize:this.config.tileSize,overlapPx:this.config.overlapPx,extraRings:this.config.extraRings}).map(p=>({...p,id:`${p.id}-r${l}`}))}Object.keys(s).length>0&&this.dispatch(Gc(t,s))}async initialize(){}calculateVisibleTiles(e,t){const n=this.getCoreDocument(e);
2115if(!n||!n.document)return;const o=n.scale,i={};for(const r of t.pageVisibilityMetrics){const a=r.pageNumber-1,s=n.document.pages[a];if(!s)continue;const l=Vc({page:s,metric:r,scale:o,rotation:((s.rotation??0)+n.rotation)%4,tileSize:this.config.tileSize,overlapPx:this.config.overlapPx,extraRings:this.config.extraRings});i[a]=l}this.dispatch(Gc(e,i))}onStoreUpdated(e,t){for(const n in t.documents){const o=e.documents[n],i=t.documents[n];o!==i&&this.tileRendering$.emit({documentId:n,tiles:i.visibleTiles})}}buildCapability(){return{renderTile:this.renderTile.bind(this),forDocument:this.createTilingScope.bind(this),onTileRendering:this.tileRendering$.on}}createTilingScope(e){return{renderTile:t=>this.renderTile(t,e),onTileRendering:t=>this.tileRendering$.on(n=>{n.documentId===e&&t(n.tiles)})}}renderTile(e,t){const n=t??this.getActiveDocumentId();if(!this.renderCapability)throw new Error("Render capability not available.");this.dispatch(qc(n,e.pageIndex,e.tile.id,"rendering"));const o=this.renderCapability.forDocument(n).renderPageRect({pageIndex:e.pageIndex,rect:e.tile.pageRect,options:{scaleFactor:e.tile.srcScale,dpr:e.dpr,...e.imageType||this.config.defaultImageType?{imageType:e.imageType??this.config.defaultImageType}:{}}});return o.wait(()=>{this.dispatch(qc(n,e.pageIndex,e.tile.id,"ready"))},vt),o}};Ep.id="tiling";let _p=Ep;const Jb={manifest:Yb,create:(e,t)=>new _p(Pp,e,t),reducer:(e,t)=>((n,o)=>{var i,r;switch(o.type){case Dp:{const{documentId:a,state:s}=o.payload;return{...n,documents:{...n.documents,[a]:s}}}case Tp:{const a=o.payload,{[a]:s,...l}=n.documents;return{...n,documents:l}}case zp:{const{documentId:a,tiles:s}=o.payload,l=n.documents[a];if(!l)return n;const c={...l.visibleTiles};for(const d in s){const u=Number(d),m=s[u],g=c[u]??[],p=(i=g.find(v=>!v.isFallback))==null?void 0:i.srcScale,f=m.length>0?m[0].srcScale:p;if(p!==void 0&&p!==f){const v=g.filter(b=>!b.isFallback&&b.status==="ready").map(b=>({...b,isFallback:!0})),y=v.length>0?[]:g.filter(b=>b.isFallback);c[u]=[...y,...v,...m]}else{const v=new Set(m.map(w=>w.id)),y=[],b=new Set;for(const w of g)(w.isFallback||v.has(w.id))&&(y.push(w),b.add(w.id));for(const w of m)b.has(w.id)||y.push(w);c[u]=y}}return{...n,documents:{...n.documents,[a]:{...l,visibleTiles:c}}}}case Rp:{const{documentId:a,pageIndex:s,tileId:l,status:c}=o.payload,d=n.documents[a];if(!d)return n;const u=((r=d.visibleTiles[s])==null?void 0:r.map(f=>f.id===l?{...f,status:c}:f))??[],m=u.filter(f=>!f.isFallback),g=m.length>0&&m.every(f=>f.status==="ready"),p=g?m:u;return{...n,documents:{...n.documents,[a]:{...d,visibleTiles:{...d.visibleTiles,[s]:p}}}}}default:return n}})(e,t),initialState:{documents:{}}},Lp=()=>at(_p.id);function e4({documentId:e,pageIndex:t,tile:n,dpr:o,scale:i}){const{provides:r}=Lp(),a=ee(()=>r?.forDocument(e),[r,e]),[s,l]=$(),c=Q(null),d=i/n.srcScale;return H(()=>{if(n.status==="ready"&&c.current||!a)return;const u=a.renderTile({pageIndex:t,tile:n,dpr:o});return u.wait(m=>{const g=URL.createObjectURL(m);c.current=g,l(g)},vt),()=>{c.current?(URL.revokeObjectURL(c.current),c.current=null):u.abort({code:Z.Cancelled,message:"canceled render task"})}},[a,t,n.id]),s?C("img",{src:s,onLoad:()=>{c.current&&(URL.revokeObjectURL(c.current),c.current=null)},style:{position:"absolute",left:n.screenRect.origin.x*d,top:n.screenRect.origin.y*d,width:n.screenRect.size.width*d,height:n.screenRect.size.height*d,display:"block"}}):null}function t4({documentId:e,pageIndex:t,scale:n,style:o,...i}){const{provides:r}=Lp(),a=At(e),[s,l]=$([]);H(()=>{if(r)return r.onTileRendering(d=>{d.documentId===e&&l(d.tiles[t]??[])})},[r,e,t]);const c=ee(()=>n!==void 0?n:a?.scale??1,[n,a?.scale]);return C("div",{style:{...o},...i,children:s?.map(d=>C(e4,{documentId:e,pageIndex:t,tile:d,dpr:window.devicePixelRatio,scale:c},d.id))})}const Op="thumbnail",n4={id:Op,name:"Thumbnail Plugin",version:"1.0.0",provides:["thumbnail"],requires:["render"],optional:["scroll"],defaultConfig:{width:150,gap:10,buffer:3,labelHeight:16,autoScroll:!0,scrollBehavior:"smooth",imagePadding:0,paddingY:0}},Np="THUMBNAIL/INIT_STATE",$p="THUMBNAIL/CLEANUP_STATE",Fp="THUMBNAIL/SET_WINDOW_STATE",jp="THUMBNAIL/UPDATE_VIEWPORT_METRICS";function Kc(e,t){return{type:Np,payload:{documentId:e,state:t}}}const o4={thumbs:[],window:null,viewportH:0,scrollY:0},Zc={documents:{},activeDocumentId:null},Bp=class extends Ye{constructor(e,t,n){var o;super(e,t),this.cfg=n,this.scrollCapability=null,this.taskCaches=new Map,this.canAutoScroll=ne
2115w Map,this.window$=et((i,r)=>({documentId:i,window:r})),this.scrollTo$=et((i,r)=>({documentId:i,options:r})),this.refreshPages$=et((i,r)=>({documentId:i,pages:r}),{cache:!1}),this.renderCapability=this.registry.getPlugin("render").provides(),this.scrollCapability=((o=this.registry.getPlugin("scroll"))==null?void 0:o.provides())??null,this.coreStore.onAction(Zo,i=>{const r=i.payload.documentId??this.getActiveDocumentId(),a=i.payload.pageIndexes;this.refreshPages$.emit(r,a);const s=this.taskCaches.get(r);if(s)for(const l of a)s.delete(l)}),this.scrollCapability&&this.cfg.autoScroll!==!1&&(this.scrollCapability.onPageChangeState(({documentId:i,state:r})=>{this.canAutoScroll.set(i,!r.isChanging),r.isChanging||this.scrollToThumb(r.targetPage-1,i)}),this.scrollCapability.onPageChange(({documentId:i,pageNumber:r})=>{this.canAutoScroll.get(i)!==!1&&this.scrollToThumb(r-1,i)}))}onDocumentLoadingStarted(e){this.dispatch(Kc(e,{...o4})),this.taskCaches.set(e,new Map),this.canAutoScroll.set(e,!0),this.logger.debug("ThumbnailPlugin","DocumentOpened",`Initialized thumbnail state for document: ${e}`)}onDocumentLoaded(e){this.calculateWindowState(e)}onDocumentClosed(e){this.dispatch((function(n){return{type:$p,payload:n}})(e));const t=this.taskCaches.get(e);t&&(t.forEach(n=>{n.abort({code:"cancelled",message:"Document closed"})}),t.clear(),this.taskCaches.delete(e)),this.canAutoScroll.delete(e),this.window$.clearScope(e),this.scrollTo$.clearScope(e),this.refreshPages$.clearScope(e),this.logger.debug("ThumbnailPlugin","DocumentClosed",`Cleaned up thumbnail state for document: ${e}`)}onRotationChanged(e){this.calculateWindowState(e)}buildCapability(){return{scrollToThumb:e=>this.scrollToThumb(e),renderThumb:(e,t)=>this.renderThumb(e,t),updateWindow:(e,t)=>this.updateWindow(e,t),getWindow:()=>this.getWindow(),forDocument:e=>this.createThumbnailScope(e),onWindow:this.window$.onGlobal,onScrollTo:this.scrollTo$.onGlobal,onRefreshPages:this.refreshPages$.onGlobal}}createThumbnailScope(e){return{scrollToThumb:t=>this.scrollToThumb(t,e),renderThumb:(t,n)=>this.renderThumb(t,n,e),updateWindow:(t,n)=>this.updateWindow(t,n,e),getWindow:()=>this.getWindow(e),onWindow:this.window$.forScope(e),onScrollTo:this.scrollTo$.forScope(e),onRefreshPages:this.refreshPages$.forScope(e)}}getDocumentState(e){const t=e??this.getActiveDocumentId();return this.state.documents[t]??null}calculateWindowState(e){const t=this.coreState.core.documents[e];if(!t?.document)return;const n=this.cfg.width??120,o=this.cfg.labelHeight??16,i=this.cfg.gap??8,r=this.cfg.imagePadding??0,a=this.cfg.paddingY??0,s=Math.max(1,n-2*r);let l=a;const c=t.document.pages.map(m=>{const g=m.rotation%2==1,p=g?m.size.height:m.size.width,f=(g?m.size.width:m.size.height)/p,v=Math.round(s*f),y=r+v+r+o,b={pageIndex:m.index,width:s,height:v,wrapperHeight:y,top:l,labelHeight:o,padding:r};return l+=y+i,b}),d={start:-1,end:-1,items:[],totalHeight:l-i+a},u=this.getDocumentState(e);u&&(this.dispatch(Kc(e,{...u,thumbs:c,window:d})),u.viewportH>0?this.updateWindow(u.scrollY,u.viewportH,e):this.window$.emit(e,d))}updateWindow(e,t,n){const o=n??this.getActiveDocumentId(),i=this.getDocumentState(o);if(!i||!i.window||i.thumbs.length===0)return;const r=this.cfg.buffer??3;this.dispatch((function(g,p,f){return{type:jp,payload:{documentId:g,scrollY:p,viewportH:f}}})(o,e,t));let a=0,s=i.thumbs.length-1,l=0;for(;a<=s;){const g=a+s>>1,p=i.thumbs[g];p.top+p.wrapperHeight<e?a=g+1:(l=g,s=g-1)}let c=l;const d=e+t;for(;c+1<i.thumbs.length&&i.thumbs[c].top<d;)c++;c=Math.min(i.thumbs.length-1,c+r);const u=Math.max(0,l-r);if(u===i.window.start&&c===i.window.end)return;const m={start:u,end:c,items:i.thumbs.slice(u,c+1),totalHeight:i.window.totalHeight};this.dispatch((function(g,p){return{type:Fp,payload:{documentId:g,window:p}}})(o,m)),this.window$.emit(o,m)}getWindow(e){const t=this.getDocumentState(e);return t?.window??null}scrollToThumb(e,t){const n=t??this.getActiveDocumentId(),o=this.getDocumentState(n);if(!o||!o.window)return;const i=o.thumbs[e];if(!i)return;const r=this.cfg.scrollBehavior??"smooth",a=this.cfg.paddingY??0;if(o.viewportH<=0){const u=Math.max(a,i.top-i.wrapperHeight);return void this.scrollTo$.emit(n,{top:u,behavior:r})}const s=i.top,l=i.top+i.wrapperHeight,c=s<o.scrollY+8+a,d=l>o.scrollY+o.viewportH-8;c?this.scrollTo$.emit(n,{top:Math.max(0,s-a),behavior:r}):d&&this.scrollTo$.emit(n,{top:Math.max(0,l-o.viewportH+a),behavior:r})}renderThumb(e,t,n){const o=n??this.getActiveDocumentId(),i=this.taskCaches.get(o);if(!i)throw new Error(`Task cache not found for document: ${o}`);if(i.has(e))return i.get(e);const r=this.coreState.core.documents[o];if(!r?.document)throw new Error(`Document not found: ${o}`);const a=r.document.pages[e];if(!a)throw new Error(`Page ${e} not found in document: ${o}`);const s=this.cfg.width??120,l=this.cfg.imagePadding??0,c=Math.max(1,s-2*l)/a.size.width,d=this.renderCapability.forDocument(o).renderPageRect({pageIndex:e,rect:{origin:{x:0,y:0},size:a.size},options:{scaleFactor:c,dpr:t,rotation:a.rotation}});return i.set(e,d),d.wait(vt,()=>i.delete(e)),d}async initialize(){this.logger.info("ThumbnailPlugin","Initialize","Thumbnail plugin initialized")}async destroy(){this.window$.clear(),this.refreshPages$.clear(),this.scrollTo$.clear(),this.taskCaches.forEac
2115h(e=>{e.forEach(t=>{t.abort({code:"cancelled",message:"Plugin destroyed"})}),e.clear()}),this.taskCaches.clear(),this.canAutoScroll.clear(),super.destroy()}};Bp.id="thumbnail";let tl=Bp;const i4={manifest:n4,create:(e,t)=>new tl(Op,e,t),reducer:(e=Zc,t)=>{switch(t.type){case Np:{const{documentId:n,state:o}=t.payload;return{...e,documents:{...e.documents,[n]:o},activeDocumentId:e.activeDocumentId??n}}case $p:{const n=t.payload,{[n]:o,...i}=e.documents;return{...e,documents:i,activeDocumentId:e.activeDocumentId===n?null:e.activeDocumentId}}case"THUMBNAIL/SET_ACTIVE_DOCUMENT":return{...e,activeDocumentId:t.payload};case Fp:{const{documentId:n,window:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,window:o}}}:e}case jp:{const{documentId:n,scrollY:o,viewportH:i}=t.payload,r=e.documents[n];return r?{...e,documents:{...e.documents,[n]:{...r,scrollY:o,viewportH:i}}}:e}default:return e}},initialState:Zc},Hp=()=>$t(tl.id);function r4({documentId:e,style:t,children:n,...o}){const{plugin:i}=Hp(),r=Q(null),[a,s]=$({window:null,docId:null}),l=a.docId===e?a.window:null;H(()=>{if(!i)return;const d=i.provides().forDocument(e),u=d.getWindow();u&&s({window:u,docId:e});const m=d.onWindow(g=>{s({window:g,docId:e})});return()=>{m(),s({window:null,docId:null})}},[i,e]),H(()=>{const d=r.current;if(!d||!i)return;const u=i.provides().forDocument(e),m=()=>u.updateWindow(d.scrollTop,d.clientHeight);return d.addEventListener("scroll",m),()=>d.removeEventListener("scroll",m)},[i,e]),H(()=>{const d=r.current;if(!d||!i)return;const u=i.provides().forDocument(e),m=new ResizeObserver(()=>{u.updateWindow(d.scrollTop,d.clientHeight)});return m.observe(d),()=>m.disconnect()},[i,e]),H(()=>{const d=r.current;!d||!i||i.provides().forDocument(e).updateWindow(d.scrollTop,d.clientHeight)},[l,i,e]),H(()=>{const d=r.current;if(!(!d||!i||!l))return i.provides().forDocument(e).onScrollTo(({top:u,behavior:m})=>{d.scrollTo({top:u,behavior:m})})},[i,e,!!l]);const c=i?.cfg.paddingY??0;return C("div",{ref:r,style:{overflowY:"auto",position:"relative",paddingTop:c,paddingBottom:c,height:"100%",...t},...o,children:C("div",{style:{height:l?.totalHeight??0,position:"relative"},children:l?.items.map(d=>n(d))})})}function a4({documentId:e,meta:t,style:n,...o}){const{provides:i}=at(tl.id),{plugin:r}=Hp(),[a,s]=$(),l=Q(null),[c,d]=$(0);return H(()=>{if(r)return r.provides().forDocument(e).onRefreshPages(u=>{u.includes(t.pageIndex)&&d(m=>m+1)})},[r,e,t.pageIndex]),H(()=>{const u=i?.forDocument(e),m=u?.renderThumb(t.pageIndex,window.devicePixelRatio);return m?.wait(g=>{const p=URL.createObjectURL(g);l.current=p,s(p)},vt),()=>{l.current?(URL.revokeObjectURL(l.current),l.current=null):m?.abort({code:Z.Cancelled,message:"canceled render task"})}},[i,e,t.pageIndex,c]),a?C("img",{src:a,onLoad:()=>{l.current&&(URL.revokeObjectURL(l.current),l.current=null)},style:n,...o}):null}const J="annotation",s4={id:J,name:"Annotation Plugin",version:"1.0.0",provides:["annotation"],requires:["interaction-manager","selection"],optional:["history","scroll"],defaultConfig:{autoCommit:!0,annotationAuthor:"Guest",deactivateToolAfterCreate:!1,selectAfterCreate:!0,autoOpenLinks:!0}},Up="ANNOTATION/INIT_STATE",Wp="ANNOTATION/CLEANUP_STATE",Gp="ANNOTATION/SET_ANNOTATIONS",qp="ANNOTATION/SELECT_ANNOTATION",Vp="ANNOTATION/DESELECT_ANNOTATION",Kp="ANNOTATION/ADD_TO_SELECTION",Zp="ANNOTATION/REMOVE_FROM_SELECTION",Xp="ANNOTATION/SET_SELECTION",Yp="ANNOTATION/SET_ACTIVE_TOOL_ID",Qp="ANNOTATION/CREATE_ANNOTATION",Jp="ANNOTATION/PATCH_ANNOTATION",eg="ANNOTATION/MOVE_ANNOTATION",tg="ANNOTATION/DELETE_ANNOTATION",ng="ANNOTATION/COMMIT",og="ANNOTATION/PURGE_ANNOTATION",ig="ANNOTATION/SET_LOCKED",rg="ANNOTATION/SYNC_OBJECT",ag="ANNOTATION/ADD_COLOR_PRESET",sg="ANNOTATION/SET_TOOL_DEFAULTS",lg="ANNOTATION/ADD_TOOL",ka=e=>({type:Vp,payload:{documentId:e}}),Ia=(e,t,n)=>({type:Kp,payload:{documentId:e,pageIndex:t,id:n}}),Xc=(e,t)=>({type:Zp,payload:{documentId:e,id:t}}),Sa=(e,t)=>({type:Xp,payload:{documentId:e,ids:t}}),Yc=(e,t,n)=>({type:Yp,payload:{documentId:e,toolId:t,context:n}}
2115),nr=(e,t,n)=>({type:Qp,payload:{documentId:e,pageIndex:t,annotation:n}}),or=(e,t,n,o)=>({type:Jp,payload:{documentId:e,pageIndex:t,id:n,patch:o}}),Qc=(e,t,n,o)=>({type:eg,payload:{documentId:e,pageIndex:t,id:n,patch:o}}),Ma=(e,t,n)=>({type:tg,payload:{documentId:e,pageIndex:t,id:n}}),Aa=(e,t,n)=>({type:og,payload:{documentId:e,pageIndex:t,uid:n}});var ct=(e=>(e.None="none",e.All="all",e.Include="include",e.Exclude="exclude",e))(ct||{});function l4(e){return(function(t){return t.object.type===z.HIGHLIGHT})(e)||(function(t){return t.object.type===z.UNDERLINE})(e)||(function(t){return t.object.type===z.STRIKEOUT})(e)||(function(t){return t.object.type===z.SQUIGGLY})(e)}function cg(e){return e.object.type===z.TEXT}function Tr(e){return cg(e)&&!e.object.inReplyToId||l4(e)||(function(t){return t.object.type===z.INK})(e)||(function(t){return t.object.type===z.SQUARE})(e)||(function(t){return t.object.type===z.CIRCLE})(e)||(function(t){return t.object.type===z.POLYGON})(e)||(function(t){return t.object.type===z.LINE})(e)||(function(t){return t.object.type===z.POLYLINE})(e)||(function(t){return t.object.type===z.FREETEXT})(e)||(function(t){return t.object.type===z.STAMP})(e)||(function(t){return t.object.type===z.REDACT})(e)||(function(t){return t.object.type===z.CARET})(e)}function c4(e){return Tr(e)||(function(t){return t.object.type===z.WIDGET})(e)}function ts(e){return e?.categories??[]}function fr(e,t){switch(t.type){case ct.None:return!1;case ct.All:return!0;case ct.Include:return e.length!==0&&e.some(n=>t.categories.includes(n));case ct.Exclude:return e.length===0||!e.some(n=>t.categories.includes(n))}}function dg(e){var t;return((t=e.flags)==null?void 0:t.includes("locked"))??!1}const ns=(e,t)=>(e.pages[t]??[]).map(n=>e.byUid[n]),Ci=e=>e.selectedUids.map(t=>e.byUid[t]).filter(t=>t!==void 0),os=e=>e.selectedUids;function bt(e,t){const n=e.tools.find(o=>o.id===t);return n?.defaults}const d4=(e,t)=>((n,o,i)=>{const r=[];for(const a of Object.values(n.pages))for(const s of a){const l=n.byUid[s];l&&"inReplyToId"in l.object&&l.object.inReplyToId===o&&i.includes(l.object.type)&&r.push(l)}return r})(e,t,[z.LINK]),ug=(e,t)=>{const n=e.byUid[t];if(n)return n.object.inReplyToId&&n.object.replyType===ln.Group?n.object.inReplyToId:t},Jc=(e,t)=>{const n=ug(e,t);if(!n)return[];const o=[],i=e.byUid[n];i&&i.object.type!==z.LINK&&o.push(i);for(const r of Object.values(e.pages))for(const a of r){const s=e.byUid[a];s&&s.object.inReplyToId===n&&s.object.replyType===ln.Group&&s.object.type!==z.LINK&&o.push(s)}return o},ed=(e,t)=>{const n=e.byUid[t];if(!n||n.object.type===z.LINK)return!1;if(n.object.inReplyToId&&n.object.replyType===ln.Group)return!0;for(const o of Object.values(e.pages))for(const i of o){const r=e.byUid[i];if(r&&r.object.inReplyToId===t&&r.object.replyType===ln.Group&&r.object.type!==z.LINK)return!0}return!1};function Ct(e){let t=e;return[()=>t,n=>{t=n}]}const is={annotationType:z.INK,create(e){const{onCommit:t,onPreview:n,getTool:o,pageSize:i}=e,[r,a]=Ct([]),[s,l]=Ct(!1),c={current:null},d=g=>({x:ve(g.x,0,i.width),y:ve(g.y,0,i.height)}),u=()=>{const g=o();return g?{...g.defaults,strokeWidth:g.defaults.strokeWidth??1,strokeColor:g.defaults.strokeColor??g.defaults.color??"#000000",opacity:g.defaults.opacity??1,flags:g.defaults.flags??["print"]}:null},m=()=>{const g=r();if(g.length===0||g[0].points.length===0)return null;const p=u();if(!p)return null;const f=g.flatMap(y=>y.points),v=vn(rn(f),p.strokeWidth/2);return{type:z.INK,bounds:v,data:{...p,rect:v,inkList:g,blendMode:p.blendMode}}};return{onPointerDown:(g,p)=>{var f;const v=d(g);l(!0),c.current&&clearTimeout(c.current);const y=[...r(),{points:[v]}];a(y),n(m()),(f=p.setPointerCapture)==null||f.call(p)},onPointerMove:g=>{if(!s())return;const p=r();if(p.length===0)return;const f=d(g);p[p.length-1].points.push(f),a(p),n(m())},onPointerUp:(g,p)=>{var f;l(!1),(f=p.releasePointerCapture)==null||f.call(p);const v=o(),y=v?.behavior;if(y?.smartLineRecognition){const w=y.smartLineThreshold??.15,x=r(),k=x[x.length-1];if(k&&k.points.length>1&&(function(I,S){if(I.length<3)return!0;const A=I[0],M=I[I.length-1],P=Math.hypot(M.x-A.x,M.y-A.y);return P<5?!1:I.reduce((D,F)=>
2115{const N=Math.abs((M.x-A.x)*(A.y-F.y)-(A.x-F.x)*(M.y-A.y))/P;return Math.max(D,N)},0)/P<S})(k.points,w)){const I=k.points[0],S=k.points[k.points.length-1],A=S.x-I.x,M=S.y-I.y,P=Math.atan2(Math.abs(M),Math.abs(A))*(180/Math.PI),T=y.snapAngleDeg??15;if(P<=T){const D=k.points.reduce((F,N)=>F+N.y,0)/k.points.length;k.points=[{x:I.x,y:D},{x:S.x,y:D}]}else if(P>=90-T){const D=k.points.reduce((F,N)=>F+N.x,0)/k.points.length;k.points=[{x:D,y:I.y},{x:D,y:S.y}]}a([...x]),n(m())}}const b=y?.commitDelay??800;c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{const w=r();if(w.length>0&&w[0].points.length>1){const x=u();if(!x)return;const k=w.flatMap(S=>S.points),I=vn(rn(k),x.strokeWidth/2);t({...x,inkList:w,rect:I,type:z.INK,pageIndex:e.pageIndex,id:Ce(),created:new Date})}a([]),n(null)},b)},onPointerCancel:(g,p)=>{var f;a([]),l(!1),n(null),c.current&&clearTimeout(c.current),(f=p.releasePointerCapture)==null||f.call(p)}}}};function hg(e){const t=n=>{const o=9*n,i=Math.PI/6;return{x:-o*Math.cos(i),y:o*Math.sin(i)}};return{getSvgPath:n=>{const{x:o,y:i}=t(n);return e?`M 0 0 L ${o} ${i} L ${o} ${-i} Z`:`M ${o} ${i} L 0 0 L ${o} ${-i}`},getLocalPoints:n=>{const{x:o,y:i}=t(n);return[{x:0,y:0},{x:o,y:i},{x:o,y:-i}]},getRotation:n=>n,filled:e}}function td(e,t){const n=o=>o*e/2;return{getSvgPath:o=>{const i=n(o);return`M ${-i} 0 L ${i} 0`},getLocalPoints:o=>{const i=n(o);return[{x:-i,y:0},{x:i,y:0}]},getRotation:t,filled:!1}}const nd=hg(!1),od=hg(!0),rs={[Ie.OpenArrow]:nd,[Ie.ClosedArrow]:od,[Ie.ROpenArrow]:{...nd,getRotation:e=>e+Math.PI},[Ie.RClosedArrow]:{...od,getRotation:e=>e+Math.PI},[Ie.Circle]:{getSvgPath:e=>{const t=5*e/2;return`M ${t} 0 A ${t} ${t} 0 1 1 ${-t} 0 A ${t} ${t} 0 1 1 ${t} 0`},getLocalPoints:e=>{const t=5*e/2;return[{x:-t,y:-t},{x:t,y:t}]},getRotation:()=>0,filled:!0},[Ie.Square]:{getSvgPath:e=>{const t=6*e/2;return`M ${-t} ${-t} L ${t} ${-t} L ${t} ${t} L ${-t} ${t} Z`},getLocalPoints:e=>{const t=6*e/2;return[{x:-t,y:-t},{x:t,y:-t},{x:t,y:t},{x:-t,y:t}]},getRotation:e=>e,filled:!0},[Ie.Diamond]:{getSvgPath:e=>{const t=6*e/2;return`M 0 ${-t} L ${t} 0 L 0 ${t} L ${-t} 0 Z`},getLocalPoints:e=>{const t=6*e/2;return[{x:0,y:-t},{x:t,y:0},{x:0,y:t},{x:-t,y:0}]},getRotation:e=>e,filled:!0},[Ie.Butt]:td(6,e=>e+Math.PI/2),[Ie.Slash]:td(18,e=>e+Math.PI/1.5)};function Qt(e,t,n){if(!e||e.length===0)return{origin:{x:0,y:0},size:{width:0,height:0}};const o=[...e],i=(a,s)=>Math.atan2(s.y-a.y,s.x-a.x),r=(a,s,l)=>{if(!a)return;const c=rs[a];if(!c)return;const d=c.getLocalPoints(t),u=c.getRotation(l),m=d.map(g=>(function(p,f,v){const y=Math.cos(f),b=Math.sin(f),w=p.x*y-p.y*b,x=p.x*b+p.y*y;return{x:w+v.x,y:x+v.y}})(g,u,s));o.push(...m)};if(e.length>=2){const a=i(e[1],e[0]);r(n?.start,e[0],a);const s=e.length-1,l=i(e[s-1],e[s]);r(n?.end,e[s],l)}if(o.length<=1){const a=e[0]||{x:0,y:0},s=t;return{origin:{x:a.x-s,y:a.y-s}
2115,size:{width:2*s,height:2*s}}}return vn(rn(o),t/2+1.2*t)}function na(e,t){if(!e.unrotatedRect)return{rect:t};const n=wo(t);return{rect:Xn(t,e.rotation??0,n),unrotatedRect:t}}function Qn(e){return e.unrotatedRect?lh(e.unrotatedRect,e.rect,e.rotation??0):wo(e.rect)}function nl(e,t,n){const o=Qn(e),i=e.unrotatedRect??e.rect,r=t.origin.x-i.origin.x,a=t.origin.y-i.origin.y;return{rect:Xn(t,n,{x:o.x+r,y:o.y+a}),unrotatedRect:t}}function oa(e,t,n){if(!e.unrotatedRect)return t;const o=e.rotation??0;if(Math.abs(o%360)<1e-8)return t;const i=Qn(e),r=wo(n),a=o*Math.PI/180,s=Math.cos(a),l=Math.sin(a),c=i.x-r.x,d=i.y-r.y,u=(1-s)*c+l*d,m=-l*c+(1-s)*d;return Math.abs(u)<1e-8&&Math.abs(m)<1e-8?t:t.map(g=>({x:g.x+u,y:g.y+m}))}class mg{constructor(){this.patches=new Map}register(t,n){this.patches.set(t,n)}transform(t,n){const o=this.patches.get(t.type);return o?o(t,n):n.changes}}const u4=new mg;function Jn(e,t){var n;if(((n=t.metadata)==null?void 0:n.rotationAngle)===void 0)return null;const o=t.metadata.rotationAngle,i=t.changes.unrotatedRect??e.unrotatedRect??e.rect;return{...nl(e,{origin:{...i.origin},size:{...i.size}},o),rotation:o}}function _i(e,t){return{rotation:t,...nl(e,e.unrotatedRect??e.rect,t)}}function eo(e,t){const n=t.origin.x-e.rect.origin.x,o=t.origin.y-e.rect.origin.y,i={rect:t};return e.unrotatedRect&&(i.unrotatedRect={origin:{x:e.unrotatedRect.origin.x+n,y:e.unrotatedRect.origin.y+o},size:{...e.unrotatedRect.size}}),{dx:n,dy:o,rects:i}}function to(e,t,n){const o=e.unrotatedRect??e.rect;let i=t.size.width/o.size.width,r=t.size.height/o.size.height;if((t.size.width<10||t.size.height<10)&&(i=Math.max(i,10/o.size.width),r=Math.max(r,10/o.size.height),t={origin:t.origin,size:{width:o.size.width*i,height:o.size.height*r}}),n?.maintainAspectRatio){const a=Math.min(i,r);i=a,r=a,t={origin:t.origin,size:{width:o.size.width*a,height:o.size.height*a}}}return{scaleX:i,scaleY:r,oldRect:o,resolvedRect:t,rects:e.unrotatedRect?{unrotatedRect:t,rect:Ns(t,e.rotation??0)}:{rect:t}}}function ia(e,t){const n=e.unrotatedRect??e.rect,o=t.unrotatedRect??n;return{dx:o.origin.x-n.origin.x,dy:o.origin.y-n.origin.y}}function ki(e,t,n){if(t===0||e.rotation!==void 0)return e;const o=(4-t)%4*90;let i=e;if(n&&(t===1||t===3)){const l=e.rect,c=l.origin.x+l.size.width/2,d=l.origin.y+l.size.height/2;i={...e,rect:{origin:{x:c-l.size.height/2,y:d-l.size.width/2},size:{width:l.size.height,height:l.size.width}}}}const{rotation:r,rect:a,unrotatedRect:s}=_i(i,o);return{...i,rotation:r,rect:a,unrotatedRect:s}}function Li(e,t){const n=ve(e.rect.origin.x,0,t.width-e.rect.size.width),o=ve(e.rect.origin.y,0,t.height-e.rect.size.height),i=n-e.rect.origin.x,r=o-e.rect.origin.y;return i===0&&r===0?e:{...e,rect:{origin:{x:n,y:o},size:e.rect.size},...e.unrotatedRect?{unrotatedRect:{origin:{x:e.unrotatedRect.origin.x+i,y:e.unrotatedRect.origin.y+r},size:e.unrotatedRect.size}}:{}}}const zr=Object.freeze(Object.defineProperty({__proto__:null,LINE_ENDING_HANDLERS:rs,PatchRegistry:mg,applyInsertUpright:ki,calculateAABBFromVertices:function(e,t=0){if(e.length===0)return{origin:{x:0,y:0},size:{width:0,height:0}};const n=rn(e);return t>0?vn(n,t):n},calculateRotatedRectAABB:Ns,calculateRotatedRectAABBAroundPoint:Xn,clampAnnotationToPage:Li,compensateRotatedVertexEdit:oa,createEnding:function(e,t,n,o,i){if(!e)return null;const r=rs[e];if(!r)return null;const a=r.getRotation(n);return{d:r.getSvgPath(t),transform:`translate(${o} ${i}) rotate(${s=a,180*s/Math.PI})`,filled:r.filled};var s},getRectCenter:wo,lineRectWithEndings:Qt,patchRegistry:u4,resolveAnnotationRotationCenter:Qn,resolveRotateRects:nl,resolveVertexEditRects:na,rotatePointAroundCenter:xo,rotateVertices:sh},Symbol.toStringTag,{value:"Module"})),pg={annotationType:z.TEXT,create(e){const{onCommit:t,getTool:n,pageSize:o}=e;return{onPointerDown:i=>{const r=n();if(!r)return;const a={origin:{x:i.x-12,y:i.y-12},size:{width:24,height:24}};let s={...r.defaults,rect:a,type:z.TEXT,name:r.defaults.name??Ne.Comment,contents:r.defaults.contents??"",flags:r.defaults.flags??["print","noRotate","noZoom"],pageIndex:e.pageIndex,id:Ce(),created:new Date};s=Li(s,o),t(s)}}}};function xn({threshold:e=5,getTool:t,onClickDetected:n}){const[o,i]=Ct(null),[r,a]=Ct(!1);return{onStart:s=>{i(s),a(!1)},onMove:s=>{const l=o();!l||r()||Math.sqrt(Math.pow(s.x-l.x,2)+Math.pow(s.y-l.y,2))>e&&a(!0)},onEnd:s=>{var l;
vendor: 14,794 bytes, line 2115
2115if(o()&&!r()){const c=t();c&&"clickBehavior"in c&&((l=c.clickBehavior)!=null&&l.enabled)&&n(s,c)}i(null),a(!1)},hasMoved:r,reset:()=>{i(null),a(!1)}}}const gg={annotationType:z.FREETEXT,create(e){const{onCommit:t,onPreview:n,getTool:o,pageSize:i,pageIndex:r,pageRotation:a}=e,[s,l]=Ct(null),c=g=>({x:ve(g.x,0,i.width),y:ve(g.y,0,i.height)}),d=()=>{const g=o();return g?{...g.defaults,fontColor:g.defaults.fontColor??"#000000",opacity:g.defaults.opacity??1,fontSize:g.defaults.fontSize??12,fontFamily:g.defaults.fontFamily??Ge.Helvetica,color:g.defaults.color??g.defaults.backgroundColor??"transparent",textAlign:g.defaults.textAlign??ut.Left,verticalAlign:g.defaults.verticalAlign??Bt.Top,contents:g.defaults.contents??"Insert text here",flags:g.defaults.flags??["print"]}:null},u=xn({threshold:5,getTool:o,onClickDetected:(g,p)=>{var f;const v=d();if(!v)return;const y=p.clickBehavior;if(!y?.enabled)return;const{width:b,height:w}=y.defaultSize,x={origin:{x:g.x-b/2,y:g.y-w/2},size:{width:b,height:w}},k=y.defaultContent??v.contents;let I={...v,contents:k,type:z.FREETEXT,rect:x,pageIndex:r,id:Ce(),created:new Date};(f=p.behavior)!=null&&f.insertUpright&&(I=ki(I,a,!1)),I=Li(I,i),t(I)}}),m=g=>{const p=s();if(!p)return null;const f=d();if(!f)return null;const v={origin:{x:Math.min(p.x,g.x),y:Math.min(p.y,g.y)},size:{width:Math.abs(p.x-g.x),height:Math.abs(p.y-g.y)}};return{type:z.FREETEXT,bounds:v,data:{...f,rect:v}}};return{onPointerDown:(g,p)=>{var f;const v=c(g);l(v),u.onStart(v),n(m(v)),(f=p.setPointerCapture)==null||f.call(p)},onPointerMove:g=>{const p=c(g);u.onMove(p),s()&&u.hasMoved()&&n(m(p))},onPointerUp:(g,p)=>{var f,v;const y=s();if(!y)return;const b=d();if(!b)return;const w=c(g);if(u.hasMoved()){const x={origin:{x:Math.min(y.x,w.x),y:Math.min(y.y,w.y)},size:{width:Math.abs(y.x-w.x),height:Math.abs(y.y-w.y)}},k=o();let I={...b,type:z.FREETEXT,rect:x,pageIndex:e.pageIndex,id:Ce(),created:new Date};(f=k?.behavior)!=null&&f.insertUpright&&(I=ki(I,a,!0)),t(I)}else u.onEnd(w);l(null),n(null),u.reset(),(v=p.releasePointerCapture)==null||v.call(p)},onPointerLeave:(g,p)=>{var f;l(null),n(null),u.reset(),(f=p.releasePointerCapture)==null||f.call(p)},onPointerCancel:(g,p)=>{var f;l(null),n(null),u.reset(),(f=p.releasePointerCapture)==null||f.call(p)}}}},as={annotationType:z.LINE,create(e){const{pageIndex:t,onCommit:n,onPreview:o,getTool:i,pageSize:r}=e,[a,s]=Ct(null),l=m=>({x:ve(m.x,0,r.width),y:ve(m.y,0,r.height)}),c=()=>{const m=i();return m?{...m.defaults,strokeWidth:m.defaults.strokeWidth??1,lineEndings:m.defaults.lineEndings??{start:Ie.None,end:Ie.None},color:m.defaults.color??"#000000",opacity:m.defaults.opacity??1,strokeStyle:m.defaults.strokeStyle??Te.SOLID,strokeDashArray:m.defaults.strokeDashArray??[],strokeColor:m.defaults.strokeColor??"#000000",flags:m.defaults.flags??["print"]}:null},d=xn({threshold:5,getTool:i,onClickDetected:(m,g)=>{const p=c();if(!p)return;const f=g.clickBehavior;if(!f?.enabled)return;const v=f.defaultAngle??0,y=f.defaultLength/2,b=m.x-y*Math.cos(v),w=m.y-y*Math.sin(v),x=m.x+y*Math.cos(v),k=m.y+y*Math.sin(v),I=l({x:b,y:w}),S=l({x,y:k}),A=Qt([I,S],p.strokeWidth,p.lineEndings);n({...p,rect:A,linePoints:{start:I,end:S},pageIndex:t,id:Ce(),created:new Date,type:z.LINE})}}),u=m=>{const g=a();if(!g)return null;const p=c();if(!p)return null;const f=Qt([g,m],p.strokeWidth,p.lineEndings);return{type:z.LINE,bounds:f,data:{...p,rect:f,linePoints:{start:g,end:m}}}};return{onPointerDown:(m,g)=>{var p;const f=l(m);s(f),d.onStart(f),o(u(f)),(p=g.setPointerCapture)==null||p.call(g)},onPointerMove:m=>{const g=l(m);d.onMove(g),a()&&d.hasMoved()&&o(u(g))},onPointerUp:(m,g)=>{var p;const f=a();if(!f)return;const v=l(m);if(d.hasMoved()){const y=c();if(!y)return;if(Math.abs(v.x-f.x)>2||Math.abs(v.y-f.y)>2){const b=Qt([f,v],y.strokeWidth,y.lineEndings);n({...y,rect:b,linePoints:{start:f,end:v},pageIndex:t,id:Ce(),flags:["print"],created:new Date,type:z.LINE})}}else d.onEnd(v);s(null),o(null),d.reset(),(p=g.releasePointerCapture)==null||p.call(g)},onPointerLeave:(m,g)=>{var p;s(null),o(null),d.reset(),(p=g.releasePointerCapture)==null||p.call(g)},onPointerCancel:(m,g)=>{var p;s(null),o(null),d.reset(),(p=g.releasePointerCapture)==null||p.call(g)}}}},fg={annotationType:z.POLYLINE,create(e){const{onCommit:t,onPreview:n,getTool:o,pageSize:i}=e,[r,a]=Ct([]),[s,l]=Ct(null),c=m=>({x:ve(m.x,0,i.width),y:ve(m.y,0,i.height)}),d=()=>{const m=o();return m?{...m.defaults,strokeWidth:m.defaults.strokeWidth??1,lineEndings:m.defaults.lineEndings??{start:Ie.None,end:Ie.None},color:m.defaults.color??"#000000",opacity:m.defaults.opacity??1,strokeColor:m.defaults.strokeColor??"#000000",strokeStyle:m.defaults.strokeStyle??Te.SOLID,strokeDashArray:m.defaults.strokeDashArray??[],flags:m.defaults.flags??["print"]}:null},u=()=>{const m=r(),g=s();if(m.length===0||!g)return null;const p=d();if(!p)return null;const f=[...m,g],v=Qt(f,p.strokeWidth,p.lineEndings);return{type:z.POLYLINE,bounds:v,data:{...p,rect:v,vertices:f,currentVertex:g}}};return{onClick:(m,g)=>{if(g.metaKey||g.ctrlKey)return;const p=c(m),f=r(),v=f[f.length-1];v&&Math.abs(v.x-p.x)<1&&Math.abs(v.y-p.y)<1||(a([...f,p]),l(p),n(u()))},onDoubleClick:()=>{(()=>{const m=r();if(m.length<2)return;const g=d();if(!g)return;const p=Qt(m,g.strokeWidth,g.lineEndings),f={...g,vertices:m,rect:p,type:z.POLYLINE,pageIndex:e.pageIndex,id:Ce(),created:new Date};t(f),a([]),l(null),n(null)})()},onPointerMove:m=>{if(r().length>0){const g=c(m);l(g),n(u())}},onPointerCancel:()=>{a([]),l(null),n(null)}}}};function id(e,t,n,o){const i=o*Math.PI/180,r=Math.abs(Math.cos(i)),a=Math.abs(Math.sin(i)),s=r*r-a*a,l=e.size.width,c=e.size.height;let d,u;if(Math.abs(s)>1e-6)d=(r*l-a*c)/s,u=(r*c-a*l)/s,d=Math.max(d,1),u=Math.max(u,1);else{const m=t.size.width*t.size.height,g=l*c,p=m>0?Math.sqrt(g/m):1;d=n.size.width*p,u=n.size.height*p}return{origin:{x:e.origin.x+l/2-d/2,y:e.origin.y+c/2-u/2},size:{width:d,height:u}}}const qo=Math.PI,Ii=Math.PI/2,Dn=34*Math.PI/180,rd=30*Math.PI/180,ss=12*Math.PI/180;class ol{constructor(){this.parts=[],this.bbox={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0},this.started=!1}moveTo(t,n){const o=-n;this.updateBBox(t,o),this.parts.push(`M ${Un(t)} ${Un(o)}`),this.started=!0}curveTo(t,n,o,i,r,a){const s=-n,l=-i,c=-a;this.updateBBox(t,s),this.updateBBox(o,l),this.updateBBox(r,c),this.parts.push(`C ${Un(t)} ${Un(s)}, ${Un(o)} ${Un(l)}, ${Un(r)} ${Un(c)}`)}close(){this.started&&this.parts.push("Z")}build(t){const n=t>0?t/2:0;return{path:this.parts.join(" "),bbox:{minX:this.bbox.minX-n,minY:this.bbox.minY-n,maxX:this.bbox.maxX+n,maxY:this.bbox.maxY+n}}}updateBBox(t,n){t<this.bbox.minX&&(this.bbox.minX=t),n<this.bbox.minY&&(this.bbox.minY=n),t>this.bbox.maxX&&(this.bbox.maxX=t),n>this.bbox.maxY&&(this.bbox.maxY=n)}}function Un(e){return Number(e.toFixed(4)).toString()}function Si(e,t){const n=t.x-e.x,o=t.y-e.y;return Math.sqrt(n*n+o*o)}function vg(e,t){return t===0?0:e/t}function yg(e,t){return t===0?0:e/t}function Bo(e,t,n,o,i,r,a,s){const l=Math.cos(e),c=Math.sin(e),d=Math.cos(t),u=Math.sin(t),m=Math.sin((t-e)/2);if(m===0)return void(s&&a.moveTo(n+i*l,o+r*c));const g=4/3*(1-Math.cos((t-e)/2))/m,p=n+i*(l-g*c),f=o+r*(c+g*l),v=n+i*(d+g*u),y=o+r*(u-g*d),b=n+i*d,w=o+r*u;s&&a.moveTo(n+i*l,o+r*c),a.curveTo(p,f,v,y,b,w)}function Pa(e,t,n,o,i,r){const a=Math.cos(e),s=Math.sin(e),l=Math.cos(t),c=Math.sin(t),d=Math.sin((t-e)/2);if(d===0)return[];const u=4/3*(1-Math.cos((t-e)/2))/d;return[{x:n+i*(a-u*s),y:o+r*(s+u*a)},{x:n+i*(l+u*c),y:o+r*(c-u*l)},{x:n+i*l,y:o+r*c}]}function mi(e,t,n,o,i,r,a,s){const l=Ii;let c=t-e;for(;c<0;)c+=2*Math.PI;const d=c;let u=0;for(s&&a.moveTo(i+n*Math.cos(e),r+o*Math.sin(e));c>l;)Bo(e+u,e+u+l,i,r,n,o,a,!1),u+=l,c-=l;c>0&&Bo(e+u,e+d,i,r,n,o,a,!1)}function bg(e,t,n,o,i,r,a,s,l){let c=e+qo+a;const d=e+qo+a-22*Math.PI/180;Bo(c,d,o,i,n,n,s,l),c=d,mi(c,t-r,n,n,o,i,s,!1)}function h4(e,t,n,o,i,r){const a=e+qo;Bo(a+n,a+n-rd,o,i,t,t,r,!1),Bo(a+n-rd,a+Ii,o,i,t,t,r,!1),Bo(a+Ii,a+qo-Dn,o,i,t,t,r,!1)}function m4(e,t){const n=[],o=e+qo;return n.push(...Pa(o+Dn,o+ss,0,0,t,t)),n.push(...Pa(o+ss,o+Ii,0,0,t,t)),n.push(...Pa(o+Ii,o+qo-Dn,0,0,t,t)),n}function p4(e,t,n,o){for(let i=0;i+2<e.length;i+=3){const r=e[i],a=e[i+1],s=e[i+2];o.curveTo(r.x+t,r.y+n,a.x+t,a.y+n,s.x+t,s.y+n)}}function g4(e,t,n){if(n===0)return{n:-1,adjustedRadius:e};const o=n-2*t*e;if(o<=0)return{n:0,adjustedRadius:e};const i=2*t*e,r=Math.max(1,Math.ceil(o/i));return{n:r,adjustedRadius:o/(2*r*t)}}function il(e,t,n,o,i){let r=(function(g){if(g.length<=2)return g;const p=[g[0]];for(let f=1;f<g.length;f++){const v=p[p.length-1],y=g[f];(Math.abs(y.x-v.x)>=.5||Math.abs(y.y-v.y)>=.5)&&p.push(y)}return p})(e);var a;(function(g){let p=0;const f=g.length;for(let v=0;v<f;v++){const y=(v+1)%f;p+=g[v].x*g[y].y-g[v].y*g[y].x}return p})(a=r)<0&&a.reverse();const s=r.length;if(s<2)return;if(n<=0){i.moveTo(r[0].x,r[0].y);for(let g=1;g<s;g++)i.curveTo(r[g].x,r[g].y,r[g].x,r[g].y,r[g].x,r[g].y);return}let l=t?rl(n,o):wg(n,o);l<.5&&(l=.5);const c=Math.cos(Dn),d=[];for(let g=0;g+1<s;g++){const p=Si(r[g],r[g+1]);p<=0||p>=2*c*l?d.push(Dn):d.push(Math.acos(Math.min(1,p/(2*l))))}let u=0,m=!1;for(let g=0;g+1<s;g++){const p=r[g],f=r[g+1],v=Si(p,f);if(v===0)continue;const y=g4(l,c,v);if(y.n<0){m||(i.moveTo(p.x,p.y),m=!0);continue}const b=Math.max(.5,y.adjustedRadius),w=2*c*b,x=c*l+c*b;let k=Math.atan2(f.y-p.y,f.x-p.x);if(g===0){const D=r[s-2];u=Math.atan2(p.y-D.y,p.x-D.x)}const I=vg(f.x-p.x,v),S=yg(f.y-p.y,v);let A=p.x,M=p.y;const P=d[g],T=d[g===0?s-2:g-1]??Dn;if(bg(u,k,l,p.x,p.y,P,T,i,!m),m=!0,y.n===0)A+=v*I,M+=v*S;else{A+=x*I,M+=x*S;let D=y.n;y.n>=1&&(h4(k,b,Dn,A,M,i),A+=w*I,M+=w*S,D=y.n-1);const F=m4(k,b);for(let N=0;N<D;N++)p4(F,A,M,i),A+=w*I,M+=w*S}u=k}}function rl(e,t){return 4.75*e+.5*t}function wg(e,t){return 4*e+.5*t}function f4(e,t,n,o,i,r,a){if(i<=0){const D=Math.abs(n-e)/2,F=Math.abs(o-t)/2,N=(e+n)/2,W=(t+o)/2;return void mi(0,2*Math.PI,D,F,N,W,a,!0)}const s=n-e,l=o-t;let c=rl(i,r);const d=.5*c;if(s<d&&l<d){const D=Math.abs(n-e)/2,F=Math.abs(o-t)/2,N=(e+n)/2,W=(t+o)/2;return void mi(0,2*Math.PI,D,F,N,W,a,!0)}if(s<5&&l>20||s>20&&l<5)return void il([{x:e,y:t},{x:n,y:t},{x:n,y:o},{x:e,y:o},{x:e,y:t}],!0,i,r,a);const u=Math.sin(ss)*c-1.5;let m=e,g=n,p=t,f=o;if(s>2*u)m+=u,g-=u;else{const D=(e+n)/2;m=D-.1,g=D+.1}if(l>2*u)p+=u,f-=u;else{const D=(o+t)/2;f=D+.1,p=D-.1}const v=(function(D,F,N,W){const _=(D+N)/2,G=(F+W)/2,q=(N-D)/2,O=(W-F)/2;if(q<=0||O<=0)return[];const V=Math.max(32,Math.ceil(2*Math.max(q,O))),te=[];for(let he=0;he<=V;he++){const ne=2*Math.PI*he/V;te.push({x:_+q*Math.cos(ne),y:G+O*Math.sin(ne)})}return te})(m,p,g,f),y=v.length;if(y<2)return;let b=0;for(let D=1;D<y;D++)b+=Si(v[D-1],v[D]);const w=Math.cos(Dn);let x=2*w*c,k=Math.ceil(b/x);if(k<2){const D=Math.abs(n-e)/2,F=Math.abs(o-t)/2,N=(e+n)/2,W=(t+o)/2;return void mi(0,2*Math.PI,D,F,N,W,a,!0)}if(x=b/k,c=x/(2*w),c<.5)c=.5,x=2*w*c;else if(c<3){const D=Math.abs(n-e)/2,F=Math.abs(o-t)/2,N=(e+n)/2,W=(t+o)/2;return void mi(0,2*Math.PI,D,F,N,W,a,!0)}const I=[];let S=0;const A=.1*r;for(let D=0;D+1<y;D++){const F=v[D],N=v[D+1],W=N.x-F.x,_=N.y-F.y,G=Si(F,N);if(G===0)continue;let q=G+S;if(q>=x-A||D===y-2){const O=vg(W,G),V=yg(_,G);let te=x-S;for(;q>=x-A;)I.push({x:F.x+te*O,y:F.y+te*V}),q-=x,te+=x;S=Math.max(0,q)}else S+=G}const M=I.length;let P=0,T=0;for(let D=0;D<M;D++){const F=(D+1)%M,N=I[D],W=I[F];if(D===0){const q=I[M-1];P=Math.atan2(N.y-q.y,N.x-q.x),T=ad(q,N,c,x)}const _=Math.atan2(W.y-N.y,W.x-N.x),G=ad(N,W,c,x);bg(P,_,c,N.x,N.y,G,T,a,D===0),P=_,T=G}}function ad(e,t,n,o){const i=Si(e,t);if(i===0)return Dn;const r=(o/2+(i-o)/2)/n;return r<-1||r>1?0:Math.acos(r)}function Jt(e,t,n){return(n?rl(e,t):wg(e,t))+t/2}const xg={annotationType:z.POLYGON,create(e){const{onCommit:t,onPreview:n,getTool:o,scale:i,pageSize:r}=e,[a,s]=Ct([]),[l,c]=Ct(null),d=p=>({x:ve(p.x,0,r.width),y:ve(p.y,0,r.height)}),u=()=>{const p=o();return p?{...p.defaults,color:p.defaults.color??"#000000",opacity:p.defaults.opacity??1,strokeWidth:p.defaults.strokeWidth??1,strokeColor:p.defaults.strokeColor??"#000000",strokeStyle:p.defaults.strokeStyle??Te.SOLID,strokeDashArray:p.defaults.strokeDashArray??[],flags:p.defaults.flags??["print"]}:null},m=()=>{const p=a();if(p.length<3)return;const f=u();if(!f)return;const v=f.cloudyBorderIntensity??0,y=v>0?Jt(v,f.strokeWidth,!1):f.strokeWidth/2,b=vn(rn(p),y),w={...f,vertices:p,rect:b,type:z.POLYGON,pageIndex:e.pageIndex,id:Ce(),created:new Date,...v>0&&{rectangleDifferences:{left:y,top:y,right:y,bottom:y}}};t(w),s([]),c(null),n(null)},g=()=>{const p=a(),f=l();if(p.length===0||!f)return null;const v=u();if(!v)return null;const y=v.cloudyBorderIntensity??0,b=y>0?Jt(y,v.strokeWidth,!1):v.strokeWidth/2,w=vn(rn([...p,f]),b);return{type:z.POLYGON,bounds:w,data:{...v,rect:w,vertices:p,currentVertex:f}}};return{onClick:(p,f)=>{if(f.metaKey||f.ctrlKey)return;const v=d(p);if((w=>{const x=a();if(x.length<2)return!1;const k=14/i/2,I=x[0];return w.x>=I.x-k&&w.x<=I.x+k&&w.y>=I.y-k&&w.y<=I.y+k})(v)&&a().length>=3)return void m();const y=a(),b=y[y.length-1];b&&Math.abs(b.x-v.x)<1&&Math.abs(b.y-v.y)<1||(s([...y,v]),c(v),n(g()))},onDoubleClick:p=>{m()},onPointerMove:p=>{if(a().length>0){const f=d(p);c(f),n(g())}},onPointerCancel:p=>{s([]),c(null),n(null)}}}},Cg={annotationType:z.SQUARE,create(e){const{pageIndex:t,onCommit:n,onPreview:o,getTool:i,pageSize:r}=e,[a,s]=Ct(null),l=m=>({x:ve(m.x,0,r.width),y:ve(m.y,0,r.height)}),c=()=>{const m=i();return m?{...m.defaults,flags:m.defaults.flags??["print"],strokeWidth:m.defaults.strokeWidth??2,strokeColor:m.defaults.strokeColor??"#000000",strokeStyle:m.defaults.strokeStyle??Te.SOLID,strokeDashArray:m.defaults.strokeDashArray??[],color:m.defaults.color??"#000000",opacity:m.defaults.opacity??1}:null},d=xn({threshold:5,getTool:i,onClickDetected:(m,g)=>{const p=c();if(!p)return;const f=g.clickBehavior;if(!f?.enabled)return;const{width:v,height:y}=f.defaultSize,b=v/2,w=y/2,x=ve(m.x-b,0,r.width-v),k=ve(m.y-w,0,r.height-y),I=p.strokeWidth,S=p.cloudyBorderIntensity??0,A=S>0?Jt(S,I,!1):I/2,M={origin:{x:x-A,y:k-A},size:{width:v+2*A,height:y+2*A}},P={...p,type:z.SQUARE,created:new Date,id:Ce(),pageIndex:t,rect:M,...S>0&&{rectangleDifferences:{left:A,top:A,right:A,bottom:A}}};n(P)}}),u=m=>{const g=a();if(!g)return null;const p=Math.min(g.x,m.x),f=Math.min(g.y,m.y),v=Math.abs(g.x-m.x),y=Math.abs(g.y-m.y),b=c();if(!b)return null;const w=b.strokeWidth,x=b.cloudyBorderIntensity??0,k=x>0?Jt(x,w,!1):w/2,I={origin:{x:p-k,y:f-k},size:{width:v+2*k,height:y+2*k}};return{type:z.SQUARE,bounds:I,data:{rect:I,...b,...x>0&&{rectangleDifferences:{left:k,top:k,right:k,bottom:k}}}}};return{onPointerDown:(m,g)=>{var p;const f=l(m);s(f),d.onStart(f),o(u(f)),(p=g.setPointerCapture)==null||p.call(g)},onPointerMove:m=>{const g=l(m);d.onMove(g),a()&&d.hasMoved()&&o(u(g))},onPointerUp:(m,g)=>{var p;
2115if(!a()||!c())return;const f=l(m);if(d.hasMoved()){const v=c();if(!v)return;const y=u(f);if(y){const b=v.cloudyBorderIntensity??0,w=b>0?Jt(b,v.strokeWidth,!1):void 0,x={...v,type:z.SQUARE,created:new Date,id:Ce(),pageIndex:t,rect:y.data.rect,...w!==void 0&&{rectangleDifferences:{left:w,top:w,right:w,bottom:w}}};n(x)}}else d.onEnd(f);s(null),o(null),d.reset(),(p=g.releasePointerCapture)==null||p.call(g)},onPointerLeave:(m,g)=>{var p;s(null),o(null),d.reset(),(p=g.releasePointerCapture)==null||p.call(g)},onPointerCancel:(m,g)=>{var p;s(null),o(null),d.reset(),(p=g.releasePointerCapture)==null||p.call(g)}}}},ir=new Map,kg={annotationType:z.STAMP,create(e){const{services:t,onCommit:n,onPreview:o,getTool:i,pageSize:r,pageRotation:a}=e;let s=null,l=null;const c=(d,u,m)=>{const g=Ql(u);if(!g||g.mimeType==="application/pdf")return!1;const p=ql(g,r);return((f,v,y,b)=>{var w;const x=i();if(!x)return;const k={origin:{x:f.x-v/2,y:f.y-y/2},size:{width:v,height:y}};let I={...x.defaults,rect:k,type:z.STAMP,name:x.defaults.name??Ne.Image,subject:x.defaults.subject??"Stamp",flags:x.defaults.flags??["print"],pageIndex:e.pageIndex,id:Ce(),created:new Date};(w=x.behavior)!=null&&w.insertUpright&&(I=ki(I,a,!1)),I=Li(I,r),n(I,b)})(d,m?.width??p.width,m?.height??p.height,{data:u}),!0};return{onHandlerActiveStart:()=>{const d=i(),u=d?.defaults.imageSrc;if(!u)return;let m=ir.get(u);m?m.refs++:(m={promise:fetch(u).then(g=>g.arrayBuffer()).then(g=>{const p=Ql(g);if(!p||p.mimeType==="application/pdf")return null;const f=ql(p,r),v=d.defaults.imageSize;return{buffer:g,width:v?.width??f.width,height:v?.height??f.height}}).catch(()=>null),refs:1},ir.set(u,m)),m.promise.then(g=>{g&&(s=g.buffer,l={width:g.width,height:g.height})})},onHandlerActiveEnd:()=>{const d=i(),u=d?.defaults.imageSrc;if(u){const m=ir.get(u);m&&--m.refs<=0&&ir.delete(u)}s=null,l=null,o(null)},onPointerMove:d=>{var u;const m=i();if(!((u=m?.behavior)!=null&&u.showGhost)||!l||!m.defaults.imageSrc)return;const g={origin:{x:d.x-l.width/2,y:d.y-l.height/2},size:l};o({type:z.STAMP,bounds:g,data:{rect:g,ghostUrl:m.defaults.imageSrc,pageRotation:a}})},onPointerDown:d=>{const u=i();if(!u)return;const{imageSrc:m,imageSize:g}=u.defaults;m?(o(null),s?c(d,s,g):fetch(m).then(p=>p.arrayBuffer()).then(p=>c(d,p,g))):t.requestFile({accept:"image/png,image/jpeg",onFile:p=>{p.arrayBuffer().then(f=>c(d,f))}})},onPointerLeave:()=>{o(null)}}}},Ig={annotationType:z.CIRCLE,create(e){const{pageIndex:t,onCommit:n,onPreview:o,getTool:i,pageSize:r}=e,[a,s]=Ct(null),l=m=>({x:ve(m.x,0,r.width),y:ve(m.y,0,r.height)}),c=()=>{const m=i();return m?{...m.defaults,strokeWidth:m.defaults.strokeWidth??2,strokeColor:m.defaults.strokeColor??"#000000",strokeStyle:m.defaults.strokeStyle??Te.SOLID,strokeDashArray:m.defaults.strokeDashArray??[],color:m.defaults.color??"#000000",opacity:m.defaults.opacity??1,flags:m.defaults.flags??["print"]}:null},d=xn({threshold:5,getTool:i,onClickDetected:(m,g)=>{const p=c();if(!p)return;const f=g.clickBehavior;if(!f?.enabled)return;const{width:v,height:y}=f.defaultSize,b=v/2,w=y/2,x=ve(m.x-b,0,r.width-v),k=ve(m.y-w,0,r.height-y),I=p.strokeWidth,S=p.cloudyBorderIntensity??0,A=S>0?Jt(S,I,!0):I/2,M={origin:{x:x-A,y:k-A},size:{width:v+2*A,height:y+2*A}},P={...p,type:z.CIRCLE,created:new Date,id:Ce(),pageIndex:t,rect:M,...S>0&&{rectangleDifferences:{left:A,top:A,right:A,bottom:A}}};n(P)}}),u=m=>{const g=a();if(!g)return null;const p=Math.min(g.x,m.x),f=Math.min(g.y,m.y),v=Math.abs(g.x-m.x),y=Math.abs(g.y-m.y),b=c();if(!b)return null;const w=b.strokeWidth,x=b.cloudyBorderIntensity??0,k=x>0?Jt(x,w,!0):w/2,I={origin:{x:p-k,y:f-k},size:{width:v+2*k,height:y+2*k}};return{type:z.CIRCLE,bounds:I,data:{rect:I,...b,...x>0&&{rectangleDifferences:{left:k,top:k,right:k,bottom:k}}}}};return{onPointerDown:(m,g)=>{var p;const f=l(m);s(f),d.onStart(f),o(u(f)),(p=g.setPointerCapture)==null||p.call(g)},onPointerMove:m=>{const g=l(m);d.onMove(g),a()&&d.hasMoved()&&o(u(g))},onPointerUp:(m,g)=>{var p;
vendor: 9,463 bytes, line 2115
2115if(!a()||!c())return;const f=l(m);if(d.hasMoved()){const v=c();if(!v)return;const y=u(f);if(y){const b=v.cloudyBorderIntensity??0,w=b>0?Jt(b,v.strokeWidth,!0):void 0,x={...v,type:z.CIRCLE,flags:["print"],created:new Date,id:Ce(),pageIndex:t,rect:y.data.rect,...w!==void 0&&{rectangleDifferences:{left:w,top:w,right:w,bottom:w}}};n(x)}}else d.onEnd(f);s(null),o(null),d.reset(),(p=g.releasePointerCapture)==null||p.call(g)},onPointerLeave:(m,g)=>{var p;s(null),o(null),d.reset(),(p=g.releasePointerCapture)==null||p.call(g)},onPointerCancel:(m,g)=>{var p;s(null),o(null),d.reset(),(p=g.releasePointerCapture)==null||p.call(g)}}}},Sg={annotationType:z.LINK,create(e){const{pageIndex:t,onCommit:n,onPreview:o,getTool:i,pageSize:r}=e,[a,s]=Ct(null),l=m=>({x:ve(m.x,0,r.width),y:ve(m.y,0,r.height)}),c=()=>{const m=i();return m?{...m.defaults,flags:m.defaults.flags??["print"],strokeWidth:m.defaults.strokeWidth??2,strokeColor:m.defaults.strokeColor??"#0000FF",strokeStyle:m.defaults.strokeStyle??Te.UNDERLINE,strokeDashArray:m.defaults.strokeDashArray??[]}:null},d=xn({threshold:5,getTool:i,onClickDetected:(m,g)=>{const p=c();if(!p)return;const f=g.clickBehavior;if(!f?.enabled)return;const{width:v,height:y}=f.defaultSize,b=v/2,w=y/2,x={origin:{x:ve(m.x-b,0,r.width-v),y:ve(m.y-w,0,r.height-y)},size:{width:v,height:y}},k={...p,type:z.LINK,target:void 0,created:new Date,id:Ce(),pageIndex:t,rect:x};n(k)}}),u=m=>{const g=a();if(!g)return null;const p=Math.min(g.x,m.x),f=Math.min(g.y,m.y),v=Math.abs(g.x-m.x),y=Math.abs(g.y-m.y),b=c();if(!b)return null;const w={origin:{x:p,y:f},size:{width:v,height:y}};return{type:z.LINK,bounds:w,data:{rect:w,strokeColor:b.strokeColor,strokeWidth:b.strokeWidth,strokeStyle:b.strokeStyle,strokeDashArray:b.strokeDashArray}}};return{onPointerDown:(m,g)=>{var p;const f=l(m);s(f),d.onStart(f),o(u(f)),(p=g.setPointerCapture)==null||p.call(g)},onPointerMove:m=>{const g=l(m);d.onMove(g),a()&&d.hasMoved()&&o(u(g))},onPointerUp:(m,g)=>{var p;if(!a())return;const f=c();if(!f)return;const v=l(m);if(d.hasMoved()){const y=u(v);if(y){const b={...f,type:z.LINK,target:void 0,created:new Date,id:Ce(),pageIndex:t,rect:y.data.rect};n(b)}}else d.onEnd(v);s(null),o(null),d.reset(),(p=g.releasePointerCapture)==null||p.call(g)},onPointerLeave:(m,g)=>{var p;s(null),o(null),d.reset(),(p=g.releasePointerCapture)==null||p.call(g)},onPointerCancel:(m,g)=>{var p;s(null),o(null),d.reset(),(p=g.releasePointerCapture)==null||p.call(g)}}}},v4={toolId:"__textMarkup__",handle(e,t,n){const o=e.getTool();if(o)for(const i of t){const r=Ce();n().then(a=>{var s;e.createAnnotation(i.pageIndex,{...o.defaults,rect:i.rect,segmentRects:i.segmentRects,pageIndex:i.pageIndex,created:new Date,id:r,...a!=null&&{custom:{text:a}}}),(s=o.behavior)!=null&&s.selectAfterCreate&&e.selectAnnotation(i.pageIndex,r)})}}};function Mg(e){const t=e.size.height,n=t/2,o=n;return{origin:{x:e.origin.x+e.size.width-o/2,y:e.origin.y+t/2},size:{width:o,height:n}}}const y4={toolId:"insertText",handle(e,t,n){const o=e.getTool();if(!o)return;const i=()=>({strokeColor:o.defaults.strokeColor??"#E44234",opacity:o.defaults.opacity??1,flags:o.defaults.flags??["print"]});for(const r of t){const a=r.segmentRects[r.segmentRects.length-1];if(!a)continue;const s=Mg(a),l=Ce(),c=i();n().then(d=>{var u;e.createAnnotation(r.pageIndex,{type:z.CARET,id:l,pageIndex:r.pageIndex,rect:s,strokeColor:c.strokeColor,opacity:c.opacity,intent:"Insert",rectangleDifferences:{left:.5,top:.5,right:.5,bottom:.5},created:new Date,flags:c.flags,...d!=null&&{custom:{text:d}}}),(u=o.behavior)!=null&&u.selectAfterCreate&&e.selectAnnotation(r.pageIndex,l)})}}},b4={toolId:"replaceText",handle(e,t,n){const o=e.getTool();if(!o)return;const i=()=>({strokeColor:o.defaults.strokeColor??"#E44234",opacity:o.defaults.opacity??1,flags:o.defaults.flags??["print"]});for(const r of t){const a=r.segmentRects[r.segmentRects.length-1];if(!a)continue;const s=Mg(a),l=Ce(),c=Ce(),d=i();n().then(u=>{var m;e.createAnnotation(r.pageIndex,{type:z.CARET,id:l,pageIndex:r.pageIndex,rect:s,strokeColor:d.strokeColor,opacity:d.opacity,intent:"Replace",rectangleDifferences:{left:.5,top:.5,right:.5,bottom:.5},created:new Date,flags:d.flags}),e.createAnnotation(r.pageIndex,{type:z.STRIKEOUT,id:c,pageIndex:r.pageIndex,rect:r.rect,segmentRects:r.segmentRects,strokeColor:d.strokeColor,opacity:d.opacity,intent:"StrikeOutTextEdit",inReplyToId:l,replyType:ln.Group,created:new Date,flags:d.flags,...u!=null&&{custom:{text:u}}}),(m=o.behavior)!=null&&m.selectAfterCreate&&e.selectAnnotation(r.pageIndex,l)})}}},sd=(e,t)=>{switch(t.type){case"vertex-edit":default:return t.changes;case"move":{if(!t.changes.rect)return t.changes;const{dx:n,dy:o,rects:i}=eo(e,t.changes.rect);return{...i,inkList:e.inkList.map(r=>({points:r.points.map(a=>({x:a.x+n,y:a.y+o}))}))}}case"resize":{if(!t.changes.rect)return t.changes;const{scaleX:n,scaleY:o,oldRect:i,resolvedRect:r,rects:a}=to(e,t.changes.rect,t.metadata),s=(x,k)=>({origin:{x:x.origin.x+k,y:x.origin.y+k},size:{width:Math.max(1,x.size.width-2*k),height:Math.max(1,x.size.height-2*k)}}),l=.001,c=Math.abs(n-1)>l,d=Math.abs(o-1)>l,u=c&&!d?n:!c&&d?o:Math.min(n,o),m=Math.max(1,e.strokeWidth*u),g=Math.max(1,Math.min(r.size.width,r.size.height)),p=Math.min(m,g),f=Number(p.toFixed(1)),v=s(i,e.strokeWidth/2),y=s(r,f/2),b=y.size.width/Math.max(v.size.width,1e-6),w=y.size.height/Math.max(v.size.height,1e-6);return{...a,inkList:e.inkList.map(x=>({points:x.points.map(k=>({x:y.origin.x+(k.x-v.origin.x)*b,y:y.origin.y+(k.y-v.origin.y)*w}))})),strokeWidth:f}}case"rotate":{const n=Jn(e,t);if(!n)return t.changes;const{dx:o,dy:i}=ia(e,n);return{...n,inkList:e.inkList.map(r=>({points:r.points.map(a=>({x:a.x+o,y:a.y+i}))}))}}case"property-update":{if(!(t.changes.strokeWidth!==void 0||t.changes.rotation!==void 0))return t.changes;const n={...e,...t.changes},o=n.inkList.flatMap(a=>a.points),i=vn(rn(o),n.strokeWidth/2),r=t.changes.rotation??e.rotation??0;return e.unrotatedRect||t.changes.rotation!==void 0?{...t.changes,unrotatedRect:i,rect:Xn(i,r,Qn(e))}:{...t.changes,rect:i}}}},ld=(e,t)=>{switch(t.type){case"vertex-edit":if(t.changes.linePoints){const{start:n,end:o}=t.changes.linePoints,i=[n,o],r=oa(e,i,Qt(i,e.strokeWidth,e.lineEndings));return{...na(e,Qt(r,e.strokeWidth,e.lineEndings)),linePoints:{start:r[0],end:r[1]}}}return t.changes;case"move":{if(!t.changes.rect)return t.changes;const{dx:n,dy:o,rects:i}=eo(e,t.changes.rect);return{...i,linePoints:{start:{x:e.linePoints.start.x+n,y:e.linePoints.start.y+o},end:{x:e.linePoints.end.x+n,y:e.linePoints.end.y+o}}}}case"resize":{if(!t.changes.rect)return t.changes;const{scaleX:n,scaleY:o,oldRect:i,resolvedRect:r,rects:a}=to(e,t.changes.rect,t.metadata);return{...a,linePoints:{start:{x:r.origin.x+(e.linePoints.start.x-i.origin.x)*n,y:r.origin.y+(e.linePoints.start.y-i.origin.y)*o},end:{x:r.origin.x+(e.linePoints.end.x-i.origin.x)*n,y:r.origin.y+(e.linePoints.end.y-i.origin.y)*o}}}}case"rotate":{const n=Jn(e,t);if(!n)return t.changes;const{dx:o,dy:i}=ia(e,n);return{...n,linePoints:{start:{x:e.linePoints.start.x+o,y:e.linePoints.start.y+i},end:{x:e.linePoints.end.x+o,y:e.linePoints.end.y+i}}}}case"property-update":{if(!(t.changes.strokeWidth!==void 0||t.changes.lineEndings!==void 0||t.changes.rotation!==void 0))return t.changes;const n={...e,...t.changes},o=Qt([n.linePoints.start,n.linePoints.end],n.strokeWidth,n.lineEndings),i=t.changes.rotation??e.rotation??0;return e.unrotatedRect||t.changes.rotation!==void 0?{...t.changes,unrotatedRect:o,rect:Xn(o,i,Qn(e))}:{...t.changes,rect:o}}default:return t.changes}};function cd(e,t){return(e??0)>0?Jt(e,t,!1):t/2}const w4=[{id:"highlight",name:"Highlight",labelKey:"annotation.highlight",categories:["annotation","markup"],matchScore:e=>e.type===z.HIGHLIGHT?1:0,interaction:{exclusive:!1,textSelection:!0,isDraggable:!1,isResizable:!1,isRotatable:!1,isGroupDraggable:!1,isGroupResizable:!1},defaults:{type:z.HIGHLIGHT,strokeColor:"#FFCD45",color:"#FFCD45",opacity:1,blendMode:xe.Multiply}},{id:"underline",name:"Underline",labelKey:"annotation.underline",categories:["annotation","markup"],matchScore:e=>e.type===z.UNDERLINE?1:0,interaction:{exclusive:!1,textSelection:!0,isDraggable:!1,isResizable:!1,isRotatable:!1,isGroupDraggable:!1,isGroupResizable:!1},defaults:{type:z.UNDERLINE,strokeColor:"#E44234",color:"#E44234",opacity:1}},{id:"strikeout",name:"Strikeout",labelKey:"annotation.strikeout",categories:["annotation","markup"],matchScore:e=>e.type===z.STRIKEOUT?1:0,interaction:{exclusive:!1,textSelection:!0,isDraggable:!1,isResizable:!1,isRotatable:!1,isGroupDraggable:!1,isGroupResizable:!1},defaults:{type:z.STRIKEOUT,strokeColor:"#E44234",color:"#E44234",opacity:1}},{id:"squiggly",name:"Squiggly",labelKey:"annotation.squiggly",categories:["annotation","markup"],matchScore:e=>e.type===z.SQUIGGLY?1:0,interaction:{exclusive:!1,textSelection:!0,isDraggable:!1,isResizable:!1,isRotatable:!1,isGroupDraggable:!1,isGroupResizable:!1},defaults:{type:z.SQUIGGLY,strokeColor:"#E44234",color:"#E44234",opacity:1}}],x4=[{id:"insertText",name:"Insert Text",labelKey:"annotation.insertText",categories:["annotation","markup"],matchScore:e=>{var t;return e.type!==z.CARET?0:(t=e.intent)!=null&&t.includes("Insert")?2:1},interaction:{exclusive:!1,textSelection:!0,showSelectionRects:!0,isDraggable:!1,isResizable:!1,isRotatable:!1,isGroupDraggable:!1,isGroupResizable:!1},defaults:{type:z.CARET,strokeColor:"#E44234",opacity:1,intent:"Insert"},selectionHandler:y4}
2115],C4=[{id:"replaceText",name:"Replace Text",labelKey:"annotation.replaceText",categories:["annotation","markup"],matchScore:e=>{var t,n;return e.type===z.STRIKEOUT&&((t=e.intent)!=null&&t.includes("StrikeOutTextEdit"))||e.type===z.CARET&&((n=e.intent)!=null&&n.includes("Replace"))?2:0},interaction:{exclusive:!1,textSelection:!0,isDraggable:!1,isResizable:!1,isRotatable:!1,isGroupDraggable:!1,isGroupResizable:!1},defaults:{type:z.STRIKEOUT,strokeColor:"#E44234",opacity:1,intent:"StrikeOutTextEdit"},selectionHandler:b4}],k4=[{id:"ink",name:"Pen",labelKey:"annotation.ink",categories:["annotation","markup"],matchScore:e=>e.type===z.INK&&e.intent!=="InkHighlight"?5:0,interaction:{exclusive:!1,cursor:"crosshair",isDraggable:!0,isResizable:!0,lockAspectRatio:!1},defaults:{type:z.INK,strokeColor:"#E44234",color:"#E44234",opacity:1,strokeWidth:6},behavior:{commitDelay:800},transform:sd,pointerHandler:is},{id:"inkHighlighter",name:"Ink Highlighter",labelKey:"annotation.inkHighlighter",categories:["annotation","markup"],matchScore:e=>e.type===z.INK&&e.intent==="InkHighlight"?10:0,interaction:{exclusive:!1,cursor:"crosshair",isDraggable:!0,isResizable:!0,lockAspectRatio:!1,lockGroupAspectRatio:e=>{const t=((e.rotation??0)%90+90)%90;return t>=6&&t<=84}},defaults:{type:z.INK,intent:"InkHighlight",strokeColor:"#FFCD45",color:"#FFCD45",opacity:1,strokeWidth:14,blendMode:xe.Multiply},behavior:{commitDelay:800,smartLineRecognition:!0,smartLineThreshold:.15},transform:sd,pointerHandler:is}],I4=[{id:"circle",name:"Circle",labelKey:"annotation.circle",categories:["annotation","shape"],matchScore:e=>e.type===z.CIRCLE?1:0,interaction:{exclusive:!1,cursor:"crosshair",isDraggable:!0,isResizable:!0,lockAspectRatio:!1,lockGroupAspectRatio:e=>{const t=((e.rotation??0)%90+90)%90;return t>=6&&t<=84}},defaults:{type:z.CIRCLE,color:"transparent",opacity:1,strokeWidth:6,strokeColor:"#E44234",strokeStyle:Te.SOLID},clickBehavior:{enabled:!0,defaultSize:{width:100,height:100}},transform:(e,t)=>{switch(t.type){case"move":return t.changes.rect?eo(e,t.changes.rect).rects:t.changes;case"resize":return t.changes.rect?to(e,t.changes.rect,t.metadata).rects:t.changes;case"rotate":return Jn(e,t)??t.changes;case"property-update":{let n=t.changes;const o=t.changes.cloudyBorderIntensity!==void 0,i=t.changes.strokeWidth!==void 0,r=(e.cloudyBorderIntensity??0)>0;if(o||i&&r){const a={...e,...t.changes},s=a.cloudyBorderIntensity??0;if(s>0){const l=Jt(s,a.strokeWidth,!0);n={...n,rectangleDifferences:{left:l,top:l,right:l,bottom:l}}}else n={...n,rectangleDifferences:void 0}}return t.changes.rotation!==void 0&&(n={...n,..._i(e,t.changes.rotation)}),n}default:return t.changes}},pointerHandler:Ig}],S4=[{id:"square",name:"Square",labelKey:"annotation.square",categories:["annotation","shape"],matchScore:e=>e.type===z.SQUARE?1:0,interaction:{exclusive:!1,cursor:"crosshair",isDraggable:!0,isResizable:!0,lockAspectRatio:!1,lockGroupAspectRatio:e=>{const t=((e.rotation??0)%90+90)%90;return t>=6&&t<=84}},defaults:{type:z.SQUARE,color:"transparent",opacity:1,strokeWidth:6,strokeColor:"#E44234",strokeStyle:Te.SOLID},clickBehavior:{enabled:!0,defaultSize:{width:100,height:100}},transform:(e,t)=>{switch(t.type){case"move":return t.changes.rect?eo(e,t.changes.rect).rects:t.changes;case"resize":return t.changes.rect?to(e,t.changes.rect,t.metadata).rects:t.changes;case"rotate":return Jn(e,t)??t.changes;case"property-update":{let n=t.changes;const o=t.changes.cloudyBorderIntensity!==void 0,i=t.changes.strokeWidth!==void 0,r=(e.cloudyBorderIntensity??0)>0;if(o||i&&r){const a={...e,...t.changes},s=a.cloudyBorderIntensity??0;if(s>0){const l=Jt(s,a.strokeWidth,!1);n={...n,rectangleDifferences:{left:l,top:l,right:l,bottom:l}}}else n={...n,rectangleDifferences:void 0}}return t.changes.rotation!==void 0&&(n={...n,..._i(e,t.changes.rotation)}),n}default:return t.changes}},pointerHandler:Cg}],M4=[{id:"line",name:"Line",labelKey:"annotation.line",categories:["annotation","shape"],matchScore:e=>e.type===z.LINE&&e.intent!=="LineArrow"?5:0,interaction:{exclusive:!1,cursor:"crosshair",isDraggable:!0,isResizable:!1,lockA
2115spectRatio:!1,isGroupResizable:!0,lockGroupAspectRatio:e=>{const t=((e.rotation??0)%90+90)%90;return t>=6&&t<=84}},defaults:{type:z.LINE,color:"transparent",opacity:1,strokeWidth:6,strokeColor:"#E44234"},clickBehavior:{enabled:!0,defaultLength:100,defaultAngle:0},transform:ld,pointerHandler:as},{id:"lineArrow",name:"Arrow",labelKey:"annotation.arrow",categories:["annotation","shape"],matchScore:e=>e.type===z.LINE&&e.intent==="LineArrow"?10:0,interaction:{exclusive:!1,cursor:"crosshair",isDraggable:!0,isResizable:!1,lockAspectRatio:!1,isGroupResizable:!0,lockGroupAspectRatio:e=>{const t=((e.rotation??0)%90+90)%90;return t>=6&&t<=84}},defaults:{type:z.LINE,intent:"LineArrow",color:"transparent",opacity:1,strokeWidth:6,strokeColor:"#E44234",lineEndings:{start:Ie.None,end:Ie.OpenArrow}},clickBehavior:{enabled:!0,defaultLength:100,defaultAngle:0},transform:ld,pointerHandler:as}],A4=[{id:"polyline",name:"Polyline",labelKey:"annotation.polyline",categories:["annotation","shape"],matchScore:e=>e.type===z.POLYLINE?1:0,interaction:{exclusive:!1,cursor:"crosshair",isDraggable:!0,isResizable:!1,lockAspectRatio:!1,isGroupResizable:!0,lockGroupAspectRatio:e=>{const t=((e.rotation??0)%90+90)%90;return t>=6&&t<=84}},defaults:{type:z.POLYLINE,color:"transparent",opacity:1,strokeWidth:6,strokeColor:"#E44234"},transform:(e,t)=>{switch(t.type){case"vertex-edit":if(t.changes.vertices&&t.changes.vertices.length){const n=t.changes.vertices,o=oa(e,n,Qt(n,e.strokeWidth,e.lineEndings));return{...na(e,Qt(o,e.strokeWidth,e.lineEndings)),vertices:o}}return t.changes;case"move":{if(!t.changes.rect)return t.changes;const{dx:n,dy:o,rects:i}=eo(e,t.changes.rect);return{...i,vertices:e.vertices.map(r=>({x:r.x+n,y:r.y+o}))}}case"resize":{if(!t.changes.rect)return t.changes;const{scaleX:n,scaleY:o,oldRect:i,resolvedRect:r,rects:a}=to(e,t.changes.rect,t.metadata);return{...a,vertices:e.vertices.map(s=>({x:r.origin.x+(s.x-i.origin.x)*n,y:r.origin.y+(s.y-i.origin.y)*o}))}}case"rotate":{const n=Jn(e,t);if(!n)return t.changes;const{dx:o,dy:i}=ia(e,n);return{...n,vertices:e.vertices.map(r=>({x:r.x+o,y:r.y+i}))}}case"property-update":{if(!(t.changes.strokeWidth!==void 0||t.changes.lineEndings!==void 0||t.changes.rotation!==void 0))return t.changes;const n={...e,...t.changes},o=Qt(n.vertices,n.strokeWidth,n.lineEndings),i=t.changes.rotation??e.rotation??0;return e.unrotatedRect||t.changes.rotation!==void 0?{...t.changes,unrotatedRect:o,rect:Xn(o,i,Qn(e))}:{...t.changes,rect:o}}default:return t.changes}},pointerHandler:fg}],P4=[{id:"polygon",name:"Polygon",labelKey:"annotation.polygon",categories:["annotation","shape"],matchScore:e=>e.type===z.POLYGON?1:0,interaction:{exclusive:!1,cursor:"crosshair",isDraggable:!0,isResizable:!1,lockAspectRatio:!1,isGroupResizable:!0,lockGroupAspectRatio:e=>{const t=((e.rotation??0)%90+90)%90;return t>=6&&t<=84}},defaults:{type:z.POLYGON,color:"transparent",opacity:1,strokeWidth:6,strokeColor:"#E44234"},transform:(e,t)=>{switch(t.type){case"vertex-edit":if(t.changes.vertices&&t.changes.vertices.length){const n=cd(e.cloudyBorderIntensity,e.strokeWidth),o=t.changes.vertices,i=oa(e,o,vn(rn(o),n));
2115return{...na(e,vn(rn(i),n)),vertices:i}}return t.changes;case"move":{if(!t.changes.rect)return t.changes;const{dx:n,dy:o,rects:i}=eo(e,t.changes.rect);return{...i,vertices:e.vertices.map(r=>({x:r.x+n,y:r.y+o}))}}case"resize":{if(!t.changes.rect)return t.changes;const{scaleX:n,scaleY:o,oldRect:i,resolvedRect:r,rects:a}=to(e,t.changes.rect,t.metadata);return{...a,vertices:e.vertices.map(s=>({x:r.origin.x+(s.x-i.origin.x)*n,y:r.origin.y+(s.y-i.origin.y)*o}))}}case"rotate":{const n=Jn(e,t);if(!n)return t.changes;const{dx:o,dy:i}=ia(e,n);return{...n,vertices:e.vertices.map(r=>({x:r.x+o,y:r.y+i}))}}case"property-update":{const n=t.changes.cloudyBorderIntensity!==void 0;if(!(t.changes.strokeWidth!==void 0||t.changes.rotation!==void 0||n))return t.changes;const o={...e,...t.changes},i=cd(o.cloudyBorderIntensity,o.strokeWidth),r=vn(rn(o.vertices),i);let a=t.changes;const s=(e.cloudyBorderIntensity??0)>0;if(n||t.changes.strokeWidth!==void 0&&s){const c=o.cloudyBorderIntensity??0;if(c>0){const d=Jt(c,o.strokeWidth,!1);a={...a,rectangleDifferences:{left:d,top:d,right:d,bottom:d}}}else a={...a,rectangleDifferences:void 0}}const l=t.changes.rotation??e.rotation??0;return e.unrotatedRect||t.changes.rotation!==void 0?{...a,unrotatedRect:r,rect:Xn(r,l,Qn(e))}:{...a,rect:r}}default:return t.changes}},pointerHandler:xg}],D4=[{id:"textComment",name:"Comment",labelKey:"annotation.text",categories:["annotation","markup"],matchScore:e=>e.type!==z.TEXT||e.inReplyToId?0:1,interaction:{exclusive:!1,cursor:"crosshair",isDraggable:!0,isResizable:!1,isRotatable:!1},defaults:{type:z.TEXT,strokeColor:"#FFCD45",opacity:1},behavior:{selectAfterCreate:!0},pointerHandler:pg}],T4=[{id:"freeText",name:"Free Text",labelKey:"annotation.freeText",categories:["annotation","markup"],matchScore:e=>e.type===z.FREETEXT?1:0,interaction:{exclusive:!1,cursor:"crosshair",isDraggable:!0,isResizable:!0,lockAspectRatio:!1,lockGroupAspectRatio:e=>{const t=((e.rotation??0)%90+90)%90;return t>=6&&t<=84}},defaults:{type:z.FREETEXT,contents:"Insert text",fontSize:14,fontColor:"#E44234",fontFamily:Ge.Helvetica,textAlign:ut.Left,verticalAlign:Bt.Top,color:"transparent",backgroundColor:"transparent",opacity:1},clickBehavior:{enabled:!0,defaultSize:{width:100,height:20},defaultContent:"Insert text"},behavior:{insertUpright:!0,editAfterCreate:!0,selectAfterCreate:!0},transform:(e,t)=>{switch(t.type){case"move":return t.changes.rect?eo(e,t.changes.rect).rects:t.changes;case"resize":return t.changes.rect?to(e,t.changes.rect,t.metadata).rects:t.changes;case"rotate":return Jn(e,t)??t.changes;case"property-update":return t.changes.rotation!==void 0?{...t.changes,..._i(e,t.changes.rotation)}:t.changes;default:return t.changes}},pointerHandler:gg}],z4=[{id:"stamp",name:"Image",labelKey:"annotation.stamp",categories:["annotation","markup"],matchScore:e=>e.type===z.STAMP?1:0,interaction:{exclusive:!1,cursor:"copy",isDraggable:!0,isResizable:!0,lockAspectRatio:!0,lockGroupAspectRatio:!0},defaults:{type:z.STAMP},behavior:{insertUpright:!0,useAppearanceStream:!1},transform:(e,t)=>{switch(t.type){case"move":return t.changes.rect?eo(e,t.changes.rect).rects:t.changes;case"resize":return t.changes.rect?to(e,t.changes.rect,t.metadata).rects:t.changes;case"rotate":return Jn(e,t)??t.changes;case"property-update":return t.changes.rotation!==void 0?{...t.changes,..._i(e,t.changes.rotation)}:t.changes;default:return t.changes}},pointerHandler:kg}],R4=[{id:"link",name:"Link",labelKey:"annotation.link",categories:["annotation","markup"],matchScore:e=>e.type===z.LINK?1:0,interaction:{exclusive:!1,cursor:"crosshair",isDraggable:!0,isResizable:!0,isRotatable:!1},defaults:{type:z.LINK,strokeColor:"#0000FF",strokeWidth:2,strokeStyle:Te.UNDERLINE},clickBehavior:{enabled:!0,defaultSize:{width:100,height:20}},pointerHandler:Sg}],E4=[...w4,...x4,...C4,...k4,...I4,...S4,...M4,...A4,...P4,...D4,...T4,...z4,...R4],_4=["#E44234","#FF8D00","#FFCD45","#5CC96E","#25D2D1","#597CE2","#C544CE","#7D2E25","#000000","#FFFFFF"],Da=e=>e.length===1?e[0]:null,Ag=e=>({pages:{},byUid:{},selectedUids:[],selectedUid:null,activeToolId:null,hasPendingChanges:!1,locked:e?.locked??{type:ct.None}}
2115),L4=(e,t,n)=>{const o=e.byUid[t];return o?{...e,byUid:{...e.byUid,[t]:{...o,commitState:o.commitState==="synced"||o.commitState==="moved"?"dirty":o.commitState,object:{...o.object,...n},dictMode:!0}},hasPendingChanges:!0}:e},O4=(e,t,n)=>{const o=e.byUid[t];return o?{...e,byUid:{...e.byUid,[t]:{...o,commitState:o.commitState==="synced"?"moved":o.commitState,object:{...o.object,...n}}},hasPendingChanges:!0}:e},ls=class Pg extends Ye{constructor(t,n,o){var i,r,a,s;super(t,n),this.ANNOTATION_HISTORY_TOPIC="annotations",this.state$=et((l,c)=>({documentId:l,state:c})),this.pendingContexts=new Map,this.isInitialLoadComplete=new Map,this.importQueue=new Map,this.commitInProgress=new Map,this.activeTool$=et((l,c)=>({documentId:l,tool:c})),this.events$=et((l,c)=>c,{cache:!1}),this.toolsChange$=Ae(),this.appearanceCache=new Map,this.unifiedDragStates=new Map,this.unifiedDrag$=Ae(),this.unifiedResizeStates=new Map,this.unifiedResize$=Ae(),this.unifiedRotateStates=new Map,this.unifiedRotate$=Ae(),this.navigate$=et((l,c)=>c,{cache:!1}),this.config=o,this.selection=((i=n.getPlugin("selection"))==null?void 0:i.provides())??null,this.history=((r=n.getPlugin("history"))==null?void 0:r.provides())??null,this.scroll=((a=n.getPlugin("scroll"))==null?void 0:a.provides())??null,this.interactionManager=((s=n.getPlugin("interaction-manager"))==null?void 0:s.provides())??null}onDocumentLoadingStarted(t){this.dispatch((function(n,o){return{type:Up,payload:{documentId:n,state:o}}})(t,Ag(this.config))),this.pendingContexts.set(t,new Map),this.isInitialLoadComplete.set(t,!1),this.importQueue.set(t,[]),this.logger.debug("AnnotationPlugin","DocumentOpened",`Initialized annotation state for document: ${t}`)}onDocumentLoaded(t){const n=this.getCoreDocument(t);if(n?.document&&this.getAllAnnotations(t,n.document),this.selection)for(const o of this.state.tools)o.interaction.textSelection&&this.selection.enableForMode(o.interaction.mode??o.id,{showSelectionRects:o.interaction.showSelectionRects??!1,enableSelection:!0,enableMarquee:!1})}onDocumentClosed(t){this.dispatch((function(n){return{type:Wp,payload:n}})(t)),this.pendingContexts.delete(t),this.isInitialLoadComplete.delete(t),this.importQueue.delete(t),this.appearanceCache.delete(t),this.state$.clearScope(t),this.activeTool$.clearScope(t),this.events$.clearScope(t),this.navigate$.clearScope(t),this.logger.debug("AnnotationPlugin","DocumentClosed",`Cleaned up annotation state for document: ${t}`)}async initialize(){var t,n,o;this.state.tools.forEach(i=>this.registerInteractionForTool(i)),this.history&&this.history.onHistoryChange(i=>{i.topic===this.ANNOTATION_HISTORY_TOPIC&&this.config.autoCommit!==!1&&this.commit(i.documentId)}),(t=this.interactionManager)==null||t.onModeChange(i=>{var r,a;const s=((r=this.state.tools.find(l=>(l.interaction.mode??l.id)===i.activeMode))==null?void 0:r.id)??null;s!==(((a=this.state.documents[i.documentId])==null?void 0:a.activeToolId)??null)&&i.documentId&&this.dispatch(Yc(i.documentId,s))}),(n=this.selection)==null||n.onMarqueeEnd(({documentId:i,pageIndex:r,rect:a,modeId:s})=>{if(s!=="pointerMode")return;const l=this.state.documents[i];if(!l)return;const c=(l.pages[r]??[]).map(d=>l.byUid[d]).filter(d=>d!==void 0).filter(d=>c4(d)).filter(d=>(function(u,m){return!(u.origin.x+u.size.width<m.origin.x||m.origin.x+m.size.width<u.origin.x||u.origin.y+u.size.height<m.origin.y||m.origin.y+m.size.height<u.origin.y)})(a,d.object.rect)).filter(d=>!this.isAnnotationLocked(d.object,i)).map(d=>d.object.id);if(c.length>0){const d=new Set;for(const u of c)if(this.isInGroupMethod(u,i)){const m=this.getGroupMembersMethod(u,i);for(const g of m)d.add(g.object.id)}else d.add(u);this.setSelectionMethod([...d],i)}}),(o=this.selection)==null||o.onEndSelection(({documentId:i})=>{var r,a,s,l;if(!this.checkPermission(i,j.ModifyAnnotations))return;const c=this.getActiveTool(i);if(!c||!c.interaction.textSelection)return;const d=(r=this.selection)==null?void 0:r.getFormattedSelection(),u=(a=this.selection)==null?void 0:a.getSelectedText();if(!d||!u)return;const m={toolId:c.id,documentId:i,getTool:()=>this.getActiveTool(i)??null,createAnnotation:(g,p)=>this.createAnnotation(g,p,void 0,i),selectAnnotation:(g,p)=>this.selectAnnotation(g,p,i)};(c.selectionHandler??v4).handle(m,d,()=>new Promise(g=>{u.wait(p=>g(p.join(` 2116`)),()=>g(void 0))})),(s=c.behavior)!=null&&s.deactivateToolAfterCreate&&this.setActiveTool(null,i),(l=this.selection)==null||l.clear()})}registerInteractionForTool(t){var n;
vendor: 4,305 bytes, line 2116
2116(n=this.interactionManager)==null||n.registerMode({id:t.interaction.mode??t.id,scope:"page",exclusive:t.interaction.exclusive,cursor:t.interaction.cursor})}buildCapability(){return{getActiveTool:()=>this.getActiveTool(),setActiveTool:(t,n)=>this.setActiveTool(t,void 0,n),getState:()=>this.getDocumentState(),getPageAnnotations:t=>this.getPageAnnotations(t),getSelectedAnnotation:()=>this.getSelectedAnnotation(),getSelectedAnnotations:()=>this.getSelectedAnnotationsMethod(),getSelectedAnnotationIds:()=>this.getSelectedAnnotationIdsMethod(),getAnnotationById:t=>this.getAnnotationById(t),getAnnotations:t=>this.getAnnotationsMethod(t),selectAnnotation:(t,n)=>this.selectAnnotation(t,n),toggleSelection:(t,n)=>this.toggleSelectionMethod(t,n),addToSelection:(t,n)=>this.addToSelectionMethod(t,n),removeFromSelection:t=>this.removeFromSelectionMethod(t),setSelection:t=>this.setSelectionMethod(t),deselectAnnotation:()=>this.deselectAnnotation(),importAnnotations:t=>this.importAnnotations(t),exportAnnotations:(t,n)=>this.exportAnnotationsMethod(t,n),createAnnotation:(t,n,o)=>this.createAnnotation(t,n,o),updateAnnotation:(t,n,o)=>this.updateAnnotation(t,n,o),updateAnnotations:t=>this.updateAnnotationsMethod(t),moveAnnotation:(t,n,o,i,r)=>this.moveAnnotationMethod(t,n,o,i,r),deleteAnnotation:(t,n)=>this.deleteAnnotation(t,n),deleteAnnotations:(t,n)=>this.deleteAnnotationsMethod(t,n),deleteAllAnnotations:t=>this.deleteAllAnnotationsMethod(t),purgeAnnotation:(t,n,o)=>this.purgeAnnotationMethod(t,n,o),renderAnnotation:t=>this.renderAnnotation(t),getPageAppearances:(t,n,o)=>this.getPageAppearances(t,n,o),invalidatePageAppearances:(t,n)=>this.invalidatePageAppearances(t,n),commit:()=>this.commit(),getAttachedLinks:(t,n)=>this.getAttachedLinksMethod(t,n),hasAttachedLinks:(t,n)=>this.hasAttachedLinksMethod(t,n),deleteAttachedLinks:(t,n)=>this.deleteAttachedLinksMethod(t,n),groupAnnotations:t=>this.groupAnnotationsMethod(t),ungroupAnnotations:(t,n)=>this.ungroupAnnotationsMethod(t,n),getGroupMembers:(t,n)=>this.getGroupMembersMethod(t,n),isInGroup:(t,n)=>this.isInGroupMethod(t,n),setLocked:(t,n)=>this.setLocked(t,n),getLocked:t=>this.getLocked(t),isAnnotationLocked:(t,n)=>this.isAnnotationLocked(t,n),isCategoryLocked:(t,n)=>this.isCategoryLockedMethod(t,n),isToolLocked:(t,n)=>this.isToolLockedMethod(t,n),syncAnnotationObject:(t,n,o)=>this.syncAnnotationObject(t,n,o),navigateTarget:(t,n)=>this.navigateTargetMethod(t,n),forDocument:t=>this.createAnnotationScope(t),getTools:()=>this.state.tools,getTool:t=>this.getTool(t),addTool:t=>{this.dispatch((n=>({type:lg,payload:n}))(t)),this.registerInteractionForTool(t)},findToolForAnnotation:t=>this.findToolForAnnotation(t),setToolDefaults:(t,n)=>this.dispatch(((o,i)=>({type:sg,payload:{toolId:o,patch:i}}))(t,n)),getColorPresets:()=>[...this.state.colorPresets],addColorPreset:t=>this.dispatch((n=>({type:ag,payload:n}))(t)),transformAnnotation:(t,n)=>this.transformAnnotation(t,n),onStateChange:this.state$.onGlobal,onActiveToolChange:this.activeTool$.onGlobal,onAnnotationEvent:this.events$.onGlobal,onToolsChange:this.toolsChange$.on,onNavigate:this.navigate$.onGlobal}}createAnnotationScope(t){return{getState:()=>this.getDocumentState(t),getPageAnnotations:n=>this.getPageAnnotations(n,t),getSelectedAnnotation:()=>this.getSelectedAnnotation(t),getSelectedAnnotations:()=>this.getSelectedAnnotationsMethod(t),getSelectedAnnotationIds:()=>this.getSelectedAnnotationIdsMethod(t),getAnnotationById:n=>this.getAnnotationById(n,t),getAnnotations:n=>this.getAnnotationsMethod(n,t),selectAnnotation:(n,o)=>this.selectAnnotation(n,o,t),toggleSelection:(n,o)=>this.toggleSelectionMethod(n,o,t),addToSelection:(n,o)=>this.addToSelectionMethod(n,o,t),removeFromSelection:n=>this.removeFromSelectionMethod(n,t),setSelection:n=>this.setSelectionMethod(n,t),deselectAnnotation:()=>this.deselectAnnotation(t),getActiveTool:()=>this.getActiveTool(t),setActiveTool:(n,o)=>this.setActiveTool(n,t,o),findToolForAnnotation:n=>this.findToolForAnnotation(n),importAnnotations:n=>this.importAnnotations(n,t),exportAnnotations:n=>this.exportAnnotationsMethod(n,t),createAnnotation:(n,o,i)=>this.createAnnotation(n,o,i,t),updateAnnotation:(n,o,i)=>this.updateAnnotation(n,o,i,t),updateAnnotations:n=>this.updateAnnotationsMethod(n,t),moveAnnotation:(n,o,i,r)=>
2116this.moveAnnotationMethod(n,o,i,r,t),deleteAnnotation:(n,o)=>this.deleteAnnotation(n,o,t),deleteAnnotations:n=>this.deleteAnnotationsMethod(n,t),deleteAllAnnotations:()=>this.deleteAllAnnotationsMethod(t),purgeAnnotation:(n,o)=>this.purgeAnnotationMethod(n,o,t),renderAnnotation:n=>this.renderAnnotation(n,t),getPageAppearances:(n,o)=>this.getPageAppearances(n,o,t),invalidatePageAppearances:n=>this.invalidatePageAppearances(n,t),commit:()=>this.commit(t),getAttachedLinks:n=>this.getAttachedLinksMethod(n,t),hasAttachedLinks:n=>this.hasAttachedLinksMethod(n,t),deleteAttachedLinks:n=>this.deleteAttachedLinksMethod(n,t),groupAnnotations:()=>this.groupAnnotationsMethod(t),ungroupAnnotations:n=>this.ungroupAnnotationsMethod(n,t),getGroupMembers:n=>this.getGroupMembersMethod(n,t),isInGroup:n=>this.isInGroupMethod(n,t),getGroupingAction:()=>this.getGroupingActionMethod(t),setLocked:n=>this.setLocked(n,t),getLocked:()=>this.getLocked(t),isAnnotationLocked:n=>this.isAnnotationLocked(n,t),isCategoryLocked:n=>this.isCategoryLockedMethod(n,t),isToolLocked:n=>this.isToolLockedMethod(n,t),syncAnnotationObject:(n,o)=>this.syncAnnotationObject(n,o,t),navigateTarget:n=>this.navigateTargetMethod(n,t),onStateChange:this.state$.forScope(t),onAnnotationEvent:this.events$.forScope(t),onActiveToolChange:this.activeTool$.forScope(t),onNavigate:this.navigate$.forScope(t)}}onStoreUpdated(t,n){for(const o in n.documents){const i=t.documents[o],r=n.documents[o];i!==r&&(this.state$.emit(o,r),i&&i.activeToolId!==r.activeToolId&&this.activeTool$.emit(o,this.getActiveTool(o)),i?.selectedUids!==r.selectedUids&&this.updateAnnotationSelectionActivity(o,r))}if(t.tools!==n.tools){for(const o in n.documents)this.activeTool$.emit(o,this.getActiveTool(o));this.toolsChange$.emit({tools:n.tools})}}transformAnnotation(t,n){const o={type:n.type,changes:n.changes,metadata:n.metadata},i=this.findToolForAnnotation(t);return i?.transform?i.transform(t,o):o.changes}registerPageHandlers(t,n,o,i){var r,a;const s=this.getCoreDocument(t),l=(r=s?.document)==null?void 0:r.pages[n];if(!l)return()=>{};if(!this.interactionManager)return()=>{};const c=[],d=((l.rotation??0)+(s?.rotation??0))%4;for(const u of this.state.tools){const m=u.pointerHandler??((a=u.defaults)!=null&&a.type?Pg.defaultHandlerFactories.get(u.defaults.type):void 0);if(!m)continue;const g={pageIndex:n,pageSize:l.size,pageRotation:d,scale:o,services:i.services,onPreview:f=>i.onPreview(u.id,f),onCommit:(f,v)=>{var y,b,w;const x=((y=u.behavior)==null?void 0:y.editAfterCreate)??!1;this.createAnnotation(n,f,v,t,{editAfterCreate:x}),(b=u.behavior)!=null&&b.deactivateToolAfterCreate&&this.setActiveTool(null,t),((w=u.behavior)!=null&&w.selectAfterCreate||x)&&this.selectAnnotation(n,f.id,t)},getTool:()=>this.state.tools.find(f=>f.id===u.id),getToolContext:()=>{var f;return(f=this.state.documents[t])==null?void 0:f.activeToolContext}},p=this.interactionManager.registerHandlers({documentId:t,modeId:u.interaction.mode??u.id,handlers:m.create(g),pageIndex:n});c.push(p)}return()=>c.forEach(u=>u())}getDocumentState(t){const n=t??this.getActiveDocumentId(),o=this.state.documents[n];if(!o)throw new Error(`Annotation state not found for document: ${n}`);return o}getAllAnnotations(t,n){this.engine.getAllAnnotations(n).wait(o=>{this.dispatch(((r,a)=>({type:Gp,payload:{documentId:r,annotations:a}}))(t,o)),this.isInitialLoadComplete.set(t,!0);const i=this.importQueue.get(t);i&&i.length>0&&this.processImportQueue(t),this.events$.emit(t,{type:"loaded",documentId:t,total:Object.values(o).reduce((r,a)=>r+a.length,0)})},vt)}getPageAnnotations(t,n){const{pageIndex:o}=t,i=n??this.getActiveDocumentId(),r=this.getCoreDocument(i),a=r?.document;if(!a)return se.reject({code:Z.NotFound,message:"Document not found"});const s=a.pages.find(l=>l.index===o);return s?this.engine.getPageAnnotations(a,s):se.reject({code:Z.NotFound,message:"Page not found"})}getSelectedAnnotation(t){return(n=>n.selectedUids.length>0?n.byUid[n.selectedUids[0]]??null:null)(this.getDocumentState(t))}getAnnotationById(t,n){return((o,i)=>o.byUid[i]??null)(this.getDocumentState(n),t)}getAnnotationsMethod(t,n){const o=this.getDocumentState(n);return t?.pageIndex!==void 0?ns(o,t.pageIndex).filter(i=>i!==void 0):Object.values(o.byUid)}renderAnnotation({pageIndex:t,annotation:n,options:o},i){const r=i??this.getActiveDocumentId(),a=this.getCoreDocument(r),s=a?.document;if(!s)return se.reject({code:Z.NotFound,message:"Document not found"});const l=s.pages.find(c=>c.index===t);return l?this.engine.renderPageAnnotation(s,l,n,o):se.reject({code:Z.NotFound,message:"Page not found"})}getPageAppearances(t,n,o){const i=o??this.getActiveDocumentId(),r=this.getCoreDocument(i),a=r?.document;if(!a)return se.reject({code:Z.NotFound,message:"Document not found"});const s=a.pages.find(m=>m.index===t);if(!s)return se.reject({code:Z.NotFound,message:"Page not found"});let l=this.appearanceCache.get(i);l||(l=new Map,this.appearanceCache.set(i,l));const c=l.get(t);if(c&&!n){const m=new de;return m.resolve(c),m}const d=this.engine.renderPageAnnotations(a,s,n),u=new de;return d.wait(m=>
2116{l.set(t,m),u.resolve(m)},m=>{u.fail(m)}),u}invalidatePageAppearances(t,n){const o=n??this.getActiveDocumentId(),i=this.appearanceCache.get(o);i&&i.delete(t)}invalidateAnnotationAppearance(t,n,o){const i=o??this.getActiveDocumentId(),r=this.appearanceCache.get(i);if(!r)return;const a=r.get(n);a&&delete a[t]}exportAnnotationsMethod(t,n){const o=n??this.getActiveDocumentId(),i=this.getDocumentState(o),r=this.getCoreDocument(o),a=r?.document;if(!a)return se.reject({code:Z.NotFound,message:"Document not found"});const s=t?.pageIndex!==void 0?[t.pageIndex]:Object.keys(i.pages).map(Number),l=[];for(const p of s){const f=i.pages[p]??[];for(const v of f){const y=i.byUid[v];y&&y.commitState!=="deleted"&&l.push({annotation:y.object,pageIndex:p,isStamp:y.object.type===z.STAMP})}}const c=l.filter(p=>p.isStamp);if(c.length===0)return se.resolve(l.map(p=>({annotation:p.annotation})));const d=se.create(),u=new Map;let m=c.length,g=!1;for(const p of c){const f=a.pages.find(v=>v.index===p.pageIndex);if(!f){m--;continue}this.engine.exportAnnotationAppearanceAsPdf(a,f,p.annotation).wait(v=>{g||(u.set(p.annotation.id,v),m--,m===0&&d.resolve(l.map(y=>({annotation:y.annotation,...u.has(y.annotation.id)?{ctx:{data:u.get(y.annotation.id),mimeType:"application/pdf"}}:{}}))))},v=>{g||(g=!0,d.reject(v.reason))})}return m===0&&d.resolve(l.map(p=>({annotation:p.annotation}))),d}importAnnotations(t,n){const o=n??this.getActiveDocumentId();if(!this.isInitialLoadComplete.get(o)){const i=this.importQueue.get(o)||[];return i.push(...t),void this.importQueue.set(o,i)}this.processImportItems(o,t)}processImportQueue(t){const n=this.importQueue.get(t);if(!n||n.length===0)return;const o=[...n];this.importQueue.set(t,[]),this.processImportItems(t,o)}
2116processImportItems(t,n){const o=this.pendingContexts.get(t);if(o){for(const i of n){const{annotation:r,ctx:a}=i,s=r.pageIndex,l=r.id;this.dispatch(nr(t,s,r)),a&&o.set(l,a)}this.config.autoCommit!==!1&&this.commit(t)}}createAnnotation(t,n,o,i,r){const a=i??this.getActiveDocumentId();if(!this.checkPermission(a,j.ModifyAnnotations))return void this.logger.debug("AnnotationPlugin","CreateAnnotation",`Cannot create annotation: document ${a} lacks ModifyAnnotations permission`);const s=n.id,l=this.pendingContexts.get(a);if(!l)return;const c={...n,author:n.author??this.config.annotationAuthor},d=r?.editAfterCreate,u=()=>{this.dispatch(nr(a,t,c)),o&&l.set(s,o),this.events$.emit(a,{type:"create",documentId:a,annotation:c,pageIndex:t,ctx:o,committed:!1,editAfterCreate:d})};if(!this.history)return u(),void(this.config.autoCommit&&this.commit(a));const m={execute:u,undo:()=>{l.delete(s),this.dispatch(ka(a)),this.dispatch(Ma(a,t,s)),this.events$.emit(a,{type:"delete",documentId:a,annotation:c,pageIndex:t,committed:!1})},metadata:{annotationIds:[s]}};this.history.forDocument(a).register(m,this.ANNOTATION_HISTORY_TOPIC)}buildPatch(t,n){return"rect"in n?n:this.transformAnnotation(t,{type:"property-update",changes:n})}updateAnnotation(t,n,o,i){const r=i??this.getActiveDocumentId();if(!this.checkPermission(r,j.ModifyAnnotations))return void this.logger.debug("AnnotationPlugin","UpdateAnnotation",`Cannot update annotation: document ${r} lacks ModifyAnnotations permission`);const a=this.getDocumentState(r).byUid[n].object,s=this.buildPatch(a,{...o,author:o.author??this.config.annotationAuthor}),l=()=>{this.dispatch(or(r,t,n,s)),this.events$.emit(r,{type:"update",documentId:r,annotation:a,pageIndex:t,patch:s,committed:!1})};if(!this.history)return l(),void(this.config.autoCommit!==!1&&this.commit(r));const c=Object.fromEntries(Object.keys(o).map(u=>[u,a[u]])),d={execute:l,undo:()=>{this.dispatch(or(r,t,n,c)),this.events$.emit(r,{type:"update",documentId:r,annotation:a,pageIndex:t,patch:c,committed:!1})},metadata:{annotationIds:[n]}};this.history.forDocument(r).register(d,this.ANNOTATION_HISTORY_TOPIC)}deleteAnnotation(t,n,o){var i;const r=o??this.getActiveDocumentId();if(!this.checkPermission(r,j.ModifyAnnotations))return void this.logger.debug("AnnotationPlugin","DeleteAnnotation",`Cannot delete annotation: document ${r} lacks ModifyAnnotations permission`);const a=this.getDocumentState(r),s=(i=a.byUid[n])==null?void 0:i.object;if(!s)return;const l=((m,g)=>{const p=[];for(const f of Object.values(m.pages))for(const v of f){const y=m.byUid[v];y&&"inReplyToId"in y.object&&y.object.inReplyToId===g&&p.push({id:y.object.id,pageIndex:y.object.pageIndex})}return p})(a,n),c=l.map(m=>{var g;return(g=a.byUid[m.id])==null?void 0:g.object}).filter(m=>m!==void 0),d=()=>{var m;for(const g of l){const p=(m=a.byUid[g.id])==null?void 0:m.object;p&&(this.dispatch(Ma(r,g.pageIndex,g.id)),this.events$.emit(r,{type:"delete",documentId:r,annotation:p,pageIndex:g.pageIndex,committed:!1}))}this.dispatch(ka(r)),this.dispatch(Ma(r,t,n)),this.events$.emit(r,{type:"delete",documentId:r,annotation:s,pageIndex:t,committed:!1})};if(!this.history)return d(),void(this.config.autoCommit!==!1&&this.commit(r));const u={execute:d,undo:()=>{this.dispatch(nr(r,t,s)),this.events$.emit(r,{type:"create",documentId:r,annotation:s,pageIndex:t,committed:!1});for(const m of c)this.dispatch(nr(r,m.pageIndex,m)),this.events$.emit(r,{type:"create",documentId:r,annotation:m,pageIndex:m.pageIndex,committed:!1})},metadata:{annotationIds:[n,...l.map(m=>m.id)]}};this.history.forDocument(r).register(u,this.ANNOTATION_HISTORY_TOPIC)}deleteAnnotationsMethod(t,n){for(const{pageIndex:o,id:i}of t)this.deleteAnnotation(o,i,n)}deleteAllAnnotationsMethod(t){const n=t??this.getActiveDocumentId(),o=this.getDocumentState(n),i=[];for(const[r,a]of Object.entries(o.pages))for(const s of a){const l=o.byUid[s];l&&i.push({pageIndex:Number(r),id:l.object.id})}i.length>0&&this.deleteAnnotationsMethod(i,n)}purgeAnnotationMethod(t,n,o){const i=o??this.getActiveDocumentId();this.dispatch(Aa(i,t,n))}selectAnnotation(t,n,o){const i=o??this.getActiveDocumentId(),r=this.getAnnotationById(n,i);if(!r||!this.isAnnotationLocked(r.object,i))if(this.isInGroupMethod(n,i)){const a=this.getGroupMembersMethod(n,i).map(s=>s.object.id);this.dispatch(Sa(i,a))}else this.dispatch(((a,s,l)=>({type:qp,payload:{documentId:a,pageIndex:s,id:l}}))(i,t,n))}deselectAnnotation(t){const n=t??this.getActiveDocumentId();this.dispatch(ka(n))}updateAnnotationSelectionActivity(t,n){var o,i;if(n.selectedUids.length===0)return void((o=this.interactionManager)==null||o.releasePageActivity(t,"annotation-selection"));const r=n.selectedUids[0],a=n.byUid[r];a&&((i=this.interactionManager)==null||i.claimPageActivity(t,"annotation-selection",a.object.pageIndex))}getSelectedAnnotationsMethod(t){return Ci(this.getDocumentState(t))}getSelectedAnnotationIdsMethod(t){return os(this.getDocumentState(t))}toggleSelectionMethod(t,n,o){const i=o??this.getActiveDocumentId(),r=this.getAnnotationById(n,i);if(r&&this.isAnnotationLocked(r.object,i))return;const a=this.getDocumentState(i);if(a.selectedUids.includes(n))this.dispatch(Xc(i,n));else if(this.isInGroupMethod(n,i)){const s=this.getGroupMembersMethod(n,i);for(const l of s)a.selectedUids.includes(l.object.id)||this.dispatch(Ia(i,l.object.pageIndex,l.object.id))}else this.dispatch(Ia(i,t,n))}addToSelectionMethod(t,n,o){const i=o??this.getActiveDocumentId(),r=this.getAnnotationById(n,i);r&&this.isAnnotationLocked(r.object,i)||this.dispatch(Ia(i,t,n))}removeFromSelectionMethod(t,n){const o=n??this.getActiveDocumentId();this.dispatch(Xc(o,t))}setSelectionMethod(t,n){const o=n??this.getActiveDocumentId(),i=this.getDocumentState(
vendor: 9,117 bytes, line 2116
2116o),r=t.filter(a=>{const s=i.byUid[a];return!s||!this.isAnnotationLocked(s.object,o)});this.dispatch(Sa(o,r))}getAttachedLinksMethod(t,n){return d4(this.getDocumentState(n),t)}hasAttachedLinksMethod(t,n){return this.getAttachedLinksMethod(t,n).length>0}deleteAttachedLinksMethod(t,n){const o=this.getAttachedLinksMethod(t,n);for(const i of o)this.deleteAnnotation(i.object.pageIndex,i.object.id,n)}groupAnnotationsMethod(t){const n=t??this.getActiveDocumentId();if(!this.checkPermission(n,j.ModifyAnnotations))return void this.logger.debug("AnnotationPlugin","GroupAnnotations",`Cannot group annotations: document ${n} lacks ModifyAnnotations permission`);const o=this.getSelectedAnnotationsMethod(n);if(o.length<2)return void this.logger.debug("AnnotationPlugin","GroupAnnotations","Need at least 2 annotations to group");const i=o[0],r=o.slice(1).map(a=>({pageIndex:a.object.pageIndex,id:a.object.id,patch:{inReplyToId:i.object.id,replyType:ln.Group}}));this.updateAnnotationsMethod(r,n)}ungroupAnnotationsMethod(t,n){const o=n??this.getActiveDocumentId();if(!this.checkPermission(o,j.ModifyAnnotations))return void this.logger.debug("AnnotationPlugin","UngroupAnnotations",`Cannot ungroup annotations: document ${o} lacks ModifyAnnotations permission`);const i=this.getGroupMembersMethod(t,o).filter(r=>r.object.inReplyToId&&r.object.replyType===ln.Group).map(r=>({pageIndex:r.object.pageIndex,id:r.object.id,patch:{inReplyToId:void 0,replyType:void 0}}));i.length>0&&this.updateAnnotationsMethod(i,o)}getGroupMembersMethod(t,n){return Jc(this.getDocumentState(n),t)}isInGroupMethod(t,n){return ed(this.getDocumentState(n),t)}getGroupingActionMethod(t){return(n=>{const o=Ci(n);if(o.length===0)return"disabled";const i=o[0].object.id;if(ed(n,i)){const r=Jc(n,i),a=new Set(r.map(s=>s.object.id));if(o.every(s=>a.has(s.object.id)))return"ungroup"}return o.length>=2?"group":"disabled"})(this.getDocumentState(t))}computeCombinedConstraints(t){let n=1/0,o=1/0,i=1/0,r=1/0;for(const a of t){const s=a.rect.origin.y,l=a.pageSize.height-(a.rect.origin.y+a.rect.size.height),c=a.rect.origin.x,d=a.pageSize.width-(a.rect.origin.x+a.rect.size.width);n=Math.min(n,s),o=Math.min(o,l),i=Math.min(i,c),r=Math.min(r,d)}return isFinite(n)||(n=0),isFinite(o)||(o=0),isFinite(i)||(i=0),isFinite(r)||(r=0),{maxUp:n,maxDown:o,maxLeft:i,maxRight:r}}clampDelta(t,n){return{x:Math.max(-n.maxLeft,Math.min(n.maxRight,t.x)),y:Math.max(-n.maxUp,Math.min(n.maxDown,t.y))}}startDrag(t,n){const{annotationIds:o,pageSize:i}=n,r=[];for(const d of o){const u=this.getAttachedLinksMethod(d,t);for(const m of u)r.includes(m.object.id)||r.push(m.object.id)}const a=[...o,...r],s=new Map,l=[];for(const d of a){const u=this.getAnnotationById(d,t);u&&(s.set(d,{...u.object.rect}),l.push({id:d,rect:u.object.rect,pageIndex:u.object.pageIndex,pageSize:i}))}const c={documentId:t,isDragging:!0,primaryIds:o,attachedLinkIds:r,allParticipantIds:a,originalRects:s,delta:{x:0,y:0},combinedConstraints:this.computeCombinedConstraints(l)};this.unifiedDragStates.set(t,c),this.unifiedDrag$.emit({documentId:t,type:"start",state:c,previewPatches:{}})}computeDragPreviewPatches(t,n){const o={};for(const i of t.allParticipantIds){const r=this.getAnnotationById(i,n);if(!r)continue;const a=t.originalRects.get(i);if(!a)continue;const s={...a,origin:{x:a.origin.x+t.delta.x,y:a.origin.y+t.delta.y}};o[i]=this.transformAnnotation(r.object,{type:"move",changes:{rect:s}})}return o}updateDrag(t,n){const o=this.unifiedDragStates.get(t);if(!o?.isDragging)return{x:0,y:0};const i=this.clampDelta(n,o.combinedConstraints),r={...o,delta:i};this.unifiedDragStates.set(t,r);const a=this.computeDragPreviewPatches(r,t);return this.unifiedDrag$.emit({documentId:t,type:"update",state:r,previewPatches:a}),i}commitDrag(t){const n=this.unifiedDragStates.get(t);if(!n)return;const o=n.delta;if(o.x!==0||o.y!==0){const r=[];for(const a of n.allParticipantIds){const s=this.getAnnotationById(a,t);if(!s)continue;const l=n.originalRects.get(a)??s.object.rect,c={...l,origin:{x:l.origin.x+o.x,y:l.origin.y+o.y}},d=this.transformAnnotation(s.object,{type:"move",changes:{rect:c}});r.push({pageIndex:s.object.pageIndex,id:a,patch:d})}r.length>0&&this.moveAnnotationsMethod(r,t)}const i=this.computeDragPreviewPatches(n,t);this.unifiedDrag$.emit({documentId:t,type:"end",state:{...n,isDragging:!1},previewPatches:i}),this.unifiedDragStates.delete(t)}cancelDrag(t){const n=this.unifiedDragStates.get(t);n&&(this.unifiedDrag$.emit({documentId:t,type:"cancel",state:{...n,isDragging:!1,delta:{x:0,y:0}},previewPatches:{}}),this.unifiedDragStates.delete(t))}getDragState(t){return this.unifiedDragStates.get(t)??null}get onDragChange(){return this.unifiedDrag$.on}computeUnifiedGroupBoundingBox(t){if(t.length===0)return{origin:{x:0,y:0},size:{width:0,height:0}};let n=1/0,o=1/0,i=-1/0,r=-1/0;for(const a of t)n=Math.min(n,a.origin.x),o=Math.min(o,a.origin.y),i=Math.max(i,a.origin.x+a.size.width),r=Math.max(r,a.origin.y+a.size.height);return{origin:{x:n,y:o},size:{width:i-n,height:r-o}}}computeUnifiedRelativePositions(t,n){return t.map(o=>({id:o.id,originalRect:o.rect,originalUnrotatedRect:o.unrotatedRect,pageIndex:o.pageIndex,isAttachedLink:o.isAttachedLink,parentId:o.parentId,relativeX:n.size.width>0?(o.rect.origin.x-n.origin.x)/n.size.width:0,relativeY:n.size.height>0?(o.rect.origin.y-n.origin.y)/n.size.height:0,relativeWidth:n.size.width>0?o.rect.size.width/n.size.width:1,relativeHeight:n.size.height>0?o.rect.size.height/n.size.height:1}))}computeUnifiedResizedRects(t,n,o=10){const i=new Map;for(const r of t){const a=Math.max(o,r.relativeWidth*n.size.width),s=Math.max(o,r.relativeHeight*n.size.height);i.set(r.id,{origin:{x:n.origin.x+r.relativeX*n.size.width,y:n.origin.y+r.relativeY*n.size.height},size:{width:a,height:s}})}return i}computeResizePreviewPatches(t,n){const o={},i=this.unifiedResizeStates.get(n),r=i?new Map(i.participatingAnnotations.map(a=>[a.id,a])):void 0;for(const[a,s]of t){const l=this.getAnnotationById(a,n);if(!l)continue;let c=s;const d=r?.get(a);i?.isGroupResize&&d?.originalUnrotatedRect&&(c=id(s,d.originalRect,d.originalUnrotatedRect,l.object.rotation??0)),o[a]=this.transformAnnotation(l.object,{type:"resize",changes:{rect:c}})}return o}startResize(t,n){const{annotationIds:o,pageSize:i,resizeHandle:r}=n,a=[],s=[];for(const f of o){const v=this.getAnnotationById(f,t);if(v){s.push({id:f,rect:v.object.rect,unrotatedRect:v.object.unrotatedRect?this.cloneRect(v.object.unrotatedRect):void 0,pageIndex:v.object.pageIndex,isAttachedLink:!1});const y=this.getAttachedLinksMethod(f,t);for(const b of y)a.includes(b.object.id)||(a.push(b.object.id),s.push({id:b.object.id,rect:b.object.rect,unrotatedRect:b.object.unrotatedRect?this.cloneRect(b.object.unrotatedRect):void 0,pageIndex:b.object.pageIndex,isAttachedLink:!0,parentId:f}))}}const l=[...o,...a],c=s.map(f=>f.rect),d=this.computeUnifiedGroupBoundingBox(c),u=this.computeUnifiedRelativePositions(s,d),m=this.computeUnifiedResizedRects(u,d),g={documentId:t,isResizing:!0,isGroupResize:o.length>1,primaryIds:o,attachedLinkIds:a,allParticipantIds:l,originalGroupBox:d,currentGroupBox:d,participatingAnnotations:u,resizeHandle:r,computedRects:m};this.unifiedResizeStates.set(t,g);const p=this.computeResizePreviewPatches(m,t);this.unifiedResize$.emit({documentId:t,type:"start",state:g,computedRects:Object.fromEntries(m),previewPatches:p})}updateResize(t,n){const o=this.unifiedResizeStates.get(t);if(!o?.isResizing)return{};const i=this.computeUnifiedResizedRects(o.participatingAnnotations,n),r={...o,currentGroupBox:n,computedRects:i};this.unifiedResizeStates.set(t,r);const a=Object.fromEntries(i),s=this.computeResizePreviewPatches(i,t);return this.unifiedResize$.emit({documentId:t,type:"update",state:r,computedRects:a,previewPatches:s}),a}commitResize(t){const n=this.unifiedResizeStates.get(t);if(!n)return;const o=this.computeUnifiedResizedRects(n.participatingAnnotations,n.currentGroupBox),i=[],r=new Map(n.participatingAnnotations.map(s=>[s.id,s]));for(const[s,l]of o){const c=this.getAnnotationById(s,t);if(!c)continue;let d=l;const u=r.get(s);n.isGroupResize&&u?.originalUnrotatedRect&&(d=id(l,u.originalRect,u.originalUnrotatedRect,c.object.rotation??0));const m=this.transformAnnotation(c.object,{type:"resize",changes:{rect:d}});i.push({pageIndex:c.object.pageIndex,id:s,patch:m})}i.length>0&&this.updateAnnotationsMethod(i,t);const a=this.computeResizePreviewPatches(o,t);this.unifiedResize$.emit({documentId:t,type:"end",state:{...n,isResizing:!1},computedRects:Object.fromEntries(o),previewPatches:a}),this.unifiedResizeStates.delete(t)}cancelResize(t){const n=this.unifiedResizeStates.get(t);if(!n)return;const o=this.computeUnifiedResizedRects(n.participatingAnnotations,n.originalGroupBox);this.unifiedResize$.emit({documentId:t,type:"cancel",state:{...n,isResizing:!1,currentGroupBox:n.originalGroupBox},computedRects:Object.fromEntries(o),previewPatches:{}}),this.unifiedResizeStates.delete(t)}getResizeState(t){return this.unifiedResizeStates.get(t)??null}get onResizeChange(){return this.unifiedResize$.on}cloneRect(t){return{origin:{x:t.origin.x,y:t.origin.y}
2116,size:{width:t.size.width,height:t.size.height}}}translateRect(t,n){return{origin:{x:t.origin.x+n.x,y:t.origin.y+n.y},size:{...t.size}}}normalizeAngle(t){const n=t%360;return n<0?n+360:n}normalizeDelta(t){return(t+540)%360-180}buildRotationParticipants(t,n){const o=[],i=[];for(const r of t){const a=this.getAnnotationById(r,n);if(!a)continue;o.push({id:r,rect:this.cloneRect(a.object.rect),pageIndex:a.object.pageIndex,rotation:a.object.rotation??0,unrotatedRect:a.object.unrotatedRect?this.cloneRect(a.object.unrotatedRect):void 0,isAttachedLink:!1});const s=this.getAttachedLinksMethod(r,n);for(const l of s)i.includes(l.object.id)||(i.push(l.object.id),o.push({id:l.object.id,rect:this.cloneRect(l.object.rect),pageIndex:l.object.pageIndex,rotation:l.object.rotation??0,unrotatedRect:l.object.unrotatedRect?this.cloneRect(l.object.unrotatedRect):void 0,isAttachedLink:!0,parentId:r}))}return{participants:o,attachedLinkIds:i}}computeRotatePreviewPatches(t,n){const o={};for(const i of t.participants){const r=this.getAnnotationById(i.id,n);if(!r)continue;const a=Qn({rect:i.rect,unrotatedRect:i.unrotatedRect,rotation:i.rotation}),s=xo(a,t.rotationCenter,t.delta),l={x:s.x-a.x,y:s.y-a.y},c=this.normalizeAngle(i.rotation+t.delta),d=this.transformAnnotation(r.object,{type:"rotate",changes:{rotation:c,unrotatedRect:this.translateRect(i.unrotatedRect??i.rect,l)},metadata:{rotationAngle:c,rotationDelta:t.delta,rotationCenter:t.rotationCenter}});d.rect||l.x===0&&l.y===0||(d.rect={origin:{x:r.object.rect.origin.x+l.x,y:r.object.rect.origin.y+l.y},size:{...r.object.rect.size}}),o[i.id]=d}return o}startRotation(t,n){const{annotationIds:o,cursorAngle:i,rotationCenter:r}=n,{participants:a,attachedLinkIds:s}=this.buildRotationParticipants(o,t);if(a.length===0)return;const l=a.map(g=>g.rect),c=this.computeUnifiedGroupBoundingBox(l),d=r??{x:c.origin.x+c.size.width/2,y:c.origin.y+c.size.height/2},u={documentId:t,isRotating:!0,primaryIds:o,attachedLinkIds:s,allParticipantIds:a.map(g=>g.id),rotationCenter:d,cursorStartAngle:i,currentAngle:i,delta:0,participants:a};this.unifiedRotateStates.set(t,u);const m=this.computeRotatePreviewPatches(u,t);this.unifiedRotate$.emit({documentId:t,type:"start",state:u,previewPatches:m})}updateRotation(t,n,o){const i=this.unifiedRotateStates.get(t);if(!i?.isRotating)return;const r=o!==void 0?o:this.normalizeDelta(n-i.cursorStartAngle),a={...i,currentAngle:n,delta:r};this.unifiedRotateStates.set(t,a);const s=this.computeRotatePreviewPatches(a,t);this.unifiedRotate$.emit({documentId:t,type:"update",state:a,previewPatches:s})}commitRotation(t){const n=this.unifiedRotateStates.get(t);if(!n)return;const o=this.computeRotatePreviewPatches(n,t),i=[];for(const[r,a]of Object.entries(o)){const s=this.getAnnotationById(r,t);s&&i.push({pageIndex:s.object.pageIndex,id:r,patch:a})}i.length>0&&this.updateAnnotationsMethod(i,t),this.unifiedRotate$.emit({documentId:t,type:"end",state:{...n,isRotating:!1},previewPatches:o}),this.unifiedRotateStates.delete(t)}cancelRotation(t){const n=this.unifiedRotateStates.get(t);n&&(this.unifiedRotate$.emit({documentId:t,type:"cancel",state:{...n,isRotating:!1,delta:0,currentAngle:n.cursorStartAngle},previewPatches:{}}),this.unifiedRotateStates.delete(t))}getRotateState(t){return this.unifiedRotateStates.get(t)??null}get onRotateChange(){return this.unifiedRotate$.on}updateAnnotationsMethod(t,n){const o=n??this.getActiveDocumentId();if(!this.checkPermission(o,j.ModifyAnnotations))return void this.logger.debug("AnnotationPlugin","UpdateAnnotations",`Cannot update annotations: document ${o} lacks ModifyAnnotations permission`);const i=this.getDocumentState(o),r=t.map(({pageIndex:c,id:d,patch:u})=>{var m;const g=(m=i.byUid[d])==null?void 0:m.object;return g?{pageIndex:c,id:d,patch:this.buildPatch(g,{...u,author:u.author??this.config.annotationAuthor}),originalObject:g}:null}).filter(c=>c!==null);if(r.length===0)return;const a=()=>{for(const{pageIndex:c,id:d,patch:u,originalObject:m}of r)this.dispatch(or(o,c,d,u)),this.events$.emit(o,{type:"update",documentId:o,annotation:m,pageIndex:c,patch:u,committed:!1})};if(!this.history)return a(),void(this.config.autoCommit!==!1&&this.commit(o));const s=r.map(({pageIndex:c,id:d,patch:u,originalObject:m})=>({pageIndex:c,id:d,originalPatch:Object.fromEntries(Object.keys(u).map(g=>[g,m[g]])),originalObject:m})),l={execute:a,undo:()=>{for(const{pageIndex:c,id:d,originalPatch:u,originalObject:m}of s)this.dispatch(or(o,c,d,u)),this.events$.emit(o,{type:"update",documentId:o,annotation:m,pageIndex:c,patch:u,committed:!1})},metadata:{annotationIds:r.map(c=>c.id)}};this.history.forDocument(o).register(l,this.ANNOTATION_HISTORY_TOPIC)}moveAnnotationsMethod(t,n){const o=n??this.getActiveDocumentId();if(!this.checkPermission(o,j.ModifyAnnotations))return void this.logger.debug("AnnotationPlugin","MoveAnnotations",`Cannot move annotations: document ${o} lacks ModifyAnnotations permission`);
2116const i=this.getDocumentState(o),r=t.map(({pageIndex:c,id:d,patch:u})=>{var m;const g=(m=i.byUid[d])==null?void 0:m.object;return g?{pageIndex:c,id:d,patch:u,originalObject:g}:null}).filter(c=>c!==null);if(r.length===0)return;const a=()=>{for(const{pageIndex:c,id:d,patch:u,originalObject:m}of r)this.dispatch(Qc(o,c,d,u)),this.events$.emit(o,{type:"update",documentId:o,annotation:m,pageIndex:c,patch:u,committed:!1})};if(!this.history)return a(),void(this.config.autoCommit!==!1&&this.commit(o));const s=r.map(({pageIndex:c,id:d,patch:u,originalObject:m})=>({pageIndex:c,id:d,originalPatch:Object.fromEntries(Object.keys(u).map(g=>[g,m[g]])),originalObject:m})),l={execute:a,undo:()=>{for(const{pageIndex:c,id:d,originalPatch:u,originalObject:m}of s)this.dispatch(Qc(o,c,d,u)),this.events$.emit(o,{type:"update",documentId:o,annotation:m,pageIndex:c,patch:u,committed:!1})},metadata:{annotationIds:r.map(c=>c.id)}};this.history.forDocument(o).register(l,this.ANNOTATION_HISTORY_TOPIC)}moveAnnotationMethod(t,n,o,i="delta",r){const a=r??this.getActiveDocumentId(),s=this.getAnnotationById(n,a);if(!s)return;const l=s.object.rect,c={...l,origin:i==="absolute"?{x:o.x,y:o.y}:{x:l.origin.x+o.x,y:l.origin.y+o.y}},d=this.transformAnnotation(s.object,{type:"move",changes:{rect:c}});this.moveAnnotationsMethod([{pageIndex:t,id:n,patch:d}],a)}getActiveTool(t){const n=this.getDocumentState(t);return n.activeToolId?this.state.tools.find(o=>o.id===n.activeToolId)??null:null}setActiveTool(t,n,o){var i,r;const a=n??this.getActiveDocumentId();if(t!==null&&!this.checkPermission(a,j.ModifyAnnotations))return void this.logger.debug("AnnotationPlugin","SetActiveTool",`Cannot activate tool: document ${a} lacks ModifyAnnotations permission`);const s=this.getDocumentState(a);if(t===s.activeToolId&&!o)return;this.dispatch(Yc(a,t,o));const l=this.state.tools.find(c=>c.id===t);l?(i=this.interactionManager)==null||i.forDocument(a).activate(l.interaction.mode??l.id):(r=this.interactionManager)==null||r.forDocument(a).activateDefaultMode()}getTool(t){return this.state.tools.find(n=>n.id===t)}findToolForAnnotation(t){let n=null,o=0;for(const i of this.state.tools){const r=i.matchScore(t);r>o&&(o=r,n=i)}return n}setLocked(t,n){const o=n??this.getActiveDocumentId();this.dispatch(((a,s)=>({type:ig,payload:{documentId:a,mode:s}}))(o,t));const i=this.getDocumentState(o),r=i.selectedUids.filter(a=>{const s=i.byUid[a];return!!s&&this.isAnnotationLocked(s.object,o)});if(r.length>0){const a=i.selectedUids.filter(s=>!r.includes(s));this.dispatch(Sa(o,a))}}getLocked(t){return this.getDocumentState(t).locked}isAnnotationLocked(t,n){return dg(t)?!0:fr(ts(this.findToolForAnnotation(t)),this.getLocked(n))}isCategoryLockedMethod(t,n){return fr([t],this.getLocked(n))}isToolLockedMethod(t,n){const o=this.getTool(t);return o?fr(ts(o),this.getLocked(n)):!1}syncAnnotationObject(t,n,o){const i=o??this.getActiveDocumentId();this.dispatch(((r,a,s)=>({type:rg,payload:{documentId:r,id:a,patch:s}}))(i,t,n))}navigateTargetMethod(t,n){var o;const i=n??this.getActiveDocumentId(),r=l=>(this.navigate$.emit(i,{documentId:i,result:l,target:t}),se.resolve(l));let a;if(t.type==="destination")a=t.destination;else if(t.type==="action"){const l=t.action;if(l.type!==Kn.Goto&&l.type!==Kn.RemoteGoto)return l.type===Kn.URI?r({outcome:"uri",uri:l.uri}):r({outcome:"unsupported"});a=l.destination}if(!a)return r({outcome:"unsupported"});if(!this.scroll)return r({outcome:"destination",destination:a});const s=this.scroll.forDocument(i);if(a.zoom.mode===Gr.XYZ){const l=this.getCoreDocument(i),c=(o=l?.document)==null?void 0:o.pages.find(d=>d.index===a.pageIndex);s.scrollToPage({pageNumber:a.pageIndex+1,pageCoordinates:c&&a.zoom.params?{x:a.zoom.params.x,y:c.size.height-a.zoom.params.y}:void 0,behavior:"smooth"})}else s.scrollToPage({pageNumber:a.pageIndex+1,behavior:"smooth"});return r({outcome:"navigated"})}collectPendingChanges(t,n){const o=this.getDocumentState(t),i=this.pendingContexts.get(t),r={creations:[],updates:[],deletions:[],committedUids:[],isEmpty:!0};for(const[a,s]of Object.entries(o.byUid)){if(s.commitState==="synced")continue;if(n.pages.find(c=>c.index===s.object.pageIndex))switch(r.committedUids.push(a),r.isEmpty=!1,s.commitState){case"new":r.creations.push({uid:a,ta:s,ctx:i?.get(s.object.id)});break;case"moved":r.updates.push({uid:a,ta:s,moved:!0});break;case"dirty":r.updates.push({uid:a,ta:s});break;case"deleted":r.deletions.push({uid:a,ta:s})}}return r}executeCommitBatch(t,n,o){const i=new de,r=this.pendingContexts.get(t),a=[];for(const{uid:l,ta:c,ctx:d}of o.creations){const u=n.pages.find(g=>g.index===c.object.pageIndex);if(!u)continue;const m=this.engine.createPageAnnotation(n,u,c.object,d);a.push({type:"create",task:m,ta:c,uid:l,ctx:d})}for(const{uid:l,ta:c,moved:d}of o.updates){const u=n.pages.find(g=>g.index===c.object.pageIndex);if(!u)continue;const m=d?this.engine.updatePageAnnotation(n,u,c.object,{regenerateAppearance:!1}):this.engine.updatePageAnnotation(n,u,c.object);a.push({type:"update",task:m,ta:c,uid:l,moved:d})}for(const{uid:l,ta:c}of o.deletions){const d=n.pages.find(u=>u.index===c.object.pageIndex);if(d)if(c.object.id){const u=new de;this.engine.removePageAnnotation(n,d,c.object).wait(()=>u.resolve(!0),u.fail),a.push({type:"delete",task:u,ta:c,uid:l})}else this.dispatch(Aa(t,c.object.pageIndex,l))}
vendor: 6,254 bytes, line 2116
2116const s=a.map(l=>l.task);return de.allSettled(s).wait(()=>{this.emitCommitEvents(t,a,r);for(const d of a)d.type==="update"&&d.moved||d.type!=="create"&&d.type!=="update"&&d.type!=="delete"||this.invalidateAnnotationAppearance(d.ta.object.id,d.ta.object.pageIndex,t);var l,c;this.dispatch((l=t,c=o.committedUids,{type:ng,payload:{documentId:l,committedUids:c}})),i.resolve(!0)},l=>i.fail(l)),i}emitCommitEvents(t,n,o){for(const i of n)if(i.task.state.stage===Gn.Resolved)switch(i.type){case"create":this.events$.emit(t,{type:"create",documentId:t,annotation:i.ta.object,pageIndex:i.ta.object.pageIndex,ctx:i.ctx,committed:!0}),o?.delete(i.ta.object.id);break;case"update":this.events$.emit(t,{type:"update",documentId:t,annotation:i.ta.object,pageIndex:i.ta.object.pageIndex,patch:i.ta.object,committed:!0});break;case"delete":this.dispatch(Aa(t,i.ta.object.pageIndex,i.uid)),this.events$.emit(t,{type:"delete",documentId:t,annotation:i.ta.object,pageIndex:i.ta.object.pageIndex,committed:!0})}}acquireCommitLock(t){return!this.commitInProgress.get(t)&&(this.commitInProgress.set(t,!0),!0)}releaseCommitLock(t){this.commitInProgress.set(t,!1)}commit(t){const n=t??this.getActiveDocumentId();if(!this.getDocumentState(n).hasPendingChanges||!this.acquireCommitLock(n))return se.resolve(!0);const o=this.getCoreDocument(n),i=o?.document;if(!i)return this.releaseCommitLock(n),se.reject({code:Z.NotFound,message:"Document not found"});const r=this.collectPendingChanges(n,i);if(r.isEmpty)return this.releaseCommitLock(n),se.resolve(!0);const a=new de;return this.executeCommitBatch(n,i,r).wait(()=>{this.releaseCommitLock(n),this.getDocumentState(n).hasPendingChanges?this.commit(n).wait(s=>a.resolve(s),s=>a.fail(s)):a.resolve(!0)},s=>{this.releaseCommitLock(n),a.fail(s)}),a}};ls.id="annotation",ls.defaultHandlerFactories=new Map([[z.CIRCLE,Ig],[z.SQUARE,Cg],[z.STAMP,kg],[z.POLYGON,xg],[z.POLYLINE,fg],[z.LINE,as],[z.INK,is],[z.FREETEXT,gg],[z.TEXT,pg],[z.LINK,Sg]]);let al=ls;function Xt(e,t,n){return e===void 0?n:typeof e=="function"?e(t):e}function ra(e){return t=>t?.id===e}const N4=ra("highlight"),$4=ra("squiggly"),F4=ra("underline"),j4=ra("strikeout"),B4={manifest:s4,create:(e,t)=>new al(J,e,t),reducer:(e,t)=>{switch(t.type){case Up:{const{documentId:n,state:o}=t.payload;return{...e,documents:{...e.documents,[n]:o},activeDocumentId:e.activeDocumentId??n}}case Wp:{const n=t.payload,{[n]:o,...i}=e.documents;return{...e,documents:i,activeDocumentId:e.activeDocumentId===n?null:e.activeDocumentId}}case"ANNOTATION/SET_ACTIVE_DOCUMENT":return{...e,activeDocumentId:t.payload};case Gp:{const{documentId:n,annotations:o}=t.payload,i=e.documents[n];if(!i)return e;const r={},a={};for(const[s,l]of Object.entries(o)){const c=Number(s),d=i.pages[c]||[];for(const m of d)delete a[m];const u=l.map(m=>{const g=m.id;return a[g]={commitState:"synced",object:m},g});r[c]=u}return{...e,documents:{...e.documents,[n]:{...i,pages:r,byUid:a}}}}case qp:{const{documentId:n,id:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,selectedUids:[o],selectedUid:o}}}:e}case Vp:{const{documentId:n}=t.payload,o=e.documents[n];return o?{...e,documents:{...e.documents,[n]:{...o,selectedUids:[],selectedUid:null}}}:e}case Kp:{const{documentId:n,id:o}=t.payload,i=e.documents[n];if(!i||i.selectedUids.includes(o))return e;const r=[...i.selectedUids,o];return{...e,documents:{...e.documents,[n]:{...i,selectedUids:r,selectedUid:Da(r)}}}}case Zp:{const{documentId:n,id:o}=t.payload,i=e.documents[n];if(!i)return e;const r=i.selectedUids.filter(a=>a!==o);return{...e,documents:{...e.documents,[n]:{...i,selectedUids:r,selectedUid:Da(r)}}}}case Xp:{const{documentId:n,ids:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,selectedUids:o,selectedUid:Da(o)}}}:e}case Yp:{const{documentId:n,toolId:o,context:i}=t.payload,r=e.documents[n];return r?{...e,documents:{...e.documents,[n]:{...r,activeToolId:o,activeToolContext:i}}}:e}case Qp:{const{documentId:n,pageIndex:o,annotation:i}=t.payload,r=e.documents[n];if(!r)return e;const a=i.id;return{...e,documents:{...e.documents,[n]:{...r,pages:{...r.pages,[o]:[...r.pages[o]??[],a]},byUid:{...r.byUid,[a]:{commitState:"new",object:i,dictMode:!0}},hasPendingChanges:!0}}}}case tg:{const{documentId:n,pageIndex:o,id:i}=t.payload,r=e.documents[n];return r&&r.byUid[i]?{...e,documents:{...e.documents,[n]:{...r,pages:{...r.pages,[o]:(r.pages[o]??[]).filter(a=>a!==i)},byUid:{...r.byUid,[i]:{...r.byUid[i],commitState:"deleted"}},hasPendingChanges:!0}}}:e}case Jp:{const{documentId:n,id:o,patch:i}=t.payload,r=e.documents[n];return r?{...e,documents:{...e.documents,[n]:L4(r,o,i)}}:e}case eg:{const{documentId:n,id:o,patch:i}=t.payload,r=e.documents[n];return r?{...e,documents:{...e.documents,[n]:O4(r,o,i)}}:e}case ng:{const{documentId:n,committedUids:o}=t.payload,i=e.documents[n];if(!i)return e;const r=new Set(o),a={};let s=!1;for(const[l,c]of Object.entries(i.byUid))r.has(l)?a[l]={...c,commitState:c.commitState==="dirty"||c.commitState==="new"||c.commitState==="moved"?"synced":c.commitState}:(a[l]=c,c.commitState!=="new"&&c.commitState!=="dirty"&&c.commitState!=="moved"&&c.commitState!=="deleted"||(s=!0));return{...e,documents:{...e.documents,[n]:{...i,byUid:a,hasPendingChanges:s}}}}case og:{const{documentId:n,pageIndex:o,uid:i}=t.payload,r=e.documents[n];if(!r||!r.byUid[i])return e;const{[i]:a,...s}=r.byUid;return{...e,documents:{...e.documents,[n]:{...r,pages:{...r.pages,[o]:(r.pages[o]??[]).filter(l=>l!==i)},byUid:s}}}}case ig:{const{documentId:n,mode:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,locked:o}}}:e}case rg:{const{documentId:n,id:o,patch:i}=t.payload,r=e.documents[n];if(!r)return e;const a=r.byUid[o];return a?{...e,documents:{...e.documents,[n]:{...r,byUid:{...r.byUid,[o]:{...a,object:{...a.object,...i}}}}}}:e}case lg:{const n=new Map(e.tools.map(o=>[o.id,o]));return n.set(t.payload.id,t.payload),{...e,tools:Array.from(n.values())}}case sg:{const{toolId:n,patch:o}=t.payload;return{...e,tools:e.tools.map(i=>i.id===n?{...i,defaults:{...i.defaults,...o}}:i)}}case ag:return e.colorPresets.includes(t.payload)?e:{...e,colorPresets:[...e.colorPresets,t.payload]};default:return e}},initialState:(e,t)=>
2116(n=>{const o=new Map;E4.forEach(a=>o.set(a.id,a));const i=new Map(o);(n.tools||[]).forEach(a=>{const s=o.get(a.id);s?i.set(a.id,{...s,...a,defaults:{...s.defaults,...a.defaults},interaction:{...s.interaction,...a.interaction},behavior:{...s.behavior,...a.behavior},...s.clickBehavior||a.clickBehavior?{clickBehavior:{...s.clickBehavior,...a.clickBehavior}}:{}}):i.set(a.id,a)});const r=Array.from(i.values()).map(a=>{var s,l,c;return{...a,behavior:{...a.behavior,deactivateToolAfterCreate:((s=a.behavior)==null?void 0:s.deactivateToolAfterCreate)??n.deactivateToolAfterCreate??!1,selectAfterCreate:((l=a.behavior)==null?void 0:l.selectAfterCreate)??n.selectAfterCreate??!0,editAfterCreate:((c=a.behavior)==null?void 0:c.editAfterCreate)??n.editAfterCreate??!1}}});return{documents:{},activeDocumentId:null,tools:r,colorPresets:n.colorPresets??_4}})(t)};function dd(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var o in t)if(o!=="__source"&&e[o]!==t[o])return!0;return!1}function ud(e,t){this.props=e,this.context=t}(ud.prototype=new fn).isPureReactComponent=!0,ud.prototype.shouldComponentUpdate=function(e,t){return dd(this.props,e)||dd(this.state,t)};var hd=De.__b;De.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),hd&&hd(e)};var H4=De.__e;De.__e=function(e,t,n,o){if(e.then){for(var i,r=t;r=r.__;)if((i=r.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}H4(e,t,n,o)};var md=De.unmount;function Dg(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),e.__c.__H=null),(e=(function(o,i){for(var r in i)o[r]=i[r];return o})({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(o){return Dg(o,t,n)})),e}function Tg(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(o){return Tg(o,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Ta(){this.__u=0,this.o=null,this.__b=null}function zg(e){if(!e.__)return null;var t=e.__.__c;return t&&t.__a&&t.__a(e)}function rr(){this.i=null,this.l=null}De.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),md&&md(e)},(Ta.prototype=new fn).__c=function(e,t){var n=t.__c,o=this;o.o==null&&(o.o=[]),o.o.push(n);var i=zg(o.__v),r=!1,a=function(){r||o.__z||(r=!0,n.__R=null,i?i(l):l())};n.__R=a;var s=n.__P;n.__P=null;var l=function(){if(!--o.__u){if(o.state.__a){var c=o.state.__a;o.__v.__k[0]=Tg(c,c.__c.__P,c.__c.__O)}var d;for(o.setState({__a:o.__b=null});d=o.o.pop();)d.__P=s,d.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(a,a)},Ta.prototype.componentWillUnmount=function(){this.o=[]},Ta.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Dg(this.__b,n,o.__O=o.__P)}this.__b=null}var i=t.__a&&h(fe,null,e.fallback);return i&&(i.__u&=-33),[h(fe,null,t.__a?null:e.children),i]};var pd=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function U4(e){return this.getChildContext=function(){return e.context},e.children}function W4(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){Cr(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var o=t.__v;o!==null&&!o.__m&&o.__!==null;)o=o.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:o.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(i,r){this.childNodes.push(i),t.h.insertBefore(i,r)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),t.h.removeChild(i)}}}Cr(h(U4,{context:t.context},e.__v),t.v)}function aa(e,t){var n=h(W4,{__v:e,h:t});return n.containerInfo=t,n}(rr.prototype=new fn).__a=function(e){var t=this,n=zg(t.__v),o=t.l.get(e);return o[0]++,function(i){var r=function(){t.props.revealOrder?(o.push(i),pd(t,e,o)):i()};n?n(r):r()}},rr.prototype.render=function(e){this.i=null,this.l=new Map;var t=xr(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},rr.prototype.componentDidUpdate=rr.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){pd(e,n,t)})};var G4=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,q4=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,V4=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,K4=/[A-Z0-9]/g,Z4=typeof document<"u",X4=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};fn.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(fn.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var gd=De.event;function Y4(){}function Q4(){return this.cancelBubble}function J4(){return this.defaultPrevented}De.event=function(e){return gd&&(e=gd(e)),e.persist=Y4,e.isPropagationStopped=Q4,e.isDefaultPrevented=J4,e.nativeEvent=e};
2116var e3={enumerable:!1,configurable:!0,get:function(){return this.class}},fd=De.vnode;De.vnode=function(e){typeof e.type=="string"&&(function(t){var n=t.props,o=t.type,i={},r=o.indexOf("-")===-1;for(var a in n){var s=n[a];if(!(a==="value"&&"defaultValue"in n&&s==null||Z4&&a==="children"&&o==="noscript"||a==="class"||a==="className")){var l=a.toLowerCase();a==="defaultValue"&&"value"in n&&n.value==null?a="value":a==="download"&&s===!0?s="":l==="translate"&&s==="no"?s=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?a="ondblclick":l!=="onchange"||o!=="input"&&o!=="textarea"||X4(n.type)?l==="onfocus"?a="onfocusin":l==="onblur"?a="onfocusout":V4.test(a)&&(a=l):l=a="oninput":r&&q4.test(a)?a=a.replace(K4,"-$&").toLowerCase():s===null&&(s=void 0),l==="oninput"&&i[a=l]&&(a="oninputCapture"),i[a]=s}}o=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=xr(n.children).forEach(function(c){c.props.selected=i.value.indexOf(c.props.value)!=-1})),o=="select"&&i.defaultValue!=null&&(i.value=xr(n.children).forEach(function(c){c.props.selected=i.multiple?i.defaultValue.indexOf(c.props.value)!=-1:i.defaultValue==c.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",e3)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),t.props=i})(e),e.$$typeof=G4,fd&&fd(e)};var vd=De.__r;De.__r=function(e){vd&&vd(e),e.__c};var yd=De.diffed;De.diffed=function(e){yd&&yd(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value)};const Rg="INTERACTION/INIT_STATE",Eg="INTERACTION/CLEANUP_STATE",_g="INTERACTION/ACTIVATE_MODE",Lg="INTERACTION/PAUSE",Og="INTERACTION/RESUME",Ng="INTERACTION/SET_CURSOR",$g="INTERACTION/SET_DEFAULT_MODE",Fg="INTERACTION/SET_EXCLUSION_RULES",jg="INTERACTION/ADD_EXCLUSION_CLASS",Bg="INTERACTION/REMOVE_EXCLUSION_CLASS",Hg="INTERACTION/ADD_EXCLUSION_ATTRIBUTE",Ug="INTERACTION/REMOVE_EXCLUSION_ATTRIBUTE";function bd(e){return{type:$g,payload:{mode:e}}}function wd(e){return{type:Fg,payload:{rules:e}}}const xd="pointerMode",Wg=class extends Ye{constructor(e,t,n){super(e,t),this.modes=new Map,this.cursorClaims=new Map,this.buckets=new Map,this.alwaysGlobal=new Map,this.alwaysPage=new Map,this.pageActivities=new Map,this.onModeChange$=xt(),this.onHandlerChange$=xt(),this.onCursorChange$=xt(),this.onStateChange$=Ae(),this.onPageActivityChange$=xt(),this.registerMode({id:xd,scope:"page",exclusive:!1,cursor:"auto"}),this.dispatch(bd(xd)),n.exclusionRules&&this.dispatch(wd(n.exclusionRules))}onDocumentLoadingStarted(e){const t={activeMode:this.state.defaultMode,cursor:"auto",paused:!1};this.dispatch((function(o,i){return{type:Rg,payload:{documentId:o,state:i}}})(e,t)),this.cursorClaims.set(e,new Map),this.buckets.set(e,new Map),this.alwaysGlobal.set(e,new Set),this.alwaysPage.set(e,new Map),this.pageActivities.set(e,new Map);const n=this.buckets.get(e);for(const o of this.modes.keys())n.set(o,{global:new Set,page:new Map});this.logger.debug("InteractionManagerPlugin","DocumentOpened",`Initialized interaction state for document: ${e}`)}onDocumentClosed(e){const t=this.pageActivities.get(e);if(t){const n=new Set(t.values());t.clear();for(const o of n)this.onPageActivityChange$.emit({documentId:e,pageIndex:o,hasActivity:!1})}this.cursorClaims.delete(e),this.buckets.delete(e),this.alwaysGlobal.delete(e),this.alwaysPage.delete(e),this.pageActivities.delete(e),this.dispatch((function(n){return{type:Eg,payload:n}})(e)),this.logger.debug("InteractionManagerPlugin","DocumentClosed",`Cleaned up interaction state for document: ${e}`)}buildCapability(){return{getActiveMode:()=>this.getActiveMode(),getActiveInteractionMode:()=>this.getActiveInteractionMode(),activate:e=>this.activate(e),activateDefaultMode:()=>this.activateDefaultMode(),setCursor:(e,t,n)=>this.setCursor(e,t,n),getCurrentCursor:()=>this.getCurrentCursor(),removeCursor:e=>this.removeCursor(e),getHandlersForScope:e=>this.getHandlersForScope(e),activeModeIsExclusive:()=>this.activeModeIsExclusive(),pause:()=>this.pause(),resume:()=>this.resume(),isPaused:()=>this.registry.isDestroyed()||this.isPaused(),getState:()=>this.getDocumentStateOrThrow(),forDocument:e=>this.createInteractionScope(e),registerMode:e=>this.registerMode(e),registerHandlers:e=>this.registerHandlers(e),registerAlways:e=>this.registerAlways(e),setDefaultMode:e=>this.setDefaultMode(e),getDefaultMode:()=>this.state.defaultMode,getExclusionRules:()=>this.state.exclusionRules,setExclusionRules:e=>
2116this.dispatch(wd(e)),addExclusionClass:e=>this.dispatch((function(t){return{type:jg,payload:{className:t}}})(e)),removeExclusionClass:e=>this.dispatch((function(t){return{type:Bg,payload:{className:t}}})(e)),addExclusionAttribute:e=>this.dispatch((function(t){return{type:Hg,payload:{attribute:t}}})(e)),removeExclusionAttribute:e=>this.dispatch((function(t){return{type:Ug,payload:{attribute:t}}})(e)),claimPageActivity:(e,t,n)=>this.claimPageActivity(e,t,n),releasePageActivity:(e,t)=>this.releasePageActivity(e,t),hasPageActivity:(e,t)=>this.hasPageActivity(e,t),onModeChange:this.onModeChange$.on,onCursorChange:this.onCursorChange$.on,onHandlerChange:this.onHandlerChange$.on,onStateChange:this.onStateChange$.on,onPageActivityChange:this.onPageActivityChange$.on}}createInteractionScope(e){return{getActiveMode:()=>this.getActiveMode(e),getActiveInteractionMode:()=>this.getActiveInteractionMode(e),activate:t=>this.activate(t,e),activateDefaultMode:()=>this.activateDefaultMode(e),setCursor:(t,n,o)=>this.setCursor(t,n,o,e),getCurrentCursor:()=>this.getCurrentCursor(e),removeCursor:t=>this.removeCursor(t,e),getHandlersForScope:t=>this.getHandlersForScope(t),activeModeIsExclusive:()=>this.activeModeIsExclusive(e),pause:()=>this.pause(e),resume:()=>this.resume(e),isPaused:()=>this.isPaused(e),getState:()=>this.getDocumentStateOrThrow(e),claimPageActivity:(t,n)=>this.claimPageActivity(e,t,n),releasePageActivity:t=>this.releasePageActivity(e,t),hasPageActivity:t=>this.hasPageActivity(e,t),onModeChange:t=>this.onModeChange$.on(n=>{n.documentId===e&&t(n.activeMode)}),onCursorChange:t=>this.onCursorChange$.on(n=>{n.documentId===e&&t(n.cursor)}),onStateChange:t=>this.onStateChange$.on(n=>{n.documentId===e&&t(n.state)}),onPageActivityChange:t=>this.onPageActivityChange$.on(n=>{n.documentId===e&&t({pageIndex:n.pageIndex,hasActivity:n.hasActivity})})}}getDocumentState(e){const t=e??this.getActiveDocumentId();return this.state.documents[t]??null}getDocumentStateOrThrow(e){const t=this.getDocumentState(e);if(!t)throw new Error(`Interaction state not found for document: ${e??"active"}`);return t}activate(e,t){var n;const o=t??this.getActiveDocumentId(),i=this.getDocumentStateOrThrow(o);if(!this.modes.has(e))throw new Error(`[interaction] unknown mode '${e}'`);if(e===i.activeMode)return;const r=i.activeMode;(n=this.cursorClaims.get(o))==null||n.clear(),this.notifyHandlersInactive(o,r),this.dispatch((function(a,s){return{type:_g,payload:{documentId:a,mode:s}}})(o,e)),this.emitCursor(o),this.notifyHandlersActive(o,e),this.onModeChange$.emit({documentId:o,activeMode:e,previousMode:r})}activateDefaultMode(e){const t=e??this.getActiveDocumentIdOrNull();t&&this.activate(this.state.defaultMode,t)}setDefaultMode(e){if(!this.modes.has(e))throw new Error(`[interaction] cannot set unknown mode '${e}' as default`);this.dispatch(bd(e))}getActiveMode(e){return this.getDocumentStateOrThrow(e).activeMode}getActiveInteractionMode(e){const t=this.getDocumentState(e);return t?this.modes.get(t.activeMode)??null:null}activeModeIsExclusive(e){const t=this.getActiveInteractionMode(e);return!!t?.exclusive}pause(e){const t=e??this.getActiveDocumentId();this.dispatch((function(n){return{type:Lg,payload:n}})(t))}resume(e){const t=e??this.getActiveDocumentId();this.dispatch((function(n){return{type:Og,payload:n}})(t))}isPaused(e){return this.getDocumentStateOrThrow(e).paused}registerMode(e){this.modes.set(e.id,e);for(const t of this.buckets.keys()){const n=this.buckets.get(t);n.has(e.id)||n.set(e.id,{global:new Set,page:new Map})}}registerHandlers({documentId:e,modeId:t,handlers:n,pageIndex:o}){const i=Array.isArray(t)?t:[t],r=[],a=this.buckets.get(e);if(!a)throw new Error(`No buckets found for document: ${e}`);for(const s of i){const l=a.get(s);if(!l)throw new Error(`unknown mode '${s}'`);if(o==null)l.global.add(n);else{const c=l.page.get(o)??new Set;c.add(n),l.page.set(o,c)}r.push(()=>{if(o==null)l.global.delete(n);else{const c=l.page.get(o);c&&(c.delete(n),c.size===0&&l.page.delete(o))}})}return this.onHandlerChange$.emit({...this.state}),()=>{r.forEach(s=>s()),this.onHandlerChange$.emit({...this.state})}}registerAlways({scope:e,handlers:t}){if(e.type==="global"){const i=this.alwaysGlobal.get(e.documentId)??new Set;return i.add(t),this.alwaysGlobal.set(e.documentId,i),this.onHandlerChange$.emit({...this.state}),()=>{i.delete(t),this.onHandlerChange$.emit({...this.state})}}const n=this.alwaysPage.get(e.documentId)??new Map,o=n.get(e.pageIndex)??new Set;return o.add(t),n.set(e.pageIndex,o),this.alwaysPage.set(e.documentId,n),this.onHandlerChange$.emit({...this.state}),()=>{o.delete(t),this.onHandlerChange$.emit({...this.state})}}getHandlersForScope(e){var t;const n=this.getDocumentState(e.documentId);if(!n)return null;const o=this.modes.get(n.activeMode);if(!o)return null;const i=this.buckets.get(e.documentId);if(!i)return null;const r=i.get(o.id);if(!r)return null;const a=(s,l)=>s.size||l.size?(function(c){const d=["onPointerDown","onPointerUp","onPointerMove","onPointerEnter","onPointerLeave","onPointerCancel","onMouseDown","onMouseUp","onMouseMove","onMouseEnter","onMouseLeave","onMouseCancel","onClick","onDoubleClick"],u={};for(const m of d)u[m]=(g,p,f)=>{var v;
2116for(const y of c){if(p.isImmediatePropagationStopped())break;(v=y[m])==null||v.call(y,g,p,f)}};return u})([...s,...l]):null;return e.type==="global"?a(this.alwaysGlobal.get(e.documentId)??new Set,o.scope==="global"?r.global:new Set):a(((t=this.alwaysPage.get(e.documentId))==null?void 0:t.get(e.pageIndex))??new Set,o.scope==="page"?r.page.get(e.pageIndex)??new Set:new Set)}setCursor(e,t,n=0,o){const i=o??this.getActiveDocumentId(),r=this.cursorClaims.get(i);r&&(r.set(e,{cursor:t,priority:n}),this.emitCursor(i))}removeCursor(e,t){const n=t??this.getActiveDocumentId(),o=this.cursorClaims.get(n);o&&(o.delete(e),this.emitCursor(n))}getCurrentCursor(e){return this.getDocumentStateOrThrow(e).cursor}emitCursor(e){var t;const n=this.cursorClaims.get(e);if(!n)return;const o=this.getDocumentState(e);if(!o)return;const i=[...n.values()].sort((r,a)=>a.priority-r.priority)[0]??{cursor:((t=this.modes.get(o.activeMode))==null?void 0:t.cursor)??"auto"};i.cursor!==o.cursor&&(this.dispatch((function(r,a){return{type:Ng,payload:{documentId:r,cursor:a}}})(e,i.cursor)),this.onCursorChange$.emit({documentId:e,cursor:i.cursor}))}claimPageActivity(e,t,n){let o=this.pageActivities.get(e);o||(o=new Map,this.pageActivities.set(e,o));const i=o.get(t);i!==n&&(o.set(t,n),i===void 0||this.pageHasAnyTopic(e,i)||this.onPageActivityChange$.emit({documentId:e,pageIndex:i,hasActivity:!1}),this.countTopicsOnPage(e,n)===1&&this.onPageActivityChange$.emit({documentId:e,pageIndex:n,hasActivity:!0}))}releasePageActivity(e,t){const n=this.pageActivities.get(e);if(!n)return;const o=n.get(t);o!==void 0&&(n.delete(t),this.pageHasAnyTopic(e,o)||this.onPageActivityChange$.emit({documentId:e,pageIndex:o,hasActivity:!1}))}hasPageActivity(e,t){return this.pageHasAnyTopic(e,t)}pageHasAnyTopic(e,t){const n=this.pageActivities.get(e);if(!n)return!1;for(const o of n.values())if(o===t)return!0;return!1}countTopicsOnPage(e,t){const n=this.pageActivities.get(e);if(!n)return 0;let o=0;for(const i of n.values())i===t&&o++;return o}notifyHandlersActive(e,t){var n,o;(n=this.alwaysGlobal.get(e))==null||n.forEach(s=>{var l;(l=s.onHandlerActiveStart)==null||l.call(s,t)}),(o=this.alwaysPage.get(e))==null||o.forEach(s=>{s.forEach(l=>{var c;(c=l.onHandlerActiveStart)==null||c.call(l,t)})});const i=this.modes.get(t);if(!i)return;const r=this.buckets.get(e);if(!r)return;const a=r.get(t);a&&(i.scope==="global"&&a.global.forEach(s=>{var l;(l=s.onHandlerActiveStart)==null||l.call(s,t)}),i.scope==="page"&&a.page.forEach(s=>{s.forEach(l=>{var c;(c=l.onHandlerActiveStart)==null||c.call(l,t)})}))}notifyHandlersInactive(e,t){var n,o;(n=this.alwaysGlobal.get(e))==null||n.forEach(s=>{var l;(l=s.onHandlerActiveEnd)==null||l.call(s,t)}),(o=this.alwaysPage.get(e))==null||o.forEach(s=>{s.forEach(l=>{var c;(c=l.onHandlerActiveEnd)==null||c.call(l,t)})});const i=this.modes.get(t);if(!i)return;const r=this.buckets.get(e);if(!r)return;const a=r.get(t);a&&(i.scope==="global"&&a.global.forEach(s=>{var l;(l=s.onHandlerActiveEnd)==null||l.call(s,t)}),i.scope==="page"&&a.page.forEach(s=>{s.forEach(l=>{var c;(c=l.onHandlerActiveEnd)==null||c.call(l,t)})}))}onStoreUpdated(e,t){for(const n in t.documents){const o=e.documents[n],i=t.documents[n];o!==i&&this.onStateChange$.emit({documentId:n,state:i})}}async initialize(e){this.logger.info("InteractionManagerPlugin","Initialize","Interaction Manager Plugin initialized")}async destroy(){this.pageActivities.clear(),this.onModeChange$.clear(),this.onCursorChange$.clear(),this.onHandlerChange$.clear(),this.onStateChange$.clear(),this.onPageActivityChange$.clear(),await super.destroy()}};Wg.id="interaction-manager";let sl=Wg;const Cd="interaction-manager",kd={defaultMode:"pointerMode",exclusionRules:{classes:[],dataAttributes:["data-no-interaction"]},documents:{},activeDocumentId:null},t3={manifest:{id:Cd,name:"Interaction Manager Plugin",version:"1.0.0",provides:["interaction-manager"],requires:[],optional:[],defaultConfig:{exclusionRules:{classes:[],dataAttributes:["data-no-interaction"]}}},create:(e,t)=>new sl(Cd,e,t),reducer:(e=kd,t)=>{switch(t.type){case Rg:{const{documentId:n,state:o}=t.payload;return{...e,documents:{...e.documents,[n]:o},activeDocumentId:e.activeDocumentId??n}}case Eg:{const n=t.payload,{[n]:o,...i}=e.documents;return{...e,documents:i,activeDocumentId:e.activeDocumentId===n?null:e.activeDocumentId}}case"INTERACTION/SET_ACTIVE_DOCUMENT":return{...e,activeDocumentId:t.payload};case _g:{const{documentId:n,mode:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,activeMode:o}}}:e}case Ng:{const{documentId:n,cursor:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,cursor:o}}}:e}case Lg:{const n=t.payload,o=e.documents[n];return o?{...e,documents:{...e.documents,[n]:{...o,paused:!0}}}:e}case Og:{const n=t.payload,o=e.documents[n];return o?{...e,documents:{...e.documents,[n]:{...o,paused:!1}}}:e}case $g:return{...e,defaultMode:t.payload.mode};case Fg:return{...e,exclusionRules:t.payload.rules};case jg:return{...e,exclusionRules:{...e.exclusionRules,classes:[...e.exclusionRules.classes||[],t.payload.className].filter((n,o,i)=>i.indexOf(n)===o)}};case Bg:return{...e,exclusionRules:{...e.exclusionRules,classes:(e.exclusionRules.classes||[]).filter(n=>n!==t.payload.className)}};case Hg:return{...e,exclusionRules:{...e.exclusionRules,dataAttributes:[...e.exclusionRules.dataAttributes||[],t.payload.attribute].filter((n,o,i)=>i.indexOf(n)===o)}};case Ug:return{...e,exclusionRules:{...e.exclusionRules,dataAttributes:(e.exclusionRules.dataAttributes||[]).filter(n=>n!==t.payload.attribute)}};default:return e}},initialState:kd},Mi=()=>at(sl.id),n3={pointerdown:"onPointerDown",pointerup:"onPointerUp",pointermove:"onPointerMove",pointerenter:"onPointerEnter",pointerleave:"onPointerLeave",pointercancel:"onPointerCancel",mousedown:"onMouseDown",mouseup:"onMouseUp",mousemove:"onMouseMove",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousecancel:"onMouseCancel",click:"onClick",dblclick:"onDoubleClick",touchstart:"onPointerDown",touchend:"onPointerUp",touchmove:"onPointerMove",touchcancel:"onPointerCancel"},Id=["pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointercancel","mousedown","mouseup","mousemove","mouseenter","mouseleave","mousecancel","click","dblclick"],Sd=typeof PointerEvent<"u"?Id:[...Id,"touchstart","touchend","touchmove","touchcancel"];function Md(e){return typeof TouchEvent<"u"&&e instanceof TouchEvent}function Gg(e,t,n,o){const i=e.forDocument(t.documentId);let r=e.getHandlersForScope(t);const a=()=>{var b;return((b=i.getActiveInteractionMode())==null?void 0:b.wantsRawTouch)!==!1}
2116,s={};let l=a();const c=b=>{Sd.forEach(w=>{const x=s[w]??(s[w]=y);var k;n.addEventListener(w,x,(k=b,w.startsWith("touch")?{passive:!k}:{passive:!1}))})},d=()=>{Sd.forEach(b=>{const w=s[b];w&&n.removeEventListener(b,w)})};c(l),n.style.touchAction=l?"none":"";const u=i.onModeChange(()=>{if(t.type==="global"){const w=i.getActiveInteractionMode();n.style.cursor=w?.scope==="global"?w.cursor??"auto":"auto"}r=e.getHandlersForScope(t);const b=a();b!==l&&(d(),c(b),l=b,n.style.touchAction=l?"none":"")}),m=e.onHandlerChange(()=>{r=e.getHandlersForScope(t)}),g=i.getActiveInteractionMode(),p=i.getCurrentCursor();n.style.cursor=t.type==="global"&&g?.scope!=="global"?"auto":p;const f=i.onCursorChange(b=>{var w;t.type==="global"&&((w=i.getActiveInteractionMode())==null?void 0:w.scope)!=="global"||(n.style.cursor=b)}),v=(b,w)=>{if(o)return o(b,w);const x=w.getBoundingClientRect();return{x:b.clientX-x.left,y:b.clientY-x.top}};function y(b){var w;if(e.isPaused())return;const x=e.getExclusionRules();if(b.target&&(function(M,P){var T,D,F;if(!M)return!1;let N=M;for(;N;){if((T=P.classes)!=null&&T.length){for(const W of P.classes)if((D=N.classList)!=null&&D.contains(W))return!0}if((F=P.dataAttributes)!=null&&F.length){for(const W of P.dataAttributes)if(N.hasAttribute(W))return!0}N=N.parentElement}return!1})(b.target,x))return;const k=n3[b.type];if(!k||!r?.[k])return;let I,S;Md(b)&&l&&(b.type==="touchmove"||b.type==="touchcancel")&&b.preventDefault();let A=!1;if(Md(b)){const M=b.type==="touchend"||b.type==="touchcancel"?b.changedTouches[0]:b.touches[0];if(!M)return;I=v(M,n),S={clientX:M.clientX,clientY:M.clientY,ctrlKey:b.ctrlKey,shiftKey:b.shiftKey,altKey:b.altKey,metaKey:b.metaKey,target:b.target,currentTarget:b.currentTarget,setPointerCapture:()=>{},releasePointerCapture:()=>{},stopImmediatePropagation:()=>{A=!0},isImmediatePropagationStopped:()=>A}}else{const M=b;I=v(M,n),S={clientX:M.clientX,clientY:M.clientY,ctrlKey:M.ctrlKey,shiftKey:M.shiftKey,altKey:M.altKey,metaKey:M.metaKey,target:M.target,currentTarget:M.currentTarget,setPointerCapture:()=>{var P,T;(T=(P=M.target)==null?void 0:P.setPointerCapture)==null||T.call(P,M.pointerId)},releasePointerCapture:()=>{var P,T;(T=(P=M.target)==null?void 0:P.releasePointerCapture)==null||T.call(P,M.pointerId)},stopImmediatePropagation:()=>{A=!0},isImmediatePropagationStopped:()=>A}}(w=r[k])==null||w.call(r,I,S,i.getActiveMode())}return()=>{d(),u(),f(),m()}}const o3=({children:e,documentId:t,style:n,...o})=>{const i=Q(null),{provides:r}=Mi();return H(()=>{if(r&&i.current)return Gg(r,{type:"global",documentId:t},i.current)},[r,t]),C("div",{ref:i,style:{width:"100%",height:"100%",...n},...o,children:e})},i3=({documentId:e,pageIndex:t,children:n,rotation:o,scale:i,convertEventToPoint:r,style:a,...s})=>{var l,c;const d=Q(null),{provides:u}=Mi(),m=(function(I){const{provides:S}=Mi(),[A,M]=$(()=>{if(!S)return!1;const P=S.forDocument(I).getActiveInteractionMode();return P?.scope==="page"&&!!P.exclusive});return H(()=>{if(!S)return;const P=S.forDocument(I);return P.onModeChange(()=>{const T=P.getActiveInteractionMode();M(T?.scope==="page"&&!!T?.exclusive)})},[S,I]),A})(e),g=At(e),p=(c=(l=g?.document)==null?void 0:l.pages)==null?void 0:c[t],f=p?.size??{width:0,height:0},v=p?.rotation??0,y=g?.rotation??0,b=o!==void 0?o:(v+y)%4,w=i??g?.scale??1,x=kr(f,0,w),k=Y((I,S)=>{const A=S.getBoundingClientRect(),M={x:I.clientX-A.left,y:I.clientY-A.top};return(function(P,T,D,F){return pr(rh(P,T,(4-D)%4),1/F)})(kr({width:x.width,height:x.height},b,1),M,b,w)},[f,b,w]);return H(()=>{if(u&&d.current)return Gg(u,{type:"page",documentId:e,pageIndex:t},d.current,r||k)},[u,e,t,r,k]),C("div",{ref:d,style:{position:"relative",width:x.width,height:x.height,...a},...s,children:[n,m&&C("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:10}})]})},r3={},qg=Rn(null),Vg=Rn([]);function Kg(e){const t=En(qg),n=Q(e);H(()=>{if(t)return t(n.current)},[t])}function Zg(){return En(Vg)}const sa=()=>$t(al.id),en=()=>at(al.id),ll=e=>{var t;const{provides:n}=en(),[o,i]=$(((t=n?.forDocument(e))==null?void 0:t.getState())??Ag());return H(()=>
2116{if(!n)return;const r=n.forDocument(e);return i(r.getState()),r.onStateChange(a=>{i(a)})},[n,e]),{state:o,provides:n?.forDocument(e)??null}};let za;function a3(){return za===void 0&&(za=(function(){try{const e=navigator;return/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&e?.maxTouchPoints>1}catch{return!1}})()),za}function Xg(e,t){const n=a3();return ee(()=>{const o=n&&t&&e>0&&e<16,i=o?e/16:1;return{needsComp:o,adjustedFontPx:o?16:e,scaleComp:i,wrapperStyle:o?{width:100/i+"%",height:100/i+"%",transform:`scale(${i})`,transformOrigin:"top left"}:void 0}},[n,t,e])}function s3({appearance:e,style:t}){const[n,o]=$(null),i=Q(null);return H(()=>{const r=URL.createObjectURL(e.data);return o(r),i.current=r,()=>{i.current&&(URL.revokeObjectURL(i.current),i.current=null)}},[e.data]),n?C("img",{src:n,onLoad:()=>{i.current&&(URL.revokeObjectURL(i.current),i.current=null)},style:{position:"absolute",width:"100%",height:"100%",display:"block",pointerEvents:"none",userSelect:"none",...t}}):null}function l3({scale:e,documentId:t,pageIndex:n,rotation:o,pageWidth:i,pageHeight:r,trackedAnnotation:a,children:s,isSelected:l,isEditing:c=!1,isMultiSelected:d=!1,isDraggable:u,isResizable:m,isRotatable:g=!0,lockAspectRatio:p=!1,style:f={},blendMode:v,vertexConfig:y,selectionMenu:b,outlineOffset:w=1,onDoubleClick:x,onSelect:k,appearance:I,zIndex:S=1,resizeUI:A,vertexUI:M,rotationUI:P,selectionOutlineColor:T,selectionOutline:D,customAnnotationRenderer:F,groupSelectionMenu:N,groupSelectionOutline:W,annotationRenderers:_,...G}){var q,O,V;const[te,he]=$(a.object),[ne,K]=$(null),[le,ie]=$(null),[Fe,He]=$(!1),[it,Ve]=$(!1),{provides:kt}=en(),{plugin:Qe}=sa(),{canModifyAnnotations:lt}=Qr(t),we=Q(null),_e=lt&&u&&!d,Pe=lt&&m&&!d,We=lt&&g&&!d,It=ee(()=>kt?kt.forDocument(t):null,[kt,t]),je=te?{...a.object,...te}:a.object,dn=a.object.flags??[],_n=dn.includes("noZoom"),un=dn.includes("noRotate"),Be=_n?1:e,Ft=un?0:o,Cn=A?.color??"#007ACC",qt=M?.color??"#007ACC",Rt=P?.color??"white",Vt=P?.connectorColor??"#007ACC",Ln=A?.size??12,Jo=M?.size??12,no=P?.size??32,oo=P?.margin,On=P?.iconColor??"#007ACC",tn=P?.showConnector??!1,hn=((q=P?.border)==null?void 0:q.color)??"#007ACC",Nn=((O=P?.border)==null?void 0:O.width)??1,Me=((V=P?.border)==null?void 0:V.style)??"solid",tt=D?.color??T??"#007ACC",me=D?.style??"solid",nt=D?.width??1,io=D?.offset??w??1,mt=ne??je.rotation??0,kn=ne??je.rotation??0,$n=Number.isFinite(kn)?Math.round(10*kn)/10:0,Et=ne!==null,In=Q(null),Po=Y(Le=>{var gt;if(!((gt=Le.transformData)!=null&>.type)||d||!Qe)return;const{type:St,changes:ft,metadata:Pt}=Le.transformData,Sn=a.object.id,Kt={width:i,height:r};if(Le.state==="start"&&(In.current=a.object.unrotatedRect??a.object.rect,we.current=a.object,St!=="resize"&&St!=="vertex-edit"||Ve(!0),St==="move"?Qe.startDrag(t,{annotationIds:[Sn],pageSize:Kt}):St==="resize"&&Qe.startResize(t,{annotationIds:[Sn],pageSize:Kt,resizeHandle:Pt?.handle??"se"})),ft.rect&&In.current)if(St==="move"){const Zt={x:ft.rect.origin.x-In.current.origin.x,y:ft.rect.origin.y-In.current.origin.y};Qe.updateDrag(t,Zt)}else St==="resize"&&Qe.updateResize(t,ft.rect);if(St==="vertex-edit"&&ft.vertices&&y){const Zt=we.current??a.object,Bn=y.transformAnnotation(Zt,ft.vertices),Ro=kt?.transformAnnotation(Zt,{type:St,changes:Bn,metadata:Pt});Ro&&(he(fa=>({...fa,...Ro})),Le.state==="end"&&It?.updateAnnotation(n,Sn,Ro))}if(St==="rotate"){const Zt=Pt?.rotationAngle??mt,Bn=Pt?.cursorPosition;return Bn&&ie({x:Bn.clientX,y:Bn.clientY}),void(Le.state==="start"?(K(Zt),Qe.startRotation(t,{annotationIds:[Sn],cursorAngle:Zt,rotationCenter:Pt?.rotationCenter})):Le.state==="move"?(K(Zt),Qe.updateRotation(t,Zt,Pt?.rotationDelta)):Le.state==="end"&&(K(null),ie(null),Qe.commitRotation(t)))}Le.state==="end"&&(In.current=null,we.current=null,Ve(!1),St==="move"?Qe.commitDrag(t):St==="resize"&&Qe.commitResize(t))},[Qe,t,a.object,i,r,n,d,y,kt,It,mt]),mn=je.unrotatedRect,_t=mn??je.rect,pt=mn&&mt!==0?lh(_t,je.rect,mt):void 0,Fn=_t,{dragProps:jn,vertices:ha,resize:N0,rotation:Do}=Mp({controller:{element:Fn,vertices:y?.extractVertices(je),constraints:{minWidth:10,minHeight:10,boundingBox:{width:i,height:r}},maintainAspectRatio:p,pageRotation:o,annotationRotation:mt,rotationCenter:pt,rotationElement:je.rect,scale:e,enabled:l&&!d,onUpdate:Po},resizeUI:{handleSize:Ln,spacing:io,offsetMode:"outside",includeSides:!p,zIndex:S+1},vertexUI:{vertexSize:Jo,zIndex:S+2},rotationUI:{handleSize:no,margin:oo,zIndex:S+3,showConnector:tn},includeVertices:!!y,includeRotation:We,currentRotation:mt}),$0=(function(Le,{delay:gt=300,tolerancePx:St=18}={}
2116){const ft=Q({t:0,x:0,y:0}),Pt=Y(Kt=>{if(!Le||Kt.pointerType==="mouse"||Kt.isPrimary===!1)return;const Zt=performance.now(),Bn=Kt.clientX,Ro=Kt.clientY,fa=Zt-ft.current.t<=gt,Ml=Bn-ft.current.x,Al=Ro-ft.current.y;fa&&Ml*Ml+Al*Al<=St*St&&Le?.(Kt),ft.current={t:Zt,x:Bn,y:Ro}},[Le,gt,St]),Sn=Y(Kt=>{Le?.(Kt)},[Le]);return Le?{[Bb]:Sn,onPointerUpCapture:Pt}:{}})(ee(()=>{if(lt&&x)return x},[lt,x]));H(()=>{he(a.object)},[a.object]),H(()=>{if(!Qe)return;const Le=a.object.id,gt=ft=>{var Pt;if(ft.documentId!==t)return;ft.type!=="end"&&ft.type!=="cancel"||K(null);const Sn=(Pt=ft.previewPatches)==null?void 0:Pt[Le];ft.type==="update"&&Sn?he(Kt=>({...Kt,...Sn})):ft.type==="cancel"&&he(a.object)},St=[Qe.onDragChange(gt),Qe.onResizeChange(gt),Qe.onRotateChange(gt)];return()=>St.forEach(ft=>ft())},[Qe,t,a.object]);const bl=l&&!d,ei=je.rect.size.width*Be,ti=je.rect.size.height*Be,wl=_t.size.width*Be,xl=_t.size.height*Be,ma=!!mn&&mt!==0,F0=ma?(_t.origin.x-je.rect.origin.x)*Be:(ei-wl)/2,j0=ma?(_t.origin.y-je.rect.origin.y)*Be:(ti-xl)/2,B0=ma&&pt?`${(pt.x-_t.origin.x)*Be}px ${(pt.y-_t.origin.y)*Be}px`:"center center",pa=pt?(pt.x-je.rect.origin.x)*Be:ei/2,ga=pt?(pt.y-je.rect.origin.y)*Be:ti/2,To=Math.max(300,Math.max(ei,ti)+80),zo=un?Ip({size:{width:ei,height:ti}},o):null,Cl=ee(()=>mn?{...je,rect:mn}:je,[je,mn]),kl=!(!I?.normal||it||c||a.dictMode),Il={position:"absolute",left:je.rect.origin.x*e,top:je.rect.origin.y*e,width:zo?zo.width:ei,height:zo?zo.height:ti,pointerEvents:"none",zIndex:S,...zo&&{transform:zo.matrix,transformOrigin:"0 0"}},Sl={position:"absolute",left:F0,top:j0,width:wl,height:xl,transform:mt!==0?`rotate(${mt}deg)`:void 0,transformOrigin:B0};return C("div",{"data-no-interaction":!0,children:[C("div",{style:{...Il,...v&&{mixBlendMode:v},...f},children:C("div",{style:{...Sl,pointerEvents:c?"auto":"none"},children:[(()=>{const Le=typeof s=="function"?s(Cl,{appearanceActive:kl}):s;return F?.({annotation:Cl,children:Le,isSelected:l,scale:e,rotation:o,pageWidth:i,pageHeight:r,pageIndex:n,onSelect:k})??Le})(),I?.normal&&C(s3,{appearance:I.normal,style:{display:kl?"block":"none"}})]})}),C("div",{style:Il,...G,children:[Et&&C(fe,{children:[C("div",{style:{position:"absolute",left:pa-To/2,top:ga,width:To,height:1,backgroundColor:Vt,opacity:.35,pointerEvents:"none"}}),C("div",{style:{position:"absolute",left:pa,top:ga-To/2,width:1,height:To,backgroundColor:Vt,opacity:.35,pointerEvents:"none"}}),C("div",{style:{position:"absolute",left:pa-To/2,top:ga,width:To,height:1,transformOrigin:"center center",transform:`rotate(${mt}deg)`,backgroundColor:Vt,opacity:.8,pointerEvents:"none"}})]}),l&&We&&Do&&(P?.component?C("div",{onPointerEnter:()=>He(!0),onPointerLeave:()=>{He(!1),ie(null)},onPointerMove:Le=>{Et||ie({x:Le.clientX,y:Le.clientY})},style:{display:"contents"},children:P.component({...Do.handle,backgroundColor:Rt,iconColor:On,connectorStyle:{...Do.connector.style,backgroundColor:Vt,opacity:Et?0:1},showConnector:tn,opacity:Et?0:1,border:{color:hn,width:Nn,style:Me}})}):C("div",{onPointerEnter:()=>He(!0),onPointerLeave:()=>{He(!1),ie(null)},onPointerMove:Le=>{Et||ie({x:Le.clientX,y:Le.clientY})},style:{display:"contents"},children:[tn&&C("div",{style:{...Do.connector.style,backgroundColor:Vt,opacity:Et?0:1}}),C("div",{...Do.handle,style:{...Do.handle.style,backgroundColor:Rt,border:`${Nn}px ${Me} ${hn}`,boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"auto",opacity:Et?0:1},children:C("svg",{width:Math.round(.6*no),height:Math.round(.6*no),viewBox:"0 0 24 24",fill:"none",stroke:On,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C("path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}),C("path",{d:"M21 3v5h-5"})]})})]})),C("div",{..._e&&l?jn:{},...$0,style:{...Sl,outline:bl?`${nt}px ${me} ${tt}`:"none",outlineOffset:bl?`${io}px`:"0px",pointerEvents:!l||d||c?"none":"auto",touchAction:"none",cursor:l&&_e?"move":"default"},children:[l&&Pe&&!Et&&N0.map(({key:Le,...gt})=>A?.component?A.component({key:Le,...gt,backgroundColor:Cn}):C("div",{...gt,style:{...gt.style,backgroundColor:Cn}},Le)),l&<&&!d&&!Et&&ha.map(({key:Le,...gt})=>M?.component?M.component({key:Le,...gt,backgroundColor:qt}):C("div",{...gt,style:{...gt.style,backgroundColor:qt}},Le))]})]}),b&&!d&&!Et&&C(xi,{rect:{origin:{x:je.rect.origin.x*e,y:je.rect.origin.y*e},size:{width:je.rect.size.width*Be,height:je.rect.size.height*Be}},rotation:o,children:Le=>{const gt=((mt+90*Ft)%360+360)%360;return b({...Le,context:{type:"annotation",annotation:a,pageIndex:n},selected:l,placement:{suggestTop:We&>>90&><270}})}}),(Et||Fe)&&le&&aa(C("div",{style:{position:"fixed",left:le.x+16,top:le.y-16,background:"rgba(0,0,0,0.8)",color:"#fff",padding:"4px 8px",borderRadius:4,fontSize:12,fontFamily:"monospace",pointerEvents:"none",zIndex:1e4,whiteSpace:"nowrap"},children:[$n.toFixed(0),"°"]}),document.body)]})}function ar(e,t,n,o,i){switch(i){case 1:return{x:t,y:o-e};case 2:return{x:n-e,y:o-t};case 3:return{x:n-t,y:e};default:return{x:e,y:t}}}function c3(e,t,n){const o=e.object.flags??[],i=o.includes("noZoom"),r=o.includes("noRotate"),a=e.object.rect.origin.x*t,s=e.object.rect.origin.y*t,l=e.object.rect.size.width*(i?1:t),c=e.object.rect.size.height*(i?1:t);if(!r||n===0)return{left:a,top:s,right:a+l,bottom:s+c};const d=[ar(0,0,l,c,n),ar(l,0,l,c,n),ar(0,c,l,c,n),ar(l,c,l,c,n)];let u=1/0,m=1/0,g=-1/0,p=-1/0;for(const f of d)f.x<u&&(u=f.x),f.y<m&&(m=f.y),f.x>g&&(g=f.x),f.y>p&&(p=f.y);return{left:a+u,top:s+m,right:a+g,bottom:s+p}}function d3({documentId:e,pageIndex:t,scale:n,rotation:o,pageWidth:i,pageHeight:r,selectedAnnotations:a,isDraggable:s,isResizable:l,isRotatable:c=!0,lockA
2116spectRatio:d=!1,resizeUI:u,rotationUI:m,selectionOutlineColor:g,outlineOffset:p,selectionOutline:f,zIndex:v=2,groupSelectionMenu:y}){var b,w,x;const{plugin:k}=sa(),{canModifyAnnotations:I}=Qr(e),S=Q(null),A=Q(!1),M=Q(!1),[P,T]=$(null),[D,F]=$(null),[N,W]=$(!1),_=I&&s,G=I&&l,q=I&&c,O=ee(()=>(function(me){return Os(me)??ey})(a.map(me=>me.object.rect)),[a]),[V,te]=$(O);H(()=>{A.current||M.current||te(O)},[O]),H(()=>{if(k)return k.onRotateChange(me=>{me.documentId===e&&(me.type!=="end"&&me.type!=="cancel"||T(null))})},[k,e]);const he=Y(me=>{var nt,io,mt,kn,$n,Et;if(!((nt=me.transformData)!=null&&nt.type)||!k)return;const In=me.transformData.type,Po=In==="move",mn=In==="resize";if(Po&&!_)return;if(me.state==="start"&&(S.current=O,Po?(A.current=!0,k.startDrag(e,{annotationIds:a.map(pt=>pt.object.id),pageSize:{width:i,height:r}})):mn&&(M.current=!0,k.startResize(e,{annotationIds:a.map(pt=>pt.object.id),pageSize:{width:i,height:r},resizeHandle:((io=me.transformData.metadata)==null?void 0:io.handle)??"se"}))),In==="rotate"){if(!c)return;const pt=a.map(ha=>ha.object.id),Fn=((mt=me.transformData.metadata)==null?void 0:mt.rotationAngle)??0,jn=(kn=me.transformData.metadata)==null?void 0:kn.cursorPosition;return jn&&F({x:jn.clientX,y:jn.clientY}),void(me.state==="start"?(T(Fn),k.startRotation(e,{annotationIds:pt,cursorAngle:Fn,rotationCenter:($n=me.transformData.metadata)==null?void 0:$n.rotationCenter})):me.state==="move"?(T(Fn),k.updateRotation(e,Fn,(Et=me.transformData.metadata)==null?void 0:Et.rotationDelta)):me.state==="end"&&(T(null),F(null),k.commitRotation(e)))}const _t=S.current??O;if(Po&&me.transformData.changes.rect){const pt=me.transformData.changes.rect,Fn={x:pt.origin.x-_t.origin.x,y:pt.origin.y-_t.origin.y},jn=k.updateDrag(e,Fn);te({..._t,origin:{x:_t.origin.x+jn.x,y:_t.origin.y+jn.y}})}else if(mn&&me.transformData.changes.rect){const pt=me.transformData.changes.rect;k.updateResize(e,pt),te(pt)}me.state==="end"&&(S.current=null,Po&&A.current?(A.current=!1,k.commitDrag(e)):mn&&M.current&&(M.current=!1,k.commitResize(e)))},[k,e,i,r,O,_,a,c]),ne=P??0,K=P!==null,le=Number.isFinite(ne)?Math.round(10*ne)/10:0,ie=u?.color??"#007ACC",Fe=u?.size??12,He=m?.color??"white",it=m?.connectorColor??"#007ACC",Ve=m?.size??32,kt=m?.margin,Qe=m?.iconColor??"#007ACC",lt=m?.showConnector??!1,we=((b=m?.border)==null?void 0:b.color)??"#007ACC",_e=((w=m?.border)==null?void 0:w.width)??1,Pe=((x=m?.border)==null?void 0:x.style)??"solid",We=f?.color??g??"#007ACC",It=f?.style??"dashed",je=f?.width??2,dn=f?.offset??p??2,{dragProps:_n,resize:un,rotation:Be}=Mp({controller:{element:V,constraints:{minWidth:20,minHeight:20,boundingBox:{width:i,height:r}},maintainAspectRatio:d,pageRotation:o,scale:n,enabled:!0,onUpdate:he},resizeUI:{handleSize:Fe,spacing:dn,offsetMode:"outside",includeSides:!d,zIndex:v+1},vertexUI:{vertexSize:0,zIndex:v},rotationUI:{handleSize:Ve,margin:kt,zIndex:v+2,showConnector:lt},includeVertices:!1,includeRotation:q,currentRotation:P??0});if(a.length<2)return null;let Ft=1/0,Cn=1/0,qt=-1/0,Rt=-1/0;for(const me of a){const nt=c3(me,n,o);Ft=Math.min(Ft,nt.left),Cn=Math.min(Cn,nt.top),qt=Math.max(qt,nt.right),Rt=Math.max(Rt,nt.bottom)}const Vt=Ft-O.origin.x*n,Ln=Cn-O.origin.y*n,Jo=qt-(O.origin.x+O.size.width)*n,no=Rt-(O.origin.y+O.size.height)*n,oo=V.origin.x*n+Vt,On=V.origin.y*n+Ln,tn=V.size.width*n+(Jo-Vt),hn=V.size.height*n+(no-Ln),Nn=tn/2,Me=hn/2,tt=Math.max(300,Math.max(tn,hn)+80);return C("div",{"data-group-selection-box":!0,"data-no-interaction":!0,children:[C("div",{style:{position:"absolute",left:oo,top:On,width:tn,height:hn,pointerEvents:"none",zIndex:v},children:[K&&C(fe,{children:[C("div",{style:{position:"absolute",left:Nn-tt/2,top:Me,width:tt,height:1,backgroundColor:ie,opacity:.35,pointerEvents:"none"}}),C("div",{style:{position:"absolute",left:Nn,top:Me-tt/2,width:1,height:tt,backgroundColor:ie,opacity:.35,pointerEvents:"none"}}),C("div",{style:{position:"absolute",left:Nn-tt/2,top:Me,width:tt,height:1,transformOrigin:"center center",transform:`rotate(${ne}deg)`,backgroundColor:ie,opacity:.8,pointerEvents:"none"}})]}),q&&Be&&(m?.component?C("div",{onPointerEnter:()=>W(!0),onPointerLeave:()=>{W(!1),F(null)},onPointerMove:me=>{K||F({x:me.clientX,y:me.clientY})},style:{display:"contents"},children:m.component({...Be.handle,backgroundColor:He,iconColor:Qe,connectorStyle:{...Be.connector.style,backgroundColor:it,opacity:K?0:1},showConnector:lt,opacity:K?0:1,border:{color:we,width:_e,style:Pe}})}):C("div",{onPointerEnter:()=>W(!0),onPointerLeave:()=>{W(!1),F(null)},onPointerMove:me=>{K||F({x:me.clientX,y:me.clientY})},style:{display:"contents"},children:[lt&&C("div",{style:{...Be.connector.style,backgroundColor:it,opacity:K?0:1}}),C("div",{...Be.handle,style:{...Be.handle.style,backgroundColor:He,border:`${_e}px ${Pe} ${we}`,boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"auto",opacity:K?0:1},children:C("svg",{width:Math.round(.6*Ve),height:Math.round(.6*Ve),viewBox:"0 0 24 24",fill:"none",stroke:Qe,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C("path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}),C("path",{d:"M21 3v5h-5"})]})})]})),C("div",{..._?_n:{onPointerDown:me=>me.stopPropagation()},style:{position:"absolute",left:0,top:0,width:tn,height:hn,outline:K?"none":`${je}px ${It} ${We}`,outlineOffset:dn-1,cursor:_?"move":"default",touchAction:"none",pointerEvents:"auto"},children:G&&!K&&un.map(({key:me,...nt})=>u?.component?u.component({key:me,...nt,backgroundColor:ie}):C("div",{...nt,style:{...nt.style,backgroundColor:ie}},me))})]}),(K||N)&&D&&aa(C("div",{style:{position:"fixed",left:D.x+16,top:D.y-16,background:"rgba(0,0,0,0.8)",color:"#fff",padding:"4px 8px",borderRadius:4,fontSize:12,fontFamily:"monospace",pointerEvents:"none",zIndex:1e4,whiteSpace:"nowrap"},children:[le.toFixed(0),"°"]}),document.body),y&&!K&&C(xi,{rect:{origin:{x:oo,y:On}
2116,size:{width:tn,height:hn}},rotation:o,children:me=>{const nt=((ne+90*o)%360+360)%360;return y({...me,context:{type:"group",annotations:a,pageIndex:t},selected:!0,placement:{suggestTop:q&&nt>90&&nt<270}})}})]})}function st(e){return{id:e.id,matches:e.matches?t=>e.matches(t):()=>!1,render:e.render?t=>e.render(t):()=>null,matchesPreview:e.matchesPreview,renderPreview:e.renderPreview?t=>e.renderPreview(t):void 0,previewContainerStyle:e.previewContainerStyle?t=>e.previewContainerStyle(t):void 0,vertexConfig:e.vertexConfig,zIndex:e.zIndex,defaultBlendMode:e.defaultBlendMode,containerStyle:e.containerStyle,interactionDefaults:e.interactionDefaults,useAppearanceStream:e.useAppearanceStream,isDraggable:e.isDraggable,onDoubleClick:e.onDoubleClick,selectOverride:e.selectOverride,hideSelectionMenu:e.hideSelectionMenu,hiddenWhenLocked:e.hiddenWhenLocked,renderLocked:e.renderLocked?t=>e.renderLocked(t):void 0}}function Ad({isSelected:e,strokeColor:t,opacity:n=1,strokeWidth:o,inkList:i,rect:r,scale:a,onClick:s,appearanceActive:l=!1}){const c=t??"#000000",d=ee(()=>i.map(({points:p})=>{let f="";return p.forEach(({x:v,y},b)=>{const w=v-r.origin.x,x=y-r.origin.y;f+=(b===0?"M":"L")+w+" "+x+" "}),f.trim()}),[i,r]),u=r.size.width*a,m=r.size.height*a,g=Math.max(o,20/a);return C("svg",{style:{position:"absolute",width:u,height:m,pointerEvents:"none",zIndex:2,overflow:"visible"},width:u,height:m,viewBox:`0 0 ${r.size.width} ${r.size.height}`,children:[d.map((p,f)=>C("path",{d:p,fill:"none",stroke:"transparent",strokeWidth:g,onPointerDown:s,style:{cursor:e?"move":s?"pointer":"default",pointerEvents:s?e?"none":"visibleStroke":"none",strokeLinecap:"round",strokeLinejoin:"round"}},`hit-${f}`)),!l&&d.map((p,f)=>C("path",{d:p,fill:"none",opacity:n,style:{pointerEvents:"none",stroke:c,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round"}},`vis-${f}`))]})}function Pd({isSelected:e,color:t="#000000",strokeColor:n,opacity:o=1,strokeWidth:i,strokeStyle:r=Te.SOLID,strokeDashArray:a,rect:s,scale:l,onClick:c,appearanceActive:d=!1,cloudyBorderIntensity:u,rectangleDifferences:m}){const g=(u??0)>0,{width:p,height:f,x:v,y}=ee(()=>{const I=s.size.width,S=s.size.height;return{width:Math.max(I-i,0),height:Math.max(S-i,0),x:i/2,y:i/2}},[s,i]),b=ee(()=>g?(function(I,S,A,M){const P=new ol;let T=0,D=0,F=I.width,N=I.height;return S?(T+=S.left,D+=S.top,F-=S.right,N-=S.bottom):(T+=M/2,D+=M/2,F-=M/2,N-=M/2),il([{x:T,y:-D},{x:F,y:-D},{x:F,y:-N},{x:T,y:-N},{x:T,y:-D}],!1,A,M,P),P.close(),P.build(M)})({width:s.size.width,height:s.size.height},m,u,i):null,[g,s,m,u,i]),w=s.size.width*l,x=s.size.height*l,k=Math.max(i,20/l);return C("svg",{style:{position:"absolute",width:w,height:x,pointerEvents:"none",zIndex:2},width:w,height:x,viewBox:`0 0 ${s.size.width} ${s.size.height}`,overflow:"visible",children:[g&&b?C("path",{d:b.path,fill:"transparent",stroke:"transparent",strokeWidth:k,onPointerDown:c,style:{cursor:e?"move":c?"pointer":"default",pointerEvents:c?e?"none":t==="transparent"?"visibleStroke":"visible":"none"}}):C("rect",{x:v,y,width:p,height:f,fill:"transparent",stroke:"transparent",strokeWidth:k,onPointerDown:c,style:{cursor:e?"move":c?"pointer":"default",pointerEvents:c?e?"none":t==="transparent"?"visibleStroke":"visible":"none"}}),!d&&(g&&b?C("path",{d:b.path,fill:t,opacity:o,style:{pointerEvents:"none",stroke:n??t,strokeWidth:i,strokeLinejoin:"round"}}):C("rect",{x:v,y,width:p,height:f,fill:t,opacity:o,style:{pointerEvents:"none",stroke:n??t,strokeWidth:i,...r===Te.DASHED&&{strokeDasharray:a?.join(",")}}}))]})}
vendor: 7,723 bytes, line 2116
2116function Dd({color:e="#000000",strokeColor:t,opacity:n=1,strokeWidth:o,strokeStyle:i=Te.SOLID,strokeDashArray:r,rect:a,scale:s,onClick:l,isSelected:c,appearanceActive:d=!1,cloudyBorderIntensity:u,rectangleDifferences:m}){const g=(u??0)>0,{width:p,height:f,cx:v,cy:y,rx:b,ry:w}=ee(()=>{const A=a.size.width,M=a.size.height,P=Math.max(A-o,0),T=Math.max(M-o,0);return{width:A,height:M,cx:o/2+P/2,cy:o/2+T/2,rx:P/2,ry:T/2}},[a,o]),x=ee(()=>g?(function(A,M,P,T){const D=new ol;let F=0,N=0,W=A.width,_=A.height;return M&&(F+=M.left,N+=M.top,W-=M.right,_-=M.bottom),f4(F,-_,W,-N,P,T,D),D.close(),D.build(T)})({width:a.size.width,height:a.size.height},m,u,o):null,[g,a,m,u,o]),k=p*s,I=f*s,S=Math.max(o,20/s);return C("svg",{style:{position:"absolute",width:k,height:I,pointerEvents:"none",zIndex:2},width:k,height:I,viewBox:`0 0 ${p} ${f}`,overflow:"visible",children:[g&&x?C("path",{d:x.path,fill:"transparent",stroke:"transparent",strokeWidth:S,onPointerDown:l,style:{cursor:c?"move":l?"pointer":"default",pointerEvents:l?c?"none":e==="transparent"?"visibleStroke":"visible":"none"}}):C("ellipse",{cx:v,cy:y,rx:b,ry:w,fill:"transparent",stroke:"transparent",strokeWidth:S,onPointerDown:l,style:{cursor:c?"move":l?"pointer":"default",pointerEvents:l?c?"none":e==="transparent"?"visibleStroke":"visible":"none"}}),!d&&(g&&x?C("path",{d:x.path,fill:e,opacity:n,style:{pointerEvents:"none",stroke:t??e,strokeWidth:o,strokeLinejoin:"round"}}):C("ellipse",{cx:v,cy:y,rx:b,ry:w,fill:e,opacity:n,style:{pointerEvents:"none",stroke:t??e,strokeWidth:o,...i===Te.DASHED&&{strokeDasharray:r?.join(",")}}}))]})}function Td({color:e="transparent",opacity:t=1,strokeWidth:n,strokeColor:o="#000000",strokeStyle:i=Te.SOLID,strokeDashArray:r,rect:a,linePoints:s,lineEndings:l,scale:c,onClick:d,isSelected:u,appearanceActive:m=!1}){const{x1:g,y1:p,x2:f,y2:v}=ee(()=>({x1:s.start.x-a.origin.x,y1:s.start.y-a.origin.y,x2:s.end.x-a.origin.x,y2:s.end.y-a.origin.y}),[s,a]),y=ee(()=>{const k=Math.atan2(v-p,f-g);return{start:zr.createEnding(l?.start,n,k+Math.PI,g,p),end:zr.createEnding(l?.end,n,k,f,v)}},[l,n,g,p,f,v]),b=a.size.width*c,w=a.size.height*c,x=Math.max(n,20/c);return C("svg",{style:{position:"absolute",width:b,height:w,pointerEvents:"none",zIndex:2,overflow:"visible"},width:b,height:w,viewBox:`0 0 ${a.size.width} ${a.size.height}`,children:[C("line",{x1:g,y1:p,x2:f,y2:v,stroke:"transparent",strokeWidth:x,onPointerDown:d,style:{cursor:u?"move":d?"pointer":"default",pointerEvents:d?u?"none":"visibleStroke":"none",strokeLinecap:"butt"}}),y.start&&C("path",{d:y.start.d,transform:y.start.transform,fill:"transparent",stroke:"transparent",strokeWidth:x,onPointerDown:d,style:{cursor:u?"move":d?"pointer":"default",pointerEvents:d?u?"none":y.start.filled?"visible":"visibleStroke":"none",strokeLinecap:"butt"}}),y.end&&C("path",{d:y.end.d,transform:y.end.transform,fill:"transparent",stroke:"transparent",strokeWidth:x,onPointerDown:d,style:{cursor:u?"move":d?"pointer":"default",pointerEvents:d?u?"none":y.end.filled?"visible":"visibleStroke":"none",strokeLinecap:"butt"}}),!m&&C(fe,{children:[C("line",{x1:g,y1:p,x2:f,y2:v,opacity:t,style:{pointerEvents:"none",stroke:o,strokeWidth:n,strokeLinecap:"butt",...i===Te.DASHED&&{strokeDasharray:r?.join(",")}}}),y.start&&C("path",{d:y.start.d,transform:y.start.transform,stroke:o,fill:y.start.filled?e:"none",style:{pointerEvents:"none",strokeWidth:n,strokeLinecap:"butt",...i===Te.DASHED&&{strokeDasharray:r?.join(",")}}}),y.end&&C("path",{d:y.end.d,transform:y.end.transform,stroke:o,fill:y.end.filled?e:"none",style:{pointerEvents:"none",strokeWidth:n,strokeLinecap:"butt",...i===Te.DASHED&&{strokeDasharray:r?.join(",")}}})]})]})}function zd({rect:e,vertices:t,color:n="transparent",strokeColor:o="#000000",opacity:i=1,strokeWidth:r,strokeStyle:a=Te.SOLID,strokeDashArray:s,scale:l,isSelected:c,onClick:d,lineEndings:u,appearanceActive:m=!1}){const g=ee(()=>t.map(({x:w,y:x})=>({x:w-e.origin.x,y:x-e.origin.y})),[t,e]),p=ee(()=>{if(!g.length)return"";const[w,...x]=g;return`M ${w.x} ${w.y} `+x.map(k=>`L ${k.x} ${k.y} `).join("").trim()},[g]),f=ee(()=>{if(g.length<2)return{start:null,end:null};const w=(I,S)=>Math.atan2(S.y-I.y,S.x-I.x),x=w(g[0],g[1]),k=w(g[g.length-2],g[g.length-1]);return{start:zr.createEnding(u?.start,r,x+Math.PI,g[0].x,g[0].y),end:zr.createEnding(u?.end,r,k,g[g.length-1].x,g[g.length-1].y)}},[g,u,r]),v=e.size.width*l,y=e.size.height*l,b=Math.max(r,20/l);return C("svg",{style:{position:"absolute",width:v,height:y,pointerEvents:"none",zIndex:2,overflow:"visible"},width:v,height:y,viewBox:`0 0 ${e.size.width} ${e.size.height}`,children:[C("path",{d:p,fill:"none",stroke:"transparent",strokeWidth:b,onPointerDown:d,style:{cursor:c?"move":d?"pointer":"default",pointerEvents:d?c?"none":"visibleStroke":"none",strokeLinecap:"butt",strokeLinejoin:"miter"}}),f.start&&C("path",{d:f.start.d,transform:f.start.transform,fill:"transparent",stroke:"transparent",strokeWidth:b,onPointerDown:d,style:{cursor:c?"move":d?"pointer":"default",pointerEvents:d?c?"none":f.start.filled?"visible":"visibleStroke":"none",strokeLinecap:"butt"}}),f.end&&C("path",{d:f.end.d,transform:f.end.transform,fill:"transparent",stroke:"transparent",strokeWidth:b,onPointerDown:d,style:{cursor:c?"move":d?"pointer":"default",pointerEvents:d?c?"none":f.end.filled?"visible":"visibleStroke":"none",strokeLinecap:"butt"}}),!m&&C(fe,{children:[C("path",{d:p,opacity:i,style:{fill:"none",stroke:o??n,strokeWidth:r,pointerEvents:"none",strokeLinecap:"butt",strokeLinejoin:"miter",...a===Te.DASHED&&{strokeDasharray:s?.join(",")}}}),f.start&&C("path",{d:f.start.d,transform:f.start.transform,stroke:o,fill:f.start.filled?n:"none",style:{pointerEvents:"none",strokeWidth:r,strokeLinecap:"butt",...a===Te.DASHED&&{strokeDasharray:s?.join(",")}}}),f.end&&C("path",{d:f.end.d,transform:f.end.transform,stroke:o,fill:f.end.filled?n:"none",style:{pointerEvents:"none",strokeWidth:r,strokeLinecap:"butt",...a===Te.DASHED&&{strokeDasharray:s?.join(",")}}})]})]})}function Rd({rect:e,vertices:t,color:n="transparent",strokeColor:o="#000000",opacity:i=1,strokeWidth:r,strokeStyle:a=Te.SOLID,strokeDashArray:s,scale:l,isSelected:c,onClick:d,currentVertex:u,handleSize:m=14,appearanceActive:g=!1,cloudyBorderIntensity:p}){const f=(p??0)>0,v=u?[...t,u]:t,y=ee(()=>v.map(({x:A,y:M})=>({x:A-e.origin.x,y:M-e.origin.y})),[v,e]),b=ee(()=>{if(!y.length)return"";const[A,...M]=y,P=!!u;return(`M ${A.x} ${A.y} `+M.map(T=>`L ${T.x} ${T.y}`).join(" ")+(P?"":" Z")).trim()},[y,u]),w=ee(()=>!f||v.length<3?null:(function(A,M,P,T){const D=new ol;if(A.length<3)return D.build(T);const F=A.map(_=>({x:_.x-M.x,y:-(_.y-M.y)})),N=F[0],W=F[F.length-1];return N.x===W.x&&N.y===W.y||F.push({x:N.x,y:N.y}),il(F,!1,P,T,D),D.close(),D.build(T)})(v,e.origin,p,r),[f,v,e.origin,p,r]),x=u&&t.length>0,k=e.size.width*l,I=e.size.height*l,S=Math.max(r,20/l);return C("svg",{style:{position:"absolute",width:k,height:I,pointerEvents:"none",zIndex:2,overflow:"visible"},width:k,height:I,viewBox:`0 0 ${e.size.width} ${e.size.height}`,children:[C("path",{d:f&&w?w.path:b,fill:"transparent",stroke:"transparent",strokeWidth:S,onPointerDown:d,style:{cursor:c?"move":d?"pointer":"default",pointerEvents:d?c?"none":n==="transparent"?"visibleStroke":"visible":"none",strokeLinecap:"butt",strokeLinejoin:"miter"}}),!g&&C(fe,{children:f&&w?C("path",{d:w.path,opacity:i,style:{fill:n,stroke:o??n,strokeWidth:r,pointerEvents:"none",strokeLinejoin:"round"}}):C(fe,{children:[C("path",{d:b,opacity:i,style:{fill:u?"none":n,stroke:o??n,strokeWidth:r,pointerEvents:"none",strokeLinecap:"butt",strokeLinejoin:"miter",...a===Te.DASHED&&{strokeDasharray:s?.join(",")}}}),x&&t.length>1&&C("path",{d:`M ${y[y.length-1].x} ${y[y.length-1].y} L ${y[0].x} ${y[0].y}
2116`,fill:"none",style:{stroke:o,strokeWidth:r,strokeDasharray:"4,4",opacity:.7,pointerEvents:"none"}}),x&&t.length>=2&&C("rect",{x:y[0].x-m/l/2,y:y[0].y-m/l/2,width:m/l,height:m/l,fill:o,opacity:.4,stroke:o,strokeWidth:r/2,style:{pointerEvents:"none"}})]})})]})}function u3({isSelected:e,color:t="#facc15",opacity:n=1,onClick:o,appearanceActive:i=!1}){const r=(function(a){try{const{red:s,green:l,blue:c}=fy(a);return(.299*s+.587*l+.114*c)/255<.45?"#fff":"#000"}catch{return"#000"}})(t);return C("div",{style:{position:"absolute",inset:0,zIndex:2,pointerEvents:o?e?"none":"auto":"none",cursor:e?"move":o?"pointer":"default"},onPointerDown:o,children:!i&&C("svg",{style:{position:"absolute",inset:0,pointerEvents:"none"},viewBox:"0 0 20 20",width:"100%",height:"100%",children:[C("path",{d:"M 0.5 15.5 L 0.5 0.5 L 19.5 0.5 L 19.5 15.5 L 8.5 15.5 L 6.5 19.5 L 4.5 15.5 Z",fill:t,opacity:n,stroke:r,strokeWidth:"1",strokeLinejoin:"miter"}),C("line",{x1:"2.5",y1:"4.25",x2:"17.5",y2:"4.25",stroke:r,strokeWidth:"1"}),C("line",{x1:"2.5",y1:"8",x2:"17.5",y2:"8",stroke:r,strokeWidth:"1"}),C("line",{x1:"2.5",y1:"11.75",x2:"17.5",y2:"11.75",stroke:r,strokeWidth:"1"})]})})}function h3({documentId:e,isSelected:t,isEditing:n,annotation:o,pageIndex:i,scale:r,onClick:a,appearanceActive:s=!1}){const l=Q(null),c=Q(!1),{provides:d}=en(),u=d?.forDocument(e)??null,{adjustedFontPx:m,wrapperStyle:g}=Xg(o.object.fontSize*r,n);return H(()=>{var p;if(n&&l.current){c.current=!0;const f=l.current;f.focus();const v=u?.findToolForAnnotation(o.object),y=((p=v?.defaults)==null?void 0:p.contents)!=null&&o.object.contents===v.defaults.contents,b=window.getSelection();if(b){const w=document.createRange();w.selectNodeContents(f),y||w.collapse(!1),b.removeAllRanges(),b.addRange(w)}}},[n]),C("div",{style:{position:"absolute",width:o.object.rect.size.width*r,height:o.object.rect.size.height*r,cursor:t&&!n?"move":"default",pointerEvents:a?t&&!n?"none":"auto":"none",zIndex:2,opacity:s?0:1},onPointerDown:a,children:C("span",{ref:l,onBlur:()=>{c.current&&(c.current=!1,u&&l.current&&u.updateAnnotation(i,o.object.id,{contents:l.current.innerText.replace(/\u00A0/g," ")}))},tabIndex:0,style:{color:o.object.fontColor,fontSize:m,...Yn(o.object.fontFamily),textAlign:$s(o.object.textAlign),flexDirection:"column",justifyContent:o.object.verticalAlign===Bt.Top?"flex-start":o.object.verticalAlign===Bt.Middle?"center":"flex-end",display:"flex",backgroundColor:o.object.color??o.object.backgroundColor,opacity:o.object.opacity,width:"100%",height:"100%",lineHeight:"1.18",overflow:"hidden",cursor:n?"text":a?"pointer":"default",outline:"none",...g},contentEditable:n,...r3,children:o.object.contents})})}function m3({documentId:e,pageIndex:t,annotation:n,scaleFactor:o=1,unrotated:i,style:r,...a}){const{provides:s}=en(),[l,c]=$(null),d=Q(null),{width:u,height:m}=n.rect.size;return H(()=>{if(s){const g=s.forDocument(e).renderAnnotation({pageIndex:t,annotation:n,options:{scaleFactor:o,dpr:window.devicePixelRatio,unrotated:i}});return g.wait(p=>{const f=URL.createObjectURL(p);c(f),d.current=f},vt),()=>{d.current?(URL.revokeObjectURL(d.current),d.current=null):g.abort({code:Z.Cancelled,message:"canceled render task"})}}},[t,o,i,s,e,n.id,u,m]),C(fe,{children:l&&C("img",{src:l,onLoad:()=>{d.current&&(URL.revokeObjectURL(d.current),d.current=null)},...a,style:{width:"100%",height:"100%",display:"block",...r||{}}})})}function p3({isSelected:e,annotation:t,documentId:n,pageIndex:o,scale:i,onClick:r}){const a=!!t.object.rotation&&!!t.object.unrotatedRect;return C("div",{style:{position:"absolute",width:"100%",height:"100%",zIndex:2,pointerEvents:r?e?"none":"auto":"none",cursor:r?"pointer":"default"},onPointerDown:r,children:C(m3,{documentId:n,pageIndex:o,annotation:{...t.object,id:t.object.id},scaleFactor:i,unrotated:a})})}function g3({isSelected:e,strokeColor:t="#0000FF",strokeWidth:n=2,strokeStyle:o=Te.UNDERLINE,strokeDashArray:i,rect:r,scale:a,onClick:s,hasIRT:l=!1}){const{width:c,height:d}=ee(()=>({width:r.size.width,height:r.size.height}),[r]),u=c*a,m=d*a,g=ee(()=>{if(o===Te.DASHED)return i?.join(",")??`${3*n},${n}`},[o,i,n]),p=o===Te.UNDERLINE;return C("svg",{style:{position:"absolute",width:u,height:m,pointerEvents:"none",zIndex:2},width:u,height:m,viewBox:`0 0 ${c} ${d}`,children:[C("rect",{x:0,y:0,width:c,height:d,fill:"transparent",onPointerDown:l?void 0:s,style:{cursor:l||!s?"default":e?"move":"pointer",pointerEvents:l||!s||e?"none":"visible"}}),p?C("line",{x1:1,y1:d-1,x2:c-1,y2:d-1,stroke:t,strokeWidth:n,strokeDasharray:g,style:{pointerEvents:"none"}}):C("rect",{x:n/2,y:n/2,width:Math.max(c-n,0),height:Math.max(d-n,0),fill:"transparent",stroke:t,strokeWidth:n,strokeDasharray:g,style:{pointerEvents:"none"}})]})}function Yg({strokeColor:e,opacity:t=.5,segmentRects:n,rect:o,scale:i,onClick:r,style:a,appearanceActive:s=!1}){const l=e??"#FFFF00";return C(fe,{children:n.map((c,d)=>C("div",{onPointerDown:r,style:{position:"absolute",left:(o?c.origin.x-o.origin.x:c.origin.x)*i,top:(o?c.origin.y-o.origin.y:c.origin.y)*i,width:c.size.width*i,height:c.size.height*i,background:s?"transparent":l,opacity:s?void 0:t,pointerEvents:r?"auto":"none",cursor:r?"pointer":"default",zIndex:r?1:void 0,...a}},d))})}function Qg({strokeColor:e,opacity:t=.5,segmentRects:n,rect:o,scale:i,onClick:r,style:a,appearanceActive:s=!1}){const l=e??"#FFFF00",c=2*i;return C(fe,{children:n.map((d,u)=>C("div",{onPointerDown:r,style:{position:"absolute",left:(o?d.origin.x-o.origin.x:d.origin.x)*i,top:(o?d.origin.y-o.origin.y:d.origin.y)*i,width:d.size.width*i,height:d.size.height*i,background:"transparent",pointerEvents:r?"auto":"none",cursor:r?"pointer":"default",zIndex:r?1:0,...a},children:!s&&C("div",{style:{position:"absolute",left:0,bottom:0,width:"100%",height:c,background:l,opacity:t,pointerEvents:"none"}})},u))})}function Jg({strokeColor:e,opacity:t=.5,segmentRects:n,rect:o,scale:i,onClick:r,style:a,appearanceActive:s=!1}){const l=e??"#FFFF00",c=2*i;return C(fe,{children:n.map((d,u)=>C("div",{onPointerDown:r,style:{position:"absolute",left:(o?d.origin.x-o.origin.x:d.origin.x)*i,top:(o?d.origin.y-o.origin.y:d.origin.y)*i,width:d.size.width*i,height:d.size.height*i,background:"transparent",pointerEvents:r?"auto":"none",cursor:r?"pointer":"default",zIndex:r?1:0,...a},children:!s&&C("div",{style:{position:"absolute",left:0,top:"50%",width:"100%",height:c,background:l,opacity:t,transform:"translateY(-50%)",pointerEvents:"none"}})},u))})}function e1({strokeColor:e,opacity:t=.5,segmentRects:n,rect:o,scale:i,onClick:r,style:a,appearanceActive:s=!1}){const l=2*i,c=6*i,d=`url("data:image/svg+xml;utf8,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="${c}" height="${2*l}
vendor: 4,649 bytes, lines 2116-2119
2116" viewBox="0 0 ${c} ${2*l}"> 2117 <path d="M0 ${l} Q ${c/4} 0 ${c/2} ${l} T ${c} ${l}" 2118 fill="none" stroke="${e??"#FFFF00"}" stroke-width="${l}" stroke-linecap="round"/> 2119 </svg>`)}")`;return C(fe,{children:n.map((u,m)=>C("div",{onPointerDown:r,style:{position:"absolute",left:(o?u.origin.x-o.origin.x:u.origin.x)*i,top:(o?u.origin.y-o.origin.y:u.origin.y)*i,width:u.size.width*i,height:u.size.height*i,background:"transparent",pointerEvents:r?"auto":"none",cursor:r?"pointer":"default",zIndex:r?1:0,...a},children:!s&&C("div",{style:{position:"absolute",left:0,bottom:0,width:"100%",height:2*l,backgroundImage:d,backgroundRepeat:"repeat-x",backgroundSize:`${c}px ${2*l}px`,opacity:t,pointerEvents:"none"}})},m))})}function f3({isSelected:e,strokeColor:t="#000000",opacity:n=1,rect:o,scale:i,onClick:r,appearanceActive:a=!1}){const{width:s,height:l,path:c}=ee(()=>{const m=o.size.width,g=o.size.height,p=m/2;return{width:m,height:g,path:[`M 0 ${g}`,`C ${.27*m} ${g} ${p} ${g-.44*g} ${p} 0`,`C ${p} ${g-.44*g} ${m-.27*m} ${g} ${m} ${g}`,"Z"].join(" ")}},[o]),d=s*i,u=l*i;return C("svg",{style:{position:"absolute",width:d,height:u,pointerEvents:"none",zIndex:2},width:d,height:u,viewBox:`0 0 ${s} ${l}`,overflow:"visible",children:[C("path",{d:c,fill:"transparent",stroke:"transparent",strokeWidth:4,onPointerDown:r,style:{cursor:e?"move":r?"pointer":"default",pointerEvents:r?e?"none":"visible":"none"}}),!a&&C("path",{d:c,fill:t,stroke:t,strokeWidth:.5,opacity:n,fillRule:"evenodd",style:{pointerEvents:"none"}})]})}function v3({annotation:e,documentId:t}){const{provides:n}=en();return C("div",{onClick:Y(()=>{const o=e.object.target;o&&n&&n.forDocument(t).navigateTarget(o)},[e.object.target,n,t]),style:{width:"100%",height:"100%",cursor:"pointer",pointerEvents:"auto"}})}const t1=[st({id:"ink",matches:e=>e.type===z.INK,matchesPreview:e=>e.type===z.INK,render:({currentObject:e,isSelected:t,scale:n,onClick:o,appearanceActive:i})=>C(Ad,{...e,isSelected:t,scale:n,onClick:o,appearanceActive:i}),renderPreview:({data:e,scale:t})=>C(Ad,{isSelected:!1,scale:t,...e}),previewContainerStyle:({data:e})=>({mixBlendMode:No(e.blendMode??xe.Normal)}),interactionDefaults:{isDraggable:!0,isResizable:!0,isRotatable:!0}}),st({id:"square",matches:e=>e.type===z.SQUARE,matchesPreview:e=>e.type===z.SQUARE,render:({currentObject:e,isSelected:t,scale:n,onClick:o,appearanceActive:i})=>C(Pd,{...e,isSelected:t,scale:n,onClick:o,appearanceActive:i}),renderPreview:({data:e,scale:t})=>C(Pd,{isSelected:!1,scale:t,...e}),interactionDefaults:{isDraggable:!0,isResizable:!0,isRotatable:!0}}),st({id:"circle",matches:e=>e.type===z.CIRCLE,matchesPreview:e=>e.type===z.CIRCLE,render:({currentObject:e,isSelected:t,scale:n,onClick:o,appearanceActive:i})=>C(Dd,{...e,isSelected:t,scale:n,onClick:o,appearanceActive:i}),renderPreview:({data:e,scale:t})=>C(Dd,{isSelected:!1,scale:t,...e}),interactionDefaults:{isDraggable:!0,isResizable:!0,isRotatable:!0}}),st({id:"line",matches:e=>e.type===z.LINE,matchesPreview:e=>e.type===z.LINE,render:({currentObject:e,isSelected:t,scale:n,onClick:o,appearanceActive:i})=>C(fe,{children:C(Td,{...e,isSelected:t,scale:n,onClick:o,appearanceActive:i})}),renderPreview:({data:e,scale:t})=>C(Td,{isSelected:!1,scale:t,...e}),vertexConfig:{extractVertices:e=>[e.linePoints.start,e.linePoints.end],transformAnnotation:(e,t)=>({...e,linePoints:{start:t[0],end:t[1]}})},interactionDefaults:{isDraggable:!0,isResizable:!1,isRotatable:!0}}),st({id:"polyline",matches:e=>e.type===z.POLYLINE,matchesPreview:e=>e.type===z.POLYLINE,render:({currentObject:e,isSelected:t,scale:n,onClick:o,appearanceActive:i})=>C(fe,{children:C(zd,{...e,isSelected:t,scale:n,onClick:o,appearanceActive:i})}),renderPreview:({data:e,scale:t})=>C(zd,{isSelected:!1,scale:t,...e}),vertexConfig:{extractVertices:e=>e.vertices,transformAnnotation:(e,t)=>({...e,vertices:t})},interactionDefaults:{isDraggable:!0,isResizable:!1,isRotatable:!0}}),st({id:"polygon",matches:e=>e.type===z.POLYGON,matchesPreview:e=>e.type===z.POLYGON,render:({currentObject:e,isSelected:t,scale:n,onClick:o,appearanceActive:i})=>C(fe,{children:C(Rd,{...e,isSelected:t,scale:n,onClick:o,appearanceActive:i})}),renderPreview:({data:e,scale:t})=>C(Rd,{isSelected:!1,scale:t,...e}),vertexConfig:{extractVertices:e=>e.vertices,transformAnnotation:(e,t)=>({...e,vertices:t})},interactionDefaults:{isDraggable:!0,isResizable:!1,isRotatable:!0}}),st({id:"highlight",matches:e=>e.type===z.HIGHLIGHT,render:({currentObject:e,scale:t,onClick:n,appearanceActive:o})=>C(Yg,{...e,scale:t,onClick:n,appearanceActive:o}),zIndex:0,interactionDefaults:{isDraggable:!1,isResizable:!1,isRotatable:!1}
2119,defaultBlendMode:xe.Multiply}),st({id:"underline",matches:e=>e.type===z.UNDERLINE,render:({currentObject:e,scale:t,onClick:n,appearanceActive:o})=>C(Qg,{...e,scale:t,onClick:n,appearanceActive:o}),zIndex:0,interactionDefaults:{isDraggable:!1,isResizable:!1,isRotatable:!1}}),st({id:"strikeout",matches:e=>e.type===z.STRIKEOUT,render:({currentObject:e,scale:t,onClick:n,appearanceActive:o})=>C(Jg,{...e,scale:t,onClick:n,appearanceActive:o}),zIndex:0,interactionDefaults:{isDraggable:!1,isResizable:!1,isRotatable:!1}}),st({id:"squiggly",matches:e=>e.type===z.SQUIGGLY,render:({currentObject:e,scale:t,onClick:n,appearanceActive:o})=>C(e1,{...e,scale:t,onClick:n,appearanceActive:o}),zIndex:0,interactionDefaults:{isDraggable:!1,isResizable:!1,isRotatable:!1}}),st({id:"text",matches:e=>e.type===z.TEXT&&!e.inReplyToId,render:({currentObject:e,isSelected:t,onClick:n,appearanceActive:o})=>C(u3,{isSelected:t,color:e.strokeColor??e.color,opacity:e.opacity,onClick:n,appearanceActive:o}),interactionDefaults:{isDraggable:!0,isResizable:!1,isRotatable:!1}}),st({id:"caret",matches:e=>e.type===z.CARET,render:({currentObject:e,isSelected:t,scale:n,onClick:o,appearanceActive:i})=>C(f3,{...e,isSelected:t,scale:n,onClick:o,appearanceActive:i}),interactionDefaults:{isDraggable:!1,isResizable:!1,isRotatable:!1}}),st({id:"freeText",matches:e=>e.type===z.FREETEXT,matchesPreview:e=>e.type===z.FREETEXT,render:({annotation:e,currentObject:t,isSelected:n,isEditing:o,scale:i,pageIndex:r,documentId:a,onClick:s,appearanceActive:l})=>C(h3,{documentId:a,isSelected:n,isEditing:o,annotation:{...e,object:t},pageIndex:r,scale:i,onClick:s,appearanceActive:l}),renderPreview:({data:e})=>C("div",{style:{width:"100%",height:"100%",border:`1px dashed ${e.fontColor||"#000000"}`,backgroundColor:"transparent"}}),interactionDefaults:{isDraggable:!0,isResizable:!0,isRotatable:!0},isDraggable:(e,{isEditing:t})=>e&&!t,onDoubleClick:(e,t)=>t(e)}),st({id:"stamp",matches:e=>e.type===z.STAMP,matchesPreview:e=>e.type===z.STAMP,render:({annotation:e,isSelected:t,documentId:n,pageIndex:o,scale:i,onClick:r})=>C(p3,{isSelected:t,annotation:e,documentId:n,pageIndex:o,scale:i,onClick:r}),renderPreview:({data:e})=>{const t=(4-e.pageRotation)%4*90;return C("img",{src:e.ghostUrl,style:{width:"100%",height:"100%",opacity:.6,objectFit:"contain",pointerEvents:"none",transform:t?`rotate(${t}deg)`:void 0},alt:""})},useAppearanceStream:!1,interactionDefaults:{isDraggable:!0,isResizable:!0,isRotatable:!0}}),st({id:"link",matches:e=>e.type===z.LINK,matchesPreview:e=>e.type===z.LINK,render:({currentObject:e,isSelected:t,scale:n,onClick:o})=>C(g3,{...e,isSelected:t,scale:n,onClick:o,hasIRT:!!e.inReplyToId}),renderPreview:({data:e,bounds:t,scale:n})=>C("div",{style:{position:"absolute",left:0,top:0,width:t.size.width*n,height:t.size.height*n,borderBottom:`${e.strokeWidth*n}px solid ${e.strokeColor}`,backgroundColor:"rgba(0, 0, 255, 0.05)",boxSizing:"border-box"}}),interactionDefaults:{isDraggable:!0,isResizable:!0,isRotatable:!1},useAppearanceStream:!1,selectOverride:(e,t,n)=>{if(e.stopPropagation(),n.clearSelection(),t.object.inReplyToId){const o=n.allAnnotations.find(i=>i.object.id===t.object.inReplyToId);if(o)return void n.selectAnnotation(o.object.pageIndex,o.object.id)}n.selectAnnotation(n.pageIndex,t.object.id)},hideSelectionMenu:e=>!!e.inReplyToId,renderLocked:e=>C(v3,{...e})})];function y3(e){const{documentId:t,pageIndex:n,scale:o,pageWidth:i,pageHeight:r,selectionMenu:a}=e,{provides:s}=en(),{provides:l}=ta(),[c,d]=$([]),{register:u}=(function({modeId:O,pageIndex:V,documentId:te}){const{provides:he}=Mi();return{register:(ne,K)=>{const le=K?.modeId??O,ie=K?.pageIndex??V,Fe=K?.documentId??te;return le?he?.registerHandlers({modeId:le,handlers:ne,pageIndex:ie,documentId:Fe}):he?.registerAlways({scope:ie!==void 0?{type:"page",documentId:Fe,pageIndex:ie}:{type:"global",documentId:Fe},handlers:ne})}}})({documentId:t,pageIndex:n}),[m,g]=$([]),[p,f]=$(null),[v,y]=$({}),[b,w]=$({type:ct.None}),x=Q(o),k=ee(()=>s?s.forDocument(t):null,[s,t]),I=m.length>1;H(()=>{if(k){const O=k.getState();return d(ns(O,n)),g(os(O)),w(O.locked),k.onStateChange(V=>{d(ns(V,n)),g(os(V)),w(V.locked)})}},[k,n]),H(()=>
2119{if(k)return k.onAnnotationEvent(O=>{O.type==="create"&&O.editAfterCreate&&f(O.annotation.id)})},[k]),H(()=>{k&&(x.current!==o&&(k.invalidatePageAppearances(n),x.current=o),k.getPageAppearances(n,{scaleFactor:o,dpr:typeof window<"u"?window.devicePixelRatio:1}).wait(O=>y(O),()=>y({})))},[k,n,o]);const S=ee(()=>({onPointerDown:(O,V)=>{V.target===V.currentTarget&&k&&(p&&c.some(te=>te.object.id===p)&&V.stopImmediatePropagation(),k.deselectAnnotation(),f(null))}}),[k,p,c]),A=Y((O,V)=>{O.stopPropagation(),k&&l&&(l.clear(),"metaKey"in O&&(O.metaKey||O.ctrlKey)?k.toggleSelection(n,V.object.id):k.selectAnnotation(n,V.object.id),V.object.id!==p&&f(null))},[k,l,p,n]);H(()=>u(S,{documentId:t}),[u,S]);const M=ee(()=>c.filter(O=>m.includes(O.object.id)),[c,m]),P=ee(()=>!(M.length<2)&&M.every(O=>{const V=k?.findToolForAnnotation(O.object),te=Xt(V?.interaction.isGroupDraggable,O.object,!0),he=Xt(V?.interaction.isDraggable,O.object,!0);return V?.interaction.isGroupDraggable!==void 0?te:he}),[M,k]),T=ee(()=>!(M.length<2)&&M.every(O=>{const V=k?.findToolForAnnotation(O.object),te=Xt(V?.interaction.isGroupResizable,O.object,!0),he=Xt(V?.interaction.isResizable,O.object,!0);return V?.interaction.isGroupResizable!==void 0?te:he}),[M,k]),D=ee(()=>!(M.length<2)&&M.every(O=>{const V=k?.findToolForAnnotation(O.object),te=Xt(V?.interaction.isGroupRotatable,O.object,!0),he=Xt(V?.interaction.isRotatable,O.object,!0);return V?.interaction.isGroupRotatable!==void 0?te:he}),[M,k]),F=ee(()=>!(M.length<2)&&M.some(O=>{const V=k?.findToolForAnnotation(O.object),te=Xt(V?.interaction.lockGroupAspectRatio,O.object,!1),he=Xt(V?.interaction.lockAspectRatio,O.object,!1);return V?.interaction.lockGroupAspectRatio!==void 0?te:he}),[M,k]),N=ee(()=>{if(!k)return!1;const O=k.getSelectedAnnotations();return O.length>1&&O.every(V=>V.object.pageIndex===n)},[k,n,m]),W=Y(O=>{if(O.dictMode||O.object.rotation&&O.object.unrotatedRect)return null;const V=v[O.object.id];return V?.normal?V:null},[v]),_=ee(()=>{const O=e.annotationRenderers??[],V=new Set(O.map(te=>te.id));return[...O,...t1.filter(te=>!V.has(te.id))]},[e.annotationRenderers]),G=Y(O=>_.find(V=>V.matches(O.object))??null,[_]),q=ee(()=>({defaultSelect:A,selectAnnotation:(O,V)=>k?.selectAnnotation(O,V),clearSelection:()=>l?.clear(),allAnnotations:c,pageIndex:n}),[A,k,l,c,n]);return C(fe,{children:[c.map(O=>{var V,te,he;const ne=G(O);if(!ne)return null;const K=k?.findToolForAnnotation(O.object)??null,le=ts(K),ie=dg(O.object)||fr(le,b);if(ie&&ne.hiddenWhenLocked)return null;const Fe=ie&&!!ne.renderLocked,He=!ie&&m.includes(O.object.id),it=!ie&&p===O.object.id,Ve=ne.interactionDefaults,kt=Xt(K?.interaction.isDraggable,O.object,Ve?.isDraggable??!0),Qe=!ie&&(ne.isDraggable?ne.isDraggable(kt,{isEditing:it}):kt),lt=((V=K?.behavior)==null?void 0:V.useAppearanceStream)??ne.useAppearanceStream??!0,we=Fe?void 0:lt?W(O):void 0,_e=ie?Pe=>{Pe.stopPropagation()}:ne.selectOverride?Pe=>ne.selectOverride(Pe,O,q):Pe=>A(Pe,O);return C(l3,{trackedAnnotation:O,isSelected:He,isEditing:it,isMultiSelected:!ie&&I,isDraggable:Qe,isResizable:!ie&&Xt(K?.interaction.isResizable,O.object,Ve?.isResizable??!1),lockAspectRatio:Xt(K?.interaction.lockAspectRatio,O.object,Ve?.lockAspectRatio??!1),isRotatable:!ie&&Xt(K?.interaction.isRotatable,O.object,Ve?.isRotatable??!1),vertexConfig:ie?void 0:ne.vertexConfig,selectionMenu:ie||(te=ne.hideSelectionMenu)!=null&&te.call(ne,O.object)?void 0:a,onSelect:_e,onDoubleClick:ie?void 0:ne.onDoubleClick?Pe=>{Pe.stopPropagation(),ne.onDoubleClick(O.object.id,f)}:void 0,zIndex:ne.zIndex,blendMode:No(O.object.blendMode??ne.defaultBlendMode??xe.Normal),style:(he=ne.containerStyle)==null?void 0:he.call(ne,O.object),appearance:we,...e,children:(Pe,{appearanceActive:We})=>Fe?ne.renderLocked({annotation:O,currentObject:Pe,isSelected:!1,isEditing:!1,scale:o,pageIndex:n,documentId:t,onClick:void 0,appearanceActive:We}):ne.render({annotation:O,currentObject:Pe,isSelected:He,isEditing:it,scale:o,pageIndex:n,documentId:t,onClick:ie?void 0:_e,appearanceActive:We})},O.object.id)}),N&&M.length>=2&&C(d3,{documentId:t,pageIndex:n,scale:o,rotation:e.rotation,pageWidth:i,pageHeight:r,selectedAnnotations:M,isDraggable:P,isResizable:T,isRotatable:D,lockAspectRatio:F,resizeUI:e.resizeUI,rotationUI:e.rotationUI,selectionOutlineColor:e.selectionOutlineColor,selectionOutline:e.groupSelectionOutline??e.selectionOutline,groupSelectionMenu:e.groupSelectionMenu})]})}function b3({documentId:e,pageIndex:t,scale:n}){var o,i,r,a,s,l,c,d,u,m,g,p;const{provides:f}=ta(),{provides:v}=en(),[y,b]=$([]),[w,x]=$(null),[k,I]=$(null);if(H(()=>
2119{if(f)return f.forDocument(e).onSelectionChange(()=>{b(f.forDocument(e).getHighlightRectsForPage(t)),x(f.forDocument(e).getBoundingRectForPage(t))})},[f,e,t]),H(()=>{if(v)return I(v.forDocument(e).getActiveTool()),v.forDocument(e).onActiveToolChange(S=>I(S))},[v,e]),!w||!k||!k.defaults)return null;switch(k.defaults.type){case z.UNDERLINE:return C("div",{style:{mixBlendMode:No(((o=k.defaults)==null?void 0:o.blendMode)??xe.Normal),pointerEvents:"none",position:"absolute",inset:0},children:C(Qg,{strokeColor:(i=k.defaults)==null?void 0:i.strokeColor,opacity:(r=k.defaults)==null?void 0:r.opacity,segmentRects:y,scale:n})});case z.HIGHLIGHT:return C("div",{style:{mixBlendMode:No(((a=k.defaults)==null?void 0:a.blendMode)??xe.Multiply),pointerEvents:"none",position:"absolute",inset:0},children:C(Yg,{strokeColor:(s=k.defaults)==null?void 0:s.strokeColor,opacity:(l=k.defaults)==null?void 0:l.opacity,segmentRects:y,scale:n})});case z.STRIKEOUT:return C("div",{style:{mixBlendMode:No(((c=k.defaults)==null?void 0:c.blendMode)??xe.Normal),pointerEvents:"none",position:"absolute",inset:0},children:C(Jg,{strokeColor:(d=k.defaults)==null?void 0:d.strokeColor,opacity:(u=k.defaults)==null?void 0:u.opacity,segmentRects:y,scale:n})});case z.SQUIGGLY:return C("div",{style:{mixBlendMode:No(((m=k.defaults)==null?void 0:m.blendMode)??xe.Normal),pointerEvents:"none",position:"absolute",inset:0},children:C(e1,{strokeColor:(g=k.defaults)==null?void 0:g.strokeColor,opacity:(p=k.defaults)==null?void 0:p.opacity,segmentRects:y,scale:n})});case z.CARET:default:return null}}function w3({toolId:e,preview:t,scale:n}){var o;const{bounds:i}=t,r=Zg(),a=ee(()=>{const c=new Set(r.map(d=>d.id));return[...r,...t1.filter(d=>!c.has(d.id))]},[r]),s={position:"absolute",left:i.origin.x*n,top:i.origin.y*n,width:i.size.width*n,height:i.size.height*n,pointerEvents:"none",zIndex:10},l=a.find(c=>{var d;return((d=c.matchesPreview)==null?void 0:d.call(c,t))&&c.renderPreview})??a.find(c=>c.id===e&&c.renderPreview);return l?.renderPreview?C("div",{style:{...s,...(o=l.previewContainerStyle)==null?void 0:o.call(l,{data:t.data,bounds:t.bounds,scale:n})},children:l.renderPreview({data:t.data,bounds:t.bounds,scale:n})}):null}function x3({documentId:e,pageIndex:t,scale:n}){const{plugin:o}=sa(),[i,r]=$(new Map),a=Q(null),s=ee(()=>({requestFile:({accept:l,onFile:c})=>{if(!a.current)return;const d=a.current;d.accept=l,d.onchange=u=>{var m;const g=(m=u.target.files)==null?void 0:m[0];g&&(c(g),d.value="")},d.click()}}),[]);return H(()=>{if(o)return o.registerPageHandlers(e,t,n,{services:s,onPreview:(l,c)=>{r(d=>{const u=new Map(d);return c?u.set(l,c):u.delete(l),u})}})},[e,t,n,o,s]),C(fe,{children:[C("input",{ref:a,type:"file",style:{display:"none"}}),Array.from(i.entries()).map(([l,c])=>C(w3,{toolId:l,preview:c,scale:n},l))]})}function C3({style:e,documentId:t,pageIndex:n,scale:o,rotation:i,selectionMenu:r,groupSelectionMenu:a,resizeUI:s,vertexUI:l,rotationUI:c,selectionOutlineColor:d,selectionOutline:u,groupSelectionOutline:m,customAnnotationRenderer:g,annotationRenderers:p,...f}){var v,y,b,w;const x=At(t),k=(y=(v=x?.document)==null?void 0:v.pages)==null?void 0:y[n],I=((b=k?.size)==null?void 0:b.width)??0,S=((w=k?.size)==null?void 0:w.height)??0,A=Zg(),M=ee(()=>{const T=[...A];for(const D of p??[]){const F=T.findIndex(N=>N.id===D.id);F>=0?T[F]=D:T.push(D)}return T},[A,p]),P=ee(()=>o!==void 0?o:x?.scale??1,[o,x?.scale]);return C("div",{style:{...e},...f,children:[C(y3,{documentId:t,selectionMenu:r,groupSelectionMenu:a,pageIndex:n,scale:P,rotation:ee(()=>i!==void 0?i:((k?.rotation??0)+(x?.rotation??0))%4,[i,k?.rotation,x?.rotation]),pageWidth:I,pageHeight:S,resizeUI:s,vertexUI:l,rotationUI:c,selectionOutlineColor:d,selectionOutline:u,groupSelectionOutline:m,customAnnotationRenderer:g,annotationRenderers:M}),C(b3,{documentId:t,pageIndex:n,scale:P}),C(x3,{documentId:t,pageIndex:n,scale:P})]})}const k3=cn(B4).addWrapper(function({children:e}){const[t,n]=$([]),o=Y(i=>(n(r=>{const a=new Set(i.map(s=>s.id));return[...r.filter(s=>!a.has(s.id)),...i]}),()=>n(r=>r.filter(a=>!i.some(s=>s.id===a.id)))),[]);return C(qg.Provider,{value:o,children:C(Vg.Provider,{value:t,children:e})})}).addUtility(function(){const{plugin:e}=sa(),{provides:t}=en();return H(()=>
2119{if(t&&e)return t.onNavigate(n=>{n.result.outcome==="uri"&&e.config.autoOpenLinks!==!1&&window.open(n.result.uri,"_blank","noopener,noreferrer")})},[t,e]),null}).build(),n1="print",I3={id:n1,name:"Print Plugin",version:"1.0.0",provides:["print"],requires:[],optional:[],defaultConfig:{}},o1=class extends Ye{constructor(e,t,n){super(e,t),this.printReady$=xt()}buildCapability(){return{print:e=>this.print(e),forDocument:e=>this.createPrintScope(e)}}createPrintScope(e){return{print:t=>this.print(t,e)}}print(e,t){const n=t??this.getActiveDocumentId();if(!this.checkPermission(n,j.Print))return this.logger.debug("PrintPlugin","Print",`Cannot print: document ${n} lacks Print permission`),se.reject({code:Z.Security,message:"Document lacks Print permission"});const o=e??{},i=new de;return i.progress({stage:"preparing",message:"Preparing document..."}),this.preparePrintDocument(o,n).wait(r=>{i.progress({stage:"document-ready",message:"Document prepared successfully"}),this.printReady$.emit({documentId:n,options:o,buffer:r,task:i})},r=>i.fail(r)),i}preparePrintDocument(e,t){const n=this.coreState.core.documents[t];return n?.document?this.engine.preparePrintDocument(n.document,e):se.reject({code:Z.DocNotOpen,message:`Document ${t} not found`})}onPrintRequest(e){return this.printReady$.on(e)}async initialize(e){this.logger.info("PrintPlugin","Initialize","Print plugin initialized")}async destroy(){this.printReady$.clear(),await super.destroy()}};o1.id="print";let cs=o1;const i1=()=>at(cs.id),S3=cn({manifest:I3,create:(e,t)=>new cs(n1,e,t),reducer:()=>{},initialState:{}}).addUtility(function(){const{provides:e}=i1(),{plugin:t}=$t(cs.id),n=Q(null),o=Q(null);return H(()=>{if(!e||!t)return;const i=t.onPrintRequest(({buffer:r,task:a})=>{const s=n.current;if(!s)return;o.current&&(URL.revokeObjectURL(o.current),o.current=null);const l=URL.createObjectURL(new Blob([r],{type:"application/pdf"}));o.current=l,s.onload=()=>{var c,d;s.src===l&&(a.progress({stage:"iframe-ready",message:"Ready to print"}),(c=s.contentWindow)==null||c.focus(),(d=s.contentWindow)==null||d.print(),a.progress({stage:"printing",message:"Print dialog opened"}),a.resolve(r))},s.src=l});return()=>{i(),o.current&&URL.revokeObjectURL(o.current)}},[e,t]),C("iframe",{ref:n,style:{position:"absolute",display:"none"},title:"Print Document",src:"about:blank"})}).build(),r1="fullscreen",M3={id:r1,name:"Fullscreen Plugin",version:"1.0.0",provides:["fullscreen"],requires:[],optional:[],defaultConfig:{}},a1="SET_FULLSCREEN",s1=class extends Ye{constructor(e,t,n){super(e,t),this.onStateChange$=Ae(),this.fullscreenRequest$=xt(),this.config=n}async initialize(e){}buildCapability(){return{isFullscreen:()=>this.state.isFullscreen,enableFullscreen:e=>this.enableFullscreen(e),exitFullscreen:()=>this.exitFullscreen(),toggleFullscreen:e=>this.toggleFullscreen(e),onRequest:this.fullscreenRequest$.on,onStateChange:this.onStateChange$.on}}getTargetSelector(){return this.currentTargetElement??this.config.targetElement}toggleFullscreen(e){this.state.isFullscreen?this.exitFullscreen():this.enableFullscreen(e)}enableFullscreen(e){this.currentTargetElement=e??this.config.targetElement,this.fullscreenRequest$.emit({action:"enter",targetElement:this.currentTargetElement})}exitFullscreen(){this.fullscreenRequest$.emit({action:"exit"}),this.currentTargetElement=void 0}onStoreUpdated(e,t){this.onStateChange$.emit(t)}setFullscreenState(e){this.dispatch({type:a1,payload:e})}async destroy(){this.fullscreenRequest$.clear(),super.destroy()}};s1.id="fullscreen";let ds=s1;const Ed=()=>$t(ds.id);async function A3(e,t,n){if(e.action==="enter"){const o=(function(i,r,a){if(!r||i.action!=="enter")return r;let s=null;return a&&(s=r.querySelector(a),s||console.warn(`Fullscreen: Could not find element with selector "${a}" within the wrapper. Falling back to wrapper element.`)),s||(s=r),s})(e,t,n);o&&!document.fullscreenElement&&await o.requestFullscreen()}else document.fullscreenElement&&await document.exitFullscreen()}const P3=cn({manifest:M3,create:(e,t)=>new ds(r1,e,t),reducer:(e,t)=>t.type===a1?{...e,isFullscreen:t.payload}:e,initialState:{isFullscreen:!1}}).addWrapper(function({children:e,...t}){const{provides:n}=at(ds.id),{plugin:o}=Ed(),{plugin:i}=Ed(),r=Q(null);return H(()=>
2119{if(!(!n||!o))return n.onRequest(async a=>{const s=o.getTargetSelector();await A3(a,r.current,s)})},[n,o]),H(()=>{if(!i)return;const a=()=>i.setFullscreenState(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",a),()=>document.removeEventListener("fullscreenchange",a)},[i]),C("div",{...t,style:{position:"relative",width:"100%",height:"100%",...t.style},ref:r,children:e})}).build(),l1="bookmark",D3={id:l1,name:"Bookmark Plugin",version:"1.0.0",provides:["bookmark"],requires:[],optional:[],defaultConfig:{}},c1=class extends Ye{constructor(e,t){super(e,t)}async initialize(e){}buildCapability(){return{getBookmarks:()=>this.getBookmarks(),forDocument:e=>this.createBookmarkScope(e)}}createBookmarkScope(e){return{getBookmarks:()=>this.getBookmarks(e)}}getBookmarks(e){const t=e??this.getActiveDocumentId(),n=this.coreState.core.documents[t];if(!n?.document)throw new Error(`Document ${t} not loaded`);return this.engine.getBookmarks(n.document)}};c1.id="bookmark";let d1=c1;const T3={manifest:D3,create:e=>new d1(l1,e),reducer:()=>{},initialState:{}},u1=class extends Ye{constructor(e,t,n){super(e,t),this.downloadRequest$=xt(),this.config=n}buildCapability(){return{saveAsCopy:()=>this.saveAsCopy(),download:()=>this.download(),forDocument:e=>this.createExportScope(e)}}createExportScope(e){return{saveAsCopy:()=>this.saveAsCopy(e),download:()=>this.download(e)}}download(e){const t=e??this.getActiveDocumentId();this.downloadRequest$.emit({documentId:t})}saveAsCopy(e){const t=e??this.getActiveDocumentId(),n=this.coreState.core.documents[t];return n?.document?this.engine.saveAsCopy(n.document):se.reject({code:Z.DocNotOpen,message:`Document ${t} not found`})}saveAsCopyAndGetBufferAndName(e){const t=new de,n=this.coreState.core.documents[e];return n?.document?(this.saveAsCopy(e).wait(o=>{t.resolve({buffer:o,name:n.name??this.config.defaultFileName})},o=>t.fail(o)),t):se.reject({code:Z.DocNotOpen,message:`Document ${e} not found`})}onRequest(e){return this.downloadRequest$.on(e)}async initialize(e){this.logger.info("ExportPlugin","Initialize","Export plugin initialized")}async destroy(){this.downloadRequest$.clear(),await super.destroy()}};u1.id="export";let _d=u1;const Ld="export",z3=cn({manifest:{id:Ld,name:"Export Plugin",version:"1.0.0",provides:["export"],requires:[],optional:[],defaultConfig:{defaultFileName:"document.pdf"}},create:(e,t)=>new _d(Ld,e,t),reducer:()=>{},initialState:{}}).addUtility(function(){const{plugin:e}=$t(_d.id),t=Q(null);return H(()=>{if(e)return e.onRequest(n=>{const o=t.current;o&&e.saveAsCopyAndGetBufferAndName(n.documentId).wait(({buffer:i,name:r})=>{const a=URL.createObjectURL(new Blob([i]));o.href=a,o.download=r,o.click(),URL.revokeObjectURL(a)},vt)})},[e]),C("a",{style:{display:"none"},ref:t})}).build(),h1="PAN/INIT_STATE",m1="PAN/CLEANUP_STATE",p1="PAN/SET_PAN_MODE",g1=class extends Ye{constructor(e,t,n){var o,i,r;super(e,t),this.panMode$=Ae(),this.documentHandlers=new Map,this.config=n,this.interactionManager=(o=t.getPlugin(sl.id))==null?void 0:o.provides(),this.viewport=(i=t.getPlugin(Jr.id))==null?void 0:i.provides(),this.interactionManager&&(this.interactionManager.registerMode({id:"panMode",scope:"global",exclusive:!1,cursor:"grab",wantsRawTouch:!1}),(r=this.interactionManager)==null||r.onModeChange(a=>{const s=a.activeMode==="panMode",l=this.getDocumentState(a.documentId);l&&l.isPanMode!==s&&this.dispatch((function(c,d){return{type:p1,payload:{documentId:c,isPanMode:d}}})(a.documentId,s))}))}onDocumentLoadingStarted(e){this.dispatch((function(t,n){return{type:h1,payload:{documentId:t,state:n}}})(e,{isPanMode:!1})),this.registerPanHandlersForDocument(e),this.config.defaultMode==="always"&&this.makePanDefault(!0),this.logger.debug("PanPlugin","DocumentOpened",`Initialized pan state for document: ${e}`)}onDocumentClosed(e){const t=this.documentHandlers.get(e);t&&(t(),this.documentHandlers.delete(e)),this.dispatch((function(n){return{type:m1,payload:n}})(e)),this.logger.debug("PanPlugin","DocumentClosed",`Cleaned up pan state for document: ${e}`)}buildCapability(){return{enablePan:()=>this.enablePan(),disablePan:()=>this.disablePan(),togglePan:()=>this.togglePan(),makePanDefault:e=>this.makePanDefault(e),isPanMode:()=>this.isPanMode(),forDocument:e=>this.createPanScope(e),onPanModeChange:this.panMode$.on}}createPanScope(e){return{enablePan:()=>this.enablePan(e),disablePan:()=>this.disablePan(e),togglePan:()=>this.togglePan(e),isPanMode:()=>this.isPanMode(e),onPanModeChange:t=>this.panMode$.on(n=>{n.documentId===e&&t(n.isPanMode)})}}getDocumentState(e){const t=e??this.getActiveDocumentId();return this.state.documents[t]??null}getDocumentStateOrThrow(e){const t=this.getDocumentState(e);if(!t)throw new Error(`Pan state not found for document: ${e??"active"}`);return t}enablePan(e){const t=e??this.getActiveDocumentId();this.interactionManager.forDocument(t).activate("panMode")}disablePan(e){const t=e??this.getActiveDocumentId();this.interactionManager.forDocument(t).activateDefaultMode()}togglePan(e){const t=e??this.getActiveDocumentId(),n=this.interactionManager.forDocument(t);n.getActiveMode()==="panMode"?n.activateDefaultMode():n.activate("panMode")}makePanDefault(e=!0){this.interactionManager&&(this.interactionManager.setDefaultMode("panMode"),e&&this.interactionManager.activateDefaultMode())}isPanMode(e){return this.getDocumentStateOrThrow(e).isPanMode}registerPanHandlersForDocument(e){if(!this.interactionManager||!this.viewport)return;let t=null;const n=this.interactionManager.forDocument(e),o=this.viewport.forDocument(e),i={onMouseDown:(a,s)=>{const l=o.getMetrics();t={startX:s.clientX,startY:s.clientY,startLeft:l.scrollLeft,startTop:l.scrollTop},n.setCursor("panMode","grabbing",10)},onMouseMove:(a,s)=>{if(!t)return;const l=s.clientX-t.startX,c=s.clientY-t.startY;o.scrollTo({x:t.startLeft-l,y:t.startTop-c})},onMouseUp:()=>{t&&(t=null,n.removeCursor("panMode"))},onMouseLeave:()=>{t&&(t=null,n.removeCursor("panMode"))},onMouseCancel:()=>{t&&(t=null,n.removeCursor("panMode"))}},r=this.interactionManager.registerHandlers({documentId:e,modeId:"panMode",handlers:i});this.documentHandlers.set(e,r)}onStoreUpdated(e,t){for(const n in t.documents){const o=e.documents[n],i=t.documents[n];o?.isPanMode!==i.isPanMode&&(this.panMode$.emit({documentId:n,isPanMode:i.isPanMode}),this.logger.debug("PanPlugin","PanModeChanged",`Pan mode changed for document ${n}: ${o?.isPanMode??!1}
2119 -> ${i.isPanMode}`))}}async initialize(e){this.logger.info("PanPlugin","Initialize","Pan plugin initialized")}async destroy(){this.documentHandlers.forEach(e=>e()),this.documentHandlers.clear(),this.panMode$.clear(),await super.destroy()}};g1.id="pan";let Ra=g1;const Od={documents:{},activeDocumentId:null},R3=cn({manifest:{id:"pan",name:"Pan Plugin",version:"1.0.0",provides:["pan"],requires:["interaction-manager","viewport"],optional:[],defaultConfig:{defaultMode:"mobile"}},create:(e,t)=>new Ra("pan",e,t),reducer:(e=Od,t)=>{switch(t.type){case h1:{const{documentId:n,state:o}=t.payload;return{...e,documents:{...e.documents,[n]:o},activeDocumentId:e.activeDocumentId??n}}case m1:{const n=t.payload,{[n]:o,...i}=e.documents;return{...e,documents:i,activeDocumentId:e.activeDocumentId===n?null:e.activeDocumentId}}case"PAN/SET_ACTIVE_DOCUMENT":return{...e,activeDocumentId:t.payload};case p1:{const{documentId:n,isPanMode:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,isPanMode:o}}}:e}default:return e}},initialState:Od}).addUtility(()=>{const{provides:e}=at(Ra.id),{plugin:t}=$t(Ra.id);return H(()=>{var n;if(!e||!t)return;const o=((n=t.config)==null?void 0:n.defaultMode)??"never",i=typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0);o==="mobile"&&i&&e.makePanDefault()},[e,t]),null}).build(),f1="capture",E3={id:f1,name:"Capture Plugin",version:"1.0.0",provides:["capture"],requires:["render"],optional:["interaction-manager"],defaultConfig:{scale:1,imageType:"image/png",withAnnotations:!1}},v1="CAPTURE/INIT_STATE",y1="CAPTURE/CLEANUP_STATE",b1="CAPTURE/SET_MARQUEE_CAPTURE_ACTIVE",_3={isMarqueeCaptureActive:!1},Nd={documents:{},activeDocumentId:null},w1=class extends Ye{constructor(e,t,n){var o;super(e,t),this.captureArea$=xt(),this.state$=Ae(),this.config=n,this.renderCapability=this.registry.getPlugin("render").provides(),this.interactionManagerCapability=(o=this.registry.getPlugin("interaction-manager"))==null?void 0:o.provides(),this.interactionManagerCapability&&(this.interactionManagerCapability.registerMode({id:"marqueeCapture",scope:"page",exclusive:!0,cursor:"crosshair"}),this.interactionManagerCapability.onModeChange(i=>{const r=i.activeMode==="marqueeCapture",a=this.getDocumentState(i.documentId);var s;a&&a.isMarqueeCaptureActive!==r&&this.dispatch((s=i.documentId,{type:b1,payload:{documentId:s,isActive:r}}))}))}onDocumentLoadingStarted(e){const t={..._3};this.dispatch((function(n,o){return{type:v1,payload:{documentId:n,state:o}}})(e,t)),this.logger.debug("CapturePlugin","DocumentOpened",`Initialized capture state for document: ${e}`)}onDocumentClosed(e){this.dispatch((function(t){return{type:y1,payload:t}})(e)),this.logger.debug("CapturePlugin","DocumentClosed",`Cleaned up capture state for document: ${e}`)}async initialize(e){}buildCapability(){return{captureArea:(e,t)=>this.captureArea(e,t),enableMarqueeCapture:()=>this.enableMarqueeCapture(),disableMarqueeCapture:()=>this.disableMarqueeCapture(),toggleMarqueeCapture:()=>this.toggleMarqueeCapture(),isMarqueeCaptureActive:()=>this.isMarqueeCaptureActive(),getState:()=>this.getDocumentStateOrThrow(),forDocument:e=>this.createCaptureScope(e),registerMarqueeOnPage:e=>this.registerMarqueeOnPage(e),onCaptureArea:this.captureArea$.on,onStateChange:this.state$.on}}createCaptureScope(e){return{captureArea:(t,n)=>this.captureArea(t,n,e),enableMarqueeCapture:()=>this.enableMarqueeCapture(e),disableMarqueeCapture:()=>this.disableMarqueeCapture(e),toggleMarqueeCapture:()=>this.toggleMarqueeCapture(e),isMarqueeCaptureActive:()=>this.isMarqueeCaptureActive(e),getState:()=>this.getDocumentStateOrThrow(e),onCaptureArea:t=>this.captureArea$.on(n=>{n.documentId===e&&t(n)}),onStateChange:t=>this.state$.on(n=>{n.documentId===e&&t(n.state)})}}getDocumentState(e){const t=e??this.getActiveDocumentId();return this.state.documents[t]??null}getDocumentStateOrThrow(e){const t=this.getDocumentState(e);if(!t)throw new Error(`Capture state not found for document: ${e??"active"}`);return t}registerMarqueeOnPage(e){if(!this.interactionManagerCapability)return this.logger.warn("CapturePlugin","MissingDependency","Interaction manager plugin not loaded, marquee capture disabled"),()=>{};const t=this.coreState.core.documents[e.documentId];if(!t||!t.document)return this.logger.warn("CapturePlugin","DocumentNotFound","Document not found"),()=>{};const n=t.document.pages[e.pageIndex];if(!n)return this.logger.warn("CapturePlugin","PageNotFound",`Page ${e.pageIndex} not found`),()=>{};const o=(function(i){const{pageSize:r,scale:a,minDragPx:s=5,onPreview:l,onCommit:c}=i;let d=null,u=null;return{onPointerDown:(m,g)=>{var p;
2119d=m,u={origin:{x:m.x,y:m.y},size:{width:0,height:0}},l?.(u),(p=g.setPointerCapture)==null||p.call(g)},onPointerMove:m=>{if(!d)return;const g=ve(m.x,0,r.width),p=ve(m.y,0,r.height);u={origin:{x:Math.min(d.x,g),y:Math.min(d.y,p)},size:{width:Math.abs(g-d.x),height:Math.abs(p-d.y)}},l?.(u)},onPointerUp:(m,g)=>{var p;u&&Math.max(u.size.width,u.size.height)*a>s&&c?.(u),d=null,u=null,l?.(null),(p=g.releasePointerCapture)==null||p.call(g)},onPointerCancel:(m,g)=>{var p;d=null,u=null,l?.(null),(p=g.releasePointerCapture)==null||p.call(g)}}})({pageSize:n.size,scale:e.scale,onPreview:e.callback.onPreview,onCommit:i=>{var r,a;this.captureArea(e.pageIndex,i,e.documentId),(a=(r=e.callback).onCommit)==null||a.call(r,i)}});return this.interactionManagerCapability.registerHandlers({documentId:e.documentId,modeId:"marqueeCapture",handlers:o,pageIndex:e.pageIndex})}captureArea(e,t,n){const o=n??this.getActiveDocumentId();this.disableMarqueeCapture(o),this.renderCapability.forDocument(o).renderPageRect({pageIndex:e,rect:t,options:{imageType:this.config.imageType,scaleFactor:this.config.scale,withAnnotations:this.config.withAnnotations||!1}}).wait(i=>{this.captureArea$.emit({documentId:o,pageIndex:e,rect:t,blob:i,imageType:this.config.imageType||"image/png",scale:this.config.scale||1,withAnnotations:this.config.withAnnotations||!1})},vt)}enableMarqueeCapture(e){var t;const n=e??this.getActiveDocumentId();(t=this.interactionManagerCapability)==null||t.forDocument(n).activate("marqueeCapture")}disableMarqueeCapture(e){var t;const n=e??this.getActiveDocumentId();(t=this.interactionManagerCapability)==null||t.forDocument(n).activateDefaultMode()}toggleMarqueeCapture(e){var t;const n=e??this.getActiveDocumentId(),o=(t=this.interactionManagerCapability)==null?void 0:t.forDocument(n);o?.getActiveMode()==="marqueeCapture"?o.activateDefaultMode():o?.activate("marqueeCapture")}isMarqueeCaptureActive(e){var t;const n=e??this.getActiveDocumentId();return((t=this.interactionManagerCapability)==null?void 0:t.forDocument(n).getActiveMode())==="marqueeCapture"}onStoreUpdated(e,t){for(const n in t.documents){const o=e.documents[n],i=t.documents[n];o&&i&&o.isMarqueeCaptureActive!==i.isMarqueeCaptureActive&&this.state$.emit({documentId:n,state:i})}}async destroy(){this.captureArea$.clear(),this.state$.clear(),super.destroy()}};w1.id="capture";let x1=w1;const L3={manifest:E3,create:(e,t)=>new x1(f1,e,t),reducer:(e=Nd,t)=>{switch(t.type){case v1:{const{documentId:n,state:o}=t.payload;return{...e,documents:{...e.documents,[n]:o},activeDocumentId:e.activeDocumentId??n}}case y1:{const n=t.payload,{[n]:o,...i}=e.documents;return{...e,documents:i,activeDocumentId:e.activeDocumentId===n?null:e.activeDocumentId}}case"CAPTURE/SET_ACTIVE_DOCUMENT":return{...e,activeDocumentId:t.payload};case b1:{const{documentId:n,isActive:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,isMarqueeCaptureActive:o}}}:e}default:return e}},initialState:Nd},C1=()=>at(x1.id),O3=({documentId:e,pageIndex:t,scale:n,className:o,stroke:i="rgba(33,150,243,0.8)",fill:r="rgba(33,150,243,0.15)"})=>{const{provides:a}=C1(),s=At(e),[l,c]=$(null),d=ee(()=>n!==void 0?n:s?.scale??1,[n,s?.scale]);return H(()=>{if(a)return a.registerMarqueeOnPage({documentId:e,pageIndex:t,scale:d,callback:{onPreview:c}})},[a,e,t,d]),l?C("div",{style:{position:"absolute",pointerEvents:"none",left:l.origin.x*d,top:l.origin.y*d,width:l.size.width*d,height:l.size.height*d,border:`1px solid ${i}`,background:r,boxSizing:"border-box"},className:o}):null},Fo="history",N3={id:Fo,name:"History Plugin",version:"1.0.0",provides:["history"],requires:[],optional:[],defaultConfig:{}},k1="HISTORY/INIT_STATE",I1="HISTORY/CLEANUP_STATE",S1="HISTORY/SET_DOCUMENT_STATE",M1=class extends Ye{constructor(e,t){super(e,t),this.documentHistories=new Map,this.historyChange$=xt()}async initialize(e){this.logger.info("HistoryPlugin","Initialize","History plugin initialized")}onDocumentLoadingStarted(e){this.dispatch((t=>({type:k1,payload:{documentId:t}}))(e)),this.documentHistories.set(e,{topicHistories:new Map,globalTimeline:[],globalIndex:-1}),this.logger.debug("HistoryPlugin","DocumentOpened",`Initialized history state for document: ${e}`)}onDocumentClosed(e){this.dispatch((t=>({type:I1,payload:{documentId:t}}))(e)),this.documentHistories.delete(e),this.logger.debug("HistoryPlugin","DocumentClosed",`Cleaned up history state for document: ${e}`)}getDocumentHistoryData(e){const t=e??this.getActiveDocumentId(),n=this.documentHistories.get(t);if(!n)throw new Error(`History data not found for document: ${t}`);return n}getDocumentHistoryState(e){const t=this.documentHistories.get(e);if(!t)throw new Error(`History data not found for document: ${e}`);const n={};
vendor: 5,282 bytes, line 2119
2119return Array.from(t.topicHistories.entries()).forEach(([o,i])=>{n[o]={canUndo:i.currentIndex>-1,canRedo:i.currentIndex<i.commands.length-1}}),{global:{canUndo:t.globalIndex>-1,canRedo:t.globalIndex<t.globalTimeline.length-1},topics:n}}emitHistoryChange(e,t){const n=this.getDocumentHistoryState(e);this.dispatch(((o,i)=>({type:S1,payload:{documentId:o,state:i}}))(e,n)),this.historyChange$.emit({documentId:e,topic:t,state:n})}register(e,t,n){const o=this.getDocumentHistoryData(n);o.topicHistories.has(t)||o.topicHistories.set(t,{commands:[],currentIndex:-1});const i=o.topicHistories.get(t);i.commands.splice(i.currentIndex+1),i.commands.push(e),i.currentIndex++;const r={command:e,topic:t};o.globalTimeline.splice(o.globalIndex+1),o.globalTimeline.push(r),o.globalIndex++,e.execute(),this.emitHistoryChange(n,t)}undo(e,t){const n=this.getDocumentHistoryData(t);let o;if(e){const i=n.topicHistories.get(e);i&&i.currentIndex>-1&&(i.commands[i.currentIndex].undo(),i.currentIndex--,o=e)}else if(n.globalIndex>-1){const i=n.globalTimeline[n.globalIndex];i.command.undo(),n.topicHistories.get(i.topic).currentIndex--,n.globalIndex--,o=i.topic}o&&this.emitHistoryChange(t,o)}redo(e,t){const n=this.getDocumentHistoryData(t);let o;if(e){const i=n.topicHistories.get(e);i&&i.currentIndex<i.commands.length-1&&(i.currentIndex++,i.commands[i.currentIndex].execute(),o=e)}else if(n.globalIndex<n.globalTimeline.length-1){n.globalIndex++;const i=n.globalTimeline[n.globalIndex];i.command.execute(),n.topicHistories.get(i.topic).currentIndex++,o=i.topic}o&&this.emitHistoryChange(t,o)}canUndo(e,t){const n=this.getDocumentHistoryData(t);if(e){const o=n.topicHistories.get(e);return!!o&&o.currentIndex>-1}return n.globalIndex>-1}canRedo(e,t){const n=this.getDocumentHistoryData(t);if(e){const o=n.topicHistories.get(e);return!!o&&o.currentIndex<o.commands.length-1}return n.globalIndex<n.globalTimeline.length-1}purgeByMetadata(e,t,n){const o=this.getDocumentHistoryData(n);let i=0;const r=c=>e(c.metadata),a=t?[t]:Array.from(o.topicHistories.keys());for(const c of a){const d=o.topicHistories.get(c);if(!d)continue;const u=[];let m=0;for(let g=0;g<d.commands.length;g++){const p=d.commands[g];r(p)?(g<=d.currentIndex&&m++,i++):u.push(p)}d.commands=u,d.currentIndex=Math.max(-1,d.currentIndex-m)}const s=[];let l=0;for(let c=0;c<o.globalTimeline.length;c++){const d=o.globalTimeline[c];(!t||d.topic===t)&&r(d.command)?c<=o.globalIndex&&l++:s.push(d)}return o.globalTimeline=s,o.globalIndex=Math.max(-1,o.globalIndex-l),i>0&&(this.emitHistoryChange(n,t),this.logger.debug("HistoryPlugin","PurgeByMetadata",`Purged ${i} history entries for document: ${n}${t?`, topic: ${t}`:""}`)),i}createHistoryScope(e){return{register:(t,n)=>this.register(t,n,e),undo:t=>this.undo(t,e),redo:t=>this.redo(t,e),canUndo:t=>this.canUndo(t,e),canRedo:t=>this.canRedo(t,e),getHistoryState:()=>this.getDocumentHistoryState(e),onHistoryChange:t=>this.historyChange$.on(n=>{n.documentId===e&&t(n.topic)}),purgeByMetadata:(t,n)=>this.purgeByMetadata(t,n,e)}}buildCapability(){return{register:(e,t)=>{const n=this.getActiveDocumentId();this.register(e,t,n)},undo:e=>{const t=this.getActiveDocumentId();this.undo(e,t)},redo:e=>{const t=this.getActiveDocumentId();this.redo(e,t)},canUndo:e=>{const t=this.getActiveDocumentId();return this.canUndo(e,t)},canRedo:e=>{const t=this.getActiveDocumentId();return this.canRedo(e,t)},getHistoryState:()=>{const e=this.getActiveDocumentId();return this.getDocumentHistoryState(e)},forDocument:e=>this.createHistoryScope(e),onHistoryChange:this.historyChange$.on,purgeByMetadata:(e,t)=>{const n=this.getActiveDocumentId();return this.purgeByMetadata(e,t,n)}}}async destroy(){this.historyChange$.clear(),this.documentHistories.clear(),super.destroy()}};M1.id="history";let A1=M1;const $3={global:{canUndo:!1,canRedo:!1},topics:{}},$d={documents:{},activeDocumentId:null},F3={manifest:N3,create:e=>new A1(Fo,e),reducer:(e=$d,t)=>{switch(t.type){case k1:{const{documentId:n}=t.payload;return{...e,documents:{...e.documents,[n]:{...$3}}}}case I1:{const{documentId:n}=t.payload,{[n]:o,...i}=e.documents;return{...e,documents:i,activeDocumentId:e.activeDocumentId===n?null:e.activeDocumentId}}case S1:{const{documentId:n,state:o}=t.payload;return e.documents[n]?{...e,documents:{...e.documents,[n]:o}}:e}case"HISTORY/SET_ACTIVE_DOCUMENT":return{...e,activeDocumentId:t.payload};default:return e}},initialState:$d};var Je=(e=>(e.Redact="redact",e.MarqueeRedact="marqueeRedact",e.RedactSelection="redactSelection",e))(Je||{});const P1="REDACTION/INIT_STATE",D1="REDACTION/CLEANUP_STATE",T1="START_REDACTION",z1="END_REDACTION",R1="ADD_PENDING",E1="REMOVE_PENDING",_1="UPDATE_PENDING",L1="CLEAR_PENDING",O1="SELECT_PENDING",N1="DESELECT_PENDING",si=(e,t)=>({type:R1,payload:{documentId:e,items:t}}),li=(e,t,n)=>({type:E1,payload:{documentId:e,page:t,id:n}}),Ea=e=>({type:L1,payload:e}),Fd=(e,t,n,o)=>({type:_1,payload:{documentId:e,page:t,id:n,patch:o}}),jd=(e,t,n)=>({type:O1,payload:{documentId:e,page:t,id:n}}),Bd=e=>({type:N1,payload:e}),Hd=e=>Object.values(e).reduce((t,n)=>t+n.length,0),vr={isRedacting:!1,activeType:null,pending:{},pendingCount:0,selected:null},Ud={documents:{},activeDocumentId:null},$1={id:"redact",name:"Redact",categories:["annotation","redaction"],matchScore:e=>
2119e.type===z.REDACT?10:0,interaction:{mode:Je.Redact,exclusive:!1,cursor:"crosshair",textSelection:!0,isDraggable:e=>{var t;return e.type!==z.REDACT||!((t=e.segmentRects)!=null&&t.length)},isResizable:e=>{var t;return e.type!==z.REDACT||!((t=e.segmentRects)!=null&&t.length)},isRotatable:!1,lockAspectRatio:!1,isGroupDraggable:!1,isGroupResizable:!1,isGroupRotatable:!1},defaults:{type:z.REDACT,color:"#000000",overlayColor:"#FFFFFF",strokeColor:"#E44234",opacity:1},behavior:{useAppearanceStream:!1}},j3=[$1],F1=class extends Ye{constructor(e,t,n){var o,i,r,a;if(super(e,t),this.redactionSelection$=new Map,this.redactionMarquee$=new Map,this.pending$=Ae(),this.selected$=Ae(),this.state$=Ae(),this.events$=Ae(),this.documentUnsubscribers=new Map,this.config=n,this.selectionCapability=(o=this.registry.getPlugin("selection"))==null?void 0:o.provides(),this.interactionManagerCapability=(i=this.registry.getPlugin("interaction-manager"))==null?void 0:i.provides(),this.annotationCapability=(r=this.registry.getPlugin("annotation"))==null?void 0:r.provides(),this.historyCapability=(a=this.registry.getPlugin("history"))==null?void 0:a.provides(),this.config.useAnnotationMode?this.annotationCapability?this.useAnnotationMode=!0:(this.logger.warn("RedactionPlugin","ConfigError","useAnnotationMode is enabled but annotation plugin is not available. Falling back to legacy mode."),this.useAnnotationMode=!1):this.useAnnotationMode=!1,this.useAnnotationMode&&this.annotationCapability)for(const s of j3)this.annotationCapability.addTool(s);this.setupRedactionModes(),!this.useAnnotationMode&&this.annotationCapability&&this.logger.info("RedactionPlugin","LegacyMode","Using legacy redaction mode. Set useAnnotationMode: true in config to use annotation-based redactions."),this.setupModeChangeListener()}setupRedactionModes(){this.interactionManagerCapability&&(this.interactionManagerCapability.registerMode({id:Je.Redact,scope:"page",exclusive:!1,cursor:"crosshair"}),this.interactionManagerCapability.registerMode({id:Je.MarqueeRedact,scope:"page",exclusive:!1,cursor:"crosshair"}),this.interactionManagerCapability.registerMode({id:Je.RedactSelection,scope:"page",exclusive:!1}))}setupModeChangeListener(){var e;(e=this.interactionManagerCapability)==null||e.onModeChange(t=>{const n=t.documentId;if(t.activeMode===Je.Redact||t.activeMode===Je.MarqueeRedact||t.activeMode===Je.RedactSelection)this.dispatch(((o,i)=>({type:T1,payload:{documentId:o,mode:i}}))(n,t.activeMode));else{const o=this.getDocumentState(n);o?.isRedacting&&this.dispatch((i=>({type:z1,payload:i}))(n))}})}onDocumentLoadingStarted(e){this.dispatch((function(n,o){return{type:P1,payload:{documentId:n,state:o}}})(e,{...vr})),this.redactionSelection$.set(e,Ae()),this.redactionMarquee$.set(e,Ae());const t=[];if(this.selectionCapability){const n=this.selectionCapability.forDocument(e),o=n.onSelectionChange(()=>{const l=this.getDocumentState(e);if(!l?.isRedacting)return;const c=n.getFormattedSelection(),d=this.redactionSelection$.get(e);d?.emit(c)}),i=n.onEndSelection(()=>{const l=this.getDocumentState(e);if(!l?.isRedacting||!this.checkPermission(e,j.ModifyContents))return;const c=n.getFormattedSelection();if(!c.length)return;const d=n.getSelectedText(),u=this.redactionSelection$.get(e);u?.emit([]),n.clear(),d.wait(m=>{const g=m.join(" ");this.createRedactionsFromSelection(e,c,g)},()=>{this.createRedactionsFromSelection(e,c)})}),r=n.onMarqueeChange(l=>{var c;const d=this.getDocumentState(e);d?.isRedacting&&((c=this.redactionMarquee$.get(e))==null||c.emit({pageIndex:l.pageIndex,rect:l.rect,modeId:l.modeId}))}),a=n.onMarqueeEnd(l=>{const c=this.getDocumentState(e);if(c?.isRedacting&&this.checkPermission(e,j.ModifyContents))if(this.useAnnotationMode)this.createRedactAnnotationFromArea(e,l.pageIndex,l.rect);else{const d=this.config.drawBlackBoxes?"#000000":"transparent",u={id:Ce(),kind:"area",page:l.pageIndex,rect:l.rect,source:"legacy",markColor:"#FF0000",redactionColor:d};this.dispatch(si(e,[u])),this.selectPending(l.pageIndex,u.id,e)}}),s=n.onEmptySpaceClick(()=>{this.deselectPending(e)});t.push(o,i,r,a,s)}if(this.useAnnotationMode&&this.annotationCapability){const n=this.annotationCapability.forDocument(e),o=n.onAnnotationEvent(r=>{var a;if(r.type==="loaded")return void this.syncFromAnnotationLoad(e);if(((a=r.annotation)==null?void 0:a.type)!==z.REDACT)return;const s=r.annotation;r.type==="create"?(this.syncFromAnnotationCreate(e,s),this.events$.emit({type:"add",documentId:e,items:[this.annotationToRedactionItem(s)]})):r.type==="update"?(this.logger.debug("RedactionPlugin","AnnotationUpdated",{documentId:e,redactAnno:s,patch:r.patch}),this.syncFromAnnotationUpdate(e,s,r.patch)):r.type==="delete"&&(this.syncFromAnnotationDelete(e,s),this.events$.emit({type:"remove",documentId:e,page:s.pageIndex,id:s.id}))}),i=n.onStateChange(()=>{this.syncSelectionFromAnnotation(e)});t.push(o,i)}this.documentUnsubscribers.set(e,t),this.logger.debug("RedactionPlugin","DocumentOpened",`Initialized redaction state for document: ${e}`)}onDocumentLoaded(e){var t,n,o;(t=this.selectionCapability)==null||t.enableForMode(Je.Redact,{enableSelection:!0,showSelectionRects:!1,enableMarquee:!0,showMarqueeRects:!1},e),(n=this.selectionCapability)==null||n.enableForMode(Je.MarqueeRedact,{enableSelection:!1,enableMarquee:!0,showMarqueeRects:!1},e),(o=this.selectionCapability)==null||o.enableForMode(Je.RedactSelection,{enableSelection:!0,showSelectionRects:!1},e)}onDocumentClosed(e){this.dispatch((function(i){return{type:D1,payload:i}})(e));const t=this.redactionSelection$.get(e);t?.clear(),this.redactionSelection$.delete(e);const n=this.redactionMarquee$.get(e);n?.clear(),this.redactionMarquee$.delete(e);const o=this.documentUnsubscribers.get(e);
2119o&&(o.forEach(i=>i()),this.documentUnsubscribers.delete(e)),this.logger.debug("RedactionPlugin","DocumentClosed",`Cleaned up redaction state for document: ${e}`)}async initialize(e){this.logger.info("RedactionPlugin","Initialize","Redaction plugin initialized")}buildCapability(){return{queueCurrentSelectionAsPending:()=>this.queueCurrentSelectionAsPending(),enableRedact:()=>this.enableRedact(),toggleRedact:()=>this.toggleRedact(),isRedactActive:()=>this.isRedactActive(),endRedact:()=>this.endRedact(),enableMarqueeRedact:()=>this.enableMarqueeRedact(),toggleMarqueeRedact:()=>this.toggleMarqueeRedact(),isMarqueeRedactActive:()=>this.isMarqueeRedactActive(),enableRedactSelection:()=>this.enableRedactSelection(),toggleRedactSelection:()=>this.toggleRedactSelection(),isRedactSelectionActive:()=>this.isRedactSelectionActive(),addPending:e=>this.addPendingItems(e),removePending:(e,t)=>this.removePendingItem(e,t),clearPending:()=>this.clearPendingItems(),commitAllPending:()=>this.commitAllPending(),commitPending:(e,t)=>this.commitPendingOne(e,t),selectPending:(e,t)=>
2119this.selectPending(e,t),getSelectedPending:()=>this.getSelectedPending(),deselectPending:()=>this.deselectPending(),getState:()=>this.getDocumentStateOrThrow(),forDocument:e=>this.createRedactionScope(e),onPendingChange:this.pending$.on,onSelectedChange:this.selected$.on,onRedactionEvent:this.events$.on,onStateChange:this.state$.on}}createRedactionScope(e){return{queueCurrentSelectionAsPending:()=>this.queueCurrentSelectionAsPending(e),enableRedact:()=>this.enableRedact(e),toggleRedact:()=>this.toggleRedact(e),isRedactActive:()=>this.isRedactActive(e),endRedact:()=>this.endRedact(e),enableMarqueeRedact:()=>this.enableMarqueeRedact(e),toggleMarqueeRedact:()=>this.toggleMarqueeRedact(e),isMarqueeRedactActive:()=>this.isMarqueeRedactActive(e),enableRedactSelection:()=>this.enableRedactSelection(e),toggleRedactSelection:()=>this.toggleRedactSelection(e),isRedactSelectionActive:()=>this.isRedactSelectionActive(e),addPending:t=>this.addPendingItems(t,e),removePending:(t,n)=>this.removePendingItem(t,n,e),clearPending:()=>this.clearPendingItems(e),commitAllPending:()=>this.commitAllPending(e),commitPending:(t,n)=>this.commitPendingOne(t,n,e),selectPending:(t,n)=>this.selectPending(t,n,e),getSelectedPending:()=>this.getSelectedPending(e),deselectPending:()=>this.deselectPending(e),getState:()=>this.getDocumentStateOrThrow(e),onPendingChange:t=>this.pending$.on(n=>{n.documentId===e&&t(n.pending)}),onSelectedChange:t=>this.selected$.on(n=>{n.documentId===e&&t(n.selected)}),onRedactionEvent:t=>this.events$.on(n=>{n.documentId===e&&t(n)}),onStateChange:t=>this.state$.on(n=>{n.documentId===e&&t(n.state)})}}getPendingFromAnnotations(e){if(!this.annotationCapability)return{};try{const t=this.annotationCapability.forDocument(e).getState(),n={};for(const o of Object.values(t.byUid))if(o.object.type===z.REDACT){const i=this.annotationToRedactionItem(o.object),r=o.object.pageIndex;(n[r]??(n[r]=[])).push(i)}return n}catch{return{}}}getDocumentState(e){const t=e??this.getActiveDocumentId();return this.state.documents[t]??null}getDocumentStateOrThrow(e){const t=this.getDocumentState(e);if(!t)throw new Error(`Redaction state not found for document: ${e??"active"}`);return t}isRedactTool(e){return e?.id===$1.id&&e.defaults.type===z.REDACT}getRedactTool(){var e;const t=(e=this.annotationCapability)==null?void 0:e.getTool("redact");return this.isRedactTool(t)?t:void 0}syncFromAnnotationCreate(e,t){const n=this.annotationToRedactionItem(t);this.dispatch(si(e,[n]))}syncFromAnnotationUpdate(e,t,n){if(!("rect"in n||"segmentRects"in n||"strokeColor"in n||"color"in n))return;const o={};n.rect&&(o.rect=n.rect),n.segmentRects&&(o.rects=n.segmentRects),n.strokeColor&&(o.markColor=n.strokeColor),n.color&&(o.redactionColor=n.color),this.logger.debug("RedactionPlugin","AnnotationUpdated",{documentId:e,annotation:t,patch:o}),this.dispatch(Fd(e,t.pageIndex,t.id,o))}syncFromAnnotationDelete(e,t){this.dispatch(li(e,t.pageIndex,t.id))}syncFromAnnotationLoad(e){const t=this.getPendingFromAnnotations(e);this.dispatch(Ea(e));for(const[,n]of Object.entries(t))n.length>0&&this.dispatch(si(e,n))}syncSelectionFromAnnotation(e){var t;const n=(t=this.annotationCapability)==null?void 0:t.forDocument(e).getState();if(!n)return;const o=n.selectedUids.map(i=>n.byUid[i]).find(i=>i?.object.type===z.REDACT);if(o){const i=o.object;this.dispatch(jd(e,i.pageIndex,i.id))}else{const i=this.getDocumentState(e);i?.selected&&this.dispatch(Bd(e))}}addPendingItems(e,t){const n=t??this.getActiveDocumentId();if(this.checkPermission(n,j.ModifyContents)){if(this.useAnnotationMode){if(!this.annotationCapability)return;const o=this.annotationCapability.forDocument(n);for(const i of e){const r=this.redactionItemToAnnotation(i);o.createAnnotation(i.page,r)}if(e.length>0){const i=e[e.length-1];o.selectAnnotation(i.page,i.id)}}else this.dispatch(si(n,e));this.events$.emit({type:"add",documentId:n,items:e})}else this.logger.debug("RedactionPlugin","AddPendingItems",`Cannot add redactions: document ${n} lacks ModifyContents permission`)}removePendingItem(e,t,n){var o;const i=n??this.getActiveDocumentId();this.useAnnotationMode?(o=this.annotationCapability)==null||o.forDocument(i).deleteAnnotation(e,t):this.dispatch(li(i,e,t)),this.events$.emit({type:"remove",documentId:i,page:e,id:t})}clearPendingItems(e){var t;const n=e??this.getActiveDocumentId();if(this.useAnnotationMode){const o=this.getPendingFromAnnotations(n),i=(t=this.annotationCapability)==null?void 0:t.forDocument(n);for(const[r,a]of Object.entries(o)){const s=Number(r);for(const l of a)i?.deleteAnnotation(s,l.id)}}else this.dispatch(Ea(n));this.events$.emit({type:"clear",documentId:n})}selectPending(e,t,n){var o,i,r;const a=n??this.getActiveDocumentId();this.useAnnotationMode?(o=this.annotationCapability)==null||o.forDocument(a).selectAnnotation(e,t):(this.dispatch(jd(a,e,t)),(i=this.interactionManagerCapability)==null||i.claimPageActivity(a,"redaction-selection",e)),(r=this.selectionCapability)==null||r.forDocument(a).clear()}getSelectedPending(e){var t;const n=e??this.getActiveDocumentId();return((t=this.getDocumentState(n))==null?void 0:t.selected)??null}deselectPending(e){var t,n;const o=e??this.getActiveDocumentId();this.useAnnotationMode?(t=this.annotationCapability)==null||t.forDocument(o).deselectAnnotation():(this.dispatch(Bd(o)),(n=this.interactionManagerCapability)==null||n.releasePageActivity(o,"redaction-selection"))}enableRedactSelection(e){var t;const n=e??this.getActiveDocumentId();this.checkPermission(n,j.ModifyContents)?(t=this.interactionManagerCapability)==null||t.forDocument(n).activate(Je.RedactSelection):this.logger.debug("RedactionPlugin","EnableRedactSelection",`Cannot enable redact selection: document ${n} lacks ModifyContents permission`)}toggleRedactSelection(e){var t;const n=e??this.getActiveDocumentId(),o=(t=this.interactionManagerCapability)==null?void 0:t.forDocument(n);if(o?.getActiveMode()===Je.RedactSelection)o?.activateDefaultMode();else{if(!this.checkPermission(n,j.ModifyContents))return;o?.activate(Je.RedactSelection)}}isRedactSelectionActive(e){var t;const n=e??this.getActiveDocumentId(),o=(t=this.interactionManagerCapability)==null?void 0:t.forDocument(n).getActiveMode();return o===Je.Redact||o===Je.RedactSelection}enableMarqueeRedact(e){var t;const n=e??this.getActiveDocumentId();this.checkPermission(n,j.ModifyContents)?(t=this.interactionManagerCapability)==null||t.forDocument(n).activate(Je.MarqueeRedact):this.logger.debug("RedactionPlugin","EnableMarqueeRedact",`Cannot enable marquee redact: document ${n} lacks ModifyContents permission`)}toggleMarqueeRedact(e){var t;const n=e??this.getActiveDocumentId(),o=(t=this.interactionManagerCapability)==null?void 0:t.forDocument(n);if(o?.getActiveMode()===Je.MarqueeRedact)o?.activateDefaultMode();else{if(!this.checkPermission(n,j.ModifyContents))return;o?.activate(Je.MarqueeRedact)}}isMarqueeRedactActive(e){var t;const n=e??this.getActiveDocumentId(),o=(t=this.interactionManagerCapability)==null?void 0:t.forDocument(n).getActiveMode();return o===Je.Redact||o===Je.MarqueeRedact}enableRedact(e){var t;const n=e??this.getActiveDocumentId();this.checkPermission(n,j.ModifyContents)?(t=this.interactionManagerCapability)==null||t.forDocument(n).activate(Je.Redact):this.logger.debug("RedactionPlugin","EnableRedact",`Cannot enable redact mode: document ${n} lacks ModifyContents permission`)}toggleRedact(e){var t;const n=e??this.getActiveDocumentId(),o=(t=this.interactionManagerCapability)==null?void 0:t.forDocument(n);if(o?.getActiveMode()===Je.Redact)o?.activateDefaultMode();else{if(!this.checkPermission(n,j.ModifyContents))return;o?.activate(Je.Redact)}}isRedactActive(e){var t;const n=e??this.getActiveDocumentId();return((t=this.interactionManagerCapability)==null?void 0:t.forDocument(n).getActiveMode())===Je.Redact}endRedact(e){var t;const n=e??this.getActiveDocumentId();(t=this.interactionManagerCapability)==null||t.forDocument(n).activateDefaultMode()}onRedactionSelectionChange(e,t){const n=this.redactionSelection$.get(e);return n?.on(t)??(()=>{})}onRedactionMarqueeChange(e,t){const n=this.redactionMarquee$.get(e);return n?.on(t)??(()=>{})}getPreviewStrokeColor(){var e;return this.useAnnotationMode?((e=this.getRedactTool())==null?void 0:e.defaults.strokeColor)??"#FF0000":"#FF0000"}queueCurrentSelectionAsPending(e){const t=e??this.getActiveDocumentId();if(!this.selectionCapability)return se.reject({code:Z.NotFound,message:"[RedactionPlugin] selection plugin required"});const n=this.coreState.core.documents[t];if(!n?.document)return se.reject({code:Z.NotFound,message:"Document not found"});const o=this.selectionCapability.forDocument(t),i=o.getFormattedSelection();if(!i.length)return se.resolve(!0);const r=o.getSelectedText(),a=this.redactionSelection$.get(t);a?.emit([]),o.clear(),this.useAnnotationMode||this.enableRedactSelection(t);const s=new de;return r.wait(l=>{const c=l.join(" ");this.createRedactionsFromSelection(t,i,c),s.resolve(!0)},()=>{this.createRedactionsFromSelection(t,i),s.resolve(!0)}),s}commitPendingOne(e,t,n){const o=n??this.getActiveDocumentId();if(!this.checkPermission(o,j.ModifyContents))return this.logger.debug("RedactionPlugin","CommitPendingOne",`Cannot commit redaction: document ${o} lacks ModifyContents permission`),se.reject({code:Z.Security,message:"Document lacks ModifyContents permission"});const i=this.coreState.core.documents[o];if(!i?.document)return se.reject({code:Z.NotFound,message:"Document not found"});const r=i.document.pages[e];if(!r)return se.reject({code:Z.NotFound,message:"Page not found"});if(this.useAnnotationMode)return this.logger.debug("RedactionPlugin","CommitPendingOne",`Applying redaction in annotation mode: page ${e}, id ${t}`),this.applyRedactionAnnotationMode(o,i.document,r,t);
2119const a=this.getDocumentState(o);if(!a)return se.reject({code:Z.NotFound,message:"Document state not found"});const s=(a.pending[e]??[]).find(l=>l.id===t);return s?this.commitPendingOneLegacy(o,i.document,r,e,s):(this.logger.debug("RedactionPlugin","CommitPendingOne",`No pending item found for page ${e}, id ${t}`),se.resolve(!0))}commitPendingOneLegacy(e,t,n,o,i){const r=i.kind==="text"?i.rects:[i.rect],a=new de;return this.engine.redactTextInRects(t,n,r,{drawBlackBoxes:this.config.drawBlackBoxes}).wait(()=>{this.dispatch(li(e,o,i.id)),this.dispatchCoreAction(Vi(e,[o])),this.events$.emit({type:"commit",documentId:e,success:!0}),a.resolve(!0)},s=>{this.events$.emit({type:"commit",documentId:e,success:!1,error:s.reason}),a.reject({code:Z.Unknown,message:"Failed to commit redactions"})}),a}applyRedactionAnnotationMode(e,t,n,o){var i;const r=new de,a=(i=this.annotationCapability)==null?void 0:i.forDocument(e).getAnnotationById(o);return this.logger.debug("RedactionPlugin","ApplyRedactionAnnotationMode",`Looking for annotation ${o}, found: ${!!a}, type: ${a?.object.type}`),a&&a.object.type===z.REDACT?(this.logger.debug("RedactionPlugin","ApplyRedactionAnnotationMode",`Calling engine.applyRedaction for annotation ${o} on page ${n.index}`),this.engine.applyRedaction(t,n,a.object).wait(()=>{var s,l;this.logger.debug("RedactionPlugin","ApplyRedactionAnnotationMode",`Successfully applied redaction ${o} on page ${n.index}`),(s=this.annotationCapability)==null||s.forDocument(e).purgeAnnotation(n.index,o),this.dispatch(li(e,n.index,o)),(l=this.historyCapability)==null||l.forDocument(e).purgeByMetadata(c=>{var d;return((d=c?.annotationIds)==null?void 0:d.includes(o))??!1},"annotations"),this.dispatchCoreAction(Vi(e,[n.index])),this.events$.emit({type:"commit",documentId:e,success:!0}),r.resolve(!0)},s=>{var l;this.logger.error("RedactionPlugin","ApplyRedactionAnnotationMode",`Failed to apply redaction ${o}: ${((l=s.reason)==null?void 0:l.message)??"Unknown error"}`),this.events$.emit({type:"commit",documentId:e,success:!1,error:s.reason}),r.reject({code:Z.Unknown,message:"Failed to apply redaction"})}),r):(this.logger.warn("RedactionPlugin","ApplyRedactionAnnotationMode",`Redaction annotation not found or wrong type: ${o}`),se.reject({code:Z.NotFound,message:"Redaction annotation not found"}))}commitAllPending(e){const t=e??this.getActiveDocumentId();if(!this.checkPermission(t,j.ModifyContents))return this.logger.debug("RedactionPlugin","CommitAllPending",`Cannot commit redactions: document ${t} lacks ModifyContents permission`),se.reject({code:Z.Security,message:"Document lacks ModifyContents permission"});const n=this.coreState.core.documents[t];if(!n?.document)return se.reject({code:Z.NotFound,message:"Document not found"});const o=this.getDocumentState(t);return o?this.useAnnotationMode?this.applyAllRedactionsAnnotationMode(t,n.document):this.commitAllPendingLegacy(t,n.document,o):se.reject({code:Z.NotFound,message:"Document state not found"})}commitAllPendingLegacy(e,t,n){const o=new Map;for(const[s,l]of Object.entries(n.pending)){const c=Number(s),d=o.get(c)??[];for(const u of l)u.kind==="text"?d.push(...u.rects):d.push(u.rect);o.set(c,d)}const i=Array.from(o.entries()).filter(([s,l])=>l.length>0).map(([s])=>s),r=[];for(const[s,l]of o){const c=t.pages[s];c&&l.length&&r.push(this.engine.redactTextInRects(t,c,l,{drawBlackBoxes:this.config.drawBlackBoxes}))}const a=new de;return de.all(r).wait(()=>{this.dispatch(Ea(e)),this.dispatchCoreAction(Vi(e,i)),this.events$.emit({type:"commit",documentId:e,success:!0}),a.resolve(!0)},s=>{this.events$.emit({type:"commit",documentId:e,success:!1,error:s.reason}),a.reject({code:Z.Unknown,message:"Failed to commit redactions"})}),a}applyAllRedactionsAnnotationMode(e,t){const n=this.annotationCapability;if(!n)return se.reject({code:Z.NotFound,message:"Annotation capability not found"});const o=n.forDocument(e).getState(),i=new Map;for(const l of Object.values(o.byUid))if(l.object.type===z.REDACT){const c=i.get(l.object.pageIndex)??[];c.push(l.object.id),i.set(l.object.pageIndex,c)}const r=Array.from(i.keys());if(r.length===0)return se.resolve(!0);const a=[];for(const l of r){const c=t.pages[l];c&&a.push(this.engine.applyAllRedactions(t,c))}const s=new de;return de.all(a).wait(()=>{var l;const c=n.forDocument(e),d=[];for(const[u,m]of i)for(const g of m)c.purgeAnnotation(u,g),this.dispatch(li(e,u,g)),d.push(g);d.length>0&&((l=this.historyCapability)==null||l.forDocument(e).purgeByMetadata(u=>{var m;return((m=u?.annotationIds)==null?void 0:m.some(g=>d.includes(g)))??!1},"annotations")),this.dispatchCoreAction(Vi(e,r)),this.events$.emit({type:"commit",documentId:e,success:!0}),s.resolve(!0)},l=>{this.events$.emit({type:"commit",documentId:e,success:!1,error:l.reason}),s.reject({code:Z.Unknown,message:"Failed to apply redactions"})}),s}createRedactAnnotationsFromSelection(e,t,n){var o;if(!this.annotationCapability)return[];const i=this.annotationCapability.forDocument(e),r=(o=this.getRedactTool())==null?void 0:o.defaults,a=[];for(const s of t){const l=Ce();a.push(l);const c={...r,id:l,type:z.REDACT,pageIndex:s.pageIndex,rect:s.rect,segmentRects:s.segmentRects,...n?{custom:{text:n}}:{},created:new Date};i.createAnnotation(s.pageIndex,c),s===t[t.length-1]&&i.selectAnnotation(s.pageIndex,l)}if(n)for(let s=0;s<a.length;s++){const l=t[s].pageIndex;this.dispatch(Fd(e,l,a[s],{text:n}))}return a}createLegacyRedactionsFromSelection(e,t,n){const o=this.config.drawBlackBoxes?"#000000":"transparent",i=t.map(r=>({id:Ce(),kind:"text",page:r.pageIndex,rect:r.rect,rects:r.segmentRects,source:"legacy",markColor:"#FF0000",redactionColor:o,text:n}));this.dispatch(si(e,i)),i.length&&this.selectPending(i[i.length-1].page,i[i.length-1].id,e)}createRedactionsFromSelection(e,t,n){this.useAnnotationMode?this.createRedactAnnotationsFromSelection(e,t,n):this.createLegacyRedactionsFromSelection(e,t,n)}createRedactAnnotationFromArea(e,t,n){var o;if(!this.annotationCapability)return;const i=this.annotationCapability.forDocument(e),r=(o=this.getRedactTool())==null?void 0:o.defaults,a=Ce(),s={...r,id:a,type:z.REDACT,pageIndex:t,rect:n,segmentRects:[],created:new Date};i.createAnnotation(t,s),i.selectAnnotation(t,a)}redactionItemToAnnotation(e){var t;return{...((t=this.getRedactTool())==null?void 0:t.defaults)??{},id:e.id,type:z.REDACT,pageIndex:e.page,rect:e.rect,segmentRects:e.kind==="text"?e.rects:[],created:new Date}}annotationToRedactionItem(e){var t;const n=e.strokeColor??"#FF0000",o=e.color??"transparent";return e.segmentRects&&e.segmentRects.length>0?{id:e.id,kind:"text",page:e.pageIndex,rect:e.rect,rects:e.segmentRects,source:"annotation",markColor:n,redactionColor:o,...(t=e.custom)!=null&&t.text?{text:e.custom.text}:{}}:{id:e.id,kind:"area",page:e.pageIndex,rect:e.rect,source:"annotation",markColor:n,redactionColor:o}}emitPendingChange(e){const t=this.getDocumentState(e);t&&this.pending$.emit({documentId:e,pending:t.pending})}emitSelectedChange(e){const t=this.getDocumentState(e);t&&this.selected$.emit({documentId:e,selected:t.selected})}emitStateChange(e){const t=this.getDocumentState(e);t&&this.state$.emit({documentId:e,state:t})}onStoreUpdated(e,t){for(const n in t.documents)t.documents[n]&&(this.emitPendingChange(n),this.emitSelectedChange(n),this.emitStateChange(n))}async destroy(){this.pending$.clear(),this.selected$.clear(),this.state$.clear(),this.events$.clear(),this.redactionSelection$.forEach(e
vendor: 5,627 bytes, line 2119
2119=>e.clear()),this.redactionSelection$.clear(),this.redactionMarquee$.forEach(e=>e.clear()),this.redactionMarquee$.clear(),this.documentUnsubscribers.forEach(e=>{e.forEach(t=>t())}),this.documentUnsubscribers.clear(),await super.destroy()}};F1.id="redaction";let cl=F1;const jo="redaction",B3={manifest:{id:jo,name:"Redaction Plugin",version:"1.0.0",provides:["redaction"],requires:[],optional:["interaction-manager","selection","annotation"],defaultConfig:{drawBlackBoxes:!0}},create:(e,t)=>new cl(jo,e,t),reducer:(e=Ud,t)=>{switch(t.type){case P1:{const{documentId:n,state:o}=t.payload;return{...e,documents:{...e.documents,[n]:o},activeDocumentId:e.activeDocumentId??n}}case D1:{const n=t.payload,{[n]:o,...i}=e.documents;return{...e,documents:i,activeDocumentId:e.activeDocumentId===n?null:e.activeDocumentId}}case"REDACTION/SET_ACTIVE_DOCUMENT":return{...e,activeDocumentId:t.payload};case R1:{const{documentId:n,items:o}=t.payload,i=e.documents[n];if(!i)return e;const r={...i.pending};for(const a of o){const s=r[a.page]??[];s.some(l=>l.id===a.id)||(r[a.page]=s.concat(a))}return{...e,documents:{...e.documents,[n]:{...i,pending:r,pendingCount:Hd(r)}}}}case E1:{const{documentId:n,page:o,id:i}=t.payload,r=e.documents[n];if(!r)return e;const a=(r.pending[o]??[]).filter(c=>c.id!==i),s={...r.pending,[o]:a},l=r.selected&&!(r.selected.page===o&&r.selected.id===i);return{...e,documents:{...e.documents,[n]:{...r,pending:s,pendingCount:Hd(s),selected:l?r.selected:null}}}}case _1:{const{documentId:n,page:o,id:i,patch:r}=t.payload,a=e.documents[n];if(!a)return e;const s=(a.pending[o]??[]).map(l=>l.id===i?{...l,...r}:l);return{...e,documents:{...e.documents,[n]:{...a,pending:{...a.pending,[o]:s}}}}}case L1:{const n=t.payload,o=e.documents[n];return o?{...e,documents:{...e.documents,[n]:{...o,pending:{},pendingCount:0,selected:null}}}:e}case O1:{const{documentId:n,page:o,id:i}=t.payload,r=e.documents[n];return r?{...e,documents:{...e.documents,[n]:{...r,selected:{page:o,id:i}}}}:e}case N1:{const n=t.payload,o=e.documents[n];return o?{...e,documents:{...e.documents,[n]:{...o,selected:null}}}:e}case T1:{const{documentId:n,mode:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,isRedacting:!0,activeType:o}}}:e}case z1:{const n=t.payload,o=e.documents[n];return o?{...e,documents:{...e.documents,[n]:{...o,isRedacting:!1,activeType:null}}}:e}case"SET_ACTIVE_TYPE":{const{documentId:n,mode:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,activeType:o}}}:e}default:return e}},initialState:Ud};function H3({annotation:e,isSelected:t,scale:n,onClick:o,style:i}){const[r,a]=$(!1),{object:s}=e,l=s.segmentRects??[],c=s.rect,d=s.strokeColor??"#FF0000",u=s.color??"#000000",m=s.opacity??1,g=s.fontColor??s.overlayColor??"#FFFFFF",p=s.overlayText,f=s.overlayTextRepeat??!1,v=s.fontSize??12,y=s.fontFamily??Ge.Helvetica,b=s.textAlign??ut.Center,w=()=>p?f?Array(10).fill(p).join(" "):p:null;return C("div",{onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),style:{position:"absolute",inset:0},children:l.map((x,k)=>C("div",{onPointerDown:o,style:{position:"absolute",left:(c?x.origin.x-c.origin.x:x.origin.x)*n,top:(c?x.origin.y-c.origin.y:x.origin.y)*n,width:x.size.width*n,height:x.size.height*n,background:r?u:"transparent",border:r?"none":`2px solid ${d}`,opacity:r?m:1,boxSizing:"border-box",pointerEvents:"auto",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:b===ut.Left?"flex-start":b===ut.Right?"flex-end":"center",overflow:"hidden",...i},children:r&&p&&C("span",{style:{color:g,fontSize:Math.min(v*n,x.size.height*n*.8),...Yn(y),textAlign:$s(b),whiteSpace:f?"normal":"nowrap",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1},children:w()})},k))})}function U3({annotation:e,isSelected:t,scale:n,onClick:o,style:i}){const[r,a]=$(!1),{object:s}=e,l=s.strokeColor??"#FF0000",c=s.color??"#000000",d=s.opacity??1,u=s.fontColor??s.overlayColor??"#FFFFFF",m=s.overlayText,g=s.overlayTextRepeat??!1,p=s.fontSize??12,f=s.fontFamily??Ge.Helvetica,v=s.textAlign??ut.Center;return C("div",{onPointerDown:t?void 0:o,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),style:{position:"absolute",inset:0,background:r?c:"transparent",border:r?"none":`2px solid ${l}`,opacity:r?d:1,boxSizing:"border-box",pointerEvents:"auto",cursor:t?"move":"pointer",display:"flex",alignItems:"center",justifyContent:v===ut.Left?"flex-start":v===ut.Right?"flex-end":"center",overflow:"hidden",...i},children:r&&m&&C("span",{style:{color:u,fontSize:p*n,...Yn(f),textAlign:$s(v),whiteSpace:g?"normal":"nowrap",overflow:"hidden",textOverflow:"ellipsis",padding:"4px"},children:m?g?Array(10).fill(m).join(" "):m:null})})}const W3=[st({id:"redactHighlight",matches:e=>{var t;return e.type===z.REDACT&&"segmentRects"in e&&(((t=e.segmentRects)==null?void 0:t.length)??0)>0},render:({annotation:e,isSelected:t,scale:n,pageIndex:o,onClick:i})=>C(H3,{annotation:e,isSelected:t,scale:n,pageIndex:o,onClick:i}),interactionDefaults:{isDraggable:!1,isResizable:!1,isRotatable:!1},useAppearanceStream:!1}),st({id:"redactArea",matches:e=>{var t;return!(e.type!==z.REDACT||"segmentRects"in e&&((t=e.segmentRects)!=null&&t.length))},render:({annotation:e,isSelected:t,scale:n,pageIndex:o,onClick:i})=>C(U3,{annotation:e,isSelected:t,scale:n,pageIndex:o,onClick:i}),interactionDefaults:{isDraggable:!1,isResizable:!1,isRotatable:!1},useAppearanceStream:!1})],j1=()=>$t(cl.id),B1=()=>at(cl.id),G3=({documentId:e,pageIndex:t,scale:n,className:o,stroke:i,fill:r="transparent"})=>{const{plugin:a}=j1(),s=At(e),[l,c]=$(null),d=n??s?.scale??1,u=i??a?.getPreviewStrokeColor()??"red";return H(()=>
2119{if(a&&e)return a.onRedactionMarqueeChange(e,m=>{c(m.pageIndex===t?m.rect:null)})},[a,e,t]),l?C("div",{style:{position:"absolute",pointerEvents:"none",left:l.origin.x*d,top:l.origin.y*d,width:l.size.width*d,height:l.size.height*d,border:`1px solid ${u}`,background:r,boxSizing:"border-box"},className:o}):null};function H1({color:e="#FFFF00",opacity:t=1,border:n="1px solid red",rects:o,rect:i,scale:r,onClick:a,style:s,...l}){return C(fe,{children:o.map((c,d)=>C("div",{onPointerDown:a,style:{position:"absolute",border:n,left:(i?c.origin.x-i.origin.x:c.origin.x)*r,top:(i?c.origin.y-i.origin.y:c.origin.y)*r,width:c.size.width*r,height:c.size.height*r,background:e,opacity:t,pointerEvents:a?"auto":"none",cursor:a?"pointer":"default",zIndex:a?1:void 0,...s},...l},d))})}function q3({documentId:e,pageIndex:t,scale:n}){const{plugin:o}=j1(),[i,r]=$([]),[a,s]=$(null),l=o?.getPreviewStrokeColor()??"red";return H(()=>{if(o)return o.onRedactionSelectionChange(e,c=>{const d=c.find(u=>u.pageIndex===t);r(d?.segmentRects??[]),s(d?.rect??null)})},[o,e,t]),a?C("div",{style:{mixBlendMode:"normal",pointerEvents:"none",position:"absolute",inset:0},children:C(H1,{color:"transparent",opacity:1,rects:i,scale:n,border:`1px solid ${l}`})}):null}function V3({documentId:e,pageIndex:t,scale:n,bboxStroke:o="rgba(0,0,0,0.8)",rotation:i=Wr.Degree0,selectionMenu:r}){const{provides:a}=B1(),[s,l]=$([]),[c,d]=$(null);H(()=>{if(!a)return;const m=a.forDocument(e),g=m.getState();l((g.pending[t]??[]).filter(v=>v.source==="legacy")),d(g.selected&&g.selected.page===t?g.selected.id:null);const p=m.onPendingChange(v=>{l((v[t]??[]).filter(y=>y.source==="legacy"))}),f=m.onSelectedChange(v=>{d(v&&v.page===t?v.id:null)});return()=>{p?.(),f?.()}},[a,e,t]);const u=Y((m,g)=>{m.stopPropagation(),a&&a.forDocument(e).selectPending(t,g)},[a,e,t]);return s.length?C("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:s.map(m=>{if(m.kind==="area"){const p=m.rect;return C(fe,{children:[C("div",{style:{position:"absolute",left:p.origin.x*n,top:p.origin.y*n,width:p.size.width*n,height:p.size.height*n,background:"transparent",outline:c===m.id?`1px solid ${o}`:"none",outlineOffset:"2px",border:`1px solid ${m.markColor}`,pointerEvents:"auto",cursor:"pointer"},onPointerDown:f=>u(f,m.id)}),r&&C(xi,{rect:{origin:{x:p.origin.x*n,y:p.origin.y*n},size:{width:p.size.width*n,height:p.size.height*n}},rotation:i,children:f=>r({...f,context:{type:"redaction",item:m,pageIndex:t},selected:c===m.id,placement:{suggestTop:!1}})})]},m.id)}const g=m.rect;return C(fe,{children:[C("div",{style:{position:"absolute",left:g.origin.x*n,top:g.origin.y*n,width:g.size.width*n,height:g.size.height*n,background:"transparent",outline:c===m.id?`1px solid ${o}`:"none",outlineOffset:"2px",pointerEvents:"auto",cursor:c===m.id?"pointer":"default"},children:C(H1,{rect:g,rects:m.rects,color:"transparent",border:`1px solid ${m.markColor}`,scale:n,onClick:p=>u(p,m.id)})}),r&&C(xi,{rect:{origin:{x:g.origin.x*n,y:g.origin.y*n},size:{width:g.size.width*n,height:g.size.height*n}},rotation:i,children:p=>r({...p,context:{type:"redaction",item:m,pageIndex:t},selected:c===m.id,placement:{suggestTop:!1}})})]},m.id)})}):null}const K3=({documentId:e,pageIndex:t,scale:n,rotation:o,selectionMenu:i})=>{var r,a;const s=At(e),l=(a=(r=s?.document)==null?void 0:r.pages)==null?void 0:a[t],c=ee(()=>n!==void 0?n:s?.scale??1,[n,s?.scale]);return C(fe,{children:[C(V3,{documentId:e,pageIndex:t,scale:c,rotation:ee(()=>o!==void 0?o:((l?.rotation??0)+(s?.rotation??0))%4,[o,l?.rotation,s?.rotation]),selectionMenu:i}),C(G3,{documentId:e,pageIndex:t,scale:c}),C(q3,{documentId:e,pageIndex:t,scale:c})]})},Z3=cn(B3).addUtility(function(){return Kg(W3),null}).build(),U1=class extends Ye{constructor(e,t){super(e,t)}async initialize(e){}buildCapability(){return{getAttachments:()=>this.getAttachments(),downloadAttachment:e=>this.downloadAttachment(e),forDocument:e=>this.createAttachmentScope(e)}}createAttachmentScope(e){return{getAttachments:()=>this.getAttachments(e),downloadAttachment:t=>this.downloadAttachment(t,e)}}downloadAttachment(e,t){const n=t??this.getActiveDocumentId(),o=this.coreState.core.documents[n];return o?.document?this.engine.readAttachmentContent(o.document,e):se.reject({code:Z.NotFound,message:`Document ${n} not found`})}getAttachments(e){const t=e??this.getActiveDocumentId(),n=this.coreState.core.documents[t];return n?.document?this.engine.getAttachments(n.document):se.reject({code:Z.NotFound,message:`Document ${t} not found`})}};U1.id="attachment";let X3=U1;const Wd="attachment",Y3={manifest:{id:Wd,name:"Attachment Plugin",version:"1.0.0",provides:["attachment"],requires:[],optional:[],defaultConfig:{}},create:e=>new X3(Wd,e),reducer:()=>{},initialState:{}},W1="form",Q3={id:W1,name:"Form Plugin",version:"1.0.0",provides:["form"],requires:["interaction-manager"],optional:["history","annotation"],defaultConfig:{enabled:!0}},G1="FORM/INIT_STATE",q1="FORM/CLEANUP_STATE",V1="FORM/SELECT_FIELD",K1="FORM/DESELECT_FIELD";function _a(e,t){return{type:V1,payload:{documentId:e,annotationId:t}}}const us={selectedFieldId:null},Gd={documents:{}},J3={annotationType:z.WIDGET,create(e){const{pageIndex:t,onCommit:n,onPreview:o,getTool:i,pageSize:r}=e,[a,s]=Ct(null),l=p=>
vendor: 13,709 bytes, line 2119
2119({x:ve(p.x,0,r.width),y:ve(p.y,0,r.height)}),c=()=>{const p=i();return p?{...p.defaults,fontFamily:p.defaults.fontFamily??Ge.Helvetica,fontSize:p.defaults.fontSize??12,fontColor:p.defaults.fontColor??"#000000",strokeColor:p.defaults.strokeColor??"#000000",color:p.defaults.color??"#FFFFFF",strokeWidth:p.defaults.strokeWidth??1,field:p.defaults.field}:null},d=(p,f)=>({origin:{x:Math.min(p.x,f.x),y:Math.min(p.y,f.y)},size:{width:Math.abs(p.x-f.x),height:Math.abs(p.y-f.y)}}),u=p=>{var f;const v=c(),y=`TextField_${Ce().slice(0,8)}`;return{...v,type:z.WIDGET,id:Ce(),pageIndex:t,rect:p,created:new Date,fontFamily:v.fontFamily,fontSize:v.fontSize,fontColor:v.fontColor,strokeColor:v.strokeColor,color:v.color,strokeWidth:v.strokeWidth,field:{type:ye.TEXTFIELD,flag:((f=v.field)==null?void 0:f.flag)??be.NONE,name:y,alternateName:y,value:""}}},m=xn({getTool:i,onClickDetected:p=>{if(!c())return;const f=i(),v=f?.clickBehavior;if(!v?.enabled)return;const{width:y,height:b}=v.defaultSize,w=ve(p.x-y/2,0,r.width-y),x=ve(p.y-b/2,0,r.height-b);n(u({origin:{x:w,y:x},size:{width:y,height:b}}))}}),g=p=>{const f=a();if(!f)return null;const v=c();if(!v)return null;const y=d(f,p);return{type:z.WIDGET,bounds:y,data:{rect:y,...v}}};return{onPointerDown:(p,f)=>{var v;const y=l(p);s(y),m.onStart(y),o(g(y)),(v=f.setPointerCapture)==null||v.call(f)},onPointerMove:p=>{const f=l(p);m.onMove(f),a()&&m.hasMoved()&&o(g(f))},onPointerUp:(p,f)=>{var v;const y=a();if(!y)return;const b=l(p);if(m.hasMoved()){const w=d(y,b);w.size.width>5&&w.size.height>5&&n(u(w))}else m.onEnd(b);s(null),o(null),m.reset(),(v=f.releasePointerCapture)==null||v.call(f)},onPointerLeave:(p,f)=>{var v;s(null),o(null),m.reset(),(v=f.releasePointerCapture)==null||v.call(f)},onPointerCancel:(p,f)=>{var v;s(null),o(null),m.reset(),(v=f.releasePointerCapture)==null||v.call(f)}}}},e5={annotationType:z.WIDGET,create(e){const{pageIndex:t,onCommit:n,onPreview:o,getTool:i,pageSize:r}=e,[a,s]=Ct(null),l=p=>({x:ve(p.x,0,r.width),y:ve(p.y,0,r.height)}),c=()=>{const p=i();return p?{...p.defaults,strokeColor:p.defaults.strokeColor??"#000000",color:p.defaults.color??"#FFFFFF",strokeWidth:p.defaults.strokeWidth??1,field:p.defaults.field}:null},d=(p,f)=>({origin:{x:Math.min(p.x,f.x),y:Math.min(p.y,f.y)},size:{width:Math.abs(p.x-f.x),height:Math.abs(p.y-f.y)}}),u=p=>{var f;const v=c(),y=`Checkbox_${Ce().slice(0,8)}`;return{...v,type:z.WIDGET,id:Ce(),pageIndex:t,rect:p,created:new Date,strokeColor:v.strokeColor,color:v.color,strokeWidth:v.strokeWidth,exportValue:"Yes",field:{type:ye.CHECKBOX,flag:((f=v.field)==null?void 0:f.flag)??be.NONE,name:y,alternateName:y,value:"Off"}}},m=xn({getTool:i,onClickDetected:p=>{if(!c())return;const f=i(),v=f?.clickBehavior;if(!v?.enabled)return;const{width:y,height:b}=v.defaultSize,w=ve(p.x-y/2,0,r.width-y),x=ve(p.y-b/2,0,r.height-b);n(u({origin:{x:w,y:x},size:{width:y,height:b}}))}}),g=p=>{const f=a();if(!f)return null;const v=c();if(!v)return null;const y=d(f,p);return{type:z.WIDGET,bounds:y,data:{rect:y,...v}}};return{onPointerDown:(p,f)=>{var v;const y=l(p);s(y),m.onStart(y),o(g(y)),(v=f.setPointerCapture)==null||v.call(f)},onPointerMove:p=>{const f=l(p);m.onMove(f),a()&&m.hasMoved()&&o(g(f))},onPointerUp:(p,f)=>{var v;const y=a();if(!y)return;const b=l(p);if(m.hasMoved()){const w=d(y,b);w.size.width>5&&w.size.height>5&&n(u(w))}else m.onEnd(b);s(null),o(null),m.reset(),(v=f.releasePointerCapture)==null||v.call(f)},onPointerLeave:(p,f)=>{var v;s(null),o(null),m.reset(),(v=f.releasePointerCapture)==null||v.call(f)},onPointerCancel:(p,f)=>{var v;s(null),o(null),m.reset(),(v=f.releasePointerCapture)==null||v.call(f)}}}},t5={annotationType:z.WIDGET,create(e){const{pageIndex:t,onCommit:n,onPreview:o,getTool:i,pageSize:r}=e,[a,s]=Ct(null),l=p=>({x:ve(p.x,0,r.width),y:ve(p.y,0,r.height)}),c=()=>{const p=i();return p?{...p.defaults,strokeColor:p.defaults.strokeColor??"#000000",color:p.defaults.color??"#FFFFFF",strokeWidth:p.defaults.strokeWidth??1,field:p.defaults.field}:null},d=(p,f)=>{const v=f.x-p.x,y=f.y-p.y,b=Math.max(Math.abs(v),Math.abs(y)),w=v<0?-b:b,x=y<0?-b:b;return{origin:{x:Math.min(p.x,p.x+w),y:Math.min(p.y,p.y+x)},size:{width:b,height:b}}},u=p=>{var f;const v=c(),y=`RadioButton_${Ce().slice(0,8)}`,b=Ce();return{...v,type:z.WIDGET,id:b,pageIndex:t,rect:p,created:new Date,strokeColor:v.strokeColor,color:v.color,strokeWidth:v.strokeWidth,exportValue:b,field:{type:ye.RADIOBUTTON,flag:((f=v.field)==null?void 0:f.flag)??be.BUTTON_RADIO|be.BUTTON_NOTOGGLETOOFF,name:y,alternateName:y,value:"Off",options:[]}}},m=xn({getTool:i,onClickDetected:p=>{if(!c())return;const f=i(),v=f?.clickBehavior;if(!v?.enabled)return;const{width:y,height:b}=v.defaultSize,w=ve(p.x-y/2,0,r.width-y),x=ve(p.y-b/2,0,r.height-b);n(u({origin:{x:w,y:x},size:{width:y,height:b}}))}}),g=p=>{const f=a();if(!f)return null;const v=c();if(!v)return null;const y=d(f,p);return{type:z.WIDGET,bounds:y,data:{rect:y,...v}}};return{onPointerDown:(p,f)=>{var v;const y=l(p);s(y),m.onStart(y),o(g(y)),(v=f.setPointerCapture)==null||v.call(f)},onPointerMove:p=>{const f=l(p);m.onMove(f),a()&&m.hasMoved()&&o(g(f))},onPointerUp:(p,f)=>{var v;const y=a();if(!y)return;const b=l(p);if(m.hasMoved()){const w=d(y,b);w.size.width>5&&w.size.height>5&&n(u(w))}else m.onEnd(b);s(null),o(null),m.reset(),(v=f.releasePointerCapture)==null||v.call(f)},onPointerLeave:(p,f)=>{var v;s(null),o(null),m.reset(),(v=f.releasePointerCapture)==null||v.call(f)},onPointerCancel:(p,f)=>{var v;s(null),o(null),m.reset(),(v=f.releasePointerCapture)==null||v.call(f)}}}},n5={annotationType:z.WIDGET,create(e){const{pageIndex:t,onCommit:n,onPreview:o,getTool:i,pageSize:r}=e,[a,s]=Ct(null),l=p=>({x:ve(p.x,0,r.width),y:ve(p.y,0,r.height)}),c=()=>{const p=i();return p?{...p.defaults,fontFamily:p.defaults.fontFamily??Ge.Helvetica,fontSize:p.defaults.fontSize??12,fontColor:p.defaults.fontColor??"#000000",strokeColor:p.defaults.strokeColor??"#000000",color:p.defaults.color??"#FFFFFF",strokeWidth:p.defaults.strokeWidth??1,field:p.defaults.field}:null},d=(p,f)=>({origin:{x:Math.min(p.x,f.x),y:Math.min(p.y,f.y)},size:{width:Math.abs(p.x-f.x),height:Math.abs(p.y-f.y)}}),u=p=>{var f;const v=c(),y=`Combobox_${Ce().slice(0,8)}`;return{...v,type:z.WIDGET,id:Ce(),pageIndex:t,rect:p,created:new Date,fontFamily:v.fontFamily,fontSize:v.fontSize,fontColor:v.fontColor,strokeColor:v.strokeColor,color:v.color,strokeWidth:v.strokeWidth,field:{type:ye.COMBOBOX,flag:((f=v.field)==null?void 0:f.flag)??be.NONE,name:y,alternateName:y,value:"",options:[{label:"Option 1",isSelected:!0},{label:"Option 2",isSelected:!1},{label:"Option 3",isSelected:!1}]}}},m=xn({getTool:i,onClickDetected:p=>{if(!c())return;const f=i(),v=f?.clickBehavior;if(!v?.enabled)return;const{width:y,height:b}=v.defaultSize,w=ve(p.x-y/2,0,r.width-y),x=ve(p.y-b/2,0,r.height-b);n(u({origin:{x:w,y:x},size:{width:y,height:b}}))}}),g=p=>{const f=a();if(!f)return null;const v=c();if(!v)return null;const y=d(f,p);return{type:z.WIDGET,bounds:y,data:{rect:y,...v}}};return{onPointerDown:(p,f)=>{var v;const y=l(p);s(y),m.onStart(y),o(g(y)),(v=f.setPointerCapture)==null||v.call(f)},onPointerMove:p=>{const f=l(p);m.onMove(f),a()&&m.hasMoved()&&o(g(f))},onPointerUp:(p,f)=>{var v;const y=a();if(!y)return;const b=l(p);if(m.hasMoved()){const w=d(y,b);w.size.width>5&&w.size.height>5&&n(u(w))}else m.onEnd(b);s(null),o(null),m.reset(),(v=f.releasePointerCapture)==null||v.call(f)},onPointerLeave:(p,f)=>{var v;s(null),o(null),m.reset(),(v=f.releasePointerCapture)==null||v.call(f)},onPointerCancel:(p,f)=>{var v;s(null),o(null),m.reset(),(v=f.releasePointerCapture)==null||v.call(f)}}}},o5={annotationType:z.WIDGET,create(e){const{pageIndex:t,onCommit:n,onPreview:o,getTool:i,pageSize:r}=e,[a,s]=Ct(null),l=p=>({x:ve(p.x,0,r.width),y:ve(p.y,0,r.height)}),c=()=>{const p=i();return p?{...p.defaults,fontFamily:p.defaults.fontFamily??Ge.Helvetica,fontSize:p.defaults.fontSize??12,fontColor:p.defaults.fontColor??"#000000",strokeColor:p.defaults.strokeColor??"#000000",color:p.defaults.color??"#FFFFFF",strokeWidth:p.defaults.strokeWidth??1,field:p.defaults.field}:null},d=(p,f)=>({origin:{x:Math.min(p.x,f.x),y:Math.min(p.y,f.y)},size:{width:Math.abs(p.x-f.x),height:Math.abs(p.y-f.y)}}),u=p=>{var f;const v=c(),y=`Listbox_${Ce().slice(0,8)}`;return{...v,type:z.WIDGET,id:Ce(),pageIndex:t,rect:p,created:new Date,fontFamily:v.fontFamily,fontSize:v.fontSize,fontColor:v.fontColor,strokeColor:v.strokeColor,color:v.color,strokeWidth:v.strokeWidth,field:{type:ye.LISTBOX,flag:((f=v.field)==null?void 0:f.flag)??be.NONE,name:y,alternateName:y,value:"",options:[{label:"Option 1",isSelected:!0},{label:"Option 2",isSelected:!1},{label:"Option 3",isSelected:!1}]}}},m=xn({getTool:i,onClickDetected:p=>{if(!c())return;const f=i(),v=f?.clickBehavior;if(!v?.enabled)return;const{width:y,height:b}=v.defaultSize,w=ve(p.x-y/2,0,r.width-y),x=ve(p.y-b/2,0,r.height-b);n(u({origin:{x:w,y:x},size:{width:y,height:b}}))}}),g=p=>{const f=a();if(!f)return null;const v=c();if(!v)return null;const y=d(f,p);return{type:z.WIDGET,bounds:y,data:{rect:y,...v}}};return{onPointerDown:(p,f)=>{var v;const y=l(p);s(y),m.onStart(y),o(g(y)),(v=f.setPointerCapture)==null||v.call(f)},onPointerMove:p=>{const f=l(p);m.onMove(f),a()&&m.hasMoved()&&o(g(f))},onPointerUp:(p,f)=>{var v;const y=a();if(!y)return;const b=l(p);if(m.hasMoved()){const w=d(y,b);w.size.width>5&&w.size.height>5&&n(u(w))}else m.onEnd(b);s(null),o(null),m.reset(),(v=f.releasePointerCapture)==null||v.call(f)},onPointerLeave:(p,f)=>{var v;s(null),o(null),m.reset(),(v=f.releasePointerCapture)==null||v.call(f)},onPointerCancel:(p,f)=>{var v;s(null),o(null),m.reset(),(v=f.releasePointerCapture)==null||v.call(f)}}}},i5={id:"formTextField",name:"Text Field",labelKey:"form.textfield",categories:["annotation","form"],matchScore:e=>{var t;return e.type!==z.WIDGET?0:((t=e.field)==null?void 0:t.type)===ye.TEXTFIELD?10:0},interaction:{exclusive:!1,cursor:"crosshair",isDraggable:!0,isResizable:!0,isRotatable:!1,isGroupDraggable:!0,isGroupResizable:!1,isGroupRotatable:!1},defaults:{type:z.WIDGET,fontFamily:Ge.Helvetica,fontSize:12,fontColor:"#000000",strokeColor:"#000000",color:"#FFFFFF",strokeWidth:1,field:{flag:be.NONE,name:"TextField",alternateName:"TextField",value:"",type:ye.TEXTFIELD}},behavior:{useAppearanceStream:!1},clickBehavior:{enabled:!0,defaultSize:{width:150,height:24}},pointerHandler:J3},r5={id:"formCheckbox",name:"Checkbox",labelKey:"form.checkbox",categories:["annotation","form"],matchScore:e=>{var t;return e.type!==z.WIDGET?0:((t=e.field)==null?void 0:t.type)===ye.CHECKBOX?10:0},interaction:{exclusive:!1,cursor:"crosshair",isDraggable:!0,isResizable:!0,isRotatable:!1,isGroupDraggable:!0,isGroupResizable:!1,isGroupRotatable:!1},defaults:{type:z.WIDGET,strokeColor:"#000000",color:"#FFFFFF",strokeWidth:1,field:{flag:be.NONE,name:"Checkbox",alternateName:"Checkbox",value:"Off",type:ye.CHECKBOX}},behavior:{useAppearanceStream:!1},clickBehavior:{enabled:!0,defaultSize:{width:20,height:20}},pointerHandler:e5},a5={id:"formRadioButton",name:"Radio Button",labelKey:"form.radiobutton",categories:["annotation","form"],matchScore:e=>{var t;return e.type!==z.WIDGET?0:((t=e.field)==null?void 0:t.type)===ye.RADIOBUTTON?10:0},interaction:{exclusive:!1,cursor:"crosshair",isDraggable:!0,isResizable:!0,isRotatable:!1,lockAspectRatio:!0,isGroupDraggable:!0,isGroupResizable:!1,isGroupRotatable:!1},defaults:{type:z.WIDGET,strokeColor:"#000000",color:"#FFFFFF",strokeWidth:1,field:{flag:be.BUTTON_RADIO|be.BUTTON_NOTOGGLETOOFF,name:"RadioButton",alternateName:"RadioButton",value:"Off",type:ye.RADIOBUTTON,options:[]}},behavior:{useAppearanceStream:!1},clickBehavior:{enabled:!0,defaultSize:{width:20,height:20}},pointerHandler:t5},s5={id:"formCombobox",name:"Combo Box",labelKey:"form.combobox",categories:["annotation","form"],matchScore:e=>{var t;return e.type!==z.WIDGET?0:((t=e.field)==null?void 0:t.type)===ye.COMBOBOX?10:0},interaction:{exclusive:!1,cursor:"crosshair",isDraggable:!0,isResizable:!0,isRotatable:!1,isGroupDraggable:!0,isGroupResizable:!1,isGroupRotatable:!1},defaults:{type:z.WIDGET,fontFamily:Ge.Helvetica,fontSize:12,fontColor:"#000000",strokeColor:"#000000",color:"#FFFFFF",strokeWidth:1,field:{flag:be.NONE,name:"ComboBox",alternateName:"ComboBox",value:"",type:ye.COMBOBOX,options:[{label:"Option 1",isSelected:!0},{label:"Option 2",isSelected:!1},{label:"Option 3",isSelected:!1}]}},behavior:{useAppearanceStream:!1},clickBehavior:{enabled:!0,defaultSize:{width:200,height:40}},pointerHandler:n5},l5={id:"formListbox",name:"List Box",labelKey:"form.listbox",categories:["annotation","form"],matchScore:e=>{var t;return e.type!==z.WIDGET?0:((t=e.field)==null?void 0:t.type)===ye.LISTBOX?10:0},interaction:{exclusive:!1,cursor:"crosshair",isDraggable:!0,isResizable:!0,isRotatable:!1,isGroupDraggable:!0,isGroupResizable:!1,isGroupRotatable:!1},defaults:{type:z.WIDGET,fontFamily:Ge.Helvetica,fontSize:12,fontColor:"#000000",strokeColor:"#000000",color:"#FFFFFF",strokeWidth:1,field:{flag:be.NONE,name:"ListBox",alternateName:"ListBox",value:"",type:ye.LISTBOX,options:[{label:"Option 1",isSelected:!0},{label:"Option 2",isSelected:!1},{label:"Option 3",isSelected:!1}]}},behavior:{useAppearanceStream:!1},clickBehavior:{enabled:!0,defaultSize:{width:150,height:150}},pointerHandler:o5},c5=[i5,r5,a5,s5,l5],Z1=class extends Ye{constructor(e,t,n){var o,i;if(super(e,t),this.FORM_HISTORY_TOPIC="form-fields",this.annotation=null,this.history=null,this.state$=et((r,a)=>({documentId:r,state:a})),this.fieldValueChange$=et((r,a)=>a,{cache:!1}),this.formReady$=et((r,a)=>({documentId:r,fields:a}),{cache:!1}),this.fieldGroupIndex=new Map,this.fieldNameIndex=new Map,this.orderedFieldIndex=new Map,this.prop
2119agationInProgress=new Set,this.annotation=((o=t.getPlugin("annotation"))==null?void 0:o.provides())??null,this.history=((i=t.getPlugin(A1.id))==null?void 0:i.provides())??null,this.annotation){for(const r of c5)this.annotation.addTool(r);this.annotation.onAnnotationEvent(r=>this.handleAnnotationEvent(r))}}async initialize(){}onDocumentLoadingStarted(e){this.dispatch((function(t,n){return{type:G1,payload:{documentId:t,state:n}}})(e,{...us}))}onDocumentClosed(e){this.dispatch((function(t){return{type:q1,payload:t}})(e)),this.fieldGroupIndex.delete(e),this.fieldNameIndex.delete(e),this.orderedFieldIndex.delete(e),this.state$.clearScope(e),this.fieldValueChange$.clearScope(e),this.formReady$.clearScope(e)}onStoreUpdated(e,t){for(const n in t.documents){const o=e.documents[n],i=t.documents[n];o!==i&&this.state$.emit(n,i)}}buildCapability(){return{getPageFormAnnoWidgets:(e,t)=>this.getPageFormAnnoWidgets(e,t),setFormFieldValues:(e,t,n,o)=>this.setFormFieldValues(e,t,n,o),renameField:(e,t,n)=>this.renameFieldMethod(e,t,n),shareField:(e,t,n)=>this.shareFieldMethod(e,t,n),renderWidget:(e,t)=>this.renderWidget(e,t),selectField:(e,t)=>this.selectFieldMethod(e,t),deselectField:e=>this.deselectFieldMethod(e),getSelectedFieldId:e=>this.getSelectedFieldId(e),selectNextField:e=>this.selectNextFieldMethod(e),selectPreviousField:e=>this.selectPreviousFieldMethod(e),activateField:e=>this.activateFieldMethod(e),getState:e=>this.getDocumentState(e),getFieldGroup:(e,t)=>this.getFieldGroup(e,t),getFieldSiblings:(e,t)=>this.getFieldSiblings(e,t),getFormValues:e=>this.getFormValuesMethod(e),getFormFields:e=>this.getFormFieldsMethod(e),setFormValues:(e,t)=>this.setFormValuesMethod(e,t),forDocument:e=>this.createFormScope(e),onStateChange:this.state$.onGlobal,onFieldValueChange:this.fieldValueChange$.onGlobal,onFormReady:this.formReady$.onGlobal}}createFormScope(e){return{getPageFormAnnoWidgets:t=>this.getPageFormAnnoWidgets(t,e),setFormFieldValues:(t,n,o)=>this.setFormFieldValues(t,n,o,e),renameField:(t,n)=>this.renameFieldMethod(t,n,e),shareField:(t,n)=>this.shareFieldMethod(t,n,e),renderWidget:t=>this.renderWidget(t,e),selectField:t=>this.selectFieldMethod(t,e),deselectField:()=>this.deselectFieldMethod(e),getSelectedFieldId:()=>this.getSelectedFieldId(e),selectNextField:()=>this.selectNextFieldMethod(e),selectPreviousField:()=>this.selectPreviousFieldMethod(e),activateField:()=>this.activateFieldMethod(e),getState:()=>this.getDocumentState(e),getFieldGroup:t=>this.getFieldGroup(t,e),getFieldSiblings:t=>this.getFieldSiblings(t,e),getFormValues:()=>this.getFormValuesMethod(e),getFormFields:()=>this.getFormFieldsMethod(e),setFormValues:t=>this.setFormValuesMethod(t,e),onStateChange:this.state$.forScope(e),onFieldValueChange:this.fieldValueChange$.forScope(e),onFormReady:this.formReady$.forScope(e)}}handleAnnotationEvent(e){switch(e.type){case"loaded":this.buildFieldGroupIndex(e.documentId),this.formReady$.emit(e.documentId,this.getFormFieldsMethod(e.documentId));break;case"create":case"delete":if(e.annotation.type!==z.WIDGET)break;this.buildFieldGroupIndex(e.documentId);break;case"update":{if(!e.committed)break;const t=e.annotation;if(t.type!==z.WIDGET)break;if(this.propagationInProgress.has(t.id)){this.propagationInProgress.delete(t.id);break}const n=e.patch;
vendor: 21,530 bytes, line 2119
2119this.buildFieldGroupIndex(e.documentId),this.propagateFieldLevelChanges(e.documentId,t,n);break}}}propagateFieldLevelChanges(e,t,n){if(!this.annotation||!n.field)return;const o=n.field,i=this.getFieldSiblings(t.id,e);if(i.length===0)return;const r=[];for(const a of i)this.propagationInProgress.add(a.annotationId),r.push({pageIndex:a.pageIndex,id:a.annotationId,patch:{field:{...o}}});this.annotation.forDocument(e).updateAnnotations(r)}buildFieldGroupIndex(e){if(!this.annotation)return;const t=this.annotation.forDocument(e).getState();if(!t)return;const n=new Map,o=[];for(const[a,s]of Object.entries(t.pages)){const l=Number(a);for(const c of s){const d=t.byUid[c];if(!d||d.object.type!==z.WIDGET)continue;const u=d.object,m={annotationId:c,pageIndex:l};o.push({entry:m,widget:u});const g=this.getFieldKey(u.field);if(!g)continue;const p=n.get(g)??[];p.push(m),n.set(g,p)}}this.fieldGroupIndex.set(e,n);const i=new Map;for(const{entry:a,widget:s}of o){const l=s.field.name.trim();if(!l)continue;const c=i.get(l)??[];c.push(a),i.set(l,c)}this.fieldNameIndex.set(e,i);const r=o.filter(({widget:a})=>!(a.field.flag&be.READONLY));this.orderedFieldIndex.set(e,r.map(({entry:a})=>a))}getDocumentState(e){const t=e??this.getActiveDocumentId();return this.state.documents[t]??{...us}}getDocIndex(e){let t=this.fieldGroupIndex.get(e);return t||(t=new Map,this.fieldGroupIndex.set(e,t)),t}getFieldKey(e){if(typeof e.fieldObjectId=="number"&&e.fieldObjectId>0)return`field:${e.fieldObjectId}`;const t=e.name.trim();return t?`legacy:${e.type}:${t}`:null}resolveWidgetAnnotation(e,t){if(!this.annotation)return null;const n=this.annotation.forDocument(t).getState(),o=n?.byUid[e];return o&&o.object.type===z.WIDGET?o.object:null}getFieldGroup(e,t){const n=t??this.getActiveDocumentId(),o=this.resolveWidgetAnnotation(e,n);if(!o)return[];const i=this.getFieldKey(o.field);return i?this.getDocIndex(n).get(i)??[{annotationId:o.id,pageIndex:o.pageIndex}]:[{annotationId:o.id,pageIndex:o.pageIndex}]}getFieldSiblings(e,t){return this.getFieldGroup(e,t).filter(n=>n.annotationId!==e)}getFormValuesMethod(e){const t=e??this.getActiveDocumentId(),n=this.fieldNameIndex.get(t);if(!n)return{};const o={};for(const[i,r]of n){const a=this.resolveWidgetAnnotation(r[0].annotationId,t);a&&(o[i]=a.field.value)}return o}getFormFieldsMethod(e){const t=e??this.getActiveDocumentId(),n=this.fieldNameIndex.get(t);if(!n)return[];const o=[];for(const[i,r]of n){const a=this.resolveWidgetAnnotation(r[0].annotationId,t);a&&o.push({name:i,type:a.field.type,value:a.field.value,readOnly:!!(a.field.flag&be.READONLY),..."options"in a.field&&a.field.options?{options:a.field.options}:{}})}return o}setFormValuesMethod(e,t){const n=t??this.getActiveDocumentId(),o=this.fieldNameIndex.get(n);if(!o)return se.reject({code:Z.NotFound,message:"no form fields indexed for this document"});const i=Object.entries(e);if(i.length===0)return se.resolve(!0);const r=new de;let a=i.length,s=!1;const l=()=>{a--,a!==0||s||r.resolve(!0)};for(const[c,d]of i){const u=o.get(c);if(!u||u.length===0){l();continue}let m=u[0],g=this.resolveWidgetAnnotation(m.annotationId,n);if(g){if(g.field.type===ye.RADIOBUTTON||g.field.type===ye.CHECKBOX)for(const p of u){const f=this.resolveWidgetAnnotation(p.annotationId,n);if(f&&f.exportValue===d){g=f,m=p;break}}this.setFormFieldValues(m.pageIndex,g,this.buildImportField(g,d),n).wait(()=>l(),p=>{return f=p.reason,void(s||(s=!0,r.reject(f)));var f})}else l()}return r}buildImportField(e,t){const n=e.field;if((n.type===ye.COMBOBOX||n.type===ye.LISTBOX)&&"options"in n)return{...n,value:t,options:n.options.map(o=>({...o,isSelected:o.label===t}))};if(n.type===ye.CHECKBOX){const o=t==="Off"?"Off":e.exportValue??"Yes";return{...n,value:o}}return{...n,value:t}}isToggleField(e){return e.type===ye.CHECKBOX||e.type===ye.RADIOBUTTON}shouldRegenerateWidgetAppearances(e){return!this.isToggleField(e)}getFieldBatchTarget(e){const t=[...e.values()];return t.find(n=>this.isToggleField(n.widget.field)&&ho(n.widget))??t[0]}async readFieldWidgets(e,t,n,o){const i=new Set(t.map(s=>s.pageIndex)),r=new Set(t.map(s=>s.annotationId)),a=new Map;for(const s of i){const l=e.pages.find(u=>u.index===s);if(!l)continue;const c=t.filter(u=>u.pageIndex===s).map(u=>u.annotationId);o&&await n.run(()=>this.engine.regenerateWidgetAppearances(e,l,c));const d=await n.run(()=>this.engine.getPageAnnoWidgets(e,l));for(const u of d)r.has(u.id)&&a.set(u.id,{widget:u,pageIndex:s})}return a}syncFieldBatch(e,t,n={}){if(this.annotation){for(const[o,{widget:i,pageIndex:r}]of t)this.annotation.syncAnnotationObject(o,i,e),this.annotation.invalidatePageAppearances(r,e),n.emitFieldValueChanges&&this.fieldValueChange$.emit(e,{documentId:e,pageIndex:r,annotationId:o,widget:i});this.buildFieldGroupIndex(e)}}resolveWidgetPage(e,t,n){const o=this.resolveWidgetAnnotation(e,t);if(!o)return null;const i=n.pages.find(r=>r.index===o.pageIndex);return i?{widget:o,page:i}:null}getPageFormAnnoWidgets(e,t){const n=this.getCoreDocumentOrThrow(t).document;if(!n)return se.reject({code:Z.DocNotOpen,message:"document is not open"});const o=n.pages.find(i=>i.index===e);return o?this.engine.getPageAnnoWidgets(n,o):se.reject({code:Z.NotFound,message:"page does not exist"})}setFormFieldValues(e,t,n,o){const i=o??this.getActiveDocumentId(),r=this.getCoreDocumentOrThrow(i).document;if(!r)return se.reject({code:Z.DocNotOpen,message:"document is not open"});const a=r.pages.find(c=>c.index===e);if(!a)return se.reject({code:Z.NotFound,message:"page does not exist"});const s=new de,l=new ya(s);return l.execute(async()=>{const c=this.getFieldGroup(t.id,i),d=await this.readFieldWidgets(r,c,l,!1);await l.run(()=>this.engine.setFormFieldState(r,a,t,n));const u=await this.readFieldWidgets(r,c,l,this.shouldRegenerateWidgetAppearances(n));let m=!0;const g=async f=>{const v=this.getFieldBatchTarget(f);if(!v)return;const y=r.pages.find(b=>b.index===v.pageIndex);if(y&&(await new Promise(b=>{this.engine.setFormFieldState(r,y,v.widget,v.widget.field).wait(()=>b(),()=>b())}),this.shouldRegenerateWidgetAppearances(v.widget.field)))for(const b of new Set([...f.values()].map(w=>w.pageIndex))){const w=r.pages.find(k=>k.index===b);if(!w)continue;const x=[...f.entries()].filter(([,k])=>k.pageIndex===b).map(([k])=>k);await new Promise(k=>{this.engine.regenerateWidgetAppearances(r,w,x).wait(()=>k(),()=>k())})}},p={execute:()=>{const f=m;m=!1,f?this.syncFieldBatch(i,u,{emitFieldValueChanges:!0}):g(u).then(()=>this.syncFieldBatch(i,u,{emitFieldValueChanges:!0}))},undo:()=>{g(d).then(()=>this.syncFieldBatch(i,d,{emitFieldValueChanges:!0}))}};this.history?this.history.forDocument(i).register(p,this.FORM_HISTORY_TOPIC):p.execute(),s.resolve(!0)},c=>({code:Z.Unknown,message:String(c)})),s}findConflictingFieldGroups(e,t,n){const o=new Map;if(!this.annotation)return o;const i=this.annotation.forDocument(n).getState();if(!i)return o;const r=(()=>{const a=this.resolveWidgetAnnotation(t,n);return a?this.getFieldKey(a.field):null})();for(const[a,s]of Object.entries(i.pages)){const l=Number(a);for(const c of s){const d=i.byUid[c];if(!d||d.object.type!==z.WIDGET)continue;const u=d.object;if(u.field.name.trim()!==e)continue;const m=this.getFieldKey(u.field);m&&m!==r&&(o.has(m)||o.set(m,{entries:[],widget:u}),o.get(m).entries.push({annotationId:c,pageIndex:l}))}}return o}renameFieldMethod(e,t,n){const o=n??this.getActiveDocumentId(),i=t.trim();if(!i)return se.reject({code:Z.Unknown,message:"Field name must not be empty."});const r=this.getCoreDocumentOrThrow(o).document;if(!r)return se.reject({code:Z.DocNotOpen,message:"document is not open"});const a=this.resolveWidgetPage(e,o,r);if(!a)return se.reject({code:Z.NotFound,message:"widget annotation not found"});if(a.widget.field.name.trim()===i)return se.resolve({outcome:"no-op"});const s=this.findConflictingFieldGroups(i,e,o);if(s.size>0){if(s.size>1)return se.reject({code:Z.Unknown,message:"That field name is used by multiple fields. Choose a unique name."});const[,d]=[...s.entries()][0];return d.widget.field.type!==a.widget.field.type?se.reject({code:Z.Unknown,message:"That field name is already used by a different widget type."}):se.resolve({outcome:"conflict",targetAnnotationId:d.entries[0].annotationId,fieldName:i})}const l=new de,c=new ya(l);return c.execute(async()=>{const d=this.getFieldGroup(e,o);await c.run(()=>this.engine.renameWidgetField(r,a.page,a.widget,i));const u=await this.readFieldWidgets(r,d,c,!1);this.syncFieldBatch(o,u),l.resolve({outcome:"renamed"})},d=>({code:Z.Unknown,message:String(d)})),l}shareFieldMethod(e,t,n){const o=n??this.getActiveDocumentId();if(e===t)return se.resolve(!0);const i=this.getCoreDocumentOrThrow(o).document;if(!i)return se.reject({code:Z.DocNotOpen,message:"document is not open"});const r=this.resolveWidgetPage(e,o,i),a=this.resolveWidgetPage(t,o,i);if(!r||!a)return se.reject({code:Z.NotFound,message:"widget annotation not found"});if(r.widget.field.type!==a.widget.field.type)return se.reject({code:Z.Unknown,message:"cannot share fields with different widget types"});if(r.widget.field.fieldObjectId&&a.widget.field.fieldObjectId&&r.widget.field.fieldObjectId===a.widget.field.fieldObjectId)return se.resolve(!0);const s=new Map;for(const u of this.getFieldGroup(e,o))s.set(u.annotationId,u);for(const u of this.getFieldGroup(t,o))s.set(u.annotationId,u);const l=[...s.values()],c=new de,d=new ya(c);return d.execute(async()=>{await d.run(()=>this.engine.shareWidgetField(i,r.page,r.widget,a.page,a.widget));const u=await this.readFieldWidgets(i,l,d,this.shouldRegenerateWidgetAppearances(a.widget.field));this.syncFieldBatch(o,u),c.resolve(!0)},u=>({code:Z.Unknown,message:String(u)})),c}selectFieldMethod(e,t){const n=t??this.getActiveDocumentId();this.dispatch(_a(n,e))}deselectFieldMethod(e){const t=e??this.getActiveDocumentId();this.dispatch((function(n){return{type:K1,payload:n}})(t))}getSelectedFieldId(e){return this.getDocumentState(e).selectedFieldId}selectNextFieldMethod(e){const t=e??this.getActiveDocumentId(),n=this.orderedFieldIndex.get(t);if(!n||n.length===0)return;const o=this.getSelectedFieldId(t);let i=0;if(o){const a=n.findIndex(s=>s.annotationId===o);i=a>=0?(a+1)%n.length:0}const r=n[i];this.dispatch(_a(t,r.annotationId))}selectPreviousFieldMethod(e){const t=e??this.getActiveDocumentId(),n=this.orderedFieldIndex.get(t);if(!n||n.length===0)return;const o=this.getSelectedFieldId(t);let i=n.length-1;if(o){const a=n.findIndex(s=>s.annotationId===o);i=a>=0?(a-1+n.length)%n.length:n.length-1}const r=n[i];this.dispatch(_a(t,r.annotationId))}activateFieldMethod(e){const t=e??this.getActiveDocumentId(),n=this.getSelectedFieldId(t);if(!n)return;const o=this.resolveWidgetAnnotation(n,t);if(!o)return;const i=o.field;if(i.type===ye.CHECKBOX){const r=ho(o)?"Off":o.exportValue??"Yes";this.setFormFieldValues(o.pageIndex,o,{...i,value:r},t)}else i.type===ye.RADIOBUTTON&&!ho(o)&&o.exportValue&&this.setFormFieldValues(o.pageIndex,o,{...i,value:o.exportValue},t)}renderWidget(e,t){if(!this.annotation)return se.reject({code:Z.NotFound,message:"annotation plugin not found"});const n=t??this.getActiveDocumentId();return this.annotation.forDocument(n).renderAnnotation(e)}async destroy(){this.state$.clear(),this.fieldValueChange$.clear(),this.formReady$.clear(),super.destroy()}};Z1.id="form";let X1=Z1;const d5={manifest:Q3,create:(e,t)=>new X1(W1,e,t),reducer:(e=Gd,t)=>{switch(t.type){case G1:return{...e,documents:{...e.documents,[t.payload.documentId]:t.payload.state}};case q1:{const n=t.payload,{[n]:o,...i}=e.documents;return{...e,documents:i}}case V1:{const{documentId:n,annotationId:o}=t.payload,i=e.documents[n];return i?{...e,documents:{...e.documents,[n]:{...i,selectedFieldId:o}}}:e}case K1:{const n=t.payload,o=e.documents[n];return o?{...e,documents:{...e.documents,[n]:{...o,selectedFieldId:null}}}:e}default:return e}},initialState:Gd},u5=(e,t,n)=>({selected:e?t.includes(n):void 0});function h5({annotation:e,isSelected:t,scale:n,onClick:o,style:i}){const[r,a]=$(!1),{object:s}=e,l=s.field,c=l.type===ye.TEXTFIELD,d=c?l.value:"",u=c&&!!(l.flag&be.TEXT_COMB)&&!!l.maxLen,m=c&&!!(l.flag&be.TEXT_MULTIPLINE),g=c?l.maxLen:void 0,p=(s.strokeWidth??1)*n,f={fontSize:(s.fontSize??12)*n,...Yn(s.fontFamily),color:s.fontColor??"#000000",lineHeight:1.2};return C("div",{onPointerDown:t?void 0:o,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),style:{position:"absolute",inset:0,background:s.color??"rgba(255, 255, 255, 0.9)",border:`${p}px solid ${s.strokeColor??"rgba(0, 0, 0, 0.2)"}`,outline:r||t?"1px solid rgba(66, 133, 244, 0.5)":"none",outlineOffset:-1,boxSizing:"border-box",pointerEvents:"auto",cursor:t?"move":"pointer",display:"flex",alignItems:m?"flex-start":"center",overflow:"hidden",...u?{}:{padding:`${p}px ${p}px`},...i},children:u&&g?C(m5,{value:d??"",maxLen:g,scale:n,width:s.rect.size.width,fontStyle:f,strokeColor:s.strokeColor??"rgba(0, 0, 0, 0.2)"}):C("span",{style:{...f,display:"block",width:"100%",whiteSpace:m?"pre-wrap":"nowrap",wordBreak:m?"break-word":"normal",overflowWrap:m?"break-word":"normal",overflow:"hidden",textOverflow:m?"clip":"ellipsis"},children:d})})}function m5({value:e,maxLen:t,scale:n,width:o,fontStyle:i,strokeColor:r}){const a=o*n/t,s=e.split("");return C("div",{style:{position:"relative",width:"100%",height:"100%"},children:Array.from({length:t}).map((l,c)=>C("span",{style:{position:"absolute",top:0,left:c*a,width:a,height:"100%",display:"flex",alignItems:"center",justifyContent:"center",borderRight:c<t-1?`1px solid ${r}`:"none",boxSizing:"border-box",...i},children:s[c]||""},c))})}function p5({annotation:e,isSelected:t,scale:n,onClick:o,style:i}){const[r,a]=$(!1),{object:s}=e,l=ho(s);return C("div",{onPointerDown:t?void 0:o,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),style:{position:"absolute",inset:0,background:s.color??"#FFFFFF",border:`${(s.strokeWidth??1)*n}px solid ${s.strokeColor??"#000000"}`,outline:r||t?"1px solid rgba(66, 133, 244, 0.5)":"none",outlineOffset:-1,boxSizing:"border-box",pointerEvents:"auto",cursor:t?"move":"pointer",display:"flex",alignItems:"center",justifyContent:"center",...i},children:l&&C("svg",{viewBox:"0 0 100 100",style:{width:"100%",height:"100%"},children:C("path",{d:"M28 48C27.45 50.21 29.45 63.13 30 67C30.55 69.21 34.58 72 39 72C44.52 71.45 76.55 32.55 76 32C77.1 31.45 76 25 76 25C74.34 22.24 68 25.45 68 26C68 26 43.55 53 43 53C41.34 53 40.55 41.1 40 40C33.37 36.69 29.1 45.79 28 48Z",fill:"#000000"})})})}function g5({annotation:e,isSelected:t,scale:n,onClick:o,style:i}){const[r,a]=$(!1),{object:s}=e,l=ho(s);return C("div",{onPointerDown:t?void 0:o,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),style:{position:"absolute",inset:0,background:s.color??"#FFFFFF",border:`${(s.strokeWidth??1)*n}px solid ${s.strokeColor??"#000000"}`,borderRadius:"50%",outline:r||t?"1px solid rgba(66, 133, 244, 0.5)":"none",outlineOffset:-1,boxSizing:"border-box",pointerEvents:"auto",cursor:t?"move":"pointer",display:"flex",alignItems:"center",justifyContent:"center",...i},children:l&&C("div",{style:{width:"50%",height:"50%",borderRadius:"50%",background:"#000000"}})})}function f5({annotation:e,isSelected:t,scale:n,onClick:o,style:i}){var r;const[a,s]=$(!1),{object:l}=e,c=l.field,d=((r=(c.type===ye.COMBOBOX?c.options:[]).find(g=>g.isSelected))==null?void 0:r.label)??"",u=(l.strokeWidth??1)*n,m=(l.fontSize??12)*n;return C("div",{onPointerDown:t?void 0:o,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),style:{position:"absolute",inset:0,background:l.color??"#FFFFFF",border:`${u}px solid ${l.strokeColor??"#000000"}`,outline:a||t?"1px solid rgba(66, 133, 244, 0.5)":"none",outlineOffset:-1,boxSizing:"border-box",pointerEvents:"auto",cursor:t?"move":"pointer",display:"flex",alignItems:"center",overflow:"hidden",...i},children:[C("span",{style:{flex:1,padding:`0 ${4*n}px`,fontSize:m,...Yn(l.fontFamily),color:l.fontColor??"#000000",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:d}),C("div",{style:{width:13*n,minWidth:13*n,height:"100%",display:"flex",alignItems:"center",justifyContent:"center",borderLeft:`1px solid ${l.strokeColor??"#000000"}`},children:C("svg",{viewBox:"0 0 10 6",style:{width:8*n,height:5*n},fill:"currentColor",children:C("path",{d:"M0 0 L5 6 L10 0 Z"})})})]})}function v5({annotation:e,isSelected:t,scale:n,onClick:o,style:i}){const[r,a]=$(!1),{object:s}=e,l=s.field,c=l.type===ye.LISTBOX?l.options:[],d=(s.strokeWidth??1)*n,u=(s.fontSize??12)*n,m=1.2*u;return C("div",{onPointerDown:t?void 0:o,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),style:{position:"absolute",inset:0,background:s.color??"#FFFFFF",border:`${d}px solid ${s.strokeColor??"#000000"}`,outline:r||t?"1px solid rgba(66, 133, 244, 0.5)":"none",outlineOffset:-1,boxSizing:"border-box",pointerEvents:"auto",cursor:t?"move":"pointer",overflow:"hidden",display:"flex",flexDirection:"column",...i},children:c.map((g,p)=>C("div",{style:{padding:`0 ${4*n}px`,fontSize:u,lineHeight:`${m}px`,...Yn(s.fontFamily),color:g.isSelected?"#FFFFFF":s.fontColor??"#000000",background:g.isSelected?"rgba(0, 51, 113, 1)":"transparent",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:g.label},p))})}const la=()=>at(X1.id),Oi=e=>{var t;const{provides:n}=la(),[o,i]=$(((t=n?.forDocument(e))==null?void 0:t.getState())??{...us});return H(()=>{if(!n)return;const r=n.forDocument(e);return i(r.getState()),r.onStateChange(a=>{i(a)})},[n,e]),o};function Ni(e){const{currentObject:t,scale:n,pageIndex:o}=e,i=t.field,{provides:r}=la(),[a,s]=$(0),l=!!(i.flag&be.READONLY),c=ee(()=>r?.forDocument(e.documentId),[r,e.documentId]);H(()=>{if(c)return c.onFieldValueChange(u=>{u.annotationId===t.id&&s(m=>m+1)})},[c,t.id]);const d=Y(u=>{c&&c.setFormFieldValues(o,t,u)},[c,o,t]);return{annotation:t,field:i,scale:n,pageIndex:o,scope:c,handleChangeField:d,renderKey:a,isReadOnly:l}}function $i({pageIndex:e,annotation:t,scaleFactor:n=1,renderKey:o=0,style:i,...r}){const{provides:a}=la(),[s,l]=$(null),c=Q(null),{width:d,height:u}=t.rect.size;return H(()=>{if(!a)return;const m=a.renderWidget({pageIndex:e,annotation:t,options:{scaleFactor:n,dpr:window.devicePixelRatio}});return m.wait(g=>{const p=URL.createObjectURL(g);c.current&&URL.revokeObjectURL(c.current),c.current=p,l(p)},vt),()=>{m.abort({code:Z.Cancelled,message:"canceled render task"})}},[e,n,a,t.id,d,u,o]),H(()=>()=>{c.current&&(URL.revokeObjectURL(c.current),c.current=null)},[]),C(fe,{children:s&&C("img",{src:s,...r,style:{width:"100%",height:"100%",display:"block",...i||{}}})})}const dl={position:"absolute",top:0,left:0,padding:0,margin:0,width:"100%",height:"100%",borderRadius:0,outline:"none",boxSizing:"border-box"},y5=dl,b5={...dl,cursor:"inherit"},w5={...dl,resize:"none",lineHeight:1.14},x5={position:"relative",width:"100%",height:"100%",borderRadius:0,boxSizing:"border-box"},C5={position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0,padding:0,margin:0,border:"none",zIndex:1},k5={position:"absolute",top:0,height:"100%",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},I5={position:"absolute",top:"15%",height:"70%",width:1,backgroundColor:"black",pointerEvents:"none"};function S5(e){const{inputRef:t,required:n,disabled:o,password:i,name:r,value:a,maxLen:s,cellWidth:l,chars:c,caretIndex:d,containerStyle:u,cellFontStyle:m,onFocus:g,onChange:p,onBlur:f}=e,[v,y]=$(!0);H(()=>{y(!0);const w=setInterval(()=>y(x=>!x),530);return()=>clearInterval(w)},[d]);const b=d<s;return C("div",{style:u,children:[C("input",{ref:t,required:n,disabled:o,type:i?"password":"text",name:r,"aria-label":r,value:a,maxLength:s,onFocus:g,onChange:p,onBlur:f,style:C5}),Array.from({length:s}).map((w,x)=>C("span",{style:{...k5,...m,left:x*l,width:l},children:c[x]||""},x)),b&&C("span",{style:{...I5,left:d*l+l/2,opacity:v?1:0}})]})}function M5(e){const{annotation:t,isEditable:n,onChangeField:o,onFocus:i,onBlur:r,inputRef:a,scale:s,syncExternalValue:l=!0}=e,c=t.field,{flag:d}=c,u=c.name,m=c.value,[g,p]=$(m);H(()=>{l&&p(m)},[m,l]);const f=Y(D=>{const F=D.target.value;p(F),o?.({...c,value:F})},[o,c]),v=(t.strokeWidth??0)*s,y=Yn(t.fontFamily),{adjustedFontPx:b,wrapperStyle:w}=Xg(t.fontSize*s,!0),x=ee(()=>({backgroundColor:t.color??"transparent",borderStyle:"solid",borderColor:t.strokeColor??"transparent",borderWidth:v,color:t.fontColor,...y,fontSize:b,padding:`${v}px ${v}px`}),[t.color,t.strokeColor,t.fontColor,b,v,y]),k=!n||!!(d&be.READONLY),I=!!(d&be.REQUIRED),S=!!(d&be.TEXT_PASSWORD),A=!!(d&be.TEXT_MULTIPLINE),M=!!(d&be.TEXT_COMB),P=c.maxLen;if(M&&P){const D=t.rect.size.width*s/P,F=(g||"").split(""),N=C(S5,{inputRef:a,required:I,disabled:k,password:S,name:u,value:g,maxLen:P,cellWidth:D,chars:F,caretIndex:F.length,containerStyle:{...x5,backgroundColor:t.color??"transparent",borderStyle:"solid",borderColor:t.strokeColor??"transparent",borderWidth:v},cellFontStyle:{color:t.fontColor,...y,fontSize:b},onFocus:i,onChange:f,onBlur:r});return w?C("div",{style:w,children:N}):N}const T=A?C("textarea",{ref:a,required:I,disabled:k,name:u,"aria-label":u,value:g,maxLength:P,onFocus:i,onChange:f,onBlur:r,style:{...w5,...x}}):C("input",{ref:a,required:I,disabled:k,type:S?"password":"text",name:u,"aria-label":u,value:g,maxLength:P,onFocus:i,onChange:f,onBlur:r,style:{...y5,...x}});return w?C("div",{style:w,children:T}):T}function A5(e){const{annotation:t,scale:n,pageIndex:o,scope:i,handleChangeField:r,renderKey:a,isReadOnly:s}=Ni(e),l=Oi(e.documentId),[c,d]=$(!1),u=Q(null),m=l.selectedFieldId===t.id;H(()=>{m&&u.current&&document.activeElement!==u.current&&u.current.focus()},[m]);const g=Y(()=>
2119{s||(i?.selectField(t.id),d(!0))},[s,i,t.id]),p=Y(()=>{d(!1),i?.getSelectedFieldId()===t.id&&i?.deselectField()},[i,t.id]),f=Y(v=>{u.current=v},[]);return C("div",{style:{width:"100%",height:"100%",overflow:"hidden",position:"relative",pointerEvents:"auto",outline:"none"},children:[C($i,{pageIndex:o,annotation:t,scaleFactor:n,renderKey:a,style:{position:"absolute",inset:0,pointerEvents:"none",visibility:c?"hidden":"visible"}}),C("div",{style:{position:"absolute",inset:0,zIndex:1,opacity:c?1:0},children:C(M5,{annotation:t,scale:n,pageIndex:o,isEditable:!0,onChangeField:r,syncExternalValue:!c,onFocus:g,onBlur:p,inputRef:f})})]})}function P5(e){const{annotation:t,field:n,scale:o,pageIndex:i,scope:r,handleChangeField:a,renderKey:s,isReadOnly:l}=Ni(e),c=Oi(e.documentId),d=Q(null),u=c.selectedFieldId===t.id;H(()=>{u&&d.current&&document.activeElement!==d.current&&d.current.focus()},[u]);const m=Y(()=>{if(l)return;const y=ho(t)?"Off":t.exportValue??"Yes";a({...n,value:y})},[l,t,n,a]),g=Y(()=>{l||(r?.selectField(t.id),m())},[l,r,t.id,m]),p=Y(()=>{l||r==null||r.selectField(t.id)},[l,r,t.id]),f=Y(()=>{r?.getSelectedFieldId()===t.id&&r?.deselectField()},[r,t.id]),v=Y(y=>{y.key!==" "&&y.key!=="Enter"||(y.preventDefault(),m())},[m]);return C("div",{ref:d,tabIndex:l?-1:0,onClick:g,onFocus:p,onBlur:f,onKeyDown:v,style:{width:"100%",height:"100%",overflow:"hidden",cursor:l?"default":"pointer",pointerEvents:"auto",outline:u?"2px solid rgba(66, 133, 244, 0.8)":"none",outlineOffset:-2},children:C($i,{pageIndex:i,annotation:t,scaleFactor:o,renderKey:s,style:{pointerEvents:"none"}})})}function D5(e){const{annotation:t,field:n,scale:o,pageIndex:i,scope:r,handleChangeField:a,renderKey:s,isReadOnly:l}=Ni(e),c=Oi(e.documentId),d=Q(null),u=c.selectedFieldId===t.id;H(()=>{u&&d.current&&document.activeElement!==d.current&&d.current.focus()},[u]);const m=Y(()=>{l||!ho(t)&&t.exportValue&&a({...n,value:t.exportValue})},[l,t,n,a]),g=Y(()=>{l||(r?.selectField(t.id),m())},[l,r,t.id,m]),p=Y(()=>{l||r==null||r.selectField(t.id)},[l,r,t.id]),f=Y(()=>{r?.getSelectedFieldId()===t.id&&r?.deselectField()},[r,t.id]),v=Y(y=>{y.key!==" "&&y.key!=="Enter"||(y.preventDefault(),m())},[m]);return C("div",{ref:d,tabIndex:l?-1:0,onClick:g,onFocus:p,onBlur:f,onKeyDown:v,style:{width:"100%",height:"100%",overflow:"hidden",cursor:l?"default":"pointer",pointerEvents:"auto",outline:u?"2px solid rgba(66, 133, 244, 0.8)":"none",outlineOffset:-2},children:C($i,{pageIndex:i,annotation:t,scaleFactor:o,renderKey:s,style:{pointerEvents:"none"}})})}function T5(e){const{annotation:t,isEditable:n,onChangeField:o,onBlur:i,inputRef:r}=e,a=t.field,{flag:s,options:l}=a,c=a.alternateName||a.name,d=!n||!!(s&be.READONLY),u=!!(s&be.REQUIRED),m=Y(v=>{const y=v.target,b=l.map((w,x)=>({...w,isSelected:x===y.selectedIndex}));o?.({...a,options:b})},[o,a,l]),g=l.filter(v=>v.isSelected).map(v=>v.label);return C("select",{ref:r,required:u,disabled:d,name:c,"aria-label":c,...(p=!1,f=g,{value:p?void 0:f[0]||""}),onChange:m,onBlur:i,style:{...b5,opacity:0},children:l.map((v,y)=>C("option",{value:v.label,...u5(!1,g,v.label),children:v.label},y))});var p,f}function z5(e){const{annotation:t,scale:n,pageIndex:o,scope:i,handleChangeField:r,renderKey:a,isReadOnly:s}=Ni(e),l=Oi(e.documentId),c=Q(null),d=Q(null),u=l.selectedFieldId===t.id;H(()=>{u&&c.current&&!c.current.contains(document.activeElement)&&(d.current??c.current).focus()},[u]);const m=Y(()=>{i?.selectField(t.id)},[i,t.id]),g=Y(()=>{requestAnimationFrame(()=>{var f;(f=c.current)!=null&&f.contains(document.activeElement)||i?.getSelectedFieldId()===t.id&&i?.deselectField()})},[i,t.id]),p=Y(f=>{d.current=f},[]);return C("div",{ref:c,onFocus:m,onBlur:g,style:{width:"100%",height:"100%",overflow:"hidden",cursor:s?"default":"pointer",pointerEvents:"auto",outline:u?"2px solid rgba(66, 133, 244, 0.8)":"none",outlineOffset:-2},children:[C($i,{pageIndex:o,annotation:t,scaleFactor:n,renderKey:a,style:{pointerEvents:"none"}}),C(T5,{annotation:t,scale:n,pageIndex:o,isEditable:!0,onChangeField:r,inputRef:p})]})}function R5(e){const{annotation:t,isEditable:n,onChangeField:o,onBlur:i,inputRef:r,scale:a}=e,s=t.field,{flag:l,options:c}=s,d=!n||!!(l&be.READONLY),u=!!(l&be.CHOICE_MULTL_SELECT),m=(t.strokeWidth??0)*a,g=(t.fontSize??12)*a,p=1.2*g,f=Yn(t.fontFamily),v=ee(()=>({position:"absolute",top:0,left:0,width:"100%",height:"100%",background:t.color??"#FFFFFF",borderStyle:"solid",borderColor:t.strokeColor??"#000000",borderWidth:m,boxSizing:"border-box",overflow:"auto",display:"flex",flexDirection:"column",outline:"none"}),[t.color,t.strokeColor,m]),y=Y(b=>{if(d)return;const w=c.map((x,k)=>({...x,isSelected:u?k===b?!x.isSelected:x.isSelected:k===b}));o?.({...s,options:w})},[d,u,c,s,o]);return C("div",{ref:r,onBlur:i,style:v,children:c.map((b,w)=>C("div",{onClick:()=>y(w),style:{padding:`0 ${4*a}px`,fontSize:g,lineHeight:`${p}
2119px`,...f,color:b.isSelected?"#FFFFFF":t.fontColor??"#000000",background:b.isSelected?"rgba(0, 51, 113, 1)":"transparent",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",cursor:d?"default":"pointer"},children:b.label},w))})}function E5(e){const{annotation:t,scale:n,pageIndex:o,scope:i,handleChangeField:r,renderKey:a,isReadOnly:s}=Ni(e),l=Oi(e.documentId),[c,d]=$(!1),u=Q(null),m=l.selectedFieldId===t.id;H(()=>{m&&u.current&&!u.current.contains(document.activeElement)&&u.current.focus()},[m]);const g=Y(()=>{s||(i?.selectField(t.id),d(!0))},[s,i,t.id]),p=Y(()=>{requestAnimationFrame(()=>{var f;(f=u.current)!=null&&f.contains(document.activeElement)||(d(!1),i?.getSelectedFieldId()===t.id&&i?.deselectField())})},[i,t.id]);return C("div",{ref:u,tabIndex:s?-1:0,onFocus:g,onBlur:p,style:{width:"100%",height:"100%",overflow:"hidden",cursor:s?"default":"pointer",pointerEvents:"auto",outline:m&&!c?"2px solid rgba(66, 133, 244, 0.8)":"none",outlineOffset:-2},children:[C(R5,{annotation:t,scale:n,pageIndex:o,isEditable:!0,onChangeField:r}),!c&&C($i,{pageIndex:o,annotation:t,scaleFactor:n,renderKey:a,style:{pointerEvents:"none"}})]})}const _5=[st({id:"formTextField",matches:e=>{var t;return e.type===z.WIDGET&&((t=e.field)==null?void 0:t.type)===ye.TEXTFIELD},render:({annotation:e,isSelected:t,scale:n,pageIndex:o,onClick:i})=>C(h5,{annotation:e,isSelected:t,scale:n,pageIndex:o,onClick:i}),renderPreview:({bounds:e,scale:t})=>C("div",{style:{position:"absolute",left:0,top:0,width:e.size.width*t,height:e.size.height*t,border:"1px dashed rgba(66, 133, 244, 0.6)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxSizing:"border-box",display:"flex",alignItems:"center",padding:`0 ${2*t}px`,overflow:"hidden"}}),interactionDefaults:{isDraggable:!1,isResizable:!0,isRotatable:!1},useAppearanceStream:!1,renderLocked:e=>C(A5,{...e})}),st({id:"formCheckbox",matches:e=>{var t;return e.type===z.WIDGET&&((t=e.field)==null?void 0:t.type)===ye.CHECKBOX},render:({annotation:e,isSelected:t,scale:n,pageIndex:o,onClick:i})=>C(p5,{annotation:e,isSelected:t,scale:n,pageIndex:o,onClick:i}),renderPreview:({bounds:e,scale:t})=>C("div",{style:{position:"absolute",left:0,top:0,width:e.size.width*t,height:e.size.height*t,border:"1px dashed rgba(66, 133, 244, 0.6)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"}}),interactionDefaults:{isDraggable:!1,isResizable:!0,isRotatable:!1},useAppearanceStream:!1,renderLocked:e=>C(P5,{...e})}),st({id:"formRadioButton",matches:e=>{var t;return e.type===z.WIDGET&&((t=e.field)==null?void 0:t.type)===ye.RADIOBUTTON},render:({annotation:e,isSelected:t,scale:n,pageIndex:o,onClick:i})=>C(g5,{annotation:e,isSelected:t,scale:n,pageIndex:o,onClick:i}),renderPreview:({bounds:e,scale:t})=>C("div",{style:{position:"absolute",left:0,top:0,width:e.size.width*t,height:e.size.height*t,border:"1px dashed rgba(66, 133, 244, 0.6)",backgroundColor:"rgba(255, 255, 255, 0.9)",borderRadius:"50%",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"}}),interactionDefaults:{isDraggable:!1,isResizable:!0,isRotatable:!1},useAppearanceStream:!1,renderLocked:e=>C(D5,{...e})}),st({id:"formCombobox",matches:e=>{var t;return e.type===z.WIDGET&&((t=e.field)==null?void 0:t.type)===ye.COMBOBOX},render:({annotation:e,isSelected:t,scale:n,pageIndex:o,onClick:i})=>C(f5,{annotation:e,isSelected:t,scale:n,pageIndex:o,onClick:i}),renderPreview:({bounds:e,scale:t})=>C("div",{style:{position:"absolute",left:0,top:0,width:e.size.width*t,height:e.size.height*t,border:"1px dashed rgba(66, 133, 244, 0.6)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxSizing:"border-box",display:"flex",alignItems:"center",padding:`0 ${2*t}px`,overflow:"hidden"}}),interactionDefaults:{isDraggable:!1,isResizable:!0,isRotatable:!1},useAppearanceStream:!1,renderLocked:e=>C(z5,{...e})}),st({id:"formListbox",matches:e=>{var t;return e.type===z.WIDGET&&((t=e.field)==null?void 0:t.type)===ye.LISTBOX},render:({annotation:e,isSelected:t,scale:n,pageIndex:o,onClick:i})=>C(v5,{annotation:e,isSelected:t,scale:n,pageIndex:o,onClick:i}),renderPreview:({bounds:e,scale:t})=>C("div",{style:{position:"absolute",left:0,top:0,width:e.size.width*t,height:e.size.height*t,border:"1px dashed rgba(66, 133, 244, 0.6)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxSizing:"border-box",display:"flex",flexDirection:"column",overflow:"hidden"}}),interactionDefaults:{isDraggable:!1,isResizable:!0,isRotatable:!1},useAppearanceStream:!1,renderLocked:e=>C(E5,{...e})})],L5=cn(d5).addUtility(function(){return Kg(_5),null}).build(),Ai="stamp",O5={id:Ai,name:"Stamp Plugin",version:"1.0.0",provides:["stamp"],requires:["annotation"],optional:["i18n"],defaultConfig:{defaultLibrary:{id:"custom",n
2119ame:"Custom Stamps",nameKey:"stamp.library.custom",categories:["custom","sidebar"]},manifests:[{url:"https://cdn.jsdelivr.net/npm/@embedpdf/default-stamps/{locale}/manifest.json",fallbackLocale:"en"}]}},Y1="STAMP/ADD_LIBRARY",Q1="STAMP/REMOVE_LIBRARY";function qd(e){return{type:Y1,payload:e}}function Vd(e){return{type:Q1,payload:e}}const N5={annotationType:z.STAMP,create(e){const{onPreview:t,onCommit:n,getTool:o,pageSize:i,pageRotation:r,getToolContext:a}=e;return{onPointerMove:s=>{const l=a();if(!l?.stampSize)return;const{width:c,height:d}=l.stampSize;t({type:z.STAMP,bounds:{origin:{x:s.x-c/2,y:s.y-d/2},size:{width:c,height:d}},data:{rect:{origin:{x:s.x-c/2,y:s.y-d/2},size:{width:c,height:d}},ghostUrl:l.ghostUrl,pageRotation:r}})},onPointerDown:s=>{var l;const c=o(),d=a();if(!c||!d?.stampSize)return;const{width:u,height:m}=d.stampSize,g={origin:{x:s.x-u/2,y:s.y-m/2},size:{width:u,height:m}};let p={...c.defaults,rect:g,type:z.STAMP,name:d.stamp.name??c.defaults.name??Ne.Custom,subject:d.stamp.subject??c.defaults.subject??"Custom Stamp",flags:c.defaults.flags??["print"],pageIndex:e.pageIndex,id:Ce(),created:new Date};(l=c.behavior)!=null&&l.insertUpright&&(p=ki(p,r,!1)),p=Li(p,i),n(p,{appearance:d.appearance}),t(null)},onPointerLeave:()=>{t(null)}}}},hs="rubberStamp",$5=[{id:hs,name:"Rubber Stamp",labelKey:"stamp.rubberStamp",categories:["annotation","stamp","insert"],matchScore:()=>0,interaction:{exclusive:!0,cursor:"copy",isDraggable:!0,isResizable:!0,isRotatable:!1,lockAspectRatio:!0,isGroupDraggable:!0,isGroupResizable:!1,isGroupRotatable:!1},defaults:{type:z.STAMP},behavior:{deactivateToolAfterCreate:!0,selectAfterCreate:!0,insertUpright:!0,useAppearanceStream:!0},pointerHandler:N5}],F5={Approved:Ne.Approved,Experimental:Ne.Experimental,NotApproved:Ne.NotApproved,AsIs:Ne.AsIs,Expired:Ne.Expired,NotForPublicRelease:Ne.NotForPublicRelease,Confidential:Ne.Confidential,Final:Ne.Final,Sold:Ne.Sold,Departmental:Ne.Departmental,ForComment:Ne.ForComment,TopSecret:Ne.TopSecret,Draft:Ne.Draft,ForPublicRelease:Ne.ForPublicRelease,Completed:Ne.Completed,Void:Ne.Void,PreliminaryResults:Ne.PreliminaryResults,InformationOnly:Ne.InformationOnly,Rejected:Ne.Rejected,Witness:Ne.Witness,InitialHere:Ne.InitialHere,SignHere:Ne.SignHere,Accepted:Ne.Accepted,Custom:Ne.Custom,Image:Ne.Image},J1=class extends Ye{constructor(e,t,n){var o,i;if(super(e,t),this.config=n,this.instanceId=Ce(),this.libraries=new Map,this.libraryChange$=xt(),this.activeStamp$=et((r,a)=>({documentId:r,activeStamp:a})),this.managedManifests=[],this.annotation=null,this.i18n=null,this.localeUnsubscribe=null,this.toolChangeUnsubscribe=null,this.currentGhostUrl=null,this.annotation=((o=t.getPlugin("annotation"))==null?void 0:o.provides())??null,this.annotation){for(const r of $5)this.annotation.addTool(r);this.toolChangeUnsubscribe=this.annotation.onActiveToolChange(({documentId:r,tool:a})=>{a?.id!==hs&&(this.currentGhostUrl&&(URL.revokeObjectURL(this.currentGhostUrl),this.currentGhostUrl=null),this.activeStamp$.emit(r,null))})}this.i18n=((i=t.getPlugin("i18n"))==null?void 0:i.provides())??null}async initialize(){if(this.config.libraries)for(const e of this.config.libraries)await this.loadLibraryInternal(e).toPromise();this.config.manifests&&this.config.manifests.length>0&&await this.initializeManifests()}buildCapability(){return{getLibraries:()=>this.getLibraries(),getStampsByCategory:e=>this.getStampsByCategory(e),renderStamp:(e,t,n,o)=>this.renderStamp(e,t,n,o),loadLibrary:e=>this.loadLibrary(e),loadLibraryFromManifest:e=>this.loadLibraryFromManifest(e),createNewLibrary:(e,t)=>this.createNewLibrary(e,t),addStampToLibrary:(e,t,n)=>this.addStampToLibrary(e,t,n),removeStampFromLibrary:(e,t)=>this.removeStampFromLibrary(e,t),updateStamp:(e,t,n)=>this.updateStamp(e,t,n),updateLibrary:(e,t)=>this.updateLibrary(e,t),removeLibrary:e=>this.removeLibrary(e),exportLibrary:e=>this.exportLibrary(e),forDocument:e=>this.createStampScope(e),onActiveStampChange:this.activeStamp$.onGlobal,onLibraryChange:this.libraryChange$.on}}getLibraries(){return Array.from(this.libraries.values())}getStampsByCategory(e){var t,n;const o=[];for(const i of this.libraries.values()){const r=((t=i.categories)==null?void 0:t.includes(e))??!1;for(const a of i.stamps){const s=((n=a.categories)==null?void 0:n.includes(e))??!1;(r||s)&&o.push({library:i,stamp:a})}}return o}renderStamp(e,t,n,o){const i=this.libraries.get(e);if(!i){const s=new de;
vendor: 14,166 bytes, line 2119
2119return s.reject({code:Z.NotFound,message:`Stamp library not found: ${e}`}),s}const r=i.document.pages[t];if(!r){const s=new de;return s.reject({code:Z.NotFound,message:`Page ${t} not found in stamp library: ${e}`}),s}const a=n/r.size.width;return this.engine.renderPageRect(i.document,r,{origin:{x:0,y:0},size:r.size},{scaleFactor:a,dpr:o??1,withAnnotations:!0,rotation:r.rotation,transparentBackground:!0})}loadLibrary(e){return this.loadLibraryInternal(e)}createNewLibrary(e,t){const n=new de,o=t?.id??this.generateLibraryId(),i=this.getLibraryDocumentId(o);return this.engine.createDocument(i).wait(r=>{const a={id:o,name:e,nameKey:t?.nameKey,document:r,stamps:[],categories:t?.categories,readonly:t?.readonly??!1};this.libraries.set(o,a),this.dispatch(qd(o)),this.emitLibraryChange(),n.resolve(o)},r=>{this.logger.error("StampPlugin","CreateNewLibrary",`Failed to create library: ${e}`,r),n.fail(r)}),n}addStampToLibrary(e,t,n){const o=new de,i=this.libraries.get(e);if(!i)return o.reject({code:Z.NotFound,message:`Stamp library not found: ${e}`}),o;if(i.readonly)return o.reject({code:Z.NotSupport,message:`Cannot add stamps to readonly library: ${e}`}),o;const r=`stamp-temp-${Date.now()}`;return this.engine.openDocumentBuffer({id:r,content:n}).wait(a=>{this.engine.importPages(i.document,a,[0]).wait(s=>{const l=s[0];i.document.pages.push(l),i.document.pageCount=i.document.pages.length;const c={...t,id:Ce(),pageIndex:l.index};i.stamps.push(c),this.engine.closeDocument(a).wait(()=>{this.emitLibraryChange(),o.resolve()},()=>{this.emitLibraryChange(),o.resolve()})},s=>{this.logger.error("StampPlugin","AddStampToLibrary","Failed to import page",s),this.engine.closeDocument(a).wait(()=>o.fail(s),()=>o.fail(s))})},a=>{this.logger.error("StampPlugin","AddStampToLibrary","Failed to open temp document",a),o.fail(a)}),o}createStampScope(e){return{createStampFromAnnotation:(t,n,o)=>this.createStampFromAnnotation(e,t,n,o),createStampFromAnnotations:(t,n,o)=>this.createStampFromAnnotations(e,t,n,o),activateStampPlacement:(t,n)=>this.activateStampPlacement(e,t,n),activateStampPlacementById:(t,n)=>this.activateStampPlacementById(e,t,n),getActiveStamp:()=>this.getActiveStamp(e),onActiveStampChange:this.activeStamp$.forScope(e)}}activateStampPlacementById(e,t,n){const o=new de,i=this.libraries.get(t);if(!i)return o.reject({code:Z.NotFound,message:`Stamp library not found: ${t}`}),o;const r=i.stamps.find(a=>a.id===n);return r?this.activateStampPlacement(e,t,r):(o.reject({code:Z.NotFound,message:`Stamp ${n} not found in library: ${t}`}),o)}getActiveStamp(e){return this.activeStamp$.getValue(e)??null}activateStampPlacement(e,t,n){const o=new de,i=this.libraries.get(t);if(!i)return o.reject({code:Z.NotFound,message:`Stamp library not found: ${t}`}),o;const r=i.document.pages[n.pageIndex];if(!r)return o.reject({code:Z.NotFound,message:`Page ${n.pageIndex} not found in library`}),o;const a=r.size;return this.engine.extractPages(i.document,[n.pageIndex]).wait(s=>{this.renderStamp(t,n.pageIndex,a.width,2).wait(l=>{var c;this.currentGhostUrl&&URL.revokeObjectURL(this.currentGhostUrl);const d=URL.createObjectURL(l);this.currentGhostUrl=d,(c=this.annotation)==null||c.setActiveTool(hs,{appearance:s,ghostUrl:d,stampSize:a,libraryId:t,stamp:n}),this.activeStamp$.emit(e,{libraryId:t,stamp:n}),o.resolve()},l=>{this.logger.error("StampPlugin","ActivateStampPlacement","Failed to render stamp preview",l),o.fail(l)})},s=>{this.logger.error("StampPlugin","ActivateStampPlacement","Failed to extract stamp page",s),o.fail(s)}),o}createStampFromAnnotation(e,t,n,o){const i=new de,r=this.getCoreDocument(e);if(!r?.document)return i.reject({code:Z.DocNotOpen,message:"document is not open"}),i;const a=r.document,s=a.pages[t.pageIndex];return s?(this.resolveTargetLibrary(o).wait(l=>{this.engine.exportAnnotationAppearanceAsPdf(a,s,t).wait(c=>{this.addStampToLibrary(l,n,c).wait(()=>i.resolve(),d=>i.fail(d))},c=>{this.logger.error("StampPlugin","CreateStampFromAnnotation","Failed to export annotation",c),i.fail(c)})},l=>i.fail(l)),i):(i.reject({code:Z.NotFound,message:`page ${t.pageIndex} not found`}),i)}createStampFromAnnotations(e,t,n,o){const i=new de;if(t.length===0)return i.reject({code:Z.NotFound,message:"no annotations provided"}),i;const r=this.getCoreDocument(e);if(!r?.document)return i.reject({code:Z.DocNotOpen,message:"document is not open"}),i;const a=r.document,s=a.pages[t[0].pageIndex];return s?(this.resolveTargetLibrary(o).wait(l=>{this.engine.exportAnnotationsAppearanceAsPdf(a,s,t).wait(c=>{this.addStampToLibrary(l,n,c).wait(()=>i.resolve(),d=>i.fail(d))},c=>{this.logger.error("StampPlugin","CreateStampFromAnnotations","Failed to export annotations",c),i.fail(c)})},l=>i.fail(l)),i):(i.reject({code:Z.NotFound,message:`page ${t[0].pageIndex} not found`}),i)}resolveTargetLibrary(e){if(e&&this.libraries.has(e)){const o=new de;return o.resolve(e),o}const t=this.config.defaultLibrary;if(this.config.defaultLibrary===!1||!t){const o=new de;return o.reject({code:Z.NotSupport,message:"Default library creation is disabled"}),o}const n=t.id??"custom";if(this.libraries.has(n)){const o=new de;return o.resolve(n),o}return this.createNewLibrary(t.name??"Custom Stamps",{id:n,nameKey:t.nameKey,categories:t.categories})}removeLibrary(e){const t=new de,n=this.libraries.get(e);return n?(this.engine.closeDocument(n.document).wait(()=>{this.libraries.delete(e),this.dispatch(Vd(e)),this.emitLibraryChange(),t.resolve()},()=>{this.logger.warn("StampPlugin","RemoveLibrary",`Failed to close document for library: ${e}`),this.libraries.delete(e),this.dispatch(Vd(e)),this.emitLibraryChange(),t.resolve()}),t):(t.resolve(),t)}exportLibrary(e){const t=new de,n=this.libraries.get(e);return n?(this.engine.saveAsCopy(n.document).wait(o=>{t.resolve({name:n.name,pdf:o,stamps:n.stamps,categories:n.categories})},o=>{this.logger.error("StampPlugin","ExportLibrary",`Failed to export library: ${e}`,o),t.fail(o)}),t):(t.reject({code:Z.NotFound,message:`Stamp library not found: ${e}`}),t)}loadLibraryInternal(e){const t=new de,n=e.id??this.generateLibraryId(),o=this.getLibraryDocumentId(n);return(typeof e.pdf=="string"?this.engine.openDocumentUrl({id:o,url:e.pdf}):this.engine.openDocumentBuffer({id:o,content:e.pdf})).wait(i=>{const r=e.stamps.map(s=>s.id?s:{...s,id:Ce()}),a={id:n,name:e.name,nameKey:e.nameKey,document:i,stamps:r,categories:e.categories,readonly:e.readonly??!1};this.libraries.set(n,a),this.dispatch(qd(n)),this.emitLibraryChange(),t.resolve(n)},i=>{this.logger.error("StampPlugin","LoadLibrary",`Failed to load stamp library: ${e.name}`,i),t.fail(i)}),t}removeStampFromLibrary(e,t){const n=new de,o=this.libraries.get(e);if(!o)return n.reject({code:Z.NotFound,message:`Stamp library not found: ${e}`}),n;if(o.readonly)return n.reject({code:Z.NotSupport,message:`Cannot remove stamps from readonly library: ${e}`}),n;const i=o.stamps.findIndex(a=>a.id===t);if(i===-1)return n.reject({code:Z.NotFound,message:`Stamp ${t} not found in library: ${e}`}),n;const r=o.stamps[i].pageIndex;return this.engine.deletePage(o.document,r).wait(()=>{o.stamps.splice(i,1),o.document.pages.splice(r,1),o.document.pageCount=o.document.pages.length;for(const a of o.stamps)a.pageIndex>r&&a.pageIndex--;for(let a=0;a<o.document.pages.length;a++)o.document.pages[a].index=a;this.emitLibraryChange(),n.resolve()},a=>{this.logger.error("StampPlugin","RemoveStampFromLibrary",`Failed to delete page for stamp ${t}`,a),n.fail(a)}),n}updateStamp(e,t,n){const o=new de,i=this.libraries.get(e);if(!i)return o.reject({code:Z.NotFound,message:`Stamp library not found: ${e}`}),o;if(i.readonly)return o.reject({code:Z.NotSupport,message:`Cannot update stamps in readonly library: ${e}`}),o;const r=i.stamps.find(a=>a.id===t);return r?(Object.assign(r,n),this.emitLibraryChange(),o.resolve(),o):(o.reject({code:Z.NotFound,message:`Stamp ${t} not found in library: ${e}`}),o)}updateLibrary(e,t){const n=new de,o=this.libraries.get(e);return o?o.readonly?(n.reject({code:Z.NotSupport,message:`Cannot update readonly library: ${e}`}),n):(t.name!==void 0&&(o.name=t.name),t.nameKey!==void 0&&(o.nameKey=t.nameKey),t.categories!==void 0&&(o.categories=t.categories),t.readonly!==void 0&&(o.readonly=t.readonly),this.emitLibraryChange(),n.resolve(),n):(n.reject({code:Z.NotFound,message:`Stamp library not found: ${e}`}),n)}loadLibraryFromManifest(e){return this.loadManifestUrl(e,!0)}async initializeManifests(){var e;const t=((e=this.i18n)==null?void 0:e.getLocale())??"en";for(const n of this.config.manifests){const o=n.url.includes("{locale}"),i=o?t:"",r=n.url.replace("{locale}",i||t),a={source:n,localeAware:o,currentLocale:o?t:"",libraryId:null};this.managedManifests.push(a);try{const s=await this.loadManifestUrl(r,!0).toPromise();a.libraryId=s}catch{if(o&&n.fallbackLocale&&n.fallbackLocale!==t){const s=n.url.replace("{locale}",n.fallbackLocale);try{const l=await this.loadManifestUrl(s,!0).toPromise();a.libraryId=l,a.currentLocale=n.fallbackLocale}catch{this.logger.warn("StampPlugin","InitManifests",`Failed to load manifest (including fallback): ${n.url}`)}}else this.logger.warn("StampPlugin","InitManifests",`Failed to load manifest: ${r}`)}}this.i18n&&(this.localeUnsubscribe=this.i18n.onLocaleChange(n=>{this.handleLocaleChange(n.currentLocale)}))}async handleLocaleChange(e){for(const t of this.managedManifests){if(!t.localeAware||t.currentLocale===e)continue;if(t.libraryId){try{await this.removeLibrary(t.libraryId).toPromise()}catch{}t.libraryId=null}const n=t.source.url.replace("{locale}",e);try{const o=await this.loadManifestUrl(n,!0).toPromise();t.libraryId=o,t.currentLocale=e}catch{const o=t.source.fallbackLocale??"en";if(o!==e){const i=t.source.url.replace("{locale}",o);try{const r=await this.loadManifestUrl(i,!0).toPromise();t.libraryId=r,t.currentLocale=o}catch{this.logger.warn("StampPlugin","LocaleChange",`Failed to load manifest for locale ${e} (including fallback): ${t.source.url}`)}}else this.logger.warn("StampPlugin","LocaleChange",`Failed to load manifest for locale ${e}: ${t.source.url}`)}}}loadManifestUrl(e,t){const n=new de;return fetch(e).then(o=>{if(!o.ok)throw new Error(`HTTP ${o.status}: ${o.statusText}`);return o.json()}).then(o=>{const i=this.resolveManifestPdfUrl(e,o.pdf),r=o.stamps.map(s=>{return{id:s.id??Ce(),pageIndex:s.pageIndex,name:(l=s.name,l?F5[l]??Ne.Custom:Ne.Custom),subject:s.subject,subjectKey:s.subjectKey,label:s.label,categories:s.categories};var l}),a={id:o.id,name:o.name,nameKey:o.nameKey,pdf:i,stamps:r,categories:o.categories,readonly:t};this.loadLibraryInternal(a).wait(s=>n.resolve(s),s=>n.fail(s))}).catch(o=>{this.logger.error("StampPlugin","LoadManifest",`Failed to fetch manifest: ${e}`,o),n.reject({code:Z.NotFound,message:`Failed to load stamp manifest: ${e}`})}),n}resolveManifestPdfUrl(e,t){return t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")?t:e.substring(0,e.lastIndexOf("/")+1)+t}generateLibraryId(){return Ce()}getLibraryDocumentId(e){return`stamp-doc-${this.instanceId}-${e}`}emitLibraryChange(){this.libraryChange$.emit(this.getLibraries())}async destroy(){this.currentGhostUrl&&(URL.revokeObjectURL(this.currentGhostUrl),this.currentGhostUrl=null),this.toolChangeUnsubscribe&&(this.toolChangeUnsubscribe(),this.toolChangeUnsubscribe=null),this.localeUnsubscribe&&(this.localeUnsubscribe(),this.localeUnsubscribe=null),this.activeStamp$.clear();const e=Array.from(this.libraries.values());for(const t of e)try{await this.engine.closeDocument(t.document).toPromise()}catch{}this.libraries.clear(),this.managedManifests.length=0,super.destroy()}};J1.id=Ai;let e0=J1;const Kd={libraryIds:[]},pi=()=>at(e0.id);function j5({libraryId:e,pageIndex:t,width:n,dpr:o,style:i,...r}){const{provides:a}=pi(),[s,l]=$(),c=Q(null);return H(()=>{if(!a)return;const d=a.renderStamp(e,t,n,o??window.devicePixelRatio);return d.wait(u=>{const m=URL.createObjectURL(u);c.current=m,l(m)},vt),()=>{c.current?(URL.revokeObjectURL(c.current),c.current=null):d.abort({code:Z.Cancelled,message:"canceled stamp render task"})}},[a,e,t,n,o]),s?C("img",{src:s,onLoad:()=>{c.current&&(URL.revokeObjectURL(c.current),c.current=null)},style:i,...r}):null}const B5=cn({manifest:O5,create:(e,t)=>new e0(Ai,e,t),reducer:(e=Kd,t)=>{switch(t.type){case Y1:return{...e,libraryIds:[...e.libraryIds,t.payload]};case Q1:return{...e,libraryIds:e.libraryIds.filter(n=>n!==t.payload)};default:return e}},initialState:Kd}).build(),t0=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Rr="-",Zd=[],H5=e=>{const t=W5(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return U5(i);const r=i.split(Rr),a=r[0]===""&&r.length>1?1:0;return n0(r,a,t)},getConflictingClassGroupIds:(i,r)=>{if(r){const a=o[i],s=n[i];return a?s?((l,c)=>{const d=new Array(l.length+c.length);for(let u=0;u<l.length;u++)d[u]=l[u];for(let u=0;u<c.length;u++)d[l.length+u]=c[u];return d})(s,a):a:s||Zd}return n[i]||Zd}}},n0=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const l=n0(e,t+1,i);if(l)return l}const r=n.validators;if(r===null)return;const a=t===0?e.join(Rr):e.slice(t).join(Rr),s=r.length;for(let l=0;l<s;l++){const c=r[l];if(c.validator(a))return c.classGroupId}},U5=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),o=t.slice(0,n);return o?"arbitrary.."+o:void 0})(),W5=e=>{const{theme:t,classGroups:n}=e;return G5(n,t)},G5=(e,t)=>{const n=t0();for(const o in e){const i=e[o];ul(i,n,o,t)}return n},ul=(e,t,n,o)=>{const i=e.length;for(let r=0;r<i;r++){const a=e[r];q5(a,t,n,o)}},q5=(e,t,n,o)=>{typeof e!="string"?typeof e!="function"?Z5(e,t,n,o):K5(e,t,n,o):V5(e,t,n)},V5=(e,t,n)=>{(e===""?t:o0(t,e)).classGroupId=n},K5=(e,t,n,o)=>{X5(e)?ul(e(o),t,n,o):(t.validators===null&&(t.validators=[]),t.validators.push(((i,r)=>({classGroupId:i,validator:r}))(n,e)))},Z5=(e,t,n,o)=>{const i=Object.entries(e),r=i.length;for(let a=0;a<r;a++){const[s,l]=i[a];ul(l,o0(t,s),n,o)}},o0=(e,t)=>{let n=e;const o=t.split(Rr),i=o.length;for(let r=0;r<i;r++){const a=o[r];let s=n.nextPart.get(a);s||(s=t0(),n.nextPart.set(a,s)),n=s}return n},X5=e=>
2119"isThemeGetter"in e&&e.isThemeGetter===!0,Y5=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),o=Object.create(null);const i=(r,a)=>{n[r]=a,t++,t>e&&(t=0,o=n,n=Object.create(null))};return{get(r){let a=n[r];return a!==void 0?a:(a=o[r])!==void 0?(i(r,a),a):void 0},set(r,a){r in n?n[r]=a:i(r,a)}}},Q5=[],Xd=(e,t,n,o,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:o,isExternal:i}),J5=e=>{const{prefix:t,experimentalParseClassName:n}=e;let o=i=>{const r=[];let a,s=0,l=0,c=0;const d=i.length;for(let p=0;p<d;p++){const f=i[p];if(s===0&&l===0){if(f===":"){r.push(i.slice(c,p)),c=p+1;continue}if(f==="/"){a=p;continue}}f==="["?s++:f==="]"?s--:f==="("?l++:f===")"&&l--}const u=r.length===0?i:i.slice(c);let m=u,g=!1;return u.endsWith("!")?(m=u.slice(0,-1),g=!0):u.startsWith("!")&&(m=u.slice(1),g=!0),Xd(r,g,m,a&&a>c?a-c:void 0)};if(t){const i=t+":",r=o;o=a=>a.startsWith(i)?r(a.slice(i.length)):Xd(Q5,!1,a,void 0,!0)}if(n){const i=o;o=r=>n({className:r,parseClassName:i})}return o},e7=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,o)=>{t.set(n,1e6+o)}),n=>{const o=[];let i=[];for(let r=0;r<n.length;r++){const a=n[r],s=a[0]==="[",l=t.has(a);s||l?(i.length>0&&(i.sort(),o.push(...i),i=[]),o.push(a)):i.push(a)}return i.length>0&&(i.sort(),o.push(...i)),o}},t7=/\s+/,i0=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=i0(e[o]))&&(n&&(n+=" "),n+=t);return n},n7=(e,...t)=>{let n,o,i,r;const a=s=>{const l=o(s);if(l)return l;const c=((d,u)=>{const{parseClassName:m,getClassGroupId:g,getConflictingClassGroupIds:p,sortModifiers:f}=u,v=[],y=d.trim().split(t7);let b="";for(let w=y.length-1;w>=0;w-=1){const x=y[w],{isExternal:k,modifiers:I,hasImportantModifier:S,baseClassName:A,maybePostfixModifierPosition:M}=m(x);if(k){b=x+(b.length>0?" "+b:b);continue}let P=!!M,T=g(P?A.substring(0,M):A);if(!T){if(!P){b=x+(b.length>0?" "+b:b);continue}if(T=g(A),!T){b=x+(b.length>0?" "+b:b);continue}P=!1}const D=I.length===0?"":I.length===1?I[0]:f(I).join(":"),F=S?D+"!":D,N=F+T;if(v.indexOf(N)>-1)continue;v.push(N);const W=p(T,P);for(let _=0;_<W.length;++_){const G=W[_];v.push(F+G)}b=x+(b.length>0?" "+b:b)}return b})(s,n);return i(s,c),c};return r=s=>{const l=t.reduce((c,d)=>d(c),e());return n=(c=>({cache:Y5(c.cacheSize),parseClassName:J5(c),sortModifiers:e7(c),...H5(c)}))(l),o=n.cache.get,i=n.cache.set,r=a,a(s)},(...s)=>r(((...l)=>{let c,d,u=0,m="";for(;u<l.length;)(c=l[u++])&&(d=i0(c))&&(m&&(m+=" "),m+=d);return m})(...s))},o7=[],wt=e=>{const t=n=>n[e]||o7;return t.isThemeGetter=!0,t},r0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,a0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,i7=/^\d+\/\d+$/,r7=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,a7=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,s7=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,l7=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,c7=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Lo=e=>i7.test(e),Re=e=>!!e&&!Number.isNaN(Number(e)),Wn=e=>!!e&&Number.isInteger(Number(e)),La=e=>e.endsWith("%")&&Re(e.slice(0,-1)),Mn=e=>r7.test(e),d7=()=>!0,u7=e=>a7.test(e)&&!s7.test(e),s0=()=>!1,h7=e=>
vendor: 9,074 bytes, line 2119
2119l7.test(e),m7=e=>c7.test(e),p7=e=>!re(e)&&!ae(e),g7=e=>Yo(e,d0,s0),re=e=>r0.test(e),so=e=>Yo(e,u0,u7),Oa=e=>Yo(e,w7,Re),Yd=e=>Yo(e,l0,s0),f7=e=>Yo(e,c0,m7),sr=e=>Yo(e,h0,h7),ae=e=>a0.test(e),ci=e=>Qo(e,u0),v7=e=>Qo(e,x7),Qd=e=>Qo(e,l0),y7=e=>Qo(e,d0),b7=e=>Qo(e,c0),lr=e=>Qo(e,h0,!0),Yo=(e,t,n)=>{const o=r0.exec(e);return!!o&&(o[1]?t(o[1]):n(o[2]))},Qo=(e,t,n=!1)=>{const o=a0.exec(e);return!!o&&(o[1]?t(o[1]):n)},l0=e=>e==="position"||e==="percentage",c0=e=>e==="image"||e==="url",d0=e=>e==="length"||e==="size"||e==="bg-size",u0=e=>e==="length",w7=e=>e==="number",x7=e=>e==="family-name",h0=e=>e==="shadow",Fi=n7(()=>{const e=wt("color"),t=wt("font"),n=wt("text"),o=wt("font-weight"),i=wt("tracking"),r=wt("leading"),a=wt("breakpoint"),s=wt("container"),l=wt("spacing"),c=wt("radius"),d=wt("shadow"),u=wt("inset-shadow"),m=wt("text-shadow"),g=wt("drop-shadow"),p=wt("blur"),f=wt("perspective"),v=wt("aspect"),y=wt("ease"),b=wt("animate"),w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ae,re],x=()=>[ae,re,l],k=()=>[Lo,"full","auto",...x()],I=()=>[Wn,"none","subgrid",ae,re],S=()=>["auto",{span:["full",Wn,ae,re]},Wn,ae,re],A=()=>[Wn,"auto",ae,re],M=()=>["auto","min","max","fr",ae,re],P=()=>["auto",...x()],T=()=>[Lo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],D=()=>[e,ae,re],F=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Qd,Yd,{position:[ae,re]}],N=()=>["auto","cover","contain",y7,g7,{size:[ae,re]}],W=()=>[La,ci,so],_=()=>["","none","full",c,ae,re],G=()=>["",Re,ci,so],q=()=>[Re,La,Qd,Yd],O=()=>["","none",p,ae,re],V=()=>["none",Re,ae,re],te=()=>["none",Re,ae,re],he=()=>[Re,ae,re],ne=()=>[Lo,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Mn],breakpoint:[Mn],color:[d7],container:[Mn],"drop-shadow":[Mn],ease:["in","out","in-out"],font:[p7],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Mn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Mn],shadow:[Mn],spacing:["px",Re],text:[Mn],"text-shadow":[Mn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Lo,re,ae,v]}],container:["container"],columns:[{columns:[Re,re,ae,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[Wn,"auto",ae,re]}],basis:[{basis:[Lo,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Re,Lo,"auto","initial","none",re]}],grow:[{grow:["",Re,ae,re]}],shrink:[{shrink:["",Re,ae,re]}],order:[{order:[Wn,"first","last","none",ae,re]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:S()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:T()}],w:[{w:[s,"screen",...T()]}],"min-w":[{"min-w":[s,"screen","none",...T()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...T()]}],h:[{h:["screen","lh",...T()]}],"min-h":[{"min-h":["screen","lh","none",...T()]}],"max-h":[{"max-h":["screen","lh",...T()]}],"font-size":[{text:["base",n,ci,so]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,ae,Oa]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",La,re]}],"font-family":[{font:[v7,re,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ae,re]}],"line-clamp":[{"line-clamp":[Re,"none",ae,Oa]}],leading:[{leading:[r,...x()]}],"list-image":[{"list-image":["none",ae,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ae,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Re,"from-font","auto",ae,so]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Re,"auto",ae,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae,re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Wn,ae,re],radial:["",ae,re],conic:[Wn,ae,re]},b7,f7]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:W()}
2119],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:_()}],"rounded-s":[{"rounded-s":_()}],"rounded-e":[{"rounded-e":_()}],"rounded-t":[{"rounded-t":_()}],"rounded-r":[{"rounded-r":_()}],"rounded-b":[{"rounded-b":_()}],"rounded-l":[{"rounded-l":_()}],"rounded-ss":[{"rounded-ss":_()}],"rounded-se":[{"rounded-se":_()}],"rounded-ee":[{"rounded-ee":_()}],"rounded-es":[{"rounded-es":_()}],"rounded-tl":[{"rounded-tl":_()}],"rounded-tr":[{"rounded-tr":_()}],"rounded-br":[{"rounded-br":_()}],"rounded-bl":[{"rounded-bl":_()}],"border-w":[{border:G()}],"border-w-x":[{"border-x":G()}],"border-w-y":[{"border-y":G()}],"border-w-s":[{"border-s":G()}],"border-w-e":[{"border-e":G()}],"border-w-t":[{"border-t":G()}],"border-w-r":[{"border-r":G()}],"border-w-b":[{"border-b":G()}],"border-w-l":[{"border-l":G()}],"divide-x":[{"divide-x":G()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":G()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}
vendor: 6,158 bytes, line 2119
2119],"divide-color":[{divide:D()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Re,ae,re]}],"outline-w":[{outline:["",Re,ci,so]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",d,lr,sr]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",u,lr,sr]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Re,so]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",m,lr,sr]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[Re,ae,re]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Re]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[ae,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Re]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ae,re]}],filter:[{filter:["","none",ae,re]}],blur:[{blur:O()}],brightness:[{brightness:[Re,ae,re]}],contrast:[{contrast:[Re,ae,re]}],"drop-shadow":[{"drop-shadow":["","none",g,lr,sr]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",Re,ae,re]}],"hue-rotate":[{"hue-rotate":[Re,ae,re]}],invert:[{invert:["",Re,ae,re]}],saturate:[{saturate:[Re,ae,re]}],sepia:[{sepia:["",Re,ae,re]}],"backdrop-filter":[{"backdrop-filter":["","none",ae,re]}],"backdrop-blur":[{"backdrop-blur":O()}],"backdrop-brightness":[{"backdrop-brightness":[Re,ae,re]}],"backdrop-contrast":[{"backdrop-contrast":[Re,ae,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Re,ae,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Re,ae,re]}],"backdrop-invert":[{"backdrop-invert":["",Re,ae,re]}],"backdrop-opacity":[{"backdrop-opacity":[Re,ae,re]}],"backdrop-saturate":[{"backdrop-saturate":[Re,ae,re]}],"backdrop-sepia":[{"backdrop-sepia":["",Re,ae,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ae,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Re,"initial",ae,re]}],ease:[{ease:["linear","initial",y,ae,re]}],delay:[{delay:[Re,ae,re]}],animate:[{animate:["none",b,ae,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,ae,re]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:V()}],"rotate-x":[{"rotate-x":V()}],"rotate-y":[{"rotate-y":V()}],"rotate-z":[{"rotate-z":V()}],scale:[{scale:te()}],"scale-x":[{"scale-x":te()}],"scale-y":[{"scale-y":te()}],"scale-z":[{"scale-z":te()}],"scale-3d":["scale-3d"],skew:[{skew:he()}],"skew-x":[{"skew-x":he()}],"skew-y":[{"skew-y":he()}],transform:[{transform:[ae,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}
vendor: 5,467 bytes, line 2119
2119],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae,re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae,re]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[Re,ci,so,Oa]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});var C7=["children","onClick","active","disabled","className","anchorRef"];function ms(e){var t=e.children,n=e.onClick,o=e.active,i=o!==void 0&&o,r=e.disabled,a=r!==void 0&&r,s=e.className,l=s===void 0?"":s,c=e.anchorRef,d=Hr(e,C7);return h("button",U({type:"button",ref:c,onClick:n,disabled:a,className:Fi("flex h-[32px] w-auto min-w-[32px] items-center justify-center rounded-md p-[5px] transition-colors hover:bg-interactive-hover hover:ring hover:ring-accent cursor-pointer rounded-none px-2 py-1 text-sm hover:bg-transparent border-b-2 hover:border-b-fg-muted hover:ring-transparent",i?"border-b-accent text-accent hover:border-b-accent":"border-b-transparent",a?"cursor-not-allowed opacity-50":"",l)},d),t)}var Pi=function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"
2119stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M9 6l6 6l-6 6"}))},hl=function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 6l-6 6l6 6"}))},m0=function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 9l6 6l6 -6"}))},p0=function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),h("path",{d:"M21 21l-6 -6"}))},g0=function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M18 6l-12 12"}),h("path",{d:"M6 6l12 12"}))},f0=function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor,a=r===void 0?"currentColor":r,s=e.secondaryColor,l=s===void 0?"currentColor":s;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 4h10"}),h("path",{d:"M12 4v8"}),h("defs",null,h("clipPath",{id:"stripeClip"},h("rect",{x:"2",y:"12",width:"20",height:"10",rx:"2"}))),h("rect",{x:"2",y:"12",width:"20",height:"10",rx:"2",fill:"none",stroke:a}),h("g",{"clip-path":"url(#stripeClip)",stroke:l},h("path",{d:"M-7 24l12 -12"}),h("path",{d:"M-3 24l12 -12"}),h("path",{d:"M1 24l12 -12"}),h("path",{d:"M5 24l12 -12"}),h("path",{d:"M9 24l12 -12"}),h("path",{d:"M13 24l12 -12"}),h("path",{d:"M17 24l12 -12"}),h("path",{d:"M21 24l12 -12"}),h("path",{d:"M25 24l12 -12"})))},v0=function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor,a=r===void 0?"currentColor":r,s=e.secondaryColor,l=s===void 0?"currentColor":s;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:a,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 20h-1a2 2 0 0 1 -2 -2v-1"}),h("path",{d:"M3 13v-3"}),h("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),h("path",{d:"M10 3h3"}),h("path",{d:"M17 3h1a2 2 0 0 1 2 2v1"}),h("defs",null,h("clipPath",{id:"redactClip"},h("rect",{x:"10",y:"10",width:"12",height:"12",rx:"2"}))),h("rect",{x:"10",y:"10",width:"12",height:"12",rx:"2",fill:"none"}),h("g",{"clip-path":"url(#redactClip)",stroke:l},h("path",{d:"M-2 24l14 -14"}),h("path",{d:"M2 24l14 -14"}),h("path",{d:"M6 24l14 -14"}),h("path",{d:"M10 24l15 -15"}),h("path",{d:"M14 24l15 -15"}),h("path",{d:"M18 24l15 -15"})))},k7={download:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),h("path",{d:"M7 11l5 5l5 -5"}),h("path",{d:"M12 4l0 12"}))},menu:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"
2119stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 8l16 0"}),h("path",{d:"M4 16l16 0"}))},fullscreen:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),h("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),h("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),h("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"}))},fullscreenExit:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 8v-2c0 -.551 .223 -1.05 .584 -1.412"}),h("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),h("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),h("path",{d:"M16 20h2c.545 0 1.04 -.218 1.4 -.572"}),h("path",{d:"M3 3l18 18"}))},save:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2"}),h("path",{d:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M14 4l0 4l-6 0l0 -4"}))},print:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M17 17h2a2 2 0 0 0 2 -2v-4a2 2 0 0 0 -2 -2h-14a2 2 0 0 0 -2 2v4a2 2 0 0 0 2 2h2"}),h("path",{d:"M17 9v-4a2 2 0 0 0 -2 -2h-6a2 2 0 0 0 -2 2v4"}),h("path",{d:"M7 13m0 2a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-6a2 2 0 0 1 -2 -2z"}))},settings:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z"}),h("path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"}))},viewSettings:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M12 10.5v1.5"}),h("path",{d:"M12 16v1.5"}),h("path",{d:"M15.031 12.25l-1.299 .75"}),h("path",{d:"M10.268 15l-1.3 .75"}),h("path",{d:"M15 15.803l-1.285 -.773"}),h("path",{d:"M10.285 12.97l-1.285 -.773"}),h("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),h("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"}))},rotateClockwise:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"
2119stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4.05 11a8 8 0 1 1 .5 4m-.5 5v-5h5"}))},rotateCounterClockwise:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M19.95 11a8 8 0 1 0 -.5 4m.5 5v-5h-5"}))},singlePage:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 3m0 1a1 1 0 0 1 1 -1h12a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-12a1 1 0 0 1 -1 -1z"}))},doublePage:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 3m0 1a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1zm9 -1v18"}))},zoomIn:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"}),h("path",{d:"M9 12h6"}),h("path",{d:"M12 9v6"}))},zoomOut:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),h("path",{d:"M9 12l6 0"}))},fitToWidth:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 12v-6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v6"}),h("path",{d:"M10 18h-7"}),h("path",{d:"M21 18h-7"}),h("path",{d:"M6 15l-3 3l3 3"}),h("path",{d:"M18 15l3 3l-3 3"}))},fitToPage:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 20h-6a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h6"}),h("path",{d:"M18 14v7"}),h("path",{d:"M18 3v7"}),h("path",{d:"M15 18l3 3l3 -3"}),h("path",{d:"M15 6l3 -3l3 3"}))},chevronRight:Pi,chevronLeft:hl,chevronDown:m0,search:p0,comment:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 11v.01"}),h("path",{d:"M8 11v.01"}),h("path",{d:"M16 11v.01"}),h("path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3z"}))},sidebar:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"
2119stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 18v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"}),h("path",{d:"M10 18v-12a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-6a2 2 0 0 1 -2 -2z"}))},dots:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),h("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),h("path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}))},vertical:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 7l4 -4l4 4"}),h("path",{d:"M8 17l4 4l4 -4"}),h("path",{d:"M12 3l0 18"}))},horizontal:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 8l-4 4l4 4"}),h("path",{d:"M17 8l4 4l-4 4"}),h("path",{d:"M3 12l18 0"}))},book:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),h("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),h("path",{d:"M3 6l0 13"}),h("path",{d:"M12 6l0 13"}),h("path",{d:"M21 6l0 13"}))},book2:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M19 4v16h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12z"}),h("path",{d:"M19 16h-12a2 2 0 0 0 -2 2"}),h("path",{d:"M9 8h6"}))},squares:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 10a2 2 0 0 1 2 -2h9a2 2 0 0 1 2 2v9a2 2 0 0 1 -2 2h-9a2 2 0 0 1 -2 -2z"}),h("path",{d:"M16 8v-3a2 2 0 0 0 -2 -2h-9a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h3"}))},listTree:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M9 6h11"}),h("path",{d:"M12 12h8"}),h("path",{d:"M15 18h5"}),h("path",{d:"M5 6v.01"}),h("path",{d:"M8 12v.01"}),h("path",{d:"M11 18v.01"}))},paperclip:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"
2119stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3l6.5 -6.5a3 3 0 0 0 -6 -6l-6.5 6.5a4.5 4.5 0 0 0 9 9l6.5 -6.5"}))},rubberStamp:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M21 17.85h-18c0 -4.05 1.421 -4.05 3.79 -4.05c5.21 0 1.21 -4.59 1.21 -6.8a4 4 0 1 1 8 0c0 2.21 -4 6.8 1.21 6.8c2.369 0 3.79 0 3.79 4.05"}),h("path",{d:"M5 21h14"}))},rubberStampPlus:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M21 17.85h-18c0 -4.05 1.421 -4.05 3.79 -4.05c5.21 0 1.21 -4.59 1.21 -6.8a4 4 0 0 1 4.9 -4.1"}),h("path",{d:"M16 10c0 1.2 -4 3.8 1.21 3.8c2.369 0 3.79 0 3.79 4.05"}),h("path",{d:"M5 21h14"}),h("path",{d:"M16 5h6"}),h("path",{d:"M19 2v6"}))},copy:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z"}),h("path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1"}))},underline:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor,a=r===void 0?"currentColor":r;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none","stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 20h16",stroke:a}),h("path",{d:"M8 16v-8a4 4 0 1 1 8 0v8",stroke:"currentColor"}),h("path",{d:"M8 10h8",stroke:"currentColor"}))},squiggly:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor,a=r===void 0?"currentColor":r;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none","stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 16v-8a4 4 0 1 1 8 0v8",stroke:"currentColor"}),h("path",{d:"M8 10h8",stroke:"currentColor"}),h("path",{d:"M4 20c1.5 -1.5 3.5 -1.5 5 0s3.5 1.5 5 0 3.5 -1.5 5 0",stroke:a}))},strikethrough:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor,a=r===void 0?"currentColor":r;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none","stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 16v-8a4 4 0 1 1 8 0v8",stroke:"currentColor"}),h("path",{d:"M4 10h16",stroke:a}))},highlight:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor,a=r===void 0?"currentColor":r;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none","stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:"2",y:"6",width:"20",height:"16",rx:"2",fill:a,stroke:"none"}),h("path",{d:"M8 16v-8a4 4 0 1 1 8 0v8",stroke:"currentColor"}),h("path",{d:"M8 10h8",stroke:"currentColor"}))},palette:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"
2119stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25"}),h("path",{d:"M8.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),h("path",{d:"M12.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),h("path",{d:"M16.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}))},x:g0,fileImport:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),h("path",{d:"M5 13v-8a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-5.5m-9.5 -2h7m-3 -3l3 3l-3 3"}))},hand:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),h("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),h("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),h("path",{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"}))},zoomInArea:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 13v4"}),h("path",{d:"M13 15h4"}),h("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),h("path",{d:"M22 22l-3 -3"}),h("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),h("path",{d:"M3 11v-1"}),h("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),h("path",{d:"M10 3h1"}),h("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"}))},screenshot:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 19a2 2 0 0 1 -2 -2"}),h("path",{d:"M5 13v-2"}),h("path",{d:"M5 7a2 2 0 0 1 2 -2"}),h("path",{d:"M11 5h2"}),h("path",{d:"M17 5a2 2 0 0 1 2 2"}),h("path",{d:"M19 11v2"}),h("path",{d:"M19 17v4"}),h("path",{d:"M21 19h-4"}),h("path",{d:"M13 19h-2"}))},arrowBackUp:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M9 14l-4 -4l4 -4"}),h("path",{d:"M5 10h11a4 4 0 1 1 0 8h-1"}))},arrowForwardUp:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 14l4 -4l-4 -4"}),h("path",{d:"M19 10h-11a4 4 0 1 0 0 8h1"}))},trash:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"
2119stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 7l16 0"}),h("path",{d:"M10 11l0 6"}),h("path",{d:"M14 11l0 6"}),h("path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"}),h("path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"}))},deviceFloppy:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2"}),h("path",{d:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M14 4l0 4l-6 0l0 -4"}))},pencilMarker:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor,a=r===void 0?"currentColor":r;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":i,class:e.className,role:"img","aria-label":e.title},h("path",{d:"m9.109 16.275 8.856-8.097c.812-.743.87-2.014.127-2.826s-2.014-.869-2.826-.127L6.41 13.322l-.127 2.826zM13.79 6.575l2.7 2.952",stroke:"currentColor"}),h("path",{stroke:a,d:"M19.375 20.125c.569.063-4.05-.562-6.412-.437s-4.759 1.229-6.857 1.625c-1.764.687-3.404-.938-1.981-2.5"}))},circle:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor,a=r===void 0?"currentColor":r,s=e.secondaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:s===void 0?"none":s,stroke:a,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}))},square:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor,a=r===void 0?"currentColor":r,s=e.secondaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:s===void 0?"none":s,stroke:a,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z"}))},line:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2.2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20 4l-16 16"}))},lineArrow:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2.2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20 4l-16 16"}),h("path",{d:"M16 3h5v5"}))},polygon:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor,a=r===void 0?"currentColor":r,s=e.secondaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:s===void 0?"none":s,stroke:a,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M13.163 2.168l8.021 5.828c.694 .504 .984 1.397 .719 2.212l-3.064 9.43a1.978 1.978 0 0 1 -1.881 1.367h-9.916a1.978 1.978 0 0 1 -1.881 -1.367l-3.064 -9.43a1.978 1.978 0 0 1 .719 -2.212l8.021 -5.828a1.978 1.978 0 0 1 2.326 0z"}))},zigzag:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"
2119stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{d:"M12 2.4L21.36 11.76L2.64 12.24L12 21.6"}))},text:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6.5 15.5m-3.5 0a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0 -7 0"}),h("path",{d:"M14 19v-10.5a3.5 3.5 0 0 1 7 0v10.5"}),h("path",{d:"M14 13h7"}),h("path",{d:"M10 12v7"}))},italic:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11 5l6 0"}),h("path",{d:"M7 19l6 0"}),h("path",{d:"M14 5l-4 14"}))},bold:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 5h6a3.5 3.5 0 0 1 0 7h-6z"}),h("path",{d:"M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7"}))},alignLeft:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 6l16 0"}),h("path",{d:"M4 12l10 0"}),h("path",{d:"M4 18l14 0"}))},alignCenter:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 6l16 0"}),h("path",{d:"M8 12l8 0"}),h("path",{d:"M6 18l12 0"}))},alignRight:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 6l16 0"}),h("path",{d:"M10 12l10 0"}),h("path",{d:"M6 18l14 0"}))},alignTop:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 19v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z"}),h("path",{d:"M11 13h2"}),h("path",{d:"M9 10h6"}),h("path",{d:"M10 7h4"}))},alignMiddle:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 19v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z"}),h("path",{d:"M11 15h2"}),h("path",{d:"M9 12h6"}),h("path",{d:"M10 9h4"}))},alignBottom:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"
2119stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 19v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z"}),h("path",{d:"M11 17h2"}),h("path",{d:"M9 14h6"}),h("path",{d:"M10 11h4"}))},photo:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 8h.01"}),h("path",{d:"M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z"}),h("path",{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5"}),h("path",{d:"M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3"}))},pointer:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7.904 17.563a1.2 1.2 0 0 0 2.228 .308l2.09 -3.093l4.907 4.907a1.067 1.067 0 0 0 1.509 0l1.047 -1.047a1.067 1.067 0 0 0 0 -1.509l-4.907 -4.907l3.113 -2.09a1.2 1.2 0 0 0 -.309 -2.228l-13.582 -3.904l3.904 13.563z"}))},redact:f0,redactArea:v0,redactCombined:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor,a=r===void 0?"currentColor":r,s=e.secondaryColor,l=s===void 0?"currentColor":s;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:a,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 20h-1a2 2 0 0 1 -2 -2v-1"}),h("path",{d:"M3 13v-3"}),h("path",{d:"M20 13v-3"}),h("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),h("path",{d:"M10 3h3"}),h("path",{d:"M17 3h1a2 2 0 0 1 2 2v1"}),h("path",{d:"M8 8h8"}),h("path",{d:"M12 8v7"}),h("defs",null,h("clipPath",{id:"redactCombinedClip"},h("rect",{x:"10",y:"18",width:"13",height:"6",rx:"2"}))),h("rect",{x:"10",y:"17",width:"13",height:"6",rx:"2",fill:"none"}),h("g",{"clip-path":"url(#redactCombinedClip)",stroke:l},h("path",{d:"M6 19l12 -12"}),h("path",{d:"M6 23l12 -12"}),h("path",{d:"M10 23l12 -12"}),h("path",{d:"M14 27l12 -12"}),h("path",{d:"M14 23l12 -12"})))},check:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12l5 5l10 -10"}))},file:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor,a=r===void 0?"currentColor":r,s=e.className,l=e.title;return h("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:a,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:s,"aria-hidden":!l,role:l?"img":"presentation"},l&&h("title",null,l),h("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),h("polyline",{points:"14 2 14 8 20 8"}))},plus:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor,a=r===void 0?"currentColor":r,s=e.className,l=e.title;return h("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:a,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:s,"aria-hidden":!l,role:l?"img":"presentation"},l&&h("title",null,l),h("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"}))},lock:function(e){var t=e.size,n=t===void 0?24:t,o=e.className;return h("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o===void 0?"":o,style:e.style},h("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),h("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"}))},unlock:function(e){var t=e.size,n=t===void 0?24:t,o=e.className;return h("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o===void 0?"":o,style:e.style},h("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),h("path",{d:"M7 11V7a5 5 0 0 1 9.9-1"}))},alertTriangle:function(e){var t=e.size,n=t===void 0?24:t,o=e.className;return h("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o===void 0?"":o,style:e.style},h("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),h("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),h("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"}))},eye:function(e){var t=e.size,n=t===void 0?24:t,o=e.className;return h("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o===void 0?"":o,style:e.style},h("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),h("circle",{cx:"12",cy:"12",r:"3"}))},"eye-off":function(e){var t=e.size,n=t===void 0?24:t,o=e.className;return h("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o===void 0?"":o,style:e.style},h("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),h("line",{x1:"1",y1:"1",x2:"23",y2:"23"}))},info:function(e){var t=e.size,n=t===void 0?24:t,o=e.className;return h("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o===void 0?"":o,style:e.style},h("circle",{cx:"12",cy:"12",r:"10"}),h("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),h("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"}))},link:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"
2119stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M9 15l6 -6"}),h("path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"}),h("path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"}))},linkOff:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M9 15l3 -3m2 -2l1 -1"}),h("path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.072 7.071l-.534 .464"}),h("path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"}),h("path",{d:"M3 3l18 18"}))},externalLink:function(e){return h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e.className},h("path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6"}),h("path",{d:"M11 13l9 -9"}),h("path",{d:"M15 4h5v5"}))},marqueeSelect:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M17 20h6"}),h("path",{d:"M20 17v6"}),h("path",{d:"M4 13v-2"}),h("path",{d:"M4 6v-1a1 1 0 0 1 1 -1h1"}),h("path",{d:"M6 20h-1a1 1 0 0 1 -1 -1v-1"}),h("path",{d:"M11 4h2"}),h("path",{d:"M11 20h2"}),h("path",{d:"M18 4h1a1 1 0 0 1 1 1v1"}),h("path",{d:"M20 11v2"}))},group:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 5a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M17 5a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M3 19a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M17 19a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 7v10"}),h("path",{d:"M19 7v10"}),h("path",{d:"M7 5h10"}),h("path",{d:"M7 19h10"}),h("path",{d:"M8 8H12.8V11.2H16V16H11.2V12.8H8V8Z"}))},ungroup:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:"4",y:"4",width:"7",height:"7",rx:"1"}),h("rect",{x:"13",y:"13",width:"7",height:"7",rx:"1"}))},redactionSidebar:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"}),h("path",{d:"M15 4v16"}),h("path",{d:"M7 8h5"}),h("path",{d:"M7 11h5"}),h("path",{d:"M7 14h4"}))},freeText:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 7v-2h12v2"}),h("path",{d:"M10 5v14"}),h("path",{d:"M12 19h-4"}),h("path",{d:"M15 13v-1h6v1"}),h("path",{d:"M18 12v7"}),h("path",{d:"M17 19h2"}))},insertText:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"
2119stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 7v-2h12v2"}),h("path",{d:"M9 5v14"}),h("path",{d:"M7 19h4"}),h("path",{d:"M18 15l2 2h-5"}),h("path",{d:"M18 19l2 -2"}))},replaceText:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 7v-2h12v2"}),h("path",{d:"M9 5v14"}),h("path",{d:"M7 19h4"}),h("g",{transform:"translate(-1, -3) rotate(180 19 18)"},h("path",{d:"M20 14l2 2h-3"}),h("path",{d:"M20 18l2 -2"}),h("path",{d:"M19 16a3 3 0 1 0 2 5.236"})))},message:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 9h8",stroke:"currentColor"}),h("path",{d:"M8 13h6",stroke:"currentColor"}),h("path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12"}))},inkHighlighter:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor,a=r===void 0?"currentColor":r;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":i,class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{stroke:"currentColor",d:"M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4"}),h("path",{stroke:"currentColor",d:"M12.5 5.5l4 4"}),h("path",{stroke:"currentColor",d:"M4.5 13.5l4 4"}),h("path",{stroke:a,fill:a,d:"M21 15v4h-8l4 -4l4 0"}))},formCheckbox:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14"}),h("path",{d:"M9 12l2 2l4 -4"}))},formRadio:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M9 12a2 2 0 1 0 6 0a2 2 0 1 0 -6 0",fill:"currentColor"}),h("path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}))},formSelect:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14"}),h("path",{d:"M9 11l3 3l3 -3"}))},formListbox:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14"}),h("path",{d:"M11 8h6"}),h("path",{d:"M11 12h6"}),h("path",{d:"M11 16h6"}),h("path",{d:"M7 8l0 .01"}),h("path",{d:"M7 12l0 .01"}),h("path",{d:"M7 16l0 .01"}))},formTextfield:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"
2119stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3a3 3 0 0 0 -3 3v12a3 3 0 0 0 3 3"}),h("path",{d:"M6 3a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3"}),h("path",{d:"M13 7h7a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-7"}),h("path",{d:"M5 7h-1a1 1 0 0 0 -1 1v8a1 1 0 0 0 1 1h1"}),h("path",{d:"M17 12h.01"}),h("path",{d:"M13 12h.01"}))},widgetEdit:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1"}),h("path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415"}),h("path",{d:"M16 5l3 3"}))},signature:function(e){var t=e.size,n=t===void 0?24:t,o=e.strokeWidth,i=o===void 0?2:o,r=e.primaryColor;return h("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r===void 0?"currentColor":r,"stroke-width":i,"stroke-linecap":"round","stroke-linejoin":"round",class:e.className,role:"img","aria-label":e.title},h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 17c3.333 -3.333 5 -6 5 -8c0 -3 -1 -3 -2 -3s-2.032 1.085 -2 3c.034 2.048 1.658 4.877 2.5 6c1.5 2 2.5 2.5 3.5 1l2 -3c.333 2.667 1.333 4 3 4c.53 0 2.639 -2 3 -2c.517 0 1.517 .667 3 2"}))}},ps=new Map,I7=/^[MmZzLlHhVvCcSsQqTtAa0-9\s,.\-eE]+$/;function S7(e){return I7.test(e.trim())}function y0(e,t){for(var n=(function(r){var a,s;return"path"in r?{viewBox:r.viewBox||"0 0 24 24",paths:[{d:r.path,stroke:(a=r.stroke)!==null&&a!==void 0?a:"primary",fill:(s=r.fill)!==null&&s!==void 0?s:"none",strokeWidth:r.strokeWidth}],strokeLinecap:r.strokeLinecap||"round",strokeLinejoin:r.strokeLinejoin||"round",strokeWidth:r.strokeWidth}:{viewBox:r.viewBox||"0 0 24 24",paths:r.paths,strokeLinecap:r.strokeLinecap||"round",strokeLinejoin:r.strokeLinejoin||"round",strokeWidth:r.strokeWidth}})(t),o=0;o<n.paths.length;o++){var i=n.paths[o];if(!i.d||!S7(i.d))throw new Error('Invalid path data for icon "'.concat(e,'" at path index ').concat(o,". ")+"Path must only contain valid SVG path commands.")}ps.set(e,n)}function Jd(e){for(var t=0,n=Object.entries(e);t<n.length;t++){var o=X(n[t],2);y0(o[0],o[1])}}function eu(e,t,n){return e&&e!=="none"?e==="primary"?t:e==="secondary"?n:e==="currentColor"?"currentColor":e:"none"}function Se(e){var t,n=e.icon,o=e.title,i=e.size,r=i===void 0?24:i,a=e.strokeWidth,s=a===void 0?2:a,l=e.primaryColor,c=l===void 0?"currentColor":l,d=e.secondaryColor,u=d===void 0?"currentColor":d,m=e.className,g=k7[n];if(g)return h(g,{size:r,strokeWidth:s,primaryColor:c,secondaryColor:u,className:m,title:o});if(t=n,ps.has(t)){var p=(function(f){return ps.get(f)})(n);return(function(f,v){var y,b=v.size,w=v.strokeWidth,x=v.primaryColor,k=v.secondaryColor,I=v.className,S=v.title,A=(y=f.strokeWidth)!==null&&y!==void 0?y:w;return h("svg",{width:b,height:b,viewBox:f.viewBox,"stroke-linecap":f.strokeLinecap,"stroke-linejoin":f.strokeLinejoin,class:I,role:"img","aria-label":S},f.paths.map(function(M,P){var T,D=eu(M.stroke,x,k),F=eu(M.fill,x,k),N=(T=M.strokeWidth)!==null&&T!==void 0?T:A;return h("path",{key:P,d:M.d,stroke:D,fill:F,"stroke-width":D!=="none"?N:void 0,opacity:M.opacity})}))})(p,{size:r,strokeWidth:s,primaryColor:c,secondaryColor:u,className:m,title:o})}return console.warn("Icon not found: ".concat(n)),null}var M7=["id","children","onClick","active","disabled","className","tooltip","elementRef"];function ht(e){var t=e.id,n=e.children,o=e.onClick,i=e.active,r=i!==void 0&&i,a=e.disabled,s=a!==void 0&&a,l=e.className,c=l===void 0?"":l,d=e.tooltip,u=e.elementRef,m=Hr(e,M7);return h("button",U({id:t,ref:u,onClick:o,className:"flex h-[32px] w-auto min-w-[32px] items-center justify-center rounded-md p-[5px] transition-colors ".concat(r?"bg-interactive-selected text-accent ring-accent border-none shadow ring":"hover:bg-interactive-hover hover:ring-accent hover:ring"," ").concat(s?"cursor-not-allowed opacity-50 hover:bg-transparent hover:ring-0":"cursor-pointer"," ").concat(c),title:d},m),n)}const Vo=Math.min,mo=Math.max,Er=Math.round,cr=Math.floor,yn=e=>({x:e,y:e}
2119),A7={left:"right",right:"left",bottom:"top",top:"bottom"},P7={start:"end",end:"start"};function gs(e,t,n){return mo(e,Vo(t,n))}function ji(e,t){return typeof e=="function"?e(t):e}function ko(e){return e.split("-")[0]}function Bi(e){return e.split("-")[1]}function b0(e){return e==="x"?"y":"x"}function ml(e){return e==="y"?"height":"width"}const D7=new Set(["top","bottom"]);function qn(e){return D7.has(ko(e))?"y":"x"}function pl(e){return b0(qn(e))}function fs(e){return e.replace(/start|end/g,t=>P7[t])}const tu=["left","right"],nu=["right","left"],T7=["top","bottom"],z7=["bottom","top"];function R7(e,t,n,o){const i=Bi(e);let r=(function(a,s,l){switch(a){case"top":case"bottom":return l?s?nu:tu:s?tu:nu;case"left":case"right":return s?T7:z7;default:return[]}})(ko(e),n==="start",o);return i&&(r=r.map(a=>a+"-"+i),t&&(r=r.concat(r.map(fs)))),r}function dr(e){return e.replace(/left|right|bottom|top/g,t=>A7[t])}function w0(e){return typeof e!="number"?(function(t){return{top:0,right:0,bottom:0,left:0,...t}})(e):{top:e,right:e,bottom:e,left:e}}function _r(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function ou(e,t,n){let{reference:o,floating:i}=e;const r=qn(t),a=pl(t),s=ml(a),l=ko(t),c=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[s]/2-i[s]/2;let g;switch(l){case"top":g={x:d,y:o.y-i.height};break;case"bottom":g={x:d,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:u};break;case"left":g={x:o.x-i.width,y:u};break;default:g={x:o.x,y:o.y}}switch(Bi(t)){case"start":g[a]-=m*(n&&c?-1:1);break;case"end":g[a]+=m*(n&&c?-1:1)}return g}async function E7(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:r,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:g=0}=ji(t,e),p=w0(g),f=s[m?u==="floating"?"reference":"floating":u],v=_r(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(f)))==null||n?f:f.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),y=u==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,b=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),w=await(r.isElement==null?void 0:r.isElement(b))&&await(r.getScale==null?void 0:r.getScale(b))||{x:1,y:1},x=_r(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(v.top-x.top+p.top)/w.y,bottom:(x.bottom-v.bottom+p.bottom)/w.y,left:(v.left-x.left+p.left)/w.x,right:(x.right-v.right+p.right)/w.x}}const _7=new Set(["left","top"]);function ca(){return typeof window<"u"}function Ko(e){return x0(e)?(e.nodeName||"").toLowerCase():"#document"}function Ut(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bn(e){var t;return(t=(x0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function x0(e){return!!ca()&&(e instanceof Node||e instanceof Ut(e).Node)}function an(e){return!!ca()&&(e instanceof Element||e instanceof Ut(e).Element)}function wn(e){return!!ca()&&(e instanceof HTMLElement||e instanceof Ut(e).HTMLElement)}function iu(e){return!(!ca()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof Ut(e).ShadowRoot)}const L7=new Set(["inline","contents"]);function Di(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=sn(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!L7.has(i)}const O7=new Set(["table","td","th"]);function N7(e){return O7.has(Ko(e))}const $7=[":popover-open",":modal"];function Lr(e){return $7.some(t=>{try{return e.matches(t)}catch{return!1}})}const F7=["transform","translate","scale","rotate","perspective"],j7=["transform","translate","scale","rotate","perspective","filter"],B7=["paint","layout","strict","content"];function vs(e){const t=gl(),n=an(e)?sn(e):e;return F7.some(o=>!!n[o]&&n[o]!=="none")||!!n.containerType&&n.containerType!=="normal"||!t&&!!n.backdropFilter&&n.backdropFilter!=="none"||!t&&!!n.filter&&n.filter!=="none"||j7.some(o=>(n.willChange||"").includes(o))||B7.some(o=>(n.contain||"").includes(o))}function gl(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const H7=new Set(["html","body","#document"]);function Ho(e){return H7.has(Ko(e))}function sn(e){return Ut(e).getComputedStyle(e)}function da(e){return an(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vn(e){if(Ko(e)==="html")return e;const t=e.assignedSlot||e.parentNode||iu(e)&&e.host||bn(e);return iu(t)?t.host:t}function C0(e){const t=Vn(e);return Ho(t)?e.ownerDocument?e.ownerDocument.body:e.body:wn(t)&&Di(t)?t:C0(t)}
2119function Ti(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=C0(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),a=Ut(i);if(r){const s=ys(a);return t.concat(a,a.visualViewport||[],Di(i)?i:[],s&&n?Ti(s):[])}return t.concat(i,Ti(i,[],n))}function ys(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function k0(e){const t=sn(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=wn(e),r=i?e.offsetWidth:n,a=i?e.offsetHeight:o,s=Er(n)!==r||Er(o)!==a;return s&&(n=r,o=a),{width:n,height:o,$:s}}function fl(e){return an(e)?e:e.contextElement}function Uo(e){const t=fl(e);if(!wn(t))return yn(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=k0(t);let a=(r?Er(n.width):n.width)/o,s=(r?Er(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const U7=yn(0);function I0(e){const t=Ut(e);return gl()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:U7}function Io(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=fl(e);let a=yn(1);t&&(o?an(o)&&(a=Uo(o)):a=Uo(e));const s=(function(m,g,p){return g===void 0&&(g=!1),!(!p||g&&p!==Ut(m))&&g})(r,n,o)?I0(r):yn(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,d=i.width/a.x,u=i.height/a.y;if(r){const m=Ut(r),g=o&&an(o)?Ut(o):o;let p=m,f=ys(p);for(;f&&o&&g!==p;){const v=Uo(f),y=f.getBoundingClientRect(),b=sn(f),w=y.left+(f.clientLeft+parseFloat(b.paddingLeft))*v.x,x=y.top+(f.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,u*=v.y,l+=w,c+=x,p=Ut(f),f=ys(p)}}return _r({width:d,height:u,x:l,y:c})}function Or(e,t){const n=da(e).scrollLeft;return t?t.left+n:Io(bn(e)).left+n}function S0(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Or(e,n),y:n.top+t.scrollTop}}const W7=new Set(["absolute","fixed"]);function ru(e,t,n){let o;if(t==="viewport")o=(function(i,r){const a=Ut(i),s=bn(i),l=a.visualViewport;let c=s.clientWidth,d=s.clientHeight,u=0,m=0;if(l){c=l.width,d=l.height;const p=gl();(!p||p&&r==="fixed")&&(u=l.offsetLeft,m=l.offsetTop)}const g=Or(s);if(g<=0){const p=s.ownerDocument,f=p.body,v=getComputedStyle(f),y=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,b=Math.abs(s.clientWidth-f.clientWidth-y);b<=25&&(c-=b)}else g<=25&&(c+=g);return{width:c,height:d,x:u,y:m}})(e,n);else if(t==="document")o=(function(i){const r=bn(i),a=da(i),s=i.ownerDocument.body,l=mo(r.scrollWidth,r.clientWidth,s.scrollWidth,s.clientWidth),c=mo(r.scrollHeight,r.clientHeight,s.scrollHeight,s.clientHeight);let d=-a.scrollLeft+Or(i);const u=-a.scrollTop;return sn(s).direction==="rtl"&&(d+=mo(r.clientWidth,s.clientWidth)-l),{width:l,height:c,x:d,y:u}})(bn(e));else if(an(t))o=(function(i,r){const a=Io(i,!0,r==="fixed"),s=a.top+i.clientTop,l=a.left+i.clientLeft,c=wn(i)?Uo(i):yn(1);return{width:i.clientWidth*c.x,height:i.clientHeight*c.y,x:l*c.x,y:s*c.y}})(t,n);else{const i=I0(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return _r(o)}function M0(e,t){const n=Vn(e);return!(n===t||!an(n)||Ho(n))&&(sn(n).position==="fixed"||M0(n,t))}function G7(e,t,n){const o=wn(t),i=bn(t),r=n==="fixed",a=Io(e,!0,r,t);let s={scrollLeft:0,scrollTop:0};const l=yn(0);function c(){l.x=Or(i)}if(o||!o&&!r)if((Ko(t)!=="body"||Di(i))&&(s=da(t)),o){const u=Io(t,!0,r,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else i&&c();r&&!o&&i&&c();const d=!i||o||r?yn(0):S0(i,s);return{x:a.left+s.scrollLeft-l.x-d.x,y:a.top+s.scrollTop-l.y-d.y,width:a.width,height:a.height}}function Na(e){return sn(e).position==="static"}function au(e,t){if(!wn(e)||sn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return bn(e)===n&&(n=n.ownerDocument.body),n}function su(e,t){const n=Ut(e);if(Lr(e))return n;if(!wn(e)){let i=Vn(e);for(;i&&!Ho(i);){if(an(i)&&!Na(i))return i;i=Vn(i)}return n}let o=au(e,t);for(;o&&N7(o)&&Na(o);)o=au(o,t);return o&&Ho(o)&&Na(o)&&!vs(o)?n:o||(function(i){let r=Vn(i);for(;wn(r)&&!Ho(r);){if(vs(r))return r;if(Lr(r))return null;r=Vn(r)}return null})(e)||n}const q7={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const r=i==="fixed",a=bn(o),s=!!t&&Lr(t.floating);if(o===a||s&&r)return n;let l={scrollLeft:0,scrollTop:0},c=yn(1);const d=yn(0),u=wn(o);if((u||!u&&!r)&&((Ko(o)!=="body"||Di(a))&&(l=da(o)),wn(o))){const g=Io(o);c=Uo(o),d.x=g.x+o.clientLeft,d.y=g.y+o.clientTop}const m=!a||u||r?yn(0):S0(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+m.x,y:n.y*c.y-l.scrollTop*c.y+d.y+m.y}},getDocumentElement:bn,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const r=[...n==="clippingAncestors"?Lr(t)?[]:(function(l,c){const d=c.get(l);if(d)return d;let u=Ti(l,[],!1).filter(f=>an(f)&&Ko(f)!=="body"),m=null;const g=sn(l).position==="fixed";let p=g?Vn(l):l;for(;an(p)&&!Ho(p);){const f=sn(p),v=vs(p);v||f.position!=="fixed"||(m=null),(g?!v&&!m:!v&&f.position==="static"&&m&&W7.has(m.position)||Di(p)&&!v&&M0(l,p))?u=u.filter(y=>y!==p):m=f,p=Vn(p)}return c.set(l,u),u})(t,this._c):[].concat(n),o],a=r[0],s=r.reduce((l,c)=>{const d=ru(t,c,i);return l.top=mo(d.top,l.top),l.right=Vo(d.right,l.right),l.bottom=Vo(d.bottom,l.bottom),l.left=mo(d.left,l.left),l},ru(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:su,getElementRects:async function(e){const t=this.getOffsetParent||su,n=this.getDimensions,o=await n(e.floating);return{reference:G7(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=k0(e);return{width:t,height:n}},getScale:Uo,isElement:an,isRTL:function(e){return sn(e).direction==="rtl"}};function lu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function V7(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=fl(e),d=i||r?[...c?Ti(c):[],...Ti(t)]:[];d.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),r&&v.addEventListener("resize",n)});const u=c&&s?(function(v,y){let b,w=null;const x=bn(v);function k(){var I;clearTimeout(b),(I=w)==null||I.disconnect(),w=null}return(function I(S,A){S===void 0&&(S=!1),A===void 0&&(A=1),k();const M=v.getBoundingClientRect(),{left:P,top:T,width:D,height:F}=M;if(S||y(),!D||!F)return;const N={rootMargin:-cr(T)+"px "+-cr(x.clientWidth-(P+D))+"px "+-cr(x.clientHeight-(T+F))+"px "+-cr(P)+"px",threshold:mo(0,Vo(1,A))||1};let W=!0;function _(G){const q=G[0].intersectionRatio;if(q!==A){if(!W)return I();q?I(!1,q):b=setTimeout(()=>{I(!1,1e-7)},1e3)}q!==1||lu(M,v.getBoundingClientRect())||I(),W=!1}try{w=new IntersectionObserver(_,{...N,root:x.ownerDocument})}catch{w=new IntersectionObserver(_,N)}w.observe(v)})(!0),k})(c,n):null;let m,g=-1,p=null;a&&(p=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let f=l?Io(e):null;return l&&(function v(){const y=Io(e);f&&!lu(f,y)&&n(),f=y,m=requestAnimationFrame(v)})(),n(),()=>{var v;d.forEach(y=>{i&&y.removeEventListener("scroll",n),r&&y.removeEventListener("resize",n)}),u?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const K7=function(e){return{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:r,placement:a,middlewareData:s}=t,l=await(async function(c,d){const{placement:u,platform:m,elements:g}=c,p=await(m.isRTL==null?void 0:m.isRTL(g.floating)),f=ko(u),v=Bi(u),y=qn(u)==="y",b=_7.has(f)?-1:1,w=p&&y?-1:1,x=ji(d,c
2119);let{mainAxis:k,crossAxis:I,alignmentAxis:S}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return v&&typeof S=="number"&&(I=v==="end"?-1*S:S),y?{x:I*w,y:k*b}:{x:k*b,y:I*w}})(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:a}}}}},Z7=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i,platform:r}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:y=>{let{x:b,y:w}=y;return{x:b,y:w}}},...c}=ji(e,t),d={x:n,y:o},u=await r.detectOverflow(t,c),m=qn(ko(i)),g=b0(m);let p=d[g],f=d[m];if(a){const y=g==="y"?"bottom":"right";p=gs(p+u[g==="y"?"top":"left"],p,p-u[y])}if(s){const y=m==="y"?"bottom":"right";f=gs(f+u[m==="y"?"top":"left"],f,f-u[y])}const v=l.fn({...t,[g]:p,[m]:f});return{...v,data:{x:v.x-n,y:v.y-o,enabled:{[g]:a,[m]:s}}}}}},X7=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:r,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:f=!0,...v}=ji(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const y=ko(i),b=qn(s),w=ko(s)===s,x=await(l.isRTL==null?void 0:l.isRTL(c.floating)),k=m||(w||!f?[dr(s)]:(function(N){const W=dr(N);return[fs(N),W,fs(W)]})(s)),I=p!=="none";!m&&I&&k.push(...R7(s,f,p,x));const S=[s,...k],A=await l.detectOverflow(t,v),M=[];let P=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&M.push(A[y]),u){const N=(function(W,_,G){G===void 0&&(G=!1);const q=Bi(W),O=pl(W),V=ml(O);let te=O==="x"?q===(G?"end":"start")?"right":"left":q==="start"?"bottom":"top";return _.reference[V]>_.floating[V]&&(te=dr(te)),[te,dr(te)]})(i,a,x);M.push(A[N[0]],A[N[1]])}if(P=[...P,{placement:i,overflows:M}],!M.every(N=>N<=0)){var T,D;const N=(((T=r.flip)==null?void 0:T.index)||0)+1,W=S[N];if(W&&(!(u==="alignment"&&b!==qn(W))||P.every(G=>qn(G.placement)!==b||G.overflows[0]>0)))return{data:{index:N,overflows:P},reset:{placement:W}};let _=(D=P.filter(G=>G.overflows[0]<=0).sort((G,q)=>G.overflows[1]-q.overflows[1])[0])==null?void 0:D.placement;if(!_)switch(g){case"bestFit":{var F;const G=(F=P.filter(q=>{if(I){const O=qn(q.placement);return O===b||O==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(O=>O>0).reduce((O,V)=>O+V,0)]).sort((q,O)=>q[1]-O[1])[0])==null?void 0:F[0];G&&(_=G);break}case"initialPlacement":_=s}if(i!==_)return{reset:{placement:_}}}return{}}}},Y7=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:r,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=ji(e,t)||{};if(c==null)return{};const u=w0(d),m={x:n,y:o},g=pl(i),p=ml(g),f=await a.getDimensions(c),v=g==="y",y=v?"top":"left",b=v?"bottom":"right",w=v?"clientHeight":"clientWidth",x=r.reference[p]+r.reference[g]-m[g]-r.floating[p],k=m[g]-r.reference[g],I=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let S=I?I[w]:0;S&&await(a.isElement==null?void 0:a.isElement(I))||(S=s.floating[w]||r.floating[p]);const A=x/2-k/2,M=S/2-f[p]/2-1,P=Vo(u[y],M),T=Vo(u[b],M),D=P,F=S-f[p]-T,N=S/2-f[p]/2+A,W=gs(D,N,F),_=!l.arrow&&Bi(i)!=null&&N!==W&&r.reference[p]/2-(N<D?P:T)-f[p]/2<0,G=_?N<D?N-D:N-F:0;return{[g]:m[g]+G,data:{[g]:W,centerOffset:N-W-G,..._&&{alignmentOffset:G}},reset:_}}}),Q7=(e,t,n)=>{const o=new Map,i={platform:q7,...n},r={...i.platform,_c:o};return(async(a,s,l)=>{const{placement:c="bottom",strategy:d="absolute",middleware:u=[],platform:m}=l,g=u.filter(Boolean),p=await(m.isRTL==null?void 0:m.isRTL(s));let f=await m.getElementRects({reference:a,floating:s,strategy:d}),{x:v,y}=ou(f,c,p),b=c,w={},x=0;for(let I=0;I<g.length;I++){var k;const{name:S,fn:A}=g[I],{x:M,y:P,data:T,reset:D}=await A({x:v,y,initialPlacement:c,placement:b,strategy:d,middlewareData:w,rects:f,platform:{...m,detectOverflow:(k=m.detectOverflow)!=null?k:E7},elements:{reference:a,floating:s}});v=M??v,y=P??y,w={...w,[S]:{...w[S],...T}},D&&x<=50&&(x++,typeof D=="object"&&(D.placement&&(b=D.placement),D.rects&&(f=D.rects===!0?await m.getElementRects({reference:a,floating:s,strategy:d}):D.rects),{x:v,y}=ou(f,b,p)),I=-1)}return{x:v,y,placement:b,strategy:d,middlewareData:w}})(e,t,{...i,platform:r})};var J7=(function(){function e(){return Ms(this,e),ju(this,e,arguments)}return Bu(e,fn),As(e,[{key:"render",value:function(){return this.props.children}}])})();function e6(e){var t=e.children,n=e.content,o=e.position,i=o===void 0?"top":o,r=e.className,a=r===void 0?"":r,s=e.delay,l=s===void 0?200:s,c=e.style,d=c===void 0?"dark":c,u=e.trigger,m=u===void 0?"hover":u,g=Q(null),p=Q(null),f=Q(null),v=X($(!1),2),y=v[0],b=v[1],w=Q(null);return H(function(){var x;if((x=g.current)!==null&&x!==void 0&&x.base&&p.current)return V7(g.current.base,p.current,function(){Q7(g.current.base,p.current,{placement:i,middleware:[K7(8),X7(),Z7({padding:8}),Y7({element:f.current,padding:6}
2119)]}).then(function(k){var I,S=k.x,A=k.y,M=k.placement,P=k.middlewareData;Object.assign(p.current.style,{left:"".concat(S,"px"),top:"".concat(A,"px")});var T=(I=P.arrow)!==null&&I!==void 0?I:{},D=T.x,F=T.y,N={top:"bottom",bottom:"top",left:"right",right:"left"}[M.split("-")[0]];Object.assign(f.current.style,oe({left:D!=null?"".concat(D,"px"):"",top:F!=null?"".concat(F,"px"):"",right:"",bottom:""},N,"-4px"))})})},[i,y]),H(function(){var x,k=(x=g.current)===null||x===void 0?void 0:x.base,I=p.current;if(k&&I){var S=function(){w.current&&clearTimeout(w.current)},A=function(){S(),w.current=setTimeout(function(){return b(!0)},l)},M=function(){S(),b(!1)},P=function(){return b(function(T){return!T})};return m==="hover"?(k.addEventListener("mouseenter",A),k.addEventListener("mouseleave",M),I.addEventListener("mouseenter",A),I.addEventListener("mouseleave",M),k.addEventListener("pointerdown",M)):m==="click"&&k.addEventListener("click",P),m==="none"&&(w.current&&clearTimeout(w.current),b(!1)),function(){S(),m==="hover"?(k.removeEventListener("mouseenter",A),k.removeEventListener("mouseleave",M),I.removeEventListener("mouseenter",A),I.removeEventListener("mouseleave",M),k.removeEventListener("pointerdown",M)):m==="click"&&k.removeEventListener("click",P)}}},[m,l]),h(fe,null,h("div",{ref:p,role:"tooltip",className:"z-100 pointer-events-none absolute select-none whitespace-nowrap rounded-lg px-3 py-2 text-sm shadow-md transition-opacity duration-150 ".concat(d==="dark"?"bg-tooltip-bg text-tooltip-fg":"border-border-subtle bg-bg-elevated text-fg-primary border"," ").concat(y?"opacity-100":"opacity-0"," ").concat(a," "),style:{visibility:y?"visible":"hidden"}},n,h("div",{ref:f,className:"absolute h-2 w-2 rotate-45 bg-inherit ".concat(d==="light"?"border-border-subtle border":""," ")})),h(J7,{ref:g},t))}function po(e){var t=e.commandId,n=e.documentId,o=e.variant,i=o===void 0?"icon":o,r=e.itemId,a=e.className,s=nn(t,n),l=km(n,r||t);if(!s||!s.visible)return null;var c=s.iconProps||{};return h(e6,{content:s.label,position:"bottom",delay:500,trigger:s.active||s.disabled?"none":"hover"},h(ht,{elementRef:l,onClick:function(){s.disabled||s.execute()},active:s.active,disabled:s.disabled,className:a||"p-1","aria-label":s.label},i==="text"?h("span",{className:"text-sm"},s.label):i==="icon-text"?h("span",{className:"flex items-center whitespace-nowrap"},s.icon&&h(Se,{icon:s.icon,className:"mr-1.5 h-5 w-5 flex-shrink-0",primaryColor:c.primaryColor,secondaryColor:c.secondaryColor}),h("span",null,s.label)):i==="tab"?h("span",{className:"px-3 py-1"},s.label):s.icon?h(Se,{icon:s.icon,className:Fi("h-5 w-5",c.className),primaryColor:c.primaryColor,secondaryColor:c.secondaryColor}):h("span",null,s.label)))}function t6(e){var t=e.schema,n=e.documentId,o=e.isOpen,i=e.className,r=i===void 0?"":i;if(!o)return null;var a=t.position.slot==="secondary",s=(function(l){switch(l){case"top":return"border-b border-border-default bg-bg-surface px-4 py-2";case"bottom":return"border-t border-border-default bg-bg-surface px-4 py-2";case"left":return"border-r border-border-default bg-bg-surface px-2 py-3 flex-col";case"right":return"border-l border-border-default bg-bg-surface px-2 py-3 flex-col"}})(t.position.placement);return h("div",U({className:Fi("flex items-center gap-2",s,a?"bg-bg-surface-alt":"",r)},yt(t)),t.items.map(function(l){return h(A0,{key:l.id,item:l,documentId:n})}))}function A0(e){var t=e.item,n=e.documentId;switch(t.type){case"command-button":return h(n6,{item:t,documentId:n});case"tab-group":return h(o6,{item:t,documentId:n});case"divider":return h(r6,{item:t});case"spacer":return h(a6,{item:t});case"group":return h(s6,{item:t,documentId:n});case"custom":return h(l6,{item:t,documentId:n});default:return console.warn("Unknown toolbar item type:",t),null}}function n6(e){var t=e.item,n=e.documentId;return h("div",U({},yt(t)),h(po,{commandId:t.commandId,documentId:n,itemId:t.id,variant:t.variant}))}function o6(e){var t=e.item,n=e.documentId;return h("div",U(U({className:"flex items-center gap-2"},yt(t)),{},{role:"tablist"}),t.tabs.map(function(o){return h(i6,{key:o.id,tab:o,documentId:n})}))}function i6(e){var t=e.tab,n=e.documentId,o=nn(t.commandId,n),i=km(n,t.id);return!o||!o.visible?null:h("div",U({},yt(t)),h(ms,{anchorRef:i,active:o.active,onClick:function(){o.disabled||o.execute()},disabled:o.disabled},t.variant==="text"&&o.label,t.variant==="icon"&&o.icon&&h(cu,{icon:o.icon,iconProps:o.iconProps}),t.variant==="icon-text"&&h(fe,null,o.icon&&h(cu,{icon:o.icon,iconProps:o.iconProps}),o.label)))}function cu(e){var t=e.icon,n=e.iconProps;return h(Se,{icon:t,className:"h-5 w-5",primaryColor:n?.primaryColor,secondaryColor:n?.secondaryColor})}function r6(e){var t=e.item;return h("div",U({},yt(t)),h("div",{className:t.orientation==="vertical"?"bg-border-default h-6 w-px":"bg-border-default h-px w-6","aria-hidden":"true"}))}function a6(e){var t=e.item;return h("div",U(U({className:t.flex?"flex-1":"w-4"},yt(t)),{},{"aria-hidden":"true"}))}function s6(e){var t=e.item,n=e.documentId,o=t.gap?"gap-".concat(t.gap):"gap-2",i=(function(r){switch(r){case"start":default:return"justify-start";case"center":return"justify-center";case"end":return"justify-end"}})(t.alignment);return h("div",U({className:Fi("flex items-center",o,i)},yt(t)),t.items.map(function(r){return h(A0,{key:r.id,item:r,documentId:n})}))}function l6(e){var t=e.item,n=e.documentId,o=ea().renderCustomComponent;return h("div",U({},yt(t)),o(t.componentId,n,t.props))}function c6(e){var t=e.schema,n=e.documentId,o=e.isOpen,i=e.onClose,r=e.sidebarProps,a=wm().getContainer,s=$(function(){var b=a();return!!b&&b.clientWidth<768}),l=X(s,2),c=l[0],d=l[1];H(function(){var b=a();if(b){var w=new ResizeObserver(function(){var x=b.clientWidth;d(x<768)});return w.observe(b),function(){return w.disconnect()}}},[a]);var u=t.position,m=t.content,g=t.width,p=ea().renderCustomComponent,f=a();if(c&&f)return aa(h(d6,{schema:t,documentId:n,isOpen:o,onClose:i,renderCustomComponent:p,content:m,rootElement:f,sidebarProps:r}),f);if(!o)return null;var v=(function(b){switch(b){case"left":return"border-r";case"right":return"border-l";case"top":return"border-b";case"bottom":return"border-t"}})(u.placement),y=g?{width:g}:void 0;return h("div",{className:"".concat(v," border-border-default bg-bg-surface flex flex-col shadow-lg"),style:y,"data-sidebar-id":t.id},h("div",{className:"min-h-0 flex-1"},m.type==="tabs"&&h(P0,{content:m,documentId:n,renderCustomComponent:p}),m.type==="component"&&h(fe,null,p(m.componentId,n,r??{}))))}function d6(e){var t=e.schema,n=e.documentId,o=e.isOpen,i=e.onClose,r=e.renderCustomComponent,a=e.content,s=e.rootElement,l=e.sidebarProps,c=X($("closed"),2),d=c[0],u=c[1],m=X($(!1),2),g=m[0],p=m[1],f=X($(0),2),v=f[0],y=f[1],b=X($(!1),2),w=b[0],x=b[1],k=Q(null),I=Q({y:0,height:0,time:0,state:"half"}),S=Q({y:0,time:0});H(function(){if(!o){u("closed");var O=setTimeout(function(){x(!1)},300);return function(){return clearTimeout(O)}}x(!0),requestAnimationFrame(function(){requestAnimationFrame(function(){u("half")})})},[o]);var A=function(O){switch(O){case"closed":return 0;case"half":return 50;case"full":return 100}},M=Y(function(O){if(k.current){var V,te=s.clientHeight,he=k.current.offsetHeight/te*100;V=he>=75?"full":he<=25?"closed":"half",I.current={y:O,height:he,time:Date.now(),state:V},S.current={y:O,time:Date.now()},y(0),V!==d&&u(V),p(!0)}},[s,d]),P=Y(function(O){if(g){var V=s.clientHeight,te=(I.current.y-O)/V*100,he=Math.max(0,Math.min(100,I.current.height+te));S.current={y:O,time:Date.now()};var ne=A(I.current.state);y(he-ne)}},[g,s]),T=Y(function(){if(g){if(Math.abs(I.current.y-S.current.y)<5)return p(!1),void y(0);var O=A(I.current.state)+v,V=Date.now()-S.current.time,te=S.current.y-I.current.y,he=(function(ne,K){return Math.abs(K)>.5?K>0?ne>50?"half":"closed":ne<50?"half":"full":ne>=75?"full":ne<=25?"closed":"half"})(O,V>0?te/V:0);he==="closed"?(u("closed"),p(!1),y(0),i()):(p(!1),y(0),u(he))}},[g,v,i]),D=Y(function(O){M(O.touches[0].clientY)},[M]),F=Y(function(O){g&&(O.cancelable&&O.preventDefault(),P(O.touches[0].clientY))},[g,P]),N=Y(function(){T()},[T]),W=Y(function(O){O.preventDefault(),M(O.clientY)},[M]);if(H(function(){if(g){var O=function(te){P(te.clientY)},V=function(){T()};return document.addEventListener("mousemove",O),document.addEventListener("mouseup",V),function(){document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",V)}}},[g,P,T]),!w)return null;var _=A(g?I.current.state:d),G=g?Math.max(0,Math.min(100,_+v)):_,q=.3*Math.min(G/50,1);return h(fe,null,h("div",{className:"bg-bg-overlay absolute inset-0 z-40 transition-opacity duration-300 ".concat(G===0?"pointer-events-none":""),style:{opacity:q},onClick:i}),h("div",{ref:k,className:"bg-bg-surface absolute inset-x-0 bottom-0 z-50 flex flex-col rounded-t-2xl shadow-2xl ".concat(g?"":"transition-[height] duration-300 ease-out"),style:{height:"".concat(G,"%")},"data-sidebar-id":t.id},h("div",{className:"flex flex-shrink-0 cursor-grab touch-none items-center justify-center py-3 active:cursor-grabbing",onTouchStart:D,onTouchMove:F,onTouchEnd:N,onMouseDown:W},h("div",{className:"bg-border-default h-1.5 w-12 rounded-full"})),h("div",{className:"min-h-0 flex-1 overflow-hidden"},a.type==="tabs"&&h(P0,{content:a,documentId:n,renderCustomComponent:r}),a.type==="component"&&h(fe,null,r(a.componentId,n,l??{})))))}function P0(e){var t,n=e.content,o=e.documentId,i=e.renderCustomComponent,r=X($(((t=n.tabs[0])===null||t===void 0?void 0:t.id)||""),2),a=r[0],s=r[1];return h("div",{className:"flex h-full flex-1 flex-col"},h("div",{role:"tablist",className:"bg-bg-surface mx-4 my-4 flex flex-shrink-0 overflow-hidden"},n.tabs.map(function(l,c,d){var u=a===l.id,m=c===0,g=c===d.length-1;return h("button",{key:l.id,role:"tab","aria-selected":u,tabIndex:u?0:-1,onClick:function(){return s(l.id)},className:"relative flex h-7 flex-1 cursor-pointer items-center justify-center border outline-none transition-colors ".concat(m?"rounded-l-md":""," ").concat(g?"rounded-r-md":""," ").concat(g?"":"border-r-0"," ").concat(u?"border-accent bg-accent text-fg-on-accent":"border-border-default text-fg-secondary hover:bg-interactive-hover")},l.icon&&h(Se,{icon:l.icon,className:"h-5 w-5"}))})),h("div",{className:"min-h-0 flex-1 overflow-auto"},n.tabs.filter(function(l){return l.id===a}).map(function(l){return h(fe,{key:l.id},i(l.componentId,o,{}))})))}function u6(e){var t=e.schema,n=e.documentId,o=e.anchorEl,i=e.onClose,r=wm().getContainer,a=(function(f){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:768,y=X($(function(){var x=f();return!!x&&x.clientWidth<v}),2),b=y[0],w=y[1];return H(function(){var x=f();if(x){var k=new ResizeObserver(function(){w(x.clientWidth<v)});return k.observe(x),function(){return k.disconnect()}}},[f,v]),b})(r,768),s=r(),l=(()=>{const{provides:f}=Ao();return f?.getSchema()??null})(),c=X($([{menuId:t.id,schema:t,title:void 0}]),2),d=c[0],u=c[1];H(function(){u([{menuId:t.id,schema:t,title:void 0}])},[t]);var m=d[d.length-1],g=Y(function(f,v){if(l){var y=l.menus[f];y?u(function(b){return[].concat(zi(b),[{menuId:f,schema:y,title:v}])}):console.warn("Submenu schema not found: ".concat(f))}},[l]),p=Y(function(){d.length>1&&u(function(f){return f.slice(0,-1)})},[d.length]);
vendor: 4,297 bytes, line 2119
2119return m?a&&s?aa(h(h6,{currentMenu:m,menuStack:d,documentId:n,onClose:i,onNavigateBack:p,onNavigateToSubmenu:g,container:s}),s):h(m6,{currentMenu:m,documentId:n,anchorEl:o,onClose:i,onNavigateToSubmenu:g}):null}function h6(e){var t=e.currentMenu,n=e.menuStack,o=e.documentId,i=e.onClose,r=e.onNavigateBack,a=e.onNavigateToSubmenu,s=e.container,l=X($(!1),2),c=l[0],d=l[1],u=X($(!1),2),m=u[0],g=u[1],p=X($(0),2),f=p[0],v=p[1],y=Q(null),b=Q(null),w=Q({isDragging:!1,startY:0,currentY:0,startTime:0,sheetHeight:0});H(function(){d(!0),requestAnimationFrame(function(){requestAnimationFrame(function(){g(!0)})})},[]);var x=X($(null),2),k=x[0],I=x[1];H(function(){if(b.current){var _=(n.length>1?60:0)+b.current.scrollHeight+24,G=.8*s.clientHeight;I(Math.min(_,G))}},[t,n.length,s]);var S=Y(function(){g(!1),setTimeout(function(){d(!1),i()},300)},[i]),A=Y(function(_){y.current&&(w.current={isDragging:!0,startY:_,currentY:_,startTime:Date.now(),sheetHeight:y.current.offsetHeight})},[]),M=Y(function(_){if(w.current.isDragging){var G=_-w.current.startY,q=Math.max(0,G);w.current.currentY=_,v(q)}},[]),P=Y(function(){if(w.current.isDragging){var _=w.current,G=_.startY,q=_.currentY,O=_.startTime,V=_.sheetHeight,te=Math.abs(G-q);if(w.current.isDragging=!1,te<5)v(0);else{var he=q-G,ne=he/V*100,K=Date.now()-O;ne>30||(K>0?he/K:0)>.5?S():v(0)}}},[S]),T=Y(function(_){A(_.touches[0].clientY)},[A]),D=Y(function(_){w.current.isDragging&&_.cancelable&&_.preventDefault(),M(_.touches[0].clientY)},[M]),F=Y(function(){P()},[P]),N=Y(function(_){_.preventDefault(),A(_.clientY)},[A]);if(H(function(){if(w.current.isDragging){var _=function(q){return M(q.clientY)},G=function(){return P()};return document.addEventListener("mousemove",_),document.addEventListener("mouseup",G),function(){document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",G)}}},[M,P]),H(function(){var _=function(G){G.key==="Escape"&&S()};return document.addEventListener("keydown",_),function(){return document.removeEventListener("keydown",_)}},[S]),!c)return null;var W=m?f:k||400;return h(fe,null,h("div",{className:"bg-bg-overlay absolute inset-0 z-40 transition-opacity duration-300 ".concat(m?"opacity-100":"opacity-0"),onClick:S}),h("div",U({ref:y,className:"bg-bg-surface absolute inset-x-0 bottom-0 z-50 flex flex-col rounded-t-2xl shadow-2xl ".concat(w.current.isDragging?"":"transition-transform duration-300 ease-out"),style:{maxHeight:"80%",transform:"translateY(".concat(W,"px)")}},yt(t.schema)),h("div",{className:"flex flex-shrink-0 cursor-grab touch-none items-center justify-center py-3 active:cursor-grabbing",onTouchStart:T,onTouchMove:D,onTouchEnd:F,onMouseDown:N},h("div",{className:"bg-border-default h-1.5 w-12 rounded-full"})),n.length>1&&h("div",{className:"border-border-subtle flex items-center gap-3 border-b px-4 pb-3"},h("button",{onClick:r,className:"hover:bg-interactive-hover rounded-full p-1"},h(hl,{className:"h-5 w-5"})),h("h3",{className:"text-fg-primary font-semibold"},t.title||"Menu")),h("div",{ref:b,className:"flex-1 overflow-y-auto py-2"},t.schema.items.map(function(_){return h(vl,{key:_.id,item:_,documentId:o,onClose:S,isMobile:!0,onNavigateToSubmenu:a})}))))}function m6(e){var t=e.currentMenu,n=e.documentId,o=e.anchorEl,i=e.onClose,r=e.onNavigateToSubmenu,a=Q(null),s=X($(null),2),l=s[0],c=s[1];H(function(){if(o){var u=function(){var m,g=o.getBoundingClientRect(),p=((m=a.current)===null||m===void 0?void 0:m.offsetWidth)||200,f=g.bottom+4,v=g.left;v+p>window.innerWidth&&(v=window.innerWidth-p-8),v<8&&(v=8),c({top:f,left:v})};return u(),window.addEventListener("scroll",u),window.addEventListener("resize",u),function(){window.removeEventListener("scroll",u),window.removeEventListener("resize",u)}}},[o]),H(function(){var u=function(g){if(a.current){var p=g.composedPath(),f=p.includes(a.current),v=o&&p.includes(o);f||v||i()}},m=setTimeout(function(){document.addEventListener("mousedown",u)},0);return function(){clearTimeout(m),document.removeEventListener("mousedown",u)}},[i,o]),H(function(){var u=function(m){m.key==="Escape"&&i()};return document.addEventListener("keydown",u),function(){return document.removeEventListener("keydown",u)}},[i]);var d=l?{position:"fixed",top:"".concat(l.top,"px"),left:"".concat(l.left,"px"),zIndex:1e3}:{display:"none"};
2119return h("div",U(U({ref:a},yt(t.schema)),{},{className:"border-border-default bg-bg-elevated min-w-[200px] rounded-lg border py-2 shadow-lg",style:d}),t.schema.items.map(function(u){return h(vl,{key:u.id,item:u,documentId:n,onClose:i,isMobile:!1,onNavigateToSubmenu:r})}))}function vl(e){var t=e.item,n=e.documentId,o=e.onClose,i=e.isMobile,r=e.onNavigateToSubmenu;switch(t.type){case"command":return h(p6,{item:t,documentId:n,onClose:o,isMobile:i});case"submenu":return h(g6,{item:t,documentId:n,isMobile:i,onNavigateToSubmenu:r});case"divider":return h("div",U({},yt(t)),h("hr",{className:"border-border-subtle my-2"}));case"section":return h(f6,{item:t,documentId:n,onClose:o,isMobile:i,onNavigateToSubmenu:r});default:return null}}function p6(e){var t,n,o=e.item,i=e.documentId,r=e.onClose,a=e.isMobile,s=nn(o.commandId,i);if(!s||!s.visible)return null;var l,c,d=function(){s.disabled||(s.execute(),r())};return a?h("button",U(U({},yt(o)),{},{onClick:d,disabled:s.disabled,className:"active:bg-interactive-active flex w-full items-center gap-3 px-4 py-3 text-left text-base transition-colors ".concat(s.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"," ").concat(s.active?"bg-interactive-selected text-accent":"text-fg-secondary"),role:"menuitem"}),s.icon&&h(Se,{icon:s.icon,className:"h-5 w-5",primaryColor:(l=s.iconProps)===null||l===void 0?void 0:l.primaryColor,secondaryColor:(c=s.iconProps)===null||c===void 0?void 0:c.secondaryColor}),h("span",{className:"flex-1"},s.label)):h("button",U(U({},yt(o)),{},{onClick:d,disabled:s.disabled,className:"flex w-full items-center justify-between gap-2 px-4 py-1 text-left ".concat(s.disabled?"pointer-events-none cursor-not-allowed opacity-50":"cursor-pointer"," ").concat(s.active&&!s.disabled?"bg-accent text-fg-on-accent":"text-fg-muted hover:bg-accent hover:text-fg-on-accent"),role:"menuitem"}),h("div",{className:"flex items-center gap-2"},h("div",{className:"flex h-6 w-6 items-center justify-center"},s.icon&&h(Se,{icon:s.icon,className:"h-6 w-6",primaryColor:(t=s.iconProps)===null||t===void 0?void 0:t.primaryColor,secondaryColor:(n=s.iconProps)===null||n===void 0?void 0:n.secondaryColor})),h("span",{className:"text-sm"},s.label)))}function g6(e){var t=e.item,n=e.documentId,o=e.isMobile,i=e.onNavigateToSubmenu,r=qe(n).translate,a=t.labelKey?r(t.labelKey):t.label||"",s=function(){return i(t.menuId,a)};return o?h("button",U(U({},yt(t)),{},{onClick:s,className:"text-fg-secondary active:bg-interactive-active flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left text-base transition-colors",role:"menuitem"}),h("span",{className:"flex-1"},a),h(Pi,{className:"h-4 w-4"})):h("button",U(U({},yt(t)),{},{onClick:s,className:"text-fg-muted hover:bg-accent hover:text-fg-on-accent flex w-full cursor-pointer items-center justify-between gap-2 px-4 py-1 text-left",role:"menuitem"}),h("span",{className:"text-sm"},a),h(Pi,{className:"h-6 w-6"}))}function f6(e){var t=e.item,n=e.documentId,o=e.onClose,i=e.isMobile,r=e.onNavigateToSubmenu,a=qe(n).translate,s=t.labelKey?a(t.labelKey):t.label||"";return h("div",U({},yt(t)),h("div",{className:"text-fg-secondary px-4 py-3 text-xs font-medium uppercase"},s),t.items.map(function(l){return h(vl,{key:l.id,item:l,documentId:n,onClose:o,isMobile:i,onNavigateToSubmenu:r})}))}function v6(e){var t=e.schema,n=e.documentId,o=e.isOpen,i=e.onClose,r=e.onExited,a=e.modalProps,s=t.content,l=ea().renderCustomComponent;return s.type!=="component"?(console.warn("SchemaModal only supports component content type, got: ".concat(s.type)),null):h(fe,null,l(s.componentId,n,U({isOpen:o,onClose:i,onExited:r},a)))}function y6(e){var t=e.documentId;e.onClose;var n=Nh(t),o=n.state,i=n.provides;return h("div",{className:"flex h-full flex-1 flex-col"},h("div",{className:"flex-1 overflow-hidden"},h(r4,{documentId:t,style:{width:"100%",height:"100%"}},function(r){return h("div",{key:r.pageIndex,style:{position:"absolute",width:"100%",height:r.wrapperHeight,top:r.top,display:"flex",flexDirection:"column",alignItems:"center",cursor:"pointer"},onClick:function(){var a;i==null||(a=i.scrollToPage)===null||a===void 0||a.call(i,{pageNumber:r.pageIndex+1})}}
2119,h("div",{style:{width:r.width,height:r.height,border:"2px solid ".concat(o.currentPage===r.pageIndex+1?"var(--ep-accent-primary)":"var(--ep-border-default)"),borderRadius:"4px",overflow:"hidden",boxShadow:o.currentPage===r.pageIndex+1?"0 0 0 2px var(--ep-interactive-focus-ring)":"none"}},h(a4,{documentId:t,meta:r,style:{width:"100%",height:"100%"}})),h("div",{style:{height:r.labelHeight,display:"flex",alignItems:"center",justifyContent:"center",marginTop:"4px"}},h("span",{className:"text-fg-secondary text-xs"},r.pageIndex+1)))})))}function Hi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:300,n=X($(e),2),o=n[0],i=n[1];return H(function(){var r=window.setTimeout(function(){return i(e)},t);return function(){return clearTimeout(r)}},[e,t]),o}var Wt=function(e){var t=e.label,n=e.checked,o=e.onChange,i=e.disabled;return h("label",{className:"text-fg-secondary inline-flex select-none items-center gap-2 text-xs font-medium ".concat(i?"cursor-not-allowed opacity-50":"cursor-pointer")},h("input",{type:"checkbox",checked:n,disabled:i,onChange:function(r){return o(r.target.checked)},className:"border-border-default bg-bg-input checked:border-accent checked:bg-accent peer h-4 w-4 shrink-0 appearance-none rounded-[3px] border transition-all disabled:cursor-not-allowed"}),h("svg",{viewBox:"0 0 24 24",className:"/* fine-tune centering */ text-fg-on-accent pointer-events-none absolute h-3.5 w-3.5 translate-x-[1px] translate-y-[1px] opacity-0 peer-checked:opacity-100",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"},h("polyline",{points:"20 6 9 17 4 12"})),t)},b6=function(e){var t=e.hit,n=e.onClick,o=e.active,i=Q(null);return H(function(){o&&i.current&&i.current.scrollIntoView({behavior:"smooth",block:"nearest"})},[o]),h("button",{ref:i,onClick:n,className:"w-full rounded border p-2 text-left text-sm transition-colors ".concat(o?"border-accent bg-accent-light text-fg-primary":"border-border-subtle bg-bg-surface text-fg-secondary hover:bg-interactive-hover")},h("span",null,t.context.truncatedLeft&&"⦠",t.context.before,h("span",{className:"text-accent font-bold"},t.context.match),t.context.after,t.context.truncatedRight&&" â¦"))};function w6(e){var t=e.documentId;e.onClose;var n=(f=>{const{provides:v}=dp(),[y,b]=$(Dr),w=ee(()=>v?.forDocument(f),[v,f]);return H(()=>{if(w)return b(w.getState()),w.onStateChange(x=>b(x));b(Dr)},[w]),{state:y,provides:w??null}})(t),o=n.state,i=n.provides,r=Mo().provides,a=qe(t).translate,s=Q(null),l=X($(""),2),c=l[0],d=l[1];H(function(){},[]),H(function(){o.query&&!c&&d(o.query)},[o.query]),H(function(){o.activeResultIndex!==void 0&&o.activeResultIndex>=0&&g(o.activeResultIndex)},[o.activeResultIndex]);var u=Hi(c,300);H(function(){u!==o.query&&i?.searchAllPages(u)},[u,i,o.query]);var m=function(f,v){v?i?.setFlags([].concat(zi(o.flags),[f])):i?.setFlags(o.flags.filter(function(y){return y!==f}))},g=function(f){var v,y=o.results[f];if(y){var b=y.rects.reduce(function(w,x){return{x:Math.min(w.x,x.origin.x),y:Math.min(w.y,x.origin.y)}},{x:1/0,y:1/0});r==null||(v=r.forDocument(t))===null||v===void 0||v.scrollToPage({pageNumber:y.pageIndex+1,pageCoordinates:b,alignX:50,alignY:25})}},p=(function(f){var v={};return f.forEach(function(y,b){v[y.pageIndex]||(v[y.pageIndex]=[]),v[y.pageIndex].push({hit:y,index:b})}),v})(o.results);return h("div",{className:"bg-bg-surface flex h-full flex-col"},h("div",{className:"p-4"},h("div",{className:"relative"},h("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},h(p0,{className:"text-fg-muted h-4 w-4"})),h("input",{ref:s,type:"text",placeholder:a("search.placeholder"),value:c,onInput:function(f){var v=f.target;d(v.value)},className:"border-border-default bg-bg-input focus:border-accent focus:ring-accent w-full rounded-md border py-1 pl-8 pr-9 text-base focus:outline-none focus:ring-1"}),c&&h("div",{className:"absolute inset-y-0 right-0 flex cursor-pointer items-center pr-3",onClick:function(){d(""),s.current&&s.current.focus()}},h(g0,{className:"text-fg-muted hover:text-fg-secondary h-4 w-4"}))),h("div",{className:"mt-3 flex flex-col gap-2"},h(Wt,{label:a("search.caseSensitive"),checked:o.flags.includes(di.MatchCase),onChange:function(f){return m(di.MatchCase,f)}}),h(Wt,{label:a("search.wholeWord"),checked:o.flags.includes(di.MatchWholeWord),onChange:function(f){return m(di.MatchWholeWord,f)}})),h("hr",{className:"border-border-subtle mb-2 mt-5"}),o.active&&h("div",{className:"flex h-[32px] flex-row items-center justify-between"},h("div",{className:"text-fg-muted text-xs"},a("search.resultsFound",{params:{count:o.total}})),o.total>1&&h("div",{className:"flex flex-row"},h(ht,{onClick:function(){i?.previousResult()}},h(hl,{className:"h-4 w-4"})),h(ht,{onClick:function(){i?.nextResult()}},h(Pi,{className:"h-4 w-4"}))))),h("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto px-4"},Object.entries(p).map(function(f){var v=X(f,2),y=v[0],b=v[1];return h("div",{key:y,className:"mt-2 first:mt-0"},h("div",{className:"bg-bg-surface/80 text-fg-muted py-2 text-xs backdrop-blur"},a("search.page",{params:{page:Number(y)+1}})),h("div",{className:"flex flex-col gap-2"},b.map(function(w){var x=w.hit,k=w.index;return h(b6,{key:k,hit:x,active:k===o.activeResultIndex,onClick:function(){i?.goToResult(k)}})})))}),h("div",null)))}function x6(e){var t=e.documentId,n=at(d1.id).provides,o=Mo().provides,i=qe(t).translate,r=At(t),a=X($([]),2),s=a[0],l=a[1],c=X($(new Set),2),d=c[0],u=c[1],m=X($(!0),2),g=m[0],p=m[1];H(function(){if(n&&r!=null&&r.document){p(!0);var v=n.getBookmarks();return v.wait(function(y){var b=y.bookmarks;l(b);var w=b.map(function(x,k){return"bookmark-".concat(k)});u(new Set(w)),p(!1)},function(){p(!1)}),function(){v.abort({code:Z.Cancelled,message:"Bookmark task cancelled"})}}},[n,r?.document]);var f=function(v,y){var b,w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,x="bookmark-".concat(y),k=v.children&&v.children.length>0,I=d.has(x);return h("div",{key:x,className:"select-none"},h("div",{className:"hover:bg-interactive-hover flex cursor-pointer items-center gap-1 px-2 py-1",style:{paddingLeft:"".concat(16*w+8,"px")},onClick:function(){return(function(S){if(o&&S.target){var A;if(S.target.type==="action"){var M=S.target.action;if(M.type===Kn.Goto||M.type===Kn.RemoteGoto)A=M.destination;else if(M.type===Kn.URI)return void window.open(M.uri,"_blank")}else S.target.type==="destination"&&(A=S.target.destination);if(A)if(A.zoom.mode===Gr.XYZ){var P,T=r==null||(P=r.document)===null||P===void 0?void 0:P.pages.find(function(D){return D.index===A.pageIndex});if(!T)return;o.scrollToPage({pageNumber:A.pageIndex+1,pageCoordinates:A.zoom.params?{x:A.zoom.params.x,y:T.size.height-A.zoom.params.y}:void 0,behavior:"smooth"})}else o.scrollToPage({pageNumber:A.pageIndex+1,behavior:"smooth"})}})(v)}},k&&h("button",{onClick:function(S){S.stopPropagation(),(function(A){u(function(M){var P=new Set(M);return P.has(A)?P.delete(A):P.add(A),P})})(x)},className:"flex h-4 w-4 items-center justify-center"},h(I?m0:Pi,{className:"h-3 w-3"})),!k&&h("div",{className:"w-4"}),h("span",{className:"text-fg-secondary text-sm"},v.title)),k&&I&&h("div",null,(b=v.children)===null||b===void 0?void 0:b.map(function(S,A){return f(S,A,w+1)})))};return r==null||!r.document||g?h("div",{className:"text-fg-secondary flex h-full flex-col gap-3 p-4 text-sm"},h("div",{className:"text-fg-primary font-medium"},i("outline.title")),h("p",null,i("outline.loading"))):s.length===0?h("div",{className:"flex h-full items-center justify-center p-6"},h("div",{className:"text-fg-muted text-center"},h("div",{className:"text-sm"},i("outline.noOutline")),h("div",{className:"mt-1 text-xs"},i("outline.noBookmarks")))):h("div",{className:"bg-bg-surface flex h-full flex-col"},h("div",{className:"flex-1 overflow-y-auto"},h("div",{className:"outline-tree"},s.map(function(v,y){return f(v,y)}))))}function bs(e){var t=e.size,n=t===void 0?"md":t,o=e.text,i=e.className,r={sm:"w-6 h-6",md:"w-10 h-10",lg:"w-16 h-16"};return h("div",{className:"flex flex-col items-center justify-center gap-3 ".concat(i===void 0?"":i)},h("div",{className:"relative"},h("div",{className:"".concat(r[n]," border-border-default animate-spin rounded-full border-4")}),h("div",{className:"".concat(r[n]," border-r-accent border-t-accent absolute left-0 top-0 animate-spin rounded-full border-4 border-transparent")})),o&&h("p",{className:"".concat({sm:"text-sm",md:"text-base",lg:"text-lg"}[n]," text-fg-secondary animate-pulse font-medium")},o))}function Wo(e){var t=e.size,n=t===void 0?"md":t,o=e.className,i=o===void 0?"":o;return h("div",{className:"".concat({sm:"w-4 h-4 border-2",md:"w-6 h-6 border-2",lg:"w-8 h-8 border-3"}[n]," border-border-default border-t-accent animate-spin rounded-full ").concat(i)})}var du,C6=function(e){var t=e.documentId,n=Mi().provides,o=X($({show:!1,mode:null,isAnimating:!1}),2),i=o[0],r=o[1],a=qe(t).translate;if(H(function(){if(n)return n.onModeChange(function(c){var d=c.activeMode;if(d==="marqueeZoom"||d==="marqueeCapture"){r({show:!0,mode:d,isAnimating:!0});var u=setTimeout(function(){r(function(m){return U(U({},m),{},{show:!1})})},3e3);return function(){return clearTimeout(u)}}r({show:!1,mode:null,isAnimating:!1})})},[n]),!i.show&&!i.isAnimating)return null;var s=i.mode==="marqueeZoom"?a("zoom.dragTip"):a("capture.dragTip"),l=i.mode==="marqueeZoom"?"rgba(33,150,243,0.8)":"rgba(76,175,80,0.8)";return h("div",{className:"hint-overlay ".concat(i.show?"hint-show":"hint-hide"),onAnimationEnd:function(){i.show||r(function(c){return U(U({},c),{},{isAnimating:!1,mode:null})})},style:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",gap:"20px"}},h("div",{className:"hint-text",style:{background:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 20px",borderRadius:"8px",fontSize:"14px",fontWeight:"500",textAlign:"center",maxWidth:"250px"}},s),h("div",{className:"drag-demo",style:{position:"relative",width:"150px",height:"100px"}},h("div",{style:{position:"absolute",top:"20px",left:"20px",width:"110px",height:"60px",border:"2px dashed ".concat(l),borderRadius:"4px",opacity:.6}}),h("div",{className:"animated-rect",style:{position:"absolute",top:"20px",left:"20px",border:"2px s
2119olid ".concat(l),backgroundColor:"".concat(l.replace("0.8","0.15")),borderRadius:"4px"}}),h("div",{className:"cursor-demo",style:{position:"absolute",width:"20px",height:"20px"}},h("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M3.5 2.5L16.5 10L10 11.5L7.5 16.5L3.5 2.5Z",fill:"rgba(0,0,0,0.3)",transform:"translate(1,1)"}),h("path",{d:"M3 2L16 10L10 11.5L7.5 16L3 2Z",fill:"white",stroke:"black",strokeWidth:"1"}),h("path",{d:"M4 3.5L13.5 9.5L9.5 10.5L7.5 14L4 3.5Z",fill:"rgba(255,255,255,0.8)"})))),h("style",{jsx:!0},` 2120 .hint-overlay { 2121 animation-duration: 0.3s; 2122 animation-fill-mode: both; 2123 } 2124 2125 .hint-show { 2126 animation-name: hintFadeIn; 2127 } 2128 2129 .hint-hide { 2130 animation-name: hintFadeOut; 2131 } 2132 2133 @keyframes hintFadeIn { 2134 from { 2135 opacity: 0; 2136 transform: translateY(10px); 2137 } 2138 to { 2139 opacity: 1; 2140 transform: translateY(0); 2141 } 2142 } 2143 2144 @keyframes hintFadeOut { 2145 from { 2146 opacity: 1; 2147 transform: translateY(0); 2148 } 2149 to { 2150 opacity: 0; 2151 transform: translateY(-10px); 2152 } 2153 } 2154 2155 .animated-rect { 2156 animation: rectGrow 2s ease-in-out infinite; 2157 } 2158 2159 @keyframes rectGrow { 2160 0% { 2161 width: 0; 2162 height: 0; 2163 } 2164 50% { 2165 width: 110px; 2166 height: 60px; 2167 } 2168 100% { 2169 width: 110px; 2170 height: 60px; 2171 opacity: 0.7; 2172 } 2173 } 2174 2175 .cursor-demo { 2176 animation: cursorMove 2s ease-in-out infinite; 2177 } 2178 2179 @keyframes cursorMove { 2180 0% { 2181 top: 20px; 2182 left: 20px; 2183 } 2184 50% { 2185 top: 50px; 2186 left: 80px; 2187 } 2188 100% { 2189 top: 80px; 2190 left: 130px; 2191 } 2192 } 2193 2194 .hint-text { 2195 animation: textPulse 0.6s ease-in-out; 2196 } 2197 2198 @keyframes textPulse { 2199 0% { 2200 transform: scale(0.9); 2201 } 2202 50% { 2203 transform: scale(1.05); 2204 } 2205 100% { 2206 transform: scale(1); 2207 } 2208 } 2209 `))},k6=function(e){var t=e.placeholder,n=e.onSubmit,o=e.inputRef,i=e.isFocused,r=X($(""),2),a=r[0],s=r[1];return h("form",{className:"border-border-subtle mt-4 flex items-end space-x-2 border-t pt-4",onClick:function(l){return l.stopPropagation()},onSubmit:function(l){l?.preventDefault(),a.trim()&&(n(a),s(""))}},h("input",{ref:o,type:"text",placeholder:t,value:a,onInput:function(l){return s(l.currentTarget.value)},className:"bg-bg-input text-fg-primary placeholder-fg-muted w-full rounded-lg border px-3 py-1 text-base transition-colors focus:border-transparent focus:outline-none focus:ring-2 ".concat(i?"border-accent focus:ring-accent":"border-border-default focus:ring-accent")}),h("button",{type:"submit",disabled:!a.trim(),className:"bg-accent text-fg-on-accent hover:bg-accent-hover disabled:bg-interactive-disabled rounded-lg p-2 transition-colors disabled:cursor-not-allowed"},h("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},h("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 19l9 2-9-18-9 18 9-2zm0 0v-8"}))))},$a=["bg-red-500","bg-blue-500","bg-green-500","bg-yellow-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-teal-500"],I6=function(e){if(!e)return $a[0];var t=e.length>0?e.charCodeAt(0)%$a.length:0;return $a[t]},uu=function(e){var t=e.name,n=e.className,o=n===void 0?"":n;return h("div",{className:"flex h-8 w-8 items-center justify-center rounded-full text-sm font-medium text-white ".concat(I6(t)," ").concat(o)},(function(i){return i?i.split(" ").map(function(r){return r[0]}).join("").toUpperCase().slice(0,2):"G"})(t))},D0=function(e){var t,n,o=e.onEdit,i=e.onDelete,r=e.onClose,a=e.documentId,s=Q(null),l=qe(a).translate;return H(function(){var c=function(d){t.current&&!t.current.contains(d.target)&&n()};return document.addEventListener("click",c),function(){document.removeEventListener("click",c)}},[t=s,n=r]),h("div",{ref:s,className:"bg-bg-elevated ring-border-default absolute right-0 top-6 z-10 w-32 rounded-md shadow-lg ring-1"},h("div",{className:"py-1"},h("button",{onClick:function(c){c.preventDefault(),c.stopPropagation(),o(),r()},className:"text-fg-secondary hover:bg-interactive-hover block w-full px-4 py-2 text-left text-sm"},l("comments.edit")),h("button",{onClick:function(c){c.preventDefault(),c.stopPropagation(),i(),r()},className:"text-state-error hover:bg-interactive-hover block w-full px-4 py-2 text-left text-sm"}
vendor: 9,894 bytes, line 2209
2209,l("comments.delete"))))},T0=function(e){var t=e.initialText,n=e.onSave,o=e.onCancel,i=e.autoFocus,r=i!==void 0&&i,a=e.documentId,s=X($(t),2),l=s[0],c=s[1],d=Q(null),u=qe(a).translate;return H(function(){r&&d.current&&(d.current.focus(),d.current.setSelectionRange(l.length,l.length))},[r,l.length]),h("div",{className:"flex-1 space-y-2"},h("textarea",{ref:d,value:l,onInput:function(m){return c(m.currentTarget.value)},className:"border-border-default bg-bg-input text-fg-primary focus:border-accent focus:ring-accent w-full rounded-md border px-3 py-2 text-base focus:outline-none focus:ring-1",rows:3}),h("div",{className:"flex flex-wrap gap-2"},h("button",{onClick:function(m){m.stopPropagation(),n(l)},className:"bg-accent text-fg-on-accent hover:bg-accent-hover whitespace-nowrap rounded-md px-3 py-1 text-sm"},u("comments.save")),h("button",{onClick:function(m){m.stopPropagation(),o()},className:"bg-interactive-hover text-fg-secondary hover:bg-border-default whitespace-nowrap rounded-md px-3 py-1 text-sm"},u("comments.cancel"))))},ws=function(e){if(!e)return"(no date)";try{return(e instanceof Date?e:new Date(e)).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return typeof e=="string"?e:"(no date)"}},S6=function(e){var t=e.annotation,n=e.onSave,o=e.onDelete,i=e.isReply,r=i!==void 0&&i,a=e.documentId,s=e.isReadOnly,l=s!==void 0&&s,c=X($(!1),2),d=c[0],u=c[1],m=X($(!1),2),g=m[0],p=m[1],f=t.author||"Guest";return g?h("div",{className:"flex w-full items-start space-x-3",onClick:function(v){return v.stopPropagation()}},r&&h(uu,{name:f,className:"h-8 w-8"}),h(T0,{initialText:t.contents||"",onSave:function(v){n(v),p(!1)},onCancel:function(){p(!1)},autoFocus:!0,documentId:a})):h("div",{className:"flex items-start space-x-3"},r&&h(uu,{name:f,className:"h-8 w-8"}),h("div",{className:"min-w-0 flex-1"},r&&h("div",{className:"flex items-center justify-between"},h("div",{className:"leading-none"},h("h5",{className:"text-fg-primary text-sm font-medium"},f),h("span",{className:"text-fg-muted text-xs"},ws(t.modified||t.created))),!l&&h("div",{className:"relative"},h("button",{onClick:function(v){v.stopPropagation(),u(!0)},className:"text-fg-muted hover:bg-interactive-hover rounded-md p-1"},h("svg",{className:"h-4 w-4",fill:"currentColor",viewBox:"0 0 20 20"},h("path",{d:"M6 10a2 2 0 11-4 0 2 2 0 014 0zM12 10a2 2 0 11-4 0 2 2 0 014 0zM16 12a2 2 0 100-4 2 2 0 000 4z"}))),d&&h(D0,{onEdit:function(){return p(!0)},onDelete:o,onClose:function(){return u(!1)},documentId:a}))),h("p",{className:"text-fg-primary mt-2 text-sm"},t.contents)))},M6=(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(du={},z.TEXT,{label:"Comment",labelKey:"annotation.comment",icon:"message",iconProps:function(e){return{primaryColor:e.strokeColor||e.color||"#6b7280"}}}),z.HIGHLIGHT,{label:"Highlight",labelKey:"annotation.highlight",icon:"highlight",iconProps:function(e){return{primaryColor:e.strokeColor||"#ffff00"}}}),z.CIRCLE,{label:"Circle",labelKey:"annotation.circle",icon:"circle",iconProps:function(e){return{primaryColor:e.strokeColor||"#000000",secondaryColor:e.color}}}),z.SQUARE,{label:"Square",labelKey:"annotation.square",icon:"square",iconProps:function(e){return{primaryColor:e.strokeColor||"#000000",secondaryColor:e.color}}}),z.LINE,{label:"Line",labelKey:"annotation.line",icon:"line",iconProps:function(e){return{primaryColor:e.strokeColor||"#000000"}}}),z.UNDERLINE,{label:"Underline",labelKey:"annotation.underline",icon:"underline",iconProps:function(e){return{primaryColor:e.strokeColor||"#000000"}}}),z.SQUIGGLY,{label:"Squiggly",labelKey:"annotation.squiggly",icon:"squiggly",iconProps:function(e){return{primaryColor:e.strokeColor||"#000000"}}}),z.STRIKEOUT,{label:"Strikethrough",labelKey:"annotation.strikeout",icon:"strikethrough",iconProps:function(e){return{primaryColor:e.strokeColor||"#000000"}}}),z.INK,{label:"Ink",labelKey:"annotation.ink",icon:"pencilMarker",iconProps:function(e){return{primaryColor:e.strokeColor||"#000000"}}}),z.FREETEXT,{label:"Text",labelKey:"annotation.freeText",icon:"freeText",iconProps:function(e){return{primaryColor:e.fontColor||"#000000"}}}),oe(oe(oe(oe(oe(du,z.POLYGON,{label:"Polygon",labelKey:"annotation.polygon",icon:"polygon",iconProps:function(e){return{primaryColor:e.strokeColor||"#000000",secondaryColor:e.color}}}),z.POLYLINE,{label:"Polyline",labelKey:"annotation.polyline",icon:"zigzag",iconProps:function(e){return{primaryColor:e.strokeColor||"#000000"}}}),z.STAMP,{label:"Stamp",labelKey:"annotation.stamp",icon:"rubberStamp",iconProps:function(){return{primaryColor:"#000000"}}}),z.CARET,{label:"Caret",labelKey:"annotation.caret",icon:"insertText",iconProps:function(e){return{primaryColor:e.strokeColor||"#E44234"}}}),z.REDACT,{label:"Redact",labelKey:"annotation.redact",icon:"redact",iconProps:function(e){return{primaryColor:e.strokeColor||"#000000",secondaryColor:e.color||"#000000"}}})),hu=function(e){return Tr(e)?M6[e.object.type]:null},mu=function(e){var t=e.text,n=e.maxWords,o=n===void 0?16:n,i=e.className,r=i===void 0?"":i,a=e.documentId,s=X($(!1),2),l=s[0],c=s[1],d=qe(a).translate,u=t.split(" ");return u.length>o?h("div",{className:r},l?t:u.slice(0,o).join(" ")+"..."," ",h("button",{onClick:function(m){m.stopPropagation(),c(!l)},className:"text-accent hover:text-accent-hover text-sm font-medium focus:outline-none"},d(l?"comments.showLess":"comments.showMore"))):h("div",{className:r},t)},pu=function(e){var t=e.annotation,n=e.config,o=e.className,i=o===void 0?"":o,r=e.title,a=n.iconProps(t.object);return h("div",{className:"bg-bg-surface-alt flex items-center justify-center rounded-full ".concat(i),title:r},h(Se,U({icon:n.icon},a)))},A6=function(e){var t,n=e.entry,o=e.isSelected,i=e.onSelect,r=e.onUpdate,a=e.onDelete,s=e.onReply,l=e.documentId,c=e.isReadOnly,d=c!==void 0&&c,u=n.annotation,m=n.replies,g=n.groupMembers,p=X($(!1),2),f=p[0],v=p[1],y=X($(!1),2),b=y[0],w=y[1],x=X($(!1),2),k=x[0],I=x[1],S=qe(l).translate,A=g!=null&&g.length>0,M=hu(u),P=!!u.object.contents,T=m.length>0,D=!P&&!T,F=Q(null),N=Q(!1),W=u.object.author||"Guest";return H(function(){var _;o&&!N.current&&((_=F.current)===null||_===void 0||_.focus({preventScroll:!0})),N.current=o},[o]),M?h("div",{onClick:i,className:"bg-bg-surface cursor-pointer rounded-lg border shadow-sm transition-all hover:shadow-md ".concat(o?"border-accent ring-interactive-focus-ring ring-2":"border-border-subtle")},h("div",{className:"p-4"},h("div",{className:"flex items-start space-x-3"},h(pu,{annotation:u,config:M,title:S(M.labelKey,{fallback:M.label}),className:"h-8 w-8"}),h("div",{className:"min-w-0 flex-1"},h("div",{className:"flex items-center justify-between"},h("div",{className:"leading-none"},h("h4",{className:"text-fg-primary text-sm font-medium"},W),h("span",{className:"text-fg-disabled text-xs"},ws(u.object.modified||u.object.created))),!d&&h("div",{className:"relative"},h("button",{onClick:function(_){_.stopPropagation(),v(!0)},className:"text-fg-disabled hover:bg-interactive-hover hover:text-fg-secondary rounded-md p-1"},h("svg",{className:"h-4 w-4",fill:"currentColor",viewBox:"0 0 20 20"},h("path",{d:"M6 10a2 2 0 11-4 0 2 2 0 014 0zM12 10a2 2 0 11-4 0 2 2 0 014 0zM16 12a2 2 0 100-4 2 2 0 000 4z"}))),f&&h(D0,{onEdit:function(){return w(!0)},onDelete:function(){return a(u)},onClose:function(){return v(!1)},documentId:l}))),((t=u.object.custom)===null||t===void 0?void 0:t.text)&&h(mu,{text:u.object.custom.text,maxWords:14,className:"text-fg-muted mt-2 text-sm",documentId:l}),b?h("div",{className:"mt-2"},h(T0,{initialText:u.object.contents||"",onSave:function(_){r(u.object.id,_),w(!1)},onCancel:function(){w(!1)},autoFocus:!0,documentId:l})):P?h("p",{className:"text-fg-primary mt-2 text-sm"},u.object.contents):null)),T&&h("div",{className:"border-border-subtle mt-4 space-y-4 border-t pt-4"},m.map(function(_){return h(S6,{key:_.object.id,annotation:_.object,onSave:function(G){return r(_.object.id,G)},onDelete:function(){return a(_)},isReply:!0,documentId:l,isReadOnly:d})})),A&&h("div",{className:"border-border-subtle mt-4 border-t pt-3"},h("button",{onClick:function(_){_.stopPropagation(),I(function(G){return!G})},className:"text-accent hover:text-accent-hover flex w-full items-center justify-center gap-1 text-sm font-medium"},k?S("comments.closeAllAnnotations",{fallback:"Close All Annotations"}):S("comments.showAllAnnotations",{fallback:"Show All Annotations"}),h("svg",{className:"h-4 w-4 transition-transform ".concat(k?"rotate-180":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2},h("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))),k&&h("div",{className:"mt-3 space-y-3"},g.map(function(_){var G,q=hu(_);if(!q)return null;var O=_.object.author||"Guest";return h("div",{key:_.object.id,className:"flex items-start gap-2"},h(pu,{annotation:_,config:q,title:S(q.labelKey,{fallback:q.label}),className:"h-6 w-6"}),h("div",{className:"min-w-0 flex-1"},h("div",{className:"leading-none"},h("span",{className:"text-fg-primary text-sm font-medium"},O),h("span",{className:"text-fg-disabled ml-2 text-xs"},ws(_.object.modified||_.object.created)," (".concat(S("comments.page",{params:{page:_.object.pageIndex+1}}),")"))),((G=_.object.custom)===null||G===void 0?void 0:G.text)&&h(mu,{text:_.object.custom.text,maxWords:14,className:"text-fg-muted mt-1 text-sm",documentId:l}),_.object.contents&&h("p",{className:"text-fg-primary mt-1 text-sm"},_.object.contents)))}))),!b&&!d&&h(k6,{inputRef:F,isFocused:o,placeholder:S(D?"comments.addComment":"comments.addReply"),onSubmit:function(_){D?r(u.object.id,_):s(u.object.id,_)}}))):null},P6=function(e){var t=e.documentId,n=qe(t).translate;return h("div",{class:"text-fg-muted flex flex-col items-center gap-2 p-4"},h(Se,{icon:"comment",className:"h-18 w-18 text-fg-muted"}),h("div",{className:"text-fg-muted max-w-[150px] text-center text-sm"},n("comments.emptyState")))}
2209,D6=function(e){var t=e.documentId,n=en().provides,o=ll(t).state,i=Mo().provides,r=qe(t).translate,a=Qr(t).canModifyAnnotations,s=Q({}),l=Q(null),c=!a,d=Ci(o),u=(b=>{const w={};for(const S of Object.values(b.pages))for(const A of S){const M=b.byUid[A];if(M&&cg(M)){const P=M.object.inReplyToId;P&&(w[P]||(w[P]=[])).push(M)}}const x={},k=new Set;for(const S of Object.values(b.pages))for(const A of S){const M=b.byUid[A];if(M&&M.object.inReplyToId&&M.object.replyType===ln.Group&&M.object.type!==z.LINK&&Tr(M)){const P=M.object.inReplyToId;(x[P]||(x[P]=[])).push(M),k.add(M.object.id)}}const I={};for(const[S,A]of Object.entries(b.pages)){const M=Number(S),P=[];for(const T of A){const D=b.byUid[T];if(!D||!Tr(D)||k.has(D.object.id))continue;const F=x[D.object.id];P.push({page:M,annotation:D,replies:w[D.object.id]??[],...F&&F.length>0?{groupMembers:F}:{}})}P.length>0&&(I[M]=P)}return I})(o),m=new Set(d.map(function(b){var w;return(w=ug(o,b.object.id))!==null&&w!==void 0?w:b.object.id}));H(function(){var b=m.values().next().value;if(b&&l.current){var w=s.current[b];if(w){var x=l.current,k=x.getBoundingClientRect(),I=w.getBoundingClientRect(),S=I.top-k.top+x.scrollTop-x.clientHeight/2+I.height/2;x.scrollTo({top:S,behavior:"smooth"})}}},[o.selectedUids]);var g=function(b,w){var x=y(b);x&&n?.updateAnnotation(x.object.pageIndex,b,{contents:w,modified:new Date})},p=function(b){n?.deleteAnnotation(b.object.pageIndex,b.object.id)},f=function(b,w){var x=y(b);x&&n?.createAnnotation(x.object.pageIndex,{id:Ce(),rect:{origin:{x:x.object.rect.origin.x,y:x.object.rect.origin.y},size:{width:24,height:24}},pageIndex:x.object.pageIndex,created:new Date,modified:new Date,type:z.TEXT,contents:w,inReplyToId:x.object.id,flags:["noRotate","noZoom","print"],name:Ne.Comment})},v=Object.keys(u).map(Number).sort(function(b,w){return b-w}),y=function(b){var w,x=Yt(v);try{for(x.s();!(w=x.n()).done;){var k,I=w.value,S=Yt(u[I]);try{for(S.s();!(k=S.n()).done;){var A=k.value;if(A.annotation.object.id===b)return A.annotation;var M=A.replies.find(function(P){return P.object.id===b});if(M)return M}}catch(P){S.e(P)}finally{S.f()}}}catch(P){x.e(P)}finally{x.f()}};return v.length===0?h(P6,{documentId:t}):h("div",{ref:l,className:"h-full overflow-y-auto"},h("div",{className:"space-y-6 p-3"},v.map(function(b){return h("div",{key:b,className:"space-y-3"},h("div",{className:"bg-bg-surface sticky top-0 z-10 px-1"},h("div",{className:"border-border-subtle border-b py-2"},h("h3",{className:"text-md text-fg-primary font-semibold"},r("comments.page",{params:{page:b+1}})),h("p",{className:"text-fg-muted text-sm"},u[b].length===1?r("comments.commentCount",{params:{count:1}}):r("comments.commentCountPlural",{params:{count:u[b].length}})))),h("div",{className:"space-y-3 px-1"},u[b].map(function(w){return h("div",{key:w.annotation.object.id,ref:function(x){x&&(s.current[w.annotation.object.id]=x)}},h(A6,{entry:w,isSelected:m.has(w.annotation.object.id),onSelect:function(){return x=w.annotation,n?.selectAnnotation(x.object.pageIndex,x.object.id),void(i==null||i.scrollToPage({pageNumber:x.object.pageIndex+1,pageCoordinates:{x:x.object.rect.origin.x,y:x.object.rect.origin.y},alignX:50,alignY:25,behavior:"smooth"}));var x},onUpdate:g,onDelete:p,onReply:f,documentId:t,isReadOnly:c}))})))})))};function T6(e){var t=e.documentId,n=(c=>{const{provides:d}=Js(),[u,m]=$(Bm);return H(()=>{if(!d)return;const g=d.forDocument(c);return m(g.getState()),g.onStateChange(p=>{m(p)})},[d,c]),{state:u,provides:d?.forDocument(c)??null}})(t),o=n.state,i=n.provides,r=X($(""),2),a=r[0],s=r[1];if(!i)return null;var l=Math.round(100*o.currentZoomLevel);return H(function(){s(l.toString())},[l]),h("div",{className:"relative"},h("div",{className:"bg-interactive-hover flex items-center rounded"},h("form",{onSubmit:function(c){c.preventDefault();var d=c.target,u=new FormData(d),m=parseFloat(u.get("zoom")||a);!isNaN(m)&&m>0&&i.requestZoom(m/100)},className:"block"},h("input",{name:"zoom",type:"text",inputMode:"numeric",pattern:"\\d*",className:"h-6 w-8 border-0 bg-transparent p-0 text-right text-sm outline-none focus:outline-none","aria-label":"Set zoom",autoFocus:!1,value:a,onInput:function(c){var d=c.target.value.replace(/[^0-9]/g,"");s(d)},onBlur:function(){(!a||parseFloat(a)<=0)&&s(l.toString())}}),h("span",{className:"text-sm"},"%")),h(po,{commandId:"zoom:toggle-menu",documentId:t,itemId:"zoom-menu-button"}),h(po,{commandId:"zoom:out",documentId:t}),h(po,{commandId:"zoom:in",documentId:t})))}var z6=function(e){var t=e.documentId,n=qe(t).translate;return h("div",{class:"text-fg-muted flex flex-col items-center gap-2 p-4"},h(Se,{icon:"palette",className:"h-18 w-18 text-fg-muted"}),h("div",{className:"text-fg-muted max-w-[150px] text-center text-sm"},n("annotation.selectAnnotation")))},ur={color:{key:"color",type:"colorWithTransparent",labelKey:"annotation.fillColor"},strokeColor:{key:"strokeColor",type:"colorWithTransparent",labelKey:"annotation.strokeColor"},opacity:{key:"opacity",type:"opacity",labelKey:"annotation.opacity",min:.1,max:1,step:.
220905,debounce:!0},strokeWidth:{key:"strokeWidth",type:"slider",labelKey:"annotation.strokeWidth",min:1,max:30,step:1,unit:"px",debounce:!0},strokeStyle:{key:"strokeStyle",type:"strokeStyle",labelKey:"annotation.borderStyle"},strokeStyleWithCloudy:{key:"strokeStyle",type:"strokeStyle",labelKey:"annotation.borderStyle",showCloudy:!0},lineEndings:{key:"lineEndings",type:"lineEndings",labelKey:"annotation.lineEndings"},fontFamily:{key:"fontFamily",type:"fontFamily",labelKey:"annotation.fontFamily"},fontSize:{key:"fontSize",type:"fontSize",labelKey:"annotation.fontSize"},fontColor:{key:"fontColor",type:"fontColor",labelKey:"annotation.fontColor"},textAlign:{key:"textAlign",type:"textAlign",labelKey:"annotation.textAlign"},verticalAlign:{key:"verticalAlign",type:"verticalAlign",labelKey:"annotation.verticalAlign"},blendMode:{key:"blendMode",type:"blendMode",labelKey:"annotation.blendMode"},rotation:{key:"rotation",type:"rotation",labelKey:"annotation.rotation",debounce:!0,editOnly:!0},overlayText:{key:"overlayText",type:"text",labelKey:"annotation.overlayText",placeholderKey:"annotation.overlayTextPlaceholder"}},xs={highlight:["strokeColor","opacity","blendMode"],underline:["strokeColor","opacity","blendMode"],strikeout:["strokeColor","opacity","blendMode"],squiggly:["strokeColor","opacity","blendMode"],ink:["strokeColor","opacity","strokeWidth","rotation"],inkHighlighter:["strokeColor","opacity","strokeWidth","blendMode","rotation"],circle:["color","opacity","strokeColor","strokeStyleWithCloudy","strokeWidth","rotation"],square:["color","opacity","strokeColor","strokeStyleWithCloudy","strokeWidth","rotation"],polygon:["strokeColor","opacity","strokeStyleWithCloudy","strokeWidth","color","rotation"],line:["strokeColor","opacity","strokeStyle","strokeWidth","lineEndings","color","rotation"],lineArrow:["strokeColor","opacity","strokeStyle","strokeWidth","lineEndings","color","rotation"],polyline:["strokeColor","opacity","strokeStyle","strokeWidth","lineEndings","color","rotation"],textComment:["strokeColor","opacity"],insertText:["strokeColor","opacity"],replaceText:["strokeColor","opacity"],freeText:["fontFamily","fontSize","fontColor","textAlign","verticalAlign","opacity","color","rotation"],stamp:["rotation"],redact:["strokeColor","color","opacity"],formTextField:["fontSize","fontColor","strokeColor","strokeWidth","color"],formCheckbox:["strokeColor","color","strokeWidth"],formCombobox:["fontSize","fontColor","strokeColor","strokeWidth","color"],formListbox:["fontFamily","fontSize","fontColor","strokeColor","strokeWidth","color"],formRadioButton:["strokeColor","color","strokeWidth"]},R6=["position"],z0=function(){var e=X($(!1),2),t=e[0],n=e[1],o=Q(null),i=Q(null);return H(function(){if(t){var r=function(a){o.current&&!o.current.contains(a.target)&&n(!1)};return document.addEventListener("click",r),function(){return document.removeEventListener("click",r)}}},[t]),H(function(){t&&i.current&&i.current.scrollIntoView({block:"center",inline:"start"})},[t]),{open:t,setOpen:n,rootRef:o,selectedItemRef:i}},yl=function(e){var t=e.value,n=e.onChange,o=e.options,i=e.getOptionKey,r=e.renderValue,a=e.renderOption,s=e.triggerClass,l=s===void 0?"px-3 py-2":s,c=z0(),d=c.open,u=c.setOpen,m=c.rootRef,g=c.selectedItemRef;return h("div",{ref:m,class:"relative inline-block w-full"},h("button",{type:"button",class:"border-border-default bg-bg-input flex w-full items-center justify-between gap-2 rounded border ".concat(l),onClick:function(){return u(function(p){return!p})}},r(t),h("svg",{class:"text-fg-secondary h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor"},h("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.24a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z",clipRule:"evenodd"}))),d&&h("div",{class:"border-border-default bg-bg-elevated absolute z-10 mt-1 max-h-60 w-full overflow-y-auto rounded border p-1 shadow-lg"},o.map(function(p){var f=i(p)===i(t);return h("button",{ref:f?g:null,key:i(p),class:"hover:bg-interactive-hover block w-full rounded text-left ".concat(f?"bg-interactive-hover":""),onClick:function(){n(p),u(!1)}},a(p,f))})))},Nt=function(e){var t=e.children,n=e.className;return h("label",{class:"text-fg-primary mb-2 block text-sm font-medium ".concat(n===void 0?"":n)},t)},R0=function(e){var t=e.children,n=e.className;return h("span",{class:"text-fg-muted text-xs ".concat(n===void 0?"":n)},t)},Gt=function(e){var t=e.children,n=e.className;return h("section",{class:"mb-6 ".concat(n===void 0?"":n)},t)},E0=function(e){var t=e.value,n=e.min,o=n===void 0?0:n,i=e.max,r=i===void 0?1:i,a=e.step,s=a===void 0?.1:a,l=e.onChange;return h("input",{type:"range",class:"range-sm bg-border-subtle mb-2 h-1 w-full cursor-pointer appearance-none rounded-lg",value:t,min:o,max:r,step:s,onInput:function(c){return l(parseFloat(c.target.value))}})},Cs=function(e){var t=e.color,n=e.active,o=e.onSelect,i=(function(r){return r==="transparent"||/^rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*0\s*\)$/i.test(r)||/^#([0-9a-f]{8})$/i.test(r)&&r.slice(-2).toLowerCase()==="00"||/^#([0-9a-f]{4})$/i.test(r)&&r.slice(-1).toLowerCase()==="0"})(t)?{backgroundColor:"#fff",backgroundImage:"linear-gradient(45deg, transparent 40%, red 40%, red 60%, transparent 60%)",backgroundSize:"100% 100%"}:{backgroundColor:t};return h("button",{title:t,class:"border-border-strong h-5 w-5 rounded-full border ".concat(n?"outline-accent outline outline-2 outline-offset-2":""),style:i,onClick:function(){return o(t)}})},gu=[{id:Te.SOLID},{id:Te.DASHED,dash:[6,2]},{id:Te.DASHED,dash:[8,4]},{id:Te.DASHED,dash:[3,3]},{id:Te.DASHED,dash:[1,2]},{id:Te.DASHED,dash:[4,2,1,2]},{id:Te.DASHED,dash:[8,4,1,4]},{id:Te.SOLID,cloudyIntensity:1},{id:Te.SOLID,cloudyIntensity:2}],fu=function(e){var t;if(e.cloudyIntensity){for(var n=e.cloudyIntensity===1?3:5,o=Math.ceil(80/(2*n)),i=80/o,r=n+1,a=2*n+2,s=["M 0 ".concat(r)],l=0;l<o;l++)s.push("A ".concat(n," ").concat(n," 0 0 1 ").concat(i*(l+1)," ").concat(r));return h("svg",{width:"80",height:a,viewBox:"0 0 80 ".concat(a)},h("path",{d:s.join(" "),fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round","stroke-linecap":"round"}))}return h("svg",{width:"80",height:"8",viewBox:"0 0 80 8"},h("line",{x1:"0",y1:"4",x2:"80",y2:"4",style:{strokeDasharray:(t=e.dash)===null||t===void 0?void 0:t.join(" "),stroke:"currentColor",strokeWidth:"2"}}))};function E6(e){var t;return e.cloudyIntensity?"cloudy-".concat(e.cloudyIntensity):e.id+(((t=e.dash)===null||t===void 0?void 0:t.join("-"))||"")}
2209var vu,_6=function(e){var t=e.value,n=e.onChange,o=e.showCloudy?gu:gu.filter(function(i){return!i.cloudyIntensity});return h(yl,{value:t,onChange:n,options:o,getOptionKey:E6,renderValue:function(i){return fu(i)},renderOption:function(i){return h("div",{class:"px-1 py-2"},fu(i))}})},L6=[Ie.None,Ie.Square,Ie.Circle,Ie.Diamond,Ie.OpenArrow,Ie.ClosedArrow,Ie.ROpenArrow,Ie.RClosedArrow,Ie.Butt,Ie.Slash],yu=function(e){var t,n=e.ending,o=e.position,i=oe(oe(oe(oe(oe(oe(oe(oe(oe({},Ie.Square,h("path",{d:"M68 -4 L76 -4 L76 4 L68 4 Z"})),Ie.Circle,h("circle",{cx:"72",cy:"0",r:"4"})),Ie.Diamond,h("path",{d:"M72 -5 L77 0 L72 5 L67 0 Z"})),Ie.OpenArrow,h("path",{d:"M67 -5 L77 0 L67 5",fill:"none"})),Ie.ClosedArrow,h("path",{d:"M67 -5 L77 0 L67 5 Z"})),Ie.ROpenArrow,h("path",{d:"M77 -5 L67 0 L77 5",fill:"none"})),Ie.RClosedArrow,h("path",{d:"M77 -5 L67 0 L77 5 Z"})),Ie.Butt,h("path",{d:"M72 -5 L72 5",fill:"none"})),Ie.Slash,h("path",{d:"M67 -5 L77 5",fill:"none"})),r=oe(oe(oe(oe(oe(oe(oe(oe(oe({},Ie.Square,68),Ie.Circle,68),Ie.Diamond,67),Ie.OpenArrow,76),Ie.ClosedArrow,67),Ie.ROpenArrow,67),Ie.RClosedArrow,67),Ie.Butt,72),Ie.Slash,72),a=i[n];return h("svg",{width:"80",height:"20",viewBox:"0 0 80 20",class:"text-fg-primary"},h("g",{transform:o==="start"?"rotate(180 40 10)":""},h("line",{x1:"4",y1:"10",x2:(t=r[n])!==null&&t!==void 0?t:77,y2:"10",stroke:"currentColor","stroke-width":"1.5"}),a&&h("g",{transform:"translate(0, 10)",fill:"currentColor",stroke:"currentColor","stroke-width":"1.5"},a)))},bu=function(e){var t=e.position,n=Hr(e,R6);return h(yl,U(U({},n),{},{options:L6,getOptionKey:function(o){return o},triggerClass:"px-3 py-1",renderValue:function(o){return h(yu,{ending:o,position:t})},renderOption:function(o){return h("div",{class:"px-1 py-1"},h(yu,{ending:o,position:t}))}}))},O6=function(e){return h(yl,U(U({},e),{},{options:by,getOptionKey:function(t){return t},triggerClass:"px-2 py-1 text-sm",renderValue:function(t){return h("span",null,Zl(t))},renderOption:function(t){return h("div",{class:"px-2 py-1"},Zl(t))}}))},N6=function(e){var t=e.value,n=e.onChange,o=(t%360+360)%360,i=function(r){n(((o+r)%360+360)%360)};return h("div",{class:"flex items-center gap-1"},h("button",{type:"button",title:"-90°",class:"border-border-default bg-bg-input text-fg-primary hover:bg-interactive-hover flex h-8 w-8 shrink-0 items-center justify-center rounded border",onClick:function(){return i(-90)}},h("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},h("path",{d:"M1 4v6h6"}),h("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"}))),h("div",{class:"relative flex-1"},h("input",{type:"number",min:"0",max:"359",class:"border-border-default bg-bg-input text-fg-primary h-8 w-full rounded border px-2 pr-6 text-center text-sm",value:o,onInput:function(r){var a=parseInt(r.target.value,10);Number.isFinite(a)&&n((a%360+360)%360)}}),h("span",{class:"text-fg-muted pointer-events-none absolute inset-y-0 right-2 flex items-center text-xs"},"°")),h("button",{type:"button",title:"+90°",class:"border-border-default bg-bg-input text-fg-primary hover:bg-interactive-hover flex h-8 w-8 shrink-0 items-center justify-center rounded border",onClick:function(){return i(90)}},h("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},h("path",{d:"M23 4v6h-6"}),h("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"}))))},$6=function(e){var t=e.value,n=e.onChange,o=e.options,i=o===void 0?[8,9,10,11,12,14,16,18,24,36,48,72]:o,r=z0(),a=r.open,s=r.setOpen,l=r.rootRef,c=r.selectedItemRef;return h("div",{ref:l,class:"relative w-full"},h("input",{type:"number",min:"1",class:"border-border-default bg-bg-input w-full rounded border px-2 py-1 pr-7 text-sm",value:t,onInput:function(d){var u=parseInt(d.target.value,10);Number.isFinite(u)&&u>0&&n(u)},onClick:function(){return s(!0)}}),h("button",{type:"button",class:"absolute inset-y-0 right-1 flex items-center",onClick:function(){return s(function(d){return!d})},tabIndex:-1},h("svg",{class:"text-fg-secondary h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor"},h("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.24a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z","clip-rule":"evenodd"}))),a&&h("div",{class:"border-border-default bg-bg-elevated absolute z-10 mt-1 max-h-48 w-full overflow-y-auto rounded border shadow-lg"},i.map(function(d){var u=d===t;return h("button",{ref:u?c:null,key:d,class:"hover:bg-interactive-hover block w-full px-2 py-1 text-left text-sm ".concat(u?"bg-interactive-hover":""),onClick:function(){n(d),s(!1)}},d)})))};function Zn(e){var t=e.active,n=t!==void 0&&t,o=e.disabled,i=o!==void 0&&o,r=e.onClick,a=e.title,s=e.children,l=e.className,c=l===void 0?"":l;return h("button",{type:"button",title:a,disabled:i,onClick:r,className:"h-9 w-9 rounded border px-2 py-1 text-sm transition-colors ".concat(n?"border-accent bg-accent text-fg-on-accent":"border-border-default bg-bg-input text-fg-primary hover:bg-interactive-hover"," disabled:cursor-not-allowed disabled:opacity-40 ").concat(c)},s)}function F6(e){switch(e.config.type){case"color":return C(wu,U(U({},e),{},{allowTransparent:!1}));case"colorWithTransparent":return C(wu,U(U({},e),{},{allowTransparent:!0}));case"opacity":return C(j6,U({},e));case"slider":return C(B6,U({},e));case"strokeStyle":return C(H6,U({},e));case"lineEndings":return C(U6,U({},e));case"fontFamily":return C(W6,U({},e));case"fontSize":return C(G6,U({},e));case"fontColor":return C(q6,U({},e));case"textAlign":return C(V6,U({},e));case"verticalAlign":return C(K6,U({},e));case"blendMode":return C(X6,U({},e));case"text":return C(Y6,U({},e));case"rotation":return C(Q6,U({},e));default:return null}}function wu(e){var t=e.config,n=e.value,o=e.onChange,i=e.colorPresets,r=e.translate,a=e.allowTransparent,s=X($(n??"#000000"),2),l=s[0],c=s[1];H(function(){return c(n??"#000000")},[n]);var d=function(u){c(u),o(u)};return C(Gt,{children:[C(Nt,{className:"mb-3",children:r(t.labelKey)}),C("div",{class:"grid grid-cols-6 gap-x-1 gap-y-4",children:[i.map(function(u){return C(Cs,{color:u,active:u.toLowerCase()===l?.toLowerCase(),onSelect:d},u)}),a&&C(Cs,{color:"transparent",active:l==="transparent",onSelect:d})]})]})}function j6(e){var t,n,o,i=e.config,r=e.value,a=e.onChange,s=e.translate,l=X($(r??1),2),c=l[0],d=l[1];H(function(){return d(r??1)},[r]);var u=Hi(c,300);return H(function(){u!==r&&a(u)},[u]),C(Gt,{children:[C(Nt,{children:s(i.labelKey)}),C(E0,{value:c,min:(t=i.min)!==null&&t!==void 0?t:.1,max:(n=i.max)!==null&&n!==void 0?n:1,step:(o=i.step)!==null&&o!==void 0?o:.05,onChange:d}),C(R0,{children:[Math.round(100*c),"%"]})]})}function B6(e){var t,n,o,i,r,a=e.config,s=e.value,l=e.onChange,c=e.translate,d=X($((t=s??a.min)!==null&&t!==void 0?t:1),2),u=d[0],m=d[1];H(function(){var p;return m((p=s??a.min)!==null&&p!==void 0?p:1)},[s]);var g=Hi(u,300);return H(function(){g!==s&&l(g)},[g]),C(Gt,{children:[C(Nt,{children:c(a.labelKey)}),C(E0,{value:u,min:(n=a.min)!==null&&n!==void 0?n:1,max:(o=a.max)!==null&&o!==void 0?o:30,step:(i=a.step)!==null&&i!==void 0?i:1,onChange:m}),C(R0,{children:[u,(r=a.unit)!==null&&r!==void 0?r:""]})]})}function H6(e){var t=e.config,n=e.value,o=e.onChange,i=e.translate,r=X($(yo(n)==="object"&&n!==null?n:{id:n??Te.SOLID}),2),a=r[0],s=r[1];return H(function(){var l=yo(n)==="object"&&n!==null?n:{id:n??Te.SOLID};s(l)},[n]),C(Gt,{children:[C(Nt,{className:"mb-3",children:i(t.labelKey)}),C(_6,{value:a,onChange:function(l){var c;s(l),o({strokeStyle:l.id,strokeDashArray:l.dash,cloudyBorderIntensity:(c=l.cloudyIntensity)!==null&&c!==void 0?c:0})},showCloudy:t.showCloudy})]})}function U6(e){e.config;
2209var t=e.value,n=e.onChange,o=e.translate,i=t??{start:Ie.None,end:Ie.None},r=X($(i.start),2),a=r[0],s=r[1],l=X($(i.end),2),c=l[0],d=l[1];return H(function(){s(i.start),d(i.end)},[t]),C(Gt,{children:C("div",{class:"grid grid-cols-2 gap-4",children:[C("div",{children:[C(Nt,{className:"mb-3",children:o("annotation.lineStart")}),C(bu,{value:a,onChange:function(u){s(u),n({start:u,end:c})},position:"start"})]}),C("div",{children:[C(Nt,{className:"mb-3",children:o("annotation.lineEnd")}),C(bu,{value:c,onChange:function(u){d(u),n({start:a,end:u})},position:"end"})]})]})})}function W6(e){var t=e.config,n=e.value,o=e.onChange,i=e.translate,r=n??Ge.Helvetica,a=Kl(r),s=ii(r),l=ri(r),c=X($(a),2),d=c[0],u=c[1],m=X($(s),2),g=m[0],p=m[1],f=X($(l),2),v=f[0],y=f[1];H(function(){var w=n??Ge.Helvetica;u(Kl(w)),p(ii(w)),y(ri(w))},[n]);var b=function(w,x,k){var I=ro(w,{bold:x,italic:k});o(I)};return C(Gt,{children:[C(Nt,{children:i(t.labelKey)}),C("div",{class:"mb-3",children:C(O6,{value:d,onChange:function(w){var x=ii(ro(w,{bold:!0,italic:!1})),k=ri(ro(w,{bold:!1,italic:!0})),I=!!x&&g,S=!!k&&v;u(w),p(I),y(S),b(w,I,S)}})}),C("div",{class:"flex gap-2",children:[C(Zn,{title:"Bold",active:g,disabled:!ii(ro(d,{bold:!0,italic:!1})),onClick:function(){if(ii(ro(d,{bold:!0,italic:!1}))){var w=!g;p(w),b(d,w,v)}},className:"font-bold",children:C(Se,{icon:"bold",size:18})}),C(Zn,{title:"Italic",active:v,disabled:!ri(ro(d,{bold:!1,italic:!0})),onClick:function(){if(ri(ro(d,{bold:!1,italic:!0}))){var w=!v;y(w),b(d,g,w)}},className:"italic",children:C(Se,{icon:"italic",size:18})})]})]})}function G6(e){var t=e.config,n=e.value,o=e.onChange,i=e.translate,r=X($(n??12),2),a=r[0],s=r[1];return H(function(){return s(n??12)},[n]),C(Gt,{children:[C(Nt,{children:i(t.labelKey)}),C($6,{value:a,onChange:function(l){!Number.isFinite(l)||l<=0||(s(l),o(l))}})]})}function q6(e){var t=e.config,n=e.value,o=e.onChange,i=e.colorPresets,r=e.translate,a=X($(n??"#000000"),2),s=a[0],l=a[1];H(function(){return l(n??"#000000")},[n]);var c=function(d){l(d),o(d)};return C(Gt,{children:[C(Nt,{className:"mb-3",children:r(t.labelKey)}),C("div",{class:"grid grid-cols-6 gap-x-1 gap-y-4",children:i.map(function(d){return C(Cs,{color:d,active:d.toLowerCase()===s?.toLowerCase(),onSelect:c},d)})})]})}function V6(e){var t=e.config,n=e.value,o=e.onChange,i=e.translate,r=X($(n??ut.Left),2),a=r[0],s=r[1];H(function(){return s(n??ut.Left)},[n]);var l=function(c){s(c),o(c)};return C(Gt,{children:[C(Nt,{children:i(t.labelKey)}),C("div",{class:"flex gap-2",children:[C(Zn,{title:"Align left",active:a===ut.Left,onClick:function(){return l(ut.Left)},children:C(Se,{icon:"alignLeft",size:18})}),C(Zn,{title:"Align center",active:a===ut.Center,onClick:function(){return l(ut.Center)},children:C(Se,{icon:"alignCenter",size:18})}),C(Zn,{title:"Align right",active:a===ut.Right,onClick:function(){return l(ut.Right)},children:C(Se,{icon:"alignRight",size:18})})]})]})}function K6(e){var t=e.config,n=e.value,o=e.onChange,i=e.translate,r=X($(n??Bt.Top),2),a=r[0],s=r[1];H(function(){return s(n??Bt.Top)},[n]);var l=function(c){s(c),o(c)};return C(Gt,{children:[C(Nt,{children:i(t.labelKey)}),C("div",{class:"flex gap-2",children:[C(Zn,{title:"Align top",active:a===Bt.Top,onClick:function(){return l(Bt.Top)},children:C(Se,{icon:"alignTop",size:18})}),C(Zn,{title:"Align middle",active:a===Bt.Middle,onClick:function(){return l(Bt.Middle)},children:C(Se,{icon:"alignMiddle",size:18})}),C(Zn,{title:"Align bottom",active:a===Bt.Bottom,onClick:function(){return l(Bt.Bottom)},children:C(Se,{icon:"alignBottom",size:18})})]})]})}var Z6=(oe(oe(oe(oe(oe(oe(oe(oe(oe(oe(vu={},xe.Normal,"blendMode.normal"),xe.Multiply,"blendMode.multiply"),xe.Screen,"blendMode.screen"),xe.Overlay,"blendMode.overlay"),xe.Darken,"blendMode.darken"),xe.Lighten,"blendMode.lighten"),xe.ColorDodge,"blendMode.colorDodge"),xe.ColorBurn,"blendMode.colorBurn"),xe.HardLight,"blendMode.hardLight"),xe.SoftLight,"blendMode.softLight"),oe(oe(oe(oe(oe(oe(vu,xe.Difference,"blendMode.difference"),xe.Exclusion,"blendMode.exclusion"),xe.Hue,"blendMode.hue"),xe.Saturation,"blendMode.saturation"),xe.Color,"blendMode.color"),xe.Luminosity,"blendMode.luminosity"));function X6(e){var t=e.config,n=e.value,o=e.onChange,i=e.translate,r=X($(n??xe.Normal),2),a=r[0],s=r[1];return H(function(){return s(n??xe.Normal)},[n]),C(Gt,{children:[C(Nt,{children:i(t.labelKey)}),C("select",{class:"border-border-default bg-bg-input text-fg-primary w-full rounded border px-2 py-1 text-sm",value:a,onChange:function(l){var c=parseInt(l.target.value,10);s(c),o(c)},children:wy.map(function(l){return C("option",{value:l,children:i(Z6[l])},l)})})]})}function Y6(e){var t=e.config,n=e.value,o=e.onChange,i=e.translate,r=X($(n??""),2),a=r[0],s=r[1];H(function(){return s(n??"")},[n]);var l=Hi(a,300);return H(function(){l!==n&&o(l)},[l]),C(Gt,{children:[C(Nt,{children:i(t.labelKey)}),C("input",{type:"text",class:"border-border-default bg-bg-input text-fg-primary w-full rounded border px-2 py-1 text-sm",value:a,onInput:function(c){var d=c.target.value;s(d)},placeholder:t.placeholderKey?i(t.placeholderKey):void 0})]})}function Q6(e){var t=e.config,n=e.value,o=e.onChange,i=e.translate,r=X($(n??0),2),a=r[0],s=r[1];H(function(){return s(n??0)},[n]);var l=Hi(a,300);return H(function(){l!==(n??0)&&o(l)},[l]),C(Gt,{children:[C(Nt,{children:i(t.labelKey)}),C(N6,{value:a,onChange:s})]})}function J6(e){var t=e.documentId,n=e.annotations,o=e.activeTool,i=e.colorPresets,r=en().provides,a=qe(t).translate;if(!r)return null;var s=n.length>0,l=s?n.map(function(p){var f;return(f=r.findToolForAnnotation(p.object))===null||f===void 0?void 0:f.id}).filter(function(p){return p!==void 0}):o?[o.id]:[];if(l.length===0)return null;var c=(function(p){var f;if(p.length===0)return[];for(var v=zi(new Set(p)),y=v.map(function(S){var A;return new Set((A=xs[S])!==null&&A!==void 0?A:[])}),b=y[0],w=1;w<y.length;w++){var x,k=Yt(b);try{for(k.s();!(x=k.n()).done;){var I=x.value;y[w].has(I)||b.delete(I)}}catch(S){k.e(S)}finally{k.f()}}return((f=xs[v[0]])!==null&&f!==void 0?f:[]).filter(function(S){return b.has(S)})})(l),d=s?c:c.filter(function(p){var f;return!((f=ur[p])!==null&&f!==void 0&&f.editOnly)});if(d.length===0)return null;var u=s?n[0].object:o?.defaults,m=function(p){r&&(s?r.updateAnnotations(n.map(function(f){return{pageIndex:f.object.pageIndex,id:f.object.id,patch:p}})):o&&r.setToolDefaults(o.id,p))},g=function(p){if(u){var f=ur[p];if(f){if(f.type==="strokeStyle"){var v=u;return U({id:v.strokeStyle,dash:v.strokeDashArray},f.showCloudy&&{cloudyIntensity:v.cloudyBorderIntensity})}return u[f.key]}}};return h(fe,null,d.map(function(p){var f=ur[p];return f?h(F6,{key:p,config:f,value:g(p),onChange:function(v){return(function(y,b){var w=ur[y];if(w)if(w.type!=="strokeStyle"||yo(b)!=="object")w.type!=="lineEndings"?m(oe({},w.key,b)):m({lineEndings:b});else{var x,k={strokeStyle:b.strokeStyle,strokeDashArray:b.strokeDashArray};w.showCloudy&&(k.cloudyBorderIntensity=(x=b.cloudyBorderIntensity)!==null&&x!==void 0?x:0),m(k)}})(p,v)},colorPresets:i,translate:a}):null}))}function ew(e){var t,n,o,i,r,a=e.documentId,s=en().provides,l=ll(a),c=l.provides,d=l.state,u=qe(a).translate;if(!s||!c)return null;var m=(t=s?.getColorPresets())!==null&&t!==void 0?t:[],g=Ci(d),p=c.getActiveTool(),f=g.length>0,v=g.length>1,y=f?c.findToolForAnnotation(g[0].object):p,b=u((n=y?.labelKey)!==null&&n!==void 0?n:"",{fallback:(o=y?.name)!==null&&o!==void 0?o:""}),w="";v?w=u("annotation.multiSelect",{params:{count:String(g.length)}}):f&&y?w=u("annotation.styles",{params:{type:b}}):p&&(w=u("annotation.defaults",{params:{type:b}}));var x=y?.id;return x!==void 0&&((i=(r=xs[x])===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0||f||p?C("div",{class:"h-full overflow-y-auto p-4",children:[w&&C("h2",{class:"text-md mb-4 font-medium",children:w}),C(J6,{documentId:a,annotations:g,activeTool:p,colorPresets:m})]}):C(z6,{documentId:a})}var tw=function(e){var t=e.item,n=e.pageNumber,o=e.isSelected,i=e.onSelect,r=t.kind==="text"?f0:v0;return h("div",{onClick:i,class:"border-border-subtle hover:bg-interactive-hover flex cursor-pointer items-start gap-3 rounded-lg border p-3 transition-colors ".concat(o?"bg-interactive-selected ring-accent ring-1":"")},h("div",{class:"flex-shrink-0"},h(r,{size:20,primaryColor:t.markColor,secondaryColor:t.redactionColor})),h("div",{class:"min-w-0 flex-1"},h("div",{class:"text-fg-muted text-xs"},"Page ",n),h("div",{class:"text-fg-primary text-sm font-medium"},t.kind==="text"?"Text Redaction":"Area Redaction"),t.kind==="text"&&t.text&&h("div",{class:"text-fg-muted mt-1 truncate text-xs italic"},'"',t.text,'"')))},nw=function(e){var t=e.documentId,n=qe(t).translate;return h("div",{class:"text-fg-muted flex flex-col items-center gap-2 p-4"},h(Se,{icon:"redact",className:"h-18 w-18 text-fg-muted"}),h("div",{className:"text-fg-muted max-w-[150px] text-center text-sm"},n("redaction.emptyState",{fallback:"No pending redactions"}
2209)))};function ow(e){var t=e.documentId,n=(u=>{const{provides:m}=B1(),[g,p]=$(vr),f=ee(()=>m?m.forDocument(u):null,[m,u]);return H(()=>{if(f){try{p(f.getState())}catch{p(vr)}return f.onStateChange(v=>{p(v)})}p(vr)},[f]),{state:g,provides:f}})(t),o=n.state,i=n.provides,r=Qr(t),a=r.canModifyAnnotations,s=r.canModifyContents,l=Mo().provides,c=qe(t).translate,d=Object.entries(o.pending).flatMap(function(u){var m=X(u,2),g=m[0];return m[1].map(function(p){return{item:p,pageNumber:Number(g)+1}})}).sort(function(u,m){return u.pageNumber-m.pageNumber});return h("div",{class:"flex h-full flex-col"},h("div",{class:"border-border-subtle border-b p-3"},h("h2",{class:"text-fg-primary text-md font-semibold"},c("redaction.panel.title",{fallback:"Redactions"})),d.length>0&&h("p",{class:"text-fg-muted text-sm"},d.length===1?c("redaction.panel.itemCount",{fallback:"1 pending redaction",params:{count:1}}):c("redaction.panel.itemCountPlural",{fallback:"".concat(d.length," pending redactions"),params:{count:d.length}}))),h("div",{class:"flex-1 overflow-y-auto p-3"},d.length===0?h(nw,{documentId:t}):h("div",{class:"space-y-2"},d.map(function(u){var m,g=u.item,p=u.pageNumber;return h(tw,{key:g.id,item:g,pageNumber:p,onSelect:function(){return(function(f){i?.selectPending(f.page,f.id),l?.scrollToPage({pageNumber:f.page+1,pageCoordinates:{x:f.rect.origin.x,y:f.rect.origin.y},alignX:50,alignY:25,behavior:"smooth"})})(g)},isSelected:((m=o.selected)===null||m===void 0?void 0:m.id)===g.id})}))),d.length>0&&h("div",{class:"border-border-subtle flex gap-2 border-t p-3"},h(ht,{onClick:function(){i?.clearPending()},disabled:!a,className:"border-border-default bg-bg-surface text-fg-secondary hover:bg-interactive-hover flex-1 rounded-md border px-4 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-50"},c("redaction.panel.clearAll",{fallback:"Clear All"})),h(ht,{onClick:function(){i?.commitAllPending()},disabled:!s,className:"bg-accent text-fg-on-accent hover:!bg-accent-hover flex-1 rounded-md border border-transparent px-4 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-50"},c("redaction.panel.redactAll",{fallback:"Redact All"}))))}var iw=oe(oe(oe(oe(oe({},ye.TEXTFIELD,"form.textfield"),ye.CHECKBOX,"form.checkbox"),ye.RADIOBUTTON,"form.radiobutton"),ye.COMBOBOX,"form.combobox"),ye.LISTBOX,"form.listbox"),rw=oe(oe(oe(oe(oe({},ye.TEXTFIELD,"Text Field"),ye.CHECKBOX,"Checkbox"),ye.RADIOBUTTON,"Radio Button"),ye.COMBOBOX,"Dropdown"),ye.LISTBOX,"List Box"),go="border-border-default bg-bg-input text-fg-primary w-full rounded border px-2 py-1.5 text-sm",aw=function(e){var t,n,o=e.documentId,i=ll(o),r=i.provides,a=i.state,s=la().provides,l=qe(o).translate,c=X($(null),2),d=c[0],u=c[1];if(!r||!s)return null;var m=Ci(a);if(m.length!==1)return null;var g=m[0].object;if(g.type!==z.WIDGET)return null;var p=g,f=l((t=iw[p.field.type])!==null&&t!==void 0?t:"",{fallback:(n=rw[p.field.type])!==null&&n!==void 0?n:"Widget"}),v=l("annotation.styles",{params:{type:f}}),y=Y(function(x){r.updateAnnotations([{pageIndex:p.pageIndex,id:p.id,patch:x}])},[r,p.pageIndex,p.id]),b=Y(function(x){y({field:U(U({},p.field),x)})},[y,p.field]),w=Y(function(x,k){s.renameField(p.id,x,o).wait(function(I){var S,A;u(null),I.outcome==="conflict"&&((S=(A=globalThis.confirm)===null||A===void 0?void 0:A.call(globalThis,"Share this ".concat(f,' with the existing field "').concat(I.fieldName,'"?')))!==null&&S!==void 0&&S?s.shareField(p.id,I.targetAnnotationId,o).wait(function(){return u(null)},function(M){u(M.reason.message),k.value=p.field.name}):k.value=p.field.name)},function(I){u(I.reason.message),k.value=p.field.name})},[o,f,s,p.field.name,p.id]);return C("div",{class:"h-full overflow-y-auto p-4",children:[C("h2",{class:"text-fg-secondary text-md mb-4 font-medium",children:v}),p.field.type===ye.TEXTFIELD&&C(sw,{field:p.field,updateField:b,renameField:w,fieldNameError:d,translate:l}),p.field.type===ye.RADIOBUTTON&&C(cw,{field:p.field,updateField:b,renameField:w,fieldNameError:d,translate:l}),p.field.type===ye.CHECKBOX&&C(lw,{field:p.field,updateField:b,renameField:w,fieldNameError:d,translate:l}),(p.field.type===ye.COMBOBOX||p.field.type===ye.LISTBOX)&&C(dw,{field:p.field,updateField:b,renameField:w,fieldNameError:d,translate:l})]})};function ua(e,t){return Y(function(n,o){var i,r=(i=e.flag)!==null&&i!==void 0?i:be.NONE;t({flag:o?r|n:r&~n})},[e.flag,t])}function sw(e){var t,n,o=e.field,i=e.updateField,r=e.renameField,a=e.fieldNameError,s=e.translate,l=ua(o,i),c=(t=o.maxLen)!==null&&t!==void 0?t:0,d=!!(o.flag&be.TEXT_COMB);return C("div",{class:"space-y-4",children:[C("div",{children:[C("label",{class:"text-fg-secondary mb-1 block text-xs font-medium",children:[s("form.fieldName",{fallback:"Field Name"}),"*:"]}),C("input",{type:"text",class:go,value:o.name,onBlur:function(u){return r(u.target.value,u.target)},onKeyDown:function(u){u.key==="Enter"&&u.target.blur()}}),a&&C("p",{class:"mt-1 text-xs text-red-600",children:a})]}),C("div",{children:[C("label",{class:"text-fg-secondary mb-1 block text-xs font-medium",children:[s("form.defaultValue",{fallback:"Default Value"}),":"]}),C("input",{type:"text",class:go,value:(n=o.value)!==null&&n!==void 0?n:"",maxLength:c>0?c:void 0,onBlur:function(u){return i({value:u.target.value})},onKeyDown:function(u){u.key==="Enter"&&u.target.blur()}})]}),C("div",{children:[C("label",{class:"text-fg-secondary mb-1 block text-xs font-medium",children:[s("form.maxLength",{fallback:"Max Length"}),":"]}),C("input",{type:"number",min:"0",class:go,value:c||"",placeholder:"0 (unlimited)",onBlur:function(u){var m=parseInt(u.target.value,10),g=isNaN(m)||m<=0?void 0:m;i({maxLen:g}),!g&&d&&l(be.TEXT_COMB,!1)},onKeyDown:function(u){u.key==="Enter"&&u.target.blur()}})]}),C("hr",{class:"border-border-default"}),C("div",{children:[C("h3",{class:"text-fg-primary mb-3 text-sm font-medium",children:s("form.properties",{fallback:"Properties"})}),C("div",{class:"flex flex-col gap-3",children:[C(Wt,{label:s("form.readOnly",{fallback:"Read Only"}),checked:!!(o.flag&be.READONLY),onChange:function(u){return l(be.READONLY,u)}}),C(Wt,{label:s("form.required",{fallback:"Required"}),checked:!!(o.flag&be.REQUIRED),onChange:function(u){return l(be.REQUIRED,u)}}),C(Wt,{label:s("form.multiline",{fallback:"Multiline"}),checked:!!(o.flag&be.TEXT_MULTIPLINE),onChange:function(u){return l(be.TEXT_MULTIPLINE,u)}}),C(Wt,{label:s("form.comb",{fallback:"Comb"}),checked:d,disabled:c<=0,onChange:function(u){return l(be.TEXT_COMB,u)}})]})]})]})}function lw(e){var t=e.field,n=e.updateField,o=e.renameField,i=e.fieldNameError,r=e.translate,a=ua(t,n);return C("div",{class:"space-y-4",children:[C("div",{children:[C("label",{class:"text-fg-secondary mb-1 block text-xs font-medium",children:[r("form.fieldName",{fallback:"Field Name"}),"*:"]}),C("input",{type:"text",class:go,value:t.name,onBlur:function(s){return o(s.target.value,s.target)},onKeyDown:function(s){s.key==="Enter"&&s.target.blur()}}),i&&C("p",{class:"mt-1 text-xs text-red-600",children:i})]}),C("hr",{class:"border-border-default"}),C("div",{children:[C("h3",{class:"text-fg-primary mb-3 text-sm font-medium",children:r("form.properties",{fallback:"Properties"})}),C("div",{class:"flex flex-col gap-3",children:[C(Wt,{label:r("form.readOnly",{fallback:"Read Only"}),checked:!!(t.flag&be.READONLY),onChange:function(s){return a(be.READONLY,s)}}),C(Wt,{label:r("form.required",{fallback:"Required"}),checked:!!(t.flag&be.REQUIRED),onChange:function(s){return a(be.REQUIRED,s)}})]})]})]})}function cw(e){var t=e.field,n=e.updateField,o=e.renameField,i=e.fieldNameError,r=e.translate,a=ua(t,n);return C("div",{class:"space-y-4",children:[C("div",{children:[C("label",{class:"text-fg-secondary mb-1 block text-xs font-medium",children:[r("form.fieldName",{fallback:"Field Name"}),"*:"]}),C("input",{type:"text",class:go,value:t.name,onBlur:function(s){return o(s.target.value,s.target)},onKeyDown:function(s){s.key==="Enter"&&s.target.blur()}}),i&&C("p",{class:"mt-1 text-xs text-red-600",children:i})]}),C("hr",{class:"border-border-default"}),C("div",{children:[C("h3",{class:"text-fg-primary mb-3 text-sm font-medium",children:r("form.properties",{fallback:"Properties"})}),C("div",{class:"flex flex-col gap-3",children:[C(Wt,{label:r("form.readOnly",{fallback:"Read Only"}),checked:!!(t.flag&be.READONLY),onChange:function(s){return a(be.READONLY,s)}}),C(Wt,{label:r("form.required",{fallback:"Required"}),checked:!!(t.flag&be.REQUIRED),onChange:function(s){return a(be.REQUIRED,s)}})]})]})]})}function dw(e){var t=e.field,n=e.updateField,o=e.renameField,i=e.fieldNameError,r=e.translate,a=ua(t,n),s=t.type===ye.COMBOBOX||t.type===ye.LISTBOX?t.options:[],l=Y(function(c){n({options:c})},[n]);return C("div",{class:"space-y-4",children:[C("div",{children:[C("label",{class:"text-fg-secondary mb-1 block text-xs font-medium",children:[r("form.fieldName",{fallback:"Field Name"}),"*:"]}),C("input",{type:"text",class:go,value:t.name,onBlur:function(c){return o(c.target.value,c.target)},onKeyDown:function(c){c.key==="Enter"&&c.target.blur()}}),i&&C("p",{class:"mt-1 text-xs text-red-600",children:i})]}),C("hr",{class:"border-border-default"}),C("div",{children:[C("h3",{class:"text-fg-primary mb-3 text-sm font-medium",children:r("form.options",{fallback:"Options"})}),C("div",{class:"flex flex-col gap-2",children:[s.map(function(c,d){return C("div",{class:"flex items-center gap-2",children:[C("input",{type:"text",class:go+" flex-1",value:c.label,onBlur:function(u){var m=u.target.value;if(m!==c.label){var g=s.map(function(p,f){return f===d?U(U({},p),{},{label:m}):p});l(g)}},onKeyDown:function(u){u.key==="Enter"&&u.target.blur()}}),C("button",{type:"button",class:"text-fg-secondary hover:text-fg-primary shrink-0 text-sm",onClick:function(){var u=s.filter(function(m,g){return g!==d});l(u)},title:r("form.removeOption",{fallback:"Remove"}),children:"â"})]},d)}),C("button",{type:"button",class:"text-accent-primary hover:text-accent-primary-hover mt-1 text-left text-sm",onClick:function(){l([].concat(zi(s),[{label:"Option ".concat(s.length+1),isSelected:!1}]))},children:["+ ",r("form.addOption",{fallback:"Add Option"})]})]})]}),C("hr",{class:"border-border-default"}),C("div",{children:[C("h3",{class:"text-fg-primary mb-3 text-sm font-medium",children:r("form.properties",{fallback:"Properties"})}),C("div",{class:"flex flex-col gap-3",children:[C(Wt,{label:r("form.readOnly",{fallback:"Read Only"}),checked:!!(t.flag&be.READONLY),onChange:function(c){return a(be.READONLY,c)}}),C(Wt,{label:r("form.required",{fallback:"Required"}),checked:!!(t.flag&be.REQUIRED),onChange:function(c){return a(be.REQUIRED,c)}}),t.type===ye.LISTBOX&&C(Wt,{label:r("form.multiSelect",{fallback:"Multi Select"}),checked:!!(t.flag&be.CHOICE_MULTL_SELECT),onChange:function(c){return a(be.CHOICE_MULTL_SELECT,c)}})]})]})]})}function uw(e){var t=e.documentId,n=e.selectedLibraryId,o=qe(t).translate,i=pi().provides,r=(()=>{const{provides:p}=pi(),[f,v]=$(p?.getLibraries()??[]);return H(()=>
2209{if(p)return v(p.getLibraries()),p.onLibraryChange(y=>{v(y)})},[p]),{libraries:f,provides:p}})(),a=r.libraries,s=X($("all"),2),l=s[0],c=s[1],d=((p,f)=>{const{provides:v}=pi(),[y,b]=$([]);return H(()=>{if(!v)return;const w=()=>{var x,k;const I=v.getLibraries(),S=[];for(const A of I)if(!p||p==="all"||A.id===p)for(const M of A.stamps){{const P=((x=A.categories)==null?void 0:x.includes(f))??!1,T=((k=M.categories)==null?void 0:k.includes(f))??!1;if(!P&&!T)continue}S.push({library:A,stamp:M})}b(S)};return w(),v.onLibraryChange(w)},[v,p,f]),y})(l,"sidebar"),u=(p=>{const{provides:f}=pi(),[v,y]=$(null);return H(()=>{if(!f)return;const b=f.forDocument(p);return y(b.getActiveStamp()),b.onActiveStampChange(y)},[f,p]),v})(t);H(function(){n&&c(n)},[n]);var m=Y(function(p,f){i&&i.forDocument(t).activateStampPlacement(p,f)},[i,t]),g=Y(function(p,f,v){p.stopPropagation(),i&&i.removeStampFromLibrary(f,v).wait(function(){},vt)},[i]);return Y(function(){if(i){var p,f=zi(new Set(d.map(function(b){return b.library.id}))),v=Yt(f);try{for(v.s();!(p=v.n()).done;){var y=p.value;i.exportLibrary(y).wait(function(b){var w=new Blob([b.pdf],{type:"application/pdf"}),x=URL.createObjectURL(w),k=document.createElement("a");k.href=x,k.download="".concat(b.name,".pdf"),k.click(),URL.revokeObjectURL(x)},vt)}}catch(b){v.e(b)}finally{v.f()}}},[i,d]),h("div",{class:"flex h-full flex-col"},h("div",{class:"border-border-subtle border-b p-4"},h("div",{class:"flex items-center justify-between"},h("h2",{class:"text-fg-primary text-md font-medium"},o("stamp.title",{fallback:"Rubber Stamps"}))),a.length>1&&h("select",{class:"border-border-default bg-bg-input focus:border-accent focus:ring-accent text-fg-primary mt-4 w-full rounded-md border px-3 py-1.5 text-sm focus:outline-none focus:ring-1",value:l,onChange:function(p){return c(p.target.value)}},h("option",{value:"all"},o("stamp.allStamps",{fallback:"All Stamps"})),a.map(function(p){return h("option",{key:p.id,value:p.id},(function(f){var v;return o((v=f.nameKey)!==null&&v!==void 0?v:"",{fallback:f.name})})(p))}))),d.length>0?h("div",{class:"flex-1 overflow-y-auto p-4"},h("div",{class:"grid grid-cols-2 gap-3"},d.map(function(p){var f=p.library,v=p.stamp,y=u?.libraryId===f.id&&u?.stamp.id===v.id;return h("div",{key:"".concat(f.id,"-").concat(v.id),class:"group relative flex cursor-pointer items-center justify-center overflow-hidden rounded-md border transition-colors ".concat(y?"border-accent bg-accent-light ring-accent ring-2":"border-border-subtle bg-bg-surface hover:bg-interactive-hover hover:border-border-default"),style:{aspectRatio:"1"},onClick:function(){return m(f.id,v)}},h(j5,{libraryId:f.id,pageIndex:v.pageIndex,width:120,style:{maxWidth:"80%",maxHeight:"80%",objectFit:"contain"}}),!f.readonly&&h("button",{class:"bg-bg-surface border-border-default text-fg-muted hover:text-fg-primary absolute right-1 top-1 flex rounded-full border p-0.5 opacity-0 shadow-sm transition-opacity group-hover:opacity-100",onClick:function(b){return g(b,f.id,v.id)}},h(Se,{icon:"x",className:"h-3 w-3"})))}))):h("div",{class:"text-fg-muted mt-8 flex flex-col items-center gap-2 p-4"},h(Se,{icon:"rubberStamp",className:"h-18 w-18 text-fg-muted"}),h("div",{class:"text-fg-muted max-w-[150px] text-center text-sm"},o("stamp.emptyState",{fallback:"No stamps found in the selected library."}))))}function hw(e){var t=e.documentId,n=qe(t).translate;return h("div",{class:"flex h-full flex-col"},h("div",{class:"border-border-subtle border-b p-3"},h("h2",{class:"text-fg-primary text-md font-semibold"},n("insert.signature",{fallback:"Signatures"})),h("p",{class:"text-fg-muted mt-1 text-sm"},n("insert.signature.placeholder",{fallback:"Signature options will appear here."}))),h("div",{class:"flex flex-1 items-center justify-center p-4"},h("div",{class:"flex max-w-[180px] flex-col items-center gap-3 text-center"},h(Se,{icon:"signature",className:"text-fg-muted h-12 w-12"}),h("div",{class:"text-fg-secondary text-sm"},n("insert.signature.emptyState",{fallback:"Choose a signature option from this panel once the insert workflow is connected."})))))}function mw(e){var t=e.schema,n=e.documentId,o=e.props,i=o.menuWrapperProps,r=o.rect,a=o.placement,s={position:"absolute",pointerEvents:"auto",cursor:"default",left:"50%",transform:"translateX(-50%)"};return a!=null&&a.suggestTop?s.top=-50:s.top=r.size.height+8,h("div",U(U({},i),yt(t)),h("div",{style:s,className:"border-border-subtle bg-bg-elevated rounded-lg border shadow-lg"},h("div",{className:"flex items-center gap-1 p-1"},t.items.map(function(l){return h(_0,{key:l.id,item:l,documentId:n,props:o})}))))}function pw(e){var t=e.item,n=e.documentId,o=nn(t.commandId,n);return o!=null&&o.visible?h("div",U({},yt(t)),h(po,{commandId:t.commandId,documentId:n,variant:t.variant})):null}function _0(e){var t,n=e.item,o=e.documentId,i=e.props;switch(n.type){case"command-button":return h(pw,{item:n,documentId:o});case"divider":return h("div",U({},yt(n)),h("div",{className:"bg-border-default h-6 w-px","aria-hidden":"true"}));case"group":return h("div",U({className:"flex items-center gap-".concat((t=n.gap)!==null&&t!==void 0?t:1)},yt(n)),n.items.map(function(r){return h(_0,{key:r.id,item:r,documentId:o,props:i})}));default:return null}}function gw(e){var t,n,o=e.schema,i=e.documentId,r=e.className,a=o.content,s=o.position,l=ea().renderCustomComponent,c=(t=s.anch
2209or,(n={"top-left":"top-0 left-0","top-center":"top-0 left-1/2 -translate-x-1/2","top-right":"top-0 right-0","center-left":"top-1/2 left-0 -translate-y-1/2",center:"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2","center-right":"top-1/2 right-0 -translate-y-1/2","bottom-left":"bottom-0 left-0","bottom-center":"bottom-0 left-1/2 -translate-x-1/2","bottom-right":"bottom-0 right-0"})[t]||n["bottom-center"]),d=(function(u){if(u){var m={};return u.top&&(m.top=u.top),u.right&&(m.right=u.right),u.bottom&&(m.bottom=u.bottom),u.left&&(m.left=u.left),Object.keys(m).length>0?m:void 0}})(s.offset);return h("div",{className:"z-3 absolute ".concat(c," ").concat(r||""),style:d,"data-overlay-id":o.id},l(a.componentId,i))}function Ui(e){var t=e.open,n=e.title,o=e.children,i=e.onClose,r=e.onExited,a=e.className,s=e.showCloseButton,l=s===void 0||s,c=Q(null),d=X($(t),2),u=d[0],m=d[1],g=X($(!1),2),p=g[0],f=g[1];return H(function(){if(t)m(!0),requestAnimationFrame(function(){f(!0)});else if(u){f(!1);var v=setTimeout(function(){m(!1),r?.()},200);return function(){return clearTimeout(v)}}},[t,u,r]),H(function(){if(t){var v=function(y){y.key==="Escape"&&i?.()};return document.addEventListener("keydown",v),function(){return document.removeEventListener("keydown",v)}}},[t,i]),H(function(){return document.body.style.overflow=u?"hidden":"",function(){document.body.style.overflow=""}},[u]),u?C("div",{ref:c,className:"fixed inset-0 z-50 transition-opacity duration-200 md:flex md:items-center md:justify-center ".concat(p&&t?"bg-bg-overlay":"bg-transparent"),onClick:function(v){v.target===c.current&&i?.()},children:C("div",{className:Fi("bg-bg-surface md:border-border-subtle relative flex h-full w-full flex-col transition-all duration-200 md:h-auto md:w-[28rem] md:max-w-[90vw] md:rounded-lg md:border md:shadow-lg",p&&t?"scale-100 opacity-100":"scale-95 opacity-0",a),onClick:function(v){return v.stopPropagation()},children:[(n||l)&&C("div",{className:"border-border-subtle flex flex-shrink-0 items-center justify-between border-b px-6 py-4",children:[n&&C("h2",{className:"text-fg-primary text-lg font-semibold",children:n}),l&&C(ht,{onClick:i,className:"hover:bg-interactive-hover p-1",children:C(Se,{icon:"x",className:"h-5 w-5"})})]}),C("div",{className:"flex-1 overflow-y-auto px-6 py-4 md:max-h-[80vh] md:flex-none",children:o})]})}):null}function fw(e){var t=e.documentId,n=e.isOpen,o=e.onClose,i=e.onExited,r=Mo().provides,a=i1().provides,s=qe(t).translate,l=X($("all"),2),c=l[0],d=l[1],u=X($(""),2),m=u[0],g=u[1],p=X($(!0),2),f=p[0],v=p[1],y=X($(!1),2),b=y[0],w=y[1],x=X($(""),2),k=x[0],I=x[1],S=r?.forDocument(t).getMetrics(),A=S?.currentPage||1,M=r?.forDocument(t).getTotalPages()||0;H(function(){n&&(d("all"),g(""),v(!0),w(!1),I(""))},[n]);var P=(c!=="custom"||m.trim().length>0)&&!b;return h(Ui,{open:n!=null&&n,title:s("print.title"),onClose:o,onExited:i,className:"md:w-[32rem]"},h("div",{className:"space-y-6"},h("div",null,h("label",{className:"text-fg-secondary mb-3 block text-sm font-medium"},s("print.pages")),h("div",{className:"space-y-2"},h("label",{className:"flex items-center"},h("input",{type:"radio",name:"pageRange",value:"all",checked:c==="all",onChange:function(){return d("all")},disabled:b,className:"accent-accent mr-2"}),h("span",{className:"text-fg-primary text-sm"},s("print.all"))),h("label",{className:"flex items-center"},h("input",{type:"radio",name:"pageRange",value:"current",checked:c==="current",onChange:function(){return d("current")},disabled:b,className:"accent-accent mr-2"}),h("span",{className:"text-fg-primary text-sm"},s("print.current",{params:{currentPage:A}}))),h("label",{className:"flex items-start"},h("input",{type:"radio",name:"pageRange",value:"custom",checked:c==="custom",onChange:function(){return d("custom")},disabled:b,className:"accent-accent mr-2 mt-0.5"}),h("div",{className:"flex-1"},h("span",{className:"text-fg-primary mb-1 block text-sm"},s("print.specify")),h("input",{type:"text",placeholder:s("print.specifyEG"),value:m,onInput:function(T){return g(T.target.value)},disabled:c!=="custom"||b,className:"w-full rounded-md border px-3 py-1 text-base ".concat(c!=="custom"||b?"bg-interactive-disabled text-fg-muted":"border-border-default bg-bg-input text-fg-primary focus:border-accent focus:ring-accent"," focus:outline-none focus:ring-1")}),c==="custom"&&m.trim()&&M>0&&h("p",{className:"text-fg-muted mt-1 text-xs"},s("print.current",{params:{totalPages:M}})))))),h("div",null,h("label",{className:"flex items-center"},h("input",{type:"checkbox",checked:f,onChange:function(T){return v(T.target.checked)},disabled:b,className:"accent-accent mr-2"}),h("span",{className:"text-fg-secondary text-sm font-medium"},s("print.annotation")))),b&&h("div",{className:"bg-state-info-light flex items-center space-x-3 rounded-md p-3"},h(Wo,{className:"text-accent"}),h("span",{className:"text-accent text-sm"},k)),h("div",{className:"border-border-subtle flex justify-end space-x-3 border-t pt-4"},h(ht,{onClick:o,disabled:b,className:"border-border-default bg-bg-surface text-fg-secondary hover:bg-interactive-hover rounded-md border px-4 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-50"},s("print.cancel")),h(ht,{onClick:function(){var T;c==="current"?T=String(A):c==="custom"&&(T=m.trim()||void 0);var D={includeAnnotations:f,pageRange:T};try{w(!0),I(s("print.loading"));var F=a?.forDocument(t).print(D);F&&(F.onProgress(function(N){I(N.message)}),F.wait(function(){w(!1),I(""),o?.()},function(N){console.error("Print failed:",N),w(!1),I("")}))}catch(N){console.error("Print failed:",N),w(!1),I("")}},disabled:!P,className:"bg-accent text-fg-on-accent hover:!bg-accent-hover flex items-center space-x-2 rounded-md border border-transparent px-4 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-50"},b&&h(Wo,{size:"sm"}),h("span",null,s(b?"print.printing":"print.print"))))))}function vw(e){var t,n=e.documentId,o=e.isOpen,i=e.onClose,r=e.onExited,a=e.source,s=Mo().provides,l=en().provides,c=ta().provides,d=qe(n).translate,u=X($("url"),2),m=u[0],g=u[1],p=X($(""),2),f=p[0],v=p[1],y=X($(1),2),b=y[0],w=y[1],x=s?.forDocument(n).getTotalPages()||1,k=l?.forDocument(n),I=c?.forDocument(n),S=k?.getSelectedAnnotation(),A=(t=I?.getFormattedSelection())!==null&&t!==void 0?t:[];H(function(){o&&(g("url"),v(""),w(1))},[o]);var M=m==="page"||f.trim().length>0;return h(Ui,{open:o!=null&&o,title:d("link.title")||"Insert Link or Page",onClose:i,onExited:r,className:"md:w-[28rem]"},h("form",{onSubmit:function(P){P.preventDefault(),(function(){var T;if(m==="url"){if(!f.trim())return;T={type:"action",action:{type:Kn.URI,uri:f.trim()}}}else T={type:"destination",destination:{pageIndex:b-1,zoom:{mode:Gr.FitPage},view:[]}};var D=function(){if(!S)return!1;var N,W="segmentRects"in S.object?S.object.segmentRects:[S.object.rect],_=Yt(W??[]);try{for(_.s();!(N=_.n()).done;){var G=N.value;k?.createAnnotation(S.object.pageIndex,{id:Ce(),type:z.LINK,pageIndex:S.object.pageIndex,rect:G,inReplyToId:S.object.id,replyType:ln.Group,target:T,strokeStyle:Te.UNDERLINE,strokeColor:"#0000FF",strokeWidth:2})}}catch(q){_.e(q)}finally{_.f()}return!0},F=function(){if(A.length===0)return!1;var N,W=I?.getSelectedText(),_=Yt(A);try{var G=function(){var q=N.value;W?.wait(function(O){var V,te=Ce();k?.createAnnotation(q.pageIndex,{id:te,created:new Date,flags:["print"],type:z.HIGHLIGHT,blendMode:xe.Multiply,pageIndex:q.pageIndex,rect:q.rect,segmentRects:q.segmentRects,strokeColor:"#FFFFFF",opacity:0,custom:{text:O.join(` 2210`)}});
2210var he,ne=Yt((V=q.segmentRects)!==null&&V!==void 0?V:[q.rect]);try{for(ne.s();!(he=ne.n()).done;){var K=he.value;k?.createAnnotation(q.pageIndex,{id:Ce(),type:z.LINK,pageIndex:q.pageIndex,rect:K,inReplyToId:te,replyType:ln.Group,target:T,strokeStyle:Te.UNDERLINE,strokeColor:"#0000FF",strokeWidth:2})}}catch(le){ne.e(le)}finally{ne.f()}k?.selectAnnotation(q.pageIndex,te)},vt)};for(_.s();!(N=_.n()).done;)G()}catch(q){_.e(q)}finally{_.f()}return I?.clear(),!0};a==="annotation"?D():a==="selection"?F():D()||F(),i?.()})()},className:"space-y-6"},h("div",{className:"border-border-subtle flex border-b"},h(ms,{active:m==="url",onClick:function(){return g("url")}},d("link.url")||"URL"),h(ms,{active:m==="page",onClick:function(){return g("page")}},d("link.page")||"Page")),h("div",{className:"bg-bg-muted rounded-lg"},m==="url"?h("div",null,h("label",{className:"text-fg-secondary mb-2 block text-sm font-medium"},d("link.enterUrl")||"Enter URL"),h("input",{type:"url",value:f,onInput:function(P){return v(P.target.value)},placeholder:"https://example.com",className:"border-border-default bg-bg-input text-fg-primary focus:border-accent focus:ring-accent w-full rounded-md border px-3 py-2 text-base focus:outline-none focus:ring-1",autoFocus:!0})):h("div",null,h("label",{className:"text-fg-secondary mb-2 block text-sm font-medium"},d("link.enterPage")||"Enter Page Number"),h("input",{type:"number",min:1,max:x,value:b,onInput:function(P){var T=parseInt(P.target.value,10);isNaN(T)||w(Math.max(1,Math.min(x,T)))},className:"border-border-default bg-bg-input text-fg-primary focus:border-accent focus:ring-accent w-full rounded-md border px-3 py-2 text-base focus:outline-none focus:ring-1",autoFocus:!0}),h("p",{className:"text-fg-muted mt-1 text-xs"},d("link.pageRange",{params:{totalPages:x}})||"Page 1 to ".concat(x)))),h("div",{className:"border-border-subtle flex justify-end space-x-3 border-t pt-4"},h(ht,{type:"button",onClick:i,className:"border-border-default bg-bg-surface text-fg-secondary hover:bg-interactive-hover rounded-md border px-4 py-2 text-sm"},d("common.cancel")||"Cancel"),h(ht,{type:"submit",disabled:!M,className:"bg-accent text-fg-on-accent hover:!bg-accent-hover rounded-md border border-transparent px-4 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-50"},d("link.link")||"Link"))))}function yw(e){var t=e.documentId,n=Qa().provides,o=Nh(t),i=o.provides,r=o.state,a=r.currentPage,s=r.totalPages,l=X($(!1),2),c=l[0],d=l[1],u=X($(!1),2),m=u[0],g=u[1],p=Q(null),f=X($(a.toString()),2),v=f[0],y=f[1],b=Q(null);H(function(){y(a.toString())},[a]);var w=Y(function(){p.current&&clearTimeout(p.current),p.current=setTimeout(function(){m||d(!1)},4e3)},[m]);return H(function(){if(n)return n.onScrollActivity(function(x){x.documentId===t&&(d(!0),w())})},[n,t,w]),H(function(){return function(){p.current&&clearTimeout(p.current)}},[]),s<=1?null:h("div",{onMouseEnter:function(){g(!0),d(!0),p.current&&clearTimeout(p.current)},onMouseLeave:function(){g(!1),w()},className:"pointer-events-auto"},h("div",{className:"border-border-default bg-bg-surface flex items-center gap-1 rounded-lg border p-1 shadow-lg transition-opacity duration-300 ".concat(c?"opacity-100":"opacity-0")},h(po,{commandId:"scroll:previous-page",documentId:t,variant:"icon"}),h("div",{className:"flex items-center gap-1 px-1"},h("input",{ref:b,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:v,onChange:function(x){var k=x.target.value.replace(/[^0-9]/g,"");y(k)},onFocus:function(){setTimeout(function(){var x;return(x=b.current)===null||x===void 0?void 0:x.select()},0)},onBlur:function(){var x,k=parseInt(v,10);!isNaN(k)&&k>=1&&k<=s?i==null||(x=i.scrollToPage)===null||x===void 0||x.call(i,{pageNumber:k}):y(a.toString())},onKeyDown:function(x){x.key==="Enter"?x.target.blur():x.key==="Escape"&&(y(a.toString()),x.target.blur())},className:"border-border-default bg-bg-input text-fg-primary focus:border-accent focus:ring-accent h-7 w-10 rounded border px-1 text-center text-base focus:outline-none focus:ring-1"}),h("span",{className:"text-fg-secondary text-sm"},"Â ",s)),h(po,{commandId:"scroll:next-page",documentId:t,variant:"icon"})))}var ke=function(e,t,n){return!(function(o,i,r){return Sr(o.core,i,r)})(e,t,n)},bw={"zoom:in":{id:"zoom:in",labelKey:"zoom.in",icon:"zoomIn",shortcuts:["Ctrl+=","Meta+=","Ctrl+NumpadAdd","Meta+NumpadAdd"],categories:["zoom","zoom-in"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("zoom"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).zoomIn()}},"zoom:out":{id:"zoom:out",labelKey:"zoom.out",icon:"zoomOut",shortcuts:["Ctrl+-","Meta+-","Ctrl+NumpadSubtract","Meta+NumpadSubtract"],categories:["zoom","zoom-out"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("zoom"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).zoomOut()}},"zoom:fit-page":{id:"zoom:fit-page",labelKey:"zoom.fitPage",icon:"fitToPage",shortcuts:["Ctrl+0","Meta+0"],categories:["zoom","zoom-fit-page"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("zoom"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).requestZoom(Mt.FitPage)},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins.zoom)===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.zoomLevel)===Mt.FitPage}},"zoom:fit-width":{id:"zoom:fit-width",labelKey:"zoom.fitWidth",icon:"fitToWidth",shortcuts:["Ctrl+1","Meta+1"],categories:["zoom","zoom-fit-width"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("zoom"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).requestZoom(Mt.FitWidth)},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins.zoom)===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.zoomLevel)===Mt.FitWidth}},"zoom:marquee":{id:"zoom:marquee",labelKey:"zoom.marquee",icon:"zoomInArea",shortcuts:["Ctrl+M","Meta+M"],categories:["zoom","zoom-marquee"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("zoom"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).toggleMarqueeZoom()},active:function(e){var t,n,o=e.state,i=e.documentId;return(t=(n=o.plugins.zoom)===null||n===void 0||(n=n.documents[i])===null||n===void 0?void 0:n.isMarqueeZoomActive)!==null&&t!==void 0&&t}},"zoom:25":{id:"zoom:25",label:"25%",categories:["zoom","zoom-level","zoom-level-25"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("zoom"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).requestZoom(.25)},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins.zoom)===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.zoomLevel)===.25}},"zoom:50":{id:"zoom:50",label:"50%",categories:["zoom","zoom-level","zoom-level-50"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("zoom"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).requestZoom(.5)},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins.zoom)===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.zoomLevel)===.5}},"zoom:100":{id:"zoom:100",label:"100%",categories:["zoom","zoom-level","zoom-level-100"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("zoom"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).requestZoom(1)},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins.zoom)===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.zoomLevel)===1}},"zoom:125":{id:"zoom:125",label:"125%",categories:["zoom","zoom-level","zoom-level-125"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("zoom"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).requestZoom(1.25)},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins.zoom)===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.zoomLevel)===1.25}},"zoom:150":{id:"zoom:150",label:"150%",categories:["zoom","zoom-level","zoom-level-150"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("zoom"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).requestZoom(1.5)},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins.zoom)===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.zoomLevel)===1.5}},"zoom:200":{id:"zoom:200",label:"200%",categories:["zoom","zoom-level","zoom-level-200"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("zoom"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).requestZoom(2)},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins.zoom)===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.zoomLevel)===2}},"zoom:400":{id:"zoom:400",label:"400%",categories:["zoom","zoom-level","zoom-level-400"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("zoom"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).requestZoom(4)},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins.zoom)===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.zoomLevel)===4}},"zoom:800":{id:"zoom:800",label:"800%",categories:["zoom","zoom-level","zoom-level-800"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("zoom"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).requestZoom(8)},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins.zoom)===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.zoomLevel)===8}},"zoom:1600":{id:"zoom:1600",label:"1600%",categories:["zoom","zoom-level","zoom-level-1600"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("zoom"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).requestZoom(16)},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins.zoom)===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.zoomLevel)===16}},"zoom:toggle-menu":{id:"zoom:toggle-menu",labelKey:"zoom.menu",icon:"chevronDown",iconProps:{className:"h-3.5 w-3.5"},categories:["zoom","zoom-menu"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("ui"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).toggleMenu("zoom-menu","zoom:toggle-menu","zoom-menu-button")},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins.ui)===null||t===void 0?void 0:t.documents[o];return i?.openMenus["zoom-menu"]!==void 0}},"zoom:toggle-menu-mobile":{id:"zoom:toggle-menu-mobile",labelKey:"zoom.menu",icon:"zoomIn",categories:["zoom","zoom-menu"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("ui"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).toggleMenu("zoom-menu","zoom:toggle-menu-mobile","zoom-menu-button")},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins.ui)===null||t===void 0?void 0:t.documents[o];return i?.openMenus["zoom-menu"]!==void 0}},"pan:toggle":{id:"pan:toggle",labelKey:"pan.toggle",icon:"hand",shortcuts:["h"],categories:["tools","pan"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("pan"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).togglePan()},active:function(e){var t,n,o=e.state,i=e.documentId;return(t=(n=o.plugins.pan)===null||n===void 0||(n=n.documents[i])===null||n===void 0?void 0:n.isPanMode)!==null&&t!==void 0&&t}},"pointer:toggle":{id:"pointer:toggle",labelKey:"pointer.toggle",icon:"pointer",shortcuts:["p"],categories:["tools","pointer"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("interaction-manager"))===null||t===void 0?void 0:t.provides();if(i){var r=i.forDocument(o);r.getActiveMode()==="pointerMode"?r.activateDefaultMode():r.activate("pointerMode")}},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins["interaction-manager"])===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.activeMode)==="pointerMode"}},"left-action-menu:overflow-menu":{id:"left-action-menu:overflow-menu",labelKey:"menu.moreOptions",icon:"dots",categories:["ui","ui-menu"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("ui"))===null||t===void 0?void 0:t.provides();i&&i.toggleMenu("left-action-menu","left-action-menu:overflow-menu","overflow-left-action-menu-button",o)},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins.ui)===null||t===void 0?void 0:t.documents[o];return i?.openMenus["left-action-menu"]!==void 0}},"capture:screenshot":{id:"capture:screenshot",labelKey:"capture.screenshot",icon:"screenshot",shortcuts:["Ctrl+Shift+S","Meta+Shift+S"],categories:["tools","capture","capture-screenshot"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("capture"))===null||t===void 0?void 0:t.provides();if(i){var r=i.forDocument(o);r.isMarqueeCaptureActive()?r.disableMarqueeCapture():r.enableMarqueeCapture()}},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins["interaction-manager"].documents[o])===null||t===void 0?void 0:t.activeMode)==="marqueeCapture"}},"document:menu":{id:"document:menu",labelKey:"document.menu",icon:"menu",categories:["document","document-menu"],action:function(e){var t=e.registry,n=e.documentId,o=t.getPlugin(Dt);if(o&&o.provides){var i=o.provides();i&&i.forDocument(n).toggleMenu("document-menu","document:menu","document-menu-button")}},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins.ui)===null||t===void 0?void 0:t.documents[o];return i?.openMenus["document-menu"]!==void 0}},"document:open":{id:"document:open",labelKey:"document.open",icon:"fileImport",shortcuts:["Ctrl+O","Meta+O"],categories:["document","document-open"],action:function(e){var t,n=(t=e.registry.getPlugin("document-manager"))===null||t===void 0?void 0:t.provides();n?.openFileDialog()}},"document:close":{id:"document:close",labelKey:"document.close",icon:"x",shortcuts:["Ctrl+W","Meta+W"],categories:["document","document-close"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("document-manager"))===null||t===void 0?void 0:t.provides();i?.closeDocument(o)}},"document:print":{id:"document:print",labelKey:"document.print",icon:"print",shortcuts:["Ctrl+P","Meta+P"],categories:["document","document-print"],action:function(e){var t=e.registry,n=e.documentId,o=t.getPlugin(Dt);if(o&&o.provides){var i=o.provides();i&&i.forDocument(n).openModal("print-modal")}},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.Print)}},"document:protect":{id:"document:protect",labelKey:"document.protect",icon:"lock",categories:["document","document-protect"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("ui"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).openModal("protect-modal")}},"document:export":{id:"document:export",labelKey:"document.export",icon:"download",categories:["document","document-export"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("export"))===null||t===void 0?void 0:t.provides();i?.forDocument(o).download()}},"document:capture":{id:"document:capture",labelKey:"capture.screenshot",icon:"screenshot",categories:["document","document-capture"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("capture"))===null||t===void 0?void 0:t.provides();i?.forDocument(o).toggleMarqueeCapture()},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins["interaction-manager"])===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.activeMode)==="marqueeCapture"}},"document:fullscreen":{id:"document:fullscreen",labelKey:"document.fullscreen",icon:function(e){var t;return(t=e.state.plugins.fullscreen)!==null&&t!==void 0&&t.isFullscreen?"fullscreenExit":"fullscreen"},shortcuts:["F11"],categories:["document","document-fullscreen"],action:function(e){var t,n=(t=e.registry.getPlugin("fullscreen"))===null||t===void 0?void 0:t.provides();n&&(n.isFullscreen()?n.exitFullscreen():n.enableFullscreen())},active:function(e){var t,n;return(t=(n=e.state.plugins.fullscreen)===null||n===void 0?void 0:n.isFullscreen)!==null&&t!==void 0&&t}},"panel:toggle-sidebar":{id:"panel:toggle-sidebar",labelKey:"panel.sidebar",icon:"sidebar",categories:["panel","panel-sidebar"],action:function(e){var t=e.registry,n=e.documentId,o=t.getPlugin(Dt);if(o&&o.provides){var i=o.provides();i&&i.forDocument(n).toggleSidebar("left","main","sidebar-panel")}}
2210,active:function(e){var t=e.state,n=e.documentId;return pn(t.plugins,n,"left","main","sidebar-panel")}},"panel:toggle-search":{id:"panel:toggle-search",labelKey:"panel.search",icon:"search",shortcuts:["Ctrl+F","Meta+F"],categories:["panel","panel-search"],action:function(e){var t=e.registry,n=e.documentId,o=t.getPlugin(Dt);if(o&&o.provides){var i=o.provides();i&&i.forDocument(n).toggleSidebar("right","main","search-panel")}},active:function(e){var t=e.state,n=e.documentId;return pn(t.plugins,n,"right","main","search-panel")}},"panel:toggle-comment":{id:"panel:toggle-comment",labelKey:"panel.comment",icon:"comment",categories:["panel","panel-comment"],action:function(e){var t=e.registry,n=e.documentId,o=t.getPlugin(Dt);if(o&&o.provides){var i=o.provides();i&&i.forDocument(n).toggleSidebar("right","main","comment-panel")}},active:function(e){var t=e.state,n=e.documentId;return pn(t.plugins,n,"right","main","comment-panel")}},"panel:toggle-redaction":{id:"panel:toggle-redaction",labelKey:"panel.redaction",icon:"redactionSidebar",categories:["panel","panel-redaction","redaction"],action:function(e){var t=e.registry,n=e.documentId,o=t.getPlugin(Dt);if(o&&o.provides){var i=o.provides();i&&i.forDocument(n).toggleSidebar("right","main","redaction-panel")}},active:function(e){var t=e.state,n=e.documentId;return pn(t.plugins,n,"right","main","redaction-panel")}},"panel:toggle-annotation-style":{id:"panel:toggle-annotation-style",labelKey:"panel.annotationStyle",icon:"palette",categories:["panel","panel-annotation-style"],action:function(e){var t=e.registry,n=e.documentId,o=t.getPlugin(Dt);if(o&&o.provides){var i=o.provides();i&&i.forDocument(n).toggleSidebar("left","main","annotation-panel")}},active:function(e){var t=e.state,n=e.documentId;return pn(t.plugins,n,"left","main","annotation-panel")},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"page:settings":{id:"page:settings",labelKey:"page.settings",icon:"viewSettings",categories:["page","page-settings"],action:function(e){var t=e.registry,n=e.documentId,o=t.getPlugin(Dt);if(o&&o.provides){var i=o.provides();i&&i.forDocument(n).toggleMenu("page-settings-menu","page:settings","page-settings-button")}},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins.ui)===null||t===void 0?void 0:t.documents[o];return i?.openMenus["page-settings-menu"]!==void 0}},"spread:none":{id:"spread:none",labelKey:"page.single",icon:"singlePage",categories:["page","spread","spread-none"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("spread"))===null||t===void 0?void 0:t.provides();i?.forDocument(o).setSpreadMode(Ot.None)},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins.spread)===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.spreadMode)===Ot.None}},"spread:odd":{id:"spread:odd",labelKey:"page.twoOdd",icon:"doublePage",categories:["page","spread","spread-odd"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("spread"))===null||t===void 0?void 0:t.provides();i?.forDocument(o).setSpreadMode(Ot.Odd)},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins.spread)===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.spreadMode)===Ot.Odd}},"spread:even":{id:"spread:even",labelKey:"page.twoEven",icon:"book2",categories:["page","spread","spread-even"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("spread"))===null||t===void 0?void 0:t.provides();i?.forDocument(o).setSpreadMode(Ot.Even)},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins.spread)===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.spreadMode)===Ot.Even}},"rotate:clockwise":{id:"rotate:clockwise",labelKey:"rotate.clockwise",icon:"rotateClockwise",shortcuts:["Ctrl+]","Meta+]"],categories:["page","rotate","rotate-clockwise"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("rotate"))===null||t===void 0?void 0:t.provides();i?.forDocument(o).rotateForward()}},"rotate:counter-clockwise":{id:"rotate:counter-clockwise",labelKey:"rotate.counterClockwise",icon:"rotateCounterClockwise",shortcuts:["Ctrl+[","Meta+["],categories:["page","rotate","rotate-counter-clockwise"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("rotate"))===null||t===void 0?void 0:t.provides();i?.forDocument(o).rotateBackward()}},"scroll:vertical":{id:"scroll:vertical",labelKey:"page.vertical",icon:"vertical",categories:["page","scroll","scroll-vertical"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("scroll"))===null||t===void 0?void 0:t.provides();i?.forDocument(o).setScrollStrategy(Ht.Vertical)},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins.scroll)===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.strategy)===Ht.Vertical}}
2210,"scroll:horizontal":{id:"scroll:horizontal",labelKey:"page.horizontal",icon:"horizontal",categories:["page","scroll","scroll-horizontal"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("scroll"))===null||t===void 0?void 0:t.provides();i?.forDocument(o).setScrollStrategy(Ht.Horizontal)},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins.scroll)===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.strategy)===Ht.Horizontal}},"scroll:next-page":{id:"scroll:next-page",labelKey:"page.next",icon:"chevronRight",categories:["page","navigation","navigation-next"],shortcuts:["Ctrl+]","Meta+]","ArrowRight"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("scroll"))===null||t===void 0?void 0:t.provides();i?.forDocument(o).scrollToNextPage()},disabled:function(e){var t,n,o=e.state,i=e.documentId;return((t=o.plugins.scroll)===null||t===void 0||(t=t.documents[i])===null||t===void 0?void 0:t.currentPage)>=((n=o.plugins.scroll)===null||n===void 0||(n=n.documents[i])===null||n===void 0?void 0:n.totalPages)}},"scroll:previous-page":{id:"scroll:previous-page",labelKey:"page.previous",icon:"chevronLeft",categories:["page","navigation","navigation-previous"],shortcuts:["Ctrl+[","Meta+[","ArrowLeft"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("scroll"))===null||t===void 0?void 0:t.provides();i?.forDocument(o).scrollToPreviousPage()},disabled:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins.scroll)===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.currentPage)<=1}},"mode:view":{id:"mode:view",labelKey:"mode.view",categories:["mode","mode-view"],action:function(e){var t,n,o,i=e.registry,r=e.documentId,a=(t=i.getPlugin("ui"))===null||t===void 0?void 0:t.provides(),s=(n=i.getPlugin("interaction-manager"))===null||n===void 0?void 0:n.provides();if(a&&s){var l=s.forDocument(r);l&&(l.activateDefaultMode(),a.forDocument(r).closeToolbarSlot("top","secondary"),(o=i.getPlugin(J))===null||o===void 0||o.provides().forDocument(r).setLocked({type:ct.Include,categories:["form"]}))}},active:function(e){var t=e.state,n=e.documentId;return!_o(t.plugins,n,"top","secondary")}},"mode:annotate":{id:"mode:annotate",labelKey:"mode.annotate",categories:["mode","mode-annotate","annotation"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin("ui"))===null||t===void 0?void 0:t.provides();r&&(r.setActiveToolbar("top","secondary","annotation-toolbar",i),(n=o.getPlugin(J))===null||n===void 0||n.provides().forDocument(i).setLocked({type:ct.Include,categories:["form"]}))},active:function(e){var t=e.state,n=e.documentId;return _o(t.plugins,n,"top","secondary","annotation-toolbar")}},"mode:shapes":{id:"mode:shapes",labelKey:"mode.shapes",categories:["mode","mode-shapes","annotation"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin("ui"))===null||t===void 0?void 0:t.provides();r&&(r.setActiveToolbar("top","secondary","shapes-toolbar",i),(n=o.getPlugin(J))===null||n===void 0||n.provides().forDocument(i).setLocked({type:ct.Include,categories:["form"]}))},active:function(e){var t=e.state,n=e.documentId;return _o(t.plugins,n,"top","secondary","shapes-toolbar")}},"mode:insert":{id:"mode:insert",labelKey:"mode.insert",categories:["mode","mode-insert","insert"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin("ui"))===null||t===void 0?void 0:t.provides();r&&(r.setActiveToolbar("top","secondary","insert-toolbar",i),(n=o.getPlugin(J))===null||n===void 0||n.provides().forDocument(i).setLocked({type:ct.None}))},active:function(e){var t=e.state,n=e.documentId;return _o(t.plugins,n,"top","secondary","insert-toolbar")}},"mode:form":{id:"mode:form",labelKey:"mode.form",categories:["mode","mode-form","form"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin("ui"))===null||t===void 0?void 0:t.provides();r&&(r.setActiveToolbar("top","secondary","form-toolbar",i),(n=o.getPlugin(J))===null||n===void 0||n.provides().forDocument(i).setLocked({type:ct.None}))},active:function(e){var t=e.state,n=e.documentId;return _o(t.plugins,n,"top","secondary","form-toolbar")}},"form:add-textfield":{id:"form:add-textfield",labelKey:"form.textfield",icon:"formTextfield",categories:["form","form-textfield"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=r?.forDocument(i);a&&(((n=a.getActiveTool())===null||n===void 0?void 0:n.id)==="formTextField"?a.setActiveTool(null):a.setActiveTool("formTextField"))},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="formTextField"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"form:add-checkbox":{id:"form:add-checkbox",labelKey:"form.checkbox",icon:"formCheckbox",categories:["form","form-checkbox"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=r?.forDocument(i);a&&(((n=a.getActiveTool())===null||n===void 0?void 0:n.id)==="formCheckbox"?a.setActiveTool(null):a.setActiveTool("formCheckbox"))},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="formCheckbox"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"form:add-radio":{id:"form:add-radio",labelKey:"form.radio",icon:"formRadio",categories:["form","form-radio"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=r?.forDocument(i);a&&(((n=a.getActiveTool())===null||n===void 0?void 0:n.id)==="formRadioButton"?a.setActiveTool(null):a.setActiveTool("formRadioButton"))},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="formRadioButton"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"form:add-select":{id:"form:add-select",labelKey:"form.select",icon:"formSelect",categories:["form","form-select"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=r?.forDocument(i);a&&(((n=a.getActiveTool())===null||n===void 0?void 0:n.id)==="formCombobox"?a.setActiveTool(null):a.setActiveTool("formCombobox"))},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="formCombobox"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"form:add-listbox":{id:"form:add-listbox",labelKey:"form.listbox",icon:"formListbox",categories:["form","form-listbox"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=r?.forDocument(i);a&&(((n=a.getActiveTool())===null||n===void 0?void 0:n.id)==="formListbox"?a.setActiveTool(null):a.setActiveTool("formListbox"))},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="formListbox"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"form:toggle-fill-mode":{id:"form:toggle-fill-mode",labelKey:"form.toggleFillMode",icon:"widgetEdit",categories:["form","form-fill-mode"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin(J))===null||t===void 0?void 0:t.provides().forDocument(o);i&&(i.isCategoryLocked("form")?i.setLocked({type:ct.None}):i.setLocked({type:ct.Include,categories:["form"]}))},active:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides().forDocument(i);return!((n=r?.isCategoryLocked("form"))===null||n===void 0||n)}},"mode:redact":{id:"mode:redact",labelKey:"mode.redact",categories:["mode","mode-redact","redaction"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin("ui"))===null||t===void 0?void 0:t.provides();r&&(r.setActiveToolbar("top","secondary","redaction-toolbar",i),(n=o.getPlugin(J))===null||n===void 0||n.provides().forDocument(i).setLocked({type:ct.Include,categories:["form"]}))},active:function(e){var t=e.state,n=e.documentId;return _o(t.plugins,n,"top","secondary","redaction-toolbar")}},"insert:add-rubber-stamp":{id:"insert:add-rubber-stamp",labelKey:"insert.rubberStamp",icon:"rubberStamp",categories:["insert","insert-rubber-stamp"],action:function(e){var t=e.registry,n=e.documentId,o=t.getPlugin(Dt);if(o&&o.provides){var i=o.provides();i&&i.forDocument(n).toggleSidebar("left","main","rubber-stamp-panel")}},active:function(e){var t=e.state,n=e.documentId;return pn(t.plugins,n,"left","main","rubber-stamp-panel")},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"insert:add-signature":{id:"insert:add-signature",label:"Signature",icon:"signature",categories:["insert","insert-signature"],action:function(e){var t=e.registry,n=e.documentId,o=t.getPlugin(Dt);if(o&&o.provides){var i=o.provides();i&&i.forDocument(n).toggleSidebar("left","main","signature-panel")}},active:function(e){var t=e.state,n=e.documentId;return pn(t.plugins,n,"left","main","signature-panel")}},"insert:add-attachment":{id:"insert:add-attachment",label:"Attachment",icon:"paperclip",categories:["insert","insert-attachment"],action:function(){}},"insert:add-image":{id:"insert:add-image",labelKey:"insert.image",icon:"photo",categories:["insert","insert-image"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=r?.forDocument(i);a&&(((n=a.getActiveTool())===null||n===void 0?void 0:n.id)==="stamp"?a.setActiveTool(null):a.setActiveTool("stamp"))},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="stamp"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"tabs:overflow-menu":{id:"tabs:overflow-menu",labelKey:"tabs.overflowMenu",icon:"dots",categories:["ui","ui-menu"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("ui"))===null||t===void 0?void 0:t.provides();i&&i.toggleMenu("mode-tabs-overflow-menu","tabs:overflow-menu","overflow-tabs-button",o)},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins.ui)===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.openMenus["mode-tabs-overflow-menu"])!==void 0}},"annotation:add-highlight":{id:"annotation:add-highlight",labelKey:"annotation.highlight",icon:"highlight",iconProps:function(e){var t;return{primaryColor:(t=bt(e.state.plugins.annotation,"highlight"))===null||t===void 0?void 0:t.strokeColor}},categories:["annotation","annotation-markup","annotation-highlight"],action:function(e){var t,n,o,i=e.registry,r=e.documentId,a=(t=i.getPlugin(J))===null||t===void 0?void 0:t.provides(),s=(n=i.getPlugin(uo))===null||n===void 0?void 0:n.provides(),l=(o=i.getPlugin("ui"))===null||o===void 0?void 0:o.provides();if(s&&a&&l){var c=a?.forDocument(r),d=s?.forDocument(r);if(c&&d){var u=a.getTool("highlight");if(u&&N4(u)){var m=u.defaults,g=d.getFormattedSelection(),p=d.getSelectedText();if(g.length>0){c.setLocked({type:ct.Exclude,categories:["markup","shape"]});var f,v=Yt(g);try{var y=function(){var w=f.value,x=Ce(),k=function(I){c.createAnnotation(w.pageIndex,U({id:x,created:new Date,flags:["print"],type:z.HIGHLIGHT,blendMode:xe.Multiply,strokeColor:m.strokeColor,opacity:m.opacity,pageIndex:w.pageIndex,rect:w.rect,segmentRects:w.segmentRects},I!=null&&{custom:{text:I}})),c.selectAnnotation(w.pageIndex,x)};p.wait(function(I){return k(I.join(` 2211`))},function(){return k()})};for(v.s();!(f=v.n()).done;)y()}catch(w){v.e(w)}finally{v.f()}d.clear(),c.setActiveTool("highlight"),l.setActiveToolbar("top","secondary","annotation-toolbar",r)}else{var b;((b=c.getActiveTool())===null||b===void 0?void 0:b.id)==="highlight"?c.setA
2211ctiveTool(null):c.setActiveTool("highlight")}}}}},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="highlight"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:add-underline":{id:"annotation:add-underline",labelKey:"annotation.underline",icon:"underline",iconProps:function(e){var t;return{primaryColor:(t=bt(e.state.plugins.annotation,"underline"))===null||t===void 0?void 0:t.strokeColor}},categories:["annotation","annotation-markup","annotation-underline"],action:function(e){var t,n,o,i=e.registry,r=e.documentId,a=(t=i.getPlugin(J))===null||t===void 0?void 0:t.provides(),s=(n=i.getPlugin(uo))===null||n===void 0?void 0:n.provides(),l=(o=i.getPlugin("ui"))===null||o===void 0?void 0:o.provides();if(s&&a&&l){var c=a?.forDocument(r),d=s?.forDocument(r);if(c&&d){var u=a.getTool("underline");if(u&&F4(u)){var m=u.defaults,g=d.getFormattedSelection(),p=d.getSelectedText();if(g.length>0){c.setLocked({type:ct.Exclude,categories:["markup","shape"]});var f,v=Yt(g);try{var y=function(){var w=f.value,x=Ce(),k=function(I){c.createAnnotation(w.pageIndex,U({id:x,created:new Date,flags:["print"],type:z.UNDERLINE,strokeColor:m.strokeColor,opacity:m.opacity,pageIndex:w.pageIndex,rect:w.rect,segmentRects:w.segmentRects},I!=null&&{custom:{text:I}})),c.selectAnnotation(w.pageIndex,x)};p.wait(function(I){return k(I.join(` 2212`))},function(){return k()})};for(v.s();!(f=v.n()).done;)y()}catch(w){v.e(w)}finally{v.f()}d.clear(),c.setActiveTool("underline"),l.setActiveToolbar("top","secondary","annotation-toolbar",r)}else{var b;((b=c.getActiveTool())===null||b===void 0?void 0:b.id)==="underline"?c.setActiveTool(null):c.setActiveTool("underline")}}}}},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="underline"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:add-strikeout":{id:"annotation:add-strikeout",labelKey:"annotation.strikeout",icon:"strikethrough",iconProps:function(e){var t;return{primaryColor:(t=bt(e.state.plugins.annotation,"strikeout"))===null||t===void 0?void 0:t.strokeColor}},categories:["annotation","annotation-markup","annotation-strikeout"],action:function(e){var t,n,o,i=e.registry,r=e.documentId,a=(t=i.getPlugin(J))===null||t===void 0?void 0:t.provides(),s=(n=i.getPlugin(uo))===null||n===void 0?void 0:n.provides(),l=(o=i.getPlugin("ui"))===null||o===void 0?void 0:o.provides();if(s&&a&&l){var c=a?.forDocument(r),d=s?.forDocument(r);if(c&&d){var u=a.getTool("strikeout");if(u&&j4(u)){var m=u.defaults,g=d.getFormattedSelection(),p=d.getSelectedText();if(g.length>0){c.setLocked({type:ct.Exclude,categories:["markup","shape"]});var f,v=Yt(g);try{var y=function(){var w=f.value,x=Ce(),k=function(I){c.createAnnotation(w.pageIndex,U({id:x,created:new Date,flags:["print"],type:z.STRIKEOUT,strokeColor:m.strokeColor,opacity:m.opacity,pageIndex:w.pageIndex,rect:w.rect,segmentRects:w.segmentRects},I!=null&&{custom:{text:I}})),c.selectAnnotation(w.pageIndex,x)};p.wait(function(I){return k(I.join(` 2213`))},function(){return k()})};for(v.s();!(f=v.n()).done;)y()}catch(w){v.e(w)}finally{v.f()}d.clear(),c.setActiveTool("strikeout"),l.setActiveToolbar("top","secondary","annotation-toolbar",r)}else{var b;((b=c.getActiveTool())===null||b===void 0?void 0:b.id)==="strikeout"?c.setActiveTool(null):c.setActiveTool("strikeout")}}}}},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="strikeout"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:add-squiggly":{id:"annotation:add-squiggly",labelKey:"annotation.squiggly",icon:"squiggly",iconProps:function(e){var t;return{primaryColor:(t=bt(e.state.plugins.annotation,"squiggly"))===null||t===void 0?void 0:t.strokeColor}},categories:["annotation","annotation-markup","annotation-squiggly"],action:function(e){var t,n,o,i=e.registry,r=e.documentId,a=(t=i.getPlugin(J))===null||t===void 0?void 0:t.provides(),s=(n=i.getPlugin(uo))===null||n===void 0?void 0:n.provides(),l=(o=i.getPlugin("ui"))===null||o===void 0?void 0:o.provides();if(s&&a&&l){var c=a?.forDocument(r),d=s?.forDocument(r);if(c&&d){var u=a.getTool("squiggly");if(u&&$4(u)){var m=u.defaults,g=d.getFormattedSelection(),p=d.getSelectedText();if(g.length>0){c.setLocked({type:ct.Exclude,categories:["markup","shape"]});var f,v=Yt(g);try{var y=function(){var w=f.value,x=Ce(),k=function(I){c.createAnnotation(w.pageIndex,U({id:x,created:new Date,flags:["print"],type:z.SQUIGGLY,strokeColor:m.strokeColor,opacity:m.opacity,pageIndex:w.pageIndex,rect:w.rect,segmentRects:w.segmentRects},I!=null&&{custom:{text:I}})),c.selectAnnotation(w.pageIndex,x)};p.wait(function(I){return k(I.join(` 2214`))},function(){return k()})};for(v.s();!(f=v.n()).done;)y()}catch(w){v.e(w)}finally{v.f()}d.clear(),c.setActiveTool("squiggly"),l.setActiveToolbar("top","secondary","annotation-toolbar",r)}else{var b;((b=c.getActiveTool())===null||b===void 0?void 0:b.id)==="squiggly"?c.setActiveTool(null):c.setActiveTool("squiggly")}
2214}}}},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="squiggly"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:add-insert-text":{id:"annotation:add-insert-text",labelKey:"annotation.insertText",icon:"insertText",iconProps:function(e){var t;return{primaryColor:(t=bt(e.state.plugins.annotation,"insertText"))===null||t===void 0?void 0:t.strokeColor}},categories:["annotation","annotation-markup","annotation-insert-text"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=r?.forDocument(i);a&&(((n=a.getActiveTool())===null||n===void 0?void 0:n.id)==="insertText"?a.setActiveTool(null):a.setActiveTool("insertText"))},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="insertText"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:add-replace-text":{id:"annotation:add-replace-text",labelKey:"annotation.replaceText",icon:"replaceText",iconProps:function(e){var t;return{primaryColor:(t=bt(e.state.plugins.annotation,"replaceText"))===null||t===void 0?void 0:t.strokeColor}},categories:["annotation","annotation-markup","annotation-replace-text"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=r?.forDocument(i);a&&(((n=a.getActiveTool())===null||n===void 0?void 0:n.id)==="replaceText"?a.setActiveTool(null):a.setActiveTool("replaceText"))},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="replaceText"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:add-ink":{id:"annotation:add-ink",labelKey:"annotation.ink",icon:"pencilMarker",iconProps:function(e){var t;return{primaryColor:(t=bt(e.state.plugins.annotation,"ink"))===null||t===void 0?void 0:t.color}},categories:["annotation","annotation-ink"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=r?.forDocument(i);a&&(((n=a.getActiveTool())===null||n===void 0?void 0:n.id)==="ink"?a.setActiveTool(null):a.setActiveTool("ink"))},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="ink"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:add-ink-highlighter":{id:"annotation:add-ink-highlighter",labelKey:"annotation.inkHighlighter",icon:"inkHighlighter",iconProps:function(e){var t;return{primaryColor:(t=bt(e.state.plugins.annotation,"inkHighlighter"))===null||t===void 0?void 0:t.strokeColor}},categories:["annotation","annotation-ink"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=r?.forDocument(i);a&&(((n=a.getActiveTool())===null||n===void 0?void 0:n.id)==="inkHighlighter"?a.setActiveTool(null):a.setActiveTool("inkHighlighter"))},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="inkHighlighter"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:add-text":{id:"annotation:add-text",labelKey:"annotation.text",icon:"freeText",iconProps:function(e){var t;return{primaryColor:(t=bt(e.state.plugins.annotation,"freeText"))===null||t===void 0?void 0:t.fontColor}},categories:["annotation","annotation-text"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=r?.forDocument(i);a&&(((n=a.getActiveTool())===null||n===void 0?void 0:n.id)==="freeText"?a.setActiveTool(null):a.setActiveTool("freeText"))},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="freeText"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:add-comment":{id:"annotation:add-comment",labelKey:"annotation.comment",icon:"message",iconProps:function(e){var t;return{primaryColor:(t=bt(e.state.plugins.annotation,"textComment"))===null||t===void 0?void 0:t.strokeColor}},categories:["annotation","annotation-comment-tool"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=r?.forDocument(i);a&&(((n=a.getActiveTool())===null||n===void 0?void 0:n.id)==="textComment"?a.setActiveTool(null):a.setActiveTool("textComment"))},active:function(e){var t,n=e.state,o=e.documentId;return((t=n.plugins[J])===null||t===void 0||(t=t.documents[o])===null||t===void 0?void 0:t.activeToolId)==="textComment"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:add-rectangle":{id:"annotation:add-rectangle",labelKey:"annotation.rectangle",icon:"square",iconProps:function(e){var t,n,o=e.state;return{primaryColor:(t=bt(o.plugins.annotation,"square"))===null||t===void 0?void 0:t.strokeColor,secondaryColor:(n=bt(o.plugins.annotation,"square"))===null||n===void 0?void 0:n.color}},categories:["annotation","annotation-shape","annotation-rectangle"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=r?.forDocument(i);a&&(((n=a.getActiveTool())===null||n===void 0?void 0:n.id)==="square"?a.setActiveTool(null):a.setActiveTool("square"))},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="square"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:add-circle":{id:"annotation:add-circle",labelKey:"annotation.circle",icon:"circle",iconProps:function(e){var t,n,o=e.state;return{primaryColor:(t=bt(o.plugins.annotation,"circle"))===null||t===void 0?void 0:t.strokeColor,secondaryColor:(n=bt(o.plugins.annotation,"circle"))===null||n===void 0?void 0:n.color}},categories:["annotation","annotation-shape","annotation-circle"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=r?.forDocument(i);a&&(((n=a.getActiveTool())===null||n===void 0?void 0:n.id)==="circle"?a.setActiveTool(null):a.setActiveTool("
2214circle"))},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="circle"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:add-line":{id:"annotation:add-line",labelKey:"annotation.line",icon:"line",iconProps:function(e){var t;return{primaryColor:(t=bt(e.state.plugins.annotation,"line"))===null||t===void 0?void 0:t.strokeColor}},categories:["annotation","annotation-shape","annotation-line"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=r?.forDocument(i);a&&(((n=a.getActiveTool())===null||n===void 0?void 0:n.id)==="line"?a.setActiveTool(null):a.setActiveTool("line"))},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="line"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:add-arrow":{id:"annotation:add-arrow",labelKey:"annotation.arrow",icon:"lineArrow",iconProps:function(e){var t;return{primaryColor:(t=bt(e.state.plugins.annotation,"line"))===null||t===void 0?void 0:t.strokeColor}},categories:["annotation","annotation-shape","annotation-arrow"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=r?.forDocument(i);a&&(((n=a.getActiveTool())===null||n===void 0?void 0:n.id)==="lineArrow"?a.setActiveTool(null):a.setActiveTool("lineArrow"))},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="lineArrow"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:add-polygon":{id:"annotation:add-polygon",labelKey:"annotation.polygon",icon:"polygon",iconProps:function(e){var t,n,o=e.state;return{primaryColor:(t=bt(o.plugins.annotation,"polygon"))===null||t===void 0?void 0:t.strokeColor,secondaryColor:(n=bt(o.plugins.annotation,"polygon"))===null||n===void 0?void 0:n.color}},categories:["annotation","annotation-shape","annotation-polygon"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=r?.forDocument(i);a&&(((n=a.getActiveTool())===null||n===void 0?void 0:n.id)==="polygon"?a.setActiveTool(null):a.setActiveTool("polygon"))},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="polygon"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:add-polyline":{id:"annotation:add-polyline",labelKey:"annotation.polyline",icon:"zigzag",iconProps:function(e){var t;return{primaryColor:(t=bt(e.state.plugins.annotation,"polyline"))===null||t===void 0?void 0:t.strokeColor}},categories:["annotation","annotation-shape","annotation-polyline"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=r?.forDocument(i);a&&(((n=a.getActiveTool())===null||n===void 0?void 0:n.id)==="polyline"?a.setActiveTool(null):a.setActiveTool("polyline"))},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[J])===null||t===void 0?void 0:t.documents[o];return i?.activeToolId==="polyline"},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:delete-selected":{id:"annotation:delete-selected",labelKey:"annotation.deleteSelected",icon:"trash",categories:["annotation","annotation-delete"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin(J))===null||t===void 0?void 0:t.provides(),r=i?.forDocument(o);if(r){var a=r.getSelectedAnnotation();a&&r.deleteAnnotation(a.object.pageIndex,a.object.id)}},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:delete-all-selected":{id:"annotation:delete-all-selected",labelKey:"annotation.deleteAllSelected",icon:"trash",categories:["annotation","annotation-delete","annotation-group"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin(J))===null||t===void 0?void 0:t.provides(),r=i?.forDocument(o);if(r){var a=r.getSelectedAnnotations();a.length!==0&&(r.deleteAnnotations(a.map(function(s){return{pageIndex:s.object.pageIndex,id:s.object.id}})),r.deselectAnnotation())}},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:toggle-group":{id:"annotation:toggle-group",labelKey:function(e){var t,n=e.registry,o=e.documentId;return((t=n.getPlugin(J))===null||t===void 0?void 0:t.provides().forDocument(o).getGroupingAction())==="ungroup"?"annotation.ungroup":"annotation.group"},icon:function(e){var t,n=e.registry,o=e.documentId;return((t=n.getPlugin(J))===null||t===void 0?void 0:t.provides().forDocument(o).getGroupingAction())==="ungroup"?"ungroup":"group"},categories:["annotation","annotation-group"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin(J))===null||t===void 0?void 0:t.provides().forDocument(o);if(i){var r=i.getGroupingAction();if(r==="ungroup"){var a=i.getSelectedAnnotations();a.length>0&&i.ungroupAnnotations(a[0].object.id)}else r==="group"&&i.groupAnnotations()}},disabled:function(e){var t,n=e.registry,o=e.state,i=e.documentId;return!!ke(o,i,j.ModifyAnnotations)||((t=n.getPlugin(J))===null||t===void 0?void 0:t.provides().forDocument(i).getGroupingAction())==="disabled"}},"stamp:create-from-selected":{id:"stamp:create-from-selected",labelKey:"stamp.createFromSelected",icon:"rubberStampPlus",categories:["annotation","stamp"],action:function(e){var t,n,o,i=e.registry,r=e.documentId,a=(t=i.getPlugin(J))===null||t===void 0?void 0:t.provides().forDocument(r);if(a){var s=a.getSelectedAnnotation();if(s){var l=(n=i.getPlugin(Ai))===null||n===void 0?void 0:n.provides().forDocument(r);if(l){l.createStampFromAnnotation(s.object,{name:Ne.Custom,subject:"Custom Stamp ".concat(Date.now()),categories:["custom","sidebar"]});var c=(o=i.getPlugin(Dt))===null||o===void 0||(o=o.provides())===null||o===void 0?void 0:o.forDocument(r);c?.setActiveSidebar("left","main","rubber-stamp-panel",void 0,{selectedLibraryId:"custom"})}}}},visible:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides().forDocument(i);if(!r)return!1;var a=(n=r.getSelectedAnnotation())===null||n===void 0?void 0:n.object.type;return!!a&&![z.REDACT,z.HIGHLIGHT,z.SQUIGGLY,z.UNDERLINE,z.STRIKEOUT,z.CARET,z.WIDGET].includes(a)},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)||ke(t,n,j.CopyContents)}},"stamp:create-from-group":{id:"stamp:create-from-group",labelKey:"stamp.createFromGroup",icon:"rubberStampPlus",categories:["annotation","stamp","annotation-group"],action:function(e){var t,n,o,i=e.registry,r=e.documentId,a=(t=i.getPlugin(J))===null||t===void 0?void 0:t.provides().forDocument(r);if(a){var s=a.getSelectedAnnotations();if(s.length!==0){var l=(n=i.getPlugin(Ai))===null||n===void 0?void 0:n.provides().forDocument(r);if(l){var c=s.map(function(u){return u.object});l.createStampFromAnnotations(c,{name:Ne.Custom,subject:"Custom Stamp ".concat(Date.now()),categories:["custom","sidebar"]});var d=(o=i.getPlugin(Dt))===null||o===void 0||(o=o.provides())===null||o===void 0?void 0:o.forDocument(r);d?.setActiveSidebar("left","main","rubber-stamp-panel",void 0,{selectedLibraryId:"custom"})}}}},visible:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin(J))===null||t===void 0?void 0:t.provides().forDocument(o);if(!i)return!1;var r=i.getSelectedAnnotations();if(r.length===0)return!1;var a=[z.REDACT,z.HIGHLIGHT,z.SQUIGGLY,z.UNDERLINE,z.STRIKEOUT,z.CARET,z.WIDGET];return r.every(function(s){return!a.includes(s.object.type)})},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)||ke(t,n,j.CopyContents)}},"annotation:overflow-tools":{id:"annotation:overflow-tools",labelKey:"annotation.moreTools",icon:"dots",categories:["annotation","annotation-overflow"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("ui"))===null||t===void 0?void 0:t.provides();if(i){var r=i.forDocument(o);r&&r.toggleMenu("annotation-tools-menu","annotation:overflow-tools","overflow-annotation-tools")}},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins.ui)===null||t===void 0?void 0:t.documents[o];return i?.openMenus["annotation-tools-menu"]!==void 0},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:overflow-shapes":{id:"annotation:overflow-shapes",labelKey:"annotation.moreTools",icon:"dots",categories:["annotation","annotation-shape","annotation-overflow"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("ui"))===null||t===void 0?void 0:t.provides();if(i){var r=i.forDocument(o);r&&r.toggleMenu("shapes-tools-menu","annotation:overflow-shapes","overflow-shapes-tools")}},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins.ui)===null||t===void 0?void 0:t.documents[o];return i?.openMenus["shapes-tools-menu"]!==void 0},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"form:overflow-tools":{id:"form:overflow-tools",labelKey:"annotation.moreTools",icon:"dots",categories:["form","form-overflow"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("ui"))===null||t===void 0?void 0:t.provides();if(i){var r=i.forDocument(o);r&&r.toggleMenu("form-tools-menu","form:overflow-tools","overflow-forms-tools")}},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins.ui)===null||t===void 0?void 0:t.documents[o];return i?.openMenus["form-tools-menu"]!==void 0},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}}
2214,"annotation:add-link":{id:"annotation:add-link",labelKey:"annotation.addLink",icon:"link",categories:["annotation","annotation-link"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("ui"))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).openModal("link-modal",{source:"selection"})},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:toggle-annotation-style":{id:"annotation:toggle-annotation-style",labelKey:"annotation.style",icon:"palette",categories:["annotation","annotation-style"],action:function(e){var t=e.registry,n=e.documentId,o=t.getPlugin(Dt);if(o&&o.provides){var i=o.provides();i&&i.forDocument(n).toggleSidebar("left","main","annotation-panel")}},active:function(e){var t=e.state,n=e.documentId;return pn(t.plugins,n,"left","main","annotation-panel")},visible:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin(J))===null||t===void 0?void 0:t.provides().forDocument(o),r=i?.getSelectedAnnotation();return!r||r.object.type!==z.LINK},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:toggle-link":{id:"annotation:toggle-link",labelKey:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin(J))===null||t===void 0?void 0:t.provides().forDocument(o);if(!i)return"annotation.addLink";var r=i.getSelectedAnnotation();return r&&i.hasAttachedLinks(r.object.id)?"annotation.removeLink":"annotation.addLink"},icon:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin(J))===null||t===void 0?void 0:t.provides().forDocument(o);if(!i)return"link";var r=i.getSelectedAnnotation();return r&&i.hasAttachedLinks(r.object.id)?"linkOff":"link"},categories:["annotation","annotation-link"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=(n=o.getPlugin("ui"))===null||n===void 0?void 0:n.provides();if(r&&a){var s=r.forDocument(i),l=s.getSelectedAnnotation();l&&(s.hasAttachedLinks(l.object.id)?s.deleteAttachedLinks(l.object.id):a.forDocument(i).openModal("link-modal",{source:"annotation"}))}},visible:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin(J))===null||t===void 0?void 0:t.provides().forDocument(o),r=i?.getSelectedAnnotation();return!r||r.object.type!==z.LINK&&r.object.type!==z.REDACT&&r.object.type!==z.WIDGET},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyAnnotations)}},"annotation:toggle-widget-edit":{id:"annotation:toggle-widget-edit",labelKey:"annotation.widgetEdit",icon:"widgetEdit",categories:["annotation","annotation-widget-edit"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),a=(n=o.getPlugin("ui"))===null||n===void 0?void 0:n.provides();r&&a&&r.forDocument(i).getSelectedAnnotation()&&a.forDocument(i).toggleSidebar("right","main","widget-edit-panel")},active:function(e){var t=e.state,n=e.documentId;return pn(t.plugins,n,"right","main","widget-edit-panel")},visible:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin(J))===null||t===void 0?void 0:t.provides().forDocument(o),r=i?.getSelectedAnnotation();return!r||r.object.type===z.WIDGET}},"annotation:toggle-comment":{id:"annotation:toggle-comment",labelKey:"annotation.comment",icon:"comment",categories:["annotation","annotation-comment"],action:function(e){var t=e.registry,n=e.documentId,o=t.getPlugin(Dt);if(o&&o.provides){var i=o.provides();i&&i.forDocument(n).toggleSidebar("right","main","comment-panel")}},active:function(e){var t=e.state,n=e.documentId;return pn(t.plugins,n,"right","main","comment-panel")},visible:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin(J))===null||t===void 0?void 0:t.provides().forDocument(o),r=i?.getSelectedAnnotation();return!r||r.object.type!==z.LINK&&r.object.type!==z.WIDGET}},"annotation:goto-link":{id:"annotation:goto-link",labelKey:"annotation.gotoLink",icon:"externalLink",categories:["annotation","annotation-link"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides();if(r){var a=r.forDocument(i),s=a.getSelectedAnnotation();if(s){var l=null;if((function(d){return d.object.type===z.LINK})(s))l=s.object;else{var c=a.getAttachedLinks(s.object.id);c.length>0&&(l=c[0].object)}(n=l)!==null&&n!==void 0&&n.target&&a.navigateTarget(l.target)}}},visible:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin(J))===null||t===void 0?void 0:t.provides();if(!i)return!1;var r=i.forDocument(o),a=r?.getSelectedAnnotation();return!!a&&(a.object.type===z.LINK||r.hasAttachedLinks(a.object.id))}},"redaction:redact":{id:"redaction:redact",labelKey:"redaction.redact",icon:"redactArea",categories:["redaction","redaction-combined"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("redaction"))===null||t===void 0?void 0:t.provides();i?.forDocument(o).toggleRedact()},active:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin("redaction"))===null||t===void 0?void 0:t.provides();return(n=r?.forDocument(i).isRedactActive())!==null&&n!==void 0&&n},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyContents)}},"redaction:redact-area":{id:"redaction:redact-area",labelKey:"redaction.area",icon:"redactArea",categories:["redaction","redaction-area"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("redaction"))===null||t===void 0?void 0:t.provides();i?.forDocument(o).toggleMarqueeRedact()},active:function(e){var t,n,o=e.registry,i=e.documentId,r=(t=o.getPlugin("redaction"))===null||t===void 0?void 0:t.provides();return(n=r?.forDocument(i).isMarqueeRedactActive())!==null&&n!==void 0&&n},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyContents)}},"redaction:redact-text":{id:"redaction:redact-text",labelKey:"redaction.text",icon:"redact",categories:["redaction","redaction-text"],action:function(e){var t,n,o,i,r=e.registry,a=e.documentId,s=(t=r.getPlugin("redaction"))===null||t===void 0?void 0:t.provides(),l=(n=r.getPlugin(uo))===null||n===void 0?void 0:n.provides(),c=(o=r.getPlugin("ui"))===null||o===void 0?void 0:o.provides();if(s&&l&&c){var d,u=s.forDocument(a),m=l?.forDocument(a);((i=m?.getFormattedSelection())!==null&&i!==void 0?i:[]).length>0?((d=r.getPlugin(J))===null||d===void 0||d.provides().forDocument(a).setLocked({type:ct.Exclude,categories:["redaction"]}),u.queueCurrentSelectionAsPending(),c.setActiveToolbar("top","secondary","redaction-toolbar",a)):u.toggleRedactSelection()}},active:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[jo])===null||t===void 0?void 0:t.documents[o];return i?.activeType===Je.RedactSelection},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyContents)}},"redaction:apply-all":{id:"redaction:apply-all",labelKey:"redaction.applyAll",icon:"check",categories:["redaction","redaction-apply"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("redaction"))===null||t===void 0?void 0:t.provides();i?.forDocument(o).commitAllPending()},disabled:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[jo])===null||t===void 0?void 0:t.documents[o];return i?.pendingCount===0||ke(n,o,j.ModifyContents)}},"redaction:clear-all":{id:"redaction:clear-all",labelKey:"redaction.clearAll",icon:"x",categories:["redaction","redaction-clear"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("redaction"))===null||t===void 0?void 0:t.provides();i?.forDocument(o).clearPending()},disabled:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[jo])===null||t===void 0?void 0:t.documents[o];return i?.pendingCount===0||ke(n,o,j.ModifyContents)}},"redaction:delete-selected":{id:"redaction:delete-selected",labelKey:"redaction.deleteSelected",icon:"trash",categories:["redaction","redaction-delete"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("redaction"))===null||t===void 0?void 0:t.provides(),r=i?.forDocument(o).getSelectedPending();r&&i?.forDocument(o).removePending(r.page,r.id)}},"redaction:commit-selected":{id:"redaction:commit-selected",labelKey:"redaction.commitSelected",icon:"check",categories:["redaction","redaction-commit"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin("redaction"))===null||t===void 0?void 0:t.provides(),r=i?.forDocument(o).getSelectedPending();r&&i?.forDocument(o).commitPending(r.page,r.id)}},"annotation:apply-redaction":{id:"annotation:apply-redaction",labelKey:"redaction.apply",icon:"check",categories:["annotation","annotation-redaction","redaction"],action:function(e){var t,n,o=e.registry,i=e.documentId,r=e.logger;r.debug("Command","ApplyRedaction","Starting for document: ".concat(i));var a=(t=o.getPlugin(J))===null||t===void 0?void 0:t.provides(),s=(n=o.getPlugin(jo))===null||n===void 0?void 0:n.provides();if(a&&s){var l=a.forDocument(i).getSelectedAnnotation();r.debug("Command","ApplyRedaction","Selected annotation: ".concat(l?JSON.stringify({id:l.object.id,type:l.object.type,pageIndex:l.object.pageIndex}):"none")),l&&l.object.type===z.REDACT?(r.debug("Command","ApplyRedaction","Calling commitPending for page ".concat(l.object.pageIndex,", id ").concat(l.object.id)),s.forDocument(i).c
2214ommitPending(l.object.pageIndex,l.object.id),r.debug("Command","ApplyRedaction","commitPending called successfully")):r.warn("Command","ApplyRedaction","No valid redaction selected - selected: ".concat(!!l,", type: ").concat(l?.object.type))}else r.warn("Command","ApplyRedaction","Missing plugins - annotation: ".concat(!!a,", redaction: ").concat(!!s))},visible:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin(J))===null||t===void 0?void 0:t.provides().forDocument(o),r=i?.getSelectedAnnotation();return r?.object.type===z.REDACT},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.ModifyContents)}},"selection:copy-to-clipboard":{id:"selection:copy-to-clipboard",labelKey:"selection.copyToClipboard",icon:"copy",shortcuts:["Ctrl+C","Meta+C"],categories:["selection","selection-copy-to-clipboard"],action:function(e){var t=e.registry,n=e.documentId,o=t.getPlugin("selection"),i=o?.provides().forDocument(n);i?.copyToClipboard()},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.CopyContents)}},"selection:copy":{id:"selection:copy",labelKey:"selection.copy",icon:"copy",categories:["selection","selection-copy"],action:function(e){var t=e.registry,n=e.documentId,o=t.getPlugin("selection"),i=o?.provides().forDocument(n);i?.copyToClipboard(),i?.clear()},disabled:function(e){var t=e.state,n=e.documentId;return ke(t,n,j.CopyContents)}},"history:undo":{id:"history:undo",labelKey:"history.undo",icon:"arrowBackUp",shortcuts:["Ctrl+Z","Meta+Z"],categories:["history","history-undo"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin(Fo))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).undo()},disabled:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[Fo])===null||t===void 0?void 0:t.documents[o];return!(i!=null&&i.global.canUndo)}},"history:redo":{id:"history:redo",labelKey:"history.redo",icon:"arrowForwardUp",shortcuts:["Ctrl+Y","Meta+Shift+Z"],categories:["history","history-redo"],action:function(e){var t,n=e.registry,o=e.documentId,i=(t=n.getPlugin(Fo))===null||t===void 0?void 0:t.provides();i&&i.forDocument(o).redo()},disabled:function(e){var t,n=e.state,o=e.documentId,i=(t=n.plugins[Fo])===null||t===void 0?void 0:t.documents[o];return!(i!=null&&i.global.canRedo)}}},ww={"zoom.level":function(e){var t,n,o=e.state,i=e.documentId,r=i&&(t=(n=o.plugins[Qs])===null||n===void 0||(n=n.documents[i])===null||n===void 0?void 0:n.currentZoomLevel)!==null&&t!==void 0?t:1;return{level:Math.round(100*r)}}},xw={colors:{background:{app:"#f3f4f6",surface:"#ffffff",surfaceAlt:"#f1f3f5",elevated:"#ffffff",overlay:"rgba(0, 0, 0, 0.5)",input:"#ffffff"},foreground:{primary:"#111827",secondary:"#374151",muted:"#6b7280",disabled:"#9ca3af",onAccent:"#ffffff"},border:{default:"#d1d5db",subtle:"#e5e7eb",strong:"#9ca3af"},accent:{primary:"#3b82f6",primaryHover:"#2563eb",primaryActive:"#1d4ed8",primaryLight:"#eff6ff",primaryForeground:"#ffffff"},interactive:{hover:"#f3f4f6",active:"#e5e7eb",selected:"#eff6ff",focus:"#3b82f6",focusRing:"#bfdbfe"},state:{error:"#ef4444",errorLight:"#fef2f2",warning:"#f59e0b",warningLight:"#fffbeb",success:"#22c55e",successLight:"#f0fdf4",info:"#3b82f6",infoLight:"#eff6ff"},tooltip:{background:"#111827",foreground:"#ffffff"},scrollbar:{track:"#f3f4f6",thumb:"#d1d5db",thumbHover:"#9ca3af"}}},Cw={colors:{background:{app:"#111827",surface:"#1f2937",surfaceAlt:"#374151",elevated:"#1f2937",overlay:"rgba(0, 0, 0, 0.7)",input:"#374151"},foreground:{primary:"#f9fafb",secondary:"#e5e7eb",muted:"#9ca3af",disabled:"#6b7280",onAccent:"#111827"},border:{default:"#4b5563",subtle:"#374151",strong:"#6b7280"},accent:{primary:"#60a5fa",primaryHover:"#3b82f6",primaryActive:"#2563eb",primaryLight:"#1e3a5f",primaryForeground:"#111827"},interactive:{hover:"#374151",active:"#4b5563",selected:"#1e3a5f",focus:"#60a5fa",focusRing:"#1e40af"},state:{error:"#f87171",errorLight:"#7f1d1d",warning:"#fbbf24",warningLight:"#78350f",success:"#4ade80",successLight:"#14532d",info:"#60a5fa",infoLight:"#1e3a5f"},tooltip:{background:"#f9fafb",foreground:"#111827"},scrollbar:{track:"#1f2937",thumb:"#4b5563",thumbHover:"#6b7280"}}};function L0(e,t){var n=U({},e);for(var o in t){var i=t[o];i&&yo(i)==="object"&&!Array.isArray(i)?n[o]=L0(e[o]||{},i):i!==void 0&&(n[o]=i)}return n}function kw(e,t){return{colors:L0(e.colors,t)}}function xu(e){return e==="system"?typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
2214k":"light":e}function Cu(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Iw(e){return`:host { 2215`.concat((function(t){var n=[];return(function o(i,r){for(var a=0,s=Object.entries(i);a<s.length;a++){var l=X(s[a],2),c=l[0],d=l[1];d&&yo(d)==="object"?o(d,"".concat(r,"-").concat(Cu(c))):d!==void 0&&n.push(" --ep".concat(r,"-").concat(Cu(c),": ").concat(d,";"))}})(t.colors,""),n.join(` 2216`)})(e),` 2217}`)}function Sw(e){var t=e.documentStates,n=e.activeDocumentId,o=e.visibility,i=o===void 0?"multiple":o,r=e.allowOpenFile,a=r===void 0||r,s=Xo().provides,l=Y(function(u){s?.setActiveDocument(u)},[s]),c=Y(function(u){s?.closeDocument(u)},[s]),d=Y(function(){s?.openFileDialog()},[s]);return i==="always"||i==="multiple"&&t.length>1?h("div",{className:"bg-bg-surface-alt flex items-end pr-2 pt-2"},h("div",{className:"flex flex-1 items-end overflow-x-auto pl-4"},t.map(function(u){var m,g,p=n===u.id;return h("div",{key:u.id,onClick:function(){return l(u.id)},role:"tab",tabIndex:0,"aria-selected":p,onKeyDown:function(f){f.key!=="Enter"&&f.key!==" "||(f.preventDefault(),l(u.id))},className:"group relative flex min-w-[120px] max-w-[240px] cursor-pointer items-center gap-2 rounded-t-lg px-4 py-2 text-sm font-medium transition-all ".concat(p?"bg-bg-surface text-fg-primary z-10":"bg-bg-surface-alt text-fg-secondary hover:bg-interactive-hover hover:text-fg-primary")},h("span",{className:"min-w-0 flex-1 truncate"},(m=u.name)!==null&&m!==void 0?m:"Document ".concat(u.id.slice(0,8))),p&&h("button",{onClick:function(f){f.stopPropagation(),c(u.id)},"aria-label":"Close ".concat((g=u.name)!==null&&g!==void 0?g:"document"),className:"hover:bg-interactive-hover flex-shrink-0 cursor-pointer rounded-full p-1 transition-all ".concat(p?"opacity-100":"opacity-0 group-hover:opacity-100")},h(Se,{icon:"x",size:14})))}),a&&h("button",{onClick:d,className:"text-fg-secondary hover:bg-interactive-hover hover:text-fg-primary mb-1.5 ml-1 flex-shrink-0 cursor-pointer rounded p-1.5 transition-colors","aria-label":"Open File",title:"Open File"},h(Se,{icon:"plus",size:14})))):null}function Mw(){var e=Xo().provides,t=qe().translate;return h("div",{className:"bg-bg-app flex h-full w-full items-center justify-center"},h("div",{className:"flex max-w-sm flex-col items-center text-center"},h("div",{className:"bg-accent-light mb-6 rounded-full p-5"},h(Se,{icon:"file",size:48,className:"text-accent"})),h("h2",{className:"text-fg-primary mb-2 text-xl font-semibold"},t("emptyState.title")),h("p",{className:"text-fg-secondary mb-6 text-sm leading-relaxed"},t("emptyState.description"),h("br",null),t("emptyState.descriptionMulti")),h("button",{onClick:function(){e?.openFileDialog()},className:"bg-accent hover:bg-accent-hover text-accent-fg inline-flex cursor-pointer items-center gap-2 rounded-md px-5 py-2.5 text-sm font-medium shadow-sm transition-all"},h(Se,{icon:"plus",size:16}),t("emptyState.openButton")),h("p",{className:"text-fg-muted mt-4 text-xs"},t("emptyState.supportedFormats"))))}function Aw(e){var t=e.documentState,n=Xo().provides,o=qe().translate,i=X($(""),2),r=i[0],a=i[1],s=X($(!1),2),l=s[0],c=s[1];if(!t)return null;var d=t.name,u=t.errorCode,m=t.passwordProvided,g=u===Z.Password,p=g&&!m,f=g&&m;if(!g)return h("div",{className:"bg-bg-app flex h-full items-center justify-center p-8"},h("div",{className:"bg-bg-surface border-border-default flex max-w-sm flex-col items-center rounded-xl border p-6 text-center shadow-lg"},h("div",{className:"bg-state-error-light mb-4 rounded-full p-4"},h(Se,{icon:"alertTriangle",size:28,className:"text-state-error"})),h("h3",{className:"text-fg-primary text-lg font-semibold"},o("documentError.title")),h("p",{className:"text-fg-secondary mt-2 text-sm"},t.error||o("documentError.unknown")),u&&h("p",{className:"text-fg-muted mt-1 text-xs"},o("documentError.errorCode",{params:{code:String(u)}})),h("button",{onClick:function(){return n?.closeDocument(t.id)},className:"bg-accent hover:bg-accent-hover text-accent-fg mt-5 w-full cursor-pointer rounded-md px-4 py-2.5 text-sm font-medium transition-colors"},o("documentError.close"))));var v=(function(){var y=Fu(yi().m(function b(){return yi().w(function(w){for(;;)switch(w.n){case 0:if(n&&r.trim()){w.n=1;break}return w.a(2);case 1:c(!0),n.retryDocument(t.id,{password:r}).wait(function(){a(""),c(!1)},function(x){console.error("Retry failed:",x),c(!1)});case 2:return w.a(2)}},b)}));return function(){return y.apply(this,arguments)}})();return h("div",{className:"bg-bg-app flex h-full items-center justify-center p-8"},h("div",{className:"bg-bg-surface border-border-default w-full max-w-sm rounded-xl border p-6 shadow-lg"},h("div",{className:"flex flex-col items-center text-center"},h("div",{className:"bg-accent-light mb-4 rounded-full p-4"},h(Se,{icon:"lock",size:28,className:"text-accent"})),h("h3",{className:"text-fg-primary text-lg font-semibold"},o("passwordPrompt.title")),d&&h("p",{className:"text-fg-muted mt-1 text-sm"},d)),h("p",{className:"text-fg-secondary mt-4 text-center text-sm"},p&&o("passwordPrompt.required"),f&&o("passwordPrompt.incorrect")),h("div",{className:"mt-5"},h("label",{className:"text-fg-primary mb-1.5 block text-sm font-medium"},o("passwordPrompt.label")),h("input",{type:"password",value:r,onInput:function(y){return a(y.target.value)},onKeyDown:function(y){return y.key==="Enter"&&!l&&r.trim()&&v()},disabled:l,placeholder:o("passwordPrompt.placeholder"),className:"bg-bg-input border-border-default focus:border-accent focus:ring-accent text-fg-primary placeholder:text-fg-muted block w-full rounded-md border px-3 py-2.5 text-sm focus:outline-none focus:ring-1 disabled:opacity-50",autoFocus:!0})),f&&h("div",{className:"bg-state-error-light border-state-error mt-3 flex items-center gap-2 rounded-md border p-3"},h(Se,{icon:"alertTriangle",size:16,className:"text-state-error flex-shrink-0"}),h("p",{className:"text-state-error text-sm"},o("passwordPrompt.incorrectWarning"))),h("div",{className:"mt-6 flex gap-3"},h("button",{onClick:function(){return n?.closeDocument(t.id)},disabled:l,className:"border-border-default text-fg-secondary hover:bg-interactive-hover flex-1 cursor-pointer rounded-md border px-4 py-2.5 text-sm font-medium transition-colors disabled:opacity-50"},o("passwordPrompt.cancel")),h("button",{onClick:v,disabled:l||!r.trim(),className:"bg-accent hover:bg-accent-hover text-accent-fg flex-1 cursor-pointer rounded-md px-4 py-2.5 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50"},o(l?"passwordPrompt.opening":"passwordPrompt.open")))))}function Pw(e){var t=e.documentId,n=e.className,o=nn("mode:view",t),i=nn("mode:annotate",t),r=nn("mode:shapes",t),a=nn("mode:redact",t),s=nn("mode:form",t),l=nn("mode:insert",t),c=nn("tabs:overflow-menu",t),d=ee(function(){return[o,i,r,s,l,a].find(function(g){return g?.active})||o},[o,i,r,s,l,a]),u=Y(function(g){g.preventDefault(),g.stopPropagation(),c&&!c.disabled&&c.execute()},[c]);if(!c||!c.visible)return null;var m=c.active;return h("div",{style:{maxWidth:"100px",width:"100px"},className:n},h(ht,{className:"bg-bg-surface col-start-1 row-start-1 !w-full appearance-none rounded-md py-1.5 pl-3 pr-2 text-[13px] ".concat(m?"bg-interactive-selected ring-accent border-none shadow ring":"border-border-default outline-border-default hover:bg-interactive-hover hover:ring-accent outline outline-1 -outline-offset-1 hover:ring"," flex flex-row items-center justify-between gap-2"),onClick:u,disabled:c.disabled,style:{height:34}},h("span",{className:"min-w-0 flex-1 truncate text-left ".concat(m?"text-accent":"text-fg-primary")},d?.label),h(Se,{icon:"chevronDown",className:"h-4 w-4 ".concat(m?"text-accent":"text-fg-secondary")})))}function Dw(e){var t=e.documentId,n=C1().provides,o=X($(!1),2),i=o[0],r=o[1],a=X($(null),2),s=a[0],l=a[1],c=X($(null),2),d=c[0],u=c[1],m=X($(null),2),g=m[0],p=m[1],f=Q(null),v=Q(null),y=qe(t).translate,b=function(){f.current&&(URL.revokeObjectURL(f.current),f.current=null),g&&(URL.revokeObjectURL(g),p(null)),r(!1),l(null),u(null)};return H(function(){if(n)return n.onCaptureArea(function(w){var x=w.pageIndex,k=w.rect,I=w.blob;l({pageIndex:x,rect:k,blob:I});var S=URL.createObjectURL(I);f.current=S,u(S),r(!0)})},[n]),h(fe,null,h(Ui,{open:i,onClose:b,title:y("capture.title"),className:"md:w-[48rem]"},h("div",{className:"space-y-6"},h("div",{className:"flex justify-center"},d&&h("img",{src:d,onLoad:function(){f.current&&(URL.revokeObjectURL(f.current),f.current=null)},alt:"Captured PDF area",style:{maxWidth:"100%",maxHeight:"400px",border:"1px solid #e5e7eb",borderRadius:"4px",display:"block"}})),h("div",{className:"border-border-subtle flex justify-end space-x-3 border-t pt-4"},h(ht,{onClick:b,className:"border-border-default bg-bg-surface text-fg-secondary hover:bg-interactive-hover rounded-md border px-4 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-50"},y("capture.cancel")),h(ht,{onClick:function(){if(s&&v.current){var w=URL.createObjectURL(s.blob);p(w),v.current.href=w,v.current.download="pdf-capture-page-".concat(s.pageIndex+1,".png"),v.current.click(),b()}},disabled:!s,className:"bg-accent text-fg-on-accent hover:!bg-accent-hover flex items-center space-x-2 rounded-md border border-transparent px-4 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-50"},y("capture.download"))))),h("a",{ref:v,style:{display:"none"},href:"",download:""}))}var yr=[{flag:j.Print,labelKey:"protect.permissions.print"},{flag:j.PrintHighQuality,labelKey:"protect.permissions.printHighQuality"},{flag:j.CopyContents,labelKey:"protect.permissions.copy"},{flag:j.ExtractForAccessibility,labelKey:"protect.permissions.accessibility"},{flag:j.ModifyContents,labelKey:"protect.permissions.modify"},{flag:j.ModifyAnnotations,labelKey:"protect.permissions.annotations"},{flag:j.FillForms,labelKey:"protect.permissions.fillForms"},{flag:j.AssembleDocument,labelKey:"protect.permissions.assemble"}];function O0(e){var t=e.permissions,n=e.translate,o=e.label;return h("div",null,h("label",{className:"text-fg-secondary mb-2 block text-sm font-medium"},o??n("security.viewPermissions.restrictedActions")),h("div",{className:"grid grid-cols-1 gap-1 sm:grid-cols-2"},yr.map(function(i){var r,a=(r=i.flag,(t&r)!==0);return h("div",{key:i.flag,className:"flex items-center rounded-md p-2 ".concat(a?"text-fg-primary":"text-fg-muted")},h(Se,{icon:a?"check":"x",className:"mr-2 h-4 w-4 flex-shrink-0 ".concat(a?"text-state-success":"text-state-error")}),h("span",{className:"text-sm"},n(i.labelKey)))})))}function Tw(e){var t,n,o,i=e.documentId,r=e.isOpen,a=e.onClose,s=e.onExited,l=qe(i).translate,c=Xo().provides,d=At(i),u=d?.document,m=(t=u?.isEncrypted)!==null&&t!==void 0&&t,g=(n=u?.isOwnerUnlocked)!==null&&n!==void 0&&n,p=(o=u?.permissions)!==null&&o!==void 0?o:0,f=X($("edit-protection"),2),v=f[0],y=f[1],b=X($(""),2),w=b[0],x=b[1],k=X($(!1),2),I=k[0],S=k[1],A=X($(!1),2),M=A[0],P=A[1],T=X($(null),2),D=T[0],F=T[1],N=X($(!1),2),W=N[0],_=N[1],G=X($(""),2),q=G[0],O=G[1],V=X($(""),2),te=V[0],he=V[1],ne=X($(!1),2),K=ne[0],le=ne[1],ie=X($(!1),2),Fe=ie[0],He=ie[1],it=X($(""),2),Ve=it[0],kt=it[1],Qe=X($(""),2),lt=Qe[0],we=Qe[1],_e=X($(!1),2),Pe=_e[0],We=_e[1],It=$(new Set(yr.map(function(Me){return Me.flag}))),je=X(It,2),dn=je[0],_n=je[1],un=X($(!1),2),Be=un[0],Ft=un[1],Cn=X($(null),2),qt=Cn[0],Rt=Cn[1];H(function(){r&&(x(""),S(!1),P(!1),F(null),_(!1),O(""),he(""),le(!1),He(!1),kt(""),we(""),We(!1),_n(new Set(yr.map(function(Me){return Me.flag}))),Ft(!1),Rt(null),y(m&&!g?"unlock":m&&g?"choose-action":"edit-protection"))},[r,m,g]);var Vt=q===te,Ln=Ve===lt,Jo=!W||q.length>0&&Vt,no=!Fe||Ve.length>0&&Ln,oo=(W||Fe)&&Jo&&no&&!Be,On=function(){c&&w&&(P(!0),F(null),c.unlockOwnerPermissions(i,w).wait(function(Me){P(!1),Me?y("choose-action"):F(l("security.unlock.invalidPassword"))},function(Me){var tt,me;P(!1),F((tt=(me=Me.reason)===null||me===void 0?void 0:me.message)!==null&&tt!==void 0?tt:l("security.unlock.failed"))}))},tn=function(){if(oo&&c){var Me=0;if(Fe){var tt,me=Yt(dn);try{for(me.s();!(tt=me.n()).done;)Me|=tt.value}catch(mt){me.e(mt)}finally{me.f()}}else Me=j.AllowAll;var nt=W?q:"",io=Fe?Ve:W?q:"";Ft(!0),Rt(null),c.setDocumentEncryption(i,{userPassword:nt,ownerPassword:io,allowedFlags:Me}).wait(function(mt){Ft(!1),mt?a?.():Rt(l("protect.applyFailed"))},function(mt){var kn,$n;Ft(!1),Rt((kn=($n=mt.reason)===null||$n===void 0?void 0:$n.message)!==null&&kn!==void 0?kn:l("protect.applyFailed"))})}},hn=function(){c&&(Ft(!0),Rt(null),c.removeEncryption(i).wait(function(Me){Ft(!1),Me?a?.():Rt(l("protect.removeFailed"))},function(Me){var tt,me;Ft(!1),Rt((tt=(me=Me.reason)===null||me===void 0?void 0:me.message)!==null&&tt!==void 0?tt:l("protect.removeFailed"))}))},Nn=function(){return h("div",{className:"space-y-6"},h("div",{className:"bg-bg-subtle rounded-lg"},h("label",{className:"flex cursor-pointer items-start"},h("input",{type:"checkbox",checked:W,onChange:function(Me){return _(Me.target.checked)},className:"accent-accent mr-3 mt-0.5"}),h("div",{className:"flex-1"},h("span",{className:"text-fg-primary block font-medium"},l("protect.openPassword.title")),h("span",{className:"text-fg-muted text-sm"},l("protect.openPassword.description")))),W&&h("div",{className:"mt-4 space-y-3 pl-6"},h("div",null,h("label",{className:"text-fg-secondary mb-1 block text-sm"},l("protect.openPassword.label")),h("div",{className:"relative"},h("input",{type:K?"text":"password",value:q,onInput:function(Me){return O(Me.target.value)},placeholder:l("protect.openPassword.placeholder"),className:"border-border-default bg-bg-input text-fg-primary focus:border-accent focus:ring-accent w-full rounded-md border px-3 py-2 pr-10 text-sm focus:outline-none focus:ring-1"}),h("button",{type:"button",onClick:function(){return le(!K)},className:"text-fg-muted hover:text-fg-secondary absolute right-2 top-1/2 -translate-y-1/2"},h(Se,{icon:K?"eye-off":"eye",className:"h-4 w-4"})))),h("div",null,h("label",{className:"text-fg-secondary mb-1 block text-sm"},l("protect.openPassword.confirm")),h("input",{type:K?"text":"password",value:te,onInput:function(Me){return he(Me.target.value)},placeholder:l("protect.openPassword.confirmPlaceholder"),className:"border-border-default bg-bg-input text-fg-primary focus:ring-accent w-full rounded-md border px-3 py-2 text-sm focus:outline-none focus:ring-1 ".concat(te&&!Vt?"border-state-error focus:border-state-error":"focus:border-accent")}),te&&!Vt&&h("p",{className:"text-state-error mt-1 text-xs"},l("protect.passwordMismatch"))))),h("div",{className:"bg-bg-subtle rounded-lg"},h("label",{className:"flex cursor-pointer items-start"},h("input",{type:"checkbox",checked:Fe,onChange:function(Me){return He(Me.target.checked)},className:"accent-accent mr-3 mt-0.5"}),h("div",{className:"flex-1"},h("span",{className:"text-fg-primary block font-medium"},l("protect.permissions.title")),h("span",{className:"text-fg-muted text-sm"},l("protect.permissions.description")))),Fe&&h("div",{className:"mt-4 space-y-4 pl-6"},h("div",{className:"border-border-subtle border-b pb-4"},h("div",null,h("label",{className:"text-fg-secondary mb-1 block text-sm"},l("protect.ownerPassword.label")),h("div",{className:"relative"},h("input",{type:Pe?"text":"password",value:Ve,onInput:function(Me){return kt(Me.target.value)},placeholder:l("protect.ownerPassword.placeholder"),className:"border-border-default bg-bg-input text-fg-primary focus:border-accent focus:ring-accent w-full rounded-md border px-3 py-2 pr-10 text-sm focus:outline-none focus:ring-1"}),h("button",{type:"button",onClick:function(){return We(!Pe)},className:"text-fg-muted hover:text-fg-secondary absolute right-2 top-1/2 -translate-y-1/2"},h(Se,{icon:Pe?"eye-off":"eye",className:"h-4 w-4"})))),h("div",{className:"mt-3"},h("label",{className:"text-fg-secondary mb-1 block text-sm"},l("protect.ownerPassword.confirm")),h("input",{type:Pe?"text":"password",value:lt,onInput:function(Me){return we(Me.target.value)},placeholder:l("protect.ownerPassword.confirmPlaceholder"),className:"border-border-default bg-bg-input text-fg-primary focus:ring-accent w-full rounded-md border px-3 py-2 text-sm focus:outline-none focus:ring-1 ".concat(lt&&!Ln?"border-state-error focus:border-state-error":"focus:border-accent")}),lt&&!Ln&&h("p",{className:"text-state-error mt-1 text-xs"},l("protect.passwordMismatch")))),h("div",null,h("label",{className:"text-fg-secondary mb-2 block text-
2217sm font-medium"},l("protect.permissions.allowedActions")),h("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2"},yr.map(function(Me){return h("label",{key:Me.flag,className:"hover:bg-bg-surface flex cursor-pointer items-center rounded-md p-2 transition-colors"},h("input",{type:"checkbox",checked:dn.has(Me.flag),onChange:function(){return tt=Me.flag,void _n(function(me){var nt=new Set(me);return nt.has(tt)?nt.delete(tt):(nt.add(tt),tt===j.PrintHighQuality&&nt.add(j.Print)),nt});var tt},className:"accent-accent mr-2"}),h("span",{className:"text-fg-primary text-sm"},l(Me.labelKey)))}))))),W&&Fe&&h("div",{className:"bg-state-info-light flex items-start space-x-2 rounded-md p-3"},h(Se,{icon:"info",className:"text-accent mt-0.5 h-4 w-4 flex-shrink-0"}),h("p",{className:"text-fg-secondary text-sm"},l("protect.bothPasswordsNote"))),!W&&!Fe&&!qt&&h("div",{className:"bg-state-warning-light flex items-start space-x-2 rounded-md p-3"},h(Se,{icon:"alertTriangle",className:"text-state-warning mt-0.5 h-4 w-4 flex-shrink-0"}),h("p",{className:"text-fg-secondary text-sm"},l("protect.noProtectionSelected"))),qt&&h("div",{className:"bg-state-error-light flex items-start space-x-2 rounded-md p-3"},h(Se,{icon:"alertTriangle",className:"text-state-error mt-0.5 h-4 w-4 flex-shrink-0"}),h("p",{className:"text-state-error text-sm"},qt)),h("div",{className:"border-border-subtle flex justify-end space-x-3 border-t pt-4"},m&&g&&h(ht,{onClick:function(){return y("choose-action")},disabled:Be,className:"border-border-default bg-bg-surface text-fg-secondary hover:bg-interactive-hover rounded-md border px-4 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-50"},l("common.back")),h(ht,{onClick:tn,disabled:!oo,className:"bg-accent text-fg-on-accent hover:!bg-accent-hover flex items-center space-x-2 rounded-md border border-transparent px-4 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-50"},Be&&h(Wo,{size:"sm"}),h("span",null,l(Be?"protect.applying":"protect.apply")))))};return h(Ui,{open:r!=null&&r,title:(function(){switch(v){case"unlock":return l("protect.encrypted.title");case"choose-action":return l("protect.modifyProtection.title");case"remove-protection":return l("protect.removeProtection.title");default:return l("protect.title")}})(),onClose:a,onExited:s,className:"md:w-[36rem]"},(function(){switch(v){case"unlock":return h("div",{className:"space-y-5"},h("p",{className:"text-fg-secondary text-sm"},l("protect.encrypted.description")),h("div",null,h("label",{className:"text-fg-primary mb-2 block text-sm font-medium"},l("protect.encrypted.enterOwnerPassword")),h("div",{className:"relative"},h("input",{type:I?"text":"password",value:w,onInput:function(Me){return x(Me.target.value)},placeholder:l("protect.ownerPassword.placeholder"),className:"border-border-default bg-bg-input text-fg-primary focus:border-accent focus:ring-accent w-full rounded-md border px-3 py-2 pr-10 text-sm focus:outline-none focus:ring-1",onKeyDown:function(Me){Me.key==="Enter"&&w&&On()}}),h("button",{type:"button",onClick:function(){return S(!I)},className:"text-fg-muted hover:text-fg-secondary absolute right-2 top-1/2 -translate-y-1/2"},h(Se,{icon:I?"eye-off":"eye",className:"h-4 w-4"}))),D&&h("p",{className:"text-state-error mt-2 text-xs"},D)),h(O0,{permissions:p,translate:l}),h("div",{className:"border-border-subtle flex justify-end space-x-3 border-t pt-4"},h(ht,{onClick:On,disabled:!w||M,className:"bg-accent text-fg-on-accent hover:!bg-accent-hover flex items-center space-x-2 rounded-md border border-transparent px-4 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-50"},M&&h(Wo,{size:"sm"}),h("span",null,l("protect.encrypted.unlockAndEdit")))));case"choose-action":return h("div",{className:"space-y-5"},h("p",{className:"text-fg-secondary text-sm"},l("protect.modifyProtection.description")),h("div",{className:"space-y-3"},h("button",{type:"button",onClick:function(){return y("edit-protection")},className:"border-border-default hover:border-accent hover:bg-bg-subtle flex w-full items-center rounded-lg border p-4 text-left transition-colors"},h("div",{className:"bg-accent/10 mr-4 rounded-full p-2"},h(Se,{icon:"lock",size:20,className:"text-accent"})),h("div",null,h("span",{className:"text-fg-primary block font-medium"},l("protect.modifyProtection.changeOption")),h("span",{className:"text-fg-muted text-sm"},l("protect.modifyProtection.changeDescription")))),h("button",{type:"button",onClick:function(){return y("remove-protection")},className:"border-border-default hover:border-state-error hover:bg-state-error-light flex w-full items-center rounded-lg border p-4 text-left transition-colors"},h("div",{className:"bg-state-error-light mr-4 rounded-full p-2"},h(Se,{icon:"unlock",size:20,className:"text-state-error"})),h("div",null,h("span",{className:"text-fg-primary block font-medium"},l("protect.modifyProtection.removeOption")),h("span",{className:"text-fg-muted text-sm"},l("protect.modifyProtection.removeDescription"))))),h("div",{className:"border-border-subtle flex justify-end border-t pt-4"},h(ht,{onClick:a,className:"border-border-default bg-bg-surface text-fg-secondary hover:bg-interactive-hover rounded-md border px-4 py-2 text-sm"},l("protect.cancel"))));case"remove-protection":return h("div",{className:"space-y-5"},h("div",{className:"bg-state-warning-light flex items-start space-x-3 rounded-lg p-4"},h(Se,{icon:"alertTriangle",className:"text-state-warning mt-0.5 h-5 w-5 flex-shrink-0"}),h("div",null,h("p",{className:"text-fg-primary font-medium"},l("protect.removeProtection.warning")),h("p",{className:"text-fg-secondary mt-1 text-sm"},l("protect.removeProtection.description")))),qt&&h("div",{className:"bg-state-error-light flex items-start space-x-2 rounded-md p-3"},h(Se,{icon:"alertTriangle",className:"text-state-error mt-0.5 h-4 w-4 flex-shrink-0"}),h("p",{className:"text-state-error text-sm"},qt)),h("div",{className:"border-border-subtle flex justify-end space-x-3 border-t pt-4"},h(ht,{onClick:function(){return y("choose-action")},disabled:Be,className:"border-border-default bg-bg-surface text-fg-secondary hover:bg-interactive-hover rounded-md border px-4 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-50"},l("common.back")),h(ht,{onClick:hn,disabled:Be,className:"bg-state-error text-fg-on-accent hover:bg-state-error/90 flex items-center space-x-2 rounded-md border border-transparent px-4 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-50"},Be&&h(Wo,{size:"sm"}),h("span",null,l("protect.removeProtection.confirm")))));default:return Nn()}})())}function zw(e){var t,n,o,i=e.documentId,r=qe(i).translate,a=Ao().provides,s=At(i),l=s?.document,c=(t=l?.isEncrypted)!==null&&t!==void 0&&t,d=(n=l?.isOwnerUnlocked)!==null&&n!==void 0&&n,u=(((o=l?.permissions)!==null&&o!==void 0?o:j.AllowAll)&j.AllowAll)!==j.AllowAll,m=c&&!d&&u,g=Y(function(){a?.forDocument(i).disableOverlay("unlock-owner-overlay")},[i,a]),p=Y(function(){a?.forDocument(i).disableOverlay("unlock-owner-overlay"),a?.forDocument(i).openModal("view-permissions-modal")},[i,a]);return m?h("div",{className:""},h("div",{className:"bg-bg-surface border-border-default flex max-w-sm items-start gap-3 rounded-lg border p-4 shadow-lg"},h("div",{className:"bg-accent/10 flex-shrink-0 rounded-full p-2"},h(Se,{icon:"lock",size:20,className:"text-accent"})),h("div",{className:"min-w-0 flex-1"},h("h3",{className:"text-fg-primary text-sm font-semibold"},r("security.protected.title")),h("p",{className:"text-fg-secondary mt-1 text-xs leading-relaxed"},r("security.protected.description")),h("button",{type:"button",onClick:p,className:"text-accent hover:text-accent-hover mt-2 text-xs font-medium"},r("security.protected.viewPermissions"))),h("button",{type:"button",onClick:g,className:"text-fg-muted hover:text-fg-secondary -mr-1 -mt-1 flex-shrink-0 p-1","aria-label":r("common.close")},h(Se,{icon:"x",size:16})))):null}function Rw(e){var t,n,o=e.documentId,i=e.isOpen,r=e.onClose,a=e.onExited,s=qe(o).translate,l=At(o),c=Xo().provides,d=X($(""),2),u=d[0],m=d[1],g=X($(!1),2),p=g[0],f=g[1],v=X($(!1),2),y=v[0],b=v[1],w=X($(null),2),x=w[0],k=w[1],I=l?.document,S=(t=I?.permissions)!==null&&t!==void 0?t:0,A=(n=I?.isOwnerUnlocked)!==null&&n!==void 0&&n;H(function(){i&&(m(""),f(!1),b(!1),k(null))},[i]);var M=function(){c&&u&&(b(!0),k(null),c.unlockOwnerPermissions(o,u).wait(function(P){b(!1),P?m(""):k(s("security.unlock.invalidPassword"))},function(P){var T,D;b(!1),k((T=(D=P.reason)===null||D===void 0?void 0:D.message)!==null&&T!==void 0?T:s("security.unlock.failed"))}))};return h(Ui,{open:i!=null&&i,title:s("security.viewPermissions.title"),onClose:r,onExited:a,className:"md:w-[32rem]"},h("div",{className:"space-y-5"},h("p",{className:"text-fg-secondary text-sm"},s("security.viewPermissions.description")),!A&&h("div",null,h("label",{className:"text-fg-primary mb-2 block text-sm font-medium"},s("security.unlock.label")),h("div",{className:"relative"},h("input",{type:p?"text":"password",value:u,onInput:function(P){return m(P.target.value)},placeholder:s("security.unlock.placeholder"),className:"border-border-default bg-bg-input text-fg-primary focus:border-accent focus:ring-accent w-full rounded-md border px-3 py-2 pr-10 text-sm focus:outline-none focus:ring-1",onKeyDown:function(P){P.ke
vendor: 4,467 bytes, line 2217
2217y==="Enter"&&u&&M()}}),h("button",{type:"button",onClick:function(){return f(!p)},className:"text-fg-muted hover:text-fg-secondary absolute right-2 top-1/2 -translate-y-1/2"},h(Se,{icon:p?"eye-off":"eye",className:"h-4 w-4"}))),x&&h("p",{className:"text-state-error mt-2 text-xs"},x),h(ht,{onClick:M,disabled:!u||y,className:"bg-accent text-fg-on-accent hover:!bg-accent-hover mt-3 flex items-center space-x-2 rounded-md px-4 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-50"},y&&h(Wo,{size:"sm"}),h("span",null,s("security.unlock.button")))),A&&h("div",{className:"bg-state-success-light flex items-center space-x-2 rounded-md p-3"},h(Se,{icon:"check",className:"text-state-success h-4 w-4 flex-shrink-0"}),h("p",{className:"text-fg-secondary text-sm"},s("security.unlock.success"))),h(O0,{permissions:S,translate:s}),h("div",{className:"border-border-subtle flex justify-end border-t pt-4"},h(ht,{onClick:r,className:"border-border-default bg-bg-surface text-fg-secondary hover:bg-interactive-hover rounded-md border px-4 py-2 text-sm"},s("common.close")))))}var Ze={documentManager:{},commands:{commands:bw},i18n:{defaultLocale:"en",locales:[{code:"en",name:"English",translations:{search:{placeholder:"Search",caseSensitive:"Case sensitive",wholeWord:"Whole word",resultsFound:"{count} results found",page:"Page {page}"},zoom:{in:"Zoom In",out:"Zoom Out",fitWidth:"Fit to Width",fitPage:"Fit to Page",marquee:"Marquee Zoom",menu:"Zoom Menu",level:"Zoom Level ({level}%)",dragTip:"Drag to select area to zoom"},pan:{toggle:"Toggle Pan Mode"},pointer:{toggle:"Toggle Pointer Mode"},capture:{screenshot:"Screenshot",dragTip:"Drag to select area to capture",title:"Screenshot Preview",download:"Download",cancel:"Cancel"},document:{menu:"Document Menu",open:"Open",close:"Close",print:"Print",protect:"Security",export:"Export",fullscreen:"Fullscreen",loading:"Loading document..."},emptyState:{title:"No Documents Open",description:"Open a PDF document to get started.",descriptionMulti:"You can view multiple documents using tabs.",openButton:"Open Document",supportedFormats:"Supported format: PDF"},passwordPrompt:{title:"Password Required",required:"This document is password protected. Please enter the password to open it.",incorrect:"The password you entered was incorrect. Please try again.",incorrectWarning:"Incorrect password. Please check and try again.",label:"Password",placeholder:"Enter document password",open:"Open",opening:"Opening...",cancel:"Cancel",close:"Close"},documentError:{title:"Error loading document",unknown:"An unknown error occurred",errorCode:"Error Code: {code}",close:"Close Document"},panel:{sidebar:"Sidebar",search:"Search",comment:"Comment",thumbnails:"Thumbnails",outline:"Outline",annotationStyle:"Annotation Style",redaction:"Redaction Sidebar"},menu:{viewControls:"View Controls",zoomControls:"Zoom Controls",moreOptions:"More Options"},outline:{title:"Outline",loading:"Loading outline...",noOutline:"No outline available",noBookmarks:"This document doesn't contain bookmarks"},page:{settings:"Page Settings",single:"Single Page",twoOdd:"Two Page (Odd)",twoEven:"Two Page (Even)",vertical:"Vertical",horizontal:"Horizontal",spreadMode:"Spread Mode",scrollLayout:"Scroll Layout",rotation:"Page Rotation",next:"Next Page",previous:"Previous Page"},rotate:{clockwise:"Rotate Clockwise",counterClockwise:"Rotate Counter-Clockwise"},selection:{copy:"Copy Selection"},mode:{view:"View",annotate:"Annotate",shapes:"Shapes",form:"Form",redact:"Redact",insert:"Insert"},form:{textfield:"Text Field",checkbox:"Checkbox",radio:"Radio Button",select:"Dropdown",listbox:"List Box"},annotation:{text:"Text",highlight:"Highlight",strikeout:"Strikethrough",underline:"Underline",squiggly:"Squiggly",rectangle:"Rectangle",circle:"Circle",line:"Line",arrow:"Arrow",polygon:"Polygon",polyline:"Polyline",ink:"Ink",inkHighlighter:"Ink Highlighter",stamp:"Stamp",caret:"Caret",insertText:"Insert Text",replaceText:"Replace Text",freeText:"Free Text",square:"Square",style:"Annotation Style",styles:"{type} Styles",defaults:"{type} Defaults",color:"Color",opacity:"Opacity",blendMode:"Blend mode",strokeWidth:"Stroke width",strokeColor:"Stroke color",borderStyle:"Border style",fillColor:"Fill color",fontSize:"Font size",fontFamily:"Font",textAlign:"Text alignment",verticalAlign:"Vertical alignment",lineEnding:"Line ending",lineStart:"Line start",lineEnd:"Line end",font:"Font",fontColor:"Font color",backgroundColor:"Backgroun
2217d color",noStyles:"There are no styles for this annotation.",noStylesStamp:"There are no styles for stamps.",selectAnnotation:"Select an annotation to see styles",deleteSelected:"Delete selected annotation",deleteAllSelected:"Delete Selected",multiSelect:"{count} annotations selected",group:"Group",ungroup:"Ungroup",moreTools:"More Tools",addLink:"Add Link",removeLink:"Remove Link",gotoLink:"Go to Link",comment:"Comment",redact:"Redact",overlayText:"Overlay Text",overlayTextPlaceholder:"e.g., REDACTED",rotation:"Rotation"},insert:{image:"Image",rubberStamp:"Rubber Stamp"},redaction:{redact:"Redact",area:"Redact Area",text:"Redact Text",apply:"Apply Redaction",applyAll:"Apply All",clearAll:"Clear All",deleteSelected:"Delete selected redaction",commitSelected:"Apply selected redaction",emptyState:"No pending redactions",panel:{title:"Redactions",itemCount:"{count} pending redaction",itemCountPlural:"{count} pending redactions",clearAll:"Clear All",redactAll:"Redact All"}},history:{undo:"Undo",redo:"Redo"},comments:{page:"Page {page}",commentCount:"{count} comment",commentCountPlural:"{count} comments",addComment:"Add comment...",addReply:"Add reply...",showAllAnnotations:"Show All Annotations",closeAllAnnotations:"Close All Annotations",save:"Save",cancel:"Cancel",edit:"Edit",delete:"Delete",showMore:"more",showLess:"less",emptyState:"Add annotations to be able to comment on them."},blendMode:{normal:"Normal",multiply:"Multiply",screen:"Screen",overlay:"Overlay",darken:"Darken",lighten:"Lighten",colorDodge:"Color Dodge",colorBurn:"Color Burn",hardLight:"Hard Light",softLight:"Soft Light",difference:"Difference",exclusion:"Exclusion",hue:"Hue",saturation:"Saturation",color:"Color",luminosity:"Luminosity"},print:{title:"Print Settings",loading:"Preparing document...",pages:"Pages to print",all:"All pages",current:"Current page ({currentPage})",specify:"Specify pages",specifyEG:"e.g., 1-3, 5, 8-10",total:"Total pages in document: {totalPages}",annotation:"Include annotations",printing:"Printing...",print:"Print",cancel:"Cancel"},protect:{title:"Protect Document",cancel:"Cancel",apply:"Apply Protection",applying:"Applying...",applyFailed:"Failed to apply protection. Please try again.",removeFailed:"Failed to remove protection. Please try again.",passwordMismatch:"Passwords do not match",noProtectionSelected:"Select at least one protection option to apply.",bothPasswordsNote:"Users who open with the document password will have restricted permissions. Use the owner password to unlock full access.",openPassword:{title:"Require password to open",description:"Users must enter a password to view this document.",label:"Document Password",placeholder:"Enter password",confirm:"Confirm Password",confirmPlaceholder:"Confirm password"},ownerPassword:{label:"Owner Password",placeholder:"Enter owner password",confirm:"Confirm Owner Password",confirmPlaceholder:"Confirm owner password"},permissions:{title:"Restrict permissions",description:"Limit what users can do with this document.",allowedActions:"Allowed actions",print:"Print",printHighQuality:"Print high quality",copy:"Copy content",accessibility:"Extract for accessibility",modify:"Modify content",annotations:"Add/modify annotations & comments",fillForms:"Fill forms & sign",assemble:"Assemble & extract pages"},encrypted:{title:"Document is Protected",description:"This document is protected by the owner. Enter the owner password to modify security settings.",enterOwnerPassword:"Enter Owner Password to Modify",unlockAndEdit:"Unlock & Edit"},modifyProtection:{title:"Modify Protection",description:"Choose how you want to modify the document protection.",changeOption:"Change Passwords or Permissions",changeDescription:"Update the document password or permission settings.",removeOption:"Remove All Protection",removeDescription:"Remove password protection from this document."},removeProtection:{title:"Remove Protection",warning:"Are you sure you want to remove protection?",description:"This will remove all password protection from the document. Anyone will be able to open and modify it.",confirm:"Remove Protection"}},security:{protected:{title:"This Document is Protected",description:"This file is protected and some features may be disabled. Go to Security in the document menu to view or unlock permissions.",viewPermissions:"View permissions"}
2217,viewPermissions:{title:"Document Permissions",description:"This file is restricted by the owner and requires a password to unlock certain actions.",restrictedActions:"Restricted Actions"},unlock:{label:"Enter Owner Password to Unlock File",placeholder:"Enter owner password",button:"Unlock file",invalidPassword:"Invalid password. Please try again.",failed:"Failed to unlock. Please try again.",success:"Owner permissions unlocked! You now have full access."}},common:{close:"Close",back:"Back",cancel:"Cancel"},link:{title:"Insert Link",url:"URL",page:"Page",enterUrl:"Enter URL",enterPage:"Enter Page Number",pageRange:"Page 1 to {totalPages}",link:"Link"},stamp:{title:"Rubber Stamps",allStamps:"All Stamps",export:"Export Stamps",emptyState:"No stamps found in the selected library.",createFromSelected:"Create Stamp",createFromGroup:"Create Stamp from Group",library:{custom:"Custom Stamps"}}}},{code:"nl",name:"Nederlands",translations:{search:{placeholder:"Zoeken",caseSensitive:"Hoofdlettergevoelig",wholeWord:"Heel woord",resultsFound:"{count} resultaten gevonden",page:"Pagina {page}"},zoom:{in:"Inzoomen",out:"Uitzoomen",fitWidth:"Aanbreedte aanpassen",fitPage:"Aan pagina aanpassen",marquee:"Lijstzoom",menu:"Zoommenu",level:"Zoomniveau ({level}%)",dragTip:"Drag to select area to zoom"},pan:{toggle:"Pan-modus wisselen"},pointer:{toggle:"Aanwijzermodus wisselen"},capture:{screenshot:"Schermafbeelding",dragTip:"Sleep om een gebied te selecteren om vast te leggen",title:"Screenshot voorbeeld",download:"Downloaden",cancel:"Annuleren"},document:{menu:"Documentmenu",open:"Openen",close:"Sluiten",print:"Afdrukken",protect:"Beveiliging",export:"Exporteren",fullscreen:"Volledig scherm",loading:"Document laden..."},emptyState:{title:"Geen documenten geopend",description:"Open een PDF-document om te beginnen.",descriptionMulti:"U kunt meerdere documenten bekijken met tabs.",openButton:"Document openen",supportedFormats:"Ondersteund formaat: PDF"},passwordPrompt:{title:"Wachtwoord vereist",required:"Dit document is beveiligd met een wachtwoord. Voer het wachtwoord in om te openen.",incorrect:"Het ingevoerde wachtwoord was onjuist. Probeer het opnieuw.",incorrectWarning:"Onjuist wachtwoord. Controleer en probeer opnieuw.",label:"Wachtwoord",placeholder:"Voer documentwachtwoord in",open:"Openen",opening:"Openen...",cancel:"Annuleren",close:"Sluiten"},documentError:{title:"Fout bij laden van document",unknown:"Er is een onbekende fout opgetreden",errorCode:"Foutcode: {code}",close:"Document sluiten"},panel:{sidebar:"Zijbalk",search:"Zoeken",comment:"Opmerking",thumbnails:"Miniaturen",outline:"Overzicht",annotationStyle:"Annotatiestijl",redaction:"Redactie Zijbalk"},menu:{viewControls:"Weergave-instellingen",zoomControls:"Zoom-instellingen",moreOptions:"Meer opties"},outline:{title:"Overzicht",loading:"Overzicht laden...",noOutline:"Geen overzicht beschikbaar",noBookmarks:"Dit document bevat geen bladwijzers"},page:{settings:"Pagina-instellingen",single:"Enkele pagina",twoOdd:"Twee pagina's (Oneven)",twoEven:"Twee pagina's (Even)",vertical:"Verticaal",horizontal:"Horizontaal",spreadMode:"Spreidingsmodus",scrollLayout:"Scrollindeling",rotation:"Paginarotatie",next:"Volgende pagina",previous:"Vorige pagina"},rotate:{clockwise:"Met de klok mee draaien",counterClockwise:"Tegen de klok in draaien"},selection:{copy:"Selectie kopiëren"},mode:{view:"Weergave",annotate:"Annoteren",shapes:"Vormen",form:"Formulier",redact:"Redigeren",insert:"Invoegen"},form:{textfield:"Tekstveld",checkbox:"Selectievakje",radio:"Keuzerondje",select:"Dropdown",listbox:"Keuzelijst"},annotation:{text:"Tekst",highlight:"Markeren",strikeout:"Doorhalen",underline:"Onderstrepen",squiggly:"Golflijn",rectangle:"Rechthoek",circle:"Cirkel",line:"Lijn",arrow:"Pijl",polygon:"Veelhoek",polyline:"Polylijn",ink:"Inkt",inkHighlighter:"Inktmarkeerstift",stamp:"Stempel",caret:"Invoegpunt",insertText:"Tekst invoegen",replaceText:"Tekst vervangen",freeText:"Vrije tekst",square:"Vierkant",style:"Annotatiestijl",styles:"{type} stijlen",defaults:"{type} standaardwaarden",color:"Kleur",opacity:"Dekking",blendMode:"Overvloeimodus",strokeWidth:"Lijndikte",strokeColor:"Lijnkleur",borderStyle:"Randstijl",fillColor:"Vulkleur",fontSize:"Lettergrootte",fontFamily:"Lettertype",textAlign:"Tekstuitlijning",verticalAlign:"Verticale uitlijning",lineEnding:"Lijneinde",lineStart:"Lijnbegin",lineEnd:"Lijneinde",font:"Lettertype",fontColor:"Tekstkleur",backgroundColor:"Achtergrondkleur",noStyles:"Er zijn geen stijlen voor deze annotatie.",noStylesStamp:"Er zijn geen stijlen voor stempels.",selectAnnotation:"Selecteer een annotatie om stijlen te zien",deleteSelected:"Geselecteerde annotatie verwijderen",deleteAllSelected:"Selectie verwijderen",multiSelect:"{count} annotaties geselecteerd",group:"Groeperen",ungroup:"Groepering opheffen",moreTools:"Meer gereedschappen",addLink:"Link toevoegen",removeLink:"Link verwijderen",gotoLink:"Ga naar link",comment:"Opmerking",redact:"Redigeren",overlayText:"Overlaytekst",overlayTextPlaceholder:"bijv. GEREDIGEER
2217D",rotation:"Rotatie"},insert:{image:"Afbeelding",rubberStamp:"Stempel"},redaction:{redact:"Redigeren",area:"Gebied redigeren",text:"Tekst redigeren",apply:"Redactie toepassen",applyAll:"Alles toepassen",clearAll:"Alles wissen",deleteSelected:"Geselecteerde redactie verwijderen",commitSelected:"Geselecteerde redactie toepassen",emptyState:"Geen openstaande redacties",panel:{title:"Redacties",itemCount:"{count} openstaande redactie",itemCountPlural:"{count} openstaande redacties",clearAll:"Alles wissen",redactAll:"Alles redigeren"}},history:{undo:"Ongedaan maken",redo:"Opnieuw doen"},comments:{page:"Pagina {page}",commentCount:"{count} opmerking",commentCountPlural:"{count} opmerkingen",addComment:"Opmerking toevoegen...",addReply:"Antwoord toevoegen...",showAllAnnotations:"Alle annotaties tonen",closeAllAnnotations:"Alle annotaties sluiten",save:"Opslaan",cancel:"Annuleren",edit:"Bewerken",delete:"Verwijderen",showMore:"meer",showLess:"minder",emptyState:"Voeg annotaties toe om erop te kunnen reageren."},blendMode:{normal:"Normaal",multiply:"Vermenigvuldigen",screen:"Bleken",overlay:"Bedekken",darken:"Donkerder",lighten:"Lichter",colorDodge:"Kleur tegenhouden",colorBurn:"Kleur doordrukken",hardLight:"Hard licht",softLight:"Zacht licht",difference:"Verschil",exclusion:"Uitsluiting",hue:"Kleurtoon",saturation:"Verzadiging",color:"Kleur",luminosity:"Helderheid"},print:{title:"Afdrukinstellingen",loading:"Document voorbereiden...",pages:"Af te drukken pagina's",all:"Alle pagina's",current:"Huidige pagina ({currentPage})",specify:"Pagina's",specifyEG:"bijv. 1-3, 5, 8-10",total:"Totaal aantal pagina's in document: {totalPages}",annotation:"Inclusief annotaties",printing:"Afdrukken...",print:"Afdrukken",cancel:"Annuleren"},protect:{title:"Document beveiligen",cancel:"Annuleren",apply:"Beveiliging toepassen",applying:"Bezig met toepassen...",applyFailed:"Beveiliging kon niet worden toegepast. Probeer het opnieuw.",removeFailed:"Beveiliging kon niet worden verwijderd. Probeer het opnieuw.",passwordMismatch:"Wachtwoorden komen niet overeen",noProtectionSelected:"Selecteer minimaal één beveiligingsoptie.",bothPasswordsNote:"Gebruikers die openen met het documentwachtwoord hebben beperkte rechten. Gebruik het eigenaarswachtwoord voor volledige toegang.",openPassword:{title:"Wachtwoord vereist om te openen",description:"Gebruikers moeten een wachtwoord invoeren om dit document te bekijken.",label:"Documentwachtwoord",placeholder:"Wachtwoord invoeren",confirm:"Wachtwoord bevestigen",confirmPlaceholder:"Wachtwoord bevestigen"},ownerPassword:{label:"Eigenaarswachtwoord",placeholder:"Eigenaarswachtwoord invoeren",confirm:"Eigenaarswachtwoord bevestigen",confirmPlaceholder:"Eigenaarswachtwoord bevestigen"},permissions:{title:"Rechten beperken",description:"Beperk wat gebruikers met dit document kunnen doen.",allowedActions:"Toegestane acties",print:"Afdrukken",printHighQuality:"Hoge kwaliteit afdrukken",copy:"Inhoud kopiëren",accessibility:"Extraheren voor toegankelijkheid",modify:"Inhoud wijzigen",annotations:"Annotaties & opmerkingen toevoegen/wijzigen",fillForms:"Formulieren invullen & ondertekenen",assemble:"Document samenstellen & pagina's extraheren"},encrypted:{title:"Document is beveiligd",description:"Dit document is beveiligd door de eigenaar. Voer het eigenaarswachtwoord in om beveiligingsinstellingen te wijzigen.",enterOwnerPassword:"Voer eigenaarswachtwoord in om te wijzigen",unlockAndEdit:"Ontgrendelen & Bewerken"},modifyProtection:{title:"Beveiliging wijzigen",description:"Kies hoe u de documentbeveiliging wilt wijzigen.",changeOption:"Wachtwoorden of rechten wijzigen",changeDescription:"Update het documentwachtwoord of rechtinstellingen.",removeOption:"Alle beveiliging verwijderen",removeDescription:"Verwijder wachtwoordbeveiliging van dit document."},removeProtection:{title:"Beveiliging verwijderen",warning:"Weet u zeker dat u de beveiliging wilt verwijderen?",description:"Dit verwijdert alle wachtwoordbeveiliging van het document. Iedereen kan het openen en wijzigen.",confirm:"Beveiliging verwijderen"}},security:{protected:{title:"Dit document is beveiligd",description:"Dit bestand is beveiligd en sommige functies zijn mogelijk uitgeschakeld. Ga naar Beveiliging in het documentmenu om rechten te bekijken of te ontgrendelen.",viewPermissions:"Rechten bekijken"},viewPermissions:{title:"Documentrechten",description:"Dit bestand is beperkt door de eigenaar en vereist een wachtwoord om bepaalde acties te ontgrendelen.",restrictedActions:"Beperkte acties"},unlock:{label:"Voer eigenaarswachtwoord in om te ontgrendelen",placeholder:"Eigenaarswachtwoord invoeren",button:"Bestand ontgrendelen",invali
2217dPassword:"Ongeldig wachtwoord. Probeer het opnieuw.",failed:"Ontgrendelen mislukt. Probeer het opnieuw.",success:"Eigenaarrechten ontgrendeld! U heeft nu volledige toegang."}},common:{close:"Sluiten",back:"Terug",cancel:"Annuleren"},link:{title:"Link invoegen",url:"URL",page:"Pagina",enterUrl:"URL invoeren",enterPage:"Paginanummer invoeren",pageRange:"Pagina 1 tot {totalPages}",link:"Koppelen"},stamp:{title:"Stempels",allStamps:"Alle stempels",export:"Stempels exporteren",emptyState:"Geen stempels gevonden in de geselecteerde bibliotheek.",createFromSelected:"Stempel maken",createFromGroup:"Stempel maken van groep",library:{custom:"Eigen stempels"}}}},{code:"de",name:"Deutsch",translations:{search:{placeholder:"Suchen",caseSensitive:"GroÃ-/Kleinschreibung",wholeWord:"Ganzes Wort",resultsFound:"{count} Ergebnisse gefunden",page:"Seite {page}"},zoom:{in:"VergröÃern",out:"Verkleinern",fitWidth:"An Breite anpassen",fitPage:"An Seite anpassen",marquee:"Laufrahmen-Zoom",menu:"Zoom-Menü",level:"Zoomstufe ({level}%)",dragTip:"Drag to select area to zoom"},pan:{toggle:"Verschieben-Modus umschalten"},pointer:{toggle:"Zeiger-Modus umschalten"},capture:{screenshot:"Screenshot",dragTip:"Ziehen Sie, um den Bereich zum Erfassen auszuwählen",title:"Screenshot-Vorschau",download:"Herunterladen",cancel:"Abbrechen"},document:{menu:"Dokument-Menü",open:"Ãffnen",close:"SchlieÃen",print:"Drucken",protect:"Sicherheit",export:"Exportieren",fullscreen:"Vollbild",loading:"Dokument wird geladen..."},emptyState:{title:"Keine Dokumente geöffnet",description:"Ãffnen Sie ein PDF-Dokument, um zu beginnen.",descriptionMulti:"Sie können mehrere Dokumente mit Tabs anzeigen.",openButton:"Dokument öffnen",supportedFormats:"Unterstütztes Format: PDF"},passwordPrompt:{title:"Passwort erforderlich",required:"Dieses Dokument ist passwortgeschützt. Bitte geben Sie das Passwort ein.",incorrect:"Das eingegebene Passwort war falsch. Bitte versuchen Sie es erneut.",incorrectWarning:"Falsches Passwort. Bitte überprüfen und erneut versuchen.",label:"Passwort",placeholder:"Dokumentpasswort eingeben",open:"Ãffnen",opening:"Ãffnen...",cancel:"Abbrechen",close:"SchlieÃen"},documentError:{title:"Fehler beim Laden des Dokuments",unknown:"Ein unbekannter Fehler ist aufgetreten",errorCode:"Fehlercode: {code}",close:"Dokument schlieÃen"},panel:{sidebar:"Seitenleiste",search:"Suchen",comment:"Kommentar",thumbnails:"Miniaturansichten",outline:"Gliederung",annotationStyle:"Anmerkungsstil",redaction:"Schwärzungs-Seitenleiste"},menu:{viewControls:"Ansichtseinstellungen",zoomControls:"Zoom-Einstellungen",moreOptions:"Weitere Optionen"},outline:{title:"Gliederung",loading:"Gliederung wird geladen...",noOutline:"Keine Gliederung verfügbar",noBookmarks:"Dieses Dokument enthält keine Lesezeichen"},page:{settings:"Seiteneinstellungen",single:"Einzelseite",twoOdd:"Zwei Seiten (Ungerade)",twoEven:"Zwei Seiten (Gerade)",vertical:"Vertikal",horizontal:"Horizontal",spreadMode:"Doppelseiten-Modus",scrollLayout:"Scroll-Layout",rotation:"Seitendrehung",next:"Nächste Seite",previous:"Vorherige Seite"},rotate:{clockwise:"Im Uhrzeigersinn drehen",counterClockwise:"Gegen den Uhrzeigersinn drehen"},selection:{copy:"Auswahl kopieren"},mode:{view:"Ansicht",annotate:"Annotieren",shapes:"Formen",form:"Formular",redact:"Schwärzen",insert:"Einfügen"},form:{textfield:"Textfeld",checkbox:"Kontrollkästchen",radio:"Optionsfeld",select:"Dropdown",listbox:"Listenfeld"},annotation:{text:"Text",highlight:"Markieren",strikeout:"Durchstreichen",underline:"Unterstreichen",squiggly:"Wellenlinie",rectangle:"Rechteck",circle:"Kreis",line:"Linie",arrow:"Pfeil",polygon:"Polygon",polyline:"Polylinie",ink:"Freihand",inkHighlighter:"Freihand-Textmarker",stamp:"Stempel",caret:"Einfügemarke",insertText:"Text einfügen",replaceText:"Text ersetzen",freeText:"Freitext",square:"Quadrat",style:"Anmerkungsstil",styles:"{type}-Stile",defaults:"{type}-Standardwerte",color:"Farbe",opacity:"Deckkraft",blendMode:"Mischmodus",strokeWidth:"Strichstärke",strokeColor:"Strichfarbe",borderStyle:"Rahmenstil",fillColor:"Füllfarbe",fontSize:"SchriftgröÃe",fontFamily:"Schriftart",textAlign:"Textausrichtung",verticalAlign:"Vertikale Ausrichtung",lineEnding:"Linienende",lineStart:"Linienanfang",lineEnd:"Linienende",font:"Schriftart",fontColor:"Schriftfarbe",backgroundColor:"Hintergrundfarbe",noStyles:"Für diese Anmerkung gibt es keine Stile.",noStylesStamp:"Für Stempel gibt es keine Stile.",selectAnnotation:"Wählen Sie eine Anmerkung aus, um Stile anzuzeigen",deleteSelected:"Ausgewählte Anmerkung löschen",deleteAllSelected:"Ausgewählte löschen",multiSelect:"{count} Anmerkungen ausgewählt",group:"Gruppieren",ungroup:"Gruppierung aufheben",moreTools:"Weitere Werkzeuge",addLink:"Link hinzufügen",removeLink:"Link entfernen",gotoLink:"Zum Link gehen",comment:"Kommentar
vendor: 5,677 bytes, line 2217
2217",redact:"Schwärzen",overlayText:"Ãberlagerungstext",overlayTextPlaceholder:"z.B. GESCHWÃRZT",rotation:"Drehung"},insert:{image:"Bild",rubberStamp:"Stempel"},redaction:{redact:"Schwärzen",area:"Bereich schwärzen",text:"Text schwärzen",apply:"Schwärzung anwenden",applyAll:"Alle anwenden",clearAll:"Alle löschen",deleteSelected:"Ausgewählte Schwärzung löschen",commitSelected:"Ausgewählte Schwärzung anwenden",emptyState:"Keine ausstehenden Schwärzungen",panel:{title:"Schwärzungen",itemCount:"{count} ausstehende Schwärzung",itemCountPlural:"{count} ausstehende Schwärzungen",clearAll:"Alle löschen",redactAll:"Alle schwärzen"}},history:{undo:"Rückgängig",redo:"Wiederholen"},comments:{page:"Seite {page}",commentCount:"{count} Kommentar",commentCountPlural:"{count} Kommentare",addComment:"Kommentar hinzufügen...",addReply:"Antwort hinzufügen...",showAllAnnotations:"Alle Anmerkungen anzeigen",closeAllAnnotations:"Alle Anmerkungen schlieÃen",save:"Speichern",cancel:"Abbrechen",edit:"Bearbeiten",delete:"Löschen",showMore:"mehr",showLess:"weniger",emptyState:"Fügen Sie Anmerkungen hinzu, um sie kommentieren zu können."},blendMode:{normal:"Normal",multiply:"Multiplizieren",screen:"Negativ multiplizieren",overlay:"Ineinanderkopieren",darken:"Abdunkeln",lighten:"Aufhellen",colorDodge:"Farbig abwedeln",colorBurn:"Farbig nachbelichten",hardLight:"Hartes Licht",softLight:"Weiches Licht",difference:"Differenz",exclusion:"Ausschluss",hue:"Farbton",saturation:"Sättigung",color:"Farbe",luminosity:"Luminanz"},print:{title:"Druckeinstellungen",loading:"Dokument wird vorbereitet...",pages:"Zu druckende Seiten",all:"Alle Seiten",current:"Aktuelle Seite ({currentPage})",specify:"Seiten angeben",specifyEG:"z.B. 1-3, 5, 8-10",total:"Gesamtseitenzahl im Dokument: {totalPages}",annotation:"Anmerkungen einbeziehen",printing:"Drucken...",print:"Drucken",cancel:"Abbrechen"},protect:{title:"Dokument schützen",cancel:"Abbrechen",apply:"Schutz anwenden",applying:"Wird angewendet...",applyFailed:"Schutz konnte nicht angewendet werden. Bitte versuchen Sie es erneut.",removeFailed:"Schutz konnte nicht entfernt werden. Bitte versuchen Sie es erneut.",passwordMismatch:"Passwörter stimmen nicht überein",noProtectionSelected:"Wählen Sie mindestens eine Schutzoption aus.",bothPasswordsNote:"Benutzer, die das Dokumentpasswort eingeben, haben eingeschränkte Berechtigungen. Verwenden Sie das Eigentümerpasswort für vollen Zugriff.",openPassword:{title:"Passwort zum Ãffnen erforderlich",description:"Benutzer müssen ein Passwort eingeben, um dieses Dokument anzuzeigen.",label:"Dokumentpasswort",placeholder:"Passwort eingeben",confirm:"Passwort bestätigen",confirmPlaceholder:"Passwort bestätigen"},ownerPassword:{label:"Eigentümerpasswort",placeholder:"Eigentümerpasswort eingeben",confirm:"Eigentümerpasswort bestätigen",confirmPlaceholder:"Eigentümerpasswort bestätigen"},permissions:{title:"Berechtigungen einschränken",description:"Beschränken Sie, was Benutzer mit diesem Dokument tun können.",allowedActions:"Erlaubte Aktionen",print:"Drucken",printHighQuality:"In hoher Qualität drucken",copy:"Inhalt kopieren",accessibility:"Für Barrierefreiheit extrahieren",modify:"Inhalt ändern",annotations:"Anmerkungen & Kommentare hinzufügen/ändern",fillForms:"Formulare ausfüllen & unterschreiben",assemble:"Dokument zusammenstellen & Seiten extrahieren"},encrypted:{title:"Dokument ist geschützt",description:"Dieses Dokument ist vom Eigentümer geschützt. Geben Sie das Eigentümerpasswort ein, um die Sicherheitseinstellungen zu ändern.",enterOwnerPassword:"Eigentümerpasswort eingeben zum Ãndern",unlockAndEdit:"Entsperren & Bearbeiten"},modifyProtection:{title:"Schutz ändern",description:"Wählen Sie, wie Sie den Dokumentschutz ändern möchten.",changeOption:"Passwörter oder Berechtigungen ändern",changeDescription:"Aktualisieren Sie das Dokumentpasswort oder die Berechtigungseinstellungen.",removeOption:"Gesamten Schutz entfernen",removeDescription:"Passwortschutz von diesem Dokument entfernen."},removeProtection:{title:"Schutz entfernen",warning:"Sind Sie sicher, dass Sie den Schutz entfernen möchten?",description:"Dadurch wird der gesamte Passwortschutz vom Dokument entfernt. Jeder kann es öffnen und bearbeiten.",confirm:"Schutz entfernen"}},security:{protected:{title:"Dieses Dokument ist geschützt",description:"Diese Datei ist geschützt und einige Funktionen sind möglicherweise deaktiviert. Gehen Sie zu Sicherheit im Dokumentmenü, um Berechtigungen anzuzeigen oder freizuschalten.",viewPermissions:"Berechtigungen anzeigen"},viewPermissions:{title:"Dokumentberechtigungen",description:"Diese Datei ist vom Eigentümer eingeschränkt und erfordert ein Passwort, um bestimmte Aktionen freizuschalten.",restrictedActions:"Eingeschränkte Aktionen"},unlock:{label:"Eigentümerpasswort eingeben zum Entsperren",placeholder:"Eigentümerpasswort eingeben",button:"Datei entsperren",invalidPassword:"Ungültiges Passwort. Bitte versuchen Sie es erneut.",failed:"Entsperren fehlgeschlagen. Bitte versuchen Sie es erneut.",success:"Eigentümerberechtigungen entsperrt! Sie haben jetzt vollen Zugriff."}},common:{close:"SchlieÃen",back:"Zurück",cancel:"Abbrechen"},link:{title:"Link einfügen",url:"URL",page:"Seite",enterUrl:"URL eingeben",enterPage:"Seitennummer eingeben",pageRange:"Seite 1 bis {totalPages}",link:"Verknüpfen"},stamp:{title:"Stempel",allStamps:"Alle Stempel",export:"Stempel exportieren",emptyState:"Keine Stempel in der ausgewählten Bibliothek gefunden.",createFromSelected:"Stempel erstellen",createFromGroup:"Stempel aus Gruppe erstellen",library:{custom:"Eigene Stempel"}}
2217}},{code:"fr",name:"Français",translations:{search:{placeholder:"Rechercher",caseSensitive:"Respecter la casse",wholeWord:"Mot entier",resultsFound:"{count} résultats trouvés",page:"Page {page}"},zoom:{in:"Zoom avant",out:"Zoom arrière",fitWidth:"Ajuster à la largeur",fitPage:"Ajuster à la page",marquee:"Zoom de sélection",menu:"Menu Zoom",level:"Niveau de zoom ({level}%)",dragTip:"Drag to select area to zoom"},pan:{toggle:"Basculer le mode déplacement"},pointer:{toggle:"Basculer le mode pointeur"},capture:{screenshot:"Capture d'écran",dragTip:"Faites glisser pour sélectionner la zone à capturer",title:"Aperçu de la capture",download:"Télécharger",cancel:"Annuler"},document:{menu:"Menu Document",open:"Ouvrir",close:"Fermer",print:"Imprimer",protect:"Sécurité",export:"Exporter",fullscreen:"Plein écran",loading:"Chargement du document..."},emptyState:{title:"Aucun document ouvert",description:"Ouvrez un document PDF pour commencer.",descriptionMulti:"Vous pouvez afficher plusieurs documents avec des onglets.",openButton:"Ouvrir un document",supportedFormats:"Format pris en charge : PDF"},passwordPrompt:{title:"Mot de passe requis",required:"Ce document est protégé par mot de passe. Veuillez entrer le mot de passe.",incorrect:"Le mot de passe saisi est incorrect. Veuillez réessayer.",incorrectWarning:"Mot de passe incorrect. Veuillez vérifier et réessayer.",label:"Mot de passe",placeholder:"Entrer le mot de passe du document",open:"Ouvrir",opening:"Ouverture...",cancel:"Annuler",close:"Fermer"},documentError:{title:"Erreur lors du chargement du document",unknown:"Une erreur inconnue est survenue",errorCode:"Code erreur : {code}",close:"Fermer le document"},panel:{sidebar:"Barre latérale",search:"Rechercher",comment:"Commentaire",thumbnails:"Miniatures",outline:"Plan",annotationStyle:"Style d'annotation",redaction:"Barre latérale de caviardage"},menu:{viewControls:"Contrôles d'affichage",zoomControls:"Contrôles de zoom",moreOptions:"Plus d'options"},outline:{title:"Plan",loading:"Chargement du plan...",noOutline:"Aucun plan disponible",noBookmarks:"Ce document ne contient pas de signets"},page:{settings:"Paramètres de page",single:"Page unique",twoOdd:"Deux pages (Impair)",twoEven:"Deux pages (Pair)",vertical:"Vertical",horizontal:"Horizontal",spreadMode:"Mode double page",scrollLayout:"Disposition de défilement",rotation:"Rotation de page",next:"Page suivante",previous:"Page précédente"},rotate:{clockwise:"Tourner dans le sens horaire",counterClockwise:"Tourner dans le sens antihoraire"},selection:{copy:"Copier la sélection"},mode:{view:"Affichage",annotate:"Annoter",shapes:"Formes",form:"Formulaire",redact:"Caviarder",insert:"Insérer"},form:{textfield:"Champ de texte",checkbox:"Case à cocher",radio:"Bouton radio",select:"Liste déroulante",listbox:"Zone de liste"},annotation:{text:"Texte",highlight:"Surligner",strikeout:"Barrer",underline:"Souligner",squiggly:"Ondulé",rectangle:"Rectangle",circle:"Cercle",line:"Ligne",arrow:"Flèche",polygon:"Polygone",polyline:"Polyligne",ink:"Encre",inkHighlighter:"Surligneur à encre",stamp:"Tampon",caret:"Curseur",insertText:"Insérer du texte",replaceText:"Remplacer le texte",freeText:"Texte libre",square:"Carré",style:"Style d'annotation",styles:"Styles de {type}",defaults:"Valeurs par défaut de {type}",color:"Couleur",opacity:"Opacité",blendMode:"Mode de fusion",strokeWidth:"Ãpaisseur du trait",strokeColor:"Couleur du trait",borderStyle:"Style de bordure",fillColor:"Couleur de remplissage",fontSize:"Taille de police",fontFamily:"Police",textAlign:"Alignement du texte",verticalAlign:"Alignement vertical",lineEnding:"Fin de ligne",lineStart:"Début de ligne",lineEnd:"Fin de ligne",font:"Police",fontColor:"Couleur du texte",backgroundColor:"Couleur de fond",noStyles:"Il n'y a pas de styles pour cette annotation.",noStylesStamp:"Il n'y a pas de styles pour les tampons.",selectAnnotation:"Sélectionnez une annotation pour voir les styles",deleteSelected:"Supprimer l'annotation sélectionnée",deleteAllSelected:"Supprimer la sélection",multiSelect:"{count} annotations sélectionnées",group:"Grouper",ungroup:"Dissocier",moreTools:"Plus d'outils",addLink:"Ajouter un lien",removeLink:"Supprimer le lien",gotoLink:"Aller au lien",comment:"Commentaire",redact:"Caviarder",overlayText:"Texte de superposition",overlayTextPlaceholder:"ex: CAVIARDÃ",rotation:"Rotation"},insert:{image:"Image",rubberStamp:"Tampon"},redaction:{redact:"Caviarder",area:"Caviarder la zone",text:"Caviarder le texte",apply:"Appliquer le caviardage",applyAll:"Tout appliquer",clearAll:"Tout effacer",deleteSelected:"Supprimer la rédaction sélectionnée",commitSelected:"Appliquer la rédaction sélectionnée",emptyState:"Aucun caviardage en attente",panel:{title:"Caviardages",itemCount:"{count} caviardage en attente",itemCountPlural:"{count} caviardages en attente",clearAll:"Tout effacer",redactAll:"Tout caviarder"}},history:{undo:"Annuler",redo:"Refaire"},comments:{page:"Page {page}",commentCount:"{count} commentaire",commentCountPlural:"{count} commentaires",addComment:"Ajouter un commentaire...",addReply:"Ajouter une réponse...",showAllAnnotations:"Afficher toutes les annotations",closeAllAnnotations:"Fermer toutes les annotations",save:"Enregistrer",cancel:"Annuler",edit:"Modifier",delete:"Supprimer",showMore:"plus",showLess:"moins",emptyState:"Ajoutez des annotations pour pouvoir les commenter."},blendMode:{normal:"Normal",multiply:"Produit",screen:"Superposition",overlay:"Incrustation",darken:"Obscurcir",lighten:"Ãclaircir",colorDodge:"Densité couleur -",colorBurn:"Densit
2217é couleur +",hardLight:"Lumière crue",softLight:"Lumière tamisée",difference:"Différence",exclusion:"Exclusion",hue:"Teinte",saturation:"Saturation",color:"Couleur",luminosity:"Luminosité"},print:{title:"Paramètres d'impression",loading:"Préparation du document...",pages:"Pages à imprimer",all:"Toutes les pages",current:"Page actuelle ({currentPage})",specify:"Spécifier les pages",specifyEG:"ex : 1-3, 5, 8-10",total:"Nombre total de pages dans le document : {totalPages}",annotation:"Inclure les annotations",printing:"Impression...",print:"Imprimer",cancel:"Annuler"},protect:{title:"Protéger le document",cancel:"Annuler",apply:"Appliquer la protection",applying:"Application en cours...",applyFailed:"Ãchec de l'application de la protection. Veuillez réessayer.",removeFailed:"Ãchec de la suppression de la protection. Veuillez réessayer.",passwordMismatch:"Les mots de passe ne correspondent pas",noProtectionSelected:"Sélectionnez au moins une option de protection.",bothPasswordsNote:"Les utilisateurs qui ouvrent avec le mot de passe du document auront des permissions limitées. Utilisez le mot de passe propriétaire pour un accès complet.",openPassword:{title:"Mot de passe requis pour l'ouverture",description:"Les utilisateurs doivent entrer un mot de passe pour voir ce document.",label:"Mot de passe du document",placeholder:"Entrer le mot de passe",confirm:"Confirmer le mot de passe",confirmPlaceholder:"Confirmer le mot de passe"},ownerPassword:{label:"Mot de passe propriétaire",placeholder:"Entrer le mot de passe propriétaire",confirm:"Confirmer le mot de passe propriétaire",confirmPlaceholder:"Confirmer le mot de passe propriétaire"},permissions:{title:"Restreindre les permissions",description:"Limitez ce que les utilisateurs peuvent faire avec ce document.",allowedActions:"Actions autorisées",print:"Imprimer",printHighQuality:"Imprimer en haute qualité",copy:"Copier le contenu",accessibility:"Extraire pour l'accessibilité",modify:"Modifier le contenu",annotations:"Ajouter/modifier les annotations et commentaires",fillForms:"Remplir les formulaires et signer",assemble:"Assembler le document et extraire les pages"},encrypted:{title:"Document protégé",description:"Ce document est protégé par le propriétaire. Entrez le mot de passe propriétaire pour modifier les paramètres de sécurité.",enterOwnerPassword:"Entrer le mot de passe propriétaire pour modifier",unlockAndEdit:"Déverrouiller & Modifier"},modifyProtection:{title:"Modifier la protection",description:"Choisissez comment vous voulez modifier la protection du document.",changeOption:"Modifier les mots de passe ou les permissions",changeDescription:"Mettre à jour le mot de passe du document ou les paramètres de permissions.",removeOption:"Supprimer toute la protection",removeDescription:"Supprimer la protection par mot de passe de ce document."},removeProtection:{title:"Supprimer la protection",warning:"Ãtes-vous sûr de vouloir supprimer la protection ?",description:"Cela supprimera toute la protection par mot de passe du document. Tout le monde pourra l'ouvrir et le modifier.",confirm:"Supprimer la protection"}},security:{protected:{title:"Ce document est protégé",description:"Ce fichier est protégé et certaines fonctionnalités peuvent être désactivées. Allez dans Sécurité dans le menu document pour afficher ou déverrouiller les permissions.",viewPermissions:"Voir les permissions"},viewPermissions:{title:"Permissions du document",description:"Ce fichier est restreint par le propriétaire et nécessite un mot de passe pour débloquer certaines actions.",restrictedActions:"Actions restreintes"},unlock:{label:"Entrer le mot de passe propriétaire pour déverrouiller",placeholder:"Entrer le mot de passe propriétaire",button:"Déverrouiller le fichier",invalidPassword:"Mot de passe invalide. Veuillez réessayer.",failed:"Ãchec du déverrouillage. Veuillez réessayer.",success:"Permissions propriétaire déverrouillées ! Vous avez maintenant un accès complet."}},common:{close:"Fermer",back:"Retour",cancel:"Annuler"},link:{title:"Insérer un lien",url:"URL",page:"Page",enterUrl:"Entrer l'URL",enterPage:"Entrer le numéro de page",pageRange:"Page 1 à {totalPages}",link:"Lier"},stamp:{title:"Tampons",allStamps:"Tous les tampons",export:"Exporter les tampons",emptyState:"Aucun tampon trouvé dans la bibliothèque sélectionnée.",createFromSelected:"Créer un tampon",createFromGroup:"Créer un tampon à partir du groupe",library:{custom:"Tampons personnalisés"}}}},{code:"es",name:"Español",translations:{search:{placeholder:"Buscar",caseSensitive:"Distinguir mayúsculas",wholeWord:"Palabra completa",resultsFound:"{count} resultados encontrados",page:"Página {page}"}
2217,zoom:{in:"Acercar",out:"Alejar",fitWidth:"Ajustar al ancho",fitPage:"Ajustar a la página",marquee:"Zoom de selección",menu:"Menú de zoom",level:"Nivel de zoom ({level}%)",dragTip:"Drag to select area to zoom"},pan:{toggle:"Alternar modo desplazamiento"},pointer:{toggle:"Alternar modo puntero"},capture:{screenshot:"Captura de pantalla",dragTip:"Arrastre para seleccionar el área a capturar",title:"Vista previa de la captura",download:"Descargar",cancel:"Cancelar"},document:{menu:"Menú del documento",open:"Abrir",close:"Cerrar",print:"Imprimir",protect:"Seguridad",export:"Exportar",fullscreen:"Pantalla completa",loading:"Cargando documento..."},emptyState:{title:"No hay documentos abiertos",description:"Abra un documento PDF para comenzar.",descriptionMulti:"Puede ver varios documentos usando pestañas.",openButton:"Abrir documento",supportedFormats:"Formato compatible: PDF"},passwordPrompt:{title:"Contraseña requerida",required:"Este documento está protegido con contraseña. Por favor, ingrese la contraseña para abrirlo.",incorrect:"La contraseña ingresada es incorrecta. Por favor, inténtelo de nuevo.",incorrectWarning:"Contraseña incorrecta. Por favor, verifique e inténtelo de nuevo.",label:"Contraseña",placeholder:"Ingrese la contraseña del documento",open:"Abrir",opening:"Abriendo...",cancel:"Cancelar",close:"Cerrar"},documentError:{title:"Error al cargar el documento",unknown:"Ha ocurrido un error desconocido",errorCode:"Código de error: {code}",close:"Cerrar documento"},panel:{sidebar:"Barra lateral",search:"Buscar",comment:"Comentario",thumbnails:"Miniaturas",outline:"Esquema",annotationStyle:"Estilo de anotación",redaction:"Barra lateral de redacción"},menu:{viewControls:"Controles de vista",zoomControls:"Controles de zoom",moreOptions:"Más opciones"},outline:{title:"Esquema",loading:"Cargando esquema...",noOutline:"No hay esquema disponible",noBookmarks:"Este documento no contiene marcadores"},page:{settings:"Configuración de página",single:"Página única",twoOdd:"Dos páginas (Impar)",twoEven:"Dos páginas (Par)",vertical:"Vertical",horizontal:"Horizontal",spreadMode:"Modo de doble página",scrollLayout:"Diseño de desplazamiento",rotation:"Rotación de página",next:"Página siguiente",previous:"Página anterior"},rotate:{clockwise:"Rotar en sentido horario",counterClockwise:"Rotar en sentido antihorario"},selection:{copy:"Copiar selección"},mode:{view:"Ver",annotate:"Anotar",shapes:"Formas",form:"Formulario",redact:"Redactar",insert:"Insertar"},form:{textfield:"Campo de texto",checkbox:"Casilla",radio:"Botón de radio",select:"Desplegable",listbox:"Cuadro de lista"},annotation:{text:"Texto",highlight:"Resaltar",strikeout:"Tachar",underline:"Subrayar",squiggly:"Ondulado",rectangle:"Rectángulo",circle:"CÃrculo",line:"LÃnea",arrow:"Flecha",polygon:"PolÃgono",polyline:"PolilÃnea",ink:"Tinta",inkHighlighter:"Resaltador de tinta",stamp:"Sello",caret:"Cursor",insertText:"Insertar texto",replaceText:"Reemplazar texto",freeText:"Texto libre",square:"Cuadrado",style:"Estilo de anotación",styles:"Estilos de {type}",defaults:"Valores predeterminados de {type}",color:"Color",opacity:"Opacidad",blendMode:"Modo de fusión",strokeWidth:"Grosor del trazo",strokeColor:"Color del trazo",borderStyle:"Estilo del borde",fillColor:"Color de relleno",fontSize:"Tamaño de fuente",fontFamily:"Fuente",textAlign:"Alineación del texto",verticalAlign:"Alineación vertical",lineEnding:"Final de lÃnea",lineStart:"Inicio de lÃnea",lineEnd:"Final de lÃnea",font:"Fuente",fontColor:"Color de fuente",backgroundColor:"Color de fondo",noStyles:"No hay estilos para esta anotación.",noStylesStamp:"No hay estilos para los sellos.",selectAnnotation:"Seleccione una anotación para ver los estilos",deleteSelected:"Eliminar anotación seleccionada",deleteAllSelected:"Eliminar selección",multiSelect:"{count} anotaciones seleccionadas",group:"Agrupar",ungroup:"Desagrupar",moreTools:"Más herramientas",addLink:"Agregar enlace",removeLink:"Eliminar enlace",gotoLink:"Ir al enlace",comment:"Comentario
vendor: 5,611 bytes, line 2217
2217",redact:"Redactar",overlayText:"Texto superpuesto",overlayTextPlaceholder:"ej: REDACTADO",rotation:"Rotación"},insert:{image:"Imagen",rubberStamp:"Sello"},redaction:{redact:"Redactar",area:"Redactar área",text:"Redactar texto",apply:"Aplicar redacción",applyAll:"Aplicar todo",clearAll:"Borrar todo",deleteSelected:"Eliminar redacción seleccionada",commitSelected:"Aplicar redacción seleccionada",emptyState:"No hay redacciones pendientes",panel:{title:"Redacciones",itemCount:"{count} redacción pendiente",itemCountPlural:"{count} redacciones pendientes",clearAll:"Borrar todo",redactAll:"Redactar todo"}},history:{undo:"Deshacer",redo:"Rehacer"},comments:{page:"Página {page}",commentCount:"{count} comentario",commentCountPlural:"{count} comentarios",addComment:"Añadir comentario...",addReply:"Añadir respuesta...",showAllAnnotations:"Mostrar todas las anotaciones",closeAllAnnotations:"Cerrar todas las anotaciones",save:"Guardar",cancel:"Cancelar",edit:"Editar",delete:"Eliminar",showMore:"más",showLess:"menos",emptyState:"Añada anotaciones para poder comentarlas."},blendMode:{normal:"Normal",multiply:"Multiplicar",screen:"Trama",overlay:"Superponer",darken:"Oscurecer",lighten:"Aclarar",colorDodge:"Sobreexponer color",colorBurn:"Subexponer color",hardLight:"Luz fuerte",softLight:"Luz suave",difference:"Diferencia",exclusion:"Exclusión",hue:"Tono",saturation:"Saturación",color:"Color",luminosity:"Luminosidad"},print:{title:"Configuración de impresión",loading:"Preparando documento...",pages:"Páginas a imprimir",all:"Todas las páginas",current:"Página actual ({currentPage})",specify:"Especificar páginas",specifyEG:"ej: 1-3, 5, 8-10",total:"Total de páginas en el documento: {totalPages}",annotation:"Incluir anotaciones",printing:"Imprimiendo...",print:"Imprimir",cancel:"Cancelar"},protect:{title:"Proteger documento",cancel:"Cancelar",apply:"Aplicar protección",applying:"Aplicando...",applyFailed:"No se pudo aplicar la protección. Por favor, inténtelo de nuevo.",removeFailed:"No se pudo eliminar la protección. Por favor, inténtelo de nuevo.",passwordMismatch:"Las contraseñas no coinciden",noProtectionSelected:"Seleccione al menos una opción de protección.",bothPasswordsNote:"Los usuarios que abran con la contraseña del documento tendrán permisos restringidos. Use la contraseña de propietario para acceso completo.",openPassword:{title:"Contraseña requerida para abrir",description:"Los usuarios deben ingresar una contraseña para ver este documento.",label:"Contraseña del documento",placeholder:"Ingresar contraseña",confirm:"Confirmar contraseña",confirmPlaceholder:"Confirmar contraseña"},ownerPassword:{label:"Contraseña de propietario",placeholder:"Ingresar contraseña de propietario",confirm:"Confirmar contraseña de propietario",confirmPlaceholder:"Confirmar contraseña de propietario"},permissions:{title:"Restringir permisos",description:"Limite lo que los usuarios pueden hacer con este documento.",allowedActions:"Acciones permitidas",print:"Imprimir",printHighQuality:"Imprimir alta calidad",copy:"Copiar contenido",accessibility:"Extraer para accesibilidad",modify:"Modificar contenido",annotations:"Añadir/modificar anotaciones y comentarios",fillForms:"Rellenar formularios y firmar",assemble:"Ensamblar documento y extraer páginas"},encrypted:{title:"Documento protegido",description:"Este documento está protegido por el propietario. Ingrese la contraseña de propietario para modificar la configuración de seguridad.",enterOwnerPassword:"Ingrese la contraseña de propietario para modificar",unlockAndEdit:"Desbloquear y Editar"},modifyProtection:{title:"Modificar protección",description:"Elija cómo desea modificar la protección del documento.",changeOption:"Cambiar contraseñas o permisos",changeDescription:"Actualizar la contraseña del documento o la configuración de permisos.",removeOption:"Eliminar toda la protección",removeDescription:"Eliminar la protección por contraseña de este documento."},removeProtection:{title:"Eliminar protección",warning:"¿Está seguro de que desea eliminar la protección?",description:"Esto eliminará toda la protección por contraseña del documento. Cualquiera podrá abrirlo y modificarlo.",confirm:"Eliminar protección"}},security:{protected:{title:"Este documento está protegido",description:"Este archivo está protegido y algunas funciones pueden estar deshabilitadas. Vaya a Seguridad en el menú del documento para ver o desbloquear los permisos.",viewPermissions:"Ver permisos"},viewPermissions:{title:"Permisos del documento",description:"Este archivo está restringido por el propietario y requiere una contraseña para desbloquear ciertas acciones.",restrictedActions:"Acciones restringidas"},unlock:{label:"Ingrese la contraseña de propietario para desbloquear",placeholder:"Ingresar contraseña de propietario",button:"Desbloquear archivo",invalidPassword:"Contraseña inválida. Por favor, inténtelo de nuevo.",failed:"Error al desbloquear. Por favor, inténtelo de nuevo.",success:"¡Permisos de propietario desbloqueados! Ahora tiene acceso completo."}},common:{close:"Cerrar",back:"Atrás",cancel:"Cancelar"},link:{title:"Insertar enlace",url:"URL",page:"Página",enterUrl:"Introducir URL",enterPage:"Introducir número de página",pageRange:"Página 1 a {totalPages}",link:"Enlazar"},stamp:{title:"Sellos",allStamps:"Todos los sellos",export:"Exportar sellos",emptyState:"No se encontraron sellos en la biblioteca seleccionada.",createFromSelected:"Crear sello",createFromGroup:"Crear sello del grupo",library:{custom:"Sellos personalizados"}}
2217}},{code:"zh-CN",name:"ç®ä½ä¸æ",translations:{search:{placeholder:"æç´¢",caseSensitive:"大å°åææ",wholeWord:"å
¨è¯å¹é
",resultsFound:"{count} ä¸ªç»æ",page:"第{page}页"},zoom:{in:"æ¾å¤§",out:"缩å°",fitWidth:"éå宽度",fitPage:"éå页é¢",marquee:"æ¡éæ¾å¤§",menu:"缩æ¾èå",level:"ç¼©æ¾æ¯ä¾ ({level}%)",dragTip:"æå¨é¼ æ éæ©è¦æ¾å¤§çåºå"},pan:{toggle:"æå¨æ¨¡å¼"},pointer:{toggle:"å
æ æ¨¡å¼"},capture:{screenshot:"æªå¾",dragTip:"æå¨é¼ æ éæ©è¦æªåçåºå",title:"æªåçPDFåºå",download:"ä¸è½½",cancel:"åæ¶"},document:{menu:"æä»¶é项",open:"æå¼",close:"å
³é",print:"æå°",protect:"å®å
¨",export:"导åº",fullscreen:"å
¨å±",loading:"æä»¶å è½½ä¸..."},emptyState:{title:"å°æ æå¼çæä»¶",description:"请ç¹å»â+ æå¼æä»¶âæé®éæ©å¹¶æå¼ä¸ä¸ªPDFæä»¶ã",descriptionMulti:"æ¨å¯ä»¥ä½¿ç¨æ ç¾é¡µåæ¶æå¼å¤ä¸ªæä»¶ã",openButton:"æå¼æä»¶",supportedFormats:"æ¯æçæä»¶æ ¼å¼ä¸º: PDF"},passwordPrompt:{title:"请è¾å
¥å¯ç ",required:"该æä»¶è®¾ç½®æå¯ç ä¿æ¤ï¼è¦æå¼æä»¶è¯·è¾å
¥å¯ç ã",incorrect:"ä½ è¾å
¥çå¯ç é误ï¼è¯·éæ°è¾å
¥ã",incorrectWarning:"å¯ç é误ï¼è¯·æ£æ¥åéæ°è¾å
¥ã",label:"å¯ç ",placeholder:"请è¾å
¥æä»¶å¯ç ",open:"æå¼",opening:"æå¼ä¸...",cancel:"åæ¶",close:"å
³é"},documentError:{title:"æä»¶å è½½åºé",unknown:"æªç¥é误",errorCode:"é误ç : {code}",close:"å
³éæä»¶"},panel:{sidebar:"大纲ä¸ä¹¦ç¾",search:"æç´¢",comment:"è¯è®º",thumbnails:"缩ç¥å¾",outline:"大纲",annotationStyle:"æ¹æ³¨æ ·å¼",redaction:"é®è½ä¾§è¾¹æ "},menu:{viewControls:"è§å¾æ§ä»¶",zoomControls:"ç¼©æ¾æ§ä»¶",moreOptions:"æ´å¤é项"},outline:{title:"大纲",loading:"大纲å è½½ä¸...",noOutline:"没æå¤§çº²",noBookmarks:"该æä»¶ä¸å«ä¹¦ç¾"},page:{settings:"页é¢è®¾ç½®",single:"å页è§å¾",twoOdd:"å页è§å¾",twoEven:"书ç±è§å¾",vertical:"åç´æ»å¨",horizontal:"æ°´å¹³æ»å¨",spreadMode:"跨页模å¼",scrollLayout:"æ»å¨å¸å±",rotation:"页é¢è½¬å",next:"ä¸ä¸é¡µ",previous:"ä¸ä¸é¡µ"},rotate:{clockwise:"顺æ¶éæè½¬",counterClockwise:"éæ¶éæè½¬"},selection:{copy:"å¤å¶"},mode:{view:"é
读",annotate:"æ¹æ³¨",shapes:"å½¢ç¶",form:"表å",redact:"é®è½",insert:"æå
¥"},form:{textfield:"ææ¬æ¡",checkbox:"å¤éæ¡",radio:"åéæé®",select:"䏿å表",listbox:"å表æ¡"},annotation:{text:"ä»»æææ¬",highlight:"é«äº®",strikeout:"å é¤çº¿",underline:"ä¸å线",squiggly:"ä¸åæ²çº¿",rectangle:"ç©å½¢",circle:"åå½¢",line:"ç´çº¿",arrow:"带ç®å¤´ç´çº¿",polygon:"å¤è¾¹å½¢",polyline:"夿®µçº¿",ink:"èªç±ç»å¶",inkHighlighter:"墨迹è§å
ç¬",stamp:"å°ç« ",caret:"æå
¥ç¬¦å·",insertText:"æå
¥ææ¬",replaceText:"æ¿æ¢ææ¬",freeText:"ä»»æææ¬",square:"ç©å½¢",style:"æ¹æ³¨æ ·å¼",styles:"{type} æ ·å¼",defaults:"{type} é»è®¤å¼",color:"é¢è²",opacity:"éæåº¦",blendMode:"æ··åæ¨¡å¼",strokeWidth:"线æ¡å®½åº¦",strokeColor:"线æ¡é¢è²",borderStyle:"çº¿æ¡æ ·å¼",fillColor:"å¡«å
è²",fontSize:"åå·",fontFamily:"åä½",textAlign:"å·¦å³å¯¹é½",verticalAlign:"ä¸ä¸å¯¹é½",lineEnding:"è¡å°¾",lineStart:"线æ¡èµ·ç¹",lineEnd:"线æ¡ç»å°¾",font:"åä½",fontColor:"åè²",backgroundColor:"èæ¯è²",noStyles:"è¯¥æ¹æ³¨æ éè®¾ç½®æ ·å¼ã",noStylesStamp:"å°ç« æ éè®¾ç½®æ ·å¼ã",selectAnnotation:"卿¤å¤æ¥çé䏿¹æ³¨çæ ·å¼ã",deleteSelected:"å é¤éä¸çæ¹æ³¨",deleteAllSelected:"å é¤éä¸",multiSelect:"已鿩 {count} ä¸ªæ¹æ³¨",group:"åç»",ungroup:"åæ¶åç»",moreTools:"æ´å¤å·¥å
·",addLink:"æ·»å 龿¥",removeLink:"ç§»é¤é¾æ¥",gotoLink:"跳转å°é¾æ¥",comment:"è¯è®º",redact:"é®è½",overlayText:"è¦çæå",overlayTextPlaceholder:"ä¾å¦ï¼å·²é®è½",rotation:"æè½¬"},insert:{image:"å¾ç",rubberStamp:"å°ç« "},redaction:{redact:"é®è½",area:"é®è½åºå",text:"é®è½ææ¬",apply:"åºç¨é®è½",applyAll:"å
¨é¨åºç¨",clearAll:"å
¨é¨åæ¶",deleteSelected:"åæ¶é®è½",commitSelected:"åºç¨é®è½",emptyState:"ææ å¾
å¤ççé®è½",panel:{title:"é®è½",itemCount:"{count}
2217 个å¾
å¤çé®è½",itemCountPlural:"{count} 个å¾
å¤çé®è½",clearAll:"å
¨é¨åæ¶",redactAll:"å
¨é¨é®è½"}},history:{undo:"æ¤é",redo:"æ¢å¤"},comments:{page:"第{page}页",commentCount:"{count}æ¡è¯è®º",commentCountPlural:"{count}æ¡è¯è®º",addComment:"æ°å¢è¯è®º...",addReply:"æ°å¢åå¤...",showAllAnnotations:"æ¾ç¤ºæææ³¨é",closeAllAnnotations:"å
³éæææ³¨é",save:"ä¿å",cancel:"åæ¶",edit:"ç¼è¾",delete:"å é¤",showMore:"å±å¼",showLess:"æ¶èµ·",emptyState:"æ·»å æ¹æ³¨åï¼å¯ä»¥å¨è¿éå¯¹æ¹æ³¨è¿è¡è¯è®ºã"},blendMode:{normal:"æ£å¸¸",multiply:"æ£ç",screen:"å±å¹",overlay:"å å ",darken:"åæ",lighten:"å亮",colorDodge:"è²å½©åæ·¡",colorBurn:"é¢è²å æ·±",hardLight:"强å
",softLight:"æå
",difference:"å·®å¼",exclusion:"æé¤",hue:"è²ç¸",saturation:"饱å度",color:"é¢è²",luminosity:"亮度"},print:{title:"æå°è®¾ç½®",loading:"æ£å¨å¤ç...",pages:"è¦æå°ç页ç ",all:"ææé¡µ",current:"å½å页ï¼{currentPage}ï¼",specify:"æå®é¡µ",specifyEG:"ä¾å¦ï¼1-3, 5, 8-10",total:"ææ¡£æ»é¡µæ°ï¼{totalPages}",annotation:"å
嫿¹æ³¨",printing:"æå°ä¸...",print:"æå°",cancel:"åæ¶"},protect:{title:"ææ¡£ä¿æ¤",cancel:"åæ¶",apply:"åºç¨ä¿æ¤",applying:"æ£å¨åºç¨...",applyFailed:"æ æ³åºç¨ä¿æ¤ã请éè¯ã",removeFailed:"æ æ³ç§»é¤ä¿æ¤ã请éè¯ã",passwordMismatch:"å¯ç ä¸å¹é
",noProtectionSelected:"请è³å°éæ©ä¸ç§ä¿æ¤æ¹å¼ã",bothPasswordsNote:"ä½¿ç¨ææ¡£å¯ç æå¼çç¨æ·å°åå°æééå¶ãä½¿ç¨ææè
å¯ç å¯è·å¾å®å
¨è®¿é®æéã",openPassword:{title:"éè¦å¯ç æè½æå¼",description:"ç¨æ·å¿
é¡»è¾å
¥å¯ç æè½æ¥çæ¤ææ¡£ã",label:"ææ¡£å¯ç ",placeholder:"è¾å
¥å¯ç ",confirm:"确认å¯ç ",confirmPlaceholder:"确认å¯ç "},ownerPassword:{label:"ææè
å¯ç ",placeholder:"è¾å
¥ææè
å¯ç ",confirm:"确认ææè
å¯ç ",confirmPlaceholder:"确认ææè
å¯ç "},permissions:{title:"éå¶æé",description:"éå¶ç¨æ·å¯¹æ¤ææ¡£çæä½ã",allowedActions:"å
许çæä½",print:"æå°",printHighQuality:"é«è´¨éæå°",copy:"å¤å¶å
容",accessibility:"æåè¾
å©åè½",modify:"ä¿®æ¹å
容",annotations:"æ·»å /ä¿®æ¹æ¹æ³¨åè¯è®º",fillForms:"å¡«å表ååç¾å",assemble:"ç»è£
ææ¡£åæå页é¢"},encrypted:{title:"ææ¡£åä¿æ¤",description:"æ¤ææ¡£å·²è¢«ææè
ä¿æ¤ã请è¾å
¥ææè
å¯ç 以修æ¹å®å
¨è®¾ç½®ã",enterOwnerPassword:"è¾å
¥ææè
å¯ç 以修æ¹",unlockAndEdit:"è§£éå¹¶ç¼è¾"},modifyProtection:{title:"ä¿®æ¹ä¿æ¤",description:"éæ©å¦ä½ä¿®æ¹ææ¡£ä¿æ¤ã",changeOption:"æ´æ¹å¯ç ææé",changeDescription:"æ´æ°ææ¡£å¯ç ææé设置ã",removeOption:"ç§»é¤ææä¿æ¤",removeDescription:"ç§»é¤æ¤ææ¡£çå¯ç ä¿æ¤ã"},removeProtection:{title:"ç§»é¤ä¿æ¤",warning:"ç¡®å®è¦ç§»é¤ä¿æ¤åï¼",description:"è¿å°ç§»é¤ææ¡£çææå¯ç ä¿æ¤ãä»»ä½äººé½å¯ä»¥æå¼åä¿®æ¹å®ã",confirm:"ç§»é¤ä¿æ¤"}},security:{protected:{title:"æ¤ææ¡£åä¿æ¤",description:'æ¤æä»¶åä¿æ¤ï¼æäºåè½å¯è½è¢«ç¦ç¨ãè¯·å¨ææ¡£èåä¸ç¹å»"å®å
¨"以æ¥çæè§£éæéã',viewPermissions:"æ¥çæé"},viewPermissions:{title:"ææ¡£æé",description:"æ¤æä»¶åææè
éå¶ï¼éè¦å¯ç æè½è§£éæäºæä½ã",restrictedActions:"åéæä½"},unlock:{label:"è¾å
¥ææè
å¯ç 以解éæä»¶",placeholder:"è¾å
¥ææè
å¯ç ",button:"è§£éæä»¶",invalidPassword:"å¯ç æ æã请éè¯ã",failed:"è§£é失败ã请éè¯ã",success:"ææè
æé已解éï¼æ¨ç°å¨æ¥æå®å
¨è®¿é®æéã"}},common:{close:"å
³é",back:"è¿å",cancel:"åæ¶"},link:{title:"æå
¥é¾æ¥",url:"ç½å",page:"页é¢",enterUrl:"è¾å
¥ç½å",enterPage:"è¾å
¥é¡µç ",pageRange:"第1页å°ç¬¬{totalPages}页",link:"龿¥"},stamp:{title:"å°ç« ",allStamps:"ææå°ç« ",export:"导åºå°ç« ",emptyState:"æéåºä¸æ²¡ææ¾å°å°ç« ã",createFromSelected:"å建å°ç« ",createFromGroup:"ä»ç»å建å°ç« ",library:{custom:"èªå®ä¹å°ç« "}}}},{code:"ja",name:"æ¥æ¬èª",translations:{search:{placeholder:"æ¤ç´¢",caseSensitive:"大æåå°æåãåºå¥",wholeWord:"åèªåä½ã§æ¤ç´¢",resultsFound:"{count}ä»¶è¦ã¤ããã¾ãã",page:"{page}ãã¼ã¸"},zoom:{in:"æ¡å¤§",out:"縮å°",fitWidth:"å¹
ã«åããã",fitPage:"ãã¼ã¸ã«åããã",marquee:"ç¯å²é¸æãºã¼ã ",menu:"ãºã¼ã ã¡ãã¥ã¼",level:"ãºã¼ã ({level}%)",dragTip:"ãã©ãã°ãã¦ãºã¼ã ç¯å²ã鏿"},pan:{toggle:"ãã³ã¢ã¼ãã®åãæ¿ã"},pointer:{toggle:"ãã¤ã³ã¿ã¼ã¢ã¼ãã®åãæ¿ã"},capture:{screenshot:"ã¹ã¯ãªã¼ã³ã·ã§ãã",dragTip:"ãã©ãã°ãã¦ãã£ããã£ç¯å²ã鏿",title:"ã¹ã¯ãªã¼ã³ã·ã§ãããã¬ãã¥ã¼",download:"ãã¦ã³ãã¼ã",cancel:"ãã£ã³ã»ã«"},document:{menu:"ããã¥ã¡ã³ãã¡ãã¥ã¼",open:"éã",close:"éãã",print:"å°å·",protect:"ã»ãã¥ãªãã£",export:"ã¨ã¯ã¹ãã¼ã",fullscreen:"å
¨ç»é¢è¡¨ç¤º",loading:"ããã¥ã¡ã³ããèªã¿è¾¼ã¿ä¸..."},emptyState:{title:"ããã¥ã¡ã³ããéããã¦ãã¾ãã",description:"PDFããã¥ã¡ã³ããéãã¦å§ãã¾ãããã",descriptionMulti:"ã¿ãã使ã£ã¦è¤æ°ã®ããã¥ã¡ã³ãã表示ã§ãã¾ãã",openButton:"ããã¥ã¡ã³ããéã",supportedFormats:"対å¿ãã©ã¼ããã: PDF"},passwordPrompt:{title:"ãã¹ã¯ã¼ããå¿
è¦ã§ã",required:"ãã®ããã¥ã¡ã³ãã¯ãã¹ã¯ã¼ãã§ä¿è·ããã¦ãã¾ãããã¹ã¯ã¼ããå
¥åãã¦ãã ããã",incorrect:"å
¥åããããã¹ã¯ã¼ããæ£ããããã¾ãããããä¸åº¦ã試ããã ããã",incorrectWarning:"ãã¹ã¯ã¼ããæ£ããããã¾ããã確èªãã¦ããä¸åº¦ã試ããã ããã",label:"ãã¹ã¯ã¼ã",placeholder:"ããã¥ã¡ã³ãã®ãã¹ã¯ã¼ããå
¥å",open:"éã",opening:"éãã¦ãã¾ã...",cancel:"ãã£ã³ã»ã«",close:"éãã"},documentError:{title:"ããã¥ã¡ã³ãã®èªã¿è¾¼ã¿ã¨ã©ã¼",unknown:"䏿ãªã¨ã©ã¼ãçºçãã¾ãã",errorCode:"ã¨ã©ã¼ã³ã¼ã: {c
2217ode}",close:"ããã¥ã¡ã³ããéãã"},panel:{sidebar:"ãµã¤ããã¼",search:"æ¤ç´¢",comment:"ã³ã¡ã³ã",thumbnails:"ãµã ãã¤ã«",outline:"ã¢ã¦ãã©ã¤ã³",annotationStyle:"注éã¹ã¿ã¤ã«",redaction:"é»å¡ããµã¤ããã¼"},menu:{viewControls:"表示ã³ã³ããã¼ã«",zoomControls:"ãºã¼ã ã³ã³ããã¼ã«",moreOptions:"ãã®ä»ã®ãªãã·ã§ã³"},outline:{title:"ã¢ã¦ãã©ã¤ã³",loading:"ã¢ã¦ãã©ã¤ã³ãèªã¿è¾¼ã¿ä¸...",noOutline:"ã¢ã¦ãã©ã¤ã³ãããã¾ãã",noBookmarks:"ãã®ããã¥ã¡ã³ãã«ã¯ããã¯ãã¼ã¯ãããã¾ãã"},page:{settings:"ãã¼ã¸è¨å®",single:"åä¸ãã¼ã¸",twoOdd:"è¦éãï¼å¥æ°ï¼",twoEven:"è¦éãï¼å¶æ°ï¼",vertical:"縦æ¹å",horizontal:"横æ¹å",spreadMode:"è¦éãã¢ã¼ã",scrollLayout:"ã¹ã¯ãã¼ã«ã¬ã¤ã¢ã¦ã",rotation:"ãã¼ã¸å転",next:"次ã®ãã¼ã¸",previous:"åã®ãã¼ã¸"},rotate:{clockwise:"æè¨åãã«å転",counterClockwise:"åæè¨åãã«å転"},selection:{copy:"鏿ç¯å²ãã³ãã¼"},mode:{view:"表示",annotate:"注é",shapes:"å³å½¢",form:"ãã©ã¼ã ",redact:"é»å¡ã",insert:"æ¿å
¥"},form:{textfield:"ããã¹ããã£ã¼ã«ã",checkbox:"ãã§ãã¯ããã¯ã¹",radio:"ã©ã¸ãªãã¿ã³",select:"ãããããã¦ã³",listbox:"ãªã¹ãããã¯ã¹"},annotation:{text:"ããã¹ã",highlight:"ãã¤ã©ã¤ã",strikeout:"åãæ¶ãç·",underline:"ä¸ç·",squiggly:"æ³¢ç·",rectangle:"åè§å½¢",circle:"å",line:"ç·",arrow:"ç¢å°",polygon:"å¤è§å½¢",polyline:"æãç·",ink:"ã¤ã³ã¯",inkHighlighter:"ã¤ã³ã¯èå
ãã³",stamp:"ã¹ã¿ã³ã",freeText:"ããªã¼ããã¹ã",square:"æ£æ¹å½¢",style:"注éã¹ã¿ã¤ã«",styles:"{type}ã®ã¹ã¿ã¤ã«",defaults:"{type}ã®ããã©ã«ã",color:"è²",opacity:"ä¸éæåº¦",blendMode:"ãã¬ã³ãã¢ã¼ã",strokeWidth:"ç·ã®å¤ªã",strokeColor:"ç·ã®è²",borderStyle:"æ ç·ã®ã¹ã¿ã¤ã«",fillColor:"å¡ãã¤ã¶ãã®è²",fontSize:"ãã©ã³ããµã¤ãº",fontFamily:"ãã©ã³ã",textAlign:"ããã¹ãé
ç½®",verticalAlign:"縦æ¹åã®é
ç½®",lineEnding:"ç·ã®ç«¯ç¹",lineStart:"å§ç¹",lineEnd:"çµç¹",font:"ãã©ã³ã",fontColor:"ãã©ã³ãã®è²",backgroundColor:"èæ¯è²",noStyles:"ãã®æ³¨éã«ã¯ã¹ã¿ã¤ã«ãããã¾ããã",noStylesStamp:"ã¹ã¿ã³ãã«ã¯ã¹ã¿ã¤ã«ãããã¾ããã",selectAnnotation:"注éã鏿ãã¦ã¹ã¿ã¤ã«ã表示",deleteSelected:"鏿ããæ³¨éãåé¤",deleteAllSelected:"鏿ãåé¤",multiSelect:"{count}ä»¶ã®æ³¨éã鏿ããã¦ãã¾ã",group:"ã°ã«ã¼ãå",ungroup:"ã°ã«ã¼ãè§£é¤",moreTools:"ãã®ä»ã®ãã¼ã«",addLink:"ãªã³ã¯ã追å ",removeLink:"ãªã³ã¯ãåé¤",gotoLink:"ãªã³ã¯å
ã¸ç§»å",comment:"ã³ã¡ã³ã
vendor: 6,453 bytes, line 2217
2217",redact:"é»å¡ã",overlayText:"ãªã¼ãã¼ã¬ã¤ããã¹ã",overlayTextPlaceholder:"ä¾: é»å¡ãæ¸ã¿",rotation:"å転"},insert:{image:"ç»å",rubberStamp:"ã¹ã¿ã³ã"},redaction:{redact:"é»å¡ã",area:"ç¯å²ã®é»å¡ã",text:"ããã¹ãã®é»å¡ã",apply:"é»å¡ããé©ç¨",applyAll:"ãã¹ã¦é©ç¨",clearAll:"ãã¹ã¦ã¯ãªã¢",deleteSelected:"鏿ããé»å¡ããåé¤",commitSelected:"鏿ããé»å¡ããé©ç¨",emptyState:"ä¿çä¸ã®é»å¡ãã¯ããã¾ãã",panel:{title:"é»å¡ã",itemCount:"{count}ä»¶ã®ä¿çä¸ã®é»å¡ã",itemCountPlural:"{count}ä»¶ã®ä¿çä¸ã®é»å¡ã",clearAll:"ãã¹ã¦ã¯ãªã¢",redactAll:"ãã¹ã¦é»å¡ã"}},history:{undo:"å
ã«æ»ã",redo:"ããç´ã"},comments:{page:"{page}ãã¼ã¸",commentCount:"{count}ä»¶ã®ã³ã¡ã³ã",commentCountPlural:"{count}ä»¶ã®ã³ã¡ã³ã",addComment:"ã³ã¡ã³ãã追å ...",addReply:"è¿ä¿¡ã追å ...",showAllAnnotations:"ãã¹ã¦ã®æ³¨éã表示",closeAllAnnotations:"ãã¹ã¦ã®æ³¨éãéãã",save:"ä¿å",cancel:"ãã£ã³ã»ã«",edit:"ç·¨é",delete:"åé¤",showMore:"ãã£ã¨è¦ã",showLess:"éãã",emptyState:"注éã追å ãã¦ã³ã¡ã³ãã§ããããã«ãã¾ãããã"},blendMode:{normal:"é常",multiply:"ä¹ç®",screen:"ã¹ã¯ãªã¼ã³",overlay:"ãªã¼ãã¼ã¬ã¤",darken:"æã",lighten:"æãã",colorDodge:"è¦ãç¼ãã«ã©ã¼",colorBurn:"ç¼ãè¾¼ã¿ã«ã©ã¼",hardLight:"ãã¼ãã©ã¤ã",softLight:"ã½ããã©ã¤ã",difference:"å·®ã®çµ¶å¯¾å¤",exclusion:"é¤å¤",hue:"è²ç¸",saturation:"彩度",color:"ã«ã©ã¼",luminosity:"è¼åº¦"},print:{title:"å°å·è¨å®",loading:"ããã¥ã¡ã³ããæºåä¸...",pages:"å°å·ãããã¼ã¸",all:"ãã¹ã¦ã®ãã¼ã¸",current:"ç¾å¨ã®ãã¼ã¸ ({currentPage})",specify:"ãã¼ã¸ãæå®",specifyEG:"ä¾: 1-3, 5, 8-10",total:"ããã¥ã¡ã³ãã®ç·ãã¼ã¸æ°: {totalPages}",annotation:"注éãå«ãã",printing:"å°å·ä¸...",print:"å°å·",cancel:"ãã£ã³ã»ã«"},protect:{title:"ããã¥ã¡ã³ãã®ä¿è·",cancel:"ãã£ã³ã»ã«",apply:"ä¿è·ãé©ç¨",applying:"é©ç¨ä¸...",applyFailed:"ä¿è·ã®é©ç¨ã«å¤±æãã¾ãããããä¸åº¦ã試ããã ããã",removeFailed:"ä¿è·ã®è§£é¤ã«å¤±æãã¾ãããããä¸åº¦ã試ããã ããã",passwordMismatch:"ãã¹ã¯ã¼ããä¸è´ãã¾ãã",noProtectionSelected:"é©ç¨ããä¿è·ãªãã·ã§ã³ãå°ãªãã¨ã1ã¤é¸æãã¦ãã ããã",bothPasswordsNote:"ããã¥ã¡ã³ããã¹ã¯ã¼ãã§éããã¦ã¼ã¶ã¼ã¯æ¨©éãå¶éããã¾ãããªã¼ãã¼ãã¹ã¯ã¼ãã使ç¨ããã¨å®å
¨ãªã¢ã¯ã»ã¹ãå¯è½ã«ãªãã¾ãã",openPassword:{title:"éãã«ã¯ãã¹ã¯ã¼ããå¿
è¦",description:"ãã®ããã¥ã¡ã³ãã表示ããã«ã¯ãã¹ã¯ã¼ãã®å
¥åãå¿
è¦ã§ãã",label:"ããã¥ã¡ã³ããã¹ã¯ã¼ã",placeholder:"ãã¹ã¯ã¼ããå
¥å",confirm:"ãã¹ã¯ã¼ãã®ç¢ºèª",confirmPlaceholder:"ãã¹ã¯ã¼ãã確èª"},ownerPassword:{label:"ãªã¼ãã¼ãã¹ã¯ã¼ã",placeholder:"ãªã¼ãã¼ãã¹ã¯ã¼ããå
¥å",confirm:"ãªã¼ãã¼ãã¹ã¯ã¼ãã®ç¢ºèª",confirmPlaceholder:"ãªã¼ãã¼ãã¹ã¯ã¼ãã確èª"},permissions:{title:"権éãå¶é",description:"ãã®ããã¥ã¡ã³ãã§ã¦ã¼ã¶ã¼ãè¡ããæä½ãå¶éãã¾ãã",allowedActions:"許å¯ãããæä½",print:"å°å·",printHighQuality:"é«å質å°å·",copy:"ã³ã³ãã³ãã®ã³ãã¼",accessibility:"ã¢ã¯ã»ã·ããªãã£ã®ããã®æ½åº",modify:"ã³ã³ãã³ãã®å¤æ´",annotations:"注éã»ã³ã¡ã³ãã®è¿½å /夿´",fillForms:"ãã©ã¼ã ã®å
¥åã¨ç½²å",assemble:"ãã¼ã¸ã®çµã¿ç«ã¦ã¨æ½åº"},encrypted:{title:"ããã¥ã¡ã³ãã¯ä¿è·ããã¦ãã¾ã",description:"ãã®ããã¥ã¡ã³ãã¯ãªã¼ãã¼ã«ãã£ã¦ä¿è·ããã¦ãã¾ããã»ãã¥ãªãã£è¨å®ã夿´ããã«ã¯ãªã¼ãã¼ãã¹ã¯ã¼ããå
¥åãã¦ãã ããã",enterOwnerPassword:"ãªã¼ãã¼ãã¹ã¯ã¼ããå
¥åãã¦å¤æ´",unlockAndEdit:"ããã¯è§£é¤ãã¦ç·¨é"},modifyProtection:{title:"ä¿è·ã®å¤æ´",description:"ããã¥ã¡ã³ãã®ä¿è·ãã©ã®ããã«å¤æ´ããã鏿ãã¦ãã ããã",changeOption:"ãã¹ã¯ã¼ãã¾ãã¯æ¨©éã夿´",changeDescription:"ããã¥ã¡ã³ããã¹ã¯ã¼ãã¾ãã¯æ¨©éè¨å®ãæ´æ°ãã¾ãã",removeOption:"ãã¹ã¦ã®ä¿è·ãè§£é¤",removeDescription:"ãã®ããã¥ã¡ã³ããããã¹ã¯ã¼ãä¿è·ãè§£é¤ãã¾ãã"},removeProtection:{title:"ä¿è·ã®è§£é¤",warning:"ä¿è·ãè§£é¤ãã¦ãããããã§ããï¼",description:"ããã¥ã¡ã³ããããã¹ã¦ã®ãã¹ã¯ã¼ãä¿è·ãè§£é¤ããã¾ãã誰ã§ãããã¥ã¡ã³ããéãã¦å¤æ´ã§ããããã«ãªãã¾ãã",confirm:"ä¿è·ãè§£é¤"}},security:{protected:{title:"ãã®ããã¥ã¡ã³ãã¯ä¿è·ããã¦ãã¾ã",description:"ãã®ãã¡ã¤ã«ã¯ä¿è·ããã¦ãããä¸é¨ã®æ©è½ãç¡å¹ã«ãªã£ã¦ããå ´åãããã¾ããããã¥ã¡ã³ãã¡ãã¥ã¼ã®ã»ãã¥ãªãã£ããæ¨©éã確èªã¾ãã¯ããã¯è§£é¤ã§ãã¾ãã",viewPermissions:"権éã表示"},viewPermissions:{title:"ããã¥ã¡ã³ãã®æ¨©é",description:"ãã®ãã¡ã¤ã«ã¯ãªã¼ãã¼ã«ãã£ã¦å¶éããã¦ãããç¹å®ã®æä½ãããã¯è§£é¤ããã«ã¯ãã¹ã¯ã¼ããå¿
è¦ã§ãã",restrictedActions:"å¶éãããæä½"},unlock:{label:"ãªã¼ãã¼ãã¹ã¯ã¼ããå
¥åãã¦ããã¯è§£é¤",placeholder:"ãªã¼ãã¼ãã¹ã¯ã¼ããå
¥å",button:"ãã¡ã¤ã«ã®ããã¯ãè§£é¤",invalidPassword:"ãã¹ã¯ã¼ããç¡å¹ã§ããããä¸åº¦ã試ããã ããã",failed:"ããã¯è§£é¤ã«å¤±æãã¾ãããããä¸åº¦ã試ããã ããã",success:"ãªã¼ãã¼æ¨©éãããã¯è§£é¤ããã¾ããï¼å®å
¨ãªã¢ã¯ã»ã¹ãå¯è½ã«ãªãã¾ããã"}},common:{close:"éãã",back:"æ»ã",cancel:"ãã£ã³ã»ã«"},link:{title:"ãªã³ã¯ã®æ¿å
¥",url:"URL",page:"ãã¼ã¸",enterUrl:"URLãå
¥å",enterPage:"ãã¼ã¸çªå·ãå
¥å",pageRange:"1ï½{totalPages}ãã¼ã¸",link:"ãªã³ã¯"},stamp:{title:"ã¹ã¿ã³ã",allStamps:"ãã¹ã¦ã®ã¹ã¿ã³ã",export:"ã¹ã¿ã³ããã¨ã¯ã¹ãã¼ã",emptyState:"鏿ããã©ã¤ãã©ãªã«ã¹ã¿ã³ããè¦ã¤ããã¾ããã",createFromSelected:"ã¹ã¿ã³ãã使",createFromGroup:"ã°ã«ã¼ãããã¹ã¿ã³ãã使",library:{custom:"ã«ã¹ã¿ã ã¹ã¿ã³ã"}}
2217}},{code:"sv",name:"Svenska",translations:{search:{placeholder:"Sök",caseSensitive:"Skiftlägeskänslig",wholeWord:"Hela ord",resultsFound:"{count} träffar",page:"Sida {page}"},zoom:{in:"Zooma in",out:"Zooma ut",fitWidth:"Sidbredd",fitPage:"SidnivÃ¥",marquee:"Zooma till markering",menu:"Zoommeny",level:"ZoomnivÃ¥ ({level}%)",dragTip:"Dra för att välja ett omrÃ¥de att zooma in pÃ¥"},pan:{toggle:"Panorera"},pointer:{toggle:"Välj"},capture:{screenshot:"Skärmdumpa",dragTip:"Dra för att välja omrÃ¥de",title:"Förhandsgranskning",download:"Ladda ned",cancel:"Avbryt"},document:{menu:"Filmeny",open:"Ãppna",close:"Stäng",print:"Skriv ut",protect:"Säkerhet",export:"Ladda ned",fullscreen:"Helskärmsläge",loading:"Läser in dokumentet..."},emptyState:{title:"Ingen fil är öppen",description:"Ãppna en pdf för att komma igÃ¥ng.",descriptionMulti:"Du kan växla mellan olika filer med hjälp av flikar.",openButton:"Ãppna fil",supportedFormats:"Format som stöds: PDF"},passwordPrompt:{title:"Lösenord krävs",required:"Den här filen är lösenordsskyddad. Skriv in lösenordet för att öppna den.",incorrect:"Lösenordet du skrev in var fel. Var god försök igen.",incorrectWarning:"Fel lösenord. Kontrollera att du skrivit rätt och försök igen.",label:"Lösenord",placeholder:"Skriv in filens lösenord",open:"Ãppna",opening:"Ãppnar...",cancel:"Avbryt",close:"Stäng"},documentError:{title:"Fel när dokumentet lästes in",unknown:"Ett okänt fel inträffade",errorCode:"Felkod: {code}",close:"Stäng dokumentet"},panel:{sidebar:"Sidofält",search:"Sök",comment:"Kommentera",thumbnails:"Miniatyrbilder",outline:"Dokumentdisposition",annotationStyle:"Annoteringsstil",redaction:"Sidofält för maskning"},menu:{viewControls:"Visa kontroller",zoomControls:"Zoomkontroller",moreOptions:"Fler alternativ"},outline:{title:"Dokumentdisposition",loading:"Läser in disposition...",noOutline:"Ingen disposition tillgänglig",noBookmarks:"Det här dokumentet har inga bokmärken"},page:{settings:"Sidinställningar",single:"Enkelsidig vy",twoOdd:"Dubbelsidig vy (Udda)",twoEven:"Dubbelsidig vy (Jämna)",vertical:"Lodrätt",horizontal:"VÃ¥grätt",spreadMode:"Vy",scrollLayout:"Skrollningsläge",rotation:"Rotera",next:"Nästa sida",previous:"FöregÃ¥ende sida"},rotate:{clockwise:"Rotera medurs",counterClockwise:"Rotera moturs"},selection:{copy:"Kopiera markering"},mode:{view:"Läsvy",annotate:"Annotera",shapes:"Rita former",form:"Formulär",redact:"Maskera",insert:"Infoga"},form:{textfield:"Textfält",checkbox:"Kryssruta",radio:"Alternativknapp",select:"Rullgardinsmeny",listbox:"Listruta"},annotation:{text:"Text",highlight:"Ãverstrykningspenna",strikeout:"Genomstruken",underline:"Understruken",squiggly:"VÃ¥gig",rectangle:"Rektangel",circle:"Cirkel",line:"Linje",arrow:"Pil",polygon:"Polygon",polyline:"Flerpunktslinje",ink:"Bläck",inkHighlighter:"Bläcköverstrykningspenna",stamp:"Stämpel",freeText:"Fritext",square:"Kvadrat",style:"Annoteringsstil",styles:"{type}stilar",defaults:"{type}förval",color:"Färg",opacity:"Genomskinlighet",blendMode:"Blandningsläge",strokeWidth:"Linjebredd",strokeColor:"Linjefärg",borderStyle:"Kantlinjestil",fillColor:"Fyllningsfärg",fontSize:"Teckenstorlek",fontFamily:"Typsnitt",textAlign:"Justering",verticalAlign:"Vertikal justering",lineEnding:"Linjeslut",lineStart:"Linjestart",lineEnd:"Linjeslut",font:"Typsnitt",fontColor:"Teckenfärg",backgroundColor:"Bakgrundsfärg",noStyles:"Den här annoteringen har inga valda stilar.",noStylesStamp:"Inga stilar finns tillgängliga.",selectAnnotation:"Välj en annotering för att se stilalternativ.",deleteSelected:"Ta bort vald annotering",deleteAllSelected:"Ta bort alla valda",multiSelect:"{count} annoteringar valda",group:"Gruppera",ungroup:"Lös upp grupp",moreTools:"Fler verktyg",addLink:"Lägg till länk",removeLink:"Ta bort länk",gotoLink:"GÃ¥ till länk",comment:"Kommentera
vendor: 5,244 bytes, line 2217
2217",redact:"Maskera",overlayText:"Textöverlägg",overlayTextPlaceholder:"t.ex., MASKERAD",rotation:"Rotera"},insert:{image:"Bild",rubberStamp:"Stämpel"},redaction:{redact:"Maskera",area:"Maskera omrÃ¥de",text:"Maskera text",apply:"Tillämpa maskering",applyAll:"Tillämpa alla",clearAll:"Rensa alla",deleteSelected:"Ta bort vald maskering",commitSelected:"Tillämpa vald maskering",emptyState:"Inget väntar pÃ¥ att maskeras",panel:{title:"Maskering",itemCount:"{count} väntar pÃ¥ att maskeras",itemCountPlural:"{count} väntar pÃ¥ att maskeras",clearAll:"Rensa alla",redactAll:"Maskera alla"}},history:{undo:"Ã
ngra",redo:"Gör om"},comments:{page:"Sida {page}",commentCount:"{count} kommentar",commentCountPlural:"{count} kommentarer",addComment:"Lägg till kommentar...",addReply:"Lägg till svar...",showAllAnnotations:"Visa alla anteckningar",closeAllAnnotations:"Stäng alla anteckningar",save:"Spara",cancel:"Avbryt",edit:"Redigera",delete:"Radera",showMore:"mer",showLess:"mindre",emptyState:"Lägg till annoteringar för att kunna kommentera dem."},blendMode:{normal:"Normal",multiply:"Multiplicera",screen:"Skärm",overlay:"Täck över",darken:"Mörkare",lighten:"Ljusare",colorDodge:"Färgskugga",colorBurn:"Efterbelys färg",hardLight:"Skarpt ljus",softLight:"Mjukt ljus",difference:"Differens",exclusion:"Uteslutning",hue:"Nyans",saturation:"Mättnad",color:"Färg",luminosity:"Luminiscens"},print:{title:"Utskriftsinställningar",loading:"Förbereder dokument...",pages:"Sidor att skriva ut",all:"Alla sidor",current:"Aktuell sida ({currentPage})",specify:"Välj sidor",specifyEG:"t.ex. 1-3, 5, 8-10",total:"Totalt antal sidor i dokumentet: {totalPages}",annotation:"Inkludera annoteringar",printing:"Skriver ut...",print:"Skriv ut",cancel:"Avbryt"},protect:{title:"Skydda dokumentet",cancel:"Avbryt",apply:"Tillämpa skydd",applying:"Tillämpar...",applyFailed:"Misslyckades med att tillämpa skydd. Var god försök igen.",removeFailed:"Misslyckades med att ta bort skydd. Var god försök igen.",passwordMismatch:"Lösenorden stämmer inte överens",noProtectionSelected:"Välj minst ett alternativ att tillämpa.",bothPasswordsNote:"Användare som öppnar dokumentet med lösenordet kommer ha begränsade behörigheter. Använd ägarlösenordet för att lÃ¥sa upp alla behörigheter.",openPassword:{title:"Kräv lösenord för att öppna fil",description:"Användare mÃ¥ste skriva in ett lösenord för att öppna dokumentet.",label:"Dokumentlösenord",placeholder:"Skriv in lösenord",confirm:"Bekräfta lösenord",confirmPlaceholder:"Bekräfta lösenord"},ownerPassword:{label:"Ãgarlösenord",placeholder:"Skriv in ägarlösenord",confirm:"Bekräfta ägarlösenord",confirmPlaceholder:"Bekräfta ägarlösenord"},permissions:{title:"Begränsa behörigheter",description:"Begränsa vad användaren kan göra med dokumentet.",allowedActions:"TillÃ¥tna handlingar",print:"Skriv ut",printHighQuality:"Skriv ut i hög kvalitet",copy:"Kopiera innehÃ¥ll",accessibility:"Extrahera för tillgänglighet",modify:"Ãndra innehÃ¥ll",annotations:"Lägga till/ändra annoteringar & kommentarer",fillForms:"Fylla i formulär & signera",assemble:"Ordna sidor"},encrypted:{title:"Dokumentet är skyddat",description:"Det här dokumentet skyddas av ägaren. Skriv in ägarlösenordet för att ändra säkerhetsinställningarna.",enterOwnerPassword:"Skriv in ägarlösenordet för att redigera",unlockAndEdit:"LÃ¥s upp & redigera"},modifyProtection:{title:"Ãndra skydd",description:"Välj hur du vill ändra dokumentskyddet.",changeOption:"Ãndra lösenord eller behörigheter",changeDescription:"Ãndra dokumentets lösenord eller behörigheter.",removeOption:"Ta bort alla skydd",removeDescription:"Ta bort lösenordsskydd frÃ¥n dokumentet."},removeProtection:{title:"Ta bort skydd",warning:"Ãr du säker pÃ¥ att du vill ta bort skydd?",description:"Det här kommer ta bort allt lösenordsskydd frÃ¥n dokumentet. Vem som helst kommer kunna öppna och ändra det.",confirm:"Ta bort skydd"}},security:{protected:{title:"Det här dokumentet är skyddat",description:"Den här filen är skyddad och vissa funktioner kan vara inaktiverade. GÃ¥ till Säkerhet i filmenyn för att visa eller lÃ¥sa upp behörigheter.",viewPermissions:"Visa behörigheter"},viewPermissions:{title:"Filbehörigheter",description:"Den här filen är skyddad av ägaren och kräver ett lösenord för vissa handlingar.",restrictedActions:"Begränsade handlingar"},unlock:{label:"Skriv in ägarlösenordet för att lÃ¥sa upp filen",placeholder:"Skriv in ägarlösenordet",button:"LÃ¥s upp filen",invalidPassword:"Ogiltigt lösenord. Var vänlig försök igen.",failed:"Misslyckades med att lÃ¥sa upp. Var vänlig försök igen.",success:"Ãgarbehörighet upplÃ¥st! Du har nu full Ã¥tkomst."}},common:{close:"Stäng",back:"Tillbaka",cancel:"Avbryt"},link:{title:"Lägg till länk",url:"URL",page:"Sida",enterUrl:"Skriv in URL",enterPage:"Skriv in sidnummer",pageRange:"Sida 1 till {totalPages}",link:"Länk"},stamp:{title:"Stämplar",allStamps:"Alla stämplar",export:"Exportera stämplar",emptyState:"Inga stämplar hittades i det valda biblioteket.",createFromSelected:"Skapa stämpel",createFromGroup:"Skapa stämpel frÃ¥n grupp",library:{custom:"Egna stämplar"}}
vendor: 15,651 bytes, line 2217
2217}}],paramResolvers:ww},ui:{schema:{id:"pdf-viewer-ui",version:"1.0.0",toolbars:{"main-toolbar":{id:"main-toolbar",position:{placement:"top",slot:"main",order:0},permanent:!0,responsive:{localeOverrides:{groups:[{id:"cjk-languages",locales:["zh-CN","ja"],breakpoints:{sm:{replaceHide:["zoom-toolbar","mode-select-button","form-mode","redact-mode"],replaceShow:["view-mode","annotate-mode","shapes-mode","insert-mode","overflow-tabs-button","pan-button","pointer-button","divider-3"]},md:{replaceShow:["view-mode","annotate-mode","shapes-mode","insert-mode","zoom-toolbar","overflow-tabs-button","pan-button","pointer-button","divider-3"],replaceHide:["zoom-menu-button","mode-select-button","form-mode","redact-mode"]}}},{id:"germanic-languages",locales:["de","nl"],breakpoints:{md:{replaceShow:["view-mode","annotate-mode","zoom-toolbar","pan-button","pointer-button","divider-3","overflow-tabs-button"]}}}]},breakpoints:{xxxs:{maxWidth:400,hide:["annotate-mode","view-mode","shapes-mode","insert-mode","form-mode","redact-mode","zoom-toolbar","pan-button","pointer-button","divider-3","page-settings-button","zoom-menu-button","divider-2","overflow-tabs-button"],show:["mode-select-button"]},xxs:{minWidth:400,show:["page-settings-button","zoom-menu-button","divider-2"],hide:["overflow-left-action-menu-button"]},xs:{minWidth:500,maxWidth:640,show:["pan-button","pointer-button","divider-3"]},sm:{minWidth:640,maxWidth:768,hide:["shapes-mode","insert-mode","form-mode","redact-mode","zoom-toolbar","mode-select-button"],show:["view-mode","annotate-mode","overflow-tabs-button","pan-button","pointer-button","divider-3"]},md:{minWidth:768,show:["view-mode","annotate-mode","shapes-mode","zoom-toolbar","pan-button","pointer-button","divider-3","overflow-tabs-button"],hide:["zoom-menu-button","mode-select-button"]},lg:{minWidth:1024,show:["shapes-mode","insert-mode","form-mode","redact-mode"],hide:["overflow-tabs-button"]}}},items:[{type:"group",id:"left-group",alignment:"start",gap:2,items:[{type:"command-button",id:"document-menu-button",commandId:"document:menu",variant:"icon",categories:["document","document-menu"]},{type:"divider",id:"divider-1",orientation:"vertical"},{type:"command-button",id:"sidebar-button",commandId:"panel:toggle-sidebar",variant:"icon",categories:["panel","panel-sidebar"]},{type:"command-button",id:"overflow-left-action-menu-button",commandId:"left-action-menu:overflow-menu",variant:"icon",categories:["ui","ui-menu"]},{type:"command-button",id:"page-settings-button",commandId:"page:settings",variant:"icon",categories:["page","page-settings"]}]},{type:"divider",id:"divider-2",orientation:"vertical"},{type:"group",id:"center-group",alignment:"center",gap:2,items:[{type:"command-button",id:"zoom-menu-button",commandId:"zoom:toggle-menu-mobile",variant:"icon",categories:["zoom","zoom-menu"]},{type:"custom",id:"zoom-toolbar",componentId:"zoom-toolbar",categories:["zoom"]},{type:"divider",id:"divider-3",orientation:"vertical",visibilityDependsOn:{itemIds:["zoom-toolbar","zoom-menu-button"]}},{type:"command-button",id:"pan-button",commandId:"pan:toggle",variant:"icon",categories:["tools","pan"]},{type:"command-button",id:"pointer-button",commandId:"pointer:toggle",variant:"icon",categories:["tools","pointer"]}]},{type:"spacer",id:"spacer-1",flex:!0},{type:"custom",id:"mode-select-button",componentId:"mode-select-button",categories:["mode"],visibilityDependsOn:{itemIds:["mode:annotate","mode:shapes","mode:insert","mode:form","mode:redact"]}},{type:"tab-group",id:"mode-tabs",tabs:[{id:"view-mode",commandId:"mode:view",variant:"text",categories:["mode","mode-view"],visibilityDependsOn:{itemIds:["annotate-mode","shapes-mode","insert-mode","form-mode","redact-mode"]}},{id:"annotate-mode",commandId:"mode:annotate",variant:"text",categories:["mode","mode-annotate","annotation"]},{id:"shapes-mode",commandId:"mode:shapes",variant:"text",categories:["mode","mode-shapes","annotation"]},{id:"insert-mode",commandId:"mode:insert",variant:"text",categories:["mode","mode-insert","insert"]},{id:"form-mode",commandId:"mode:form",variant:"text",categories:["mode","mode-form","form"]},{id:"redact-mode",commandId:"mode:redact",variant:"text",categories:["mode","mode-redact","redaction"]},{id:"overflow-tabs-button",commandId:"tabs:overflow-menu",variant:"icon",categories:["ui","ui-menu"],visibilityDependsOn:{menuId:"mode-tabs-overflow-menu"}}]},{type:"spacer",id:"spacer-2",flex:!0},{type:"group",id:"right-group",alignment:"end",gap:2,items:[{type:"command-button",id:"search-button",commandId:"panel:toggle-search",variant:"icon",categories:["panel","panel-search"]},{type:"command-button",id:"comment-button",commandId:"panel:toggle-comment",variant:"icon",categories:["panel","panel-comment"]}]}]},"annotation-toolbar":{id:"annotation-toolbar",position:{placement:"top",slot:"secondary",order:0},responsive:{breakpoints:{sm:{maxWidth:640,hide:["add-text","add-ink","add-ink-highlighter","add-insert-text","add-replace-text","add-comment"],show:["overflow-annotation-tools"]},md:{minWidth:640,hide:["overflow-annotation-tools"],show:["add-text","add-ink","add-ink-highlighter","add-insert-text","add-replace-text","add-comment"]}}},permanent:!1,categories:["annotation"],items:[{type:"spacer",id:"spacer-3",flex:!0},{type:"group",id:"annotation-tools",alignment:"start",gap:2,items:[{type:"command-button",id:"add-highlight",commandId:"annotation:add-highlight",variant:"icon",categories:["annotation","annotation-markup","annotation-highlight"]},{type:"command-button",id:"add-strikeout",commandId:"annotation:add-strikeout",variant:"icon",categories:["annotation","annotation-markup","annotation-strikeout"]},{type:"command-button",id:"add-underline",commandId:"annotation:add-underline",variant:"icon",categories:["annotation","annotation-markup","annotation-underline"]},{type:"command-button",id:"add-squiggly",commandId:"annotation:add-squiggly",variant:"icon",categories:["annotation","annotation-markup","annotation-squiggly"]},{type:"command-button",id:"add-ink",commandId:"annotation:add-ink",variant:"icon",categories:["annotation","annotation-ink"]},{type:"command-button",id:"add-ink-highlighter",commandId:"annotation:add-ink-highlighter",variant:"icon",categories:["annotation","annotation-ink"]},{type:"command-button",id:"add-text",commandId:"annotation:add-text",variant:"icon",categories:["annotation","annotation-text"]},{type:"command-button",id:"add-insert-text",commandId:"annotation:add-insert-text",variant:"icon",categories:["annotation","annotation-markup","annotation-insert-text"]},{type:"command-button",id:"add-replace-text",commandId:"annotation:add-replace-text",variant:"icon",categories:["annotation","annotation-markup","annotation-replace-text"]},{type:"command-button",id:"add-comment",commandId:"annotation:add-comment",variant:"icon",categories:["annotation","annotation-comment-tool"]},{type:"command-button",id:"overflow-annotation-tools",commandId:"annotation:overflow-tools",variant:"icon",categories:["annotation","annotation-overflow"]},{type:"divider",id:"annotation-tools-divider-1",orientation:"vertical"},{type:"command-button",id:"toggle-annotation-style",commandId:"panel:toggle-annotation-style",variant:"icon",categories:["panel","panel-annotation-style"]},{type:"divider",id:"annotation-tools-divider-2",orientation:"vertical",visibilityDependsOn:{itemIds:["toggle-annotation-style"]}},{type:"command-button",id:"undo-button",commandId:"history:undo",variant:"icon",categories:["history","history-undo"]},{type:"command-button",id:"redo-button",commandId:"history:redo",variant:"icon",categories:["history","history-redo"]}]},{type:"spacer",id:"spacer-4",flex:!0}]},"shapes-toolbar":{id:"shapes-toolbar",position:{placement:"top",slot:"secondary",order:0},responsive:{breakpoints:{sm:{maxWidth:640,hide:["add-polygon","add-polyline"],show:["overflow-shapes-tools"]},md:{minWidth:640,hide:["overflow-shapes-tools"],show:["add-polygon","add-polyline"]}}},permanent:!1,categories:["annotation","annotation-shape"],items:[{type:"spacer",id:"spacer-5",flex:!0},{type:"group",id:"shapes-tools",alignment:"start",gap:2,items:[{type:"command-button",id:"add-rectangle",commandId:"annotation:add-rectangle",variant:"icon",categories:["annotation","annotation-shape","annotation-rectangle"]},{type:"command-button",id:"add-circle",commandId:"annotation:add-circle",variant:"icon",categories:["annotation","annotation-shape","annotation-circle"]},{type:"command-button",id:"add-line",commandId:"annotation:add-line",variant:"icon",categories:["annotation","annotation-shape","annotation-line"]},{type:"command-button",id:"add-arrow",commandId:"annotation:add-arrow",variant:"icon",categories:["annotation","annotation-shape","annotation-arrow"]},{type:"command-button",id:"add-polygon",commandId:"annotation:add-polygon",variant:"icon",categories:["annotation","annotation-shape","annotation-polygon"]},{type:"command-button",id:"add-polyline",commandId:"annotation:add-polyline",variant:"icon",categories:["annotation","annotation-shape","annotation-polyline"]},{type:"command-button",id:"overflow-shapes-tools",commandId:"annotation:overflow-shapes",variant:"icon",categories:["annotation","annotation-shape","annotation-overflow"]},{type:"divider",id:"shapes-tools-divider-1",orientation:"vertical"},{type:"command-button",id:"toggle-annotation-style",commandId:"panel:toggle-annotation-style",variant:"icon",categories:["panel","panel-annotation-style"]},{type:"divider",id:"shapes-tools-divider-2",orientation:"vertical",visibilityDependsOn:{itemIds:["toggle-annotation-style"]}},{type:"command-button",id:"undo-button",commandId:"history:undo",variant:"icon",categories:["history","history-undo"]},{type:"command-button",id:"redo-button",commandId:"history:redo",variant:"icon",categories:["history","history-redo"]}]},{type:"spacer",id:"spacer-6",flex:!0}]},"form-toolbar":{id:"form-toolbar",position:{placement:"top",slot:"secondary",order:0},responsive:{breakpoints:{sm:{maxWidth:640,hide:["add-form-select","add-form-listbox"],show:["overflow-forms-tools"]},md:{minWidth:640,hide:["overflow-forms-tools"],show:["add-form-select","add-form-listbox"]}}},permanent:!1,categories:["form"],items:[{type:"spacer",id:"spacer-form-1",flex:!0},{type:"group",id:"form-tools",alignment:"start",gap:2,items:[{type:"command-button",id:"add-form-textfield",commandId:"form:add-textfield",variant:"icon",categories:["form","form-textfield"]},{type:"command-button",id:"add-form-checkbox",commandId:"form:add-checkbox",variant:"icon",categories:["form","form-checkbox"]},{type:"command-button",id:"add-form-radio",commandId:"form:add-radio",variant:"icon",categories:["form","form-radio"]},{type:"command-button",id:"add-form-select",commandId:"form:add-select",variant:"icon",categories:["form","form-select"]},{type:"command-button",id:"add-form-listbox",commandId:"form:add-listbox",variant:"icon",categories:["form","form-listbox"]},{type:"command-button",id:"overflow-forms-tools",commandId:"form:overflow-tools",variant:"icon",categories:["form","form-overflow"]},{type:"divider",id:"form-tools-divider-1",orientation:"vertical"},{type:"command-button",id:"toggle-annotation-style",commandId:"panel:toggle-annotation-style",variant:"icon",categories:["panel","panel-annotation-style"]},{type:"command-button",id:"toggle-form-fill-mode",commandId:"form:toggle-fill-mode",variant:"icon",categories:["form","form-fill-mode"]},{type:"divider",id:"form-tools-divider-2",orientation:"vertical"},{type:"command-button",id:"undo-button",commandId:"history:undo",variant:"icon",categories:["history","history-undo"]},{type:"command-button",id:"redo-button",commandId:"history:redo",variant:"icon",categories:["history","history-redo"]}]},{type:"spacer",id:"spacer-form-2",flex:!0}]},"insert-toolbar":{id:"insert-toolbar",position:{placement:"top",slot:"secondary",order:0},permanent:!1,categories:["insert"],items:[{type:"spacer",id:"spacer-insert-1",flex:!0},{type:"group",id:"insert-tools",alignment:"start",gap:2,items:[{type:"command-button",id:"add-rubber-stamp",commandId:"insert:add-rubber-stamp",variant:"icon",categories:["insert","insert-rubber-stamp"]},{type:"command-button",id:"add-image",commandId:"insert:add-image",variant:"icon",categories:["insert","insert-image"]},{type:"divider",id:"insert-tools-divider-1",orientation:"vertical"},{type:"command-button",id:"toggle-annotation-style",commandId:"panel:toggle-annotation-style",variant:"icon",categories:["panel","panel-annotation-style"]},{type:"divider",id:"insert-tools-divider-2",orientation:"vertical",visibilityDependsOn:{itemIds:["toggle-annotation-style"]}},{type:"command-button",id:"undo-button",commandId:"history:undo",variant:"icon",categories:["history","history-undo"]},{type:"command-button",id:"redo-button",commandId:"history:redo",variant:"icon",categories:["history","history-redo"]}]},{type:"spacer",id:"spacer-insert-2",flex:!0}]},"redaction-toolbar":{id:"redaction-toolbar",position:{placement:"top",slot:"secondary",order:0},permanent:!1,categories:["redaction"],items:[{type:"spacer",id:"spacer-7",flex:!0},{type:"group",id:"redaction-tools",alignment:"start",gap:2,items:[{type:"command-button",id:"redact",commandId:"redaction:redact",variant:"icon",categories:["redaction","redaction-combined"]},{type:"divider",id:"redaction-tools-divider-1",orientation:"vertical"},{type:"command-button",id:"toggle-redaction-panel",commandId:"panel:toggle-redaction",variant:"icon",categories:["panel","panel-redaction"]},{type:"command-button",id:"toggle-annotation-style",commandId:"panel:toggle-annotation-style",variant:"icon",categories:["panel","panel-annotation-style"]},{type:"divider",id:"redaction-tools-divider-2",orientation:"vertical",visibilityDependsOn:{itemIds:["toggle-annotation-style"]}},{type:"command-button",id:"undo-button",commandId:"history:undo",variant:"icon",categories:["history","history-undo"]},{type:"command-button",id:"redo-button",commandId:"history:redo",variant:"icon",categories:["history","history-redo"]}]},{type:"spacer",id:"spacer-8",flex:!0}]}},menus:{"left-action-menu":{id:"left-action-menu",categories:["ui"],items:[{type:"submenu",id:"page-settings-submenu",labelKey:"menu.viewControls",label:"View Controls",icon:"viewSettings",menuId:"page-settings-menu",categories:["page"]},{type:"submenu",id:"zoom-submenu",labelKey:"menu.zoomControls",label:"Zoom Controls",icon:"zoomIn",menuId:"zoom-menu",categories:["zoom"]},{type:"divider",id:"divider-15"},{type:"command",id:"pan-button-menu",commandId:"pan:toggle",categories:["tools","pan"]},{type:"command",id:"pointer-button-menu",commandId:"pointer:toggle",categories:["tools","pointer"]}]},"mode-tabs-overflow-menu":{id:"mode-tabs-overflow-menu",items:[{type:"command",id:"mode:view",commandId:"mode:view",categories:["mode","mode-view"]},{type:"command",id:"mode:annotate",commandId:"mode:annotate",categories:["mode","mode-annotate","annotation"]},{type:"command",id:"mode:shapes",commandId:"mode:shapes",categories:["mode","mode-shapes","annotation"]},{type:"command",id:"mode:insert",commandId:"mode:insert",categories:["mode","mode-insert","insert"]},{type:"command",id:"mode:form",commandId:"mode:form",categories:["mode","mode-form","form"]},{type:"command",id:"mode:redact",commandId:"mode:redact",categories:["mode","mode-redact","redaction"]}],responsive:{breakpoints:{xs:{maxWidth:640,show:["mode:view","mode:annotate","mode:shapes","mode:insert","mode:form","mode:redact"]},sm:{minWidth:640,maxWidth:768,hide:["mode:view","mode:annotate"]},md:{minWidth:768,hide:["mode:view","mode:annotate","mode:shapes"]}},localeOverrides:{groups:[{id:"cjk-languages",locales:["zh-CN","
2217ja"],breakpoints:{sm:{replaceHide:["mode:view","mode:annotate","mode:shapes","mode:insert"],replaceShow:["mode:form","mode:redact"]},md:{replaceHide:["mode:view","mode:annotate","mode:shapes","mode:insert"],replaceShow:["mode:form","mode:redact"]}}},{id:"germanic-languages",locales:["de","nl"],breakpoints:{md:{replaceHide:["mode:view","mode:annotate"]}}}]}}},"zoom-levels-menu":{id:"zoom-levels-menu",categories:["zoom","zoom-level"],items:[{type:"command",id:"zoom-levels-menu:25",commandId:"zoom:25",categories:["zoom","zoom-level","zoom-level-25"]},{type:"command",id:"zoom-levels-menu:50",commandId:"zoom:50",categories:["zoom","zoom-level","zoom-level-50"]},{type:"command",id:"zoom-levels-menu:100",commandId:"zoom:100",categories:["zoom","zoom-level","zoom-level-100"]},{type:"command",id:"zoom-levels-menu:125",commandId:"zoom:125",categories:["zoom","zoom-level","zoom-level-125"]},{type:"command",id:"zoom-levels-menu:150",commandId:"zoom:150",categories:["zoom","zoom-level","zoom-level-150"]},{type:"command",id:"zoom-levels-menu:200",commandId:"zoom:200",categories:["zoom","zoom-level","zoom-level-200"]},{type:"command",id:"zoom-levels-menu:400",commandId:"zoom:400",categories:["zoom","zoom-level","zoom-level-400"]},{type:"command",id:"zoom-levels-menu:800",commandId:"zoom:800",categories:["zoom","zoom-level","zoom-level-800"]},{type:"command",id:"zoom-levels-menu:1600",commandId:"zoom:1600",categories:["zoom","zoom-level","zoom-level-1600"]}]},"zoom-menu":{id:"zoom-menu",categories:["zoom"],items:[{type:"command",id:"zoom-menu:25",commandId:"zoom:25",categories:["zoom","zoom-level","zoom-level-25"]},{type:"command",id:"zoom-menu:50",commandId:"zoom:50",categories:["zoom","zoom-level","zoom-level-50"]},{type:"command",id:"zoom-menu:100",commandId:"zoom:100",categories:["zoom","zoom-level","zoom-level-100"]},{type:"command",id:"zoom-menu:125",commandId:"zoom:125",categories:["zoom","zoom-level","zoom-level-125"]},{type:"command",id:"zoom-menu:150",commandId:"zoom:150",categories:["zoom","zoom-level","zoom-level-150"]},{type:"command",id:"zoom-menu:200",commandId:"zoom:200",categories:["zoom","zoom-level","zoom-level-200"]},{type:"command",id:"zoom-menu:400",commandId:"zoom:400",categories:["zoom","zoom-level","zoom-level-400"]},{type:"command",id:"zoom-menu:800",commandId:"zoom:800",categories:["zoom","zoom-level","zoom-level-800"]},{type:"command",id:"zoom-menu:1600",commandId:"zoom:1600",categories:["zoom","zoom-level","zoom-level-1600"]},{type:"submenu",id:"zoom-levels-submenu",labelKey:"zoom.level",label:"Zoom Levels",menuId:"zoom-levels-menu",categories:["zoom","zoom-level"]},{type:"divider",id:"divider-zoom-in-out"},{type:"command",id:"zoom-menu:in",commandId:"zoom:in",categories:["zoom","zoom-in"]},{type:"command",id:"zoom-menu:out",commandId:"zoom:out",categories:["zoom","zoom-out"]},{type:"divider",id:"divider-8"},{type:"command",id:"zoom:fit-page",commandId:"zoom:fit-page",categories:["zoom","zoom-fit-page"]},{type:"command",id:"zoom:fit-width",commandId:"zoom:fit-width",categories:["zoom","zoom-fit-width"]},{type:"divider",id:"divider-9"},{type:"command",id:"zoom:marquee",commandId:"zoom:marquee",categories:["zoom","zoom-marquee"]}],responsive:{breakpoints:{xs:{maxWidth:640,show:["zoom-levels-submenu","divider-zoom-in-out"],hide:["zoom-menu:25","zoom-menu:50","zoom-menu:100","zoom-menu:125","zoom-menu:150","zoom-menu:200","zoom-menu:400","zoom-menu:800","zoom-menu:1600"]},md:{minWidth:768,show:["zoom-menu:25","zoom-menu:50","zoom-menu:100","zoom-menu:125","zoom-menu:150","zoom-menu:200","zoom-menu:400","zoom-menu:800","zoom-menu:1600"],hide:["zoom-levels-submenu","divider-zoom-in-out","zoom-menu:in","zoom-menu:out"]}}}},"document-menu":{id:"document-menu",categories:["document"],items:[{type:"command",id:"document:open",commandId:"document:open",categories:["document","document-open"]},{type:"command",id:"document:close",commandId:"document:close",categories:["document","document-close"]},{type:"divider",id:"divider-10",visibilityDependsOn:{itemIds:["document:open","document:close"]}},{type:"command",id:"document:print",commandId:"document:print",categories:["document","document-print"]},{type:"command",id:"document:protect",commandId:"document:protect",categories:["document","document-protect"]},{type:"command",id:"document:capture",commandId:"document:capture",categories:["document","document-capture"]},{type:"command",id:"document:export",commandId:"document:export",categories:["document","document-export"]},{type:"divider",id:"divider-11",visibilityDependsOn:{itemIds:["document:export","document:print","document:capture","document:protect"]}},{type:"command",id:"document:fullscreen",commandId:"document:fullscreen",categories:["document","document-fullscreen"]}]},"annotation-tools-menu":{id:"annotation-tools-menu",categories:["annotation"],items:[{type:"command",id:"annotation:add-ink",commandId:"annotation:add-ink",categories:["annotation","annotation-ink"]}
vendor: 11,747 bytes, line 2217
2217,{type:"command",id:"annotation:add-ink-highlighter",commandId:"annotation:add-ink-highlighter",categories:["annotation","annotation-ink"]},{type:"command",id:"annotation:add-text",commandId:"annotation:add-text",categories:["annotation","annotation-text"]},{type:"command",id:"annotation:add-insert-text",commandId:"annotation:add-insert-text",categories:["annotation","annotation-markup","annotation-insert-text"]},{type:"command",id:"annotation:add-replace-text",commandId:"annotation:add-replace-text",categories:["annotation","annotation-markup","annotation-replace-text"]},{type:"command",id:"annotation:add-comment",commandId:"annotation:add-comment",categories:["annotation","annotation-comment-tool"]}]},"shapes-tools-menu":{id:"shapes-tools-menu",categories:["annotation","annotation-shape"],items:[{type:"command",id:"annotation:add-polygon",commandId:"annotation:add-polygon",categories:["annotation","annotation-shape","annotation-polygon"]},{type:"command",id:"annotation:add-polyline",commandId:"annotation:add-polyline",categories:["annotation","annotation-shape","annotation-polyline"]}]},"form-tools-menu":{id:"form-tools-menu",categories:["form"],items:[{type:"command",id:"form:add-select",commandId:"form:add-select",categories:["form","form-select"]},{type:"command",id:"form:add-listbox",commandId:"form:add-listbox",categories:["form","form-listbox"]}]},"page-settings-menu":{id:"page-settings-menu",categories:["page"],items:[{type:"section",id:"spread-mode-section",labelKey:"page.spreadMode",label:"Spread Mode",categories:["page","spread"],items:[{type:"command",id:"spread:none",commandId:"spread:none",categories:["page","spread","spread-none"]},{type:"command",id:"spread:odd",commandId:"spread:odd",categories:["page","spread","spread-odd"]},{type:"command",id:"spread:even",commandId:"spread:even",categories:["page","spread","spread-even"]}]},{type:"divider",id:"divider-13"},{type:"section",id:"scroll-layout-section",labelKey:"page.scrollLayout",label:"Scroll Layout",categories:["page","scroll"],items:[{type:"command",id:"scroll:vertical",commandId:"scroll:vertical",categories:["page","scroll","scroll-vertical"]},{type:"command",id:"scroll:horizontal",commandId:"scroll:horizontal",categories:["page","scroll","scroll-horizontal"]}]},{type:"divider",id:"divider-14"},{type:"section",id:"page-rotation-section",labelKey:"page.rotation",label:"Page Rotation",categories:["page","rotate"],items:[{type:"command",id:"rotate:clockwise",commandId:"rotate:clockwise",categories:["page","rotate","rotate-clockwise"]},{type:"command",id:"rotate:counter-clockwise",commandId:"rotate:counter-clockwise",categories:["page","rotate","rotate-counter-clockwise"]}]},{type:"divider",id:"divider-15"},{type:"command",id:"document:fullscreen",commandId:"document:fullscreen",categories:["document","document-fullscreen"]}]}},sidebars:{"sidebar-panel":{id:"sidebar-panel",position:{placement:"left",slot:"main",order:0},content:{type:"tabs",tabs:[{id:"thumbnails",labelKey:"panel.thumbnails",label:"Thumbnails",icon:"squares",componentId:"thumbnails-sidebar"},{id:"outline",labelKey:"panel.outline",label:"Outline",icon:"listTree",componentId:"outline-sidebar"}]},width:"250px",collapsible:!0,defaultOpen:!1},"annotation-panel":{id:"annotation-panel",position:{placement:"left",slot:"main",order:0},content:{type:"component",componentId:"annotation-sidebar"},width:"250px",collapsible:!0,defaultOpen:!1},"rubber-stamp-panel":{id:"rubber-stamp-panel",position:{placement:"left",slot:"main",order:0},content:{type:"component",componentId:"rubber-stamp-sidebar"},width:"250px",collapsible:!0,defaultOpen:!1,categories:["insert","insert-rubber-stamp"]},"signature-panel":{id:"signature-panel",position:{placement:"left",slot:"main",order:0},content:{type:"component",componentId:"signature-sidebar"},width:"250px",collapsible:!0,defaultOpen:!1,categories:["insert","insert-signature"]},"search-panel":{id:"search-panel",position:{placement:"right",slot:"main",order:0},content:{type:"component",componentId:"search-sidebar"},width:"250px",collapsible:!0,defaultOpen:!1},"widget-edit-panel":{id:"widget-edit-panel",position:{placement:"right",slot:"main",order:0},content:{type:"component",componentId:"widget-edit-sidebar"},width:"250px",collapsible:!0,defaultOpen:!1},"comment-panel":{id:"comment-panel",position:{placement:"right",slot:"main",order:0},content:{type:"component",componentId:"comment-sidebar"},width:"250px",collapsible:!0,defaultOpen:!1},"redaction-panel":{id:"redaction-panel",position:{placement:"right",slot:"main",order:0},content:{type:"component",componentId:"redaction-sidebar"},width:"250px",collapsible:!0,defaultOpen:!1,categories:["redaction"]}},modals:{"print-modal":{id:"print-modal",content:{type:"component",componentId:"print-modal"},maxWidth:"28rem",closeOnClickOutside:!0,closeOnEscape:!0},"protect-modal":{id:"protect-modal",content:{type:"component",componentId:"protect-modal"},maxWidth:"28rem",closeOnClickOutside:!0,closeOnEscape:!0},"view-permissions-modal":{id:"view-permissions-modal",content:{type:"component",componentId:"view-permissions-modal"},maxWidth:"28rem",closeOnClickOutside:!0,closeOnEscape:!0},"link-modal":{id:"link-modal",content:{type:"component",componentId:"link-modal"},maxWidth:"28rem",closeOnClickOutside:!0,closeOnEscape:!0}},overlays:{"page-controls":{id:"page-controls",position:{anchor:"bottom-center",offset:{bottom:"1.5rem"}},content:{type:"component",componentId:"page-controls"},defaultEnabled:!0},"unlock-owner-overlay":{id:"unlock-owner-overlay",position:{anchor:"bottom-right",offset:{bottom:"1.5rem",right:"1.5rem"}},content:{type:"component",componentId:"unlock-owner-overlay"},defaultEnabled:!0}},selectionMenus:{annotation:{id:"annotation",categories:["annotation"],items:[{type:"command-button",id:"comment-button",commandId:"annotation:toggle-comment",variant:"icon",categories:["annotation","annotation-comment"]},{type:"command-button",id:"toggle-link",commandId:"annotation:toggle-link",variant:"icon",categories:["annotation","annotation-link"]},{type:"command-button",id:"toggle-annotation-widget-edit",commandId:"annotation:toggle-widget-edit",variant:"icon",categories:["annotation","annotation-widget-edit"]},{type:"command-button",id:"toggle-annotation-style",commandId:"annotation:toggle-annotation-style",variant:"icon",categories:["annotation","annotation-style"]},{type:"command-button",id:"apply-redaction",commandId:"annotation:apply-redaction",variant:"icon",categories:["annotation","annotation-redaction"]},{type:"command-button",id:"create-stamp-from-annotation",commandId:"stamp:create-from-selected",variant:"icon",categories:["annotation","stamp"]},{type:"command-button",id:"delete-annotation",commandId:"annotation:delete-selected",variant:"icon",categories:["annotation","annotation-delete"]},{type:"command-button",id:"goto-link",commandId:"annotation:goto-link",variant:"icon-text",categories:["annotation","annotation-link"]}]},groupAnnotation:{id:"groupAnnotation",categories:["annotation","annotation-group"],items:[{type:"command-button",id:"comment-button",commandId:"annotation:toggle-comment",variant:"icon",categories:["annotation","annotation-comment"]},{type:"command-button",id:"toggle-group-annotations",commandId:"annotation:toggle-group",variant:"icon",categories:["annotation","annotation-group"]},{type:"command-button",id:"toggle-annotation-style",commandId:"panel:toggle-annotation-style",variant:"icon",categories:["panel","panel-annotation-style"]},{type:"command-button",id:"create-stamp-from-group",commandId:"stamp:create-from-group",variant:"icon",categories:["annotation","stamp","annotation-group"]},{type:"command-button",id:"delete-all-annotations",commandId:"annotation:delete-all-selected",variant:"icon",categories:["annotation","annotation-delete","annotation-group"]}]},redaction:{id:"redaction",categories:["redaction"],items:[{type:"command-button",id:"delete-redaction",commandId:"redaction:delete-selected",variant:"icon",categories:["redaction","redaction-delete"]},{type:"command-button",id:"commit-redaction",commandId:"redaction:commit-selected",variant:"icon",categories:["redaction","redaction-commit"]}]},selection:{id:"selection",visibilityDependsOn:{itemIds:["copy-selection","add-highlight","add-strikeout","add-underline","add-squiggly","add-link","redact-text"]},items:[{type:"command-button",id:"copy-selection",commandId:"selection:copy",variant:"icon",categories:["selection","selection-copy"]},{type:"command-button",id:"add-highlight",commandId:"annotation:add-highlight",variant:"icon",categories:["annotation","annotation-markup","annotation-highlight"]},{type:"command-button",id:"add-strikeout",commandId:"annotation:add-strikeout",variant:"icon",categories:["annotation","annotation-markup","annotation-strikeout"]},{type:"command-button",id:"add-underline",commandId:"annotation:add-underline",variant:"icon",categories:["annotation","annotation-markup","annotation-underline"]},{type:"command-button",id:"add-squiggly",commandId:"annotation:add-squiggly",variant:"icon",categories:["annotation","annotation-markup","annotation-squiggly"]},{type:"command-button",id:"add-link",commandId:"annotation:add-link",variant:"icon",categories:["annotation","annotation-link"]},{type:"command-button",id:"redact-text",commandId:"redaction:redact-text",variant:"icon",categories:["redaction","redaction-text"]}]}}}},viewport:{viewportGap:10},scroll:{defaultStrategy:Ht.Vertical},zoom:{defaultZoomLevel:Mt.FitPage},spread:{defaultSpreadMode:Ot.None},rotation:{defaultRotation:Wr.Degree0},pan:{},render:{defaultImageType:"image/png"},tiling:{tileSize:768,overlapPx:2.5,extraRings:0},thumbnails:{width:150,gap:10,buffer:3,labelHeight:30},annotations:{locked:{type:ct.Include,categories:["form"]}},search:{},selection:{},bookmarks:{},attachments:{},capture:{scale:2,imageType:"image/png"},redaction:{drawBlackBoxes:!0,useAnnotationMode:!0},print:{},export:{defaultFileName:"document.pdf"},fullscreen:{},stamp:{},history:{},interactionManager:{},form:{}};function Ew(e){var t=e.documentId,n=e.tabBarVisibility,o=n===void 0?"multiple":n,i=(function(v){const y=Ys(),{provides:b}=Ao(),w=b?.getSchema(),x=ym(v);return{renderToolbar:(k,I)=>{const S=`${k}-${I}`;if(!w||!b||!x)return null;const A=x.activeToolbars[S],M=A?w.toolbars[A.toolbarId]:null;A&&!M&&console.warn(`Toolbar "${A.toolbarId}" not found in schema`);const P=M&&!M.permanent?()=>b.forDocument(v).closeToolbarSlot(k,I):void 0,T=y.toolbar;return C(fe,{children:A&&M&&C(T,{schema:M,documentId:v,isOpen:A.isOpen,onClose:P})},`toolbar-slot-${S}`)},renderSidebar:(k,I)=>{var S;const A=`${k}-${I}`;if(!w||!b||!x)return null;const M=x.activeSidebars[A],P=M?(S=w.sidebars)==null?void 0:S[M.sidebarId]:null;M&&!P&&console.warn(`Sidebar "${M.sidebarId}" not found in schema`);const T=y.sidebar;return C(fe,{children:M&&P&&C(T,{schema:P,documentId:v,isOpen:M.isOpen,onClose:()=>{b.forDocument(v).closeSidebarSlot(k,I)},sidebarProps:M.props})},`sidebar-slot-${A}`)},renderModal:()=>{var k;if(!w||!b||!x)return null;const I=y.modal;if(!I)return null;const S=x.activeModal,A=S?(k=w.modals)==null?void 0:k[S.modalId]:null;return S&&!A&&console.warn(`Modal "${S.modalId}" not found in schema`),C(fe,{children:S&&A&&C(I,{schema:A,documentId:v,isOpen:S.isOpen,onClose:()=>{b.forDocument(v).closeModal()},onExited:()=>{b.forDocument(v).clearModal()},modalProps:S.props})},"modal-slot")},getActiveToolbars:()=>x?Object.entries(x.activeToolbars).map(([k,I])=>{const[S,A]=k.split("-");return{placement:S,slot:A,toolbarId:I.toolbarId,isOpen:I.isOpen}}):[],getActiveSidebars:()=>x?Object.entries(x.activeSidebars).map(([k,I])=>{const[S,A]=k.split("-");return{placement:S,slot:A,sidebarId:I.sidebarId,isOpen:I.isOpen}}):[],renderOverlays:()=>
2217{if(!w||!b||!x)return null;const k=y.overlay;return k?C(fe,{children:(w.overlays?Object.values(w.overlays):[]).filter(I=>x.enabledOverlays[I.id]!==!1).map(I=>C(k,{schema:I,documentId:v},I.id))},"overlays-slot"):null}}})(t),r=i.renderToolbar,a=i.renderSidebar,s=i.renderModal,l=i.renderOverlays,c=qe(t).translate,d=Yi("selection",t),u=Yi("annotation",t),m=Yi("groupAnnotation",t),g=Yi("redaction",t),p=(v=>{const y=Ar();return ee(()=>y?y.documentOrder.map(b=>y.documents[b]).filter(b=>b!=null):[],[y,v])})(),f=(()=>{const v=Ar();return ee(()=>{if(!v)return{activeDocumentId:null,activeDocument:null};const y=v.activeDocumentId;return{activeDocumentId:y,activeDocument:y?v.documents[y]??null:null}},[v])})();return h(fe,null,h(Sw,{documentStates:p,activeDocumentId:f.activeDocumentId,visibility:o}),r("top","main"),r("top","secondary"),h("div",{id:"document-content",className:"bg-bg-surface flex flex-1 overflow-hidden"},a("left","main"),h("div",{className:"flex-1 overflow-hidden"},h(bb,{documentId:t},function(v){var y=v.documentState,b=v.isLoading,w=v.isError,x=v.isLoaded;return h(fe,null,b&&h("div",{className:"flex h-full items-center justify-center"},h(bs,{size:"lg",text:c("document.loading")})),w&&h(Aw,{documentState:y}),x&&h("div",{className:"relative h-full w-full"},h(o3,{documentId:t},h(Wy,{className:"bg-bg-app",documentId:t},h(Pb,{documentId:t},h(Zy,{documentId:t,renderPage:function(k){var I=k.pageIndex;return h(_b,{documentId:t,pageIndex:I,style:{backgroundColor:"#fff"}},h(i3,{documentId:t,pageIndex:I},h(zb,{documentId:t,pageIndex:I,scale:.5,style:{pointerEvents:"none"}}),h(t4,{documentId:t,pageIndex:I,style:{pointerEvents:"none"}}),h(Ob,{documentId:t,pageIndex:I}),h(Db,{documentId:t,pageIndex:I}),h(O3,{documentId:t,pageIndex:I}),h(Zb,{documentId:t,pageIndex:I,selectionMenu:d}),h(K3,{documentId:t,pageIndex:I,selectionMenu:g}),h(C3,{documentId:t,pageIndex:I,selectionMenu:u,groupSelectionMenu:m})))}})))),l()))})),a("right","main")),s())}var ku=new hh([new dh,new uh]);function _w(e){var t,n=e.config,o=e.onRegistryReady,i=(function(c){const{wasmUrl:d=Fy,worker:u=!0,logger:m,encoderPoolSize:g,fontFallback:p}=c??{},[f,v]=$(null),[y,b]=$(!0),[w,x]=$(null),k=Q(null);return H(()=>{let I=!1;return(async()=>{try{const{createPdfiumEngine:S}=u?await Dl(()=>import("./EsfuhbQ_.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url):await Dl(()=>import("./Dzx1h-I5.js"),__vite__mapDeps([8,2,3,1,4,5,6,7]),import.meta.url),A=await S(d,{logger:m,encoderPoolSize:g,fontFallback:p});k.current=A,v(A),b(!1)}catch(S){I||(x(S),b(!1))}})(),()=>{var S,A;I=!0,(A=(S=k.current)==null?void 0:S.closeAllDocuments)==null||A.call(S).wait(()=>{var M,P;(P=(M=k.current)==null?void 0:M.destroy)==null||P.call(M),k.current=null},vt)}},[d,u,m,p]),{engine:f,isLoading:y,error:w}})(U(U(U({},n.wasmUrl&&{wasmUrl:n.wasmUrl}),n.fontFallback&&{fontFallback:n.fontFallback}),{},{worker:n.worker,logger:n.log?ku:void 0})),r=i.engine,a=i.isLoading,s=ee(function(){return{"thumbnails-sidebar":y6,"annotation-sidebar":ew,"rubber-stamp-sidebar":uw,"signature-sidebar":hw,"zoom-toolbar":T6,"search-sidebar":w6,"outline-sidebar":x6,"comment-sidebar":D6,"widget-edit-sidebar":aw,"print-modal":fw,"link-modal":vw,"protect-modal":Tw,"unlock-owner-overlay":zw,"page-controls":yw,"mode-select-button":Pw,"view-permissions-modal":Rw,"redaction-sidebar":ow}},[]),l=ee(function(){return{toolbar:t6,sidebar:c6,modal:v6,overlay:gw,menu:u6,selectionMenu:mw}},[]);return h(fe,null,h("style",null,Z2),!r||a?h("div",{className:"flex h-full w-full items-center justify-center"},h(bs,{size:"lg",text:"Initializing PDF engine..."})):h(Oy,{config:{logger:n.log?ku:void 0,permissions:n.permissions},onInitialized:(t=Fu(yi().m(function c(d){return yi().w(function(u){for(;;)switch(u.n){case 0:o&&d&&o(d);case 1:return u.a(2)}},c)})),function(c){return t.apply(this,arguments)}),engine:r,plugins:[Ke(wb,U(U(U({},Ze.documentManager),n.src&&{initialDocuments:[{url:n.src}]}),n.documentManager)),Ke(Cb,U(U(U({},Ze.commands),n.disabledCategories&&{disabledCategories:n.disabledCategories}),n.commands)),Ke(Ib,U(U({},Ze.i18n),n.i18n)),Ke(hb,U(U(U({},Ze.ui),n.disabledCategories&&{disabledCategories:n.disabledCategories}),n.ui)),Ke(Hy,U(U({},Ze.viewport),n.viewport)),Ke(Ky,U(U({},Ze.scroll),n.scroll)),Ke(Mb,U(U({},Ze.zoom),n.zoom)),Ke(Qy,U(U({},Ze.spread),n.spread)),Ke(Eb,U(U({},Ze.rotation),n.rotation)),Ke(R3,U(U({},Ze.pan),n.pan)),Ke(Tb,U(U({},Ze.render),n.render)),Ke(Jb,U(U({},Ze.tiling),n.tiling)),Ke(i4,U(U({},Ze.thumbnails),n.thumbnails)),Ke(k3,U(U({},Ze.annotations),n.annotations)),Ke(Lb,U(U({},Ze.search),n.search)),Ke(Xb,U(U({},Ze.selection),n.selection)),Ke(T3,U(U({},Ze.bookmarks),n.bookmarks)),Ke(Y3,U(U({},Ze.attachments),n.attachments)),Ke(L3,U(U({},Ze.capture),n.capture)),Ke(Z3,U(U({},Ze.redaction),n.redaction)),Ke(S3,U(U({},Ze.print),n.print)),Ke(z3,U(U({},Ze.export),n.export)),Ke(P3,U(U({},Ze.fullscreen),n.fullscreen)),Ke(F3,U(U({},Ze.history),n.history)),Ke(t3,U(U({},Ze.interactionManager),n.interactionManager)),Ke(L5,U(U({},Ze.form),n.form)),Ke(B5,U(U({},Ze.stamp),n.stamp))]},function(c){var d=c.pluginsReady,u=c.activeDocumentId;return h(fe,null,d?h(fe,null,u?h(yb,{documentId:u,components:s,renderers:l,className:"relative flex h-full w-full select-none flex-col"},h(Ew,{documentId:u,tabBarVisibility:n.tabBar}),h(Dw,{documentId:u}),h(C6,{documentId:u})):h(Mw,null)):h("div",{className:"flex h-full items-center justify-center"},h(bs,{size:"lg",text:"Initializing plugins..."})))}))}var Lw=typeof HTMLElement<"u"?HTMLElement:As(function e(){Ms(this,e)}),Ow=(function(){function e(){var t;return Ms(this,e),oe(t=ju(this,e),"_resolveRegistry",null),oe(t,"themeStyleEl",null),oe(t,"systemPreferenceCleanup",null),oe(t,"handleRegistryReady",function(n){t._resolveRegistry&&(t._resolveRegistry(n),t._resolveRegistry=null)}),t.root=t.attachShadow({mode:"open"}),t._registryPromise=new Promise(function(n){t._resolveRegistry=n}),t}
2217return Bu(e,Lw),As(e,[{key:"connectedCallback",value:function(){this._config||(this._config={src:this.getAttribute("src")||"/demo.pdf",worker:this.getAttribute("worker")!=="false",theme:this.parseThemeAttribute()}),this.setupTheme(),this.renderViewer()}},{key:"disconnectedCallback",value:function(){var t;(t=this.systemPreferenceCleanup)===null||t===void 0||t.call(this),this.systemPreferenceCleanup=null,Cr(null,this.root)}},{key:"parseThemeAttribute",value:function(){var t=this.getAttribute("theme");if(t)return["light","dark","system"].includes(t)?{preference:t}:void 0}},{key:"config",get:function(){return this._config},set:function(t){this._config=t,t.icons&&Jd(t.icons),this.isConnected&&(this.setupTheme(),this.renderViewer())}},{key:"registry",get:function(){return this._registryPromise}},{key:"themePreference",get:function(){var t;return((t=this._config)===null||t===void 0||(t=t.theme)===null||t===void 0?void 0:t.preference)||"system"}},{key:"activeColorScheme",get:function(){return xu(this.themePreference)}},{key:"activeTheme",get:function(){return this.resolveActiveTheme()}},{key:"resolveActiveTheme",value:function(){var t,n,o,i=(t=this._config)===null||t===void 0?void 0:t.theme,r=xu(i?.preference||"system"),a=r==="dark"?Cw:xw,s=i?.[r];return o=a,(n=s)?kw(o,n):o}},{key:"setupTheme",value:function(){var t,n,o=this;(t=this.systemPreferenceCleanup)===null||t===void 0||t.call(this),this.systemPreferenceCleanup=null,(((n=this._config)===null||n===void 0||(n=n.theme)===null||n===void 0?void 0:n.preference)||"system")==="system"&&(this.systemPreferenceCleanup=(function(i){if(typeof window>"u")return function(){};var r=window.matchMedia("(prefers-color-scheme: dark)"),a=function(s){return i(s.matches?"dark":"light")};return r.addEventListener("change",a),function(){return r.removeEventListener("change",a)}})(function(i){o.injectTheme(),o.dispatchEvent(new CustomEvent("themechange",{detail:{preference:"system",colorScheme:i,theme:o.activeTheme},bubbles:!0}))})),this.injectTheme()}},{key:"injectTheme",value:function(){var t=Iw(this.resolveActiveTheme()),n=this.root.querySelector("style[data-embedpdf-theme]");n||((n=document.createElement("style")).setAttribute("data-embedpdf-theme",""),this.root.appendChild(n)),this.themeStyleEl=n,this.themeStyleEl.textContent=t,this.setAttribute("data-color-scheme",this.activeColorScheme)}},{key:"setTheme",value:function(t){this._config&&(this._config.theme=typeof t=="string"?U(U({},this._config.theme),{},{preference:t}):U(U({},this._config.theme),t),this.setupTheme(),this.dispatchEvent(new CustomEvent("themechange",{detail:{preference:this.themePreference,colorScheme:this.activeColorScheme,theme:this.activeTheme},bubbles:!0})))}},{key:"registerIcon",value:function(t,n){y0(t,n)}},{key:"registerIcons",value:function(t){Jd(t)}},{key:"renderViewer",value:function(){this._config&&(Cr(h(_w,{config:this._config,onRegistryReady:this.handleRegistryReady}),this.root),this.injectTheme())}}])})(),Nw=["type","target"],$w="2.12.1";typeof customElements>"u"||customElements.get("embedpdf-container")||customElements.define("embedpdf-container",Ow);var Fw={version:$w,init:function(e){if(e.type==="container")return(function(t){t.type,t.target;var n=Hr(t,Nw),o=document.createElement("embedpdf-container");return o.config=n,t.target.appendChild(o),o})(e)}};const jw=["innerHTML"],Bw={key:1,id:"pdf-viewer",class:"h-[70vh] -mx-4 sm:-mx-8 -mb-4 sm:-mb-8 rounded-b-3xl overflow-hidden [&>div]:!border-none [&>div]:!shadow-none"},Hw={__name:"PromoModalModal",props:{showModal:{required:!0,type:Boolean},title:{type:String,default:null},contentType:{required:!0,type:String},htmlContent:{required:!0},pdfLink:{required:!0}},emits:["close"],setup(e){const t=e,n=()=>{!t.showModal||t.contentType!=="pdf"||setTimeout(()=>{const o=document.getElementById("pdf-viewer");if(o){const i=getComputedStyle(document.documentElement).getPropertyValue("--color-primary").trim()||"#4f46e5";Fw.init({type:"container",target:o,src:t.pdfLink,disabledCategories:["annotation","redaction","stamp","mode-view","mode-annotate","mode-insert","mode-form","overflow-tabs-button","panel-comment"],theme:{preference:"light",light:{accent:{primary:i}}}})}},100)};return vo(()=>t.showModal,n),vo(()=>t.contentType,n),(o,i)=>{const r=H2,a=jr;return L(),Xe(a,null,{default:Ee(()=>[(L(),Xe(vi,{to:"body"},[ue(fo,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-all duration-200 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:Ee(()=>[e.showModal?(L(),B("div",{key:0,class:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/75 p-4 select-none",style:{"-webkit-backdrop-filter":"blur(12px)","backdrop-filter":"blur(12px)"},"aria-labelledby":"promo-modal-title",role:"dialog","aria-modal":"true",onKeydown:i[1]||(i[1]=fi(s=>o.$emit("close"),["esc"])),onClick:i[2]||(i[2]=Tt(s=>o.$emit("close"),["self"]))},[ue(fo,{"enter-active-class":"transition-all duration-300 ease-out delay-100","enter-from-class":"opacity-0 scale-95 translate-y-4","enter-to-class":"opacity-100 scale-100 translate-y-0","leave-active-class":"transition-all duration-200 ease-in","leave-from-class":"opacity-100 scale-100 translate-y-0","leave-to-class":"opacity-0 scale-95 translate-y-4"},{default:Ee(()=>[e.showModal?(L(),B("div",{key:0,ref:"modalContent",class:ze(["relative w-full mx-auto bg-white rounded-3xl shadow-2xl focus:outline-none max-h-[calc(100vh-2rem)] overflow-y-auto p-4 sm:p-8",e.contentType==="pdf"?"max-w-3xl":"max-w-lg"]),tabindex:"-1"},[R("button",{type:"button",onClick:i[0]||(i[0]=s=>o.$emit("close")),class:"absolute top-3 right-3 sm:top-4 sm:right-4 z-10 p-2 text-brand-neutral-600 hover:text-brand-neutral-900 hover:bg-brand-neutral-50 rounded-xl transition-all duration-200","aria-label":"Close modal"},[...i[3]||(i[3]=[R("svg",{class:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])]),ue(r,{title:e.title},null,8,["title"]),e.contentType==="html"?(L(),B("div",{key:0,class:"[&_p]:mt-0 [&_p]:mb-3 [&_p:last-child]:mb-0",innerHTML:E(G0)(e.htmlContent)},null,8,jw)):(L(),B("div",Bw))],2)):ge("",!0)]),_:1})],32)):ge("",!0)]),_:1})]))]),_:1})}}},Uw={__name:"PromoModal",setup(e){const{isVerified:t}=q0(),n=pe(()=>Ue("customization").value?.promotional_modal),o=pe(()=>n.value?.heading),i=pe(()=>n.value?.content_type),r=pe(()=>n.value?.pdf_url),a=pe(()=>n.value?.html),s=pe(()=>n.value?.trigger),l=pe(()=>n.value?.frequency_logic||"visit"),c=rt(!1),d=rt(!1);$u(d);const u=pe(()=>!!((n.value?.is_active||c.value)&&(i.value==="pdf"&&r.value||i.value==="html"&&a.value))),m=(y=!1)=>
2217{if(y||l.value==="visit"){d.value=!0;return}const b=K0("promo_modal_shown",{maxAge:3600*24*7,path:"/",sameSite:"lax",default:()=>null});b.value||(d.value=b.value=!0)};let g=!1;const p=y=>{y.clientY<0&&!g&&(m(),g=!0)},f=({data:y})=>{y.type==="demo-promo-modal"&&(c.value=!0,m(!0))},v=()=>{if(s.value==="on load"){m();return}if(s.value==="timed delay"){const y=Math.max(0,parseInt(n.value.delay_seconds||0));setTimeout(()=>{m()},y*1e3);return}s.value==="exit intent"&&document.addEventListener("mouseleave",p)};return So(()=>{if(window.addEventListener("message",f),!u.value)return;if(t.value){v();return}const y=vo(t,b=>{b&&(y(),v())})}),V0(()=>{window.removeEventListener("message",f),document.removeEventListener("mouseleave",p)}),(y,b)=>{const w=Hw;return E(u)?(L(),Xe(w,{key:0,"show-modal":E(d),onClose:b[0]||(b[0]=x=>{d.value=!1,c.value=!1}),title:E(o),"content-type":E(i),"pdf-link":E(r),"html-content":E(a)},null,8,["show-modal","title","content-type","pdf-link","html-content"])):ge("",!0)}}},Ww={class:"col-span-2"},Gw={class:"grid grid-cols-1 gap-8 max-w-96"},qw={key:0,class:"space-y-2 text-brand-neutral-600"},Vw={key:1,class:"space-y-2 text-brand-neutral-600"},Kw={__name:"FooterStoreHours",setup(e){const t=Ue("currentStore"),n=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o=pe(()=>{const r=t.value?.operation_mode?.work_hours;if(!r)return r;const a={};for(const s of n)s in r&&(a[s]=r[s]);for(const s of Object.keys(r))s in a||(a[s]=r[s]);return a}),i=r=>{if(!r)return null;const a=String(r).trim();if(a.toLowerCase().includes("am")||a.toLowerCase().includes("pm"))return a;const[s,l]=a.split(":").map(Number);if(isNaN(s))return a;const c=s>=12?"PM":"AM",d=s%12||12,u=l?`:${String(l).padStart(2,"0")}`:":00";return`${d}${u} ${c}`};return(r,a)=>(L(),B("div",Ww,[a[1]||(a[1]=R("h2",{class:"text-lg font-semibold mb-4"},"Store Hours",-1)),R("div",Gw,[E(o)?(L(),B("div",Vw,[(L(!0),B(Oe,null,zt(E(o),(s,l)=>(L(),B("div",{key:l,class:"flex justify-between"},[R("span",null,ce(l)+":",1),R("span",{class:ze({"text-red-400":!s.isOpen})},ce(s.isOpen?i(s.open)+" - "+i(s.close):"Closed"),3)]))),128))])):(L(),B("div",qw,[(L(),B(Oe,null,zt(7,s=>R("div",{key:s,class:"flex justify-between animate-pulse"},[...a[0]||(a[0]=[R("span",{class:"bg-brand-neutral-200 h-4 w-20 rounded"},null,-1),R("span",{class:"bg-brand-neutral-200 h-4 w-32 rounded"},null,-1)])])),64))]))])]))}},Zw={key:0,class:"col-span-2 md:col-span-1"},Xw={class:"text-lg font-semibold mb-4"},Yw={class:"space-y-2"},Qw={__name:"FooterQuickLinks",setup(e){const t=pe(()=>Ue("customization").value?.footer?.quick_links),n=pe(()=>t.value?.section_title||"About Us"),o=pe(()=>t.value?.links||[]),i=pe(()=>o.value.filter(r=>r?.label&&r?.to).length);return(r,a)=>{const s=zn;return E(i)?(L(),B("div",Zw,[R("h2",Xw,ce(E(n)),1),R("ul",Yw,[(L(!0),B(Oe,null,zt(E(o),(l,c)=>(L(),B("li",{key:c},[ue(s,{to:l.to,class:"text-brand-neutral-600 hover:text-brand-primary-on-surface transition-colors"},{default:Ee(()=>[$e(ce(l.label),1)]),_:2},1032,["to"])]))),128))])])):ge("",!0)}}},Jw={key:0,class:"col-span-2 md:col-span-1"},e8={class:"text-lg font-semibold mb-4"},t8={class:"space-y-2"},n8={key:0},o8={key:1},i8=["href"],r8={key:2},a8=["href"],s8={key:1},l8={key:0,class:"mt-8"},c8=["src"],d8={key:1,class:"space-y-2"},u8={__name:"FooterSupport",setup(e){const t=Ue("currentStore"),n=pe(()=>Ue("customization").value?.footer?.store_info),o=pe(()=>t.value?.location),i=pe(()=>[o.value?.unit,o.value?.address,o.value?.city,o.value?.province,o.value?.postal_code].filter(Boolean).join(", ")),r=pe(()=>n.value?.section_title||"Customer Service"),a=pe(()=>n.value?.phone),s=pe(()=>n.value?.address),l=pe(()=>n.value?.contact_us),c=pe(()=>n.value?.license_badge),d=pe(()=>n.value?.license_number),u=pe(()=>s.value?.google_maps_link),m=pe(()=>l.value?.show||a.value?.value&&a.value?.show||s.value?.show&&i.value||c.value?.show&&c.value?.url||d.value?.show&&d.value?.value);return(g,p)=>{const f=zn;return E(m)?(L(),B("div",Jw,[R("h2",e8,ce(E(r)),1),R("ul",t8,[E(l)?.show?(L(),B("li",n8,[ue(f,{to:"/contact",class:"text-brand-neutral-600 hover:text-brand-primary-on-surface transition-colors"},{default:Ee(()=>[...p[0]||(p[0]=[$e(" Contact Us ",-1)])]),_:1})])):ge("",!0),E(a)?.value&&E(a)?.show?(L(),B("li",o8,[R("a",{href:`tel:${E(a)?.value.replace(/[^0-9+]/g,"")}`,class:"text-brand-neutral-600 hover:text-brand-primary-on-surface transition-colors"},ce(E(a)?.value),9,i8)])):ge("",!0),E(s)?.show&&E(i)?(L(),B("li",r8,[E(u)?(L(),B("a",{key:0,target:"_blank",href:E(u)},ce(E(i)),9,a8)):(L(),B("span",s8,ce(E(i)),1))])):ge("",!0)]),E(c)?.show&&E(c)?.url?(L(),B("div",l8,[p[1]||(p[1]=R("h3",{class:"text-base font-semibold text-brand-neutral-800 mb-3"}," License ",-1)),R("img",{src:E(c)?.url,alt:"Retailer License",class:"h-28 w-auto"},null,8,c8)])):ge("",!0),E(d)?.value&&E(d)?.show?(L(),B("p",d8,ce(E(d).value),1)):ge("",!0)])):ge("",!0)}}},h8={key:0,class:"mt-8 pt-8 border-t border-brand-neutral-800/15"},m8={class:"text-sm text-brand-neutral-8000 text-center mb-4"},p8={class:"flex flex-wrap justify-center gap-4"},g8=["href","aria-label"],f8={__name:"FooterSocialLinks",setup(e){const t=pe(()=>Ue("customization").value?.footer?.follow_us),n=pe(()=>t.value?.section_title||"Follow Us"),o=pe(()=>t.value?.links||[]),i=pe(()=>Object.values(o.value).filter(s=>s?.url&&s?.show).length),r={Facebook:{viewBox:"0 0 24 24",fill:!0,d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"},X:{viewBox:"0 0 24 24",fill:!0,d:"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"},YouTube:{viewBox:"0 0 24 24",fill:!0,d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"},TikTok:{viewBox:"0 0 24 24",fill:!0,d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08
2217-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"},Instagram:{viewBox:"0 0 24 24",fill:!0,d:"M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678a6.162 6.162 0 1 0 0 12.324 6.162 6.162 0 1 0 0-12.324zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405a1.441 1.441 0 1 1-2.882 0 1.441 1.441 0 0 1 2.882 0z"},Bluesky:{viewBox:"0 0 24 24",fill:!0,d:"M12 10.8c-1.087-2.114-4.046-6.053-6.798-7.995C2.566.944 1.561 1.266.902 1.565.139 1.908 0 3.08 0 3.768c0 .69.378 5.65.624 6.479.785 2.627 3.6 3.476 6.154 3.228-4.486.707-7.529 2.422-3.89 7.098 3.921 4.793 5.66-.907 6.537-3.596.274-.843.41-1.699.575-1.699.165 0 .3.856.575 1.7.877 2.688 2.616 8.388 6.537 3.595 3.639-4.676.596-6.39-3.89-7.098 2.554.248 5.37-.601 6.154-3.228.246-.828.624-5.788.624-6.478 0-.69-.139-1.861-.902-2.206-.659-.298-1.664-.62-4.3 1.24C12.046 4.747 9.087 8.686 12 10.8z"},Pinterest:{viewBox:"0 0 24 24",fill:!0,d:"M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 0 1 .083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12.017 24c6.624 0 11.99-5.367 11.99-11.988C24.007 5.367 18.641 0 12.017 0z"},Threads:{viewBox:"0 0 24 24",fill:!0,d:"M12.186 24h-.007c-3.581-.024-6.334-1.205-8.184-3.509C2.35 18.44 1.5 15.586 1.472 12.01v-.017c.03-3.579.879-6.43 2.525-8.482C5.845 1.205 8.6.024 12.18 0h.014c2.746.02 5.043.725 6.826 2.098 1.677 1.29 2.858 3.13 3.509 5.467l-2.04.569c-1.104-3.96-3.898-5.984-8.304-6.015-2.91.022-5.11.936-6.54 2.717C4.307 6.504 3.616 8.914 3.589 12c.027 3.086.718 5.496 2.057 7.164 1.43 1.783 3.631 2.698 6.54 2.717 2.623-.02 4.358-.631 5.8-2.045 1.647-1.613 1.618-3.593 1.09-4.798-.31-.71-.873-1.3-1.634-1.75-.192 1.352-.622 2.446-1.284 3.272-.886 1.102-2.14 1.704-3.73 1.79-1.202.065-2.361-.218-3.259-.801-1.063-.689-1.685-1.74-1.752-2.964-.065-1.19.408-2.285 1.33-3.082.88-.76 2.119-1.207 3.583-1.291a13.853 13.853 0 0 1 3.02.142c-.126-.742-.375-1.332-.75-1.757-.513-.586-1.308-.883-2.359-.89h-.029c-.844 0-1.992.232-2.721 1.32L7.734 7.847c.98-1.454 2.568-2.256 4.478-2.256h.044c3.194.02 5.097 1.975 5.287 5.388.108.046.216.094.321.142 1.49.7 2.58 1.761 3.154 3.07.797 1.82.871 4.79-1.548 7.158-1.85 1.81-4.094 2.628-7.277 2.65Zm1.003-11.69c-.242 0-.487.007-.739.021-1.836.103-2.98.946-2.916 2.143.067 1.256 1.452 1.839 2.784 1.767 1.224-.065 2.818-.543 3.086-3.71a10.5 10.5 0 0 0-2.215-.221z"},LinkedIn:{viewBox:"0 0 24 24",fill:!0,d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"}};function a(s){const l=r[s];return l?Tl("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:l.viewBox,fill:l.fill?"currentColor":"none",stroke:l.fill?"none":"currentColor"},[Tl("path",{d:l.d})]):null}return(s,l)=>E(i)?(L(),B("div",h8,[R("p",m8,ce(E(n)),1),R("div",p8,[(L(!0),B(Oe,null,zt(E(o),(c,d)=>(L(),B(Oe,{key:d},[c?.url&&c?.show?(L(),B("a",{key:0,href:c.url,target:"_blank",rel:"noopener noreferrer","aria-label":d,class:"text-brand-neutral-8000 hover:text-brand-primary-on-surface transition-colors duration-200"},[(L(),Xe(Z0(a(d)),{class:"size-5"}))],8,g8)):ge("",!0)],64))),128))])])):ge("",!0)}},v8={class:"mt-8 pt-8 border-t border-brand-neutral-800/15"},y8={class:"flex flex-col md:flex-row justify-between items-center"},b8={class:"text-brand-neutral-8000 text-sm mb-4 md:mb-0"},w8={key:0},x8={__name:"FooterLegalLinks",setup(e){const t=rt(new Date().getFullYear()),n=Ue("currentStore"),o=pe(()=>n.value?.chain?.name);return(i,r)=>(L(),B("div",v8,[R("div",y8,[R("div",b8,[$e(" © "+ce(E(t))+" ",1),E(o)?(L(),B("span",w8,ce(E(o))+".",1)):ge("",!0),r[0]||(r[0]=$e(" All rights reserved. ",-1))]),r[1]||(r[1]=R("div",{class:"flex space-x-6 text-sm"},[R("a",{href:"https://buddi.io/terms",target:"_blank",class:"text-brand-neutral-8000 hover:text-brand-primary-on-surface transition-colors"}," Terms of Service "),R("a",{href:"https://buddi.io/privacy",target:"_blank",class:"text-brand-neutral-8000 hover:text-brand-primary-on-surface transition-colors"}," Privacy Policy ")],-1))]),r[2]||(r[2]=R("div",{class:"mt-4 p-4 bg-brand-neutral-100 rounded-lg"},[R("p",{class:"text-brand-neutral-600 text-sm text-center"}
2217,[$e(" Canadian Cannabis E-Commerce Website by "),R("a",{href:"https://www.buddi.io",target:"_blank",class:"text-brand-primary-on-surface underline hover:no-underline transition-colors"}," Buddi.io ")])],-1))]))}},C8=["data-section-theme","data-theme-inverted"],k8={class:"max-w-screen-2xl mx-auto px-4 sm:px-6 lg:px-8 py-12"},I8={class:"grid grid-cols-1 md:grid-cols-4 gap-8"},S8={class:"relative"},M8={key:0,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","aria-hidden":"true"},A8={key:1,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","aria-hidden":"true"},P8={key:2,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","aria-hidden":"true"},D8={class:"absolute right-0 bottom-full mb-1.5 z-50 w-36 rounded-[8px] bg-white border border-[#e2e8f0] shadow-[0_4px_12px_rgba(0,0,0,0.12)] p-1 font-[lato,helvetica,sans-serif]"},T8=["onClick"],z8={key:0,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","aria-hidden":"true"},R8={key:1,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","aria-hidden":"true"},E8={key:2,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","aria-hidden":"true"},_8={__name:"Footer",setup(e){const t=pe(()=>X0(Ue("customization").value?.footer?.theme,"footer")),n=pe(()=>t.value==="dark"?"":null),o=Ue("inEditor"),i=rt(!1),r=[{value:"light",label:"Light"},{value:"tint",label:"Tint"},{value:"dark",label:"Dark"}],a=pe(()=>r.find(c=>c.value===t.value)?.label||"Theme"),s=()=>{typeof window>"u"||window.parent===window||window.parent.postMessage({type:"editor:open-section",section:"footer"},"*")},l=c=>{i.value=!1,!(typeof window>"u"||window.parent===window)&&window.parent.postMessage({type:"editor:set-section-theme",section:"footer",theme:c},"*")};return(c,d)=>{const u=Kw,m=Qw,g=u8,p=f8,f=x8,v=ks,y=Is;return L(),B("footer",{"data-section-theme":E(t),"data-theme-inverted":E(n),class:ze(["text-brand-neutral-800",E(o)&&"relative group/editor hover:z-2 hover:[box-shadow:inset_2px_0_0_#a855f7,inset_-2px_0_0_#a855f7,0_2px_0_#a855f7,0_-2px_0_#a855f7,0_0_18px_2px_rgba(168,85,247,0.35)] transition-[box-shadow] duration-200"])},[R("div",k8,[R("div",I8,[ue(u),ue(m),ue(g)]),ue(p),ue(f)]),E(o)?(L(),B("div",{key:0,class:ze(["absolute top-0 right-0 z-50 transition-opacity duration-200",E(i)?"":"opacity-0 group-hover/editor:opacity-100"])},[ue(y,null,{default:Ee(()=>[R("button",{type:"button",onClick:Tt(s,["stop"]),"aria-label":"Footer settings",class:"relative group/tip w-7 h-7 rounded-[7px] text-white/90 flex items-center justify-center hover:bg-white/20 hover:text-white transition-colors duration-150 cursor-pointer"},[d[3]||(d[3]=R("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","stroke-width":"2","aria-hidden":"true"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1)),ue(v,null,{default:Ee(()=>[...d[2]||(d[2]=[$e("Settings",-1)])]),_:1})]),R("div",S8,[R("button",{type:"button",onClick:d[0]||(d[0]=Tt(b=>i.value=!E(i),["stop"])),"aria-label":"Footer theme",class:ze(["relative group/tip h-7 px-2.5 rounded-[7px] text-[10px] font-semibold tracking-widest uppercase flex items-center gap-1.5 text-white/90 hover:bg-white/20 hover:text-white transition-colors duration-150 cursor-pointer",E(i)?"bg-white/20 text-white":""])},[E(t)==="dark"?(L(),B("svg",M8,[...d[4]||(d[4]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"},null,-1)])])):E(t)==="tint"?(L(),B("svg",A8,[...d[5]||(d[5]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 3.75c2.9 3.35 5.25 6.2 5.25 9a5.25 5.25 0 11-10.5 0c0-2.8 2.35-5.65 5.25-9z"},null,-1)])])):(L(),B("svg",P8,[...d[6]||(d[6]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z"},null,-1)])])),$e(" "+ce(E(a))+" ",1),ue(v,null,{default:Ee(()=>[...d[7]||(d[7]=[$e("Theme",-1)])]),_:1})],2),E(i)?(L(),B(Oe,{key:0},[R("div",{class:"fixed inset-0 z-40",onClick:d[1]||(d[1]=Tt(b=>i.value=!1,["stop"]))}),R("div",D8,[(L(),B(Oe,null,zt(r,b=>R("button",{key:b.value,type:"button",onClick:Tt(w=>l(b.value),["stop"]),class:ze(["w-full flex items-center gap-2 px-2.5 py-2 text-xs font-medium text-left rounded-[6px] transition-colors duration-150 cursor-pointer",E(t)===b.value?"bg-[#362C8B] text-white":"text-[#334155] hover:bg-[#f1f5f9]"])},[b.value==="dark"?(L(),B("svg",z8,[...d[8]||(d[8]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"},null,-1)])])):b.value==="tint"?(L(),B("svg",R8,[...d[9]||(d[9]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 3.75c2.9 3.35 5.25 6.2 5.25 9a5.25 5.25 0 11-10.5 0c0-2.8 2.35-5.65 5.25-9z"},null,-1)])])):(L(),B("svg",E8,[...d[10]||(d[10]=[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z"},null,-1)])])),$e(" "+ce(b.label),1)],10,T8)),64))])],64)):ge("",!0)])]),_:1})],2)):ge("",!0)],10,C8)}}},L8={class:"fixed bottom-6 left-1/2 -translate-x-1/2 z-[9998] flex flex-col items-center gap-3 pointer-events-none max-w-sm w-full px-4","aria-live":"polite"},O8={key:0,"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"},N8={key:1,"stroke-linecap":"round","stroke-linejoin":"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"},$8={key:2,"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"},F8={key:3,"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},j8=["innerHTML"],B8=["onClick"],H8={__name:"ToastContainer",setup(e){const{toasts:t,removeToast:n}=Q0(),o=()=>"bg-gray-900 border-gray-700 text-white",i=r=>{switch(r){case"success":return"text-green-400";case"error":return"text-red-400";case"warning":return"text-amber-400";default:return"text-blue-400"}};return(r,a)=>{const s=jr;return L(),Xe(s,null,{default:Ee(()=>[(L(),Xe(vi,{to:"body"},[R("div",L8,[ue(Y0,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"translate-y-4 opacity-0","enter-to-class":"translate-y-0 opacity-100","leave-active-class":"transition-all duration-200 ease-in","leave-from-class":"translate-y-0 opacity-100","leave-to-class":"translate-x-4 opacity-0"},{default:Ee(()=>[(L(!0),B(Oe,null,zt(E(t),l=>(L(),B("div",{key:l.id,role:"alert",class:ze([o(),"pointer-events-auto flex items-start gap-2.5 px-5 py-4 rounded-2xl shadow-lg border text-sm min-w-[280px]"])},[(L(),B("svg",{class:ze([i(l.type),"w-5 h-5 flex-shrink-0 mt-0.5"]),fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24","aria-hidden":"true"},[l.type==="success"?(L(),B("path",O8)):l.type==="error"?(L(),B("path",N8)):l.type==="warning"?(L(),B("path",$8)):(L(),B("path",F8))],2)),R("span",{class:"flex-1 pt-[1px] text-pretty",innerHTML:l.message},null,8,j8),R("button",{onClick:c=>E(n)(l.id),class:"flex-shrink-0 p-0.5 rounded-md opacity-60 hover:opacity-100 transition-opacity","aria-label":"Dismiss notification"},[...a[0]||(a[0]=[R("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24","aria-hidden":"true"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,B8)],2))),128))]),_:1})])]))]),_:1})}}},U8=new Set(["Inter","Nunito","Raleway","DM Sans","Outfit","Plus Jakarta Sans","Playfair Display","Merriweather","EB Garamond","Fraunces","Source Serif 4"]),W8="400;500;600;700;800",G8="400..800",q8=e=>{if(!Array.isArray(e))return null;const t=[...new Set(e.filter(o=>
2217typeof o=="string"&&o.trim().length>0).map(o=>o.trim()))];return t.length===0?null:`https://fonts.googleapis.com/css2?${t.map(o=>{const i=U8.has(o)?G8:W8;return`family=${encodeURIComponent(o).replace(/%20/g,"+")}:wght@${i}`}).join("&")}&display=swap`},Iu=e=>{if(!e||e.length<7)return .5;const t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,o=parseInt(e.slice(5,7),16)/255;return .299*t+.587*n+.114*o},V8=e=>{const t={},n=e["--color-primary"],o=e["--color-surface"];if(n&&o){const i=Iu(o),r=Iu(n);i>.5?t["--color-primary-on-surface"]=r>.5?`oklch(from ${n} min(l, 0.45) c h)`:n:t["--color-primary-on-surface"]=r<.4?`oklch(from ${n} max(l, 0.65) c h)`:n}return t},K8=e=>`'${String(e).replace(/'/g,"\\'")}'`,Z8=["soft","sharp","pill"],X8={light:"#ffffff",dark:"#000000"},Y8=()=>{const e=Ue("customization"),t=r=>{const a=r?.theme?.colors||{},s=r?.theme?.fonts||{},l=V8(a),c=[];Object.entries({...a,...l}).forEach(([g,p])=>{c.push(`${g}: ${p} !important`)}),Object.entries(s).forEach(([g,p])=>{p&&c.push(`${g}: ${K8(p)} !important`)});const d=X8[r?.theme?.button_text];d&&c.push(`--color-primary-text: ${d} !important`),c.length&&gi({style:[{id:"custom-styles",innerHTML:`:root {${c.join("; ")}}`}]});const u=r?.theme?.shape;gi({htmlAttrs:{"data-shape":Z8.includes(u)?u:"soft"}});const m=q8([s["--body-font-family"],s["--heading-font-family"]].filter(g=>g&&g.trim()!=="Inter"));m&&gi({link:[{rel:"preconnect",href:"https://fonts.googleapis.com"},{rel:"preconnect",href:"https://fonts.gstatic.com",crossorigin:""},{id:"custom-fonts",rel:"stylesheet",href:m}]})},n=({data:r})=>{r.hasOwnProperty("customization")&&(t(r.customization),e.value=r.customization)};return{observeCustomizationChange:()=>{typeof window<"u"&&window.addEventListener("message",n)},stopCustomizationChangeObservation:()=>{typeof window<"u"&&window.removeEventListener("message",n)},applyCustomizationStyles:t}},Su="custom-css",Q8=()=>{const e=i=>{const r=["script","style","link"],a=Array.from(new DOMParser().parseFromString(i,"text/html").querySelectorAll(r)).map(s=>{const l=Array.from(s.attributes).reduce((u,m)=>(u[m.name]=m.value,u),{});l.innerHTML=s.textContent.trim();const c=s.tagName.toLowerCase(),d=document.createElement(c);return Object.entries(l).forEach(([u,m])=>{d[u]=m}),{tag:c,attrs:l,node:d}});if(i.includes("<noscript")){const s=new DOMParser().parseFromString(i,"text/html").querySelector("body").innerHTML,l=document.createElement("noscript");l.innerHTML=s,a.push({tag:"noscript",attrs:{innerHTML:s},node:l})}return a},t=(i,r)=>{let a=e(r);if(["start of body","end of body"].includes(i))return a.forEach(({tag:s,attrs:l})=>gi({[s]:{...l,tagPosition:i==="start of body"?"bodyOpen":"bodyClose"}}));a.forEach(({node:s})=>{i==="start of head"?document.head.prepend(s):document.head.append(s)})};return{insertIntegrations:i=>{const r={};i.forEach(a=>{const s=a.code.trim();if(!s)return;let l=a.placement||"start of head";r.hasOwnProperty(l)?r[l]+=` 2218`+s:r[l]=s}),Object.entries(r).forEach(([a,s])=>t(a,s))},insertCustomCss:i=>{if(!i)return;document.getElementById(Su)?.remove();const r=document.createElement("style");r.id=Su,r.textContent=i,document.head.append(r)}}},J8={class:"min-h-screen bg-gray-50"},ex={__name:"default",props:{doNotApplyNegativeMargin:{required:!1,type:Boolean,default:!1}},async setup(e){let t,n;const{resolveAndSetCurrentStoreId:o}=Ru(),{getCurrentStore:i,getChainStores:r,getCustomization:a,getDomainSettings:s}=Tu(),l=on(),c=!!l.query["fresh-store"],d=J0().getDomain(),u=Ue("currentStoreId"),m=Ue("chainStores");if([t,n]=oi(async()=>Wi(async()=>{const T=on().query["store-id"];T&&(u.value=T),m.value=await r(c),T||o(m.value,l,u,d)},"$AGBXBUn5kX")),await t,n(),!l.params.prefix&&u.value){const T=m.value?.find(D=>D.id===u.value);T?.url_prefix&&([t,n]=oi(()=>Fa(`/${T.url_prefix}${l.fullPath}`,{})),await t,n())}if(!u.value&&l.params.prefix)throw ef({statusCode:404,statusMessage:"Page not found",fatal:!0});const g=Ue("currentStore");[t,n]=oi(async()=>Wi(async()=>{g.value=await i(c)},"$LjbteNXcxt")),await t,n();const{insertIntegrations:p,insertCustomCss:f}=Q8(),{setSeoMeta:v,setPageCustomSeo:y}=sf();gi({titleTemplate:T=>T||""});const b=Ue("domainSettings");[t,n]=oi(async()=>Wi(async()=>{const T={...await s(on().query.hasOwnProperty("fresh-settings"))},D=T.seo?.stores||{};T.seo?.for_all_stores||!D.hasOwnProperty(g.value.id)?b.value=T:(T.seo=T.seo.stores[g.value.id],b.value=T||{})},"$Btu1CBjtxO")),await t,n(),p(b.value?.integrations||[]),f(b.value?.css_customization||null),v(b.value?.seo),rf().observeRouteChangeAndClearFilters(),vo(on(),T=>{["collection-slug","collection-slug-pref"].includes(T.name)||(["shop","contact","category-category","shop-pref","contact-pref","category-category-pref","provided-content-id","provided-content-id-pref"].includes(T.name)?y(b):v(b.value?.seo))},{immediate:!0});const w=Ue("customization");[t,n]=oi(async()=>Wi(async()=>{w.value=await a(on().query.hasOwnProperty("fresh-customization"))},"$HBiTzGZl0Y")),await t,n();const x=pe(()=>on().name),k=pe(()=>!["index","category-category-id","shop","category-category","promo-id","collection-slug","error-404","index-pref","category-category-id-pref","shop-pref","category-category-pref","promo-id-pref","collection-slug-pref","error-404-pref","provided-content-id","provided-content-id-pref"].includes(x.value)),{observeCustomizationChange:I,stopCustomizationChangeObservation:S,applyCustomizationStyles:A}=Y8();A(w.value);const M=Ue("inEditor",()=>!1);So(()=>
2218{if(I(),M.value=window.location.hash==="#editor"&&window.self!==window.top,M.value&&!document.getElementById("editor-chrome-font")){const T=document.createElement("link");T.id="editor-chrome-font",T.rel="stylesheet",T.href="https://fonts.googleapis.com/css2?family=Lato:wght@400;600;700&display=swap",document.head.appendChild(T)}setTimeout(()=>{window.parent.postMessage({type:"onMounted"},"*")},100)}),Fr(()=>{S()});const{applyOrgSchemas:P}=lf();return vo(x,()=>{const T=w.value?.homepage?.faq||{};if(!["category-category-id","category-category-id-pref"].includes(x.value)){const D=T.show?T.items||[]:[];P(null,["index","index-pref"].includes(x.value)?D:[])}},{immediate:!0}),(T,D)=>{const F=hf,N=F2,W=Uw,_=jr,G=_8,q=H8;return L(),B("div",J8,[ue(F),ue(N),ue(_,null,{default:Ee(()=>[ue(W)]),_:1}),R("main",{class:"main-content",style:Pu(E(k)&&!e.doNotApplyNegativeMargin?{marginTop:"calc(var(--header-height, 6rem) * -1)"}:{})},[tf(T.$slots,"default")],4),ue(G),ue(q)])}}},Cx=Object.freeze(Object.defineProperty({__proto__:null,default:ex},Symbol.toStringTag,{value:"Module"}));export{xx as $,dx as A,ln as B,de as C,Ge as D,ry as E,Yl as F,Te as G,sy as H,dy as J,ly as K,Kn as L,Gr as M,hx as N,ux as O,iy as P,Ie as U,ye as W,lx as X,gx as Y,sx as Z,z as _,Ne as a,Ql as b,se as c,fx as d,uy as e,wx as f,ch as g,vx as h,px as i,Ce as j,ay as k,Z as l,Wr as m,ax as n,J2 as o,bx as p,be as q,cx as r,gy as s,hy as t,fy as u,mx as v,yx as w,my as x,ui as y,Cx as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.