13 lines
2.7 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*!
* PSPDFKit for Web 2023.5.2 (https://pspdfkit.com/web)
*
* Copyright (c) 2016-2023 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
* This notice may not be removed from this file.
*
* PSPDFKit uses several open source third-party components: https://pspdfkit.com/acknowledgements/web/
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.PSPDFKit=t():e.PSPDFKit=t()}(self,(()=>(()=>{var e,t,n,o,r={84121:(e,t,n)=>{"use strict";function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function r(e){var t=function(e,t){if("object"!==o(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===o(t)?t:String(t)}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:()=>i})},22122:(e,t,n)=>{"use strict";function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(this,arguments)}n.d(t,{Z:()=>o})},17375:(e,t,n)=>{"use strict";function o(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n.d(t,{Z:()=>o})},53912:(e,t,n)=>{"use strict";function o(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(null==e||e(o),!1===n||!o.defaultPrevented)return null==t?void 0:t(o)}}n.d(t,{M:()=>o})},21286:(e,t,n)=>{"use strict";n.d(t,{B:()=>s});var o=n(67294),r=n(47257),i=n(72261),a=n(8145);function s(e){const t=e+"CollectionProvider",[n,s]=(0,r.b)(t),[l,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=e=>{const{scope:t,children:n}=e,r=o.useRef(null),i=o.useRef(new Map).current;return o.createElement(l,{scope:t,itemMap:i,collectionRef:r},n)},d=e+"CollectionSlot",p=o.forwardRef(((e,t)=>{const{scope:n,children:r}=e,s=c(d,n),l=(0,i.e)(t,s.collectionRef);return o.createElement(a.g7,{ref:l},r)})),f=e+"CollectionItemSlot",h="data-radix-collection-item",m=o.forwardRef(((e,t)=>{const{scope:n,children:r,...s}=e,l=o.useRef(null),u=(0,i.e)(t,l),d=c(f,n);return o.useEffect((()=>(d.itemMap.set(l,{ref:l,...s}),()=>{d.itemMap.delete(l)}))),o.createElement(a.g7,{[h]:"",ref:u},r)}));return[{Provider:u,Slot:p,ItemSlot:m},function(t){const n=c(e+"CollectionConsumer",t);return o.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},s]}},72261:(e,t,n)=>{"use strict";n.d(t,{F:()=>r,e:()=>i});var o=n(67294);function r(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function i(...e){return(0,o.useCallback)(r(...e),e)}},47257:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var o=n(67294);function r(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>(0,o.createContext)(e)));return function(n){const r=(null==n?void 0:n[e])||t;return(0,o.useMemo)((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const i=(0,o.createContext)(r),a=n.length;function s(t){const{scope:n,children:r,...s}=t,l=(null==n?void 0:n[e][a])||i,c=(0,o.useMemo)((()=>s),Object.values(s));return(0,o.createElement)(l.Provider,{value:c},r)}return n=[...n,r],s.displayName=t+"Provider",[s,function(n,s){const l=(null==s?void 0:s[e][a])||i,c=(0,o.useContext)(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},i(r,...t)]}function i(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:o})=>({...t,...n(e)[`__scope${o}`]})),{});return(0,o.useMemo)((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}},69409:(e,t,n)=>{"use strict";n.d(t,{gm:()=>i});var o=n(67294);const r=(0,o.createContext)(void 0);function i(e){const t=(0,o.useContext)(r);return e||t||"ltr"}},48923:(e,t,n)=>{"use strict";function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(this,arguments)}n.d(t,{XB:()=>h});var r=n(67294),i=n(53912),a=n(84178),s=n(72261),l=n(88751);const c="dismissableLayer.update",u="dismissableLayer.pointerDownOutside",d="dismissableLayer.focusOutside";let p;const f=(0,r.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),h=(0,r.forwardRef)(((e,t)=>{var n;const{disableOutsidePointerEvents:h=!1,onEscapeKeyDown:v,onPointerDownOutside:y,onFocusOutside:b,onInteractOutside:w,onDismiss:S,...P}=e,E=(0,r.useContext)(f),[x,D]=(0,r.useState)(null),C=null!==(n=null==x?void 0:x.ownerDocument)&&void 0!==n?n:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,k]=(0,r.useState)({}),O=(0,s.e)(t,(e=>D(e))),A=Array.from(E.layers),[T]=[...E.layersWithOutsidePointerEventsDisabled].slice(-1),I=A.indexOf(T),F=x?A.indexOf(x):-1,M=E.layersWithOutsidePointerEventsDisabled.size>0,_=F>=I,N=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=(0,l.W)(e),o=(0,r.useRef)(!1),i=(0,r.useRef)((()=>{}));return(0,r.useEffect)((()=>{const e=e=>{if(e.target&&!o.current){const r={originalEvent:e};function a(){g(u,n,r,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=a,t.addEventListener("click",i.current,{once:!0})):a()}o.current=!1},r=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(r),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}}),[t,n]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...E.branches].some((e=>e.contains(t)));_&&!n&&(null==y||y(e),null==w||w(e),e.defaultPrevented||null==S||S())}),C),R=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=(0,l.W)(e),o=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{const e=e=>{if(e.target&&!o.current){g(d,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...E.branches].some((e=>e.contains(t)))||(null==b||b(e),null==w||w(e),e.defaultPrevented||null==S||S())}),C);return function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=(0,l.W)(e);(0,r.useEffect)((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}((e=>{F===E.layers.size-1&&(null==v||v(e),!e.defaultPrevented&&S&&(e.preventDefault(),S()))}),C),(0,r.useEffect)((()=>{if(x)return h&&(0===E.layersWithOutsidePointerEventsDisabled.size&&(p=C.body.style.pointerEvents,C.body.style.pointerEvents="none"),E.layersWithOutsidePointerEventsDisabled.add(x)),E.layers.add(x),m(),()=>{h&&1===E.layersWithOutsidePointerEventsDisabled.size&&(C.body.style.pointerEvents=p)}}),[x,C,h,E]),(0,r.useEffect)((()=>()=>{x&&(E.layers.delete(x),E.layersWithOutsidePointerEventsDisabled.delete(x),m())}),[x,E]),(0,r.useEffect)((()=>{const e=()=>k({});return document.addEventListener(c,e),()=>document.removeEventListener(c,e)}),[]),(0,r.createElement)(a.WV.div,o({},P,{ref:O,style:{pointerEvents:M?_?"auto":"none":void 0,...e.style},onFocusCapture:(0,i.M)(e.onFocusCapture,R.onFocusCapture),onBlurCapture:(0,i.M)(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:(0,i.M)(e.onPointerDownCapture,N.onPointerDownCapture)}))}));function m(){const e=new CustomEvent(c);document.dispatchEvent(e)}function g(e,t,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?(0,a.jH)(r,i):r.dispatchEvent(i)}},12921:(e,t,n)=>{"use strict";function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(this,arguments)}n.d(t,{Eh:()=>nt,oC:()=>Qe,VY:()=>Ye,ck:()=>Je,Uv:()=>Xe,Ee:()=>et,Rk:()=>tt,fC:()=>He,xz:()=>$e});var r=n(67294),i=n(53912),a=n(72261),s=n(47257),l=n(16180),c=n(84178);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},u.apply(this,arguments)}var d=n(21286),p=n(69409),f=n(48923),h=n(57279),m=n(1788),g=n(69448),v=n(74943),y=n(37103),b=n(83583),w=n(20026),S=n(8145),P=n(88751),E=n(23541),x=n(81066);const D=["Enter"," "],C=["ArrowUp","PageDown","End"],k=["ArrowDown","PageUp","Home",...C],O="Menu",[A,T,I]=(0,d.B)(O),[F,M]=(0,s.b)(O,[I,v.D7,w.Pc]),_=(0,v.D7)(),N=(0,w.Pc)(),[R,L]=F(O),[B,j]=F(O),z=e=>{var t;const{__scopeMenu:n,open:o=!1,children:i,dir:a,onOpenChange:s,modal:l=!0}=e,c=_(n),[u,d]=(0,r.useState)(null),f=(0,r.useRef)(!1),h=(0,P.W)(s),m=(0,p.gm)(a),g=null!==(t=null==u?void 0:u.ownerDocument)&&void 0!==t?t:document;return(0,r.useEffect)((()=>{const e=()=>{f.current=!0,g.addEventListener("pointerdown",t,{capture:!0,once:!0}),g.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>f.current=!1;return g.addEventListener("keydown",e,{capture:!0}),()=>{g.removeEventListener("keydown",e,{capture:!0}),g.removeEventListener("pointerdown",t,{capture:!0}),g.removeEventListener("pointermove",t,{capture:!0})}}),[g]),(0,r.createElement)(v.fC,c,(0,r.createElement)(R,{scope:n,open:o,onOpenChange:h,content:u,onContentChange:d},(0,r.createElement)(B,{scope:n,onClose:(0,r.useCallback)((()=>h(!1)),[h]),isUsingKeyboardRef:f,dir:m,modal:l},i)))},K=(0,r.forwardRef)(((e,t)=>{const{__scopeMenu:n,...o}=e,i=_(n);return(0,r.createElement)(v.ee,u({},i,o,{ref:t}))})),Z="MenuPortal",[U,V]=F(Z,{forceMount:void 0}),G=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:i}=e,a=L(Z,t);return(0,r.createElement)(U,{scope:t,forceMount:n},(0,r.createElement)(b.z,{present:n||a.open},(0,r.createElement)(y.h,{asChild:!0,container:i},o)))},W="MenuContent",[q,H]=F(W),$=(0,r.forwardRef)(((e,t)=>{const n=V(W,e.__scopeMenu),{forceMount:o=n.forceMount,...i}=e,a=L(W,e.__scopeMenu),s=j(W,e.__scopeMenu);return(0,r.createElement)(A.Provider,{scope:e.__scopeMenu},(0,r.createElement)(b.z,{present:o||a.open},(0,r.createElement)(A.Slot,{scope:e.__scopeMenu},s.modal?(0,r.createElement)(X,u({},i,{ref:t})):(0,r.createElement)(Y,u({},i,{ref:t})))))})),X=(0,r.forwardRef)(((e,t)=>{const n=L(W,e.__scopeMenu),o=(0,r.useRef)(null),s=(0,a.e)(t,o);return(0,r.useEffect)((()=>{const e=o.current;if(e)return(0,E.Ry)(e)}),[]),(0,r.createElement)(J,u({},e,{ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:(0,i.M)(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),Y=(0,r.forwardRef)(((e,t)=>{const n=L(W,e.__scopeMenu);return(0,r.createElement)(J,u({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),J=(0,r.forwardRef)(((e,t)=>{var n,o;const{__scopeMenu:s,loop:l=!1,trapFocus:c,onOpenAutoFocus:d,onCloseAutoFocus:p,disableOutsidePointerEvents:g,onEscapeKeyDown:y,onPointerDownOutside:b,onFocusOutside:Pstate.value.toLowerE,onDismiss:D,disableOutsideScroll:O,...A}=e,I=L(W,s),F=j(W,s),M=_(s),R=N(s),B=T(s),[z,K]=(0,r.useState)(null),Z=(0,r.useRef)(null),U=(0,a.e)(t,Z,I.onContentChange),V=(0,r.useRef)(0),G=(0,r.useRef)(""),H=(0,r.useRef)(0),$=(0,r.useRef)(null),X=(0,r.useRef)("right"),Y=(0,r.useRef)(0),J=null!==(n=null===(o=Z.current)||void 0===o?void 0:o.ownerDocument)&&void 0!==n?n:document,Q=O?x.f:r.Fragment,ee=O?{as:S.g7,allowPinchZoom:!0}:void 0,te=e=>{var t,n;const o=G.current+e,r=B().filter((e=>!e.disabled)),i=J.activeElement,a=null===(t=r.find((e=>e.ref.current===i)))||void 0===t?void 0:t.textValue,s=function(e,t,n){const o=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,r=n?e.indexOf(n):-1;let i=(a=e,s=Math.max(r,0),a.map(((e,t)=>a[(s+t)%a.length])));var a,s;1===o.length&&(i=i.filter((e=>e!==n)));const l=i.find((e=>e.toLowerCase().startsWith(o.toLowerCase())));return l!==n?l:void 0}(r.map((e=>e.textValue)),o,a),l=null===(n=r.find((e=>e.textValue===s)))||void 0===n?void 0:n.ref.current;!function e(t){var n;G.current=t;const o=null!==(n=J.defaultView)&&void 0!==n?n:window;o.clearTimeout(V.current),""!==t&&(V.current=o.setTimeout((()=>e("")),1e3))}(o),l&&setTimeout((()=>l.focus()))};(0,r.useEffect)((()=>()=>{var e;return null===(e=J.defaultView)||void 0===e?void 0:e.clearTimeout(V.current)}),[J]),(0,h.EW)(J);const ne=(0,r.useCallback)((e=>{var t,n;return X.current===(null===(t=$.current)||void 0===t?void 0:t.side)&&function(e,t){if(!t)return!1;return function(e,t){const{x:n,y:o}=e;let r=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,s=t[e].y,l=t[i].x,c=t[i].y;s>o!=c>o&&n<(l-a)*(o-s)/(c-s)+a&&(r=!r)}return r}({x:e.clientX,y:e.clientY},t)}(e,null===(n=$.current)||void 0===n?void 0:n.area)}),[]);return(0,r.createElement)(q,{scope:s,searchRef:G,onItemEnter:(0,r.useCallback)((e=>{ne(e)&&e.preventDefault()}),[ne]),onItemLeave:(0,r.useCallback)((e=>{var t;ne(e)||(null===(t=Z.current)||void 0===t||t.focus(),K(null))}),[ne]),onTriggerLeave:(0,r.useCallback)((e=>{ne(e)&&e.preventDefault()}),[ne]),pointerGraceTimerRef:H,onPointerGraceIntentChange:(0,r.useCallback)((e=>{$.current=e}),[])},(0,r.createElement)(Q,ee,(0,r.createElement)(m.M,{asChild:!0,trapped:c,onMountAutoFocus:(0,i.M)(d,(e=>{var t;e.preventDefault(),null===(t=Z.current)||void 0===t||t.focus()})),onUnmountAutoFocus:p},(0,r.createElement)(f.XB,{asChild:!0,disableOutsidePointerEvents:g,onEscapeKeyDown:y,onPointerDownOutside:b,onFocusOutside:P,onInteractOutside:E,onDismiss:D},(0,r.createElement)(w.fC,u({asChild:!0},R,{dir:F.dir,orientation:"vertical",loop:l,currentTabStopId:z,onCurrentTabStopIdChange:K,onEntryFocus:e=>{F.isUsingKeyboardRef.current||e.preventDefault()}}),(0,r.createElement)(v.VY,u({role:"menu","aria-orientation":"vertical","data-state":ye(I.open),"data-radix-menu-content":"",dir:F.dir},M,A,{ref:U,style:{outline:"none",...A.style},onKeyDown:(0,i.M)(A.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,o=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&o&&te(e.key));const r=Z.current;if(e.target!==r)return;if(!k.includes(e.key))return;e.preventDefault();const i=B().filter((e=>!e.disabled)).map((e=>e.ref.current));C.includes(e.key)&&i.reverse(),function(e,t=document){const n=t.activeElement;for(const o of e){if(o===n)return;if(o.focus(),t.activeElement!==n)return}}(i,J)})),onBlur:(0,i.M)(e.onBlur,(e=>{var t;e.currentTarget.contains(e.target)||((null!==(t=J.defaultView)&&void 0!==t?t:window).clearTimeout(V.current),G.current="")})),onPointerMove:(0,i.M)(e.onPointerMove,Se((e=>{const t=e.target,n=Y.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>Y.current?"right":"left";X.current=t,Y.current=e.clientX}})))})))))))})),Q=(0,r.forwardRef)(((e,t)=>{const{__scopeMenu:n,...o}=e;return(0,r.createElement)(c.WV.div,u({role:"group"},o,{ref:t}))})),ee="MenuItem",te="menu.itemSelect",ne=(0,r.forwardRef)(((e,t)=>{const{disabled:n=!1,onSelect:o,...s}=e,l=(0,r.useRef)(null),d=j(ee,e.__scopeMenu),p=H(ee,e.__scopeMenu),f=(0,a.e)(t,l),h=(0,r.useRef)(!1);return(0,r.createElement)(oe,u({},s,{ref:f,disabled:n,onClick:(0,i.M)(e.onClick,(()=>{const e=l.current;if(!n&&e){const t=new CustomEvent(te,{bubbles:!0,cancelable:!0});e.addEventListener(te,(e=>null==o?void 0:o(e)),{once:!0}),(0,c.jH)(e,t),t.defaultPrevented?h.current=!1:d.onClose()}})),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),h.current=!0},onPointerUp:(0,i.M)(e.onPointerUp,(e=>{var t;h.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:(0,i.M)(e.onKeyDown,(e=>{const t=""!==p.searchRef.current;n||t&&" "===e.key||D.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),oe=(0,r.forwardRef)(((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:s,...l}=e,d=H(ee,n),p=N(n),f=(0,r.useRef)(null),h=(0,a.e)(t,f),[m,g]=(0,r.useState)(!1),[v,y]=(0,r.useState)("");return(0,r.useEffect)((()=>{const e=f.current;var t;e&&y((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[l.children]),(0,r.createElement)(A.ItemSlot,{scope:n,disabled:o,textValue:null!=s?s:v},(0,r.createElement)(w.ck,u({asChild:!0},p,{focusable:!o}),(0,r.createElement)(c.WV.div,u({role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0},l,{ref:h,onPointerMove:(0,i.M)(e.onPointerMove,Se((e=>{if(o)d.onItemLeave(e);else if(d.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus()}}))),onPointerLeave:(0,i.M)(e.onPointerLeave,Se((e=>d.onItemLeave(e)))),onFocus:(0,i.M)(e.onFocus,(()=>g(!0))),onBlur:(0,i.M)(e.onBlur,(()=>g(!1)))}))))})),re=(0,r.forwardRef)(((e,t)=>{const{checked:n=!1,onCheckedChange:o,...a}=e;return(0,r.createElement)(pe,{scope:e.__scopeMenu,checked:n},(0,r.createElement)(ne,u({role:"menuitemcheckbox","aria-checked":be(n)?"mixed":n},a,{ref:t,"data-state":we(n),onSelect:(0,i.M)(a.onSelect,(()=>null==o?void 0:o(!!be(n)||!n)),{checkForDefaultPrevented:!1})})))})),ie="MenuRadioGroup",[ae,se]=F(ie,{value:void 0,onValueChange:()=>{}}),le=(0,r.forwardRef)(((e,t)=>{const{value:n,onValueChange:o,...i}=e,a=(0,P.W)(o);return(0,r.createElement)(ae,{scope:e.__scopeMenu,value:n,onValueChange:a},(0,r.createElement)(Q,u({},i,{ref:t})))})),ce="MenuRadioItem",ue=(0,r.forwardRef)(((e,t)=>{const{value:n,...o}=e,a=se(ce,e.__scopeMenu),s=n===a.value;return(0,r.createElement)(pe,{scope:e.__scopeMenu,checked:s},(0,r.createElement)(ne,u({role:"menuitemradio","aria-checked":s},o,{ref:t,"data-state":we(s),onSelect:(0,i.M)(o.onSelect,(()=>{var e;return null===(e=a.onValueChange)||void 0===e?void 0:e.call(a,n)}),{checkForDefaultPrevented:!1})})))})),de="MenuItemIndicator",[pe,fe]=F(de,{checked:!1}),he=(0,r.forwardRef)(((e,t)=>{const{__scopeMenu:n,...o}=e,i=_(n);return(0,r.createElement)(v.Eh,u({},i,o,{ref:t}))})),me="MenuSub",[ge,ve]=F(me);function ye(e){return e?"open":"closed"}function be(e){return"indeterminate"===e}function we(e){return be(e)?"indeterminate":e?"checked":"unchecked"}function Se(e){return t=>"mouse"===t.pointerType?e(t):void 0}const Pe=z,Ee=K,xe=G,De=$,Ce=ne,ke=re,Oe=le,Ae=ue,Te=he,Ie="DropdownMenu",[Fe,Me]=(0,s.b)(Ie,[M]),_e=M(),[Ne,Re]=Fe(Ie),Le=e=>{const{__scopeDropdownMenu:t,children:n,dir:i,open:a,defaultOpen:s,onOpenChange:c,modal:u=!0}=e,d=_e(t),p=(0,r.useRef)(null),[f=!1,h]=(0,l.T)({prop:a,defaultProp:s,onChange:c});return(0,r.createElement)(Ne,{scope:t,triggerId:(0,g.M)(),triggerRef:p,contentId:(0,g.M)(),open:f,onOpenChange:h,onOpenToggle:(0,r.useCallback)((()=>h((e=>!e))),[h]),modal:u},(0,r.createElement)(Pe,o({},d,{open:f,onOpenChange:h,dir:i,modal:u}),n))},Be="DropdownMenuTrigger",je=(0,r.forwardRef)(((e,t)=>{const{__scopeDropdownMenu:n,disabled:s=!1,...l}=e,u=Re(Be,n),d=_e(n);return(0,r.createElement)(Ee,o({asChild:!0},d),(0,r.createElement)(c.WV.button,o({type:"button",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":u.open?"open":"closed","data-disabled":s?"":void 0,disabled:s},l,{ref:(0,a.F)(t,u.triggerRef),onPointerDown:(0,i.M)(e.onPointerDown,(e=>{s||0!==e.button||!1!==e.ctrlKey||(u.onOpenToggle(),u.open||e.preventDefault())})),onKeyDown:(0,i.M)(e.onKeyDown,(e=>{s||(["Enter"," "].includes(e.key)&&u.onOpenToggle(),"ArrowDown"===e.key&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})))})),ze=e=>{const{__scopeDropdownMenu:t,...n}=e,i=_e(t);return(0,r.createElement)(xe,o({},i,n))},Ke="DropdownMenuContent",Ze=(0,r.forwardRef)(((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=Re(Ke,n),l=_e(n),c=(0,r.useRef)(!1);return(0,r.createElement)(De,o({id:s.contentId,"aria-labelledby":s.triggerId},l,a,{ref:t,onCloseAutoFocus:(0,i.M)(e.onCloseAutoFocus,(e=>{var t;c.current||null===(t=s.triggerRef.current)||void 0===t||t.focus(),c.current=!1,e.preventDefault()})),onInteractOutside:(0,i.M)(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,o=2===t.button||n;s.modal&&!o||(c.current=!0)})),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)"}}))})),Ue=(0,r.forwardRef)(((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,a=_e(n);return(0,r.createElement)(Ce,o({},a,i,{ref:t}))})),Ve=(0,r.forwardRef)(((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,a=_e(n);return(0,r.createElement)(ke,o({},a,i,{ref:t}))})),Ge=(0,r.forwardRef)(((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,a=_e(n);return(0,r.createElement)(Oe,o({},a,i,{ref:t}))})),We=(0,r.forwardRef)(((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,a=_e(n);return(0,r.createElement)(Ae,o({},a,i,{ref:t}))})),qe=(0,r.forwardRef)(((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,a=_e(n);return(0,r.createElement)(Te,o({},a,i,{ref:t}))})),He=Le,$e=je,Xe=ze,Ye=Ze,Je=Ue,Qe=Ve,et=Ge,tt=We,nt=qe},57279:(e,t,n)=>{"use strict";n.d(t,{EW:()=>i});var o=n(67294);let r=0;function i(e=document){(0,o.useEffect)((()=>{var t,n;const o=e.querySelectorAll("[data-radix-focus-guard]");return e.body.insertAdjacentElement("afterbegin",null!==(t=o[0])&&void 0!==t?t:a()),e.body.insertAdjacentElement("beforeend",null!==(n=o[1])&&void 0!==n?n:a()),r++,()=>{1===r&&e.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),r--}}),[e])}function a(e=document){const t=e.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}},1788:(e,t,n)=>{"use strict";function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(this,arguments)}n.d(t,{M:()=>d});var r=n(67294),i=n(72261),a=n(84178),s=n(88751);const l="focusScope.autoFocusOnMount",c="focusScope.autoFocusOnUnmount",u={bubbles:!1,cancelable:!0},d=(0,r.forwardRef)(((e,t)=>{var n;const{loop:d=!1,trapped:h=!1,onMountAutoFocus:v,onUnmountAutoFocus:y,...b}=e,[w,S]=(0,r.useState)(null),P=(0,s.W)(v),E=(0,s.W)(y),x=(0,r.useRef)(null),D=null!==(n=null==w?void 0:w.ownerDocument)&&void 0!==n?n:document,C=(0,i.e)(t,(e=>S(e))),k=(0,r.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,r.useEffect)((()=>{if(h){function e(e){if(k.paused||!w)return;const t=e.target;w.contains(t)?x.current=t:m(x.current,{select:!0,ownerDocument:D})}function t(e){!k.paused&&w&&(w.contains(e.relatedTarget)||m(x.current,{select:!0,ownerDocument:D}))}return D.addEventListener("focusin",e),D.addEventListener("focusout",t),()=>{D.removeEventListener("focusin",e),D.removeEventListener("focusout",t)}}}),[h,w,k.paused,D]),(0,r.useEffect)((()=>{if(w){g.add(k);const t=D.activeElement;if(!w.contains(t)){const n=new CustomEvent(l,u);w.addEventListener(l,P),w.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1,ownerDocument:n=document}={}){const o=n.activeElement;for(const r of e)if(m(r,{select:t,ownerDocument:n}),n.activeElement!==o)return}((e=p(w),e.filter((e=>"A"!==e.tagName))),{select:!0,ownerDocument:D}),D.activeElement===t&&m(w,{ownerDocument:D}))}return()=>{w.removeEventListener(l,P),setTimeout((()=>{const e=new CustomEvent(c,u);w.addEventListener(c,E),w.dispatchEvent(e),e.defaultPrevented||m(null!=t?t:D.body,{select:!0,ownerDocument:D}),w.removeEventListener(c,E),g.remove(k)}),0)}}var e}),[w,D,P,E,k]);const O=(0,r.useCallback)((e=>{if(!d&&!h)return;if(k.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=D.activeElement;if(t&&n){const t=e.currentTarget,[o,r]=function(e){const t=p(e),n=f(t,e),o=f(t.reverse(),e);return[n,o]}(t);o&&r?e.shiftKey||n!==r?e.shiftKey&&n===o&&(e.preventDefault(),d&&m(r,{select:!0,ownerDocument:D})):(e.preventDefault(),d&&m(o,{select:!0,ownerDocument:D})):n===t&&e.preventDefault()}}),[d,h,k.paused,D]);return(0,r.createElement)(a.WV.div,o({tabIndex:-1},b,{ref:C,onKeyDown:O}))}));function p(e){const t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function f(e,t){for(const n of e)if(!h(n,{upTo:t}))return n}function h(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function m(e,{select:t=!1,ownerDocument:n=document}={}){if(e&&e.focus){const o=n.activeElement;e.focus({preventScroll:!0}),e!==o&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const g=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=v(e,t),e.unshift(t)},remove(t){var n;e=v(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function v(e,t){const n=[...e],o=n.indexOf(t);return-1!==o&&n.splice(o,1),n}},69448:(e,t,n)=>{"use strict";var o;n.d(t,{M:()=>l});var r=n(67294),i=n(14805);const a=(o||(o=n.t(r,2)))["useId".toString()]||(()=>{});let s=0;function l(e){const[t,n]=r.useState(a());return(0,i.b)((()=>{e||n((e=>null!=e?e:String(s++)))}),[e]),e||(t?`radix-${t}`:"")}},54941:(e,t,n)=>{"use strict";function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(this,arguments)}n.d(t,{ee:()=>Z,VY:()=>G,h_:()=>V,fC:()=>K,xz:()=>U});var r=n(67294),i=n(53912),a=n(72261),s=n(47257),l=n(48923),c=n(57279),u=n(1788),d=n(69448),p=n(74943),f=n(37103),h=n(83583),m=n(84178),g=n(8145),v=n(16180),y=n(23541),b=n(81066);const w="Popover",[S,P]=(0,s.b)(w,[p.D7]),E=(0,p.D7)(),[x,D]=S(w),C=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,l=E(t),c=(0,r.useRef)(null),[u,f]=(0,r.useState)(!1),[h=!1,m]=(0,v.T)({prop:o,defaultProp:i,onChange:a});return(0,r.createElement)(p.fC,l,(0,r.createElement)(x,{scope:t,contentId:(0,d.M)(),triggerRef:c,open:h,onOpenChange:m,onOpenToggle:(0,r.useCallback)((()=>m((e=>!e))),[m]),hasCustomAnchor:u,onCustomAnchorAdd:(0,r.useCallback)((()=>f(!0)),[]),onCustomAnchorRemove:(0,r.useCallback)((()=>f(!1)),[]),modal:s},n))},k="PopoverAnchor",O=(0,r.forwardRef)(((e,t)=>{const{__scopePopover:n,...i}=e,a=D(k,n),s=E(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:c}=a;return(0,r.useEffect)((()=>(l(),()=>c())),[l,c]),(0,r.createElement)(p.ee,o({},s,i,{ref:t}))})),A="PopoverTrigger",T=(0,r.forwardRef)(((e,t)=>{const{__scopePopover:n,...s}=e,l=D(A,n),c=E(n),u=(0,a.e)(t,l.triggerRef),d=(0,r.createElement)(m.WV.button,o({type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":z(l.open)},s,{ref:u,onClick:(0,i.M)(e.onClick,l.onOpenToggle)}));return l.hasCustomAnchor?d:(0,r.createElement)(p.ee,o({asChild:!0},c),d)})),I="PopoverPortal",[F,M]=S(I,{forceMount:void 0}),_=e=>{const{__scopePopover:t,forceMount:n,children:o,container:i}=e,a=D(I,t);return(0,r.createElement)(F,{scope:t,forceMount:n},(0,r.createElement)(h.z,{present:n||a.open},(0,r.createElement)(f.h,{asChild:!0,container:i},o)))},N="PopoverContent",R=(0,r.forwardRef)(((e,t)=>{const n=M(N,e.__scopePopover),{forceMount:i=n.forceMount,...a}=e,s=D(N,e.__scopePopover);return(0,r.createElement)(h.z,{present:i||s.open},s.modal?(0,r.createElement)(L,o({},a,{ref:t})):(0,r.createElement)(B,o({},a,{ref:t})))})),L=(0,r.forwardRef)(((e,t)=>{const n=D(N,e.__scopePopover),s=(0,r.useRef)(null),l=(0,a.e)(t,s),c=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{const e=s.current;if(e)return(0,y.Ry)(e)}),[]),(0,r.createElement)(b.f,{as:g.g7,allowPinchZoom:!0},(0,r.createElement)(j,o({},e,{ref:l,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,i.M)(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),c.current||null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:(0,i.M)(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,o=2===t.button||n;c.current=o}),{checkForDefaultPrevented:!1}),onFocusOutside:(0,i.M)(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})))})),B=(0,r.forwardRef)(((e,t)=>{const n=D(N,e.__scopePopover),i=(0,r.useRef)(!1);return(0,r.createElement)(j,o({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,r;(null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented)||(i.current||null===(r=n.triggerRef.current)||void 0===r||r.focus(),t.preventDefault());i.current=!1},onInteractOutside:t=>{var o,r;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(i.current=!0);const a=t.target;(null===(r=n.triggerRef.current)||void 0===r?void 0:r.contains(a))&&t.preventDefault()}}))})),j=(0,r.forwardRef)(((e,t)=>{const{__scopePopover:n,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:d,disableOutsidePointerEvents:f,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:v,...y}=e,b=D(N,n),w=E(n),[S,P]=(0,r.useState)(document),x=(0,a.e)(t,(e=>{var t;return P(null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document)}));return(0,c.EW)(S),(0,r.createElement)(u.M,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:d},(0,r.createElement)(l.XB,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:v,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:g,onDismiss:()=>b.onOpenChange(!1)},(0,r.createElement)(p.VY,o({"data-state":z(b.open),role:"dialog",id:b.contentId},w,y,{ref:x,style:{...y.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)"}}))))}));function z(e){return e?"open":"closed"}const K=C,Z=O,U=T,V=_,G=R},74943:(e,t,n)=>{"use strict";function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(this,arguments)}n.d(t,{ee:()=>Ze,Eh:()=>Ve,VY:()=>Ue,fC:()=>Ke,D7:()=>Pe});var r=n(67294);function i(e){return e.split("-")[0]}function a(e){return e.split("-")[1]}function s(e){return["top","bottom"].includes(i(e))?"x":"y"}function l(e){return"y"===e?"height":"width"}function c(e,t,n){let{reference:o,floating:r}=e;const c=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,d=s(t),p=l(d),f=o[p]/2-r[p]/2,h="x"===d;let m;switch(i(t)){case"top":m={x:c,y:o.y-r.height};break;case"bottom":m={x:c,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:u};break;case"left":m={x:o.x-r.width,y:u};break;default:m={x:o.x,y:o.y}}switch(a(t)){case"start":m[d]-=f*(n&&h?-1:1);break;case"end":m[d]+=f*(n&&h?-1:1)}return m}function u(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function d(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function p(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=t,g=u(m),v=s[h?"floating"===f?"reference":"floating":f],y=d(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(v)))||n?v:v.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:p,strategy:l})),b=d(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===f?{...a.floating,x:o,y:r}:a.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),strategy:l}):a[f]);return{top:y.top-b.top+g.top,bottom:b.bottom-y.bottom+g.bottom,left:y.left-b.left+g.left,right:b.right-y.right+g.right}}const f=Math.min,h=Math.max;function m(e,t,n){return h(e,f(t,n))}const g=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:o=0}=null!=e?e:{},{x:r,y:i,placement:c,rects:d,platform:p}=t;if(null==n)return{};const f=u(o),h={x:r,y:i},g=s(c),v=a(c),y=l(g),b=await p.getDimensions(n),w="y"===g?"top":"left",S="y"===g?"bottom":"right",P=d.reference[y]+d.reference[g]-h[g]-d.floating[y],E=h[g]-d.reference[g],x=await(null==p.getOffsetParent?void 0:p.getOffsetParent(n));let D=x?"y"===g?x.clientHeight||0:x.clientWidth||0:0;0===D&&(D=d.floating[y]);const C=P/2-E/2,k=f[w],O=D-b[y]-f[S],A=D/2-b[y]/2+C,T=m(k,A,O),I=("start"===v?f[w]:f[S])>0&&A!==T&&d.reference[y]<=d.floating[y];return{[g]:h[g]-(I?A<k?k-A:O-A:0),data:{[g]:T,centerOffset:A-T}}}}),v={left:"right",right:"left",bottom:"top",top:"bottom"};function y(e){return e.replace(/left|right|bottom|top/g,(e=>v[e]))}function b(e,t,n){void 0===n&&(n=!1);const o=a(e),r=s(e),i=l(r);let c="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(c=y(c)),{main:c,cross:y(c)}}const w={start:"end",end:"start"};function S(e){return e.replace(/start|end/g,(e=>w[e]))}const P=["top","right","bottom","left"],E=(P.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]),function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:o,middlewareData:r,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",flipAlignment:m=!0,...g}=e,v=i(o),w=f||(v!==s&&m?function(e){const t=y(e);return[S(e),t,S(t)]}(s):[y(s)]),P=[s,...w],E=await p(t,g),x=[];let D=(null==(n=r.flip)?void 0:n.overflows)||[];if(u&&x.push(E[v]),d){const{main:e,cross:t}=b(o,a,await(null==l.isRTL?void 0:l.isRTL(c.floating)));x.push(E[e],E[t])}if(D=[...D,{placement:o,overflows:x}],!x.every((e=>e<=0))){var C,k;const e=(null!=(C=null==(k=r.flip)?void 0:k.index)?C:0)+1,t=P[e];if(t)return{data:{index:e,overflows:D},reset:{placement:t}};let n="bottom";switch(h){case"bestFit":{var O;const e=null==(O=D.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:O[0].placement;e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}});function x(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function D(e){return P.some((t=>e[t]>=0))}const C=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){const{rects:o}=e;switch(t){case"referenceHidden":{const t=x(await p(e,{...n,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:D(t)}}}case"escaped":{const t=x(await p(e,{...n,altBoundary:!0}),o.floating);return{data:{escapedOffsets:t,escaped:D(t)}}}default:return{}}}}},k=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,l=await(null==o.isRTL?void 0:o.isRTL(r.floating)),c=i(n),u=a(n),d="x"===s(n),p=["left","top"].includes(c)?-1:1,f=l&&d?-1:1,h="function"==typeof t?t(e):t;let{mainAxis:m,crossAxis:g,alignmentAxis:v}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return u&&"number"==typeof v&&(g="end"===u?-1*v:v),d?{x:g*f,y:m*p}:{x:m*p,y:g*f}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}};function O(e){return"x"===e?"y":"x"}const A=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=e,d={x:n,y:o},f=await p(t,u),h=s(i(r)),g=O(h);let v=d[h],y=d[g];if(a){const e="y"===h?"bottom":"right";v=m(v+f["y"===h?"top":"left"],v,v-f[e])}if(l){const e="y"===g?"bottom":"right";y=m(y+f["y"===g?"top":"left"],y,y-f[e])}const b=c.fn({...t,[h]:v,[g]:y});return{...b,data:{x:b.x-n,y:b.y-o}}}}},T=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:a,middlewareData:l}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=e,p={x:n,y:o},f=s(r),h=O(f);let m=p[f],g=p[h];const v="function"==typeof c?c({...a,placement:r}):c,y="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+y.mainAxis,n=a.reference[f]+a.reference[e]-y.mainAxis;m<t?m=t:m>n&&(m=n)}if(d){var b,w,S,P;const e="y"===f?"width":"height",t=["top","left"].includes(i(r)),n=a.reference[h]-a.floating[e]+(t&&null!=(b=null==(w=l.offset)?void 0:w[h])?b:0)+(t?0:y.crossAxis),o=a.reference[h]+a.reference[e]+(t?0:null!=(S=null==(P=l.offset)?void 0:P[h])?S:0)-(t?y.crossAxis:0);g<n?g=n:g>o&&(g=o)}return{[f]:m,[h]:g}}}};function I(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function F(e){if(null==e)return window;if(!I(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function M(e){return F(e).getComputedStyle(e)}function _(e){return I(e)?"":e?(e.nodeName||"").toLowerCase():""}function N(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function R(e){return e instanceof F(e).HTMLElement}function L(e){return e instanceof F(e).Element}function B(e){return"undefined"!=typeof ShadowRoot&&(e instanceof F(e).ShadowRoot||e instanceof ShadowRoot)}function j(e){const{overflow:t,overflowX:n,overflowY:o}=M(e);return/auto|scroll|overlay|hidden/.test(t+o+n)}function z(e){return["table","td","th"].includes(_(e))}function K(e){const t=/firefox/i.test(N()),n=M(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function Z(){return!/^((?!chrome|android).)*safari/i.test(N())}const U=Math.min,V=Math.max,G=Math.round;function W(e,t,n){var o,r,i,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const s=e.getBoundingClientRect();let l=1,c=1;t&&R(e)&&(l=e.offsetWidth>0&&G(s.width)/e.offsetWidth||1,c=e.offsetHeight>0&&G(s.height)/e.offsetHeight||1);const u=L(e)?F(e):window,d=!Z()&&n,p=(s.left+(d&&null!=(o=null==(r=u.visualViewport)?void 0:r.offsetLeft)?o:0))/l,f=(s.top+(d&&null!=(i=null==(a=u.visualViewport)?void 0:a.offsetTop)?i:0))/c,h=s.width/l,m=s.height/c;return{width:h,height:m,top:f,right:p+h,bottom:f+m,left:p,x:p,y:f}}function q(e){return(t=e,(t instanceof F(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function H(e){return L(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function $(e){return W(q(e)).left+H(e).scrollLeft}function X(e,t,n){const o=R(t),r=q(t),i=W(e,o&&function(e){const t=W(e);return G(t.width)!==e.offsetWidth||G(t.height)!==e.offsetHeight}(t),"fixed"===n);let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==_(t)||j(r))&&(a=H(t)),R(t)){const e=W(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else r&&(s.x=$(r));return{x:i.left+a.scrollLeft-s.x,y:i.top+a.scrollTop-s.y,width:i.width,height:i.height}}function Y(e){return"html"===_(e)?e:e.assignedSlot||e.parentNode||(B(e)?e.host:null)||q(e)}function J(e){return R(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function Q(e){const t=F(e);let n=J(e);for(;n&&z(n)&&"static"===getComputedStyle(n).position;)n=J(n);return n&&("html"===_(n)||"body"===_(n)&&"static"===getComputedStyle(n).position&&!K(n))?t:n||function(e){let t=Y(e);for(B(t)&&(t=t.host);R(t)&&!["html","body"].includes(_(t));){if(K(t))return t;t=t.parentNode}return null}(e)||t}function ee(e){if(R(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=W(e);return{width:t.width,height:t.height}}function te(e){const t=Y(e);return["html","body","#document"].includes(_(t))?e.ownerDocument.body:R(t)&&j(t)?t:te(t)}function ne(e,t){var n;void 0===t&&(t=[]);const o=te(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=F(o),a=r?[i].concat(i.visualViewport||[],j(o)?o:[]):o,s=t.concat(a);return r?s:s.concat(ne(a))}function oe(e,t,n){return"viewport"===t?d(function(e,t){const n=F(e),o=q(e),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,s=0,l=0;if(r){i=r.width,a=r.height;const e=Z();(e||!e&&"fixed"===t)&&(s=r.offsetLeft,l=r.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n)):L(t)?function(e,t){const n=W(e,!1,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft;return{top:o,left:r,x:r,y:o,right:r+e.clientWidth,bottom:o+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):d(function(e){var t;const n=q(e),o=H(e),r=null==(t=e.ownerDocument)?void 0:t.body,i=V(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=V(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let s=-o.scrollLeft+$(e);const l=-o.scrollTop;return"rtl"===M(r||n).direction&&(s+=V(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(q(e)))}function re(e){const t=ne(e),n=["absolute","fixed"].includes(M(e).position)&&R(e)?Q(e):e;return L(n)?t.filter((e=>L(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&B(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==_(e))):[]}const ie={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?re(t):[].concat(n),o],a=i[0],s=i.reduce(((e,n)=>{const o=oe(t,n,r);return e.top=V(o.top,e.top),e.right=U(o.right,e.right),e.bottom=U(o.bottom,e.bottom),e.left=V(o.left,e.left),e}),oe(t,a,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=R(n),i=q(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==_(n)||j(i))&&(a=H(n)),R(n))){const e=W(n,!0);s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:L,getDimensions:ee,getOffsetParent:Q,getDocumentElement:q,getElementRects:e=>{let{reference:t,floating:n,strategy:o}=e;return{reference:X(t,Q(n),o),floating:{...ee(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===M(e).direction};function ae(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=o,l=r&&!s,c=i&&!s,u=l||c?[...L(e)?ne(e):[],...ne(t)]:[];u.forEach((e=>{l&&e.addEventListener("scroll",n,{passive:!0}),c&&e.addEventListener("resize",n)}));let d,p=null;if(a){let o=!0;p=new ResizeObserver((()=>{o||n(),o=!1})),L(e)&&!s&&p.observe(e),p.observe(t)}let f=s?W(e):null;return s&&function t(){const o=W(e);!f||o.x===f.x&&o.y===f.y&&o.width===f.width&&o.height===f.height||n(),f=o,d=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{l&&e.removeEventListener("scroll",n),c&&e.removeEventListener("resize",n)})),null==(e=p)||e.disconnect(),p=null,s&&cancelAnimationFrame(d)}}const se=(e,t,n)=>(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,s=await(null==a.isRTL?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=c(l,o,s),p=o,f={},h=0;for(let n=0;n<i.length;n++){const{name:m,fn:g}=i[n],{x:v,y,data:b,reset:w}=await g({x:u,y:d,initialPlacement:o,placement:p,strategy:r,middlewareData:f,rects:l,platform:a,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=y?y:d,f={...f,[m]:{...f[m],...b}},w&&h<=50&&(h++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(l=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:r}):w.rects),({x:u,y:d}=c(l,p,s))),n=-1)}return{x:u,y:d,placement:p,strategy:r,middlewareData:f}})(e,t,{platform:ie,...n});var le=n(73935),ce="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function ue(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=n;0!=o--;)if(!ue(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,r[o]))return!1;for(o=n;0!=o--;){const n=r[o];if(("_owner"!==n||!e.$$typeof)&&!ue(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function de(e){let{middleware:t,placement:n="bottom",strategy:o="absolute",whileElementsMounted:i}=void 0===e?{}:e;const a=r.useRef(null),s=r.useRef(null),l=function(e){const t=r.useRef(e);return ce((()=>{t.current=e})),t}(i),c=r.useRef(null),[u,d]=r.useState({x:null,y:null,strategy:o,placement:n,middlewareData:{}}),[p,f]=r.useState(t);ue(null==p?void 0:p.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||f(t);const h=r.useCallback((()=>{a.current&&s.current&&se(a.current,s.current,{middleware:p,placement:n,strategy:o}).then((e=>{m.current&&le.flushSync((()=>{d(e)}))}))}),[p,n,o]);ce((()=>{m.current&&h()}),[h]);const m=r.useRef(!1);ce((()=>(m.current=!0,()=>{m.current=!1})),[]);const g=r.useCallback((()=>{if("function"==typeof c.current&&(c.current(),c.current=null),a.current&&s.current)if(l.current){const e=l.current(a.current,s.current,h);c.current=e}else h()}),[h,l]),v=r.useCallback((e=>{a.current=e,g()}),[g]),y=r.useCallback((e=>{s.current=e,g()}),[g]),b=r.useMemo((()=>({reference:a,floating:s})),[]);return r.useMemo((()=>({...u,update:h,refs:b,reference:v,floating:y})),[u,h,b,v,y])}const pe=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn(e){return o=t,Object.prototype.hasOwnProperty.call(o,"current")?null!=t.current?g({element:t.current,padding:n}).fn(e):{}:t?g({element:t,padding:n}).fn(e):{};var o}}};function fe(){return fe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},fe.apply(this,arguments)}var he=n(84178);const me=(0,r.forwardRef)(((e,t)=>{const{children:n,width:o=10,height:i=5,...a}=e;return(0,r.createElement)(he.WV.svg,fe({},a,{ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:(0,r.createElement)("polygon",{points:"0,0 30,0 15,10"}))})),ge=me;var ve=n(72261),ye=n(47257),be=n(14805);const we="Popper",[Se,Pe]=(0,ye.b)(we),[Ee,xe]=Se(we),De=e=>{const{__scopePopper:t,children:n}=e,[o,i]=(0,r.useState)(null);return(0,r.createElement)(Ee,{scope:t,anchor:o,onAnchorChange:i},n)},Ce="PopperAnchor",ke=(0,r.forwardRef)(((e,t)=>{const{__scopePopper:n,virtualRef:i,...a}=e,s=xe(Ce,n),l=(0,r.useRef)(null),c=(0,ve.e)(t,l);return(0,r.useEffect)((()=>{s.onAnchorChange((null==i?void 0:i.current)||l.current)})),i?null:(0,r.createElement)(he.WV.div,o({},a,{ref:c}))})),Oe="PopperContent",[Ae,Te]=Se(Oe),[Ie,Fe]=Se(Oe,{hasParent:!1,positionUpdateFns:new Set}),Me=(0,r.forwardRef)(((e,t)=>{var n,o,i,a,s,l,c,u;const{__scopePopper:d,side:p="bottom",sideOffset:f=0,align:h="center",alignOffset:m=0,arrowPadding:g=0,collisionBoundary:v=[],collisionPadding:y=0,sticky:b="partial",hideWhenDetached:w=!1,avoidCollisions:S=!0,...P}=e,x=xe(Oe,d),[D,O]=(0,r.useState)(null),I=(0,ve.e)(t,(e=>O(e))),[F,M]=(0,r.useState)(null),_=function(e){const[t,n]=(0,r.useState)(void 0);return(0,be.b)((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const o=t[0];let r,i;if("borderBoxSize"in o){const e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,i=t.blockSize}else r=e.offsetWidth,i=e.offsetHeight;n({width:r,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(F),N=null!==(n=null==_?void 0:_.width)&&void 0!==n?n:0,R=null!==(o=null==_?void 0:_.height)&&void 0!==o?o:0,L=p+("center"!==h?"-"+h:""),B="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},j=Array.isArray(v)?v:[v],z=j.length>0,K={padding:B,boundary:j.filter(Be),altBoundary:z},{reference:Z,floating:U,strategy:V,x:G,y:W,placement:q,middlewareData:H,update:$}=de({strategy:"fixed",placement:L,whileElementsMounted:ae,middleware:[k({mainAxis:f+R,alignmentAxis:m}),S?A({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?T():void 0,...K}):void 0,F?pe({element:F,padding:g}):void 0,S?E({...K}):void 0,je({arrowWidth:N,arrowHeight:R}),w?C({strategy:"referenceHidden"}):void 0].filter(Le)});(0,be.b)((()=>{Z(x.anchor)}),[Z,x.anchor]);const X=null!==G&&null!==W,[Y,J]=ze(q),Q=null===(i=H.arrow)||void 0===i?void 0:i.x,ee=null===(a=H.arrow)||void 0===a?void 0:a.y,te=0!==(null===(s=H.arrow)||void 0===s?void 0:s.centerOffset),[ne,oe]=(0,r.useState)();(0,be.b)((()=>{if(D){var e;const t=null!==(e=D.ownerDocument.defaultView)&&void 0!==e?e:window;oe(t.getComputedStyle(D).zIndex)}}),[D]);const{hasParent:re,positionUpdateFns:ie}=Fe(Oe,d),se=!re;(0,r.useLayoutEffect)((()=>{if(!se)return ie.add($),()=>{ie.delete($)}}),[se,ie,$]),(0,r.useLayoutEffect)((()=>{se&&X&&Array.from(ie).reverse().forEach((e=>requestAnimationFrame(e)))}),[se,X,ie]);const le={"data-side":Y,"data-align":J,...P,ref:I,style:{...P.style,animation:X?void 0:"none",opacity:null!==(l=H.hide)&&void 0!==l&&l.referenceHidden?0:void 0}};return(0,r.createElement)("div",{ref:U,"data-radix-popper-content-wrapper":"",style:{position:V,left:0,top:0,transform:X?`translate3d(${Math.round(G)}px, ${Math.round(W)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[null===(c=H.transformOrigin)||void 0===c?void 0:c.x,null===(u=H.transformOrigin)||void 0===u?void 0:u.y].join(" ")}},(0,r.createElement)(Ae,{scope:d,placedSide:Y,onArrowChange:M,arrowX:Q,arrowY:ee,shouldHideArrow:te},se?(0,r.createElement)(Ie,{scope:d,hasParent:!0,positionUpdateFns:ie},(0,r.createElement)(he.WV.div,le)):(0,r.createElement)(he.WV.div,le)))})),_e="PopperArrow",Ne={top:"bottom",right:"left",bottom:"top",left:"right"},Re=(0,r.forwardRef)((function(e,t){const{__scopePopper:n,...i}=e,a=Te(_e,n),s=Ne[a.placedSide];return(0,r.createElement)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0}},(0,r.createElement)(ge,o({},i,{ref:t,style:{...i.style,display:"block"}})))}));function Le(e){return void 0!==e}function Be(e){return null!==e}const je=e=>({name:"transformOrigin",options:e,fn(t){var n,o,r,i,a;const{placement:s,rects:l,middlewareData:c}=t,u=0!==(null===(n=c.arrow)||void 0===n?void 0:n.centerOffset),d=u?0:e.arrowWidth,p=u?0:e.arrowHeight,[f,h]=ze(s),m={start:"0%",center:"50%",end:"100%"}[h],g=(null!==(o=null===(r=c.arrow)||void 0===r?void 0:r.x)&&void 0!==o?o:0)+d/2,v=(null!==(i=null===(a=c.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+p/2;let y="",b="";return"bottom"===f?(y=u?m:`${g}px`,b=-p+"px"):"top"===f?(y=u?m:`${g}px`,b=`${l.floating.height+p}px`):"right"===f?(y=-p+"px",b=u?m:`${v}px`):"left"===f&&(y=`${l.floating.width+p}px`,b=u?m:`${v}px`),{data:{x:y,y:b}}}});function ze(e){const[t,n="center"]=e.split("-");return[t,n]}const Ke=De,Ze=ke,Ue=Me,Ve=Re},37103:(e,t,n)=>{"use strict";function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(this,arguments)}n.d(t,{h:()=>s});var r=n(67294),i=n(73935),a=n(84178);const s=(0,r.forwardRef)(((e,t)=>{var n;const{container:s=(null===globalThis||void 0===globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...l}=e;return s?i.createPortal((0,r.createElement)(a.WV.div,o({},l,{ref:t})),s):null}))},83583:(e,t,n)=>{"use strict";n.d(t,{z:()=>s});var o=n(67294),r=n(73935),i=n(72261),a=n(14805);const s=e=>{const{present:t,children:n}=e,s=function(e){const[t,n]=(0,o.useState)(),i=(0,o.useRef)({}),s=(0,o.useRef)(e),c=(0,o.useRef)("none"),u=e?"mounted":"unmounted",[d,p]=function(e,t){return(0,o.useReducer)(((e,n)=>{const o=t[e][n];return null!=o?o:e}),e)}(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return(0,o.useEffect)((()=>{const e=l(i.current);c.current="mounted"===d?e:"none"}),[d]),(0,a.b)((()=>{const t=i.current,n=s.current;if(n!==e){const o=c.current,r=l(t);if(e)p("MOUNT");else if("none"===r||"none"===(null==t?void 0:t.display))p("UNMOUNT");else{const e=o!==r;p(n&&e?"ANIMATION_OUT":"UNMOUNT")}s.current=e}}),[e,p]),(0,a.b)((()=>{if(t){const e=e=>{const n=l(i.current).includes(e.animationName);e.target===t&&n&&(0,r.flushSync)((()=>p("ANIMATION_END")))},n=e=>{e.target===t&&(c.current=l(i.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}p("ANIMATION_END")}),[t,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:(0,o.useCallback)((e=>{e&&(i.current=getComputedStyle(e)),n(e)}),[])}}(t),c="function"==typeof n?n({present:s.isPresent}):o.Children.only(n),u=(0,i.e)(s.ref,c.ref);return"function"==typeof n||s.isPresent?(0,o.cloneElement)(c,{ref:u}):null};function l(e){return(null==e?void 0:e.animationName)||"none"}s.displayName="Presence"},84178:(e,t,n)=>{"use strict";function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(this,arguments)}n.d(t,{WV:()=>s,jH:()=>l});var r=n(67294),i=n(73935),a=n(8145);const s=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=(0,r.forwardRef)(((e,n)=>{const{asChild:i,...s}=e,l=i?a.g7:t;return(0,r.useEffect)((()=>{window[Symbol.for("radix-ui")]=!0}),[]),(0,r.createElement)(l,o({},s,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function l(e,t){e&&(0,i.flushSync)((()=>e.dispatchEvent(t)))}},20026:(e,t,n)=>{"use strict";function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(this,arguments)}n.d(t,{ck:()=>I,fC:()=>T,Pc:()=>S});var r=n(67294),i=n(53912),a=n(21286),s=n(72261),l=n(47257),c=n(69448),u=n(84178),d=n(88751),p=n(16180),f=n(69409);const h="rovingFocusGroup.onEntryFocus",m={bubbles:!1,cancelable:!0},g="RovingFocusGroup",[v,y,b]=(0,a.B)(g),[w,S]=(0,l.b)(g,[b]),[P,E]=w(g),x=(0,r.forwardRef)(((e,t)=>(0,r.createElement)(v.Provider,{scope:e.__scopeRovingFocusGroup},(0,r.createElement)(v.Slot,{scope:e.__scopeRovingFocusGroup},(0,r.createElement)(D,o({},e,{ref:t})))))),D=(0,r.forwardRef)(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:l=!1,dir:c,currentTabStopId:g,defaultCurrentTabStopId:v,onCurrentTabStopIdChange:b,onEntryFocus:w,...S}=e,E=(0,r.useRef)(null),x=(0,s.e)(t,E),D=(0,f.gm)(c),[C=null,k]=(0,p.T)({prop:g,defaultProp:v,onChange:b}),[O,T]=(0,r.useState)(!1),I=(0,d.W)(w),F=y(n),M=(0,r.useRef)(!1),[_,N]=(0,r.useState)(0),[R,L]=(0,r.useState)(document);return(0,r.useEffect)((()=>{const e=E.current;if(e)return L(e.ownerDocument),e.addEventListener(h,I),()=>e.removeEventListener(h,I)}),[I]),(0,r.createElement)(P,{scope:n,orientation:a,dir:D,loop:l,currentTabStopId:C,onItemFocus:(0,r.useCallback)((e=>k(e)),[k]),onItemShiftTab:(0,r.useCallback)((()=>T(!0)),[]),onFocusableItemAdd:(0,r.useCallback)((()=>N((e=>e+1))),[]),onFocusableItemRemove:(0,r.useCallback)((()=>N((e=>e-1))),[])},(0,r.createElement)(u.WV.div,o({tabIndex:O||0===_?-1:0,"data-orientation":a},S,{ref:x,style:{outline:"none",...e.style},onMouseDown:(0,i.M)(e.onMouseDown,(()=>{M.current=!0})),onFocus:(0,i.M)(e.onFocus,(e=>{const t=!M.current;if(e.target===e.currentTarget&&t&&!O){const t=new CustomEvent(h,m);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=F().filter((e=>e.focusable));A([e.find((e=>e.active)),e.find((e=>e.id===C)),...e].filter(Boolean).map((e=>e.ref.current)),R)}}M.current=!1})),onBlur:(0,i.M)(e.onBlur,(()=>T(!1)))})))})),C="RovingFocusGroupItem",k=(0,r.forwardRef)(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:l=!1,...d}=e,p=(0,c.M)(),f=E(C,n),h=f.currentTabStopId===p,m=y(n),[g,b]=(0,r.useState)(document),w=(0,s.e)(t,(e=>{var t;return b(null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document)})),{onFocusableItemAdd:S,onFocusableItemRemove:P}=f;return(0,r.useEffect)((()=>{if(a)return S(),()=>P()}),[a,S,P]),(0,r.createElement)(v.ItemSlot,{scope:n,id:p,focusable:a,active:l},(0,r.createElement)(u.WV.span,o({tabIndex:h?0:-1,"data-orientation":f.orientation},d,{ref:w,onMouseDown:(0,i.M)(e.onMouseDown,(e=>{a?f.onItemFocus(p):e.preventDefault()})),onFocus:(0,i.M)(e.onFocus,(()=>f.onItemFocus(p))),onKeyDown:(0,i.M)(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void f.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const o=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(o)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(o)?void 0:O[o]}(e,f.orientation,f.dir);if(void 0!==t){e.preventDefault();let r=m().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();const i=r.indexOf(e.currentTarget);r=f.loop?(o=i+1,(n=r).map(((e,t)=>n[(o+t)%n.length]))):r.slice(i+1)}setTimeout((()=>A(r,g)))}var n,o}))})))})),O={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function A(e,t=document){const n=t.activeElement;for(const o of e){if(o===n)return;if(o.focus(),t.activeElement!==n)return}}const T=x,I=k},8145:(e,t,n)=>{"use strict";function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(this,arguments)}n.d(t,{g7:()=>a});var r=n(67294),i=n(72261);const a=(0,r.forwardRef)(((e,t)=>{const{children:n,...i}=e,a=r.Children.toArray(n),l=a.find(c);if(l){const e=l.props.children,n=a.map((t=>t===l?r.Children.count(e)>1?r.Children.only(null):(0,r.isValidElement)(e)?e.props.children:null:t));return(0,r.createElement)(s,o({},i,{ref:t}),(0,r.isValidElement)(e)?(0,r.cloneElement)(e,void 0,n):null)}return(0,r.createElement)(s,o({},i,{ref:t}),n)}));a.displayName="Slot";const s=(0,r.forwardRef)(((e,t)=>{const{children:n,...o}=e;return(0,r.isValidElement)(n)?(0,r.cloneElement)(n,{...u(o,n.props),ref:(0,i.F)(t,n.ref)}):r.Children.count(n)>1?r.Children.only(null):null}));s.displayName="SlotClone";const l=({children:e})=>(0,r.createElement)(r.Fragment,null,e);function c(e){return(0,r.isValidElement)(e)&&e.type===l}function u(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...e)=>{i(...e),r(...e)}:r&&(n[o]=r):"style"===o?n[o]={...r,...i}:"className"===o&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}},88751:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});var o=n(67294);function r(e){const t=(0,o.useRef)(e);return(0,o.useEffect)((()=>{t.current=e})),(0,o.useMemo)((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}},16180:(e,t,n)=>{"use strict";n.d(t,{T:()=>i});var o=n(67294),r=n(88751);function i({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[i,a]=function({defaultProp:e,onChange:t}){const n=(0,o.useState)(e),[i]=n,a=(0,o.useRef)(i),s=(0,r.W)(t);return(0,o.useEffect)((()=>{a.current!==i&&(s(i),a.current=i)}),[i,a,s]),n}({defaultProp:t,onChange:n}),s=void 0!==e,l=s?e:i,c=(0,r.W)(n);return[l,(0,o.useCallback)((t=>{if(s){const n=t,o="function"==typeof t?n(e):t;o!==e&&c(o)}else a(t)}),[s,e,a,c])]}},14805:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var o=n(67294);const r=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?o.useLayoutEffect:()=>{}},23541:(e,t,n)=>{"use strict";n.d(t,{Ry:()=>u});var o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},r=new WeakMap,i=new WeakMap,a={},s=0,l=function(e){return e&&(e.host||l(e.parentNode))},c=function(e,t,n,o){var c=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=l(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);a[n]||(a[n]=new WeakMap);var u=a[n],d=[],p=new Set,f=new Set(c),h=function(e){e&&!p.has(e)&&(p.add(e),h(e.parentNode))};c.forEach(h);var m=function(e){e&&!f.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(p.has(e))m(e);else{var t=e.getAttribute(o),a=null!==t&&"false"!==t,s=(r.get(e)||0)+1,l=(u.get(e)||0)+1;r.set(e,s),u.set(e,l),d.push(e),1===s&&a&&i.set(e,!0),1===l&&e.setAttribute(n,"true"),a||e.setAttribute(o,"true")}}))};return m(t),p.clear(),s++,function(){d.forEach((function(e){var t=r.get(e)-1,a=u.get(e)-1;r.set(e,t),u.set(e,a),t||(i.has(e)||e.removeAttribute(o),i.delete(e)),a||e.removeAttribute(n)})),--s||(r=new WeakMap,r=new WeakMap,i=new WeakMap,a={})}},u=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||o(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),c(r,i,n,"aria-hidden")):function(){return null}}},10531:(e,t)=>{"use strict";function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}Object.defineProperty(t,"__esModule",{value:!0}),t.OptionsReader=void 0;var o=function(){function e(t,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.ownerDocument=null,this.enableTouchEvents=!0,this.enableMouseEvents=!1,this.enableKeyboardEvents=!1,this.ignoreContextMenu=!1,this.enableHoverOutsideTarget=!1,this.touchSlop=0,this.scrollAngleRanges=void 0,this.context=n,this.delayTouchStart=t.delayTouchStart||t.delay||0,this.delayMouseStart=t.delayMouseStart||t.delay||0,Object.keys(t).forEach((function(e){null!=t[e]&&(o[e]=t[e])}))}var t,o,r;return t=e,(o=[{key:"window",get:function(){return this.context&&this.context.window?this.context.window:"undefined"!=typeof window?window:void 0}},{key:"document",get:function(){return this.ownerDocument?this.ownerDocument:this.window?this.window.document:void 0}}])&&n(t.prototype,o),r&&n(t,r),e}();t.OptionsReader=o},6901:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TouchBackendImpl=void 0;var o,r=n(685),i=n(7584),a=n(52355),s=n(60814),l=n(39751),c=n(47473),u=n(10531);function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=(p(o={},i.ListenerType.mouse,{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"}),p(o,i.ListenerType.touch,{start:"touchstart",move:"touchmove",end:"touchend"}),p(o,i.ListenerType.keyboard,{keydown:"keydown"}),o),h=function(){function e(t,n,o){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.lastClientOffset=null,this.lastDragOverTargetIds=null,this.updateTimer=null,this.getSourceClientOffset=function(e){var t=r.sourceNodes.get(e);return t&&(0,s.getNodeClientOffset)(t)},this.handleTopMoveStartCapture=function(e){(0,a.eventShouldStartDrag)(e)&&(r.moveStartSourceIds=[])},this.handleMoveStart=function(e){Array.isArray(r.moveStartSourceIds)&&r.moveStartSourceIds.unshift(e)},this.handleTopMoveStart=function(e){if((0,a.eventShouldStartDrag)(e)){var t=(0,s.getEventClientOffset)(e);if(t){(0,a.isTouchEvent)(e)&&(r.lastTargetTouchFallback=e.targetTouches[0]),r._mouseClientOffset=t;var n=e.type===f.touch.start?r.options.delayTouchStart:r.options.delayMouseStart;if(!r.monitor.isDragging()&&r.waitingForDelay&&n>0){var o=r.moveStartSourceIds;r.actions.beginDrag(o,{clientOffset:r._mouseClientOffset,getSourceClientOffset:r.getSourceClientOffset,publishSource:!1})}}r.waitingForDelay=!1}},this.handleTopMoveStartDelay=function(e){if((0,a.eventShouldStartDrag)(e)){var t=e.type===f.touch.start?r.options.delayTouchStart:r.options.delayMouseStart;r.timeout=setTimeout(r.handleTopMoveStart.bind(r,e),t),r.waitingForDelay=!0}},this.handleTopMoveCapture=function(){r.dragOverTargetIds=[]},this.handleMove=function(e,t){r.dragOverTargetIds&&r.dragOverTargetIds.unshift(t)},this.handleTopMove=function(e){if(r.document&&!r.waitingForDelay){r.timeout&&clearTimeout(r.timeout);var t=r.moveStartSourceIds,n=r.dragOverTargetIds,o=r.options.enableHoverOutsideTarget,i=(0,s.getEventClientOffset)(e,r.lastTargetTouchFallback);if(i)if(r._isScrolling||!r.monitor.isDragging()&&(0,l.inAngleRanges)(r._mouseClientOffset.x||0,r._mouseClientOffset.y||0,i.x,i.y,r.options.scrollAngleRanges))r._isScrolling=!0;else if(!r.monitor.isDragging()&&r._mouseClientOffset.hasOwnProperty("x")&&t&&(0,l.distance)(r._mouseClientOffset.x||0,r._mouseClientOffset.y||0,i.x,i.y)>(r.options.touchSlop?r.options.touchSlop:0)&&(r.moveStartSourceIds=void 0,r.actions.beginDrag(t,{clientOffset:r._mouseClientOffset,getSourceClientOffset:r.getSourceClientOffset,publishSource:!1})),r.monitor.isDragging()){var a=r.sourceNodes.get(r.monitor.getSourceId());r.installSourceNodeRemovalObserver(a),r.actions.publishDragSource(),e.cancelable&&e.preventDefault();var c=(n||[]).map((function(e){return r.targetNodes.get(e)})).filter((function(e){return!!e})),u=r.options.getDropTargetElementsAtPoint?r.options.getDropTargetElementsAtPoint(i.x,i.y,c):r.document.elementsFromPoint(i.x,i.y),d=[];for(var p in u)if(u.hasOwnProperty(p)){var f=u[p];for(d.push(f);f;)(f=f.parentElement)&&-1===d.indexOf(f)&&d.push(f)}var h=d.filter((function(e){return c.indexOf(e)>-1})).map((function(e){return r._getDropTargetId(e)})).filter((function(e){return!!e})).filter((function(e,t,n){return n.indexOf(e)===t}));if(o)for(var m in r.targetNodes){var g=r.targetNodes.get(m);if(a&&g&&g.contains(a)&&-1===h.indexOf(m)){h.unshift(m);break}}if(r.lastDragOverTargetIds=h.reverse(),r.lastClientOffset=i,!r.updateTimer){var v=function e(){r.monitor.isDragging()&&(r.actions.hover(r.lastDragOverTargetIds,{clientOffset:r.lastClientOffset}),r.updateTimer=requestAnimationFrame(e))};r.updateTimer=requestAnimationFrame((function(){v()}))}}}},this._getDropTargetId=function(e){for(var t=r.targetNodes.keys(),n=t.next();!1===n.done;){var o=n.value;if(e===r.targetNodes.get(o))return o;n=t.next()}},this.handleTopMoveEndCapture=function(e){r._isScrolling=!1,r.lastTargetTouchFallback=void 0,(0,a.eventShouldEndDrag)(e)&&(r.monitor.isDragging()&&!r.monitor.didDrop()?(e.cancelable&&e.preventDefault(),r._mouseClientOffset={},r.uninstallSourceNodeRemovalObserver(),r.actions.drop(),r.actions.endDrag(),r.updateTimer&&cancelAnimationFrame(r.updateTimer),r.updateTimer=null):r.moveStartSourceIds=void 0)},this.handleCancelOnEscape=function(e){"Escape"===e.key&&r.monitor.isDragging()&&(r._mouseClientOffset={},r.uninstallSourceNodeRemovalObserver(),r.actions.endDrag())},this.options=new u.OptionsReader(o,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(i.ListenerType.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(i.ListenerType.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(i.ListenerType.keyboard)}var t,n,o;return t=e,(n=[{key:"profile",value:function(){var e;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:(null===(e=this.dragOverTargetIds)||void 0===e?void 0:e.length)||0}}},{key:"setup",value:function(){this.document&&((0,r.invariant)(!e.isSetUp,"Cannot have two Touch backends at the same time."),e.isSetUp=!0,this.addEventListener(this.document,"start",this.getTopMoveStartHandler()),this.addEventListener(this.document,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(this.document,"move",this.handleTopMove),this.addEventListener(this.document,"move",this.handleTopMoveCapture,!0),this.addEventListener(this.document,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(this.document,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(this.document,"keydown",this.handleCancelOnEscape,!0))}},{key:"teardown",value:function(){this.document&&(e.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(this.document,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(this.document,"start",this.handleTopMoveStart),this.removeEventListener(this.document,"move",this.handleTopMoveCapture,!0),this.removeEventListener(this.document,"move",this.handleTopMove),this.removeEventListener(this.document,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(this.document,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(this.document,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}},{key:"throttle",value:function(e,t){var n=!1;return function(o){n||(e(o),n=!0,setTimeout((function(){n=!1}),t))}}},{key:"addEventListener",value:function(e,t,n,o){var r=c.supportsPassive?{capture:o,passive:!1}:o,i=this.throttle(n,50);this.listenerTypes.forEach((function(n){var o=f[n][t];o&&e.addEventListener(o,i,r)}))}},{key:"removeEventListener",value:function(e,t,n,o){var r=c.supportsPassive?{capture:o,passive:!1}:o;this.listenerTypes.forEach((function(o){var i=f[o][t];i&&e.removeEventListener(i,n,r)}))}},{key:"connectDragSource",value:function(e,t){var n=this,o=this.handleMoveStart.bind(this,e);return this.sourceNodes.set(e,t),this.addEventListener(t,"start",o),function(){n.sourceNodes.delete(e),n.removeEventListener(t,"start",o)}}},{key:"connectDragPreview",value:function(e,t,n){var o=this;return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),function(){o.sourcePreviewNodes.delete(e),o.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDropTarget",value:function(e,t){var n=this;if(!this.document)return function(){};var o=function(o){if(n.document&&n.monitor.isDragging()){var r;switch(o.type){case f.mouse.move:r={x:o.clientX,y:o.clientY};break;case f.touch.move:r={x:o.touches[0].clientX,y:o.touches[0].clientY}}var i=null!=r?n.document.elementFromPoint(r.x,r.y):void 0,a=i&&t.contains(i);return i===t||a?n.handleMove(o,e):void 0}};return this.addEventListener(this.document.body,"move",o),this.targetNodes.set(e,t),function(){n.document&&(n.targetNodes.delete(e),n.removeEventListener(n.document.body,"move",o))}}},{key:"getTopMoveStartHandler",value:function(){return this.options.delayTouchStart||this.options.delayMouseStart?this.handleTopMoveStartDelay:this.handleTopMoveStart}},{key:"installSourceNodeRemovalObserver",value:function(e){var t=this;this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=e,this.draggedSourceNodeRemovalObserver=new MutationObserver((function(){e&&!e.parentElement&&(t.resurrectSourceNode(),t.uninstallSourceNodeRemovalObserver())})),e&&e.parentElement&&this.draggedSourceNodeRemovalObserver.observe(e.parentElement,{childList:!0})}},{key:"resurrectSourceNode",value:function(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}},{key:"uninstallSourceNodeRemovalObserver",value:function(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}},{key:"document",get:function(){return this.options.document}}])&&d(t.prototype,n),o&&d(t,o),e}();t.TouchBackendImpl=h},71634:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o={TouchBackend:!0};t.TouchBackend=void 0;var r=n(6901);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));t.TouchBackend=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new r.TouchBackendImpl(e,t,n)}},7584:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ListenerType=void 0,t.ListenerType=n,function(e){e.mouse="mouse",e.touch="touch",e.keyboard="keyboard"}(n||(t.ListenerType=n={}))},39751:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distance=function(e,t,n,o){return Math.sqrt(Math.pow(Math.abs(n-e),2)+Math.pow(Math.abs(o-t),2))},t.inAngleRanges=function(e,t,n,o,r){if(!r)return!1;for(var i=180*Math.atan2(o-t,n-e)/Math.PI+180,a=0;a<r.length;++a)if((null==r[a].start||i>=r[a].start)&&(null==r[a].end||i<=r[a].end))return!0;return!1}},60814:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeClientOffset=function(e){var t=1===e.nodeType?e:e.parentElement;if(!t)return;var n=t.getBoundingClientRect(),o=n.top;return{x:n.left,y:o}},t.getEventClientTouchOffset=r,t.getEventClientOffset=i;var o=n(52355);function r(e,t){return 1===e.targetTouches.length?i(e.targetTouches[0]):t&&1===e.touches.length&&e.touches[0].target===t.target?i(e.touches[0]):void 0}function i(e,t){return(0,o.isTouchEvent)(e)?r(e,t):{x:e.clientX,y:e.clientY}}},52355:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.eventShouldStartDrag=function(e){return void 0===e.button||e.button===o},t.eventShouldEndDrag=function(e){return void 0===e.buttons||0==(e.buttons&n)},t.isTouchEvent=function(e){return!!e.targetTouches};var n=1,o=0},47473:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsPassive=void 0;var n=function(){var e=!1;try{addEventListener("test",(function(){}),Object.defineProperty({},"passive",{get:function(){return e=!0,!0}}))}catch(e){}return e}();t.supportsPassive=n},685:(e,t,n)=>{"use strict";function o(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];if(!e){var i;if(void 0===t)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;(i=new Error(t.replace(/%s/g,(function(){return o[a++]})))).name="Invariant Violation"}throw i.framesToPop=1,i}}n.r(t),n.d(t,{invariant:()=>o})},79153:(e,t,n)=>{"use strict";n.d(t,{WG:()=>Ie,c0:()=>ot,f$:()=>rt,LW:()=>lt});var o=n(67294);const r=(0,o.createContext)({dragDropManager:void 0});var i=n(85893),a=n(40230);function s(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];if(l()&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let n=0;e=new Error(t.replace(/%s/g,(function(){return o[n++]}))),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function l(){return"undefined"!=typeof process&&!0}function c(e,t,n){return t.split(".").reduce(((e,t)=>e&&e[t]?e[t]:n||null),e)}function u(e,t){return e.filter((e=>e!==t))}function d(e){return"object"==typeof e}function p(e,t){const n=new Map,o=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(o),t.forEach(o);const r=[];return n.forEach(((e,t)=>{1===e&&r.push(t)})),r}const f="dnd-core/INIT_COORDS",h="dnd-core/BEGIN_DRAG",m="dnd-core/PUBLISH_DRAG_SOURCE",g="dnd-core/HOVER",v="dnd-core/DROP",y="dnd-core/END_DRAG";function b(e,t){return{type:f,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const w={type:f,payload:{clientOffset:null,sourceClientOffset:null}};function S(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0};const{publishSource:o=!0,clientOffset:r,getSourceClientOffset:i}=n,a=e.getMonitor(),s=e.getRegistry();e.dispatch(b(r)),P(t,a,s);const l=D(t,a);if(null==l)return void e.dispatch(w);let c=null;if(r){if(!i)throw new Error("getSourceClientOffset must be defined");E(i),c=i(l)}e.dispatch(b(r,c));const u=s.getSource(l),d=u.beginDrag(a,l);if(null==d)return;x(d),s.pinSource(l);const p=s.getSourceType(l);return{type:h,payload:{itemType:p,item:d,sourceId:l,clientOffset:r||null,sourceClientOffset:c||null,isSourcePublic:!!o}}}}function P(e,t,n){s(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){s(n.getSource(e),"Expected sourceIds to be registered.")}))}function E(e){s("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}function x(e){s(d(e),"Item must be an object.")}function D(e,t){let n=null;for(let o=e.length-1;o>=0;o--)if(t.canDragSource(e[o])){n=e[o];break}return n}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){C(e,t,n[t])}))}return e}function O(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=e.getMonitor(),o=e.getRegistry();A(n);const r=I(n);r.forEach(((r,i)=>{const a=T(r,i,o,n),s={type:v,payload:{dropResult:k({},t,a)}};e.dispatch(s)}))}}function A(e){s(e.isDragging(),"Cannot call drop while not dragging."),s(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function T(e,t,n,o){const r=n.getTarget(e);let i=r?r.drop(o,e):void 0;return function(e){s(void 0===e||d(e),"Drop result must either be an object or undefined.")}(i),void 0===i&&(i=0===t?{}:o.getDropResult()),i}function I(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function F(e){return function(){const t=e.getMonitor(),n=e.getRegistry();!function(e){s(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const o=t.getSourceId();if(null!=o){n.getSource(o,!0).endDrag(t,o),n.unpinSource()}return{type:y}}}function M(e,t){return null===t?null===e:Array.isArray(e)?e.some((e=>e===t)):e===t}function _(e){return function(t){let{clientOffset:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};N(t);const o=t.slice(0),r=e.getMonitor(),i=e.getRegistry(),a=r.getItemType();return L(o,i,a),R(o,r,i),B(o,r,i),{type:g,payload:{targetIds:o,clientOffset:n||null}}}}function N(e){s(Array.isArray(e),"Expected targetIds to be an array.")}function R(e,t,n){s(t.isDragging(),"Cannot call hover while not dragging."),s(!t.didDrop(),"Cannot call hover after drop.");for(let t=0;t<e.length;t++){const o=e[t];s(e.lastIndexOf(o)===t,"Expected targetIds to be unique in the passed array.");s(n.getTarget(o),"Expected targetIds to be registered.")}}function L(e,t,n){for(let o=e.length-1;o>=0;o--){const r=e[o];M(t.getTargetType(r),n)||e.splice(o,1)}}function B(e,t,n){e.forEach((function(e){n.getTarget(e).hover(t,e)}))}function j(e){return function(){if(e.getMonitor().isDragging())return{type:m}}}class z{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store;const n=function(e){return{beginDrag:S(e),publishDragSource:j(e),hover:_(e),drop:O(e),endDrag:F(e)}}(this);return Object.keys(n).reduce(((o,r)=>{const i=n[r];var a;return o[r]=(a=i,function(){for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];const i=a.apply(e,o);void 0!==i&&t(i)}),o}),{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}}function K(e,t){return{x:e.x-t.x,y:e.y-t.y}}const Z=[],U=[];Z.__IS_NONE__=!0,U.__IS_ALL__=!0;class V{subscribeToStateChange(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{handlerIds:n}=t;s("function"==typeof e,"listener must be a function."),s(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let o=this.store.getState().stateId;return this.store.subscribe((()=>{const t=this.store.getState(),r=t.stateId;try{const i=r===o||r===o+1&&!function(e,t){return e!==Z&&(e===U||void 0===t||(n=e,t.filter((e=>n.indexOf(e)>-1))).length>0);var n}(t.dirtyHandlerIds,n);i||e()}finally{o=r}}))}subscribeToOffsetChange(e){s("function"==typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe((()=>{const n=this.store.getState().dragOffset;n!==t&&(t=n,e())}))}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return s(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);if(s(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;return M(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);if(s(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;return this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1};if(!e)return!1;const{shallow:n}=t;if(!this.isDragging())return!1;const o=this.registry.getTargetType(e),r=this.getItemType();if(r&&!M(o,r))return!1;const i=this.getTargetIds();if(!i.length)return!1;const a=i.indexOf(e);return n?a===i.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:o}=e;return t&&n&&o?K((i=o,{x:(r=t).x+i.x,y:r.y+i.y}),n):null;var r,i}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:n}=e;return t&&n?K(t,n):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}}const G=void 0!==n.g?n.g:self,W=G.MutationObserver||G.WebKitMutationObserver;function q(e){return function(){const t=setTimeout(o,0),n=setInterval(o,50);function o(){clearTimeout(t),clearInterval(n),e()}}}const H="function"==typeof W?function(e){let t=1;const n=new W(e),o=document.createTextNode("");return n.observe(o,{characterData:!0}),function(){t=-t,o.data=t}}:q;class ${call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const X=new class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=H(this.flush),this.requestErrorThrow=q((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},Y=new class{create(e){const t=this.freeTasks,n=t.length?t.pop():new $(this.onError,(e=>t[t.length]=e));return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}(X.registerPendingError);const J="dnd-core/ADD_SOURCE",Q="dnd-core/ADD_TARGET",ee="dnd-core/REMOVE_SOURCE",te="dnd-core/REMOVE_TARGET";function ne(e,t){t&&Array.isArray(e)?e.forEach((e=>ne(e,!1))):s("string"==typeof e||"symbol"==typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var oe;!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(oe||(oe={}));let re=0;function ie(e){const t=(re++).toString();switch(e){case oe.SOURCE:return`S${t}`;case oe.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function ae(e){switch(e[0]){case"S":return oe.SOURCE;case"T":return oe.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function se(e,t){const n=e.entries();let o=!1;do{const{done:e,value:[,r]}=n.next();if(r===t)return!0;o=!!e}while(!o);return!1}class le{addSource(e,t){ne(e),function(e){s("function"==typeof e.canDrag,"Expected canDrag to be a function."),s("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),s("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);const n=this.addHandler(oe.SOURCE,e,t);return this.store.dispatch(function(e){return{type:J,payload:{sourceId:e}}}(n)),n}addTarget(e,t){ne(e,!0),function(e){s("function"==typeof e.canDrop,"Expected canDrop to be a function."),s("function"==typeof e.hover,"Expected hover to be a function."),s("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);const n=this.addHandler(oe.TARGET,e,t);return this.store.dispatch(function(e){return{type:Q,payload:{targetId:e}}}(n)),n}containsHandler(e){return se(this.dragSources,e)||se(this.dropTargets,e)}getSource(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];s(this.isSourceId(e),"Expected a valid source ID.");return t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return s(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return s(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return s(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return ae(e)===oe.SOURCE}isTargetId(e){return ae(e)===oe.TARGET}removeSource(e){var t;s(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:ee,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},X.enqueueTask(Y.create(t))}removeTarget(e){s(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:te,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);s(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){s(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){const o=ie(e);return this.types.set(o,t),e===oe.SOURCE?this.dragSources.set(o,n):e===oe.TARGET&&this.dropTargets.set(o,n),o}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const ce=(e,t)=>e===t;function ue(e,t){return!e&&!t||!(!e||!t)&&(e.x===t.x&&e.y===t.y)}function de(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ce;if(e.length!==t.length)return!1;for(let o=0;o<e.length;++o)if(!n(e[o],t[o]))return!1;return!0}function pe(){let e=arguments.length>1?arguments[1]:void 0;switch(e.type){case g:break;case J:case Q:case te:case ee:return Z;default:return U}const{targetIds:t=[],prevTargetIds:n=[]}=e.payload,o=p(t,n),r=o.length>0||!de(t,n);if(!r)return Z;const i=n[n.length-1],a=t[t.length-1];return i!==a&&(i&&o.push(i),a&&o.push(a)),o}function fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function he(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){fe(e,t,n[t])}))}return e}const me={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function ge(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:me,t=arguments.length>1?arguments[1]:void 0;const{payload:n}=t;switch(t.type){case f:case h:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case g:return ue(e.clientOffset,n.clientOffset)?e:he({},e,{clientOffset:n.clientOffset});case y:case v:return me;default:return e}}function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){ve(e,t,n[t])}))}return e}const be={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function we(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:be,t=arguments.length>1?arguments[1]:void 0;const{payload:n}=t;switch(t.type){case h:return ye({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case m:return ye({},e,{isSourcePublic:!0});case g:return ye({},e,{targetIds:n.targetIds});case te:return-1===e.targetIds.indexOf(n.targetId)?e:ye({},e,{targetIds:u(e.targetIds,n.targetId)});case v:return ye({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case y:return ye({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Se(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case J:case Q:return e+1;case ee:case te:return e-1;default:return e}}function Pe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e+1}function Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){Ee(e,t,n[t])}))}return e}function De(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:pe(e.dirtyHandlerIds,{type:t.type,payload:xe({},t.payload,{prevTargetIds:c(e,"dragOperation.targetIds",[])})}),dragOffset:ge(e.dragOffset,t),refCount:Se(e.refCount,t),dragOperation:we(e.dragOperation,t),stateId:Pe(e.stateId)}}function Ce(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=ke(o),i=new V(r,new le(r)),a=new z(r,i),s=e(a,t,n);return a.receiveBackend(s),a}function ke(e){const t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return(0,a.MT)(De,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function Oe(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}let Ae=0;const Te=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Ie=(0,o.memo)((function(e){var{children:t}=e,n=Oe(e,["children"]);const[a,s]=function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}const t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fe(),n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;const r=t;r[Te]||(r[Te]={dragDropManager:Ce(e,t,n,o)});return r[Te]}(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}(n);return(0,o.useEffect)((()=>{if(s){const e=Fe();return++Ae,()=>{0==--Ae&&(e[Te]=null)}}}),[]),(0,i.jsx)(r.Provider,{value:a,children:t})}));function Fe(){return void 0!==n.g?n.g:window}var Me=n(64063),_e=n.n(Me);const Ne="undefined"!=typeof window?o.useLayoutEffect:o.useEffect;function Re(e,t,n){const[r,i]=(0,o.useState)((()=>t(e))),a=(0,o.useCallback)((()=>{const o=t(e);_e()(r,o)||(i(o),n&&n())}),[r,e,n]);return Ne(a),[r,a]}function Le(e,t,n){return function(e,t,n){const[o,r]=Re(e,t,n);return Ne((function(){const t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(r,{handlerIds:[t]})}),[e,r]),o}(t,e||(()=>({})),(()=>n.reconnect()))}function Be(e,t){const n=[...t||[]];return null==t&&"function"!=typeof e&&n.push(e),(0,o.useMemo)((()=>"function"==typeof e?e():e),n)}function je(e){return(0,o.useMemo)((()=>e.hooks.dragSource()),[e])}function ze(e){return(0,o.useMemo)((()=>e.hooks.dragPreview()),[e])}let Ke=!1,Ze=!1;class Ue{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){s(!Ke,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Ke=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Ke=!1}}isDragging(){if(!this.sourceId)return!1;s(!Ze,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Ze=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Ze=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let Ve=!1;class Ge{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;s(!Ve,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Ve=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Ve=!1}}isOver(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function We(e,t,n,o){let r=n?n.call(o,e,t):void 0;if(void 0!==r)return!!r;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;const s=Object.prototype.hasOwnProperty.bind(t);for(let a=0;a<i.length;a++){const l=i[a];if(!s(l))return!1;const c=e[l],u=t[l];if(r=n?n.call(o,c,u,l):void 0,!1===r||void 0===r&&c!==u)return!1}return!0}function qe(e){return null!==e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function He(e){if("string"==typeof e.type)return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function $e(e){const t={};return Object.keys(e).forEach((n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const e=function(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!(0,o.isValidElement)(t)){const o=t;return e(o,n),o}const r=t;He(r);return Ye(r,n?t=>e(t,n):e)}}(r);t[n]=()=>e}})),t}function Xe(e,t){"function"==typeof e?e(t):e.current=t}function Ye(e,t){const n=e.ref;return s("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?(0,o.cloneElement)(e,{ref:e=>{Xe(n,e),Xe(t,e)}}):(0,o.cloneElement)(e,{ref:t})}class Je{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!We(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!We(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=$e({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,qe(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,qe(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class Qe{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!We(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=$e({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,qe(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function et(){const{dragDropManager:e}=(0,o.useContext)(r);return s(null!=e,"Expected drag drop context"),e}class tt{beginDrag(){const e=this.spec,t=this.monitor;let n=null;return n="object"==typeof e.item?e.item:"function"==typeof e.item?e.item(t):{},null!=n?n:null}canDrag(){const e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)}isDragging(e,t){const n=this.spec,o=this.monitor,{isDragging:r}=n;return r?r(o):t===e.getSourceId()}endDrag(){const e=this.spec,t=this.monitor,n=this.connector,{end:o}=e;o&&o(t.getItem(),t),n.reconnect()}constructor(e,t,n){this.spec=e,this.monitor=t,this.connector=n}}function nt(e,t,n){const r=et(),i=function(e,t,n){const r=(0,o.useMemo)((()=>new tt(e,t,n)),[t,n]);return(0,o.useEffect)((()=>{r.spec=e}),[e]),r}(e,t,n),a=function(e){return(0,o.useMemo)((()=>{const t=e.type;return s(null!=t,"spec.type must be defined"),t}),[e])}(e);Ne((function(){if(null!=a){const[e,o]=function(e,t,n){const o=n.getRegistry(),r=o.addSource(e,t);return[r,()=>o.removeSource(r)]}(a,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),o}}),[r,t,n,i,a])}function ot(e,t){const n=Be(e,t);s(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=function(){const e=et();return(0,o.useMemo)((()=>new Ue(e)),[e])}(),i=function(e,t){const n=et(),r=(0,o.useMemo)((()=>new Je(n.getBackend())),[n]);return Ne((()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource())),[r,e]),Ne((()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview())),[r,t]),r}(n.options,n.previewOptions);return nt(n,r,i),[Le(n.collect,r,i),je(i),ze(i)]}function rt(e){const t=et().getMonitor(),[n,r]=Re(t,e);return(0,o.useEffect)((()=>t.subscribeToOffsetChange(r))),(0,o.useEffect)((()=>t.subscribeToStateChange(r))),n}function it(e){return(0,o.useMemo)((()=>e.hooks.dropTarget()),[e])}class at{canDrop(){const e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}hover(){const e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){const e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}}function st(e,t,n){const r=et(),i=function(e,t){const n=(0,o.useMemo)((()=>new at(e,t)),[t]);return(0,o.useEffect)((()=>{n.spec=e}),[e]),n}(e,t),a=function(e){const{accept:t}=e;return(0,o.useMemo)((()=>(s(null!=e.accept,"accept must be defined"),Array.isArray(t)?t:[t])),[t])}(e);Ne((function(){const[e,o]=function(e,t,n){const o=n.getRegistry(),r=o.addTarget(e,t);return[r,()=>o.removeTarget(r)]}(a,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),o}),[r,t,i,n,a.map((e=>e.toString())).join("|")])}function lt(e,t){const n=Be(e,t),r=function(){const e=et();return(0,o.useMemo)((()=>new Ge(e)),[e])}(),i=function(e){const t=et(),n=(0,o.useMemo)((()=>new Qe(t.getBackend())),[t]);return Ne((()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget())),[e]),n}(n.options);return st(n,r,i),[Le(n.collect,r,i),it(i)]}},76154:(e,t,n)=>{"use strict";n.d(t,{_H:()=>Wt,Pj:()=>_t,dp:()=>Ft,Sn:()=>je,vU:()=>Ht,XN:()=>xt,YB:()=>Dt});var o=n(70655),r=n(67294),i=n(8679),a=n.n(i);["angle-degree","area-acre","area-hectare","concentr-percent","digital-bit","digital-byte","digital-gigabit","digital-gigabyte","digital-kilobit","digital-kilobyte","digital-megabit","digital-megabyte","digital-petabyte","digital-terabit","digital-terabyte","duration-day","duration-hour","duration-millisecond","duration-minute","duration-month","duration-second","duration-week","duration-year","length-centimeter","length-foot","length-inch","length-kilometer","length-meter","length-mile-scandinavian","length-mile","length-millimeter","length-yard","mass-gram","mass-kilogram","mass-ounce","mass-pound","mass-stone","temperature-celsius","temperature-fahrenheit","volume-fluid-ounce","volume-gallon","volume-liter","volume-milliliter"].map((function(e){return e.slice(e.indexOf("-")+1)}));function s(e,t,n){if(void 0===n&&(n=Error),!e)throw new n(t)}var l=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/;new RegExp("^"+l.source),new RegExp(l.source+"$");var c,u,d,p;!function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="MISSING_LOCALE_DATA",t}(0,o.ZT)(t,e)}(Error);function f(e){return e.type===d.literal}function h(e){return e.type===d.argument}function m(e){return e.type===d.number}function g(e){return e.type===d.date}function v(e){return e.type===d.time}function y(e){return e.type===d.select}function b(e){return e.type===d.plural}function w(e){return e.type===d.pound}function S(e){return e.type===d.tag}function P(e){return!(!e||"object"!=typeof e||e.type!==p.number)}function E(e){return!(!e||"object"!=typeof e||e.type!==p.dateTime)}!function(e){e.startRange="startRange",e.shared="shared",e.endRange="endRange"}(c||(c={})),function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(u||(u={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(d||(d={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(p||(p={}));var x=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,D=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function C(e){var t={};return e.replace(D,(function(e){var n=e.length;switch(e[0]){case"G":t.era=4===n?"long":5===n?"narrow":"short";break;case"y":t.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===n?"short":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var k=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var O,A=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,T=/^(@+)?(\+|#+)?$/g,I=/(\*)(0+)|(#+)(0+)|(0+)/g,F=/^(0+)$/;function M(e){var t={};return e.replace(T,(function(e,n,o){return"string"!=typeof o?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===o?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof o?o.length:0)),""})),t}function _(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function N(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!F.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function R(e){var t=_(e);return t||{}}function L(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=i.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=(0,o.pi)((0,o.pi)((0,o.pi)({},t),{notation:"scientific"}),i.options.reduce((function(e,t){return(0,o.pi)((0,o.pi)({},e),R(t))}),{}));continue;case"engineering":t=(0,o.pi)((0,o.pi)((0,o.pi)({},t),{notation:"engineering"}),i.options.reduce((function(e,t){return(0,o.pi)((0,o.pi)({},e),R(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(I,(function(e,n,o,r,i,a){if(n)t.minimumIntegerDigits=o.length;else{if(r&&i)throw new Error("We currently do not support maximum integer digits");if(a)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(F.test(i.stem))t.minimumIntegerDigits=i.stem.length;else if(A.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(A,(function(e,n,o,r,i,a){return"*"===o?t.minimumFractionDigits=n.length:r&&"#"===r[0]?t.maximumFractionDigits=r.length:i&&a?(t.minimumFractionDigits=i.length,t.maximumFractionDigits=i.length+a.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""})),i.options.length&&(t=(0,o.pi)((0,o.pi)({},t),M(i.options[0])))}else if(T.test(i.stem))t=(0,o.pi)((0,o.pi)({},t),M(i.stem));else{var a=_(i.stem);a&&(t=(0,o.pi)((0,o.pi)({},t),a));var s=N(i.stem);s&&(t=(0,o.pi)((0,o.pi)({},t),s))}}return t}var B=new RegExp("^"+x.source+"*"),j=new RegExp(x.source+"*$");function z(e,t){return{start:e,end:t}}var K=!!String.prototype.startsWith,Z=!!String.fromCodePoint,U=!!Object.fromEntries,V=!!String.prototype.codePointAt,G=!!String.prototype.trimStart,W=!!String.prototype.trimEnd,q=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},H=!0;try{H="a"===(null===(O=ne("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===O?void 0:O[0])}catch(e){H=!1}var $,X=K?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},Y=Z?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n,o="",r=e.length,i=0;r>i;){if((n=e[i++])>1114111)throw RangeError(n+" is not a valid code point");o+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return o},J=U?Object.fromEntries:function(e){for(var t={},n=0,o=e;n<o.length;n++){var r=o[n],i=r[0],a=r[1];t[i]=a}return t},Q=V?function(e,t){return e.codePointAt(t)}:function(e,t){var n=e.length;if(!(t<0||t>=n)){var o,r=e.charCodeAt(t);return r<55296||r>56319||t+1===n||(o=e.charCodeAt(t+1))<56320||o>57343?r:o-56320+(r-55296<<10)+65536}},ee=G?function(e){return e.trimStart()}:function(e){return e.replace(B,"")},te=W?function(e){return e.trimEnd()}:function(e){return e.replace(j,"")};function ne(e,t){return new RegExp(e,t)}if(H){var oe=ne("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");$=function(e,t){var n;return oe.lastIndex=t,null!==(n=oe.exec(e)[1])&&void 0!==n?n:""}}else $=function(e,t){for(var n=[];;){var o=Q(e,t);if(void 0===o||ae(o)||se(o))break;n.push(o),t+=o>=65536?2:1}return Y.apply(void 0,n)};var re=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var o=[];!this.isEOF();){var r=this.char();if(123===r){if((i=this.parseArgument(e,n)).err)return i;o.push(i.val)}else{if(125===r&&e>0)break;if(35!==r||"plural"!==t&&"selectordinal"!==t){if(60===r&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(u.UNMATCHED_CLOSING_TAG,z(this.clonePosition(),this.clonePosition()))}if(60===r&&!this.ignoreTag&&ie(this.peek()||0)){if((i=this.parseTag(e,t)).err)return i;o.push(i.val)}else{var i;if((i=this.parseLiteral(e,t)).err)return i;o.push(i.val)}}else{var a=this.clonePosition();this.bump(),o.push({type:d.pound,location:z(a,this.clonePosition())})}}}return{val:o,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:d.literal,value:"<"+o+"/>",location:z(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var r=this.parseMessage(e+1,t,!0);if(r.err)return r;var i=r.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!ie(this.char()))return this.error(u.INVALID_TAG,z(a,this.clonePosition()));var s=this.clonePosition();return o!==this.parseTagName()?this.error(u.UNMATCHED_CLOSING_TAG,z(s,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:d.tag,value:o,children:i,location:z(n,this.clonePosition())},err:null}:this.error(u.INVALID_TAG,z(a,this.clonePosition())))}return this.error(u.UNCLOSED_TAG,z(n,this.clonePosition()))}return this.error(u.INVALID_TAG,z(n,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),o="";;){var r=this.tryParseQuote(t);if(r)o+=r;else{var i=this.tryParseUnquoted(e,t);if(i)o+=i;else{var a=this.tryParseLeftAngleBracket();if(!a)break;o+=a}}}var s=z(n,this.clonePosition());return{val:{type:d.literal,value:o,location:s},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(ie(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(n);this.bump()}return Y.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===t||"selectordinal"===t)||125===n&&e>0?null:(this.bump(),Y(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(u.EXPECT_ARGUMENT_CLOSING_BRACE,z(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(u.EMPTY_ARGUMENT,z(n,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(u.MALFORMED_ARGUMENT,z(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(u.EXPECT_ARGUMENT_CLOSING_BRACE,z(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:d.argument,value:o,location:z(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(u.EXPECT_ARGUMENT_CLOSING_BRACE,z(n,this.clonePosition())):this.parseArgumentOptions(e,t,o,n);default:return this.error(u.MALFORMED_ARGUMENT,z(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=$(this.message,t),o=t+n.length;return this.bumpTo(o),{value:n,location:z(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,r){var i,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(s){case"":return this.error(u.EXPECT_ARGUMENT_TYPE,z(a,l));case"number":case"date":case"time":this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition();if((w=this.parseSimpleArgStyleIfPossible()).err)return w;if(0===(g=te(w.val)).length)return this.error(u.EXPECT_ARGUMENT_STYLE,z(this.clonePosition(),this.clonePosition()));c={style:g,styleLocation:z(f,this.clonePosition())}}if((S=this.tryParseArgumentClose(r)).err)return S;var h=z(r,this.clonePosition());if(c&&X(null==c?void 0:c.style,"::",0)){var m=ee(c.style.slice(2));if("number"===s)return(w=this.parseNumberSkeletonFromString(m,c.styleLocation)).err?w:{val:{type:d.number,value:n,location:h,style:w.val},err:null};if(0===m.length)return this.error(u.EXPECT_DATE_TIME_SKELETON,h);var g={type:p.dateTime,pattern:m,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?C(m):{}};return{val:{type:"date"===s?d.date:d.time,value:n,location:h,style:g},err:null}}return{val:{type:"number"===s?d.number:"date"===s?d.date:d.time,value:n,location:h,style:null!==(i=null==c?void 0:c.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":var v=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(u.EXPECT_SELECT_ARGUMENT_OPTIONS,z(v,(0,o.pi)({},v)));this.bumpSpace();var y=this.parseIdentifierIfPossible(),b=0;if("select"!==s&&"offset"===y.value){if(!this.bumpIf(":"))return this.error(u.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,z(this.clonePosition(),this.clonePosition()));var w;if(this.bumpSpace(),(w=this.tryParseDecimalInteger(u.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,u.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return w;this.bumpSpace(),y=this.parseIdentifierIfPossible(),b=w.val}var S,P=this.tryParsePluralOrSelectOptions(e,s,t,y);if(P.err)return P;if((S=this.tryParseArgumentClose(r)).err)return S;var E=z(r,this.clonePosition());return"select"===s?{val:{type:d.select,value:n,options:J(P.val),location:E},err:null}:{val:{type:d.plural,value:n,options:J(P.val),offset:b,pluralType:"plural"===s?"cardinal":"ordinal",location:E},err:null};default:return this.error(u.INVALID_ARGUMENT_TYPE,z(a,l))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(u.EXPECT_ARGUMENT_CLOSING_BRACE,z(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(u.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,z(n,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],n=0,o=e.split(k).filter((function(e){return e.length>0}));n<o.length;n++){var r=o[n].split("/");if(0===r.length)throw new Error("Invalid number skeleton");for(var i=r[0],a=r.slice(1),s=0,l=a;s<l.length;s++)if(0===l[s].length)throw new Error("Invalid number skeleton");t.push({stem:i,options:a})}return t}(e)}catch(e){return this.error(u.INVALID_NUMBER_SKELETON,t)}return{val:{type:p.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?L(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,o){for(var r,i=!1,a=[],s=new Set,l=o.value,c=o.location;;){if(0===l.length){var d=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var p=this.tryParseDecimalInteger(u.EXPECT_PLURAL_ARGUMENT_SELECTOR,u.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;c=z(d,this.clonePosition()),l=this.message.slice(d.offset,this.offset())}if(s.has(l))return this.error("select"===t?u.DUPLICATE_SELECT_ARGUMENT_SELECTOR:u.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===l&&(i=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?u.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:u.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,z(this.clonePosition(),this.clonePosition()));var h=this.parseMessage(e+1,t,n);if(h.err)return h;var m=this.tryParseArgumentClose(f);if(m.err)return m;a.push([l,{value:h.val,location:z(f,this.clonePosition())}]),s.add(l),this.bumpSpace(),l=(r=this.parseIdentifierIfPossible()).value,c=r.location}return 0===a.length?this.error("select"===t?u.EXPECT_SELECT_ARGUMENT_SELECTOR:u.EXPECT_PLURAL_ARGUMENT_SELECTOR,z(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(u.MISSING_OTHER_CLAUSE,z(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,o=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var r=!1,i=0;!this.isEOF();){var a=this.char();if(!(a>=48&&a<=57))break;r=!0,i=10*i+(a-48),this.bump()}var s=z(o,this.clonePosition());return r?q(i*=n)?{val:i,err:null}:this.error(t,s):this.error(e,s)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=Q(this.message,e);if(void 0===t)throw Error("Offset "+e+" is at invalid UTF-16 code unit boundary");return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(X(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset "+e+" must be greater than or equal to the current offset "+this.offset());for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset "+e+" is at invalid UTF-16 code unit boundary");if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&ae(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();function ie(e){return e>=97&&e<=122||e>=65&&e<=90}function ae(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function se(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function le(e){e.forEach((function(e){if(delete e.location,y(e)||b(e))for(var t in e.options)delete e.options[t].location,le(e.options[t].value);else m(e)&&P(e.style)||(g(e)||v(e))&&E(e.style)?delete e.style.location:S(e)&&le(e.children)}))}function ce(e,t){void 0===t&&(t={}),t=(0,o.pi)({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new re(e,t).parse();if(n.err){var r=SyntaxError(u[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||le(n.val),n.val}function ue(e,t){var n=t&&t.cache?t.cache:ye,o=t&&t.serializer?t.serializer:me;return(t&&t.strategy?t.strategy:he)(e,{cache:n,serializer:o})}function de(e,t,n,o){var r,i=null==(r=o)||"number"==typeof r||"boolean"==typeof r?o:n(o),a=t.get(i);return void 0===a&&(a=e.call(this,o),t.set(i,a)),a}function pe(e,t,n){var o=Array.prototype.slice.call(arguments,3),r=n(o),i=t.get(r);return void 0===i&&(i=e.apply(this,o),t.set(r,i)),i}function fe(e,t,n,o,r){return n.bind(t,e,o,r)}function he(e,t){return fe(e,this,1===e.length?de:pe,t.cache.create(),t.serializer)}var me=function(){return JSON.stringify(arguments)};function ge(){this.cache=Object.create(null)}ge.prototype.has=function(e){return e in this.cache},ge.prototype.get=function(e){return this.cache[e]},ge.prototype.set=function(e,t){this.cache[e]=t};var ve,ye={create:function(){return new ge}},be={variadic:function(e,t){return fe(e,this,pe,t.cache.create(),t.serializer)},monadic:function(e,t){return fe(e,this,de,t.cache.create(),t.serializer)}};!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(ve||(ve={}));var we,Se=function(e){function t(t,n,o){var r=e.call(this,t)||this;return r.code=n,r.originalMessage=o,r}return(0,o.ZT)(t,e),t.prototype.toString=function(){return"[formatjs Error: "+this.code+"] "+this.message},t}(Error),Pe=function(e){function t(t,n,o,r){return e.call(this,'Invalid values for "'+t+'": "'+n+'". Options are "'+Object.keys(o).join('", "')+'"',ve.INVALID_VALUE,r)||this}return(0,o.ZT)(t,e),t}(Se),Ee=function(e){function t(t,n,o){return e.call(this,'Value for "'+t+'" must be of type '+n,ve.INVALID_VALUE,o)||this}return(0,o.ZT)(t,e),t}(Se),xe=function(e){function t(t,n){return e.call(this,'The intl string context variable "'+t+'" was not provided to the string "'+n+'"',ve.MISSING_VALUE,n)||this}return(0,o.ZT)(t,e),t}(Se);function De(e){return"function"==typeof e}function Ce(e,t,n,o,r,i,a){if(1===e.length&&f(e[0]))return[{type:we.literal,value:e[0].value}];for(var s=[],l=0,c=e;l<c.length;l++){var u=c[l];if(f(u))s.push({type:we.literal,value:u.value});else if(w(u))"number"==typeof i&&s.push({type:we.literal,value:n.getNumberFormat(t).format(i)});else{var d=u.value;if(!r||!(d in r))throw new xe(d,a);var p=r[d];if(h(u))p&&"string"!=typeof p&&"number"!=typeof p||(p="string"==typeof p||"number"==typeof p?String(p):""),s.push({type:"string"==typeof p?we.literal:we.object,value:p});else if(g(u)){var x="string"==typeof u.style?o.date[u.style]:E(u.style)?u.style.parsedOptions:void 0;s.push({type:we.literal,value:n.getDateTimeFormat(t,x).format(p)})}else if(v(u)){x="string"==typeof u.style?o.time[u.style]:E(u.style)?u.style.parsedOptions:void 0;s.push({type:we.literal,value:n.getDateTimeFormat(t,x).format(p)})}else if(m(u)){(x="string"==typeof u.style?o.number[u.style]:P(u.style)?u.style.parsedOptions:void 0)&&x.scale&&(p*=x.scale||1),s.push({type:we.literal,value:n.getNumberFormat(t,x).format(p)})}else{if(S(u)){var D=u.children,C=u.value,k=r[C];if(!De(k))throw new Ee(C,"function",a);var O=k(Ce(D,t,n,o,r,i).map((function(e){return e.value})));Array.isArray(O)||(O=[O]),s.push.apply(s,O.map((function(e){return{type:"string"==typeof e?we.literal:we.object,value:e}})))}if(y(u)){if(!(A=u.options[p]||u.options.other))throw new Pe(u.value,p,Object.keys(u.options),a);s.push.apply(s,Ce(A.value,t,n,o,r))}else if(b(u)){var A;if(!(A=u.options["="+p])){if(!Intl.PluralRules)throw new Se('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',ve.MISSING_INTL_API,a);var T=n.getPluralRules(t,{type:u.pluralType}).select(p-(u.offset||0));A=u.options[T]||u.options.other}if(!A)throw new Pe(u.value,p,Object.keys(u.options),a);s.push.apply(s,Ce(A.value,t,n,o,r,p-(u.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var n=e[e.length-1];return n&&n.type===we.literal&&t.type===we.literal?n.value+=t.value:e.push(t),e}),[])}(s)}function ke(e,t){return t?Object.keys(e).reduce((function(n,r){var i,a;return n[r]=(i=e[r],(a=t[r])?(0,o.pi)((0,o.pi)((0,o.pi)({},i||{}),a||{}),Object.keys(i).reduce((function(e,t){return e[t]=(0,o.pi)((0,o.pi)({},i[t]),a[t]||{}),e}),{})):i),n}),(0,o.pi)({},e)):e}function Oe(e){return{create:function(){return{has:function(t){return t in e},get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(we||(we={}));var Ae=function(){function e(t,n,r,i){var a,s=this;if(void 0===n&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=s.formatToParts(e);if(1===t.length)return t[0].value;var n=t.reduce((function(e,t){return e.length&&t.type===we.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(e){return Ce(s.ast,s.locales,s.formatters,s.formats,e,void 0,s.message)},this.resolvedOptions=function(){return{locale:Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.ast},"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{ignoreTag:null==i?void 0:i.ignoreTag})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=ke(e.formats,r),this.locales=n,this.formatters=i&&i.formatters||(void 0===(a=this.formatterCache)&&(a={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ue((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,(0,o.ev)([void 0],t)))}),{cache:Oe(a.number),strategy:be.variadic}),getDateTimeFormat:ue((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,(0,o.ev)([void 0],t)))}),{cache:Oe(a.dateTime),strategy:be.variadic}),getPluralRules:ue((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,(0,o.ev)([void 0],t)))}),{cache:Oe(a.pluralRules),strategy:be.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.__parse=ce,e.formats={number:{currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();var Te;!function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"}(Te||(Te={}));var Ie=function(e){function t(n,o,r){var i=e.call(this,"[@formatjs/intl Error "+n+"] "+o+" \n"+(r?"\n"+r.message+"\n"+r.stack:""))||this;return i.code=n,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(i,t),i}return(0,o.ZT)(t,e),t}(Error),Fe=function(e){function t(t,n){return e.call(this,Te.UNSUPPORTED_FORMATTER,t,n)||this}return(0,o.ZT)(t,e),t}(Ie),Me=function(e){function t(t,n){return e.call(this,Te.INVALID_CONFIG,t,n)||this}return(0,o.ZT)(t,e),t}(Ie),_e=function(e){function t(t,n){return e.call(this,Te.MISSING_DATA,t,n)||this}return(0,o.ZT)(t,e),t}(Ie),Ne=function(e){function t(t,n,o,r){var i=e.call(this,Te.FORMAT_ERROR,t+" \nLocale: "+n+"\nMessageID: "+(null==o?void 0:o.id)+"\nDefault Message: "+(null==o?void 0:o.defaultMessage)+"\nDescription: "+(null==o?void 0:o.description)+" \n",r)||this;return i.descriptor=o,i}return(0,o.ZT)(t,e),t}(Ie),Re=function(e){function t(t,n){var o=e.call(this,Te.MISSING_TRANSLATION,'Missing message: "'+t.id+'" for locale "'+n+'", using '+(t.defaultMessage?"default message":"id")+" as fallback.")||this;return o.descriptor=t,o}return(0,o.ZT)(t,e),t}(Ie);function Le(e,t,n){return void 0===n&&(n={}),t.reduce((function(t,o){return o in e?t[o]=e[o]:o in n&&(t[o]=n[o]),t}),{})}var Be={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},onError:function(e){0}};function je(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function ze(e){return{create:function(){return{has:function(t){return t in e},get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Ke(e,t,n,o){var r,i=e&&e[t];if(i&&(r=i[n]),r)return r;o(new Fe("No "+t+" format named: "+n))}function Ze(e,t){return Object.keys(e).reduce((function(n,r){return n[r]=(0,o.pi)({timeZone:t},e[r]),n}),{})}function Ue(e,t){return Object.keys((0,o.pi)((0,o.pi)({},e),t)).reduce((function(n,r){return n[r]=(0,o.pi)((0,o.pi)({},e[r]||{}),t[r]||{}),n}),{})}function Ve(e,t){if(!t)return e;var n=Ae.formats;return(0,o.pi)((0,o.pi)((0,o.pi)({},n),e),{date:Ue(Ze(n.date,t),Ze(e.date||{},t)),time:Ue(Ze(n.time,t),Ze(e.time||{},t))})}function Ge(e,t,n,r,i){var a=e.locale,l=e.formats,c=e.messages,u=e.defaultLocale,p=e.defaultFormats,f=e.onError,h=e.timeZone,m=e.defaultRichTextElements;void 0===n&&(n={id:""});var g=n.id,v=n.defaultMessage;s(!!g,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var y=String(g),b=c&&Object.prototype.hasOwnProperty.call(c,y)&&c[y];if(Array.isArray(b)&&1===b.length&&b[0].type===d.literal)return b[0].value;if(!r&&b&&"string"==typeof b&&!m)return b.replace(/'\{(.*?)\}'/gi,"{$1}");if(r=(0,o.pi)((0,o.pi)({},m),r||{}),l=Ve(l,h),p=Ve(p,h),!b){if((!v||a&&a.toLowerCase()!==u.toLowerCase())&&f(new Re(n,a)),v)try{return t.getMessageFormat(v,u,p,i).format(r)}catch(e){return f(new Ne('Error formatting default message for: "'+y+'", rendering default message verbatim',a,n,e)),"string"==typeof v?v:y}return y}try{return t.getMessageFormat(b,a,l,(0,o.pi)({formatters:t},i||{})).format(r)}catch(e){f(new Ne('Error formatting message: "'+y+'", using '+(v?"default message":"id")+" as fallback.",a,n,e))}if(v)try{return t.getMessageFormat(v,u,p,i).format(r)}catch(e){f(new Ne('Error formatting the default message for: "'+y+'", rendering message verbatim',a,n,e))}return"string"==typeof b?b:"string"==typeof v?v:y}var We=["localeMatcher","formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem"];function qe(e,t,n,r){var i=e.locale,a=e.formats,s=e.onError,l=e.timeZone;void 0===r&&(r={});var c=r.format,u=(0,o.pi)((0,o.pi)({},l&&{timeZone:l}),c&&Ke(a,t,c,s)),d=Le(r,We,u);return"time"!==t||d.hour||d.minute||d.second||d.timeStyle||d.dateStyle||(d=(0,o.pi)((0,o.pi)({},d),{hour:"numeric",minute:"numeric"})),n(i,d)}function He(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var r=n[0],i=n[1],a=void 0===i?{}:i,s="string"==typeof r?new Date(r||0):r;try{return qe(e,"date",t,a).format(s)}catch(t){e.onError(new Ie(Te.FORMAT_ERROR,"Error formatting date.",t))}return String(s)}function $e(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var r=n[0],i=n[1],a=void 0===i?{}:i,s="string"==typeof r?new Date(r||0):r;try{return qe(e,"time",t,a).format(s)}catch(t){e.onError(new Ie(Te.FORMAT_ERROR,"Error formatting time.",t))}return String(s)}function Xe(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var r=n[0],i=n[1],a=n[2],s=void 0===a?{}:a,l=e.timeZone,c=e.locale,u=e.onError,d=Le(s,We,l?{timeZone:l}:{});try{return t(c,d).formatRange(r,i)}catch(e){u(new Ie(Te.FORMAT_ERROR,"Error formatting date time range.",e))}return String(r)}function Ye(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var r=n[0],i=n[1],a=void 0===i?{}:i,s="string"==typeof r?new Date(r||0):r;try{return qe(e,"date",t,a).formatToParts(s)}catch(t){e.onError(new Ie(Te.FORMAT_ERROR,"Error formatting date.",t))}return[]}function Je(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var r=n[0],i=n[1],a=void 0===i?{}:i,s="string"==typeof r?new Date(r||0):r;try{return qe(e,"time",t,a).formatToParts(s)}catch(t){e.onError(new Ie(Te.FORMAT_ERROR,"Error formatting time.",t))}return[]}var Qe=["localeMatcher","style","type","fallback"];function et(e,t,n,o){var r=e.locale,i=e.onError;Intl.DisplayNames||i(new Se('Intl.DisplayNames is not available in this environment.\nTry polyfilling it using "@formatjs/intl-displaynames"\n',ve.MISSING_INTL_API));var a=Le(o,Qe);try{return t(r,a).of(n)}catch(e){i(new Ie(Te.FORMAT_ERROR,"Error formatting display name.",e))}}var tt=["localeMatcher","type","style"],nt=Date.now();function ot(e,t,n,o){void 0===o&&(o={});var r=rt(e,t,n,o).reduce((function(e,t){var n=t.value;return"string"!=typeof n?e.push(n):"string"==typeof e[e.length-1]?e[e.length-1]+=n:e.push(n),e}),[]);return 1===r.length?r[0]:r}function rt(e,t,n,r){var i=e.locale,a=e.onError;void 0===r&&(r={}),Intl.ListFormat||a(new Se('Intl.ListFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-listformat"\n',ve.MISSING_INTL_API));var s=Le(r,tt);try{var l={},c=n.map((function(e,t){if("object"==typeof e){var n=function(e){return nt+"_"+e+"_"+nt}(t);return l[n]=e,n}return String(e)}));return t(i,s).formatToParts(c).map((function(e){return"literal"===e.type?e:(0,o.pi)((0,o.pi)({},e),{value:l[e.value]||e.value})}))}catch(e){a(new Ie(Te.FORMAT_ERROR,"Error formatting list.",e))}return n}var it=["localeMatcher","type"];function at(e,t,n,o){var r=e.locale,i=e.onError;void 0===o&&(o={}),Intl.PluralRules||i(new Se('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',ve.MISSING_INTL_API));var a=Le(o,it);try{return t(r,a).select(n)}catch(e){i(new Ne("Error formatting plural.",e))}return"other"}var st=["numeric","style"];function lt(e,t,n,o,r){void 0===r&&(r={}),o||(o="second"),Intl.RelativeTimeFormat||e.onError(new Se('Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-relativetimeformat"\n',ve.MISSING_INTL_API));try{return function(e,t,n){var o=e.locale,r=e.formats,i=e.onError;void 0===n&&(n={});var a=n.format,s=!!a&&Ke(r,"relative",a,i)||{};return t(o,Le(n,st,s))}(e,t,r).format(n,o)}catch(t){e.onError(new Ne("Error formatting relative time.",t))}return String(n)}var ct=["localeMatcher","style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem"];function ut(e,t,n){var o=e.locale,r=e.formats,i=e.onError;void 0===n&&(n={});var a=n.format,s=a&&Ke(r,"number",a,i)||{};return t(o,Le(n,ct,s))}function dt(e,t,n,o){void 0===o&&(o={});try{return ut(e,t,o).format(n)}catch(t){e.onError(new Ie(Te.FORMAT_ERROR,"Error formatting number.",t))}return String(n)}function pt(e,t,n,o){void 0===o&&(o={});try{return ut(e,t,o).formatToParts(n)}catch(t){e.onError(new Ie(Te.FORMAT_ERROR,"Error formatting number.",t))}return[]}function ft(e){var t;e.defaultRichTextElements&&"string"==typeof((t=e.messages||{})?t[Object.keys(t)[0]]:void 0)&&console.warn('[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled. \nPlease consider using "@formatjs/cli" to pre-compile your messages for performance.\nFor more details see https://formatjs.io/docs/getting-started/message-distribution')}function ht(e,t){var n=function(e){void 0===e&&(e={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}});var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,r=Intl.DisplayNames,i=ue((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,(0,o.ev)([void 0],t)))}),{cache:ze(e.dateTime),strategy:be.variadic}),a=ue((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,(0,o.ev)([void 0],t)))}),{cache:ze(e.number),strategy:be.variadic}),s=ue((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,(0,o.ev)([void 0],t)))}),{cache:ze(e.pluralRules),strategy:be.variadic});return{getDateTimeFormat:i,getNumberFormat:a,getMessageFormat:ue((function(e,t,n,r){return new Ae(e,t,n,(0,o.pi)({formatters:{getNumberFormat:a,getDateTimeFormat:i,getPluralRules:s}},r||{}))}),{cache:ze(e.message),strategy:be.variadic}),getRelativeTimeFormat:ue((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new(t.bind.apply(t,(0,o.ev)([void 0],e)))}),{cache:ze(e.relativeTime),strategy:be.variadic}),getPluralRules:s,getListFormat:ue((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(n.bind.apply(n,(0,o.ev)([void 0],e)))}),{cache:ze(e.list),strategy:be.variadic}),getDisplayNames:ue((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(r.bind.apply(r,(0,o.ev)([void 0],e)))}),{cache:ze(e.displayNames),strategy:be.variadic})}}(t),r=(0,o.pi)((0,o.pi)({},Be),e),i=r.locale,a=r.defaultLocale,s=r.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new _e('Missing locale data for locale: "'+i+'" in Intl.NumberFormat. Using default locale: "'+a+'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details')):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new _e('Missing locale data for locale: "'+i+'" in Intl.DateTimeFormat. Using default locale: "'+a+'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details')):(s&&s(new Me('"locale" was not configured, using "'+a+'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details')),r.locale=r.defaultLocale||"en"),ft(r),(0,o.pi)((0,o.pi)({},r),{formatters:n,formatNumber:dt.bind(null,r,n.getNumberFormat),formatNumberToParts:pt.bind(null,r,n.getNumberFormat),formatRelativeTime:lt.bind(null,r,n.getRelativeTimeFormat),formatDate:He.bind(null,r,n.getDateTimeFormat),formatDateToParts:Ye.bind(null,r,n.getDateTimeFormat),formatTime:$e.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:Xe.bind(null,r,n.getDateTimeFormat),formatTimeToParts:Je.bind(null,r,n.getDateTimeFormat),formatPlural:at.bind(null,r,n.getPluralRules),formatMessage:Ge.bind(null,r,n),formatList:ot.bind(null,r,n.getListFormat),formatListToParts:rt.bind(null,r,n.getListFormat),formatDisplayName:et.bind(null,r,n.getDisplayNames)})}function mt(e){s(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var gt=(0,o.pi)((0,o.pi)({},Be),{textComponent:r.Fragment});function vt(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),o=Object.keys(t),r=n.length;if(o.length!==r)return!1;for(var i=0;i<r;i++){var a=n[i];if(e[a]!==t[a]||!Object.prototype.hasOwnProperty.call(t,a))return!1}return!0}var yt,bt,wt=r.createContext(null),St=wt.Consumer,Pt=wt.Provider,Et=wt;function xt(e,t){var n,i=t||{},s=i.intlPropName,l=void 0===s?"intl":s,c=i.forwardRef,u=void 0!==c&&c,d=i.enforceContext,p=void 0===d||d,f=function(t){return r.createElement(St,null,(function(n){var i;p&&mt(n);var a=((i={})[l]=n,i);return r.createElement(e,(0,o.pi)({},t,a,{ref:u?t.forwardedRef:null}))}))};return f.displayName="injectIntl("+(((n=e).displayName||n.name||"Component")+")"),f.WrappedComponent=e,u?a()(r.forwardRef((function(e,t){return r.createElement(f,(0,o.pi)({},e,{forwardedRef:t}))})),e):a()(f,e)}function Dt(){var e=r.useContext(Et);return mt(e),e}!function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"}(yt||(yt={})),function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"}(bt||(bt={}));var Ct=function(e){var t=Dt(),n=e.value,r=e.children,i=(0,o._T)(e,["value","children"]);return r(t.formatNumberToParts(n,i))};Ct.displayName="FormattedNumberParts";function kt(e){var t=function(t){var n=Dt(),r=t.value,i=t.children,a=(0,o._T)(t,["value","children"]),s="string"==typeof r?new Date(r||0):r;return i("formatDate"===e?n.formatDateToParts(s,a):n.formatTimeToParts(s,a))};return t.displayName=bt[e],t}function Ot(e){var t=function(t){var n=Dt(),i=t.value,a=t.children,s=(0,o._T)(t,["value","children"]),l=n[e](i,s);if("function"==typeof a)return a(l);var c=n.textComponent||r.Fragment;return r.createElement(c,null,l)};return t.displayName=yt[e],t}function At(e){return{locale:e.locale,timeZone:e.timeZone,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}function Tt(e){return e?Object.keys(e).reduce((function(t,n){var o,i=e[n];return t[n]=De(i)?(o=i,function(e){return o(r.Children.toArray(e))}):i,t}),{}):e}Ct.displayName="FormattedNumberParts";var It=function(e,t,n,i){for(var a=[],s=4;s<arguments.length;s++)a[s-4]=arguments[s];var l=Tt(i),c=Ge.apply(void 0,(0,o.ev)([e,t,n,l],a));return Array.isArray(c)?r.Children.toArray(c):c},Ft=function(e,t){var n=e.defaultRichTextElements,r=(0,o._T)(e,["defaultRichTextElements"]),i=Tt(n),a=ht((0,o.pi)((0,o.pi)((0,o.pi)({},gt),r),{defaultRichTextElements:i}),t);return(0,o.pi)((0,o.pi)({},a),{formatMessage:It.bind(null,{locale:a.locale,timeZone:a.timeZone,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:i},a.formatters)})},Mt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cache={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}},t.state={cache:t.cache,intl:Ft(At(t.props),t.cache),prevConfig:At(t.props)},t}return(0,o.ZT)(t,e),t.getDerivedStateFromProps=function(e,t){var n=t.prevConfig,o=t.cache,r=At(e);return vt(n,r)?null:{intl:Ft(r,o),prevConfig:r}},t.prototype.render=function(){return mt(this.state.intl),r.createElement(Pt,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=gt,t}(r.PureComponent);const _t=Mt;var Nt=3600;function Rt(e){var t=Math.abs(e);return t<60?"second":t<Nt?"minute":t<86400?"hour":"day"}function Lt(e){switch(e){case"second":return 1;case"minute":return 60;case"hour":return Nt;default:return 86400}}var Bt=["second","minute","hour"];function jt(e){return void 0===e&&(e="second"),Bt.includes(e)}var zt=function(e){var t=Dt(),n=t.formatRelativeTime,i=t.textComponent,a=e.children,s=n(e.value||0,e.unit,(0,o._T)(e,["children","value","unit"]));return"function"==typeof a?a(s):i?r.createElement(i,null,s):r.createElement(r.Fragment,null,s)},Kt=function(e){var t=e.value,n=e.unit,i=e.updateIntervalInSeconds,a=(0,o._T)(e,["value","unit","updateIntervalInSeconds"]);s(!i||!(!i||!jt(n)),"Cannot schedule update with unit longer than hour");var l,c=r.useState(),u=c[0],d=c[1],p=r.useState(0),f=p[0],h=p[1],m=r.useState(0),g=m[0],v=m[1];n===u&&t===f||(h(t||0),d(n),v(jt(n)?function(e,t){if(!e)return 0;switch(t){case"second":return e;case"minute":return 60*e;default:return e*Nt}}(t,n):0)),r.useEffect((function(){function e(){clearTimeout(l)}if(e(),!i||!jt(n))return e;var t=g-i,o=Rt(t);if("day"===o)return e;var r=Lt(o),a=t-t%r,s=a>=g?a-r:a,c=Math.abs(s-g);return g!==s&&(l=setTimeout((function(){return v(s)}),1e3*c)),e}),[g,i,n]);var y=t||0,b=n;if(jt(n)&&"number"==typeof g&&i){var w=Lt(b=Rt(g));y=Math.round(g/w)}return r.createElement(zt,(0,o.pi)({value:y,unit:b},a))};Kt.displayName="FormattedRelativeTime",Kt.defaultProps={value:0,unit:"second"};var Zt=function(e){var t=Dt(),n=t.formatPlural,o=t.textComponent,i=e.value,a=e.other,s=e.children,l=e[n(i,e)]||a;return"function"==typeof s?s(l):o?r.createElement(o,null,l):l};Zt.defaultProps={type:"cardinal"},Zt.displayName="FormattedPlural";function Ut(e,t){var n=e.values,r=(0,o._T)(e,["values"]),i=t.values,a=(0,o._T)(t,["values"]);return vt(i,n)&&vt(r,a)}function Vt(e){var t=Dt(),n=t.formatMessage,o=t.textComponent,i=void 0===o?r.Fragment:o,a=e.id,s=e.description,l=e.defaultMessage,c=e.values,u=e.children,d=e.tagName,p=void 0===d?i:d,f=n({id:a,description:s,defaultMessage:l},c,{ignoreTag:e.ignoreTag});return Array.isArray(f)||(f=[f]),"function"==typeof u?u(f):p?r.createElement(p,null,r.Children.toArray(f)):r.createElement(r.Fragment,null,f)}Vt.displayName="FormattedMessage";var Gt=r.memo(Vt,Ut);Gt.displayName="MemoizedFormattedMessage";const Wt=Gt;var qt=function(e){var t=Dt(),n=e.from,i=e.to,a=e.children,s=(0,o._T)(e,["from","to","children"]),l=t.formatDateTimeRange(n,i,s);if("function"==typeof a)return a(l);var c=t.textComponent||r.Fragment;return r.createElement(c,null,l)};qt.displayName="FormattedDateTimeRange";function Ht(e){return e}Ot("formatDate"),Ot("formatTime"),Ot("formatNumber"),Ot("formatList"),Ot("formatDisplayName"),kt("formatDate"),kt("formatTime")},21076:(e,t,n)=>{"use strict";n.d(t,{AO:()=>d,L7:()=>f,$u:()=>g,UK:()=>w,Qk:()=>S,d:()=>v,Sk:()=>y,AL:()=>x,oH:()=>P});var o=n(84121),r=n(47347),i=(n(77552),n(91117),n(35349),n(26656)),a=n.n(i);let s;s="object"==typeof process&&"object"==typeof process.versions&&void 0!==process.versions.node||"undefined"!=typeof window&&"Deno"in window||"undefined"!=typeof self&&"Deno"in self?a():function(e){return"object"==typeof window?new Promise(((t,n)=>{const o=document.createElement("script");o.type="text/javascript",o.async=!0,o.onload=()=>t(window.PSPDFModuleInit),o.onerror=n,o.src=e;const{documentElement:i}=document;(0,r.kG)(i),i.appendChild(o)})):(self.importScripts(e),Promise.resolve(self.PSPDFModuleInit))};n(37015);var l=n(96617),c=(n(55024),n(91859),n(5038));n(26248);n(72852);new Set;new Set;c.x.Maui_iOS,c.x.Maui_Android,c.x.Maui_MacCatalyst,c.x.Maui_Windows;const u=()=>{};class d{constructor(){(0,o.Z)(this,"_requests",new Map),(0,o.Z)(this,"_nextRequestId",1),(0,o.Z)(this,"_isLoading",!0),(0,o.Z)(this,"_loadPromise",null),(0,o.Z)(this,"_initPromise",null),(0,o.Z)(this,"_hasOpenedDocument",!1),(0,o.Z)(this,"_hasLoadedCertificates",!1),(0,o.Z)(this,"_handleMessage",(e=>{const t=e.data,n=this._requests.get(t.id);(0,r.kG)(n,`No request was made for id ${t.id}.`);const{resolve:o,reject:i}=n;if(this._requests.delete(t.id),t.error){const e=new r.p2(t.error);e.callArgs=t.callArgs,i(e)}else o(t.result)}))}async loadNativeModule(e,t){let{mainThreadOrigin:n,disableWebAssemblyStreaming:o,enableAutomaticLinkExtraction:i,overrideMemoryLimit:a,wasmLoaderPath:s,wasm:l,workerSpawnerFn:c}=t;return(0,r.kG)(!this._hasOpenedDocument,"cannot invoke `loadNativeModule` while an instance is still in use. Please call `recycle` first."),this._loadPromise?this._loadPromise.then((()=>{})):(this._initPromise||(this.workerSpawner||(this.workerSpawner=await c(),this.workerSpawner.setMessageHandler(this._handleMessage)),this._baseCoreUrl=e,this._mainThreadOrigin=n,this._initPromise=this._sendRequest("loadNativeModule",[s&&l?{wasm:l,wasmLoaderPath:s}:e,{mainThreadOrigin:n,disableWebAssemblyStreaming:o,enableAutomaticLinkExtraction:i,overrideMemoryLimit:a}]).then((e=>e)).catch((e=>{throw this._isLoading=!1,this.destroy(),e}))),this._initPromise)}load(e,t,n){let{mainThreadOrigin:o,customFonts:i,dynamicFonts:a,productId:s}=n;return(0,r.kG)(!this._hasOpenedDocument,"cannot invoke `load` while an instance is still in use. Please call `recycle` first."),this._loadPromise||(this._loadPromise=this._sendRequest("load",[e,t,{mainThreadOrigin:o,customFonts:i,dynamicFonts:a,productId:s}]).then((e=>(this._isLoading=!1,e))).catch((e=>{var t;throw this._isLoading=!1,null===(t=this.workerSpawner)||void 0===t||t.terminate(),e}))),this._loadPromise}version(){return this._assertLoaded(),this._sendRequest("version")}openDocument(e,t,n){return this._assertLoaded(),this._hasOpenedDocument=!0,this._sendRequest("openDocument",[e,t,n]).catch((e=>{throw this._hasOpenedDocument=!1,e}))}async getMeasurementScales(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("getMeasurementScales")}async removeMeasurementScale(e){return this._sendRequest("removeMeasurementScale",[e])}async addMeasurementScale(e){return await this._sendRequest("addMeasurementScale",[e])}async getAnnotationsByScale(e){return await this._sendRequest("getAnnotationsByScale",[e])}async openDocumentAt(){throw new Error("Should never be called")}async getAllPageInfos(e){return this._assertLoaded(),this._sendRequest("getAllPageInfos",[e])}async enablePDFJavaScriptSupport(){return this._assertLoaded(),this._sendRequest("enablePDFJavaScriptSupport")}async runPDFFormattingScripts(e,t){return this._assertLoaded(),this._sendRequest("runPDFFormattingScripts",[e,t])}async getSuggestedLineHeightFactor(e,t){return this._assertLoaded(),this._sendRequest("getSuggestedLineHeightFactor",[e,t])}async getAvailableFontFaces(e){return this._assertLoaded(),this._sendRequest("getAvailableFontFaces",[e])}async setFontSubstitutions(e){return this._assertLoaded(),this._sendRequest("setFontSubstitutions",[e])}getBookmarks(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("getBookmarks")}getFormJSON(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("getFormJSON")}evalFormValuesActions(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("evalFormValuesActions",[e])}evalScript(e,t){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("evalScript",[e,t])}setFormJSONUpdateBatchMode(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("setFormJSONUpdateBatchMode",[e])}getFormValues(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("getFormValues")}closeDocument(){return this._assertLoaded(),this._hasOpenedDocument=!1,this._sendRequest("closeDocument")}renderTile(e,t,n,o,r,i,a,s){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("renderTile",[e,t,n,o,r,i,a,s])}renderAnnotation(e,t,n,o,r,i){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("renderAnnotation",[e,t,n,o,r,i])}renderPageAnnotations(e,t,n,o,r){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("renderPageAnnotations",[e,t,n,o,r])}renderDetachedAnnotation(e,t,n,o,r){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("renderDetachedAnnotation",[e,t,n,o,r])}onKeystrokeEvent(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("onKeystrokeEvent",[e])}getAttachment(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("getAttachment",[e])}textForPageIndex(e){this._assertLoaded(),this._assertDocumentOpen();return this._sendRequest("textForPageIndex",[e])}textContentTreeForPageIndex(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("textContentTreeForPageIndex",[e])}annotationsForPageIndex(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("annotationsForPageIndex",[e])}createAnnotation(e,t){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("createAnnotation",[e,t])}updateAnnotation(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("updateAnnotation",[e])}deleteAnnotation(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("deleteAnnotation",[e])}createFormField(e,t){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("createFormField",[e,t])}updateFormField(e,t){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("updateFormField",[e,t])}deleteFormField(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("deleteFormField",[e])}setFormFieldValue(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("setFormFieldValue",[e])}deleteFormFieldValue(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("deleteFormFieldValue",[e])}createBookmark(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("createBookmark",[e])}updateBookmark(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("updateBookmark",[e])}deleteBookmark(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("deleteBookmark",[e])}setDocumentOutline(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("setDocumentOutline",[e])}getTextFromRects(e,t){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("getTextFromRects",[e,t])}getClosestSnapPoint(e,t){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("getClosestSnapPoint",[e,t])}configureSnapper(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("configureSnapper",[e])}search(e,t,n,o){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:l.S.TEXT;return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("search",[e,t,n,o,r])}getSecondaryMeasurementUnit(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("getSecondaryMeasurementUnit",[])}compareDocuments(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("compareDocuments",[e])}setSecondaryMeasurementUnit(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("setSecondaryMeasurementUnit",[e])}getMeasurementSnappingPoints(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("getMeasurementSnappingPoints",[e])}parseXFDF(e,t){return this._sendRequest("parseXFDF",[e,t])}getEmbeddedFilesList(){return this._sendRequest("getEmbeddedFilesList")}exportFile(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"pdf",r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0;return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("exportFile",[e,t,n,o,r,i,a])}importXFDF(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("importXFDF",[e,t,n])}exportXFDF(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("exportXFDF",[e])}importInstantJSON(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("importInstantJSON",[e])}exportInstantJSON(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("exportInstantJSON",[e])}getDocumentOutline(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("getDocumentOutline")}getPageGlyphs(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("getPageGlyphs",[e])}applyOperations(e,t){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("applyOperations",[e,t])}reloadDocument(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("reloadDocument")}exportPDFWithOperations(e,t){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("exportPDFWithOperations",[e,t])}loadCertificates(e){return this._assertLoaded(),this._assertDocumentOpen(),this._hasLoadedCertificates=Boolean(e.length),this._sendRequest("loadCertificates",[e]).catch((e=>{throw this._hasLoadedCertificates=!1,e}))}getSignaturesInfo(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("getSignaturesInfo",[])}getComments(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("getComments",[])}applyComments(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("applyComments",[e])}prepareSign(e,t,n,o,r,i,a){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("prepareSign",[e,t,n,o,r,i,a])}getTimestampRequest(e,t){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("getTimestampRequest",[e,t])}sign(e,t,n,o,r,i,a){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("sign",[e,t,n,o,r,i,a])}restoreToOriginalState(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("restoreToOriginalState")}applyRedactions(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("applyRedactions",[])}readFormJSONObjects(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("readFormJSONObjects")}clearAPStreamCache(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("clearAPStreamCache")}setComparisonDocument(e,t){return this._assertLoaded(),t||this._assertDocumentOpen(),this._sendRequest("setComparisonDocument",[e,t])}openComparisonDocument(e){return this._assertLoaded(),this._hasOpenedDocument=!0,this._sendRequest("openComparisonDocument",[e]).catch((e=>{throw this._hasOpenedDocument=!1,e}))}documentCompareAndOpen(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("documentCompareAndOpen",[e])}persistOpenDocument(e){return this._assertLoaded(),e||this._assertDocumentOpen(),this._sendRequest("persistOpenDocument",[e])}cleanupDocumentComparison(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("cleanupDocumentComparison")}contentEditorEnter(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorEnter",[])}contentEditorExit(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorExit",[])}contentEditorGetTextBlocks(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorGetTextBlocks",[e])}contentEditorDetectParagraphs(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorDetectParagraphs",[e])}contentEditorRenderTextBlock(e,t,n){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorRenderTextBlock",[e,t,n])}contentEditorSetTextBlockCursor(e,t,n,o){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorSetTextBlockCursor",[e,t,n,o])}contentEditorMoveTextBlockCursor(e,t,n,o){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorMoveTextBlockCursor",[e,t,n,o])}contentEditorInsertTextBlockString(e,t,n,o){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorInsertTextBlockString",[e,t,n,o])}contentEditorInsertTextBlockContentRef(e,t,n,o){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorInsertTextBlockContentRef",[e,t,n,o])}contentEditorCreateTextBlock(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorCreateTextBlock",[e])}contentEditorLayoutTextBlock(e,t,n,o){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorLayoutTextBlock",[e,t,n,o])}contentEditorDeleteTextBlockRange(e,t,n){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorDeleteTextBlockRange",[e,t,n])}contentEditorDeleteTextBlockString(e,t,n){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorDeleteTextBlockString",[e,t,n])}contentEditorSetTextBlockSelection(e,t,n){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorSetTextBlockSelection",[e,t,n])}contentEditorSetTextBlockSelectionRange(e,t,n,o,r){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorSetTextBlockSelectionRange",[e,t,n,o,r])}contentEditorTextBlockUndo(e,t){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorTextBlockUndo",[e,t])}contentEditorTextBlockRedo(e,t){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorTextBlockRedo",[e,t])}contentEditorTextBlockRestore(e,t,n){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorTextBlockRestore",[e,t,n])}contentEditorTextBlockApplyFormat(e,t,n,o){return this._sendRequest("contentEditorTextBlockApplyFormat",[e,t,n,o])}contentEditorGetAvailableFaces(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorGetAvailableFaces",[])}contentEditorSave(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("contentEditorSave",[e])}getOCGs(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("getOCGs",[])}getOCGVisibilityState(){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("getOCGVisibilityState",[])}setOCGVisibilityState(e){return this._assertLoaded(),this._assertDocumentOpen(),this._sendRequest("setOCGVisibilityState",[e])}recycle(){this._hasLoadedCertificates&&this.loadCertificates([]),this._hasOpenedDocument&&this.closeDocument(),this._isLoading||this._requests.forEach(((e,t)=>{this._requests.set(t,{resolve:u,reject:u})}))}destroy(){var e;this._loadPromise=null,null===(e=this.workerSpawner)||void 0===e||e.terminate()}_assertLoaded(){if(this._isLoading)throw new r.p2("CoreClient not yet initialized")}_assertDocumentOpen(){if(!this._hasOpenedDocument)throw new r.p2("This method can not be called since there is no open document. Have you run PSPDFKit.unload()?")}_sendRequest(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];(0,r.kG)(this.workerSpawner,"CoreClient has been destroyed");const n=this.workerSpawner;return new Promise(((o,r)=>{const i=this._assignId(),a=[...t].filter((e=>e instanceof ArrayBuffer));n.postMessage({id:i,action:e,args:t},a),this._requests=this._requests.set(i,{resolve:o,reject:r})}))}_assignId(){const e=this._nextRequestId;return this._nextRequestId=this._nextRequestId+1,e}}n(17375),n(97528);var p=n(56664);(0,p.Z)();class f{constructor(e){(0,o.Z)(this,"size",1),(0,o.Z)(this,"_freeObjects",[]),this._constructor=e}checkOut(){let e;return e=this._freeObjects.length>0?this._freeObjects.shift():new this._constructor,{object:e,checkIn:()=>{this._freeObjects.length>=this.size?e.destroy():(e.recycle(),this._freeObjects.push(e))}}}}var h=n(47167),m=n.n(h);const g=async function(){let e=new(m());return{setMessageHandler(t){(0,r.kG)(e,"Worker is null"),e.onmessage=t},postMessage(t,n){var o;null===(o=e)||void 0===o||o.postMessage(t,n)},terminate(){var t;null===(t=e)||void 0===t||t.terminate(),e=null}}};function v(){return"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron/")>=0}function y(){const e=E()[atob("cmVxdWlyZQ==")];return v()&&"undefined"!=typeof window&&window&&window.process&&window.process.type&&"function"==typeof e}function b(){let e;try{e=P("@electron/remote")}catch(t){if("MODULE_NOT_FOUND"!==t.code)throw t;try{e=P("electron").remote}catch(e){(0,r.vU)(`Failed to load the remote module package. PSPDFKit for Web needs access to it in order to work in Electron.\n Please read our Electron guides to help you set it up: https://pspdfkit.com/getting-started/electron/\n ${t.message}\n ${e.message}`)}}return e}function w(){if(!v())return null;if(!y())return null;try{const e=P("fs"),t=b().app.getAppPath()+"/package.json";return JSON.parse(e.readFileSync(t).toString()).name}catch(e){throw new Error(`There was an error parsing this project's \`package.json\`: ${e.message}`)}}function S(){if(!v())return null;try{return`file://${b().app.getAppPath()}/node_modules/pspdfkit/dist/`}catch(e){return null}}function P(e){return(0,E()[atob("cmVxdWlyZQ==")])(e)}function E(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:n.g}function x(e,t){return"string"==typeof e&&(null==t?void 0:t.startsWith("Maui_"))}},72852:(e,t,n)=>{"use strict";n.d(t,{S:()=>r});var o=n(47347);async function r(e){try{const t=await fetch(e).catch((t=>{throw new o.p2(`Error fetching dynamic fonts file ${e}. ${t}`)}));if(200!==t.status)throw new o.p2(`Error fetching dynamic fonts file ${e}. Status code: ${t.status}`);return await t.json().catch((t=>{throw new o.p2(`Error parsing dynamic fonts file ${e}. ${t}`)}))}catch(e){throw e}}},46797:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(84121);class r{constructor(e){(0,o.Z)(this,"_subscriptions",new Set),this._state=e}getState(){return this._state}setState(e){this._state="function"==typeof e?e(this._state):e;for(const e of this._subscriptions)e(this._state)}subscribe(e){return this._subscriptions.add(e),()=>this.unsubscribe(e)}unsubscribe(e){this._subscriptions.delete(e)}}},75920:(e,t,n)=>{"use strict";n.d(t,{XV:()=>r,ZK:()=>a,a1:()=>o,cM:()=>i,um:()=>l,vU:()=>s});n(56664);function o(e){a(e)}function r(e,t,n){if(n)return o(`The API ${e} has been deprecated and will be removed in the next major release. Please use ${t} instead. Please go to https://pspdfkit.com/api/web/ for more informations`);o(`The function ${e} was deprecated and will be removed in future version. Please use ${t} instead.`)}function i(e){console.log(e)}function a(){console.warn(...arguments)}function s(e){console.error(e)}function l(){console.info(...arguments)}},87350:(e,t,n)=>{"use strict";n.d(t,{GO:()=>r,cO:()=>o});const o=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");function r(e){return Array.prototype.filter.call(e.querySelectorAll(o),(e=>!(e.inert||e.hasAttribute("inert")||"-1"===e.getAttribute("tabindex")||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length))))}},47347:(e,t,n)=>{"use strict";n.d(t,{p2:()=>r,Rz:()=>s,GB:()=>p,Qo:()=>S,$O:()=>d,FE:()=>m,Tr:()=>i,XV:()=>h.XV,a1:()=>h.a1,vU:()=>h.vU,H7:()=>w,um:()=>h.um,kG:()=>a,PO:()=>l,AK:()=>c,cM:()=>h.cM,lH:()=>P,wp:()=>f,Ou:()=>b,ZK:()=>h.ZK});const o=function e(t){let n;return n=t instanceof Error?t:new Error(t),Object.setPrototypeOf(n,e.prototype),n};o.prototype=Object.create(Error.prototype,{name:{value:"PSPDFKitError",enumerable:!1}});const r=o;function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t=>new o(""===e?t:`${e}: ${t}`)}function a(e,t){if(!e)throw new r(`Assertion failed: ${t||"Condition not met"}\n\nFor further assistance, please go to: https://pspdfkit.com/support/request`)}const s=e=>{throw new Error("")};function l(e){return"[object Object]"===Object.prototype.toString.call(e)}function c(e){const t=new MessageChannel;try{t.port1.postMessage(e)}catch(e){return!1}return!0}const u={keys:[]};function d(e,t){var n;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u;if(o={keys:null!=(null===(n=o)||void 0===n?void 0:n.keys)?o.keys:u.keys},Object.is(e,t))return[];let r=o.keys||[];if(0===r.length){r=[...new Set(Object.keys(e).concat(Object.keys(t)))]}const i=r.filter((n=>e[n]!==t[n]));return i.map((n=>({key:n,previous:e[n],current:t[n]})))}function p(e){return e.map((e=>{let{key:t,previous:n,current:o}=e;return`- ${t} was previously ${n}, but is now ${o}`})).join("\n")}function f(e){alert(e)}var h=n(75920);n(59271),n(87350),n(30667),n(46797);function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(2===t.length)return v(t[0],t[1])||null;const o=t.slice(1).reduce(((e,t)=>v(e,t)),t[0]);return o||null}const g=new WeakMap;function v(e,t){if(e&&t){const n=g.get(e)||new WeakMap;g.set(e,n);const o=n.get(t)||(n=>{y(e,n),y(t,n)});return n.set(t,o),o}return e||t}function y(e,t){"function"==typeof e?e(t):e.current=t}function b(e){a("object"==typeof e&&null!==e,"instantJSON must be an Object"),a("https://pspdfkit.com/instant-json/v1"===e.format,"instantJSON has an invalid format, please use 'https://pspdfkit.com/instant-json/v1");const{pdfId:t}=e;t&&a("object"==typeof t&&null!==t&&("string"==typeof t.permanent&&"string"==typeof t.changing||"string"!=typeof t.permanent&&"string"!=typeof t.changing),"instantJSON has an invalid pdfId"),a(void 0===e.skippedPdfObjectIds||Array.isArray(e.skippedPdfObjectIds),"instantJSON has invalid skippedPdfObjectIds"),a(void 0===e.annotations||Array.isArray(e.annotations)&&e.annotations.every((e=>"object"==typeof e&&null!==e)),"instantJSON has invalid annotations"),a(void 0===e.formFieldValues||Array.isArray(e.formFieldValues)&&e.formFieldValues.every((e=>"object"==typeof e&&null!==e)),"instantJSON has invalid form field values"),a(void 0===e.skippedPdfBookmarkIds||Array.isArray(e.skippedPdfBookmarkIds),"instantJSON has invalid skippedPdfBookmarkIds"),a(void 0===e.bookmarks||Array.isArray(e.bookmarks)&&e.bookmarks.every((e=>"object"==typeof e&&null!==e)),"instantJSON has invalid bookmarks")}function w(e){const t={};return Object.keys(e).forEach((n=>{Array.isArray(e[n])?t[n]=e[n].filter(Boolean):"object"==typeof e[n]&&null!==e[n]?t[n]=w(e[n]):t[n]=e[n]})),t}function S(e,t){if(t.caretRangeFromPoint)return t.caretRangeFromPoint(e.x,e.y);if("caretPositionFromPoint"in t&&"function"==typeof t.caretPositionFromPoint){const n=t.caretPositionFromPoint(e.x,e.y),o=t.createRange();return o.setStart(n.offsetNode,n.offset),o.setEnd(n.offsetNode,n.offset),o}}function P(e){return null!=e}},59271:(e,t,n)=>{"use strict";function o(e){return"true"===e.contentEditable||"INPUT"===e.tagName||"TEXTAREA"===e.tagName}n.d(t,{c:()=>o})},30667:(e,t,n)=>{"use strict";n.d(t,{AV:()=>v,Cp:()=>o,E$:()=>l,MS:()=>p,OC:()=>w,P9:()=>f,b8:()=>i,bs:()=>b,cS:()=>g,d2:()=>y,gs:()=>m,gx:()=>s,iT:()=>a,j4:()=>r,rw:()=>h,tW:()=>u,wG:()=>d,zz:()=>c});const o=48,r=70,i=71,a=80,s=90,l=13,c=27,u=32,d=34,p=33,f=37,h=38,m=39,g=40,v=187,y=189,b=8,w=9},25915:(e,t,n)=>{"use strict";n.d(t,{HJ:()=>$t,zx:()=>p,hE:()=>f,qe:()=>ht,M5:()=>vt,bK:()=>zn,FE:()=>Kt,ub:()=>mr,N9:()=>hr,nB:()=>gr,D:()=>er,Hp:()=>lr,F0:()=>Gt,w6:()=>Vt,z:()=>kn,QO:()=>gn,u_:()=>dn,Ex:()=>bn,Ee:()=>Rn,xv:()=>Cn,oi:()=>Fn,TX:()=>nn,ri:()=>o});var o={};n.r(o),n.d(o,{applyStyle:()=>qo,cssStringToObject:()=>xo,deserialize:()=>Po,escapeHtml:()=>bo,getComputedStyleAll:()=>Zo,getInnerHTML:()=>Io,getLastNCharacters:()=>_o,getSelectedNodesColor:()=>Uo,getStyleString:()=>Do,getText:()=>Oo,getWrapperTags:()=>To,isAtStartOfWordOrText:()=>No,isMarkActive:()=>Co,isRangeSelected:()=>Mo,isSelectionUnderlined:()=>Ho,parseHTML:()=>Ao,prepareHTML:()=>Fo,serialize:()=>Eo,setStyleOrToggleFormat:()=>jo,toHex:()=>zo,toggleMark:()=>ko,unwrapNode:()=>Wo,wrapNode:()=>Go});var r=n(22122),i=n(17375),a=n(67294),s=n(9327),l=n.n(s),c=n(38996),u=n.n(c);const d=["className","disabled","inverted","primary","danger","type"],p=e=>{const{className:t,disabled:n,inverted:o,primary:s,danger:c,type:p}=e,f=(0,i.Z)(e,d),h=l()({[u().general]:!0,[u().default]:!s,[u().primary]:s,[u().danger]:c,[u().disabled]:n,[u().inverted]:!n&&o},t);return a.createElement("button",(0,r.Z)({},f,{className:h,disabled:n,type:p||"button"}))},f=e=>{const{className:t,children:n,align:o,style:r}=e;let i=null;return a.createElement("div",{className:l()(u().group,"start"===o&&u().groupAlignStart,"end"===o&&u().groupAlignEnd,t),style:r},a.Children.map(n,(e=>e?i?(i=e,a.createElement(a.Fragment,null,a.createElement("div",{className:u().groupSpacer}),e)):(i=e,e):null)))};function h(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function m(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function g(e){m(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function v(e,t){m(2,arguments);var n=g(e).getTime(),o=h(t);return new Date(n+o)}function y(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}Math.pow(10,8);function b(e){m(1,arguments);var t=g(e);return!isNaN(t)}var w={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function S(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,o=e.formats[n]||e.formats[e.defaultWidth];return o}}var P={date:S({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:S({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:S({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};var E={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function x(e){return function(t,n){var o,r=n||{};if("formatting"===(r.context?String(r.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,a=r.width?String(r.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{var s=e.defaultWidth,l=r.width?String(r.width):e.defaultWidth;o=e.values[l]||e.values[s]}return o[e.argumentCallback?e.argumentCallback(t):t]}}function D(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.width,r=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],i=t.match(r);if(!i)return null;var a,s=i[0],l=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?k(l,(function(e){return e.test(s)})):C(l,(function(e){return e.test(s)}));a=e.valueCallback?e.valueCallback(c):c,a=n.valueCallback?n.valueCallback(a):a;var u=t.slice(s.length);return{value:a,rest:u}}}function C(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function k(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}var O;const A={code:"en-US",formatDistance:function(e,t,n){var o;return n=n||{},o="string"==typeof w[e]?w[e]:1===t?w[e].one:w[e].other.replace("{{count}}",t),n.addSuffix?n.comparison>0?"in "+o:o+" ago":o},formatLong:P,formatRelative:function(e,t,n,o){return E[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),o=n%100;if(o>20||o<10)switch(o%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:x({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:x({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:x({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:x({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:x({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(O={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(O.matchPattern);if(!n)return null;var o=n[0],r=e.match(O.parsePattern);if(!r)return null;var i=O.valueCallback?O.valueCallback(r[0]):r[0];i=t.valueCallback?t.valueCallback(i):i;var a=e.slice(o.length);return{value:i,rest:a}}),era:D({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:D({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:D({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:D({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:D({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function T(e,t){m(2,arguments);var n=h(t);return v(e,-n)}function I(e,t){for(var n=e<0?"-":"",o=Math.abs(e).toString();o.length<t;)o="0"+o;return n+o}var F={y:function(e,t){var n=e.getUTCFullYear(),o=n>0?n:1-n;return I("yy"===t?o%100:o,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):I(n+1,2)},d:function(e,t){return I(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return I(e.getUTCHours()%12||12,t.length)},H:function(e,t){return I(e.getUTCHours(),t.length)},m:function(e,t){return I(e.getUTCMinutes(),t.length)},s:function(e,t){return I(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,o=e.getUTCMilliseconds();return I(Math.floor(o*Math.pow(10,n-3)),t.length)}};const M=F;var _=864e5;function N(e){m(1,arguments);var t=1,n=g(e),o=n.getUTCDay(),r=(o<t?7:0)+o-t;return n.setUTCDate(n.getUTCDate()-r),n.setUTCHours(0,0,0,0),n}function R(e){m(1,arguments);var t=g(e),n=t.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(n+1,0,4),o.setUTCHours(0,0,0,0);var r=N(o),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var a=N(i);return t.getTime()>=r.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function L(e){m(1,arguments);var t=R(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var o=N(n);return o}var B=6048e5;function j(e){m(1,arguments);var t=g(e),n=N(t).getTime()-L(t).getTime();return Math.round(n/B)+1}function z(e,t){m(1,arguments);var n=t||{},o=n.locale,r=o&&o.options&&o.options.weekStartsOn,i=null==r?0:h(r),a=null==n.weekStartsOn?i:h(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=g(e),l=s.getUTCDay(),c=(l<a?7:0)+l-a;return s.setUTCDate(s.getUTCDate()-c),s.setUTCHours(0,0,0,0),s}function K(e,t){m(1,arguments);var n=g(e,t),o=n.getUTCFullYear(),r=t||{},i=r.locale,a=i&&i.options&&i.options.firstWeekContainsDate,s=null==a?1:h(a),l=null==r.firstWeekContainsDate?s:h(r.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=new Date(0);c.setUTCFullYear(o+1,0,l),c.setUTCHours(0,0,0,0);var u=z(c,t),d=new Date(0);d.setUTCFullYear(o,0,l),d.setUTCHours(0,0,0,0);var p=z(d,t);return n.getTime()>=u.getTime()?o+1:n.getTime()>=p.getTime()?o:o-1}function Z(e,t){m(1,arguments);var n=t||{},o=n.locale,r=o&&o.options&&o.options.firstWeekContainsDate,i=null==r?1:h(r),a=null==n.firstWeekContainsDate?i:h(n.firstWeekContainsDate),s=K(e,t),l=new Date(0);l.setUTCFullYear(s,0,a),l.setUTCHours(0,0,0,0);var c=z(l,t);return c}var U=6048e5;function V(e,t){m(1,arguments);var n=g(e),o=z(n,t).getTime()-Z(n,t).getTime();return Math.round(o/U)+1}var G="midnight",W="noon",q="morning",H="afternoon",$="evening",X="night",Y={G:function(e,t,n){var o=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(o,{width:"abbreviated"});case"GGGGG":return n.era(o,{width:"narrow"});default:return n.era(o,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var o=e.getUTCFullYear(),r=o>0?o:1-o;return n.ordinalNumber(r,{unit:"year"})}return M.y(e,t)},Y:function(e,t,n,o){var r=K(e,o),i=r>0?r:1-r;return"YY"===t?I(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):I(i,t.length)},R:function(e,t){return I(R(e),t.length)},u:function(e,t){return I(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var o=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return I(o,2);case"Qo":return n.ordinalNumber(o,{unit:"quarter"});case"QQQ":return n.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(o,{width:"narrow",context:"formatting"});default:return n.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,n){var o=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return I(o,2);case"qo":return n.ordinalNumber(o,{unit:"quarter"});case"qqq":return n.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(o,{width:"narrow",context:"standalone"});default:return n.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,n){var o=e.getUTCMonth();switch(t){case"M":case"MM":return M.M(e,t);case"Mo":return n.ordinalNumber(o+1,{unit:"month"});case"MMM":return n.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(o,{width:"narrow",context:"formatting"});default:return n.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,n){var o=e.getUTCMonth();switch(t){case"L":return String(o+1);case"LL":return I(o+1,2);case"Lo":return n.ordinalNumber(o+1,{unit:"month"});case"LLL":return n.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(o,{width:"narrow",context:"standalone"});default:return n.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,n,o){var r=V(e,o);return"wo"===t?n.ordinalNumber(r,{unit:"week"}):I(r,t.length)},I:function(e,t,n){var o=j(e);return"Io"===t?n.ordinalNumber(o,{unit:"week"}):I(o,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):M.d(e,t)},D:function(e,t,n){var o=function(e){m(1,arguments);var t=g(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var o=t.getTime(),r=n-o;return Math.floor(r/_)+1}(e);return"Do"===t?n.ordinalNumber(o,{unit:"dayOfYear"}):I(o,t.length)},E:function(e,t,n){var o=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,n,o){var r=e.getUTCDay(),i=(r-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return I(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,o){var r=e.getUTCDay(),i=(r-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return I(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){var o=e.getUTCDay(),r=0===o?7:o;switch(t){case"i":return String(r);case"ii":return I(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,n){var o=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){var o,r=e.getUTCHours();switch(o=12===r?W:0===r?G:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){var o,r=e.getUTCHours();switch(o=r>=17?$:r>=12?H:r>=4?q:X,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var o=e.getUTCHours()%12;return 0===o&&(o=12),n.ordinalNumber(o,{unit:"hour"})}return M.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):M.H(e,t)},K:function(e,t,n){var o=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(o,{unit:"hour"}):I(o,t.length)},k:function(e,t,n){var o=e.getUTCHours();return 0===o&&(o=24),"ko"===t?n.ordinalNumber(o,{unit:"hour"}):I(o,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):M.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):M.s(e,t)},S:function(e,t){return M.S(e,t)},X:function(e,t,n,o){var r=(o._originalDate||e).getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Q(r);case"XXXX":case"XX":return ee(r);default:return ee(r,":")}},x:function(e,t,n,o){var r=(o._originalDate||e).getTimezoneOffset();switch(t){case"x":return Q(r);case"xxxx":case"xx":return ee(r);default:return ee(r,":")}},O:function(e,t,n,o){var r=(o._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+J(r,":");default:return"GMT"+ee(r,":")}},z:function(e,t,n,o){var r=(o._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+J(r,":");default:return"GMT"+ee(r,":")}},t:function(e,t,n,o){var r=o._originalDate||e;return I(Math.floor(r.getTime()/1e3),t.length)},T:function(e,t,n,o){return I((o._originalDate||e).getTime(),t.length)}};function J(e,t){var n=e>0?"-":"+",o=Math.abs(e),r=Math.floor(o/60),i=o%60;if(0===i)return n+String(r);var a=t||"";return n+String(r)+a+I(i,2)}function Q(e,t){return e%60==0?(e>0?"-":"+")+I(Math.abs(e)/60,2):ee(e,t)}function ee(e,t){var n=t||"",o=e>0?"-":"+",r=Math.abs(e);return o+I(Math.floor(r/60),2)+n+I(r%60,2)}const te=Y;function ne(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}}function oe(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}}var re={p:oe,P:function(e,t){var n,o=e.match(/(P+)(p+)?/),r=o[1],i=o[2];if(!i)return ne(e,t);switch(r){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",ne(r,t)).replace("{{time}}",oe(i,t))}};const ie=re;var ae=["D","DD"],se=["YY","YYYY"];function le(e){return-1!==ae.indexOf(e)}function ce(e){return-1!==se.indexOf(e)}function ue(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var de=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fe=/^'([^]*?)'?$/,he=/''/g,me=/[a-zA-Z]/;function ge(e,t,n){m(2,arguments);var o=String(t),r=n||{},i=r.locale||A,a=i.options&&i.options.firstWeekContainsDate,s=null==a?1:h(a),l=null==r.firstWeekContainsDate?s:h(r.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=i.options&&i.options.weekStartsOn,u=null==c?0:h(c),d=null==r.weekStartsOn?u:h(r.weekStartsOn);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!i.localize)throw new RangeError("locale must contain localize property");if(!i.formatLong)throw new RangeError("locale must contain formatLong property");var p=g(e);if(!b(p))throw new RangeError("Invalid time value");var f=y(p),v=T(p,f),w={firstWeekContainsDate:l,weekStartsOn:d,locale:i,_originalDate:p},S=o.match(pe).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,ie[t])(e,i.formatLong,w):e})).join("").match(de).map((function(n){if("''"===n)return"'";var o=n[0];if("'"===o)return ve(n);var a=te[o];if(a)return!r.useAdditionalWeekYearTokens&&ce(n)&&ue(n,t,e),!r.useAdditionalDayOfYearTokens&&le(n)&&ue(n,t,e),a(v,n,i.localize,w);if(o.match(me))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return n})).join("");return S}function ve(e){return e.match(fe)[1].replace(he,"'")}function ye(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t=t||{})Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function be(e,t,n){m(2,arguments);var o=n||{},r=o.locale,i=r&&r.options&&r.options.weekStartsOn,a=null==i?0:h(i),s=null==o.weekStartsOn?a:h(o.weekStartsOn);if(!(s>=0&&s<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=g(e),c=h(t),u=l.getUTCDay(),d=c%7,p=(d+7)%7,f=(p<s?7:0)+c-u;return l.setUTCDate(l.getUTCDate()+f),l}var we=/^(1[0-2]|0?\d)/,Se=/^(3[0-1]|[0-2]?\d)/,Pe=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Ee=/^(5[0-3]|[0-4]?\d)/,xe=/^(2[0-3]|[0-1]?\d)/,De=/^(2[0-4]|[0-1]?\d)/,Ce=/^(1[0-1]|0?\d)/,ke=/^(1[0-2]|0?\d)/,Oe=/^[0-5]?\d/,Ae=/^[0-5]?\d/,Te=/^\d/,Ie=/^\d{1,2}/,Fe=/^\d{1,3}/,Me=/^\d{1,4}/,_e=/^-?\d+/,Ne=/^-?\d/,Re=/^-?\d{1,2}/,Le=/^-?\d{1,3}/,Be=/^-?\d{1,4}/,je=/^([+-])(\d{2})(\d{2})?|Z/,ze=/^([+-])(\d{2})(\d{2})|Z/,Ke=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Ze=/^([+-])(\d{2}):(\d{2})|Z/,Ue=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Ve(e,t,n){var o=t.match(e);if(!o)return null;var r=parseInt(o[0],10);return{value:n?n(r):r,rest:t.slice(o[0].length)}}function Ge(e,t){var n=t.match(e);return n?"Z"===n[0]?{value:0,rest:t.slice(1)}:{value:("+"===n[1]?1:-1)*(36e5*(n[2]?parseInt(n[2],10):0)+6e4*(n[3]?parseInt(n[3],10):0)+1e3*(n[5]?parseInt(n[5],10):0)),rest:t.slice(n[0].length)}:null}function We(e,t){return Ve(_e,e,t)}function qe(e,t,n){switch(e){case 1:return Ve(Te,t,n);case 2:return Ve(Ie,t,n);case 3:return Ve(Fe,t,n);case 4:return Ve(Me,t,n);default:return Ve(new RegExp("^\\d{1,"+e+"}"),t,n)}}function He(e,t,n){switch(e){case 1:return Ve(Ne,t,n);case 2:return Ve(Re,t,n);case 3:return Ve(Le,t,n);case 4:return Ve(Be,t,n);default:return Ve(new RegExp("^-?\\d{1,"+e+"}"),t,n)}}function $e(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Xe(e,t){var n,o=t>0,r=o?t:1-t;if(r<=50)n=e||100;else{var i=r+50;n=e+100*Math.floor(i/100)-(e>=i%100?100:0)}return o?n:1-n}var Ye=[31,28,31,30,31,30,31,31,30,31,30,31],Je=[31,29,31,30,31,30,31,31,30,31,30,31];function Qe(e){return e%400==0||e%4==0&&e%100!=0}var et={G:{priority:140,parse:function(e,t,n,o){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}},set:function(e,t,n,o){return t.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["R","u","t","T"]},y:{priority:130,parse:function(e,t,n,o){var r=function(e){return{year:e,isTwoDigitYear:"yy"===t}};switch(t){case"y":return qe(4,e,r);case"yo":return n.ordinalNumber(e,{unit:"year",valueCallback:r});default:return qe(t.length,e,r)}},validate:function(e,t,n){return t.isTwoDigitYear||t.year>0},set:function(e,t,n,o){var r=e.getUTCFullYear();if(n.isTwoDigitYear){var i=Xe(n.year,r);return e.setUTCFullYear(i,0,1),e.setUTCHours(0,0,0,0),e}var a="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(a,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","u","w","I","i","e","c","t","T"]},Y:{priority:130,parse:function(e,t,n,o){var r=function(e){return{year:e,isTwoDigitYear:"YY"===t}};switch(t){case"Y":return qe(4,e,r);case"Yo":return n.ordinalNumber(e,{unit:"year",valueCallback:r});default:return qe(t.length,e,r)}},validate:function(e,t,n){return t.isTwoDigitYear||t.year>0},set:function(e,t,n,o){var r=K(e,o);if(n.isTwoDigitYear){var i=Xe(n.year,r);return e.setUTCFullYear(i,0,o.firstWeekContainsDate),e.setUTCHours(0,0,0,0),z(e,o)}var a="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(a,0,o.firstWeekContainsDate),e.setUTCHours(0,0,0,0),z(e,o)},incompatibleTokens:["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:{priority:130,parse:function(e,t,n,o){return He("R"===t?4:t.length,e)},set:function(e,t,n,o){var r=new Date(0);return r.setUTCFullYear(n,0,4),r.setUTCHours(0,0,0,0),N(r)},incompatibleTokens:["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:{priority:130,parse:function(e,t,n,o){return He("u"===t?4:t.length,e)},set:function(e,t,n,o){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["G","y","Y","R","w","I","i","e","c","t","T"]},Q:{priority:120,parse:function(e,t,n,o){switch(t){case"Q":case"QQ":return qe(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=1&&t<=4},set:function(e,t,n,o){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:{priority:120,parse:function(e,t,n,o){switch(t){case"q":case"qq":return qe(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=1&&t<=4},set:function(e,t,n,o){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:{priority:110,parse:function(e,t,n,o){var r=function(e){return e-1};switch(t){case"M":return Ve(we,e,r);case"MM":return qe(2,e,r);case"Mo":return n.ordinalNumber(e,{unit:"month",valueCallback:r});case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,o){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]},L:{priority:110,parse:function(e,t,n,o){var r=function(e){return e-1};switch(t){case"L":return Ve(we,e,r);case"LL":return qe(2,e,r);case"Lo":return n.ordinalNumber(e,{unit:"month",valueCallback:r});case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,o){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:{priority:100,parse:function(e,t,n,o){switch(t){case"w":return Ve(Ee,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return qe(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=53},set:function(e,t,n,o){return z(function(e,t,n){m(2,arguments);var o=g(e),r=h(t),i=V(o,n)-r;return o.setUTCDate(o.getUTCDate()-7*i),o}(e,n,o),o)},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:{priority:100,parse:function(e,t,n,o){switch(t){case"I":return Ve(Ee,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return qe(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=53},set:function(e,t,n,o){return N(function(e,t){m(2,arguments);var n=g(e),o=h(t),r=j(n)-o;return n.setUTCDate(n.getUTCDate()-7*r),n}(e,n,o),o)},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:{priority:90,subPriority:1,parse:function(e,t,n,o){switch(t){case"d":return Ve(Se,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return qe(t.length,e)}},validate:function(e,t,n){var o=Qe(e.getUTCFullYear()),r=e.getUTCMonth();return o?t>=1&&t<=Je[r]:t>=1&&t<=Ye[r]},set:function(e,t,n,o){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:{priority:90,subPriority:1,parse:function(e,t,n,o){switch(t){case"D":case"DD":return Ve(Pe,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return qe(t.length,e)}},validate:function(e,t,n){return Qe(e.getUTCFullYear())?t>=1&&t<=366:t>=1&&t<=365},set:function(e,t,n,o){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:{priority:90,parse:function(e,t,n,o){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,o){return(e=be(e,n,o)).setUTCHours(0,0,0,0),e},incompatibleTokens:["D","i","e","c","t","T"]},e:{priority:90,parse:function(e,t,n,o){var r=function(e){var t=7*Math.floor((e-1)/7);return(e+o.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return qe(t.length,e,r);case"eo":return n.ordinalNumber(e,{unit:"day",valueCallback:r});case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,o){return(e=be(e,n,o)).setUTCHours(0,0,0,0),e},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:{priority:90,parse:function(e,t,n,o){var r=function(e){var t=7*Math.floor((e-1)/7);return(e+o.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return qe(t.length,e,r);case"co":return n.ordinalNumber(e,{unit:"day",valueCallback:r});case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,o){return(e=be(e,n,o)).setUTCHours(0,0,0,0),e},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:{priority:90,parse:function(e,t,n,o){var r=function(e){return 0===e?7:e};switch(t){case"i":case"ii":return qe(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return n.day(e,{width:"abbreviated",context:"formatting",valueCallback:r})||n.day(e,{width:"short",context:"formatting",valueCallback:r})||n.day(e,{width:"narrow",context:"formatting",valueCallback:r});case"iiiii":return n.day(e,{width:"narrow",context:"formatting",valueCallback:r});case"iiiiii":return n.day(e,{width:"short",context:"formatting",valueCallback:r})||n.day(e,{width:"narrow",context:"formatting",valueCallback:r});default:return n.day(e,{width:"wide",context:"formatting",valueCallback:r})||n.day(e,{width:"abbreviated",context:"formatting",valueCallback:r})||n.day(e,{width:"short",context:"formatting",valueCallback:r})||n.day(e,{width:"narrow",context:"formatting",valueCallback:r})}},validate:function(e,t,n){return t>=1&&t<=7},set:function(e,t,n,o){return e=function(e,t){m(2,arguments);var n=h(t);n%7==0&&(n-=7);var o=1,r=g(e),i=r.getUTCDay(),a=((n%7+7)%7<o?7:0)+n-i;return r.setUTCDate(r.getUTCDate()+a),r}(e,n,o),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:{priority:80,parse:function(e,t,n,o){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,o){return e.setUTCHours($e(n),0,0,0),e},incompatibleTokens:["b","B","H","K","k","t","T"]},b:{priority:80,parse:function(e,t,n,o){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,o){return e.setUTCHours($e(n),0,0,0),e},incompatibleTokens:["a","B","H","K","k","t","T"]},B:{priority:80,parse:function(e,t,n,o){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,o){return e.setUTCHours($e(n),0,0,0),e},incompatibleTokens:["a","b","t","T"]},h:{priority:70,parse:function(e,t,n,o){switch(t){case"h":return Ve(ke,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return qe(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=12},set:function(e,t,n,o){var r=e.getUTCHours()>=12;return r&&n<12?e.setUTCHours(n+12,0,0,0):r||12!==n?e.setUTCHours(n,0,0,0):e.setUTCHours(0,0,0,0),e},incompatibleTokens:["H","K","k","t","T"]},H:{priority:70,parse:function(e,t,n,o){switch(t){case"H":return Ve(xe,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return qe(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=23},set:function(e,t,n,o){return e.setUTCHours(n,0,0,0),e},incompatibleTokens:["a","b","h","K","k","t","T"]},K:{priority:70,parse:function(e,t,n,o){switch(t){case"K":return Ve(Ce,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return qe(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,o){return e.getUTCHours()>=12&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e},incompatibleTokens:["a","b","h","H","k","t","T"]},k:{priority:70,parse:function(e,t,n,o){switch(t){case"k":return Ve(De,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return qe(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=24},set:function(e,t,n,o){var r=n<=24?n%24:n;return e.setUTCHours(r,0,0,0),e},incompatibleTokens:["a","b","h","H","K","t","T"]},m:{priority:60,parse:function(e,t,n,o){switch(t){case"m":return Ve(Oe,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return qe(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=59},set:function(e,t,n,o){return e.setUTCMinutes(n,0,0),e},incompatibleTokens:["t","T"]},s:{priority:50,parse:function(e,t,n,o){switch(t){case"s":return Ve(Ae,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return qe(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=59},set:function(e,t,n,o){return e.setUTCSeconds(n,0),e},incompatibleTokens:["t","T"]},S:{priority:30,parse:function(e,t,n,o){return qe(t.length,e,(function(e){return Math.floor(e*Math.pow(10,3-t.length))}))},set:function(e,t,n,o){return e.setUTCMilliseconds(n),e},incompatibleTokens:["t","T"]},X:{priority:10,parse:function(e,t,n,o){switch(t){case"X":return Ge(je,e);case"XX":return Ge(ze,e);case"XXXX":return Ge(Ke,e);case"XXXXX":return Ge(Ue,e);default:return Ge(Ze,e)}},set:function(e,t,n,o){return t.timestampIsSet?e:new Date(e.getTime()-n)},incompatibleTokens:["t","T","x"]},x:{priority:10,parse:function(e,t,n,o){switch(t){case"x":return Ge(je,e);case"xx":return Ge(ze,e);case"xxxx":return Ge(Ke,e);case"xxxxx":return Ge(Ue,e);default:return Ge(Ze,e)}},set:function(e,t,n,o){return t.timestampIsSet?e:new Date(e.getTime()-n)},incompatibleTokens:["t","T","X"]},t:{priority:40,parse:function(e,t,n,o){return We(e)},set:function(e,t,n,o){return[new Date(1e3*n),{timestampIsSet:!0}]},incompatibleTokens:"*"},T:{priority:20,parse:function(e,t,n,o){return We(e)},set:function(e,t,n,o){return[new Date(n),{timestampIsSet:!0}]},incompatibleTokens:"*"}};const tt=et;var nt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ot=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rt=/^'([^]*?)'?$/,it=/''/g,at=/\S/,st=/[a-zA-Z]/;function lt(e,t,n,o){m(3,arguments);var r=String(e),i=String(t),a=o||{},s=a.locale||A;if(!s.match)throw new RangeError("locale must contain match property");var l=s.options&&s.options.firstWeekContainsDate,c=null==l?1:h(l),u=null==a.firstWeekContainsDate?c:h(a.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var d=s.options&&s.options.weekStartsOn,p=null==d?0:h(d),f=null==a.weekStartsOn?p:h(a.weekStartsOn);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===i)return""===r?g(n):new Date(NaN);var v,b={firstWeekContainsDate:u,weekStartsOn:f,locale:s},w=[{priority:10,subPriority:-1,set:ct,index:0}],S=i.match(ot).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,ie[t])(e,s.formatLong,b):e})).join("").match(nt),P=[];for(v=0;v<S.length;v++){var E=S[v];!a.useAdditionalWeekYearTokens&&ce(E)&&ue(E,i,e),!a.useAdditionalDayOfYearTokens&&le(E)&&ue(E,i,e);var x=E[0],D=tt[x];if(D){var C=D.incompatibleTokens;if(Array.isArray(C)){for(var k=void 0,O=0;O<P.length;O++){var I=P[O].token;if(-1!==C.indexOf(I)||I===x){k=P[O];break}}if(k)throw new RangeError("The format string mustn't contain `".concat(k.fullToken,"` and `").concat(E,"` at the same time"))}else if("*"===D.incompatibleTokens&&P.length)throw new RangeError("The format string mustn't contain `".concat(E,"` and any other token at the same time"));P.push({token:x,fullToken:E});var F=D.parse(r,E,s.match,b);if(!F)return new Date(NaN);w.push({priority:D.priority,subPriority:D.subPriority||0,set:D.set,validate:D.validate,value:F.value,index:w.length}),r=F.rest}else{if(x.match(st))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");if("''"===E?E="'":"'"===x&&(E=ut(E)),0!==r.indexOf(E))return new Date(NaN);r=r.slice(E.length)}}if(r.length>0&&at.test(r))return new Date(NaN);var M=w.map((function(e){return e.priority})).sort((function(e,t){return t-e})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return w.filter((function(t){return t.priority===e})).sort((function(e,t){return t.subPriority-e.subPriority}))})).map((function(e){return e[0]})),_=g(n);if(isNaN(_))return new Date(NaN);var N=T(_,y(_)),R={};for(v=0;v<M.length;v++){var L=M[v];if(L.validate&&!L.validate(N,L.value,b))return new Date(NaN);var B=L.set(N,R,L.value,b);B[0]?(N=B[0],ye(R,B[1])):N=B}return N}function ct(e,t){if(t.timestampIsSet)return e;var n=new Date(0);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}function ut(e){return e.match(rt)[1].replace(it,"'")}var dt=n(61431),pt=n.n(dt),ft=n(36095);const ht=a.forwardRef(((e,t)=>{const n=a.useRef(null),o=a.useRef(null),[r,i]=a.useState(!1);a.useImperativeHandle(t,(()=>n.current));const s=e.format.split("").map((e=>{switch(e){case"m":return"M";case"M":return"m"}return e})).join(""),c=ft.i7||ft.TL||"date"===e.type,u=t=>{const r=n.current,a=o.current;if(!r)return;const s=r.ownerDocument.activeElement;s!==r&&s!==a&&(e.onBlur&&e.onBlur(t),i(!1))},d=t=>{!r&&e.onFocus&&(e.onFocus(t),i(!0)),i(!0)},p=()=>{switch(e.type){case"date":return"yyyy-MM-dd";case"time":return"HH:mm";case"datetime-local":return"yyyy-MM-dd'T'HH:mm"}};return a.createElement("div",{className:pt().wrapper},a.createElement("input",{"data-testid":"input",ref:n,name:e.name,value:e.value,style:e.style,className:l()(pt().input,e.className,"PSPDFKit-Annotation-Widget-Date-Input"),type:"text",disabled:e.disabled,maxLength:e.maxLength,placeholder:e.format,required:e.required,onChange:t=>{const r=n.current,i=o.current;if(r){const n=lt(r.value,s,new Date);!0===b(n)&&i&&(i.value=ge(n,p())),e.onChange&&e.onChange(t)}},onBlur:u,onFocus:d}),c?a.createElement("div",{style:{opacity:r?1:0},className:pt().pickerWidget},a.createElement("input",{"data-testid":"picker",ref:o,className:pt().picker,type:e.type,onChange:t=>{const r=n.current,i=o.current;if(r&&i){var a;const n=lt(i.value,p(),new Date);b(n)&&i&&(r.value=ge(n,s)),null===(a=e.onChange)||void 0===a||a.call(e,t)}},onBlur:u,onFocus:d})):null)}));ht.defaultProps={};var mt=n(81585),gt=n.n(mt);function vt(e){let{children:t,className:n}=e;return a.createElement("div",{className:l()(gt().center,n)},t)}var yt=n(84121),bt=n(79153),wt=n(71634),St=n(35369),Pt=n(12459),Et=n.n(Pt);const xt=e=>{const{onDragOver:t}=e,[,n]=(0,bt.c0)({type:Dt,item:()=>(e.onDragStart&&e.onDragStart(e.index),{id:e.index,type:Dt}),canDrag:()=>e.draggable||!1,end:()=>{e.onDragEnd&&e.onDragEnd()}}),[,o]=(0,bt.LW)({accept:Dt,hover:(n,o)=>{t&&t(e.index,o.getClientOffset())}});return a.createElement("div",{"data-id":e.index,ref:o},a.createElement("div",{ref:n,className:Et().item},a.createElement("div",{className:Et().content},e.children)))},Dt="ITEM",Ct=e=>{const{renderItem:t}=e,{item:n,isDragging:o,currentOffset:r}=(0,bt.f$)((e=>({item:e.getItem(),currentOffset:e.getSourceClientOffset(),isDragging:e.isDragging()}))),i=a.useMemo((()=>o?a.createElement(xt,{index:n.id},t(n.id)):null),[o,n,t]);if(!o||!r)return null;const{x:s,y:l}=r;return a.createElement("div",{className:Et().dragPreview},a.createElement("div",{style:{transform:`translate(${s}px, ${l}px)`}},i))};var kt=n(34855);function Ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function At(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ot(Object(n),!0).forEach((function(t){(0,yt.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Tt=e=>{const{scrollY:t=0,onViewportChange:n,initialForcedScrollY:o}=e,[r,i]=a.useState(null),[s,l]=a.useState({height:0,width:0,scrollY:0}),c=a.useRef(null),u=a.useRef(null),d=a.useRef(0);a.useLayoutEffect((()=>{r&&(r.scrollTop=t)}),[r,t]),a.useLayoutEffect((()=>{r&&"number"==typeof o&&(r.scrollTop=o)}),[r,o]);const{currentOffset:p,isDragging:f}=(0,bt.f$)((e=>({isDragging:e.isDragging(),currentOffset:e.getClientOffset()}))),h=a.useCallback((()=>{const{clientWidth:e=0,clientHeight:t=0}=r||{},n=e||0,o=t||0;n===s.width&&o===s.height||l(At(At({},s),{},{width:n||0,height:o||0}))}),[r,s]),m=a.useCallback((e=>{const t=e.currentTarget.scrollTop,n=At(At({},s),{},{scrollY:t});s.scrollY!==t&&l(n)}),[s]);a.useLayoutEffect((()=>{n(s)}),[n,s]),a.useEffect((()=>{c.current=null==r?void 0:r.getBoundingClientRect(),h()}),[r,h]);const g=a.useCallback((()=>{clearInterval(u.current),u.current=null}),[]),v=a.useCallback((e=>{g(),r&&d.current!==e&&(g(),u.current=setInterval((()=>{r.scrollBy(0,e)}),Nt),d.current=e)}),[r,g]);a.useEffect((()=>{if(!c.current||!p)return void g();const{height:e}=c.current,t=p.y<It,n=p.y>e-It,o=p.y,r=e-p.y,i=Ft+(It-(t?o:r))/It*(Mt-Ft);!u.current||t||n?t?v(-_t*i):n&&v(_t*i):g()}),[p,v,g]);const y={position:"relative",width:"100%",height:"100%",overflowX:"hidden",overflowY:f&&(0,ft.b1)()?"hidden":"scroll"},b=a.useRef(null);return a.useEffect((()=>{var e;b.current&&(null===(e=b.current)||void 0===e||e.focus({preventScroll:!0}))})),a.createElement("div",{"data-testid":"scroll",ref:e=>i(e),style:y,onScroll:m},a.createElement(kt.Z,{onResize:h}),r?e.renderContent(s,b):null)},It=50,Ft=.5,Mt=1,_t=10,Nt=1;var Rt=n(47347);class Lt{constructor(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;(0,yt.Z)(this,"itemWidth",0),(0,yt.Z)(this,"itemHeight",0),(0,yt.Z)(this,"itemPaddingLeft",0),(0,yt.Z)(this,"itemPaddingRight",0),(0,yt.Z)(this,"totalItems",0),(0,Rt.kG)(e>0,"You must provide an item width of greater than 0"),(0,Rt.kG)(t>0,"You must provide an item height of greater than 0"),(0,Rt.kG)(o>=0,"Padding must be greater than 0"),(0,Rt.kG)(r>=0,"Padding must be greater than 0"),this.itemWidth=e,this.itemHeight=t,this.totalItems=n,this.itemPaddingLeft=o,this.itemPaddingRight=r}contentHeight(e){const t=this.itemsPerRow(e);return Math.ceil(this.totalItems/t)*this.itemHeight}itemsPerRow(e){return Math.max(Math.floor(e.width/this.itemWidth),1)}layoutAttributesForItemsIn(e){const{scrollY:t,height:n}=e,o=this.itemsPerRow(e),r=Math.ceil(this.totalItems/o),i=t?Math.floor(t/this.itemHeight):0,a=Math.ceil(n/this.itemHeight),s=Math.max(i-Bt,0),l=Math.min(i+a+Bt,r),c=[];for(let t=s*o;t<l*o;t++)c.push(this.layoutAttributeForItemAt(e,t));return c}layoutAttributeForItemAt(e,t){const{width:n}=e,o=this.itemsPerRow(e),r=o*this.itemWidth,i=Math.max((n-r)/(o+1),0),a=Math.floor(t/o);return{index:t,left:(this.itemWidth+i)*(t%o)+i,top:this.itemHeight*a,width:this.itemWidth,height:this.itemHeight}}layoutAttributeForInsertionCursor(e,t,n){const o=this.itemsPerRow(e),r=o+1,i=Math.floor((t||n)/o),a=(n+i)%r,s=this.itemWidth*o,l=(e.width-s)/r,c=a===o;let u=(l+this.itemWidth)*a;return 0===a?u+=this.itemPaddingLeft:c&&(u-=this.itemPaddingRight),{index:n,left:u,top:this.itemHeight*i,width:l,height:this.itemHeight,atRowEnd:c}}}const Bt=2;function jt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function zt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jt(Object(n),!0).forEach((function(t){(0,yt.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Kt=e=>{var t;const{draggingEnabled:n=!1,totalItems:o,itemHeight:r,itemWidth:i,itemPaddingLeft:s,itemPaddingRight:l,selectedItemIndexes:c=(0,St.l4)(),canInsert:u,renderDragPreview:d,renderInsertionCursor:p,focusedItemIndex:f}=e,[h,m]=a.useState(null),g=a.useRef(null),v=a.useRef(null),y=a.useRef(null),[b,w]=a.useState((0,St.l4)([])),S=new Lt(i,r,o,s,l),[P,E]=a.useState(0);a.useLayoutEffect((()=>{0!==c.size&&(e=>{const t=v.current;if(0===e.size)return;if(!t)return;const n=t.height+t.scrollY,o=e=>{const o=e.top+e.height/2;return o>t.scrollY&&o<n};let r=S.layoutAttributesForItemsIn(t);r=r.filter((t=>e.has(t.index)));if(r.filter(o).length>0)return;let i=r.filter((e=>!o(e)));0===i.length&&(i=e.map((e=>S.layoutAttributeForItemAt(t,e))).toArray()),i=i.sort(((e,t)=>e.index-t.index));const a=i[0];v.current=zt(zt({},t),{},{scrollY:a.top}),E(a.top)})(c)}),[c]);const x=e=>{e.preventDefault()},D=e=>c.has(e)||!1,C=()=>{g.current=null,y.current=null,w((0,St.l4)([]))},k=a.useCallback(((e,t)=>{const n=g.current;if(h&&t)if(null===n||n.index!==e){const t=h.querySelector(`[data-id="${e}"]`),n=null==t?void 0:t.getBoundingClientRect();if(!n)return void(g.current=null);g.current={index:e,bounds:n}}else{const r=n.bounds.left+n.bounds.width/2,i=t.x<r?e:e+1;y.current=Math.min(i,o)}}),[g,h,o]),O=e=>{const t=D(e);w(t?(0,St.l4)(c):(0,St.l4)([e]))},A=()=>{const t=y.current;if(null!==t){const n=Array.from(b);if(b.has(t))return void T();e.onDragEnd&&e.onDragEnd(n,t)}C()},T=()=>{requestAnimationFrame((()=>C()))},I=t=>{if(d)return d(t,Array.from(b));{const n={selected:!1,dragging:!1};return e.renderItem(t,n)}},F=e=>{v.current=e},M=(t,n)=>{if(!p)return null;const o=null!==y.current?y.current:e.insertionIndex;if(null==o)return;const r=t.layoutAttributeForInsertionCursor(n,g.current?g.current.index:null,o),i={position:"absolute",width:r.width,height:r.height,left:r.left,top:r.top,zIndex:100},s=(e=>!u||u(b.isEmpty()&&c?Array.from(c):Array.from(b),e))(r.index);return a.createElement("div",{style:i},p(s,!!r.atRowEnd))},_=(t,s)=>{const l=S.layoutAttributesForItemsIn(t);let c=!1;if(l.length>0){const e=l[0].index,t=l[l.length-1].index;c=null!=f&&(f<e||f>t)}const u=l.map(((t,u)=>{const{index:d}=t,p={position:"absolute",left:t.left,top:t.top,width:t.width,height:t.height},f=u===Math.floor(l.length/2)&&c;return a.createElement("div",{key:e.itemKey?e.itemKey(d):d,style:p},((t,s)=>{const l={selected:D(t),dragging:b.has(t),itemRef:s},c=!(t<o);return a.createElement(xt,{index:t,draggable:n&&!c,onDragStart:O,onDragOver:k,onDragEnd:A},c?a.createElement("div",{style:{width:i,height:r}}):e.renderItem(t,l))})(d,f?s:void 0))})),d={height:S.contentHeight(t),width:"100%"};return a.createElement("div",{style:d},M(S,t),u)};return a.createElement("div",{ref:e=>m(e)},(()=>{var n;if(!h)return null;const o={enableMouseEvents:!0,delayTouchStart:500,touchSlop:10,ignoreContextMenu:!0,ownerDocument:h.ownerDocument},r={width:e.width,height:e.height};return a.createElement(bt.WG,{backend:wt.TouchBackend,options:o},a.createElement("div",{className:Et().container,onContextMenu:x,style:r},t||(t=a.createElement(Ct,{renderItem:I})),a.createElement(Tt,{onViewportChange:F,renderContent:_,scrollY:(null===(n=v.current)||void 0===n?void 0:n.scrollY)||0,initialForcedScrollY:P})))})())};var Zt=n(68402),Ut=n.n(Zt);const Vt=e=>{const{children:t,onPress:n,expanded:o,ariaControls:r,className:i,headingRef:s}=e,c=e.headingTag;return a.createElement(c,{className:l()("PSPDFKit-Expando-Control",Ut().control,i),ref:s},a.createElement("button",{className:Ut().controlButton,"aria-expanded":r?o:void 0,"aria-controls":r,onClick:n,autoFocus:e.autoFocus},t))};Vt.defaultProps={headingTag:"div"};const Gt=e=>{const{children:t,expanded:n,id:o}=e;return a.createElement("div",{id:o,className:l()("PSPDFKit-Expando-Content",!n&&Ut().contentHidden,!n&&"PSPDFKit-Expando-Content-Hidden")},t)};var Wt=n(59271),qt=n(30667),Ht=n(87350);class $t extends a.Component{constructor(){super(...arguments),(0,yt.Z)(this,"rootRef",a.createRef()),(0,yt.Z)(this,"activeItem",a.createRef()),(0,yt.Z)(this,"state",{activeItemIndex:0,focusReason:"initial"}),(0,yt.Z)(this,"didSetActiveItem",!1),(0,yt.Z)(this,"onActiveItemIndexChange",(()=>{this.props.onActiveItemIndexChange&&this.props.onActiveItemIndexChange(this.state.activeItemIndex)})),(0,yt.Z)(this,"onKeyDown",(e=>{var t;const{ignoreOnKeyPress:n}=this.props;if("function"==typeof n?n(e):e.altKey||e.shiftKey)return;const o=null===(t=e.currentTarget.ownerDocument.defaultView)||void 0===t?void 0:t.HTMLElement;if(!(e.target instanceof o)||(0,Wt.c)(e.target))return;const{activeItemIndex:r}=this.state,i=e.ctrlKey||e.metaKey;if(e.which===this.props.prevKey&&r>0&&this.setState({activeItemIndex:i?0:r-1,focusReason:"keyboard"},this.onActiveItemIndexChange),e.which===this.props.nextKey){const e=this.props.items.length-1;r<e&&this.setState({activeItemIndex:i?e:r+1,focusReason:"keyboard"},this.onActiveItemIndexChange)}})),(0,yt.Z)(this,"onFocus",(e=>{const t=e.target!==e.currentTarget;let n=this.state.activeItemIndex;const o=e.currentTarget,r=o&&o.parentNode&&o.parentNode.children?Array.prototype.findIndex.call(o.parentNode.children,(e=>e===o)):-1;-1!==r&&(n=r),this.setState({activeItemIndex:n,focusReason:t?"focus_within":"focus"},this.onActiveItemIndexChange)}))}setActiveItem(e){this.didSetActiveItem=!0,this.setState({activeItemIndex:e,focusReason:"focus"})}getActiveItem(){return this.state.activeItemIndex}componentDidMount(){Xt(this.rootRef.current,this.activeItem.current),this.onActiveItemIndexChange()}componentDidUpdate(e,t){(this.didSetActiveItem||e.items.length!==this.props.items.length||t.activeItemIndex!==this.state.activeItemIndex)&&(this.didSetActiveItem=!1,Xt(this.rootRef.current,this.activeItem.current),"focus_within"!==this.state.focusReason&&function(e){if(!e)return;const t=e.children,n=t[0],o=n.matches||n.msMatchesSelector;1===t.length&&o.call(n,Ht.cO)?(e.removeAttribute("tabindex"),n.focus()):e.focus()}(this.activeItem.current))}render(){if("function"==typeof this.props.children){let e=!1,t=!1;const n=this.props.children({activeItemIndex:this.state.activeItemIndex,getContainerProps:()=>(e=!0,{onKeyDown:this.onKeyDown,ref:this.rootRef}),getItemProps:e=>{let{item:n}=e;(0,Rt.kG)(n,"getItemProps must be called with `{ item }`");const o=this.props.items.findIndex((e=>e===n));(0,Rt.kG)(o>-1,"getItemPropsL: Cannot find `item` in `props.items`");const r=o===this.state.activeItemIndex;return t=!0,{tabIndex:r?0:-1,ref:r?this.activeItem:void 0,onFocus:this.onFocus,onClick:e=>{e.target.closest(Ht.cO)||this.setState({activeItemIndex:o,focusReason:"focus"},this.onActiveItemIndexChange)}}}});return(0,Rt.kG)(n,"Did not return valid children"),(0,Rt.kG)(e,"Did not call getContainerProps"),(0,Rt.kG)(t,"Did not call getItemProps"),n}return a.createElement("div",{onKeyDown:this.onKeyDown,ref:this.rootRef,"data-testid":"accessible-collection"},this.props.items.map(((e,t)=>{const n=t===this.state.activeItemIndex;return a.createElement("div",{key:t,tabIndex:n?0:-1,ref:n?this.activeItem:void 0,onFocus:this.onFocus,onClick:e=>{e.target.closest(Ht.cO)||this.setState({activeItemIndex:t,focusReason:"focus"},this.onActiveItemIndexChange)}},e)})))}}function Xt(e,t){if(!e||!t)return;(0,Ht.GO)(e).forEach((t=>{t.parentNode!==e&&t.setAttribute("tabindex","-1")})),Array.prototype.forEach.call(t.querySelectorAll('[tabindex="-1"]'),(e=>{e.removeAttribute("tabindex")}))}(0,yt.Z)($t,"defaultProps",{prevKey:qt.rw,nextKey:qt.cS,ignoreOnKeyPress:null});var Yt=n(67665),Jt=n(19575),Qt=n(21246),en=n.n(Qt);const tn=["className","tag","announce"],nn=a.forwardRef((function(e,t){const{className:n,tag:o,announce:s}=e,c=(0,i.Z)(e,tn),u=s?{role:"status","aria-live":s}:{};return a.createElement(o||"p",(0,r.Z)({},c,{ref:t,className:l()(en().visuallyHidden,n)},u))}));class on extends a.Component{constructor(){super(...arguments),(0,yt.Z)(this,"_handleRef",(e=>{this._el=e,this._document=e?e.ownerDocument:null})),(0,yt.Z)(this,"_handleKeyDown",(e=>{const t=this._el,n=this._document;if(e.keyCode===qt.OC&&t&&n){const o=(0,Ht.GO)(t),r=o.indexOf(n.activeElement);e.shiftKey&&0===r?(o[o.length-1].focus(),e.preventDefault()):e.shiftKey||r!==o.length-1||(o[0].focus(),e.preventDefault())}}))}componentDidMount(){this._document&&this._document.addEventListener("keydown",this._handleKeyDown),document.addEventListener("keydown",this._handleKeyDown);const e=this._el;if(e&&!e.querySelector('[autofocus]:not([autofocus="false"])')){const t=(0,Ht.GO)(e)[0]||e.querySelector('[tabindex="-1"]');t&&t.focus()}}componentWillUnmount(){this._document&&this._document.removeEventListener("keydown",this._handleKeyDown),document.removeEventListener("keydown",this._handleKeyDown)}render(){return a.createElement("div",{ref:this._handleRef},this.props.children)}}var rn=n(48721),an=n.n(rn);const sn=["children","className","spaced"],ln=["className","spaced"],cn=[];function un(){const e=cn.length-1;cn.forEach(((t,n)=>{t.setState({isOnTop:n==e})}))}class dn extends a.Component{constructor(){super(...arguments),(0,yt.Z)(this,"descriptionId",this.props.accessibilityDescription?`modal-description-${Jt.Base64.encode(this.props.accessibilityDescription).substr(0,10)}`:null),(0,yt.Z)(this,"restoreOnCloseElement",this.props.restoreOnCloseElement),(0,yt.Z)(this,"useBorderRadius",!1!==this.props.useBorderRadius),(0,yt.Z)(this,"state",{isShaking:!1,isOnTop:!0}),(0,yt.Z)(this,"_preventPropagation",(e=>{e.stopPropagation(),e.nativeEvent&&e.nativeEvent.stopImmediatePropagation()})),(0,yt.Z)(this,"_handleClick",(()=>{this.props.onDismiss&&this.props.onDismiss()})),(0,yt.Z)(this,"onMount",(e=>{0===cn.length&&e.setAttribute("aria-hidden","true"),cn.push(this),un()})),(0,yt.Z)(this,"onUnmount",(e=>{cn.pop(),0===cn.length&&e.removeAttribute("aria-hidden"),un(),this.restoreOnCloseElement&&this.restoreOnCloseElement.focus()})),(0,yt.Z)(this,"_handleKeyDown",(e=>{e.keyCode!==qt.E$&&e.keyCode!==qt.tW||e.nativeEvent.stopImmediatePropagation(),this.props.onEscape&&e.keyCode===qt.zz&&(this.props.onEscape(),e.preventDefault(),e.target.ownerDocument.addEventListener("keyup",this._preventPropagation,{capture:!0,once:!0})),this.props.onEnter&&e.keyCode===qt.E$&&(this.props.onEnter(),e.preventDefault())})),(0,yt.Z)(this,"_handleAnimationEnd",(()=>{this.setState({isShaking:!1})}))}shake(){this.setState({isShaking:!0})}componentDidMount(){this.props.innerRef&&(this.props.innerRef.current=this)}componentWillUnmount(){this.props.innerRef&&(this.props.innerRef.current=null)}render(){var e,t;const{isShaking:n,isOnTop:o}=this.state,{className:r,backdropFixed:i}=this.props,s=o?on:a.Fragment,c={position:i?"fixed":"absolute"};return a.createElement(Yt.m,{onMount:this.onMount,onUnmount:this.onUnmount},a.createElement("div",{"aria-hidden":!o},a.createElement(s,null,a.createElement("div",{className:l()(an().backdropContainer,"PSPDFKit-Modal-Backdrop"),style:c,onClick:this._handleClick,onKeyDown:o?this._handleKeyDown:void 0},a.createElement("div",{role:this.props.role,"aria-label":this.props.accessibilityLabel,"aria-describedby":this.props.accessibilityDescription&&null!==(e=this.descriptionId)&&void 0!==e?e:void 0,className:l()(an().dialog,r,"PSPDFKit-Modal-Dialog",{[an().shaking]:n,[an().squareCorners]:!this.useBorderRadius}),onTouchEndCapture:this._preventPropagation,onMouseUpCapture:this._preventPropagation,onPointerUpCapture:this._preventPropagation,onKeyUpCapture:this._preventPropagation,onAnimationEnd:this._handleAnimationEnd,tabIndex:-1},this.props.children,this.props.accessibilityDescription&&a.createElement(nn,{id:null!==(t=this.descriptionId)&&void 0!==t?t:void 0},this.props.accessibilityDescription))))))}}function pn(e){const{children:t,className:n,spaced:o}=e,s=(0,i.Z)(e,sn),c=l()(an().section,o&&an().sectionSpaced,o&&"PSPDFKit-Modal-Section-Spaced",n,"PSPDFKit-Modal-Section");return a.createElement("div",(0,r.Z)({},s,{className:c}),t)}function fn(e){const{className:t,spaced:n}=e,o=(0,i.Z)(e,ln),s=l()(an().divider,n&&an().dividerSpaced,n&&"PSPDFKit-Modal-Divider-Spaced",t,"PSPDFKit-Modal-Divider");return a.createElement("div",(0,r.Z)({},o,{className:s}))}(0,yt.Z)(dn,"Section",pn),(0,yt.Z)(dn,"Divider",fn),(0,yt.Z)(dn,"defaultProps",{role:"dialog"}),pn.displayName="Modal.Section",pn.defaultProps={spaced:!1},fn.displayName="Modal.Divider",fn.defaultProps={spaced:!0};var hn=n(45265),mn=n.n(hn);const gn=a.forwardRef((function(e,t){const n=a.useRef(null);return a.useImperativeHandle(t,(()=>n.current)),a.useEffect((()=>{const e=n.current;return null==e||e.showModal(),()=>{null==e||e.close()}}),[]),a.createElement("dialog",{ref:n,className:l()("PSPDFKit-Modal-Backdrop",mn().wrapper,e.wrapperClass),onClose:e.onDismiss},a.createElement("form",{method:"dialog",className:e.formClass},e.children))}));var vn=n(41707),yn=n.n(vn);const bn=e=>{let{message:t,progress:n,style:o}=e;if(n){const e=Math.floor(100*n);return a.createElement("div",{className:l()("PSPDFKit-Progress",yn().progress),style:o,role:"progressbar","aria-valuenow":e,"aria-label":`${e}% complete`},a.createElement("div",{className:yn().progressBar},a.createElement("div",{className:yn().progressFill,style:{width:`${e}%`}})),t?a.createElement("div",{className:yn().progressText},t):null)}return a.createElement("div",{className:l()("PSPDFKit-Progress",yn().loader),style:o,role:"progressbar","aria-valuenow":0,"aria-label":"0% complete"},a.createElement("div",{className:yn().loaderDot}),a.createElement("div",{className:yn().loaderDot}),a.createElement("div",{className:yn().loaderDot}))};var wn=n(38104),Sn=n.n(wn);const Pn=["className","children"];function En(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function xn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?En(Object(n),!0).forEach((function(t){(0,yt.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):En(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Dn=e=>t=>{const{className:n,children:o}=t,r=xn(xn({},(0,i.Z)(t,Pn)),{},{className:l()(Sn()[e],n)});return a.createElement(e,r,o)},Cn=Dn("p");Cn.displayName="Text";const kn=Dn("h1");kn.displayName="HeaderText";var On=n(60044),An=n.n(On);const Tn=["secureTextEntry","error","success","selectTextOnFocus","onBlur","onFocus"],In=(e,t)=>{const n=a.useRef(null);a.useImperativeHandle(t,(()=>n.current)),a.useEffect((()=>{const{selectTextOnFocus:t,autoFocus:n}=e;t&&n&&o()}),[]);const o=a.useCallback((()=>{const{selectTextOnFocus:t}=e,{current:o}=n;o&&(t&&o.select(),f&&f())}),[]),{secureTextEntry:s,error:c,success:u,selectTextOnFocus:d,onBlur:p,onFocus:f}=e,h=(0,i.Z)(e,Tn),m=l()({[An().default]:!c&&!u,[An().error]:c,[An().success]:u},e.className),g=s?"password":"text";return a.createElement("input",(0,r.Z)({},h,{className:m,type:g,ref:n,onFocus:o,onBlur:p}))},Fn=a.memo(a.forwardRef(In));var Mn=n(13540),_n=n(15967),Nn=n.n(_n);function Rn(e){let{inputName:t,label:n,options:o,onChange:r,selectedOption:i,labelClassNamePrefix:s,disabled:c=!1,showLabel:u,isButton:d,wrapperClasses:p}=e;return a.createElement("div",{className:l()(Nn().radioGroup,{[p]:p}),"aria-label":n,role:"radiogroup"},o.map((e=>{let{value:n,label:o,iconPath:p}=e;const f=n===i,h=l()(Nn().iconLabel,{[Nn().iconLabelIsActive]:f,[`${s}-${n}`]:!0,[`${s}-active`]:f,[Nn().focusedLabelFocusVisible]:f,[Nn().selectedLabel]:f&&d,[Nn().radioGroupLabel]:!f&&d,[Nn().fullWidthRadio]:d});return a.createElement("label",{key:n,className:h},a.createElement(nn,{tag:"span"},o),a.createElement("input",{type:"radio",name:t,value:n,checked:f,onChange:e=>r(e.target.value),"aria-label":o,disabled:c}),d&&f&&a.createElement(Mn.Z,{src:p,className:l()(Nn().icon,{[Nn().radioGroupIcon]:d})}),!d&&a.createElement(Mn.Z,{src:p,className:Nn().icon}),u&&a.createElement("span",null,o))})))}var Ln=n(98932),Bn=n.n(Ln);let jn=0;function zn(e){const t=a.useRef(jn++),{label:n,accessibilityLabel:o,onUpdate:r}=e,i=a.useCallback((e=>{r(e.target.checked)}),[r]);const s=l()(Bn().label,e.styles.label);return a.createElement("div",{className:e.styles.controlWrapper},a.createElement("div",{className:e.styles.control},a.createElement("div",{className:l()("PSPDFKit-Checkbox-Input",e.className,Bn().root)},a.createElement("input",{className:l()(Bn().input,e.styles.input),type:"checkbox",id:`${Bn().label}-${t.current}`,onChange:i,checked:e.value}),e.label?a.createElement("label",{htmlFor:`${Bn().label}-${t.current}`,className:s},n):o?a.createElement("label",{htmlFor:`${Bn().label}-${t.current}`,className:s},a.createElement(nn,{tag:"span"},o)):null)))}var Kn=n(74305),Zn=n(42308),Un=n(35583),Vn={isHistory:e=>(0,Un.P)(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(0===e.redos.length||Zn.OX.isOperationList(e.redos[0].operations))&&(0===e.undos.length||Zn.OX.isOperationList(e.undos[0].operations))},Gn=(new WeakMap,new WeakMap),Wn=new WeakMap,qn={isHistoryEditor:e=>Vn.isHistory(e.history)&&Zn.ML.isEditor(e),isMerging:e=>Wn.get(e),isSaving:e=>Gn.get(e),redo(e){e.redo()},undo(e){e.undo()},withoutMerging(e,t){var n=qn.isMerging(e);Wn.set(e,!1),t(),Wn.set(e,n)},withoutSaving(e,t){var n=qn.isSaving(e);Gn.set(e,!1),t(),Gn.set(e,n)}},Hn=(e,t)=>!(!t||"insert_text"!==e.type||"insert_text"!==t.type||e.offset!==t.offset+t.text.length||!Zn.y$.equals(e.path,t.path))||!(!t||"remove_text"!==e.type||"remove_text"!==t.type||e.offset+e.text.length!==t.offset||!Zn.y$.equals(e.path,t.path)),$n=(e,t)=>"set_selection"!==e.type,Xn=n(18953),Yn=n.n(Xn);function Jn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qn=new WeakMap,eo=new WeakMap;class to{}class no extends to{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super();var{offset:t,path:n}=e;this.offset=t,this.path=n}}class oo extends to{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super();var{offset:t,path:n}=e;this.offset=t,this.path=n}}var ro=e=>eo.get(e);function io(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ao(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?io(Object(n),!0).forEach((function(t){Jn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):io(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var so=new WeakSet,lo=e=>{var t=[],n=e=>{if(null!=e){var o=t[t.length-1];if("string"==typeof e){var r={text:e};so.add(r),e=r}if(Zn.xv.isText(e)){var i=e;Zn.xv.isText(o)&&so.has(o)&&so.has(i)&&Zn.xv.equals(o,i,{loose:!0})?o.text+=i.text:t.push(i)}else if(Zn.W_.isElement(e))t.push(e);else{if(!(e instanceof to))throw new Error("Unexpected hyperscript child object: ".concat(e));var a=t[t.length-1];Zn.xv.isText(a)||(n(""),a=t[t.length-1]),e instanceof no?((e,t)=>{var n=e.text.length;Qn.set(e,[n,t])})(a,e):e instanceof oo&&((e,t)=>{var n=e.text.length;eo.set(e,[n,t])})(a,e)}}};for(var o of e.flat(1/0))n(o);return t};function co(e,t,n){return ao(ao({},t),{},{children:lo(n)})}function uo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function po(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uo(Object(n),!0).forEach((function(t){Jn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var fo,ho={anchor:function(e,t,n){return new no(t)},cursor:function(e,t,n){return[new no(t),new oo(t)]},editor:(fo=Zn.Jh,(e,t,n)=>{var o,r=[];for(var i of n)Zn.e6.isRange(i)?o=i:r.push(i);var a,s=lo(r),l={},c=fo();for(var[u,d]of(Object.assign(c,t),c.children=s,Zn.NB.texts(c))){var p=(a=u,Qn.get(a)),f=ro(u);if(null!=p){var[h]=p;l.anchor={path:d,offset:h}}if(null!=f){var[m]=f;l.focus={path:d,offset:m}}}if(l.anchor&&!l.focus)throw new Error("Slate hyperscript ranges must have both `<anchor />` and `<focus />` defined if one is defined, but you only defined `<anchor />`. For collapsed selections, use `<cursor />` instead.");if(!l.anchor&&l.focus)throw new Error("Slate hyperscript ranges must have both `<anchor />` and `<focus />` defined if one is defined, but you only defined `<focus />`. For collapsed selections, use `<cursor />` instead.");return null!=o?c.selection=o:Zn.e6.isRange(l)&&(c.selection=l),c}),element:co,focus:function(e,t,n){return new oo(t)},fragment:function(e,t,n){return lo(n)},selection:function(e,t,n){var o=n.find((e=>e instanceof no)),r=n.find((e=>e instanceof oo));if(!o||null==o.offset||null==o.path)throw new Error("The <selection> hyperscript tag must have an <anchor> tag as a child with `path` and `offset` attributes defined.");if(!r||null==r.offset||null==r.path)throw new Error("The <selection> hyperscript tag must have a <focus> tag as a child with `path` and `offset` attributes defined.");return ao({anchor:{offset:o.offset,path:o.path},focus:{offset:r.offset,path:r.path}},t)},text:function(e,t,n){var o=lo(n);if(o.length>1)throw new Error("The <text> hyperscript tag must only contain a single node's worth of children.");var[r]=o;if(null==r&&(r={text:""}),!Zn.xv.isText(r))throw new Error("\n The <text> hyperscript tag can only contain text content as children.");return so.delete(r),Object.assign(r,t),r}},mo=e=>function(t,n){for(var o=arguments.length,r=new Array(o>2?o-2:0),i=2;i<o;i++)r[i-2]=arguments[i];var a=e[t];if(!a)throw new Error("No hyperscript creator found for tag: <".concat(t,">"));null==n&&(n={}),(0,Un.P)(n)||(r=[n].concat(r),n={});var s=a(t,n,r=r.filter((e=>Boolean(e))).flat());return s},go=e=>{var t={},n=function(n){var o=e[n];if("object"!=typeof o)throw new Error("Properties specified for a hyperscript shorthand should be an object, but for the custom element <".concat(n,"> tag you passed: ").concat(o));t[n]=(e,t,n)=>co(0,po(po({},o),t),n)};for(var o in e)n(o);return t},vo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{elements:t={}}=e,n=go(t),o=po(po(po({},ho),n),e.creators),r=mo(o);return r}();const yo=/["'&<>]/;function bo(e){const t=""+e,n=yo.exec(t);if(!n)return t;let o,r="",i=0,a=0;for(i=n.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 39:o="&#39;";break;case 60:o="&lt;";break;case 62:o="&gt;";break;default:continue}a!==i&&(r+=t.substring(a,i)),a=i+1,r+=o}return a!==i?r+t.substring(a,i):r}function wo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function So(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wo(Object(n),!0).forEach((function(t){(0,yt.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Po(e,t){if(e.nodeType===Node.TEXT_NODE)return vo("text",t,e.textContent);if(e.nodeType!==Node.ELEMENT_NODE)return null;const n=So({},t);switch(e.nodeName.toUpperCase()){case"B":n.bold=!0;break;case"I":case"EM":n.italic=!0;break;case"U":n.underline=!0;break;case"SPAN":if("underline"===xo(e.getAttribute("style")||"")["text-decoration"]){n.underline=!0;break}}const o=Array.from(e.childNodes).map((e=>Po(e,n))).flat();switch(0===o.length&&o.push(vo("text",n,"")),e.nodeName.toUpperCase()){case"BR":return vo("text",t,"\n");case"SPAN":{const t=function(e){return"SPAN"===e.nodeName.toUpperCase()&&e.getAttribute("data-user-id")}(e);if(t)return vo("element",{type:"mention",userId:t,displayName:Oo(Eo(o))},o);if(function(e){return"SPAN"===e.nodeName.toUpperCase()&&e.getAttribute("style")}(e)&&!function(e){return"underline"===e.style.textDecoration&&!e.style.color&&!e.style.backgroundColor}(e)){const t=xo(e.getAttribute("style")||""),n=t.color?zo(t.color):void 0,r=t["background-color"]?zo(t["background-color"]):void 0;return vo("element",{type:"style",fontColor:n,backgroundColor:r},o)}return o}case"P":return vo("element",{type:"paragraph"},o);case"A":return vo("element",{type:"link",url:e.getAttribute("href")},o);default:return o}}function Eo(e){function t(e){var t;if(function(e){return Zn.xv.isText(e)}(e)){let t=bo(e.text);return e.bold&&(t=`<b>${t}</b>`),e.italic&&(t=`<i>${t}</i>`),e.underline&&(t=`<span style="text-decoration: underline;">${t}</span>`),t}const n=null===(t=e.children)||void 0===t?void 0:t.map((e=>Eo(e))).join("");switch(e.type){case"paragraph":return`<p>${n}</p>`;case"link":return`<a href="${e.url}">${n}</a>`;case"mention":return`<span data-user-id="${e.userId}">${e.displayName}</span>`;case"style":{const t=Do(e);return`<span${t?` style="${t}"`:""}>${n}</span>`}default:return n}}return Array.isArray(e)?e.map((e=>t(e))).join(""):t(e)}function xo(e){return e?((e=e.trim()).endsWith(";")&&(e=e.slice(0,-1)),e.split(";").map((e=>e.split(":").map((e=>e.trim())))).reduce(((e,t)=>{let[n,o]=t;return So(So({},e),{},{[n]:o})}),{})):{}}function Do(e){let t="";return e.fontColor&&(t+=`color: ${e.fontColor};`),e.backgroundColor&&(t+=`background-color: ${e.backgroundColor};`),t}function Co(e,t){const n=Zn.ML.marks(e);return!!n&&!0===n[t]}const ko=(e,t)=>{Co(e,t)?Zn.ML.removeMark(e,t):Zn.ML.addMark(e,t,!0)};function Oo(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function Ao(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(new DOMParser).parseFromString(e,"text/html")}function To(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=(e||"").match(/(<[^<>]+>)/g)||[],n={pre:[],post:[]};return t.forEach((e=>{if(e.startsWith("<html"))return n.pre.push(e),void n.post.unshift("</html>");e.startsWith("<body")&&(n.pre.push(e),n.post.unshift("</body>"))})),n}function Io(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ao(e).body.innerHTML}function Fo(e){let{changeUnderlineCSStoHTML:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Ao(e).body;if(0===n.childNodes.length){const e=document.createElement("p");return n.appendChild(e),n}const o=document.createElement("body");let r=[];return[...n.childNodes].forEach(((e,t)=>{const i=n.childNodes.length-1===t;if("P"===e.nodeName.toUpperCase()||i){if(i&&"P"!==e.nodeName.toUpperCase()&&r.push(e),r.length){const e=document.createElement("p");r.forEach((t=>{e.appendChild(t)})),o.appendChild(e),r=[]}"P"===e.nodeName.toUpperCase()&&o.appendChild(e)}else r.push(e)})),o.childNodes.forEach((e=>{var n,o,r,i,a,s;(null===(n=(o=e).querySelectorAll)||void 0===n||n.call(o,"p").forEach((e=>{const t=document.createElement("span");e.style.cssText&&t.setAttribute("style",e.style.cssText),t.innerHTML=e.innerHTML,e.replaceWith(t)})),null===(r=(i=e).querySelectorAll)||void 0===r||r.call(i,"div").forEach((e=>{const t=document.createElement("span");e.style.cssText&&t.setAttribute("style",e.style.cssText),t.innerHTML=e.innerHTML,e.replaceWith(t)})),t)&&(null===(a=(s=e).querySelectorAll)||void 0===a||a.call(s,"span").forEach((e=>{if("underline"===e.style.textDecoration){const t=document.createElement("u");t.innerHTML=e.innerHTML,e.innerHTML=t.outerHTML,e.style.textDecoration="",e.style.cssText||(e.removeAttribute("style"),e.attributes.length||e.replaceWith(...e.childNodes))}})))})),o}function Mo(e){if(!e)return!1;const{selection:t}=e;return!!t&&Zn.e6.isExpanded(t)&&""!==Zn.ML.string(e,t)}function _o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const{selection:n}=e;if(n){const[o]=Zn.e6.edges(n),r=Zn.ML.before(e,o,{distance:t,unit:"character"}),i=r&&Zn.ML.range(e,r,o);return{text:i&&Zn.ML.string(e,i),range:i}}return null}function No(e){return e&&(" "===e.text||!e.range)}function Ro(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Lo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ro(Object(n),!0).forEach((function(t){(0,yt.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ro(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Bo(e,t,n){var o;const r=Lo(Lo({},xo(null!==(o=e.getAttribute("style"))&&void 0!==o?o:"")),{},{["fontColor"===t?"color":"background-color"]:null!=n?n:void 0});return Object.entries(r).filter((e=>{let[,t]=e;return void 0!==t})).map((e=>{let[t,n]=e;return`${t}: ${n}`})).join("; ").concat(";")}function jo(e,t,n){const o=Fo(e,{changeUnderlineCSStoHTML:!1});function r(e){var t;const n=null===(t=e.closest("p"))||void 0===t?void 0:t.textContent;return e.textContent===n&&!e.closest("span[style]")}return o.querySelectorAll("p").forEach((e=>{const{isBold:o,isUnderlined:i,isItalic:a}=Ko(e);if("fontColor"===t){let t=!1;if(e.querySelectorAll("span[style]").forEach((e=>{r(e)?(t=!0,e.setAttribute("style",Bo(e,"fontColor",n))):(e.style.color="",""===e.style.cssText&&e.replaceWith(...e.childNodes))})),!t){const t=document.createElement("span");t.setAttribute("style",Bo(t,"fontColor",n)),t.innerHTML=e.innerHTML,e.innerHTML=t.outerHTML}}else if("underline"===t){const t=e.querySelectorAll("span[style]");if(i)t.forEach((e=>{e.style.textDecoration=""}));else{let n=!1;if(t.forEach((e=>{r(e)&&(n=!0,e.style.textDecoration="underline")})),!n){const t=document.createElement("span");t.style.textDecoration="underline",t.innerHTML=e.innerHTML,e.innerHTML=t.outerHTML}}t.forEach((e=>{r(e)?e.style.textDecoration=i?"":"underline":(e.style.textDecoration="",""===e.style.cssText&&e.replaceWith(...e.childNodes))}))}else if("bold"===t){const t=e.querySelectorAll("b");if(o)t.forEach((e=>{e.replaceWith(...e.childNodes)}));else{const t=document.createElement("b");t.innerHTML=e.innerHTML,e.innerHTML=t.outerHTML}}else if("italic"===t){const t=e.querySelectorAll("i, em");if(a)t.forEach((e=>{e.replaceWith(...e.childNodes)}));else{const t=document.createElement("i");t.innerHTML=e.innerHTML,e.innerHTML=t.outerHTML}}})),o.innerHTML}function zo(e){if(!e)return"";if(e.startsWith("rgb")){return`#${e.replace("rgb(","").replace(")","").split(",").map((e=>parseInt(e,10))).map((e=>e.toString(16))).map((e=>1===e.length?`0${e}`:e)).join("")}`}return e.startsWith("#")&&9===e.length?`#${e.substr(3,6)}`:7===e.length&&e.startsWith("#")?e:"#000000"}function Ko(e){const t=e.querySelectorAll("span[style]"),n=Array.from(t).filter((t=>t.textContent===e.textContent)),o=n.filter((e=>e.style.color)),r=n.filter((e=>e.style.backgroundColor)),i=n.filter((e=>"underline"===e.style.textDecoration)),a=e.querySelectorAll("b"),s=Array.from(a).filter((t=>t.textContent===e.textContent)),l=e.querySelectorAll("i, em"),c=Array.from(l).filter((t=>t.textContent===e.textContent));return{fontColor:o.length>0?zo(o[o.length-1].style.color):null,backgroundColor:r.length>0?zo(r[r.length-1].style.backgroundColor):null,isUnderlined:i.length>0,isBold:s.length>0,isItalic:c.length>0}}function Zo(e){const t=Fo(e,{changeUnderlineCSStoHTML:!1}).querySelectorAll("p"),n=Array.from(t).map((e=>Ko(e)));return{fontColor:n.every((e=>{let{fontColor:t}=e;return t&&t===n[0].fontColor}))?n[0].fontColor:null,isUnderlined:n.every((e=>{let{isUnderlined:t}=e;return t&&t===n[0].isUnderlined})),isBold:n.every((e=>{let{isBold:t}=e;return t&&t===n[0].isBold})),isItalic:n.every((e=>{let{isItalic:t}=e;return t&&t===n[0].isItalic})),backgroundColor:n.every((e=>{let{backgroundColor:t}=e;return t&&t===n[0].backgroundColor}))?n[0].backgroundColor:null}}function Uo(e,t){var n;const{selection:o}=e;if(!o)return;const[...r]=Array.from(Zn.ML.nodes(e,{at:Zn.ML.unhangRange(e,o),match:e=>!Zn.ML.isEditor(e)&&Vo(e)})),i=r.map((e=>{let[t]=e;return t}));if(!i)return;const a=i.map((e=>zo(e[t])));return 1===new Set(a).size&&null!==(n=a[0])&&void 0!==n?n:void 0}function Vo(e){return"style"===e.type}function Go(e,t){const{selection:n}=e;n&&Zn.e6.isCollapsed(n)?Zn.YR.insertNodes(e,t):(Zn.YR.wrapNodes(e,t,{split:!0}),Zn.YR.collapse(e,{edge:"end"}))}function Wo(e,t){Zn.YR.unwrapNodes(e,{match:e=>!Zn.ML.isEditor(e)&&Zn.W_.isElement(e)&&e.type===t})}function qo(e,t,n){(0,Rt.kG)(e,"Editor is not defined.");const[o]=Zn.ML.nodes(e,{match:e=>!Zn.ML.isEditor(e)&&Zn.W_.isElement(e)&&Vo(e)});o?Zn.YR.setNodes(e,{[t]:n},{match:e=>Vo(e),split:!0}):Go(e,{type:"style",[t]:n,children:[{text:""}]})}function Ho(e){var t;const{selection:n}=e;if(!n)return!1;const[...o]=Array.from(Zn.ML.nodes(e,{at:Zn.ML.unhangRange(e,n),match:e=>!Zn.ML.isEditor(e)&&Vo(e)})),r=o.map((e=>{let[t]=e;return t}));return!(null==r||null===(t=r[0])||void 0===t||!t.underline)}function $o(e){return"mention"===e.type}var Xo,Yo;const Jo="undefined"!=typeof navigator&&/Android/.test(navigator.userAgent),Qo="undefined"!=typeof navigator&&/Chrome/.test(navigator.userAgent),er=a.forwardRef(((e,t)=>{let{text:n,style:o,updateBoundingBox:r,onValueChange:i,onBlurSave:s,maxLength:c,onStopEditing:u,onEscape:d,lastMousePoint:p,onEditorInit:f,className:h,placeholder:m,onBlur:g,autoFocus:v=!0,onSelectionChange:y,autoOpenKeyboard:b=!0,onKeyDown:w,title:S="Rich text editor"}=e;const{value:P,wrapperTags:E}=(0,a.useMemo)((()=>({wrapperTags:To(n),value:Io(n)})),[n]),x=(0,a.useRef)(null),D=a.useRef(P),C=(0,a.useMemo)((()=>(e=>{const{insertData:t,isInline:n,markableVoid:o,isVoid:r}=e;return e.isInline=e=>"link"===e.type||$o(e)||"style"===e.type||n(e),e.isVoid=e=>$o(e)||r(e),e.markableVoid=e=>$o(e)||o(e),e.insertData=n=>{try{const o=n.getData("text/html");if(o){const t=Po(Fo(o));return void Zn.YR.insertFragment(e,t)}t(n)}catch(e){}},e})((e=>{var t=e,{apply:n}=t;return t.history={undos:[],redos:[]},t.redo=()=>{var{history:e}=t,{redos:n}=e;if(n.length>0){var o=n[n.length-1];o.selectionBefore&&Zn.YR.setSelection(t,o.selectionBefore),qn.withoutSaving(t,(()=>{Zn.ML.withoutNormalizing(t,(()=>{for(var e of o.operations)t.apply(e)}))})),e.redos.pop(),e.undos.push(o)}},t.undo=()=>{var{history:e}=t,{undos:n}=e;if(n.length>0){var o=n[n.length-1];qn.withoutSaving(t,(()=>{Zn.ML.withoutNormalizing(t,(()=>{var e=o.operations.map(Zn.OX.inverse).reverse();for(var n of e)t.apply(n);o.selectionBefore&&Zn.YR.setSelection(t,o.selectionBefore)}))})),e.redos.push(o),e.undos.pop()}},t.apply=e=>{var{operations:o,history:r}=t,{undos:i}=r,a=i[i.length-1],s=a&&a.operations[a.operations.length-1],l=qn.isSaving(t),c=qn.isMerging(t);if(null==l&&(l=$n(e)),l){if(null==c&&(c=null!=a&&(0!==o.length||Hn(e,s))),a&&c)a.operations.push(e);else{var u={operations:[e],selectionBefore:t.selection};i.push(u)}for(;i.length>100;)i.shift();r.redos=[]}n(e)},t})((0,Kn.BU)((0,Zn.Jh)())))),[]),k=(0,a.useCallback)((e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}),[]);(0,a.useEffect)((()=>{const e=x.current;function t(t){null!=e&&e.contains(t.target)||null==s||s()}return null==e||e.ownerDocument.addEventListener("pointerdown",t,{capture:!0}),Zn.YR.select(C,Zn.ML.end(C,[])),()=>{null==e||e.ownerDocument.removeEventListener("pointerdown",t,{capture:!0})}}),[C,s]);const O=(0,a.useMemo)((()=>Po(Fo(P))),[P]),A=(0,a.useCallback)((e=>a.createElement(or,e)),[]),T=(0,a.useCallback)((e=>a.createElement(tr,e)),[]);(0,a.useEffect)((()=>(null==f||f(C),()=>{null==f||f(null)})),[C,f]),(0,a.useEffect)((()=>{v&&(Kn.F3.focus(C),setTimeout((()=>{Kn.F3.blur(C),Kn.F3.focus(C),b||Kn.F3.blur(C)}),0))}),[b]),(0,a.useEffect)((()=>{setTimeout((()=>{if(p&&x.current){const e=(0,Rt.Qo)(p,x.current.ownerDocument);if(!e)return;const t=Kn.F3.toSlatePoint(C,[e.startContainer,e.startOffset],{exactMatch:!0,suppressThrow:!0});t&&Zn.YR.select(C,t)}}),0)}),[C,p,t]);const I=(0,a.useCallback)((e=>{if("Escape"!==e.key)return"Enter"===e.key&&e.shiftKey?(null==u||u(),void e.preventDefault()):void(c&&Oo(D.current).length>=c&&e.preventDefault());null==d||d(e)}),[c,d,u]),F=(0,a.useCallback)((()=>{const{selection:e}=C;if(e&&Zn.e6.isCollapsed(e)){var t,n,o;const[i]=Zn.e6.edges(e),a=_o(C,2);if((null!=a&&null!==(t=a.text)&&void 0!==t&&t.startsWith(" ")||1===(null==a||null===(n=a.text)||void 0===n?void 0:n.length))&&null!=a&&null!==(o=a.text)&&void 0!==o&&o.endsWith("@")){var r;(0,Rt.kG)(a,"lastTwoCharacters should be defined");const e=null===(r=_o(C))||void 0===r?void 0:r.range;return e?{query:"",target:e}:null}{const e=Zn.ML.before(C,i,{unit:"word"}),t=e&&Zn.ML.before(C,e),n=t&&Zn.ML.range(C,t,i),o=n&&Zn.ML.string(C,n),r=o&&o.match(/^@(\w+)$/),a=Zn.ML.after(C,i),s=Zn.ML.range(C,i,a),l=Zn.ML.string(C,s).match(/^(\s|$)/);return r&&l&&n?{query:r[1],target:n}:null}}return null}),[C]),M=(0,a.useCallback)((e=>{var t;C.operations.every((e=>"set_selection"===e.type))&&(null==y||y(),"onSelectionChange"in C&&"function"==typeof C.onSelectionChange&&C.onSelectionChange());const n=e.map((e=>Eo(e))).join("");D.current=n,i(`${E.pre.join("")}${n}${E.post.join("")}`,{activeMention:null!==(t=F())&&void 0!==t?t:null}),null==r||r(),"onValueChange"in C&&"function"==typeof C.onValueChange&&C.onValueChange(n)}),[i,r,E,C,y,F]);return a.createElement("div",{role:"presentation",className:l()(Yn().richTextEditor,"PSPDFKit-Rich-Text-Editor",h),style:o,ref:(0,Rt.FE)(t,x),onBlur:()=>{null==s||s(),null==g||g()},onDragStart:k,onDragEnd:k,onKeyUp:k,onMouseDown:k,onPointerUp:k,onTouchStart:k,onTouchEnd:k,onMouseUp:k},a.createElement(Kn.mH,{onChange:M,editor:C,value:O},a.createElement(Kn.CX,{title:S,placeholder:m,renderLeaf:T,renderElement:A,onInput:r,className:Yn().wrapper,onKeyDown:e=>{w?w(e):(I(e),(e.metaKey||e.ctrlKey)&&"b"===e.key?(e.preventDefault(),ko(C,"bold")):(e.metaKey||e.ctrlKey)&&"i"===e.key?(e.preventDefault(),ko(C,"italic")):(e.metaKey||e.ctrlKey)&&"u"===e.key&&(e.preventDefault(),ko(C,"underline")),Jo&&!Kn.F3.isComposing(C)&&setTimeout(C.onChange,10))}})))})),tr=e=>{let{attributes:t,children:n,leaf:o}=e;return o.bold&&(n=a.createElement("strong",null,n)),o.italic&&(n=a.createElement("em",null,n)),o.underline&&(n=a.createElement("u",null,n)),a.createElement("span",t,n)},nr=()=>a.createElement("span",{contentEditable:!1,style:{fontSize:0}},"$",String.fromCodePoint(160)),or=e=>{const{attributes:t,children:n,element:o}=e;switch(o.type){case"link":return a.createElement("a",(0,r.Z)({},t,{href:o.url}),Xo||(Xo=a.createElement(nr,null)),n,Yo||(Yo=a.createElement(nr,null)));case"mention":return a.createElement("span",(0,r.Z)({},t,{contentEditable:Qo?void 0:t.contentEditable,"data-user-id":o.userId}),n,"@",o.displayName);case"style":return a.createElement("span",(0,r.Z)({},t,{style:{color:o.fontColor,backgroundColor:o.backgroundColor}}),n);default:return a.createElement("p",t,n)}};var rr=n(87360),ir=n.n(rr),ar=n(54941);const sr=["onMention","users","onValueChange","mentionDropdownClassName","mentionListRenderer","mentionListClassName","onEditorInit","maxMentionSuggestions","onMentionSuggestionsOpenChange"],lr=a.forwardRef(((e,t)=>{let{onMention:n,users:o,onValueChange:s,mentionDropdownClassName:l,mentionListRenderer:c,mentionListClassName:u,onEditorInit:d,maxMentionSuggestions:p=5,onMentionSuggestionsOpenChange:f}=e,h=(0,i.Z)(e,sr);const[m,g]=a.useState([]),[v,y]=(0,a.useState)(null),b=(0,a.useRef)(null),[w,S]=(0,a.useState)(null),[P,E]=(0,a.useState)(0),x=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,(()=>({startMention:()=>{const e=b.current;(0,Rt.kG)(e,"Editor ref is not set");const t=_o(e,1);Zn.YR.insertText(e,No(t)?"@":" @"),Kn.F3.focus(e)}})));const D=(0,a.useCallback)((e=>{null==n||n(e);const t={userId:e.id,displayName:e.displayName||e.name,children:[{text:""}],type:"mention"};(0,Rt.kG)(b.current,"Editor ref is not set"),(0,Rt.kG)(v,"Target is not set"),Zn.YR.select(b.current,v),Zn.YR.insertNodes(b.current,t),Zn.YR.move(b.current),Zn.YR.insertText(b.current," "),E(0),g([]),y(null)}),[n,v]),C=(0,a.useCallback)((e=>{null==d||d(e),b.current=e}),[d]),k=(0,a.useCallback)((e=>{"ArrowDown"===e.key?(e.preventDefault(),E((e=>(e+1)%m.length))):"ArrowUp"===e.key?(e.preventDefault(),E((e=>(e-1+m.length)%m.length))):"Enter"===e.key?(e.preventDefault(),D(m[P])):"Escape"===e.key&&(e.preventDefault(),E(0),g([]),y(null))}),[m,P,D,v]);(0,a.useEffect)((()=>{if(x.current){const e=x.current.querySelector('[data-highlighted="true"]');e&&e.scrollIntoView({block:"nearest"})}}),[P]);const O=!(!v||!m.length);return(0,a.useEffect)((()=>{null==f||f(O)}),[f,O]),a.createElement(ar.fC,{modal:!1,open:O},a.createElement(ar.xz,{asChild:!0},a.createElement(er,(0,r.Z)({},h,{onValueChange:function(e,t){var n;null==s||s(e,t);const{activeMention:r}=t;if(y(null!==(n=null==r?void 0:r.target)&&void 0!==n?n:null),r)if(r.query.length){const e=ir().go(r.query,o,{keys:["name","displayName","description"]});g(e.slice(0,p).map((e=>e.obj)))}else g(o.slice(0,p));else g([]);E(0)},onEditorInit:C,ref:e=>{var t,n;e&&S(null!==(t=null===(n=e.ownerDocument)||void 0===n?void 0:n.body)&&void 0!==t?t:null)},onKeyDown:O?k:void 0}))),a.createElement(ar.h_,{container:w},a.createElement(ar.VY,{onOpenAutoFocus:e=>e.preventDefault(),className:l,role:"menu",ref:x,onInteractOutside:()=>{g([]),y(null)}},m.map(((e,t)=>a.createElement("div",{role:"menuitem",tabIndex:t===P?0:-1,"data-highlighted":t===P,key:e.id,className:u,onClick:()=>{D(e)},onMouseEnter:()=>E(t)},(null==c?void 0:c(e))||a.createElement("div",null,e.name)))))))}));var cr=n(12921),ur=n(12704),dr=n.n(ur),pr=n(11149),fr=n.n(pr);function hr(e){let{label:t,trigger:n,items:o,container:r=document.body,alignContent:i="center",className:s}=e;return a.createElement("div",{className:l()(fr().wrapper,s)},a.createElement(cr.fC,null,a.createElement(cr.xz,{asChild:!0},a.createElement("button",{className:fr().trigger,"aria-label":t},n||a.createElement(Mn.Z,{src:dr(),className:fr().triggerIcon}))),a.createElement(cr.Uv,{container:r},a.createElement(cr.VY,{className:fr().content,align:i},o.map(((e,t)=>(0,a.isValidElement)(e)?a.createElement(a.Fragment,{key:t},e):a.createElement(cr.ck,{key:t,className:fr().item,onSelect:e.onClick},e.content,e.helperText&&a.createElement("div",{className:fr().itemHelperText},e.helperText))))))))}function mr(e){let{checked:t,onCheckedChange:o,children:r}=e;return a.createElement(cr.oC,{className:l()(fr().item,fr().checkboxItem),checked:t,onCheckedChange:o},t&&a.createElement(Mn.Z,{src:n(70190),className:fr().itemCheckmark}),a.createElement("span",null,r))}const gr=function(){return a.createElement("div",{role:"separator",className:fr().separatorItem})}},75189:(e,t,n)=>{"use strict";n.d(t,{Z:()=>qe});var o=n(35369),r=n(47347),i=n(46797),a=n(84121),s=n(37927),l=n(60132),c=n(51559);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const p="You need the text comparison license component to use this feature.",f="The text comparison feature is only available in Standalone mode.";var h=n(63738),m=n(19419),g=n(18509),v=n(49200),y=n(52560),b=n(19815),w=n(27515),S=n(13997),P=n(3219),E=n(39511),x=n(88804),D=n(32170),C=n(25644),k=n(34573),O=n(69939),A=n(13393),T=n(80857);const I=(0,T.Z)("ToolbarItems");var F=n(15973),M=n(68382),_=n(95651),N=n(55909);const R=["annotationSelection.change"];var L=n(66687),B=n(45588),j=n(78233),z=n(29165),K=n(3534);const Z=(0,T.Z)("Annotations");var U=n(32125);const V=(0,T.Z)("Bookmarks");var G=n(13394),W=n(25387);var q=n(74985);const H=(0,T.Z)("CustomOverlayItem");var $=n(16126),X=n(8503),Y=n(96114);const J=(0,T.Z)("Forms");var Q=n(68258);var ee=n(75920),te=n(52042);const ne=(0,T.Z)("InkSignatures"),oe=["inkSignatures.create","inkSignatures.update","inkSignatures.delete","inkSignatures.change"],re=["storedSignatures.create","storedSignatures.update","storedSignatures.delete","storedSignatures.change"];var ie=n(91859),ae=n(4054);const se=(0,T.Z)();async function le(e,t,n){var o;if("object"!=typeof e||"number"!=typeof e.width&&"number"!=typeof e.height)throw new r.p2("The first argument must be an object with either `width` or `height` set to a number.");if("width"in e&&"height"in e)throw new r.p2("The first argument can't contain both `height` and `width` propeties at the same time.");if("width"in e&&"number"!=typeof e.width)throw new r.p2("`width` must be a number.");if("height"in e&&"number"!=typeof e.height)throw new r.p2("`height` must be a number.");se("number"==typeof t,"pageIndex must be a number."),await(null===(o=n.getState().annotationManager)||void 0===o?void 0:o.loadAnnotationsForPageIndex(t));const i=n.getState(),a=i.pages.get(t);se(a,`Could not find page with index ${t} in this document.`);const{pageSize:s}=a;let l,c;"width"in e&&"number"==typeof e.width&&e.width>0&&e.width<=ie.Qr?(l=Math.round(e.width),c=Math.round(l*s.height/s.width)):"height"in e&&"number"==typeof e.height&&e.height>0&&e.height<=ie.Qr?(c=Math.round(e.height),l=Math.round(c*s.width/s.height)):se(!1,`Could not calculate cover dimensions. Values must be in the interval \`(0; ${ie.Qr}]\`.`);const u=i.annotations.filter((e=>e.pageIndex===t&&!(e instanceof L.Jn||e instanceof L.On&&i.commentThreads.has(e.id)))).toList(),d=i.formFields.filter((e=>e.annotationIds.some((e=>{const n=i.annotations.get(e);return!(!n||n.pageIndex!==t)})))),p=(0,$.Qg)(d);se(i.backend);const{promise:f}=i.backend.renderTile(t,new L.$u({width:l,height:c}),new L.UL({width:l,height:c}),!1,!0,{annotations:u,formFieldValues:p,formFields:d.toList(),attachments:i.attachments,signatures:i.digitalSignatures&&i.digitalSignatures.signatures}),{element:h}=await f;return{element:h,width:l,height:c}}var ce=n(70006),ue=n(56169),de=n(96617),pe=n(94681),fe=n(97413);const he=["search.stateChange","search.termChange"];var me=n(94734);const ge=(0,T.Z)("StampAnnotationTemplates");var ve=n(66209),ye=n(93092),be=n(17500);function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Pe=(0,T.Z)("ToolbarItems");var Ee=n(59739);var xe=n(24382),De=n(62164),Ce=n(51333);var ke=n(25797);function Oe(e){return e instanceof o.aV?e.toArray():Array.isArray(e)?[...e]:[e]}function Ae(e,t){return"STANDALONE"!==e.type?t():(e.setFormJSONUpdateBatchMode(!0),t().finally((()=>{e.setFormJSONUpdateBatchMode(!1)})))}var Te=n(92234);const Ie=["history.undo","history.redo","history.change","history.willChange","history.clear"];var Fe=n(62e3),Me=n(97358);const _e=(0,T.Z)("DocumentEditorFooterItem");var Ne=n(86617);const Re=["documentComparisonUI.start","documentComparisonUI.end"];var Le=n(79329);var Be=n(62793),je=n(71603),ze=n(38858),Ke=n(33320);const Ze=(0,T.Z)(),Ue=["instant.connectedClients.change","page.press","textLine.press","annotationPresets.update","annotationNote.hover","annotationNote.press"],Ve=[function(e,t){Object.defineProperty(t,"editableAnnotationTypes",{enumerable:!0,configurable:!1,get:()=>e.getState().editableAnnotationTypes}),t.setEditableAnnotationTypes=function(t){if(!Array.isArray(t))throw new r.p2("editableAnnotationTypes must be an array of annotation types.");if(!t.every((e=>e&&e.prototype&&(e.prototype instanceof U.Z||e==U.Z))))throw new r.p2("editableAnnotationTypes must be an array of annotation types.");e.dispatch((0,h.ZV)((0,o.l4)(t)))},t.setIsEditableAnnotation=function(t){if("function"!=typeof t)throw new r.p2("The type for isEditableAnnotation is not valid. Must be `function`.");e.dispatch((0,h.R1)(t))}},function(e,t){const n=()=>e.getState().annotationPresets;Object.defineProperty(t,"annotationPresets",{enumerable:!0,configurable:!1,get:()=>n().toObject()}),Object.defineProperty(t,"currentAnnotationPreset",{enumerable:!0,configurable:!1,get:()=>e.getState().currentItemPreset}),t.setAnnotationPresets=function(t){let r=t;"function"==typeof t&&(r=t.call(null,n().toObject())),I("object"==typeof r,`The ${"function"==typeof t?"return value of your update function":"supplied argument"} is not an object.`),Object.values(r).forEach(A.G);const i=(0,o.D5)(r);n().equals(i)||e.dispatch((0,O.QA)(i))},t.setCurrentAnnotationPreset=function(t){const n=e.getState();"string"==typeof t&&(0,r.kG)(void 0!==n.annotationPresets.get(t),`There is no annotation preset with the supplied 'annotationPresetID' ${t}`),e.dispatch((0,O.Ds)(t))}},function(e,t){const n=()=>[...e.getState().stampAnnotationTemplates];Object.defineProperty(t,"stampAnnotationTemplates",{enumerable:!0,configurable:!1,get:()=>n()}),t.setStampAnnotationTemplates=function(t){let o=t;"function"==typeof o&&(o=o.call(null,n())),ge(Array.isArray(o),`The ${"function"==typeof t?"return value of your update function":"supplied argument"} is not an array.`),o.forEach(me.wB);const r=n();JSON.stringify(r)!==JSON.stringify(o)&&e.dispatch((0,O.fx)([...o]))}},Ee.ZP,function(e,t){const n=()=>e.getState().toolbarItems;Object.defineProperty(t,"toolbarItems",{enumerable:!0,configurable:!1,get:()=>n().toJS()}),t.setToolbarItems=function(t){let i=t;"function"==typeof i&&(i=i.call(null,n().toJS())),Pe(Array.isArray(i),`The ${"function"==typeof t?"return value of your update function":"supplied argument"} is not an array.`);const{backend:a}=e.getState();i=i.map((e=>"ink-signature"===e.type?((0,r.a1)("The 'ink-signature' toolbar item type has been renamed to 'signature'. The 'ink-signature' identifier will be removed on a future release of PSPDFKit for Web."),Se(Se({},e),{},{type:"signature"})):e)).filter((e=>"content-editor"!==e.type||"SERVER"!==(null==a?void 0:a.type)||((0,r.ZK)("The 'content-editor' toolbar item type is not supported in the Server backend: Content Editing is only available in Standalone."),!1))),i.forEach(be.G);const s=(0,o.d0)(i);n().equals(s)||e.dispatch((0,ye.De)(s))},t.setAnnotationToolbarItems=t=>{(0,r.kG)("function"==typeof t,"The annotationToolbarItemsCallback argument must be a function."),e.dispatch((0,ye.v1)(t))}},function(e,t){const n=function(e){const{eventEmitter:t}=e.getState();t.events.push("annotations.willChange","annotations.change","annotations.willSave","annotations.didSave","annotations.load","annotations.create","annotations.update","annotations.delete","annotations.press","annotations.focus","annotations.blur","annotations.transform","annotations.cut","annotations.copy","annotations.paste","annotations.duplicate");let n=e.getState().annotations;const o=()=>t.emit("annotations.willSave"),r=()=>t.emit("annotations.didSave"),i=e=>t.emit("annotations.load",e),a=e=>t.emit("annotations.create",e),s=e=>t.emit("annotations.update",e),l=e=>t.emit("annotations.delete",e);let c=!1;const u=()=>{if(!c){const{annotationManager:t}=e.getState();t&&(t.eventEmitter.on("willSave",o),t.eventEmitter.on("didSave",r),t.eventEmitter.on("load",i),t.eventEmitter.on("create",a),t.eventEmitter.on("update",s),t.eventEmitter.on("delete",l),c=!0)}},d=e.subscribe((()=>{const o=e.getState().annotations;n!==o&&(n=o,t.emit("annotations.change")),u()}));return u(),()=>{if(c){const{annotationManager:t}=e.getState();Z(t,"AnnotationManager is not present in the state"),t.eventEmitter.off("willSave",o),t.eventEmitter.off("didSave",r),t.eventEmitter.off("load",i),t.eventEmitter.off("create",a),t.eventEmitter.off("update",s),t.eventEmitter.off("delete",l),c=!1}d()}}(e);return t.getAnnotations=async function(t){Z("number"==typeof t,"`pageIndex` must be a number");const{annotationManager:n,totalPages:o}=e.getState();Z(t>-1&&t<o,"`pageIndex` must be a number between 0 and "+(o-1)),await(null==n?void 0:n.loadAnnotationsForPageIndex(t));const{annotations:r}=e.getState();return r.filter((e=>e.pageIndex===t)).toList()},t.createAttachment=async function(t){const{hash:n}=await(0,B.uq)(t),o=new L.Pg({data:t});return e.dispatch((0,z.O)(n,o)),n},t.getAttachment=async function(t){if(!(0,_.F3)(t))throw new r.p2(`${t} is not a valid attachment.`);const n=e.getState(),o=n.attachments.get(t);if(o){if(o.data)return o.data;throw new r.p2(`Attachment ${t} not found.`)}return Z(n.backend),n.backend.getAttachment(t)},t.calculateFittingTextAnnotationBoundingBox=function(t){Z(t instanceof F.gd,"The annotation in `calculateFittingTextAnnotationBoundingBox(annotation)` must be of type `PSPDFKit.Annotations.TextAnnotation`"),Z("number"==typeof t.pageIndex,"`pageIndex` must be a number");const{viewportState:n}=e.getState(),o=n.pageSizes.get(t.pageIndex);return Z(o,"`pageIndex` is not a valid page index in the open document"),(0,j.Zv)(t,o)},t.getEmbeddedFiles=async function(){const{backend:t}=e.getState();return Z(t),t.getEmbeddedFiles()},t.setOnAnnotationResizeStart=function(t){e.dispatch((0,O.dt)(t))},t.getOverlappingAnnotations=async function(t){Z(t instanceof F.q6||t instanceof K.ZP,"Argument must be an annotation or a form field");const{annotationManager:n,annotations:r}=e.getState();if(t instanceof K.ZP){const i=t.annotationIds?t.annotationIds:(0,o.aV)(),a=r.valueSeq().toList().filter((e=>i.includes(e.id)||i.includes(String(e.pdfObjectId)))),s=a.map((e=>e.pageIndex)),l=s.filter(((e,t)=>s.indexOf(e)===t));for(let e=0;e<l.size;e++){const t=l.get(e);t&&await(null==n?void 0:n.loadAnnotationsForPageIndex(t))}const c=e.getState().annotations.valueSeq().toList().filter((e=>a.some((t=>t.pageIndex===e.pageIndex)))).filter((e=>!(e instanceof F.x_&&e.formFieldName!==t.formFieldName)));let u,d=(0,o.aV)();return c.size>0&&(u=a.map((e=>e.boundingBox)),d=c.filter((e=>u.some((t=>e.boundingBox.isRectOverlapping(t)))))),d}{await(null==n?void 0:n.loadAnnotationsForPageIndex(t.pageIndex));const{annotations:o}=e.getState();return o.filter((e=>!(e.id===t.id))).filter((e=>e.boundingBox.isRectOverlapping(t.boundingBox)&&e.pageIndex===t.pageIndex)).valueSeq().toList()}},n},function(e,t){const n=function(e){const{eventEmitter:t}=e.getState();t.events.push("bookmarks.change","bookmarks.willSave","bookmarks.didSave","bookmarks.load","bookmarks.create","bookmarks.update","bookmarks.delete");const n=()=>t.emit("bookmarks.change"),o=()=>t.emit("bookmarks.willSave"),r=()=>t.emit("bookmarks.didSave"),i=e=>t.emit("bookmarks.load",e),a=e=>t.emit("bookmarks.create",e),s=e=>t.emit("bookmarks.update",e),l=e=>t.emit("bookmarks.delete",e);let c=!1;const u=()=>{if(!c){const{bookmarkManager:t}=e.getState();t&&(t.eventEmitter.on("change",n),t.eventEmitter.on("willSave",o),t.eventEmitter.on("didSave",r),t.eventEmitter.on("load",i),t.eventEmitter.on("create",a),t.eventEmitter.on("update",s),t.eventEmitter.on("delete",l),c=!0)}},d=e.subscribe(u);return u(),()=>{if(c){const{bookmarkManager:t}=e.getState();t.eventEmitter.off("change",n),t.eventEmitter.off("willSave",o),t.eventEmitter.off("didSave",r),t.eventEmitter.off("load",i),t.eventEmitter.off("create",a),t.eventEmitter.off("update",s),t.eventEmitter.off("delete",l),c=!1}d()}}(e);return t.getBookmarks=async function(){var t;const n=await(null===(t=e.getState().bookmarkManager)||void 0===t?void 0:t.getBookmarks());return V(n),n.toList()},n},function(e,t){const n=function(e){const{eventEmitter:t}=e.getState();t.events.push("formFieldValues.update","formFieldValues.willSave","formFieldValues.didSave","forms.willSubmit","forms.didSubmit","formFields.change","formFields.willSave","formFields.didSave","formFields.load","formFields.create","formFields.update","formFields.delete");const n=e.getState();let{formFields:o}=n;const r=()=>t.emit("formFieldValues.willSave"),i=()=>t.emit("formFieldValues.didSave"),a=e=>t.emit("formFieldValues.update",e),s=e=>t.emit("forms.willSubmit",e),l=e=>t.emit("forms.didSubmit",e),c=()=>t.emit("formFields.willSave"),u=()=>t.emit("formFields.didSave"),d=e=>t.emit("formFields.load",e),p=e=>t.emit("formFields.create",e),f=e=>t.emit("formFields.update",e),h=e=>t.emit("formFields.delete",e);let m=!1,g=!1;const v=()=>{const t=e.getState();if(!m){const{formFieldValueManager:e}=t;e&&(e.eventEmitter.on("willSave",r),e.eventEmitter.on("didSave",i),e.eventEmitter.on("update",a),e.eventEmitter.on("willSubmit",s),e.eventEmitter.on("didSubmit",l),m=!0)}if(!g){const{formFieldManager:e}=t;e&&(0,b.ix)(t)&&(e.eventEmitter.on("willSave",c),e.eventEmitter.on("didSave",u),e.eventEmitter.on("load",d),e.eventEmitter.on("create",p),e.eventEmitter.on("update",f),e.eventEmitter.on("delete",h),g=!0)}},y=e.subscribe((()=>{const n=e.getState();if((0,b.ix)(n)){const e=n.formFields;o!==e&&(o=e,t.emit("formFields.change"))}v()}));return v(),()=>{if(m){const{formFieldValueManager:t}=e.getState();t.eventEmitter.off("willSave",r),t.eventEmitter.off("didSave",i),t.eventEmitter.off("update",a),t.eventEmitter.off("willSubmit",s),t.eventEmitter.off("didSubmit",l),m=!1}if(g){const{formFieldManager:t}=e.getState();t.eventEmitter.off("willSave",c),t.eventEmitter.off("didSave",u),t.eventEmitter.off("load",d),t.eventEmitter.off("create",p),t.eventEmitter.off("update",f),t.eventEmitter.off("delete",h),g=!1}y()}}(e);return t.getFormFields=async function(){const{features:t,formFieldManager:n,formsEnabled:o}=e.getState();J(t.includes(l.q.FORMS),N.DR),J(o,N.BZ),n instanceof X.c&&await n.loadFormFields();const{formFields:r}=e.getState();return r.valueSeq().toList()},t.getFormFieldValues=function(){const{formFields:t,features:n,formsEnabled:r}=e.getState();return J(n.includes(l.q.FORMS),N.DR),J(r,N.BZ),(0,$.Qg)(t).reduce(((e,t)=>(e[t.name]=t.value instanceof o.aV?t.value.toJS():t.value,e)),{})},t.setFormFieldValues=async function(t){const{formFieldManager:n,features:r,formsEnabled:i}=e.getState();J(r.includes(l.q.FORMS),N.DR),J(i,N.BZ),n instanceof X.c&&await n.loadFormFields();const{formFields:a}=e.getState(),s=Object.keys(t).map((e=>{const n=a.get(e);J(a.has(e),`Tried to set the form field value for form field \`${e}\` which does not exist.`);const r=Array.isArray(t[e])?(0,o.aV)(t[e]):t[e];return n&&(0,N._1)(n,r),{name:e,value:r,optionIndexes:void 0}}));return new Promise((t=>{e.dispatch((0,Y.xh)(s,t))})).then((()=>{})).catch((e=>{throw e}))},t.setOnWidgetAnnotationCreationStart=function(t){const{features:n}=e.getState();J("function"==typeof t,"The callback must be a function."),J(n.includes(l.q.FORMS),N.DR),J(n.includes(l.q.FORM_DESIGNER),N.RB),e.dispatch((0,Y.r$)(t))},n},ve.Z,function(e,t){function n(){const{selectedAnnotationIds:t,annotations:n}=e.getState();if(t.size>=1){const e=t.first();(0,r.kG)(e);return n.get(e)}return null}function i(t,n){if(!t)return void e.dispatch((0,k.fz)());const i=o.aV.isList(t)?t:(0,o.aV)([t]),{annotations:a}=e.getState(),s=e.getState(),c=i.map((t=>{const n=t instanceof F.q6?t.id:t;(0,r.kG)("string"==typeof n,"annotationId must be a string"),(0,r.kG)(a.has(n),"Unknown annotationId. Either the annotation was not yet created or is not yet loaded from the annotation provider.");const o=a.get(n);return(0,r.kG)(o&&(0,_.Fp)(o),"Annotations with the `noView` or `hidden` flag set cannot be selected."),o instanceof F.x_&&!s.formDesignMode?e.dispatch((0,O.vy)(n)):((0,r.kG)(!(o instanceof F.x_)||s.features.includes(l.q.FORM_DESIGNER),`Cannot select PSPDFKit.Annotations.WidgetAnnotation: ${N.RB}`),(0,r.kG)(!(o instanceof F.x_)||(0,b.k_)(s.backend),`Cannot select PSPDFKit.Annotations.WidgetAnnotation: ${N.Bl}`)),n}));if(1===c.size){const t=a.get(c.first());e.dispatch((0,k.J4)(c.toSet(),t instanceof F.gd||t instanceof F.Qi?n:M.o.SELECTED))}else e.dispatch((0,k.J4)(c.toSet(),M.o.SELECTED))}t.getSelectedAnnotation=function(){(0,r.XV)("getSelectedAnnotation","getSelectedAnnotations",!1);for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return n.apply(this,t)},t.getSelectedAnnotations=function(){const{selectedAnnotationIds:t,annotations:n}=e.getState();return t.size>=1?(0,o.aV)(t.map((e=>{const t=n.get(e);return(0,r.kG)(t),t}))):null},t.setSelectedAnnotation=function(e){(0,r.XV)("setSelectedAnnotation","setSelectedAnnotations",!1),i(e,M.o.SELECTED)},t.setSelectedAnnotations=function(e){i(e,M.o.SELECTED)},t.groupAnnotations=function(t){if(!t||0===(null==t?void 0:t.size))return;const n=null==t?void 0:t.map((e=>e instanceof F.q6?e.id:e));e.dispatch((0,h._R)(n.toSet()))},t.getAnnotationsGroups=function(){const{annotationsGroups:t}=e.getState();return t.size>=1?t:null},t.deleteAnnotationsGroup=function(t){t&&e.dispatch((0,h.UZ)(t))},t.setEditingAnnotation=function(t,n){e.dispatch((0,k.fz)()),!0===n&&e.dispatch((0,k.Y1)()),i(t,M.o.EDITING)};let a=n();const{eventEmitter:s}=e.getState();return s.events.push(...R),e.subscribe((()=>{const e=n();(a&&a.id)!==(e&&e.id)?(a=e,s.emit("annotationSelection.change",e)):a=e}))},function(e,t){t.setCustomOverlayItem=function(t){H(t instanceof q.Z,"invalid item. Expected an instance of PSPDFKit.CustomOverlayItem"),(0,q.G)(t),e.dispatch((e=>({type:W.jJ7,item:e}))(t))},t.removeCustomOverlayItem=function(t){H("string"==typeof t,"`id` must be a string"),e.dispatch((e=>({type:W.G8_,id:e}))(t))}},function(e,t){t.setLocale=async function(t){const n=(0,Q.z5)(t);await(0,Q.sS)(n),e.dispatch((0,h.i_)(n))},Object.defineProperty(t,"locale",{enumerable:!0,configurable:!1,get:()=>e.getState().locale})},function(e,t){const n=()=>e.getState().searchState;t.search=async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{backend:o,totalPages:r,searchState:{minSearchQueryLength:i}}=e.getState(),a=null!=n.startPageIndex?n.startPageIndex:0,s=null!=n.endPageIndex?n.endPageIndex:r-1,l=n.searchType||de.S.TEXT,c=n.searchInAnnotations||!1,u="boolean"==typeof n.caseSensitive?n.caseSensitive:l!==de.S.TEXT;return(0,fe.k)(Object.values(de.S).includes(l),"searchType is not valid."),l===de.S.PRESET&&(0,fe.k)(Object.values(pe.n).includes(t),"search query is not a valid search pattern."),(0,fe.k)("number"==typeof a&&"number"==typeof s,"startPageIndex/endPageIndex must be numbers"),(0,fe.k)("boolean"==typeof c,"searchInAnnotations should be boolean"),(0,fe.k)(void 0===n.caseSensitive||"boolean"==typeof n.caseSensitive,"caseSensitive should be boolean"),(0,fe.k)(s>=a,"endPageIndex must be greater than or equal to startPageIndex"),(0,fe.k)(t.length>=i,`"${t}" - search query length (${t.length}) shorter than the minimum (${i})`),(0,fe.k)(o),await o.search(t,a,s-a+1,u,c,l)},Object.defineProperty(t,"searchState",{enumerable:!0,configurable:!1,get:n}),t.setSearchState=function(t){let i=t;if("function"==typeof i&&(i=i.call(null,n())),!(i instanceof ue.Z)){const e="function"==typeof i?"return value of your update function":"supplied argument";throw new r.p2(`The ${e} is not an instance of PSPDFKit.SearchState.`)}const a=n();i.minSearchQueryLength!==a.minSearchQueryLength&&((0,r.ZK)(`Trying to set readonly property SearchState.minSearchQueryLength from ${a.minSearchQueryLength} to ${i.minSearchQueryLength} failed. For more details please see https://pspdfkit.com/api/web/PSPDFKit.SearchState.html#minSearchQueryLength`),i=i.set("minSearchQueryLength",a.minSearchQueryLength)),function(e){if("boolean"!=typeof e.isFocused)throw new r.p2("`isFocused` must be of type boolean.");if("boolean"!=typeof e.isLoading)throw new r.p2("`isLoading` must be of type boolean.");if("string"!=typeof e.term)throw new r.p2("`term` must be of type string.");if("number"!=typeof e.focusedResultIndex)throw new r.p2("`focusedResultIndex` must be of type number.");if(!(e.results instanceof o.aV))throw new r.p2("`results` must be of type PSPDFKit.Immutable.List.")}(i),function(e,t,n){const{dispatch:o}=e;t!==n&&o((0,ce.j8)(n))}(e,n(),i)},t.startUISearch=function(t){const{dispatch:n,getState:o}=e,{searchProvider:r,eventEmitter:i,searchState:{minSearchQueryLength:a}}=o();let s=!1;i.emit("search.termChange",{term:t,preventDefault:()=>{s=!0}}),s||((0,fe.k)(t.length>=a,`"${t}" - search query length (${t.length}) shorter than the minimum (${a})`),n((0,ce.Xe)()),n((0,ce._8)(t)),null==r||r.searchTerm(t))};let i=e.getState();const{eventEmitter:a}=i;return a.events.push(...he),e.subscribe((()=>{const t=e.getState();i.searchState.equals(t.searchState)||a.emit("search.stateChange",t.searchState),i=t}))},function(e,t){t.renderPageAsArrayBuffer=async function(t,n){const{element:o,width:r,height:i}=await le(t,n,e);let a;if(o instanceof HTMLImageElement){const e=document.createElement("canvas");e.width=r,e.height=i,a=e.getContext("2d"),await(0,ae.sR)(o),a.drawImage(o,0,0,r,i)}else o instanceof HTMLCanvasElement?a=o.getContext("2d"):se(!1,"There was an error while rendering the page. Please try again.");return a.getImageData(0,0,r,i).data.buffer},t.renderPageAsImageURL=async function(t,n){const{element:o}=await le(t,n,e);return o instanceof HTMLImageElement?o.src:o instanceof HTMLCanvasElement?URL.createObjectURL(await(0,ae._c)(o)):void se(!1,"There was an error while generating the image URL. Please try again.")}},function(e,t){async function n(){let{storedSignatures:t}=e.getState().signatureState;if(!t){const n=(0,te.de)();await n(e.dispatch,e.getState),t=e.getState().signatureState.storedSignatures}return t||(0,o.aV)()}async function r(t){let n=e.getState().signatureState.storedSignatures;const r=n instanceof o.aV;n||(n=await e.getState().signatureState.populateStoredSignatures());let i=t;"function"==typeof i&&(i=i.call(null,n)),ne(i instanceof o.aV&&i.every((e=>e instanceof L.Zc||e instanceof L.sK)),`The ${"function"==typeof t?"return value of your update function":"supplied argument"} is not a PSPDFKit.Immutable.List of PSPDFKit.Annotations.InkAnnotation or PSPDFKit.Annotations.ImageAnnotation`),r&&n.equals(i)||(e.dispatch((0,te.nR)(i)),e.getState().eventEmitter.emit("inkSignatures.update",i),e.getState().eventEmitter.emit("inkSignatures.change"),e.getState().eventEmitter.emit("storedSignatures.update",i),e.getState().eventEmitter.emit("storedSignatures.change"))}e.getState().eventEmitter.events.push(...oe,...re),t.getInkSignatures=async function(){return(0,ee.XV)("instance.getInkSignatures","instance.getStoredSignatures"),n()},t.getStoredSignatures=n,t.setInkSignatures=async function(e){return(0,ee.XV)("instance.setInkSignatures","instance.setStoredSignatures"),r(e)},t.setStoredSignatures=r},G.Z,function(e,t){t.setIsEditableComment=function(t){(0,r.kG)("function"==typeof t,"The type for isEditableComment is not valid. Must be `function`."),e.dispatch((0,h.Gh)(t))}},xe.Z,function(e,t){const n=function(e){const{eventEmitter:t}=e.getState();t.events.push("comments.change","comments.willSave","comments.didSave","comments.load","comments.create","comments.update","comments.delete","comments.mention");const n=()=>t.emit("comments.change"),o=()=>t.emit("comments.willSave"),r=()=>t.emit("comments.didSave"),i=e=>t.emit("comments.load",e),a=e=>t.emit("comments.create",e),s=e=>t.emit("comments.update",e),l=e=>t.emit("comments.delete",e);let c=!1;const u=()=>{if(!c){const{commentManager:t}=e.getState();t&&(t.eventEmitter.on("change",n),t.eventEmitter.on("willSave",o),t.eventEmitter.on("didSave",r),t.eventEmitter.on("load",i),t.eventEmitter.on("create",a),t.eventEmitter.on("update",s),t.eventEmitter.on("delete",l),c=!0)}},d=e.subscribe(u);return u(),()=>{if(c){const{commentManager:t}=e.getState();t&&(t.eventEmitter.off("change",n),t.eventEmitter.off("willSave",o),t.eventEmitter.off("didSave",r),t.eventEmitter.off("load",i),t.eventEmitter.off("create",a),t.eventEmitter.off("update",s),t.eventEmitter.off("delete",l)),c=!1}d()}}(e);return t.getComments=async function(){const{comments:t,backend:n}=e.getState(),o=t.filter((e=>!(0,De.kT)(e))).toList();return o.size||null==n||!n.isUsingInstantProvider()?o:new Promise((t=>{const n=setInterval((()=>{const{hasFetchedInitialRecordsFromInstant:o,comments:r}=e.getState();o&&(clearInterval(n),t(r.filter((e=>!(0,De.kT)(e))).toList()))}),500)}))},t.setMentionableUsers=function(t){e.dispatch((0,Ce.v7)(t))},t.setMaxMentionSuggestions=function(t){e.dispatch((0,Ce.aZ)(t))},t.setOnCommentCreationStart=function(t){(0,r.kG)("function"==typeof t,"The callback must be a function."),e.dispatch((0,Ce.Rf)(t))},n},ke.Z,function(e,t){const n=function(e){const{eventEmitter:t}=e.getState();t.events.push("document.saveStateChange");const n=e=>{t.emit("document.saveStateChange",e)};let o=!1;const i=()=>{if(!o){const{changeManager:t}=e.getState();t&&(t.eventEmitter.on("saveStateChange",n),o=!0)}},a=e.subscribe((()=>{i()}));return i(),()=>{if(o){const{changeManager:t}=e.getState();(0,r.kG)(t),t.eventEmitter.off("saveStateChange",n),o=!1}a()}}(e);return t.save=async function(){const{changeManager:t}=e.getState();return(0,r.kG)(t),t.save(!0)},t.hasUnsavedChanges=function(){const{changeManager:t}=e.getState();return(0,r.kG)(t),t.hasUnsavedChanges()},t.syncChanges=async function(){const{backend:n}=e.getState();if((0,r.kG)(n),!n.isUsingInstantProvider())throw new r.p2("You need PSPDFKit Instant to use this method.");return t.save()},t.create=async function(t){const{changeManager:n,backend:o}=e.getState();return(0,r.kG)(n&&o),Ae(o,(()=>n.create(Oe(t))))},t.update=async function(t){const{changeManager:n,backend:o}=e.getState();return(0,r.kG)(n&&o),Ae(o,(()=>n.update(Oe(t))))},t.delete=async function(t){const{changeManager:n,backend:o}=e.getState();return(0,r.kG)(n&&o),Ae(o,(()=>n.delete(Oe(t))))},t.ensureChangesSaved=async function(t){const{changeManager:n,backend:o}=e.getState();return(0,r.kG)(n&&o),"STANDALONE"===(null==o?void 0:o.type)&&await(null==o?void 0:o.setFormJSONUpdateBatchMode(!1)),n.ensureChangesSaved(Oe(t))},n},ke.Z,function(e,t){t.setGroup=function(t){const{backend:n}=e.getState();null!=n&&n.isCollaborationPermissionsEnabled()?e.dispatch((0,h.YK)(t)):(0,r.ZK)("`instance.setGroup` is no-op if Collaboration Permissions is not enabled.")},t.resetGroup=function(){const{backend:t}=e.getState();null!=t&&t.isCollaborationPermissionsEnabled()?e.dispatch((0,h.YK)(t.getDefaultGroup())):(0,r.ZK)("`instance.setGroup` is no-op if Collaboration Permissions is not enabled.")}},function(e,t){const n=()=>e.getState().documentEditorFooterItems,r=()=>e.getState().documentEditorToolbarItems;Object.defineProperty(t,"documentEditorFooterItems",{enumerable:!0,configurable:!1,get:()=>n().toJS()}),Object.defineProperty(t,"documentEditorToolbarItems",{enumerable:!0,configurable:!1,get:()=>r().toJS()}),t.setDocumentEditorFooterItems=function(t){const{features:r}=e.getState();(0,fe.k)(r.includes(l.q.DOCUMENT_EDITING),G.I);let i=t;"function"==typeof i&&(i=i(n().toJS())),_e(Array.isArray(i),`The ${"function"==typeof t?"return value of your update function":"supplied argument"} is not an array.`),i.forEach(Fe.G);const a=(0,o.d0)(i);var s;n().equals(a)||e.dispatch((s=a,{type:W.Kpf,documentEditorFooterItems:s}))},t.setDocumentEditorToolbarItems=function(t){const{features:n}=e.getState();(0,fe.k)(n.includes(l.q.DOCUMENT_EDITING),G.I);let i=t;"function"==typeof i&&(i=i(r().toJS())),_e(Array.isArray(i),`The ${"function"==typeof t?"return value of your update function":"supplied argument"} is not an array.`),i.forEach(Me.G);const a=(0,o.d0)(i);var s;r().equals(a)||e.dispatch((s=a,{type:W.wPI,documentEditorToolbarItems:s}))}},function(e,t){function n(){const{isHistoryEnabled:t,undoActions:n}=e.getState();return t&&n.size>0}function o(){const{isHistoryEnabled:t,redoActions:n}=e.getState();return t&&n.size>0}e.getState().eventEmitter.events.push(...Ie),t.history={},t.history.undo=async function(){return!!n()&&(e.dispatch((0,Te.Yw)()),!0)},t.history.redo=async function(){return!!o()&&(e.dispatch((0,Te.KX)()),!0)},t.history.canUndo=function(){return n()},t.history.canRedo=function(){return o()},t.history.clear=function(){e.dispatch((0,Te.QQ)())},t.history.enable=function(){e.dispatch((0,Te.z9)())},t.history.disable=function(){e.dispatch((0,Te.ou)())}},function(e,t){t.parseXFDF=async(t,n)=>{const{backend:o}=e.getState();return(0,r.kG)(o,"backend is null."),(0,r.kG)("STANDALONE"===o.type,"`instance.parseXFDF` only works in standalone mode."),o.parseXFDF(t,null!=n&&n)}},function(e,t){e.getState().eventEmitter.events.push(...Re),t.setDocumentComparisonMode=async function(t){const{features:n,backend:o,viewportState:{documentComparisonMode:i}}=e.getState();if((0,r.kG)(n.includes(l.q.DOCUMENT_COMPARISON),c.nN),(0,r.kG)("STANDALONE"===(null==o?void 0:o.type),c.bZ),function(e){if("object"!=typeof e)throw new r.p2("`PSPDFKit.DocumentComparisonConfiguration` must be a `PSPDFKit.DocumentComparisonConfiguration` plain object, or `null`.");if(null===e)return;if("boolean"!=typeof e.autoCompare)throw new r.p2("`PSPDFKit.DocumentComparisonConfiguration.autoCompare` must be a boolean value.");if("object"!=typeof e.documentA||null===e.documentA)throw new r.p2("`PSPDFKit.DocumentComparisonConfiguration.documentA` must be a plain object.");if("object"!=typeof e.documentB||null===e.documentB)throw new r.p2("`PSPDFKit.DocumentComparisonConfiguration.documentB` must be a plain object.");if(!("string"==typeof e.documentA.source||e.documentA.source instanceof ArrayBuffer||e.documentA.source instanceof Promise))throw new r.p2("`PSPDFKit.DocumentComparisonConfiguration.documentA#source` must be a string, an ArrayBuffer or a Promise object resolving to a string or an ArrayBuffer.");if(!("string"==typeof e.documentB.source||e.documentB.source instanceof ArrayBuffer||e.documentB.source instanceof Promise))throw new r.p2("`PSPDFKit.DocumentComparisonConfiguration.documentB#source` must be a string, an ArrayBuffer or a Promise object resolving to a string or an ArrayBuffer.");if(void 0!==e.documentA.pageIndex&&"number"!=typeof e.documentA.pageIndex)throw new r.p2("If provided, `PSPDFKit.DocumentComparisonConfiguration.documentA#pageIndex` must be a number.");if(void 0!==e.documentB.pageIndex&&"number"!=typeof e.documentB.pageIndex)throw new r.p2("If provided, `PSPDFKit.DocumentComparisonConfiguration.documentB#pageIndex` must be a number.");if(void 0!==e.blendMode&&!Object.values(Ne.b).includes(e.blendMode))throw new r.p2("If provided, `PSPDFKit.DocumentComparisonConfiguration.blendMode` must be a `PSPDFKit.BlendMode`.");if(void 0!==e.strokeColors&&("object"!=typeof e.strokeColors||null===e.strokeColors))throw new r.p2("If provided, `PSPDFKit.DocumentComparisonConfiguration.strokeColors` must be a plain object.");if("object"==typeof e.strokeColors){if(void 0!==e.strokeColors.documentA&&!(e.strokeColors.documentA instanceof L.Il))throw new r.p2("If provided, `PSPDFKit.DocumentComparisonConfiguration.strokeColors#documentA` must be a `PSPDFKit.Color` value.");if(void 0!==e.strokeColors.documentB&&!(e.strokeColors.documentB instanceof L.Il))throw new r.p2("If provided, `PSPDFKit.DocumentComparisonConfiguration.strokeColors#documentB` must be a `PSPDFKit.Color` value.");e.strokeColors.documentA&&e.strokeColors.documentB&&e.strokeColors.documentA.equals(e.strokeColors.documentB)&&(0,r.ZK)("The values provided for `PSPDFKit.DocumentComparisonConfiguration.strokeColors#documentA` and `PSPDFKit.DocumentComparisonConfiguration.strokeColors#documentB` are identical.")}}(t),t)e.dispatch((0,h.cz)(t));else if(i){const{completion:{end:{promise:t}}}=i;return e.dispatch((0,h.cz)(null)),t}}},function(e,t){t.compareDocuments=async function(t,n){var o;const{backend:i,features:a}=e.getState();if("object"!=typeof t||null===t)throw new r.p2("`comparisonDocuments` must be a plain object.");(0,r.kG)(a.includes(l.q.TEXT_COMPARISON),p),(0,r.kG)("STANDALONE"===(null==i?void 0:i.type),f);const u=await async function(e){return(0,r.kG)(e.originalDocument.filePath),(0,r.kG)(e.changedDocument.filePath),{originalDocument:d(d({},(0,s.c)(e.originalDocument)),{},{arrayBuffer:await(0,c.rh)(e.originalDocument.filePath)}),changedDocument:d(d({},(0,s.c)(e.changedDocument)),{},{arrayBuffer:await(0,c.rh)(e.changedDocument.filePath)})}}(t);return(0,r.kG)(i),(0,r.kG)("STANDALONE"===i.type,"compareDocuments is only supported in the web standalone."),null===(o=i.compareDocuments)||void 0===o?void 0:o.call(i,u,n)}}],Ge="You need PSPDFKit Instant to use this method.",We="You need to enable clients presence in your configuration (`instant: { clientsPresenceEnabled: true }`) to use this method.";class qe{constructor(e){let{store:t,backend:n,eventEmitter:a}=e;a.events.push(...Ue);let s=!1;const l=Ve.map((e=>e(t,this)));let c=(0,o.D5)();t.dispatch((0,h.lW)((e=>{s||(c=e.map((e=>(0,g.B)(e))),a.emit("instant.connectedClients.change",c))}))),Object.defineProperty(this,"totalPageCount",{enumerable:!0,configurable:!1,get:()=>t.getState().totalPages}),this.pageInfoForIndex=function(e){const n=t.getState().pages.get(e);return n?(0,m.J)(n):null},this.textLinesForPageIndex=async function(e){const{promise:t}=n.textForPageIndex(e);return t},this.toggleClipboardActions=function(e){Ze("boolean"==typeof e,"`toggleClipboardActions` expects a boolean as an argument"),t.dispatch((0,h.UG)(e))},this.setMeasurementSnapping=function(e){Ze("boolean"==typeof e,"`setMeasurementSnapping` expects a boolean as an argument"),t.dispatch((0,h.Gc)(e))},this.setMeasurementPrecision=function(e){Ze("string"==typeof e,"`setMeasurementPrecision` expects a string as an argument"),t.dispatch((0,h.M4)(e))},this.setMeasurementScale=function(e){Ze(e instanceof je.Z,"`setMeasurementScale` expects an instance of `MeasurementScale` as an argument"),t.dispatch((0,h._b)(e))},this.setMeasurementValueConfiguration=e=>{Ze("function"==typeof e,"The `measurementValueConfigurationCallback` argument must be a function."),t.dispatch((0,h.QL)(e))},this.getMarkupAnnotationText=async function(e){return Ze(e instanceof v.Z,"annotation must be a PSPDFKit.Annotations.MarkupAnnotation"),n.getTextFromRects(e.pageIndex,e.rects)},this.getTextFromRects=async function(e,t){return Ze("number"==typeof e,"pageIndex must be a number"),Ze(t instanceof o.aV&&t.every((e=>e instanceof x.UL)),"rects must be a PSPDFKit.Immutable.List of PSPDFKit.Geometry.Rect"),n.getTextFromRects(e,t)},this.getDocumentPermissions=async function(){return(0,b.Pt)(t.getState())},Object.defineProperty(this,"currentZoomLevel",{enumerable:!0,configurable:!1,get:()=>t.getState().viewportState.zoomLevel}),Object.defineProperty(this,"annotationCreatorName",{enumerable:!0,configurable:!1,get:()=>t.getState().annotationCreatorName}),Object.defineProperty(this,"maximumZoomLevel",{enumerable:!0,configurable:!1,get(){const{viewportState:e}=t.getState();return(0,y.Sm)(e)}}),Object.defineProperty(this,"minimumZoomLevel",{enumerable:!0,configurable:!1,get(){const{viewportState:e}=t.getState();return(0,y.Yo)(e)}}),Object.defineProperty(this,"zoomStep",{enumerable:!0,configurable:!1,get(){const{viewportState:e}=t.getState();return e.zoomStep}}),Object.defineProperty(this,"disablePointSnapping",{get(){const{viewportState:e}=t.getState();return e.disablePointSnapping}}),Object.defineProperty(this,"connectedClients",{enumerable:!0,configurable:!1,get:()=>n.isUsingInstantProvider()?n.hasClientsPresence()?c:((0,r.ZK)(We),(0,o.D5)()):((0,r.ZK)(Ge),(0,o.D5)())}),this.addEventListener=function(e,t){Ze("instant.connectedClients.change"!==e||n.isUsingInstantProvider(),Ge),Ze("instant.connectedClients.change"!==e||n.hasClientsPresence(),We),Ze(!e.startsWith("comments.")||(0,b.xr)(n),Ge);const o=He(e);try{a.on(o,t)}catch(e){throw new r.p2(e)}},this.removeEventListener=function(e,t){Ze("instant.connectedClients.change"!==e||n.isUsingInstantProvider(),Ge),Ze("instant.connectedClients.change"!==e||n.hasClientsPresence(),We);const o=He(e);try{a.off(o,t)}catch(e){throw new r.p2(e)}},this.jumpToRect=function(e,n){const{totalPages:o}=t.getState();Ze(e>=0&&e<o,`Could not find page with index ${e} in this document.`),Ze(n instanceof x.UL,"rect must be of type `PSPDFKit.Geometry.Rect`."),t.dispatch((0,P.kN)(e,n))},this.jumpAndZoomToRect=function(e,n){const{totalPages:o}=t.getState();Ze(e>=0&&e<o,`Could not find page with index ${e} in this document.`),Ze(n instanceof x.UL,"rect must be of type `PSPDFKit.Geometry.Rect`."),t.dispatch((0,P.vP)(e,n))},this.transformContentClientToPageSpace=function(e,n){const{totalPages:o,viewportState:r}=t.getState();Ze(n>=0&&n<o,`Could not find page with index ${n} in this document.`),Ze(e instanceof x.UL||e instanceof x.E9,"rectOrPoint must be of type `PSPDFKit.Geometry.Rect` or `PSPDFKit.Geometry.Point`.");const i=(0,w.Ek)(r,n);return e.apply(i)},this.transformContentPageToClientSpace=function(e,n){const{totalPages:o,viewportState:r}=t.getState();Ze(n>=0&&n<o,`Could not find page with index ${n} in this document.`),Ze(e instanceof x.UL||e instanceof x.E9,"rectOrPoint must be of type `PSPDFKit.Geometry.Rect` or `PSPDFKit.Geometry.Point`.");const i=(0,w.cr)(r,n);return e.apply(i)},this.transformClientToPageSpace=function(e,n){const{totalPages:o,viewportState:r,rootElement:i}=t.getState();Ze(n>=0&&n<o,`Could not find page with index ${n} in this document.`),Ze(e instanceof x.UL||e instanceof x.E9,"rectOrPoint must be of type `PSPDFKit.Geometry.Rect` or `PSPDFKit.Geometry.Point`.");const a=null==i?void 0:i.getBoundingClientRect(),s=(0,w.Ek)(r,n).translate({x:-a.left,y:-a.top});return e.apply(s)},this.transformPageToClientSpace=function(e,n){const{totalPages:o,viewportState:r,rootElement:i}=t.getState();Ze(n>=0&&n<o,`Could not find page with index ${n} in this document.`),Ze(e instanceof x.UL||e instanceof x.E9,"rectOrPoint must be of type `PSPDFKit.Geometry.Rect` or `PSPDFKit.Geometry.Point`.");const a=null==i?void 0:i.getBoundingClientRect(),s=(0,w.cr)(r,n);return e.translate(new x.E9({x:a.left,y:a.top})).apply(s)},this.transformRawToPageSpace=function(e,n){Ze(null!=n,"No page index was provided as second parameter to this function.");const{pages:o}=t.getState(),r=o.get(n);Ze(r,`No page found with pageIndex ${n}`);let i=null;if(e instanceof x.eB)i=e;else{i=(0,Be.r)(e);const t=i.top;i=i.set("top",i.bottom).set("bottom",t)}let a=i.apply(r.matrix);const s=x.UL.fromInset(a),l=a.top;return a=a.set("top",a.bottom).set("bottom",l),s.set("top",r.pageSize.height-a.top)},this.transformPageToRawSpace=function(e,n){Ze(null!=n,"No page index was provided as second parameter to this function.");const{pages:o}=t.getState(),r=o.get(n);Ze(r,`No page found with pageIndex ${n}`);let i=x.eB.fromRect(e);const{height:a}=r.pageSize,s=a-i.top;i=i.set("top",s).set("bottom",s-e.height);const l=i.apply(r.reverseMatrix),c=l.top;return l.set("top",l.bottom).set("bottom",c)},this.exportPDF=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.exportPDF(e)},this.exportXFDF=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return n.exportXFDF(e)},this.exportInstantJSON=async function(e){return n.exportInstantJSON(e)},this._destroy=function(){l.filter(Boolean).forEach((e=>{null==e||e()})),s=!0},this.print=function(e){const n=t.getState(),{isPrinting:o}=n,i=(0,b.VT)(n);e&&"object"!=typeof e&&(0,r.ZK)("PSPDFKit.Instance.print: options must be an object. If you want to pass the `printMode`, use `{ mode: PSPDFKit.PrintMode.DOM }` instead.");const a="object"==typeof e?e.mode:e;if(!i)throw new r.p2("Tried to start a print job while printing is disabled.");if(o)throw new r.p2("Tried to start a print job while another one was already being processed.\nUse PSPDFKit.Instance#abortPrint to terminate the current print job.\n ");if(a&&!Object.prototype.hasOwnProperty.call(E.X,a))throw new r.p2("The supplied printMode is not valid.\nValid `printMode`s are: PSPDFKit.PrintMode.DOM, PSPDFKit.PrintMode.EXPORT_PDF");t.dispatch(C.S0({mode:a,excludeAnnotations:"object"==typeof e&&e.excludeAnnotations}))},this.setAnnotationCreatorName=function(e){const{annotationCreatorNameReadOnly:n}=t.getState();if(n)throw new r.p2("When the annotation creator name is defined on the JWT it can't be overriden.");t.dispatch((0,h.X8)(e))},this.setCustomRenderers=function(e){t.dispatch((0,h.jM)(e))},this.setCustomUIConfiguration=function(e){const{customUIStore:n}=t.getState();if((null==n?void 0:n.getState())===e)return;let o,r;o="function"==typeof e?e((null==n?void 0:n.getState())||null):e,(0,Le.a)(o),n||(r=new i.Z(o),t.dispatch((0,h.W)(r))),(n||r).setState(o)},this.setInlineTextSelectionToolbarItems=e=>{Ze("function"==typeof e,"The inlineTextSelectionToolbarItemsCallback argument must be a function."),t.dispatch((0,k.tu)(e))},this.abortPrint=function(){const e=t.getState(),{isPrinting:n}=e;if(!(0,b.VT)(e))throw new r.p2("Tried to terminate a print job while printing is disabled.");if(!n)throw new r.p2("No print job to abort found.");t.dispatch(C.xF())},this.getDocumentOutline=async function(){const e=t.getState();if(e.documentOutlineState.elements)return e.documentOutlineState.elements;Ze(e.backend);const n=await e.backend.getDocumentOutline();return t.dispatch((0,D.o)(n)),n},this.setDocumentOutline=async function(e){const n=t.getState();Ze(n.backend);try{await n.backend.setDocumentOutline(e)}catch(e){throw new r.p2(`Failed to set the document outline: ${e.message}`,e)}t.dispatch((0,D.o)(e))},this.getPageGlyphs=async function(e){const n=t.getState();return Ze(n.backend),Ze("number"==typeof e&&Number.isInteger(e)&&e>=0&&e<n.totalPages,`Page index must be an integer between 0 and ${n.totalPages-1} (number of pages - 1) inclusive.`),n.backend.getPageGlyphs(e)},this.getOCGs=async function(){const e=t.getState();return Ze(e.backend),e.backend.getOCGs()},this.getOCGVisibilityState=async function(){const e=t.getState();return Ze(e.backend),e.backend.getOCGVisibilityState()},this.setOCGVisibilityState=async function(e){const n=t.getState();Ze(n.backend),await n.backend.setOCGVisibilityState(e),t.dispatch((0,ze.g5)(n.pages.map((e=>({pageIndex:e.pageIndex,pageKey:(0,Ke.C)()})))))},Object.defineProperty(this,"contentWindow",{enumerable:!0,configurable:!1,get:()=>t.getState().frameWindow}),Object.defineProperty(this,"contentDocument",{enumerable:!0,configurable:!1,get(){var e;return null===(e=t.getState().frameWindow)||void 0===e?void 0:e.document}}),Object.defineProperty(this,"licenseFeatures",{enumerable:!0,configurable:!1,get:()=>t.getState().features}),"production"!==(0,S.zj)()&&(this._store=t,this._eventEmitter=a)}}function He(e){switch(e){case"annotations.onPress":case"textLine.onPress":case"page.onPress":{const t=e.replace(".onPress",".press");return(0,r.a1)(`The event ${e} was renamed and will be removed in a a future version. Please use ${t} instead.`),t}default:return e}}},12708:(e,t,n)=>{"use strict";n.d(t,{default:()=>Je});var o=n(84121),r=n(17375);n(41817),n(72443),n(69007),n(83510),n(41840),n(32159),n(84944),n(86535),n(2707),n(33792),n(99244),n(61874),n(9494),n(56977),n(19601),n(38559),n(54678),n(91058),n(88674),n(17727),n(83593),n(24603),n(74916),n(92087),n(39714),n(27852),n(32023),n(4723),n(15306),n(64765),n(23123),n(23157),n(48702),n(55674),n(33105),n(3462),n(33824),n(12974),n(4129),n(33948),n(84633),n(85844),n(60285),n(83753),n(41637),n(94301);"object"==typeof window&&(window._babelPolyfill=!1);var i=n(35369),a=n(47347),s=n(94905),l=n(15973);n(75376);function c(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function u(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,c(e,t,"set"),n),n}function d(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,c(e,t,"get"))}var p=n(34852),f=n(75189);function h(e){if(null==e)throw new a.p2("Expected `PSPDFKit.unload` to be called with an `HTMLElement | string | PSPDFKit.Instance`\ninstead none was provided.");if("string"==typeof e){const t=e;if(null===(e=document.querySelector(t)))throw new a.p2(`Couldn't find a container which matches the provided selector \`${t}\``)}else if(!(e instanceof HTMLElement||e instanceof f.Z))throw new a.p2("Expected `PSPDFKit.unload` to be called with a valid `target` argument.\nAllowed values for `target` are: `HTMLElement | string | PSPDFKit.Instance`.\n");let t;return e instanceof f.Z?t=p.ae.current.get(e):p.If.current.has(e)&&(t=p.If.current.get(e)),!!t&&(t(),!0)}var m=n(68138),g=n(63632);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t){S(e,t),t.add(e)}function w(e,t,n){S(e,t),t.set(e,n)}function S(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return n}var E=new WeakMap,x=new WeakMap,D=new WeakMap,C=new WeakMap,k=new WeakSet,O=new WeakSet,A=new WeakSet;async function T(e,t){const{License:n,PackageName:o,ProductId:r,IsDarkTheme:i,UseInBuiltFilePicker:a}=JSON.parse(t),s={licenseKey:n,container:d(this,E),document:e,theme:i?m.Q.DARK:m.Q.LIGHT,appName:o,productId:P(this,O,I).call(this,r)},l="undefined"!=typeof advanceConfiguration?y(y({},advanceConfiguration),s):s;if(this.currentDocument=await(0,p.zD)(l),a){const e={type:"custom",id:"file-picker",title:"Pick document",onPress:()=>{var e,n;(P(this,A,F).call(this),d(this,C))||(u(this,C,document.getElementById("filePicker")),null===(n=d(this,C))||void 0===n||n.addEventListener("change",(e=>{var n;const o=null==e||null===(n=e.target)||void 0===n?void 0:n.files[0];if(o){const e=new FileReader;e.onload=async e=>{const n=new Uint8Array(e.target.result);this.unload(),await P(this,k,T).call(this,n.buffer,t)},e.readAsArrayBuffer(o)}})));null===(e=d(this,C))||void 0===e||e.click()},icon:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 20.5H7C6.60218 20.5 6.22064 20.342 5.93934 20.0607C5.65804 19.7794 5.5 19.3978 5.5 19V5C5.5 4.60218 5.65804 4.22064 5.93934 3.93934C6.22064 3.65804 6.60218 3.5 7 3.5H14L18.5 8V14" stroke="#3D424E" stroke-miterlimit="10" stroke-linecap="round"/><path opacity="0.66" d="M14.4963 8.21565H18.01L13.7936 3.99927V7.51292C13.796 7.69854 13.8708 7.87587 14.0021 8.00714C14.1334 8.1384 14.3107 8.21322 14.4963 8.21565Z" fill="#3D424E"/><path d="M18.5 18V23" stroke="#3D424E" stroke-miterlimit="10" stroke-linecap="round"/><path d="M21 20.5H16" stroke="#3D424E" stroke-miterlimit="10" stroke-linecap="round"/></svg>'};this.currentDocument.setToolbarItems((t=>[e,...t]))}}function I(e){return`Maui_${e}`}function F(){if(!d(this,x)){const e=document.getElementById("documentLoadingIndicator");if(!e)return;u(this,x,e)}d(this,x).style.visibility="collapse"}new class{constructor(){b(this,A),b(this,O),b(this,k),w(this,E,{writable:!0,value:"#pspdfkit"}),w(this,x,{writable:!0,value:void 0}),w(this,D,{writable:!0,value:void 0}),w(this,C,{writable:!0,value:void 0})}async addAdvanceAccessScript(e){const t=document.getElementById("advanceAccess");t.src=e;const n=new Promise(((e,n)=>{t.onload=e,t.onerror=n}));await n}async loadDocumentFromPath(e,t){P(this,A,F).call(this),await P(this,k,T).call(this,e,t)}async loadDocumentFromBase64String(e,t){P(this,A,F).call(this),await P(this,k,T).call(this,`data:application/pdf;base64,${e}`,t)}async loadDocumentFromBuffer(e,t){P(this,A,F).call(this),await P(this,k,T).call(this,e.buffer,t)}async exportDocument(e,t){const n=JSON.parse(e);n.outputFormat=null!=t&&{conformance:g.w[t]};const o=await this.currentDocument.exportPDF(n);return new Uint8Array(o)}unload(){h("#pspdfkit")}setSelectedAnnotation(e){this.currentDocument.setSelectedAnnotation(e)}showDocumentLoadingIndicator(){if(!d(this,x)){const e=document.getElementById("documentLoadingIndicator");if(!e)return;u(this,x,e)}d(this,x).style.visibility="visible"}showGenericProcessingIndicator(){if(!d(this,D)){const e=document.getElementById("genericProcessingIndicator");if(!e)return;u(this,D,e)}d(this,D).style.visibility="visible"}hideGenericProcessingIndicator(){if(!d(this,D)){const e=document.getElementById("genericProcessingIndicator");if(!e)return;u(this,D,e)}d(this,D).style.visibility="collapse"}};var M=n(59780),_=n(89335),N=n(3845),R=n(1053),L=n(83634),B=n(74985),j=n(27646),z=n(19209),K=n(18509),Z=n(19419),U=n(65338),V=n(34426),G=n(11863),W=n(39745),q=n(76192),H=n(26248),$=n(13997),X=n(20792),Y=n(52842),J=n(77973),Q=n(18025),ee=n(97528),te=n(88804),ne=n(39511),oe=n(80440),re=n(66209),ie=n(47710),ae=n(89e3),se=n(52247),le=n(2810),ce=n(19702);var ue=n(9946),de=n(65872),pe=n(37231),fe=n(59386),he=n(99745),me=n(28098),ge=n(64494),ve=n(75237),ye=n(79941),be=n(151),we=n(64125),Se=n(92457),Pe=n(64845),Ee=n(84760),xe=n(68258),De=n(46791),Ce=n(56169),ke=n(94681),Oe=n(96617),Ae=n(33320),Te=n(71652),Ie=n(19568),Fe=n(84674),Me=n(98158),_e=n(54097),Ne=n(86617),Re=n(45395),Le=n(24871),Be=n(78399),je=n(36489),ze=n(79827),Ke=n(4132),Ze=n(3150),Ue=n(5038),Ve=n(71603),Ge=n(75669),We=n(66687);const qe=["color"];function He(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function $e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?He(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):He(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let Xe;try{Xe=(0,$.SV)(document)}catch(e){}const Ye=p.n_;const Je={Immutable:{List:i.aV},version:"2023.5.2",Geometry:{Point:te.E9,DrawingPoint:te.Wm,Rect:te.UL,Size:te.$u,Inset:te.eB},Actions:{Action:_.aU,GoToAction:_.Di,GoToEmbeddedAction:_.Qr,GoToRemoteAction:_._6,HideAction:_.ZD,JavaScriptAction:_.bp,LaunchAction:_.b,NamedAction:_.oH,ResetFormAction:_.BO,SubmitFormAction:_.pl,URIAction:_.lm},Annotations:{Annotation:l.q6,CommentMarkerAnnotation:l.Jn,HighlightAnnotation:l.FV,InkAnnotation:l.Zc,ShapeAnnotation:l.UX,LineAnnotation:l.o9,RectangleAnnotation:l.b3,EllipseAnnotation:l.Xs,PolygonAnnotation:l.Hi,PolylineAnnotation:l.om,LinkAnnotation:l.R1,NoteAnnotation:l.Qi,MarkupAnnotation:l.On,RedactionAnnotation:l.Wk,SquiggleAnnotation:l.hL,StampAnnotation:l.GI,StrikeOutAnnotation:l.R9,TextAnnotation:l.gd,UnderlineAnnotation:l.xu,ImageAnnotation:l.sK,UnknownAnnotation:l.Ih,WidgetAnnotation:l.x_,MediaAnnotation:l.Hu,toSerializableObject:le.Hs,fromSerializableObject:e=>(0,le.vH)(null,e),rotate:(e,t,n)=>{const o=(0,Ge.h4)(e,n);return(0,Ge.az)(o.set("rotation",t))}},AnnotationPresets:{toSerializableObject:le.xT,fromSerializableObject:le.MR},Comment:G.ZP,Bookmark:R.Z,CustomOverlayItem:B.Z,OutlineElement:j.Z,FormFields:{FormField:M.Wi,ButtonFormField:M.R0,CheckBoxFormField:M.rF,ChoiceFormField:M.Dz,ComboBoxFormField:M.fB,ListBoxFormField:M.Vi,RadioButtonFormField:M.XQ,TextFormField:M.$o,SignatureFormField:M.Yo,toSerializableObject:le.vD,fromSerializableObject:e=>(0,le.IN)(String(e.pdfObjectId),e)},FormFieldValue:M.KD,FormOption:z.Z,Color:L.Z,Instance:f.Z,preloadWorker:Ye,load:p.zD,unload:h,convertToPDF:p.eQ,populateDocumentTemplate:p.XV,Error:a.p2,SaveError:Te.V,ViewState:V.Z,PageInfo:Z.Z,TextLine:U.Z,InstantClient:K.Z,TextSelection:re.H,SearchResult:De.Z,SearchState:Ce.Z,AutoSaveMode:q.u,SignatureSaveMode:fe.f,LayoutMode:J.X,PrintMode:ne.X,PrintQuality:oe.g,ScrollMode:ie.G,ZoomMode:me.c,InteractionMode:X.A,unstable_InkEraserMode:Y.b,SidebarMode:ce.f,UIElement:{Sidebar:"Sidebar"},BlendMode:Ne.b,BorderStyle:Re.N,LineCap:Le.u,SidebarPlacement:de.d,SignatureAppearanceMode:pe.H,ShowSignatureValidationStatusMode:ge.W,NoteIcon:Q.Zi,Theme:m.Q,ToolbarPlacement:ae.p,ElectronicSignatureCreationMode:se.M,I18n:xe.ZP,baseUrl:Xe,DocumentIntegrityStatus:H.QA,SignatureValidationStatus:H.qA,SignatureType:H.BG,SignatureContainerType:H.FR,PAdESLevel:H.hz,CertificateChainValidationStatus:H.wk,AnnotationsWillChangeReason:N.f,DocumentComparisonSourceType:ue.b,MeasurementScaleUnitFrom:je.s,MeasurementScaleUnitTo:ze.K,MeasurementPrecision:Ke.L,MeasurementScale:Ve.Z,ProductId:Ue.x,ProcessorEngine:Ze.l,Conformance:g.w,DocumentPermissions:Ie.A,ComparisonOperation:We.Bd,DocumentDescriptor:We.ZS,ComparisonOperationType:s.b,viewStateFromOpenParameters:he.s,get unstable_defaultElectronicSignatureColorPresets(){return(0,i.d0)(Pe.Z).toJS().map((e=>{let{color:t}=e;return $e($e({},(0,r.Z)(e,qe)),{},{color:new L.Z(t)})}))},get defaultToolbarItems(){return Se.ZP.toJS()},get defaultDocumentEditorFooterItems(){return Fe.Z.toJS()},get defaultDocumentEditorToolbarItems(){return Me.Z.toJS()},get defaultAnnotationPresets(){return ve.ZP.toObject()},get defaultStampAnnotationTemplates(){return[...we.ZP]},get defaultAnnotationsSidebarContent(){return _e.Z.toJS()},defaultEditableAnnotationTypes:ye.Z,defaultElectronicSignatureCreationModes:be.Z,defaultSigningFonts:Ee.Z,Options:ee.Options,SearchPattern:ke.n,SearchType:Oe.S,UIDateTimeElement:Be.Y,generateInstantId:Ae.C,Font:W.Z}},61631:(e,t,n)=>{"use strict";n.d(t,{TU:()=>m,aG:()=>f,gH:()=>g,oo:()=>h});var o=n(47347),r=n(67366),i=n(35369),a=n(96114),s=n(3219),l=n(89335),c=n(37676),u=n(97528),d=n(69939),p=n(29346);const f=e=>(t,n)=>{!function e(u){try{if(u instanceof l.lm){(0,o.kG)("string"==typeof u.uri,"URIAction requires `uri`");const e=n();(!e.onOpenURI||e.onOpenURI(u.uri,!0))&&(0,c.Z)(u.uri)}else if(u instanceof l.Di)(0,o.kG)("number"==typeof u.pageIndex,"GoToAction requires `pageIndex`"),t((0,s.YA)(u.pageIndex));else if(u instanceof l.BO)(0,o.kG)("boolean"==typeof u.includeExclude,"ResetFormAction requires `includeExclude`"),t((0,a.yM)(u.fields,u.includeExclude));else if(u instanceof l.pl)(0,o.kG)("string"==typeof u.uri,"ResetFormAction requires `uri`"),(0,o.kG)("boolean"==typeof u.includeExclude,"ResetFormAction requires `includeExclude`"),t((0,a.V6)(u));else{if(!(u instanceof l.ZD))throw new o.p2(`Annotation action not handled: ${u.constructor.name}`);{(0,o.kG)(i.aV.isList(u.annotationReferences),"HideAction must have `annotationReferences`");const{annotations:e,formFields:a}=n(),s=u.annotationReferences.map((e=>"fieldName"in e&&a.get(e.fieldName))),l=u.annotationReferences.map((t=>"pdfObjectId"in t&&"number"==typeof t.pdfObjectId?e.find((e=>e.pdfObjectId===t.pdfObjectId)):null));(0,r.dC)((()=>{l.forEach((e=>{e&&t((0,d.FG)(e.set("hidden",u.hide)))})),s.forEach((n=>{n&&n.annotationIds.forEach((n=>{const o=e.get(n);o&&t((0,d.FG)(o.set("hidden",u.hide)))}))}))}))}}}catch(e){(0,o.ZK)(e.message)}u.subActions&&u.subActions.forEach((t=>{e(t)}))}(e)},h=e=>{const{action:t}=e;return t instanceof l.bp?g(t.script,e instanceof p.Z?e.formFieldName:null):f(t)},m=(e,t)=>{const{additionalActions:n,formFieldName:o}=e;return(null==n?void 0:n[t])instanceof l.bp?g(n[t].script,e instanceof p.Z?o:null):f(null==n?void 0:n[t])};function g(e,t){return async(n,r)=>{const{backend:i}=r();if((0,o.kG)(i),"STANDALONE"!==i.type||!u.Options.PDF_JAVASCRIPT)return;(0,o.kG)("string"==typeof e,"JavaScriptAction requires `script`");const s=await i.evalScript(e,t);n((0,a.bt)({changes:s}))}}},69939:(e,t,n)=>{"use strict";n.d(t,{$d:()=>T,$e:()=>O,Ds:()=>N,FG:()=>G,GI:()=>te,GT:()=>Y,GZ:()=>H,Iv:()=>k,QA:()=>R,RK:()=>Q,VX:()=>z,XG:()=>J,ZE:()=>j,Zr:()=>F,aF:()=>M,d8:()=>$,dt:()=>oe,fx:()=>X,gX:()=>_,hQ:()=>q,hX:()=>D,hj:()=>C,i0:()=>ee,ip:()=>A,lA:()=>I,mw:()=>re,pZ:()=>L,sF:()=>B,ug:()=>ne,uk:()=>U,vc:()=>x,vy:()=>ie});var o=n(35369),r=n(67366),i=n(47347),a=n(66687),s=n(3845),l=n(88804),c=n(34573),u=n(29165),d=n(63738),p=n(3219),f=n(96114),h=n(51333),m=n(95651),g=n(7921),v=n(78233),y=n(49177),b=n(45588),w=n(62164),S=n(25387),P=n(91859),E=n(75237);const x=(e,t)=>n=>{n((0,c.Ab)()),n({type:S.ILc,annotation:e,pageIndex:t})},D=(e,t)=>n=>{n((0,c.Ab)()),n({type:S.HS7,annotation:e,pageIndex:t})},C=(e,t)=>n=>{n((0,c.Ab)()),n({type:S.jzI,annotation:e,pageIndex:t})},k=async e=>{const{hash:t,dimensions:n}=await(0,b.uq)(e);return{hash:t,dimensions:n,attachment:new a.Pg({data:e})}},O=e=>async(t,n)=>{const{dimensions:i,hash:a,attachment:l}=await k(e),d=(0,m.om)(n(),i,a,e.type,e.name),f={annotations:(0,o.aV)([d]),reason:s.f.SELECT_END},{eventEmitter:h,annotationManager:g}=n();(0,r.dC)((()=>{null==h||h.emit("annotations.willChange",f),t((0,u.O)(a,l)),t(I((0,o.aV)([d]))),null==g||g.createObject(d,{attachments:(0,o.D5)([[a,l]])}),null==g||g.autoSave(),t((0,c.Df)((0,o.l4)([d.id]),null)),t((0,p.kN)(d.pageIndex,d.boundingBox))}))},A=e=>(t,n)=>{let i;const{imageAttachmentId:u,contentType:d,fileName:f,description:h}=e,g=u&&n().attachments.get(u);if(e instanceof a.GI)t(N("stamp")),i=(0,m.hG)(n(),new l.$u({width:e.boundingBox.width,height:e.boundingBox.height}),e);else{if(!(e instanceof a.sK))return;if(!u)return;t(N("image")),i=(0,m.om)(n(),new l.$u({width:e.boundingBox.width,height:e.boundingBox.height}),u,d||"",f),h&&(i=i.set("description",h))}const v={annotations:(0,o.aV)([i]),reason:s.f.SELECT_END},{eventEmitter:y,annotationManager:b}=n();(0,r.dC)((()=>{null==y||y.emit("annotations.willChange",v),t(I((0,o.aV)([i]))),null==b||b.createObject(i,{attachments:u&&g?(0,o.D5)([[u,g]]):(0,o.D5)()}),null==b||b.autoSave(),t((0,c.Df)((0,o.l4)([i.id]),null)),t((0,p.kN)(i.pageIndex,i.boundingBox))}))},T=e=>(t,n)=>{const a=n();(0,i.kG)(a.backend);const{annotationManager:s,backend:l}=a;(0,r.dC)((()=>{"STANDALONE"===(null==l?void 0:l.type)?t(I((0,o.aV)([e.set("pdfObjectId",null).delete("APStreamCache")]))):t(I((0,o.aV)([e]))),null==s||s.createObject(e,{attachments:(0,m.Dc)(n(),e)})}))},I=e=>({type:S.M85,annotations:e}),F=e=>({type:S.R8P,annotations:e}),M=e=>({type:S.gF5,ids:e}),_=e=>(t,n)=>{const o=n(),r=o.currentItemPreset;if(!r)return;const i=o.annotationPresets.get(r);if(!i)return;let a=!1;o.eventEmitter.emit("annotationPresets.update",{preventDefault:()=>a=!0,currentPreset:r,currentPresetProperties:i,newPresetProperties:e}),a||t({type:S.oE1,attributes:e})},N=e=>({type:S.oWy,currentItemPreset:e}),R=e=>({type:S.UiQ,annotationPresets:e}),L=(e,t)=>({type:S.R1i,annotationID:e,annotationPresetID:t}),B=e=>({type:S.x0v,annotationID:e}),j=e=>({type:S.JwD,annotationID:e}),z=(e,t)=>(n,o)=>{n(N(t)),(0,y.PK)(o(),e).forEach((e=>{n(T(e)),!E.AQ[t]&&n(L(e.id,t))}))},K=(e,t)=>{e().annotationManager.updateObject(t,(0,m.Dc)(e(),t))},Z={},U=e=>(t,n)=>{const{annotations:r,invalidAPStreams:a,backend:s}=n();if(!r.has(e.id))return void(0,i.ZK)("An annotation that does not exist was updated. This is probably caused by a sync conflict when Instant is enabled.\nThe update of this annotation was skipped.");(0,m.tl)({annotations:r,backend:s},(0,o.aV)([e]));let l=e.set("updatedAt",new Date);t(F((0,o.aV)([l]))),l=(0,m.tM)(n(),a,l),Z[l.id]||(Z[l.id]=(0,g.Z)(K,P.sP)),Z[l.id](n,l)};function V(e,t,n){const{annotations:o,invalidAPStreams:r,backend:s}=t;(0,m.tl)({annotations:o,backend:s},n);const l=n.map((e=>o.has(e.id)?(e instanceof a.UX&&e.isMeasurement()&&(e=e.set("note",e.getMeasurementDetails().label)),"STANDALONE"===(null==s?void 0:s.type)?e.delete("APStreamCache").set("updatedAt",new Date):e.set("updatedAt",new Date)):((0,i.ZK)("An annotation that does not exist was updated. This is probably caused by a sync conflict when Instant is enabled.\nThe update of this annotation was skipped."),!1))).filter(Boolean);e(F(l)),l.forEach((e=>{const n=(0,m.tM)(t,r,e);var o;null!==e.pageIndex&&(null===(o=t.annotationManager)||void 0===o||o.updateObject(n,{attachments:(0,m.Dc)(t,n)}))}))}const G=e=>(t,n)=>{const i=n();(0,r.dC)((()=>{V(t,i,(0,o.aV)([e]))}))};function W(e,t,n){const{commentThreads:s,comments:l,annotationManager:c,formFieldValueManager:u}=t;n.forEach((t=>{const n=s.get(t.id);if(n&&1===n.size){const t=l.get(n.first());t&&(0,w.kT)(t)&&((0,i.kG)(t.id),e((0,h.Vn)((0,o.l4)([t.id]))))}})),n.forEach((t=>{(t instanceof a.Jn||t instanceof a.FV||t.isCommentThreadRoot)&&e((0,h.Wn)(t))}));let d=(0,o.aV)();(0,r.dC)((()=>{e(M(n.map((e=>e.id)).toSet())),d=n.map((e=>(0,m.dk)(t,e))),d.forEach((e=>{null==c||c.deleteObject(e)}))})),d.forEach((n=>{if(n instanceof a.x_){const r=n.formFieldName?t.formFields.get(n.formFieldName):null;var o;if(r)if(1===r.annotationIds.size&&r.annotationIds.first()===n.id)e((0,f.Wh)(r)),null!==(o=t.backend)&&void 0!==o&&o.isUsingInstantProvider()||null==u||u.deleteObject(new a.KD({name:r.name,value:r.value}));else if(r.annotationIds.includes(n.id)){const t=r.annotationIds.findIndex((e=>e===n.id));let o=r.set("annotationIds",r.annotationIds.filter((e=>e!==n.id)));o.options&&(o=o.set("options",r.options.filter(((e,n)=>n!==t)))),e((0,f.vK)(o))}}Z[n.id]&&delete Z[n.id]}))}const q=e=>(t,n)=>{W(t,n(),(0,o.aV)([e]))},H=(e,t)=>(n,o)=>{const i=o(),{annotations:a}=i,s=t.map((e=>a.get(e))).filter(Boolean);(0,r.dC)((()=>{e.size>0&&V(n,i,e),s.size>0&&W(n,i,s)}))};function $(e){return(t,n)=>{if(e&&!e.isEmpty()){const t=n(),r=e.map((e=>t.annotations.get(e))).filter(Boolean),i={annotations:(0,o.aV)(r),reason:s.f.DELETE_START};t.eventEmitter.emit("annotations.willChange",i)}t({type:S.sCM,annotationsIDs:e})}}const X=e=>({type:S.qRJ,stampAnnotationTemplates:e}),Y=e=>({type:S.RPc,lineWidth:e});function J(){return(e,t)=>{const n=t();let o=new a.Qi((0,m.lx)(n));const r=n.pages.get(n.viewportState.currentPageIndex);(0,i.kG)(r);const s=a.UL.getCenteredRect(new l.$u({width:P.SP,height:P.SP}),r.pageSize);o=o.set("pageIndex",n.viewportState.currentPageIndex).set("boundingBox",s),e((0,d.i9)(null,o)),e(G(o))}}function Q(){return(e,t)=>{const n=t();let o=new a.gd((0,m.lx)(n));const r=n.pages.get(n.viewportState.currentPageIndex);(0,i.kG)(r);const{pagesRotation:s,currentPageIndex:l}=n.viewportState,c=r.pageSize.scale(.5),u=(0,v.gB)(new a.E9({x:c.width,y:c.height}),s);o=o.set("pageIndex",l).set("boundingBox",u).set("rotation",s),e((0,d.DU)(null,o)),e(G(o))}}const ee=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{type:S.WaW,value:e}},te=e=>({type:S.ieh,ids:e}),ne=e=>({type:S.kVz,ids:e}),oe=e=>({type:S.hw0,callback:e}),re=(e,t)=>({type:S.Dqw,variant:e,annotationObjectIds:t}),ie=e=>({type:S.uOP,annotationId:e})},29165:(e,t,n)=>{"use strict";n.d(t,{O:()=>r});var o=n(25387);const r=(e,t)=>({type:o.huI,hash:e,attachment:t})},51333:(e,t,n)=>{"use strict";n.d(t,{$z:()=>I,BY:()=>x,DO:()=>T,Dm:()=>P,GH:()=>F,Jr:()=>D,Rf:()=>M,UM:()=>k,V4:()=>C,Vn:()=>S,Wn:()=>O,aZ:()=>b,cQ:()=>v,fg:()=>m,gk:()=>w,mh:()=>g,v7:()=>y});var o=n(35369),r=n(25387),i=n(91859),a=n(66687),s=n(69939),l=n(34573),c=n(63738),u=n(49177),d=n(62164),p=n(95651),f=n(97413),h=n(30360);const m=e=>t=>{t({type:r.ckI,comments:e}),t(I())},g=e=>t=>{t({type:r.hxO,rootId:e}),t(I())};function v(){return(e,t)=>{const n=(0,u.PK)(t(),a.FV,!0);if(n.size){e((0,l.fz)()),e((0,s.lA)(n));const r=t().annotations.get(n.first().id);(0,f.k)(r),e((0,l.Df)((0,o.l4)([r.id]),null)),e(g(r.id))}}}const y=e=>({type:r.YHT,users:e}),b=e=>({type:r.ZLr,maxSuggestions:e}),w=e=>t=>{t((e=>({type:r.FdD,comments:e}))(e)),t(I())},S=e=>t=>{t({type:r.kg,ids:e}),t(I())};function P(){return(e,t)=>{const n=t(),r=[],i=[];n.selectedAnnotationIds.forEach((e=>{const t=n.commentThreads.get(e);if(!t)return;let o=t.size;t.forEach((e=>{var t;const i=n.comments.get(e);!i||null!=i.pageIndex||null!=(null===(t=i.text)||void 0===t?void 0:t.value)&&""!==(0,h.KY)(i.text.value)||(r.push(e),o--)})),0===o&&i.push(e)})),r.length>0&&e(S((0,o.l4)(r))),i.length>0&&e((0,s.aF)((0,o.l4)(i)))}}function E(e,t){let{oldComment:n,comment:r,action:i}=t;const{comments:a,eventEmitter:s}=e;if("DELETE"===i)(0,f.k)(n),s.emit("comments.mention",{comment:n,modifications:n.getMentionedUserIds().map((e=>({userId:e,action:"REMOVED"}))).toList()});else if("CREATE"===i)(0,f.k)(r),s.emit("comments.mention",{comment:r,modifications:r.getMentionedUserIds().map((e=>({userId:e,action:"ADDED"}))).toList()});else{(0,f.k)(r);const e=n||r.id&&a.get(r.id),t=r.getMentionedUserIds();let i=(0,o.aV)();(0,f.k)(e);const l=e.getMentionedUserIds(),c=l.subtract(t);c.size>0&&(i=i.push(...c.map((e=>({userId:e,action:"REMOVED"}))).toList()));const u=t.subtract(l);u.size>0&&(i=i.push(...u.map((e=>({userId:e,action:"ADDED"}))).toList())),s.emit("comments.mention",{comment:r,modifications:i})}}const x=(e,t)=>(n,r)=>{const i=r();(0,f.k)(e.rootId);const a=i.annotations.get(e.rootId);(0,f.k)(a);const l=new Date,c=e.set("createdAt",l).set("updatedAt",l).set("pageIndex",a.pageIndex);E(i,{comment:c,oldComment:t,action:"UPDATE"}),n(w((0,o.aV)([c])));const u=i.commentThreads.get(e.rootId);if((0,f.k)(null!=u),1===u.size&&(0,d.kT)(e)){var p,h;let e=a.set("isCommentThreadRoot",!0);const t=i.comments.get(u.first());e=e.set("isAnonymous",Boolean(null==t?void 0:t.isAnonymous)),n((0,s.Zr)((0,o.aV)([e]))),null===(p=i.annotationManager)||void 0===p||p.createObject(e),null===(h=i.annotationManager)||void 0===h||h.autoSave()}(0,f.k)(null!=i.commentManager);const m=r(),g=m.comments.toList().filter((e=>!(0,d.kT)(e)));i.commentManager.createObject(c,{comments:g,annotations:m.annotations}),i.commentManager.autoSave()},D=e=>(t,n)=>{const r=new Date,i=e.set("createdAt",r).set("updatedAt",r);t(m((0,o.aV)([i]))),E(n(),{comment:i,action:"CREATE"});const{commentManager:a,annotations:s}=n();(0,f.k)(null!=a);const l=n().comments.toList().filter((e=>!(0,d.kT)(e)));a.createObject(i,{comments:l,annotations:s})},C=e=>(t,n)=>{const r=e.set("updatedAt",new Date);t(w((0,o.aV)([r]))),E(n(),{comment:r,oldComment:e,action:"UPDATE"});const{annotations:i,commentManager:a}=n();(0,f.k)(null!=a);const s=n().comments.toList().filter((e=>!(0,d.kT)(e)));a.updateObject(r,{comments:s,annotations:i})},k=e=>(t,n)=>{const r=n();if((0,f.k)(e.id),E(r,{oldComment:e,action:"DELETE"}),e.rootId){const o=r.commentThreads.get(e.rootId);if(o&&o.first()===e.id){const a=o.toList().get(1);if(a){const o=r.comments.get(a);var i;if(o)A(n,e.rootId,t,null!==(i=o.isAnonymous)&&void 0!==i&&i)}}if(o&&(1===o.size||(0,d._P)(o,r.comments)&&2===o.size)){const n=r.annotations.get(e.rootId);if(n)return void t((0,s.hQ)(n))}}t(S((0,o.l4)([e.id])));const{commentManager:a}=r;(0,f.k)(null!=a);const l=n(),c=l.comments.toList().filter((e=>!(0,d.kT)(e)));a.deleteObject(e,{comments:c,annotations:l.annotations}),a.autoSave()},O=e=>(t,n)=>{var o;const r=n();if((0,f.k)(e),"SERVER"===(null===(o=r.backend)||void 0===o?void 0:o.type))return;const i=r.comments.filter((t=>t.rootId===e.id&&!(0,d.kT)(t))).map((e=>e.id));if(0===i.size)return;t(S(i.toSet())),r.comments.forEach((e=>{E(r,{oldComment:e,action:"DELETE"})}));const{commentManager:a}=r;(0,f.k)(null!=a);const s=n();let l=s.comments.toList().filter((e=>!(0,d.kT)(e)));l.forEach((t=>{t.rootId===e.id&&(a.deleteObject(t,{comments:l,annotations:s.annotations}),l=l.filter((e=>e.id!==t.id)))})),a.autoSave()},A=(e,t,n,r)=>{var i,a;const l=e(),c=l.annotations.get(t);(0,f.k)(null!=c);const u=c.set("isAnonymous",r);n((0,s.Zr)((0,o.aV)([u]))),null===(i=l.annotationManager)||void 0===i||i.updateObject(u),null===(a=l.annotationManager)||void 0===a||a.autoSave()},T=e=>(t,n)=>{const r=n();(0,f.k)(e.id),E(r,{comment:e,oldComment:r.comments.get(e.id),action:"UPDATE"}),t(w((0,o.aV)([e])));const{commentManager:i}=r;(0,f.k)(null!=i),(0,f.k)(e.rootId);const a=r.commentThreads.get(e.rootId);var s;((0,f.k)(null!=a),a.first()===e.id)&&A(n,e.rootId,t,null!==(s=e.isAnonymous)&&void 0!==s&&s);const{annotations:l,comments:c}=n(),u=c.toList().filter((e=>!(0,d.kT)(e)));i.updateObject(e,{comments:u,annotations:l}),i.autoSave()};function I(){return{type:r.NB4}}const F=()=>(e,t)=>{const n=t();let r=new a.Jn((0,p.lx)(n));const l=n.pages.get(n.viewportState.currentPageIndex);(0,f.k)(l);const u=a.UL.getCenteredRect(new a.$u({width:i.zk,height:i.zk}),l.pageSize);r=r.set("pageIndex",n.viewportState.currentPageIndex).set("boundingBox",u),e((0,c.k6)(r)),e((0,s.Zr)((0,o.aV)([r]))),e(g(r.id))};function M(e){return{type:r.mfU,onCommentCreationStartCallback:e}}},63738:(e,t,n)=>{"use strict";n.d(t,{$Q:()=>ce,A7:()=>ve,BB:()=>m,BR:()=>x,C4:()=>N,Cc:()=>O,Ce:()=>F,Cn:()=>pt,DU:()=>oe,Di:()=>at,EJ:()=>ze,EY:()=>Se,FA:()=>Pt,Ft:()=>mt,GL:()=>Ie,Gc:()=>U,Gh:()=>Le,HT:()=>gt,Hf:()=>je,IU:()=>ue,Ie:()=>qe,JN:()=>be,Jn:()=>ie,K_:()=>ye,LE:()=>Z,Lt:()=>ne,M4:()=>G,M5:()=>ct,MV:()=>A,Ol:()=>H,Ox:()=>Ve,P4:()=>P,PR:()=>kt,P_:()=>st,Q8:()=>ke,QL:()=>W,Ql:()=>de,R:()=>h,R1:()=>Ne,RN:()=>q,Rx:()=>X,SE:()=>Te,Sn:()=>v,T:()=>Ae,TR:()=>S,Tu:()=>Ce,UF:()=>Je,UG:()=>g,UU:()=>ae,UZ:()=>xt,Ug:()=>C,VF:()=>pe,VU:()=>k,W:()=>bt,Wv:()=>te,X2:()=>le,X8:()=>$e,XX:()=>Qe,Xv:()=>vt,YA:()=>me,YF:()=>St,YI:()=>Y,YK:()=>He,ZV:()=>_e,Zg:()=>se,_$:()=>yt,_P:()=>Pe,_R:()=>Et,_U:()=>ge,_b:()=>V,_z:()=>R,aw:()=>w,bv:()=>J,cI:()=>De,cz:()=>lt,d5:()=>y,d9:()=>ot,dp:()=>j,ek:()=>xe,el:()=>Ke,fq:()=>it,hS:()=>D,i9:()=>B,iJ:()=>ut,i_:()=>We,iu:()=>Q,jJ:()=>Ot,jM:()=>nt,jP:()=>_,k4:()=>re,k6:()=>z,lC:()=>b,lL:()=>wt,lV:()=>Xe,lW:()=>fe,m$:()=>ee,m0:()=>$,mu:()=>Ue,oX:()=>Ee,of:()=>Dt,p2:()=>Ct,p9:()=>T,pM:()=>L,qB:()=>ft,rL:()=>dt,rd:()=>Ze,s3:()=>E,sJ:()=>Ye,sY:()=>Fe,si:()=>tt,t:()=>M,t6:()=>rt,tr:()=>K,u0:()=>Oe,vI:()=>Ge,vY:()=>we,we:()=>Re,xF:()=>et,xW:()=>ht,yg:()=>I,z5:()=>he,ze:()=>Be});var o=n(84121),r=n(47347),i=n(67366),a=n(32170),s=n(25387),l=n(34573),c=n(19702),u=n(3219),d=n(55024);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const h=()=>({type:s.Dj2}),m=()=>({type:s.G5w}),g=e=>({type:s.kt4,enabled:e}),v=()=>({type:s.GW4}),y=e=>({type:s.mqf,preset:e}),b=()=>({type:s.tLW}),w=e=>({type:s.tS$,preset:e}),S=()=>({type:s.g30}),P=e=>({type:s.GXR,preset:e}),E=()=>({type:s.J7J}),x=e=>({type:s.yPS,preset:e}),D=()=>({type:s.m_C}),C=()=>({type:s.JyO}),k=()=>({type:s.NDs}),O=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{signatureRect:null,signaturePageIndex:null,formFieldName:null};return f({type:s.Vu4},e)},A=()=>({type:s.S$y}),T=(e,t)=>()=>I(e,t),I=(e,t,n)=>({type:s.JS9,shapeClass:e,shapeInteractionMode:t,preset:n}),F=()=>({type:s.AIf}),M=e=>({type:s.cbv,preset:e}),_=()=>({type:s.TUA}),N=()=>({type:s.Dzg}),R=()=>({type:s.M3C}),L=()=>({type:s.tie}),B=(e,t)=>({type:s.ZDQ,preset:e,annotation:t}),j=()=>({type:s.B1n}),z=e=>({type:s.dEe,annotation:e}),K=()=>({type:s.iMs});function Z(e){return{type:s.IFt,formDesignMode:e}}function U(e){return{type:s.Gkm,measurementSnapping:e}}function V(e){return{type:s.G6t,scale:e}}function G(e){return{type:s.fwq,measurementPrecision:e}}function W(e){return{type:s.vkF,configurationCallback:e}}function q(e){return{type:s.SdX,scales:e}}function H(){return{type:s.aYj}}function $(){return{type:s.hpj}}function X(){return{type:s.QYP}}function Y(){return{type:s.zKF}}const J=()=>({type:s.MuN}),Q=()=>({type:s.xk1}),ee=()=>({type:s.tYC}),te=()=>({type:s.NAH}),ne=(e,t)=>({type:s.pnu,preset:e,annotation:t,isCallout:!0}),oe=(e,t)=>({type:s.pnu,preset:e,annotation:t}),re=()=>({type:s.KqR}),ie=()=>({type:s.R7l}),ae=()=>({type:s.Vpf}),se=()=>({type:s.eFQ}),le=()=>({type:s.L8n}),ce=e=>({type:s.VNM,editor:e}),ue=e=>({type:s.tPZ,width:e}),de=e=>({type:s.u9b,zoomStep:e}),pe=e=>({type:s.tIQ,disablePointSnapping:e}),fe=e=>({type:s.Ce5,callback:e}),he=e=>({type:s.WtY,transformClientToPage:e});function me(e){return{type:s.rWQ,layoutMode:e}}function ge(e){return{type:s.b0l,scrollMode:e}}function ve(e){return{type:s._TO,showSignatureValidationStatus:e}}function ye(e){return{type:s._n_,scrollElement:e}}function be(e){return{type:s.bxr,spreadSpacing:e}}function we(e){return{type:s._ko,pageSpacing:e}}function Se(e){return{type:s.FHt,keepFirstSpreadAsSinglePage:e}}function Pe(e){return{type:s.ht3,viewportPadding:e}}function Ee(e){return{type:s.NfO,readOnlyEnabled:e}}function xe(){return{type:s.Xlm}}function De(){return{type:s.cyk}}function Ce(){return{type:s.KYU}}function ke(){return{type:s.Nl1}}function Oe(){return{type:s.L9g}}function Ae(){return{type:s.Dl4}}function Te(){return{type:s.GfR}}function Ie(e){return{type:s.iQZ,features:e}}function Fe(e){return{type:s.JQC,signatureFeatureAvailability:e}}function Me(e){return t=>{t({type:s.hv0,mode:e}),t((0,l.vR)())}}function _e(e){return{type:s.ZbY,editableAnnotationTypes:e}}function Ne(e){return{type:s.uFU,isEditableAnnotation:e}}function Re(e,t){return{type:s.ArU,editableAnnotationTypes:e,isEditableAnnotation:t}}function Le(e){return{type:s.Q2U,isEditableComment:e}}const Be=()=>(e,t)=>{e(Me(c.f.ANNOTATIONS));const n=t();for(let e=0;e<n.totalPages;e++){var o;null===(o=n.annotationManager)||void 0===o||o.loadAnnotationsForPageIndex(e)}};function je(){return Me(c.f.BOOKMARKS)}const ze=()=>async(e,t)=>{e(Me(c.f.DOCUMENT_OUTLINE));const n=t();if(n.documentOutlineState.elements)return;(0,r.kG)(n.backend);const o=await n.backend.getDocumentOutline();e((0,a.o)(o))};function Ke(){return Me(c.f.THUMBNAILS)}function Ze(){return Me(c.f.CUSTOM)}function Ue(){return{type:s.hv0,mode:null}}function Ve(e){return{type:s.eI4,placement:e}}function Ge(e){return{type:s.bP3,sidebarOptions:e}}function We(e){return{type:s.dVW,locale:e}}function qe(){return{type:s.RTr}}function He(e){return{type:s.heZ,group:e}}function $e(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:s.hlI,annotationCreatorName:e,immutable:t}}const Xe=()=>({type:s.YIz}),Ye=()=>({type:s.K26}),Je=e=>({type:s.$VE,interactionMode:e}),Qe=()=>({type:s.yrz});function et(){return{type:s.Hbz}}function tt(){return{type:s.sYK}}const nt=e=>({type:s.fAF,customRenderers:e});function ot(){return{type:s.pNz}}function rt(){return{type:s.bV3}}function it(){return{type:s.EpY}}function at(){return{type:s.bui}}function st(e){return{type:s.vVk,previewRedactionMode:e}}function lt(e){return async(t,n)=>{const{viewportState:o,eventEmitter:a,documentComparisonState:s}=n();if(e){const n={start:{},end:{}};n.start.promise=new Promise(((e,t)=>{n.start.resolve=e,n.start.reject=t})),n.end.promise=new Promise(((e,t)=>{n.end.resolve=e,n.end.reject=t})),(0,i.dC)((()=>{t((0,u.nr)(o.set("documentComparisonMode",f(f({},e),{},{completion:n})))),t(ct({referencePoints:[],autoCompare:e.autoCompare,isResultFetched:!1,currentTab:e.autoCompare?null:d.Q.documentA,documentKey:d.Q.documentA,previousViewportState:{zoomMode:o.zoomMode,zoomLevel:o.zoomLevel,scrollPosition:o.scrollPosition,currentPageIndex:o.currentPageIndex,pageSizes:o.pageSizes}}))})),a.emit("documentComparisonUI.start",e)}else if(o.documentComparisonMode){const{completion:e}=o.documentComparisonMode;try{e.start.resolve(),await e.end.promise,(0,i.dC)((()=>{t((0,u.nr)(o.set("documentComparisonMode",null).merge(s.previousViewportState))),t(ct(null))})),a.emit("documentComparisonUI.end")}catch(e){throw new r.p2(e.message)}}}}function ct(e){return{type:s.KA1,documentComparisonState:e}}function ut(e){return{type:s.D5x,a11yStatusMessage:e}}function dt(){return{type:s.JRS}}function pt(){return{type:s.Gox}}function ft(e){return{type:s.rpU,lastToolbarActionUsedKeyboard:e}}function ht(){return{type:s.MYU}}function mt(){return{type:s.mbD}}function gt(){return{type:s.wog}}function vt(){return{type:s.UL9}}function yt(e){return{type:s.IyB,instance:e}}function bt(e){return{type:s.eJ4,customUIStore:e}}const wt=()=>({type:s.qKG}),St=e=>({type:s.oZW,multiAnnotationsUsingShortcut:e}),Pt=()=>({type:s.odo}),Et=e=>({type:s.FQb,annotationsIds:e}),xt=e=>({type:s.bzW,groupId:e}),Dt=(e,t)=>({type:s.b4I,annotationId:e,groupId:t}),Ct=e=>({type:s.tzG,customFontsReadableNames:e}),kt=()=>({type:s.Vje}),Ot=()=>({type:s.XTO})},14012:(e,t,n)=>{"use strict";n.d(t,{Bm:()=>p,qZ:()=>d,rJ:()=>m,sr:()=>f,uT:()=>h});var o=n(67366),r=n(25387),i=n(70006),a=n(96114),s=n(38858),l=n(63738),c=n(20234),u=n(92234);function d(e,t){return{type:r.BS3,reason:e,progress:t}}function p(){return{type:r.nmm}}function f(e){return{type:r.zZV,reason:e}}function h(e){return{type:r.Ty$,resolvePassword:e}}function m(e){let{attemptedUnlockViaModal:t,hasPassword:n,features:d,signatureFeatureAvailability:p,permissions:f,documentInfo:h,formJSON:m,annotationManager:g,bookmarkManager:v,formFieldManager:y,formFieldValueManager:b,commentManager:w,changeManager:S,minSearchQueryLength:P,documentHandle:E,allowedTileScales:x,pageKeys:D}=e;return(e,C)=>{const{searchState:k,documentHandle:O,features:A,signatureFeatureAvailability:T}=C();(0,o.dC)((()=>{x&&e(function(e){return{type:r.iZ1,allowedTileScales:e}}(x)),t&&e({type:r.hC8}),e(function(e){return{type:r.poO,hasPassword:e}}(n)),d&&0===A.size&&e((0,l.GL)(d)),p&&!T&&e((0,l.sY)(p)),e((0,s.at)(f)),O&&O!==E&&e({type:r.obk}),e((0,s.GO)(h,D)),m&&e((0,a.Qi)(m)),e((0,u.QQ)()),e(function(e){return{type:r.rxv,annotationManager:e}}(g)),e(function(e){return{type:r.Hrp,bookmarkManager:e}}(v)),e(function(e){return{type:r.oj5,formFieldManager:e}}(y)),e(function(e){return{type:r.GHc,formFieldValueManager:e}}(b)),null!=w&&e(function(e){return{type:r.UII,commentManager:e}}(w)),e(function(e){return{type:r.gbd,changeManager:e}}(S)),"number"==typeof P&&e((0,i.j8)(k.set("minSearchQueryLength",P))),e((0,c.kE)(E))}))}}},38151:(e,t,n)=>{"use strict";n.d(t,{$t:()=>O,C0:()=>x,FD:()=>g,Hv:()=>_,Ij:()=>C,Mq:()=>A,O2:()=>T,Ow:()=>y,PZ:()=>k,Pq:()=>D,RL:()=>v,SF:()=>E,Yg:()=>P,Zv:()=>w,gY:()=>p,lx:()=>F,qt:()=>m,rO:()=>j,sC:()=>b,u:()=>B,u8:()=>f,um:()=>L,uy:()=>M,v2:()=>h,yy:()=>S});var o=n(67366),r=n(25387),i=n(97413),a=n(30761),s=n(96114),l=n(72643),c=n(68218),u=n(34573),d=n(12671);const p=async(e,t)=>{const{backend:n,contentEditorSession:i}=t();i.sessionId>0&&await(null==n?void 0:n.contentEditorExit()),await(null==n?void 0:n.contentEditorEnter()),(0,o.dC)((()=>{e((0,u.fz)()),e({type:r.MGL})}))},f=async(e,t)=>{const{backend:n}=t();await(null==n?void 0:n.contentEditorExit()),(0,o.dC)((()=>{e({type:r.Qm9}),e(P(!1))}))};const h=(e,t,n,o,r)=>R(e,t,(e=>e.contentEditorSetTextBlockCursor(t,n,o,r))),m=(e,t,n,o,r)=>R(e,t,(e=>e.contentEditorInsertTextBlockString(t,n,o,r))),g=(e,t,n,o,r)=>R(e,t,(e=>e.contentEditorMoveTextBlockCursor(t,n,o,r))),v=(e,t,n,o)=>R(e,t,(e=>e.contentEditorDeleteTextBlockString(t,n,o))),y=(e,t,n,o)=>R(e,t,(e=>e.contentEditorSetTextBlockSelection(t,n,o))),b=(e,t,n,o,r,i)=>R(e,t,(e=>e.contentEditorSetTextBlockSelectionRange(t,n,o,r,i))),w=(e,t,n)=>R(e,t,(e=>e.contentEditorTextBlockUndo(t,n))),S=(e,t,n)=>R(e,t,(e=>e.contentEditorTextBlockRedo(t,n))),P=e=>({type:r.bOH,isVisible:e}),E=(e,t)=>({type:r.joZ,pageIndex:e,textBlockId:t}),x=(e,t)=>({type:r.xhM,pageIndex:e,textBlockId:t}),D=e=>{e({type:r.fQw})},C=(e,t)=>{e({type:r.Y4});const n=t().contentEditorSession;e(function(e){return async(t,n)=>{const{backend:o,features:r,annotations:l,isAPStreamRendered:c}=n();(0,i.k)(o),o.cancelRequests(),await o.contentEditorSaveAndReload(e);const u=await o.runPDFFormattingScriptsFromWidgets(l,null,c);await(0,a.jX)(t,n,{features:r}),u.length&&t((0,s.bt)({changes:u}))}}((0,l.Gp)(n))),e(f)},k=e=>{let{fixpointValue:t,newWidth:n}=e;return async(e,o)=>{const a=o(),{backend:s}=a;(0,i.k)(s);const{textBlockInteractionState:l}=a.contentEditorSession;if((null==l?void 0:l.state)!==c.FP.Selected)return;const{pageIndex:u,textBlockId:p}=l;e({type:r.ciU,pageIndex:u,textBlockId:p,fixpointValue:t,newWidth:n});const f=(0,c.aT)(u,p)(o());(0,i.k)(f),await s.contentEditorLayoutTextBlock(p,null,null,(0,d.hH)(f)).then((t=>e({type:r.VOt,pageIndex:u,textBlockId:p,updateInfo:t}))).catch()}},O=e=>{let{anchor:t,pageIndex:n=null,textBlockId:o=null,isKeyboardMove:a}=e;return async(e,s)=>{const l=s(),{backend:u}=l;if((0,i.k)(u),null===n||!o){const{textBlockInteractionState:e}=l.contentEditorSession;if(({pageIndex:n,textBlockId:o}=e),(null==e?void 0:e.state)===c.FP.Active)return}e({type:r.fLm,pageIndex:n,textBlockId:o,anchor:t,isKeyboardMove:a});const p=(0,c.aT)(n,o)(s());(0,i.k)(p),await u.contentEditorLayoutTextBlock(o,null,null,(0,d.hH)(p)).then((t=>e({type:r.VOt,pageIndex:n,textBlockId:o,updateInfo:t}))).catch()}},A=e=>(t,n)=>{const o=n(),{backend:a}=o;(0,i.k)(a);const{textBlockInteractionState:s}=o.contentEditorSession;(0,i.k)((null==s?void 0:s.state)===c.FP.Active);const l=(0,c.aT)(s.pageIndex,s.textBlockId)(o);if(l)if(l.selection)a.contentEditorTextBlockApplyFormat(s.textBlockId,null,e,(0,d.hH)(l)).then((e=>{t({type:r.VOt,pageIndex:s.pageIndex,textBlockId:s.textBlockId,updateInfo:e})}));else{let n=l.modificationsCharacterStyle.fontRef.faceRef;e.family&&(n=n.set("family",e.family)),null!=e.bold&&(n=n.setIn(["variant","bold"],e.bold)),null!=e.italic&&(n=n.setIn(["variant","italic"],e.italic)),t({type:r.Ebp,pageIndex:s.pageIndex,textBlockId:s.textBlockId,faceRef:n,color:e.color,size:e.size})}},T=async(e,t)=>{e(I());const{backend:n}=t();(0,i.k)(n);const o=await n.contentEditorGetAvailableFaces();e(N(o))},I=()=>({type:r.U7k}),F=(e,t)=>({type:r.Han,tooltipRect:e,fontFace:t}),M=e=>async t=>{new Promise((n=>{setTimeout((()=>{e.aborted||t({type:r.WmI}),n()}),100)}))},_=e=>({type:r.nI6,abortController:e}),N=e=>({type:r.ZgW,faceList:e}),R=(e,t,n)=>async(o,a)=>{const{backend:s}=a();(0,i.k)(s),o({type:r.HYy});const l=await n(s);o({type:r.VOt,pageIndex:e,textBlockId:t,updateInfo:l})},L=async(e,t)=>{const n=t(),{backend:a,contentEditorSession:s}=n;(0,i.k)(a);const{textBlockInteractionState:l}=s;(0,i.k)((null==l?void 0:l.state)===c.FP.Selected||(null==l?void 0:l.state)===c.FP.Active);const{pageIndex:u,textBlockId:p}=l,f=(0,c.aT)(u,p)(t());(0,i.k)(f);const h=(0,d.hH)(f);(0,o.dC)((()=>{e(y(u,p,"everything",h)),e(v(u,p,"forward",h)),e({type:r.snK,pageIndex:u,textBlockId:p})}))},B=e=>({type:r.teI,mode:e}),j=(e,t)=>async(n,a)=>{const{backend:s}=a();(0,i.k)(s),n({type:r.HYy});const l=await s.contentEditorCreateTextBlock(e);l.textBlock.modificationsCharacterStyle.fontRef.size=16;const{id:c,textBlock:{maxWidth:u,alignment:d,lineSpacingFactor:p,modificationsCharacterStyle:f}}=l,h=await s.contentEditorLayoutTextBlock(c,null,null,{maxWidth:u,alignment:d,lineSpacingFactor:p,modificationsCharacterStyle:f});(0,o.dC)((()=>{n({type:r.uo5,pageIndex:e,initialTextBlock:l,anchor:t.set("y",t.y-h.contentRect.offset.y/2)}),n({type:r.VOt,pageIndex:e,textBlockId:c,updateInfo:h})}))}},41194:(e,t,n)=>{"use strict";n.d(t,{Y:()=>l,e:()=>s});var o=n(47347),r=n(30761),i=n(25387),a=n(96114);function s(e,t,n,i){return async(s,l)=>{const{backend:c,features:u,pages:d}=l();try{(0,o.kG)(c),c.cancelRequests();const n=await c.signDocumentAndReload(e,t);if(await(0,r.jX)(s,l,{features:u,pageKeys:d.map((e=>e.pageKey))}),n&&"STANDALONE"===c.type){const e=await c.runPDFFormattingScripts([n],!1);e.length>0&&s((0,a.bt)({changes:e,isReloading:!0}))}}catch(e){return i(e)}l().eventEmitter.emit("document.change",[]),n()}}function l(e){return{type:i.lRe,digitalSignatures:e}}},20234:(e,t,n)=>{"use strict";n.d(t,{KY:()=>p,NV:()=>f,b_:()=>u,kE:()=>d});var o=n(47347),r=n(30761),i=n(25387),a=n(96114),s=n(2810),l=n(33320),c=n(18146);function u(e,t,n){return async(i,l)=>{const{backend:u,features:d,pages:p,annotations:f,isAPStreamRendered:m}=l();(0,o.kG)(u);try{const t=e.map(s.kg);u.cancelRequests(),await u.applyOperationsAndReload(t);const n=await u.runPDFFormattingScriptsFromWidgets(f,null,m);await(0,r.jX)(i,l,{features:d,pageKeys:h(p.map((e=>e.pageKey)),e,f.filter((e=>e instanceof c.Z)))}),n.length&&i((0,a.bt)({changes:n}))}catch(e){return n(e)}l().eventEmitter.emit("document.change",e),t()}}function d(e){return{type:i.S0t,documentHandle:e}}function p(e){return{type:i.YS$,isDocumentHandleOutdated:e}}function f(e,t){return async(n,i)=>{const{backend:s,features:l,annotations:c,isAPStreamRendered:u}=i();(0,o.kG)(s);try{s.cancelRequests(),await s.reloadDocument();const e=await s.runPDFFormattingScriptsFromWidgets(c,null,u);await(0,r.jX)(n,i,{features:l}),e.length&&n((0,a.bt)({changes:e}))}catch(e){return t(e)}i().eventEmitter.emit("document.change",[]),e()}}function h(e,t,n){return t.reduce(((e,t)=>{switch(t.type){case"addPage":return e.insert("beforePageIndex"in t?t.beforePageIndex:t.afterPageIndex+1,(0,l.C)());case"movePages":{const n=e.filter(((e,n)=>t.pageIndexes.includes(n)));return e.map(((e,n)=>t.pageIndexes.includes(n)?null:e)).splice("beforePageIndex"in t?t.beforePageIndex:t.afterPageIndex+1,0,...n.toArray()).filter((e=>e))}case"removePages":return e.filter(((e,n)=>!t.pageIndexes.includes(n)));case"keepPages":return e.filter(((e,n)=>t.pageIndexes.includes(n)));case"duplicatePages":return e.flatMap(((e,n)=>t.pageIndexes.includes(n)?[e,(0,l.C)()]:[e]));case"cropPages":case"rotatePages":case"flattenAnnotations":return e.map(((e,n)=>!t.pageIndexes||t.pageIndexes.includes(n)?(0,l.C)():e));case"applyRedactions":{const t=n.map((e=>e.pageIndex)).toSet();return e.map(((e,n)=>t.includes(n)?(0,l.C)():e))}case"updateMetadata":case"setPageLabel":return e;case"importDocument":if(t.treatImportedDocumentAsOnePage){const n="beforePageIndex"in t?t.beforePageIndex:t.afterPageIndex+1;return e.map(((e,t)=>t<n?e:(0,l.C)()))}return e;case"applyInstantJson":case"applyXfdf":case"performOcr":return e.map((()=>(0,l.C)()));default:throw new Error(`Operation ${t} is not implemented`)}}),e)}},32170:(e,t,n)=>{"use strict";n.d(t,{Q:()=>i,o:()=>r});var o=n(25387);function r(e){return{type:o.Oh4,outline:e}}function i(e){return{type:o.Whn,level:e}}},96114:(e,t,n)=>{"use strict";n.d(t,{bt:()=>Z,kW:()=>U,zq:()=>T,TD:()=>M,Wh:()=>G,HE:()=>F,M$:()=>N,h4:()=>B,el:()=>L,ul:()=>K,yM:()=>W,xW:()=>I,xh:()=>j,Qi:()=>A,r$:()=>R,V6:()=>q,vK:()=>V,C2:()=>_});var o=n(67366),r=n(47347),i=n(35369),a=n(73935),s=n(66687),l=n(25387),c=n(2810),u=n(69939),d=n(86920),p=n(37676),f=n(16126),h=n(25644),m=n(97333),g=n(97528),v=n(35129),y=n(84121),b=n(76154),w=n(37756);function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){(0,y.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}async function E(e,t,n){const{default:o}=await w.o[e](),i=(0,b.dp)({locale:e,messages:o},(0,b.Sn)());setTimeout((()=>(0,r.wp)(i.formatMessage(t,null==n?void 0:n.reduce(((e,t,n)=>P(P({},e),{},{[`arg${n}`]:t})),{})))),0)}var x=n(63738),D=n(20792),C=n(76192),k=n(95651),O=n(25904);function A(e){return{type:l.iJ2,formJSON:e}}function T(e){return{type:l.Ui_,formFieldValues:e}}function I(e){return{type:l.m3$,formFieldValues:e}}function F(e){return{type:l.u7V,formFieldValuesIds:e}}function M(e){return{type:l.zGM,formFields:e}}function _(e){return{type:l.Wyx,formFields:e}}function N(e){return{type:l.D_w,formFieldsIds:e}}function R(e){return{type:l.TYu,onWidgetCreationStartCallback:e}}function L(){return e=>{e((0,x.LE)(!0)),e((0,x.UF)(D.A.FORM_CREATOR))}}function B(){return e=>{e((0,x.LE)(!1)),e((0,x.XX)())}}function j(e,t){return(n,a)=>{const l=e.map((e=>new s.KD({name:e.name,value:e.value,optionIndexes:e.optionIndexes,isFitting:e.isFitting}))),c=(0,i.aV)(l),{backend:u,formFields:d,formFieldValueManager:p,annotations:h,viewportState:{zoomLevel:m}}=a();if((0,r.kG)(u),(0,r.kG)(p),g.Options.PDF_JAVASCRIPT&&"STANDALONE"===u.type)n(K(c,t));else{const e=[];(0,o.dC)((()=>{c.forEach((t=>{let o;const a=new Promise((e=>{o=e}));e.push(a),(0,f.Ay)({getState:()=>({formFields:d,annotations:h,backend:u}),originalFormFields:(0,i.D5)({[t.name]:d.get(t.name)}),formFieldValues:(0,i.aV)(l),callback:e=>{if(!e.includes(t.name)){const e=d.get(t.name);(0,r.kG)(e);const o=e.annotationIds.reduce(((e,t)=>{const n=h.get(t);return n instanceof s.x_?e.push(n):e}),(0,i.aV)());if(e.multiLine){const r=(0,O.$Z)(o.first(),e.value,m);n(I((0,i.aV)([t.set("isFitting",r)])))}else n(I((0,i.aV)([t])))}},resolve:o}),p.updateObject(t)}))})),Promise.all(e).then((()=>{null==t||t()})).catch((e=>{throw e}))}}}let z=Promise.resolve();function K(e,t){return async(n,o)=>{const l=z;let c=()=>{};z=new Promise((function(e){c=e})),await l;try{const{backend:t}=o();if((0,r.kG)(t),"STANDALONE"!==t.type||!g.Options.PDF_JAVASCRIPT)return;const l=await(0,m.Vs)(t.evalFormValuesActions(e),1e4),u=l.filter((e=>e.change_type===d.zR&&"pspdfkit/form-field-value"===e.object.type)),p=u.map((e=>e.object.name)),h=(0,i.aV)(u.map((e=>new s.KD({name:e.object.name,value:Array.isArray(e.object.value)?(0,i.aV)(e.object.value):e.object.value,optionIndexes:e.object.optionIndexes})))),v=e.map((e=>e.name)).toArray().filter((e=>p.indexOf(e)<0)),{formFields:y}=o(),b=(0,f.Qg)(y.filter(((e,t)=>v.indexOf(t)>=0))),w=y.filter((t=>e.find((e=>e.name===t.name))||b.find((e=>e.name===t.name))||p.includes(t.name))),S=e.map((e=>h.find((t=>t.name===e.name))||e)).concat(h.filter((t=>!e.find((e=>e.name===t.name)))));(0,f.Ay)({getState:o,originalFormFields:w,formFieldValues:S,callback:t=>{e.size>0&&(0,a.flushSync)((function(){n(I(e))})),b.size>0&&n(I(b)),n(Z({changes:l,unchangedFormFieldValues:t}))}})}catch(e){}finally{c()}null==t||t()}}function Z(e){let{changes:t,unchangedFormFieldValues:n=[],resolve:a,reject:s,isReloading:m=!1}=e;return(e,g)=>{const y=g(),{annotations:b,formFields:w,formFieldManager:S,backend:P,autoSaveMode:x}=y,D=y.formattedFormFieldValues;let k,O=(0,i.aV)(),A=y.editingFormFieldValues;(0,o.dC)((function(){null==P||P.setFormJSONUpdateBatchMode(!0).catch((e=>{null==s||s(e)})),O=(0,i.aV)().withMutations((n=>{k=D.withMutations((o=>{t.forEach((t=>{let{change_type:i,object:a}=t;switch(i){case d.uV:case d.zR:if("pspdfkit/form-field-value"===a.type){const e=(0,c.u9)(a);n.push(e),"string"==typeof a.formattedValue&&o.set(e.name,a.formattedValue),"string"==typeof a.editingValue&&(A=A.set(e.name,a.editingValue))}else if(a.type.startsWith("pspdfkit/form-field/")){if(!S)return;const t=(0,c.IN)(a.id,a,{permissions:a.permissions,group:a.group});w.has(t.name)?e(V(t)):e(U(t))}else try{const t=(0,c.vH)(a.id,a);b.has(t.id)?e((0,u.FG)(t)):e((0,u.$d)(t))}catch(e){(0,r.ZK)(`Form actions: unable to apply change of type "${i}"\n\n${a}\n\n${e.message}`)}break;case d.co:if(a.type.startsWith("pspdfkit/form-field/")){const t=w.get(a.name);t?e(G(t)):(0,r.ZK)(`Form actions: unable to find FormField to delete with id "${a.id}".`)}else{const t=b.get(a.id);t?e((0,u.hQ)(t)):(0,r.ZK)(`Form actions: unable to find Annotation to delete with id "${a.id}".`)}break;case d.D2:switch(a.type){case"pspdfkit/javascript/effects/alert":{const{message:e}=a;if(e.startsWith(f.$Y)){const t=e.split("[")[1].split("]"),n=t[1].split(f.as);E(y.locale,v.A.dateValidationBadFormat,[t[0],n[1]])}else if(e.startsWith(f.sh)){const t=e.split("[")[1].split("]");E(y.locale,v.A.numberValidationBadFormat,[t[0]])}else(0,r.wp)(e);break}case"pspdfkit/javascript/effects/print":e((0,h.S0)());break;case"pspdfkit/javascript/effects/launchURL":var s;(null===(s=y.onOpenURI)||void 0===s?void 0:s.call(y,a.url,!1))&&(a.newFrame?(0,p.Z)(a.url):(0,p.l)(a.url));break;case"pspdfkit/javascript/effects/mail":{if(!a.to)break;let e=`mailto:${Array.isArray(a.to)?a.to.join(","):a.to}?`;const t=[];if(a.subject&&t.push(`subject=${encodeURIComponent(a.subject)}`),a.cc){const e=Array.isArray(a.cc)?a.cc.map((e=>encodeURIComponent(e))).join(";"):encodeURIComponent(a.cc);t.push(`cc=${e}`)}if(a.bcc){const e=Array.isArray(a.bcc)?a.bcc.map((e=>encodeURIComponent(e))).join(";"):encodeURIComponent(a.bcc);t.push(`bcc=${e}`)}a.message&&t.push(`body=${encodeURIComponent(a.message)}`),e+=t.join("&"),(0,p.Z)(e);break}case"pspdfkit/javascript/effects/importIcon":break;default:(0,r.ZK)(`Form actions: side effect "${a.type}" not supported.`)}break;case d.Q:break;default:(0,r.ZK)(`Form actions: change type "${i}" not supported.`)}}))}))}))}));const T=null==P?void 0:P.setFormJSONUpdateBatchMode(!1);let F=[];if(O.size>0){e(I(O)),k.size>0&&e(function(e){return{type:l.VK7,formattedFormFieldValues:e}}(k)),A.size>0&&e(function(e){return{type:l.yET,editingFormFieldValues:e}}(A));const{formFieldValueManager:t}=g();(0,r.kG)(t);let o=(0,i.l4)();F=O.filter((e=>!n.includes(e.name))).map((e=>{if(t.updateObject(e),m){const t=w.get(e.name);if(t){const e=t.annotationIds.map((e=>b.get(e))).filter(Boolean);o=o.concat((0,i.l4)(e.map((e=>e.pageIndex))))}}return x===C.u.DISABLED?Promise.resolve():t.ensureObjectSaved(e)})).toArray(),m&&o.size>0&&e({type:l.TG1,pageIndexes:o})}Promise.all([T,...F]).then((()=>{null==a||a()})).catch((e=>{null==s||s(e)}))}}function U(e){return(t,n)=>{const{formFields:o,formFieldManager:a}=n();if(o.get(e.name))throw new r.p2(`Cannot create form field: a form field with the name "${e.name}" already exists. Form field names must be unique.`);t(M((0,i.aV)([e]))),null==a||a.createObject(e)}}function V(e){return(t,n)=>{var o;const{formFields:a,annotations:s,backend:l}=n(),c=a.find((t=>t.id===e.id||t.name===e.name));if(!c)return void(0,r.ZK)("A form field that does not exist was updated. This is probably caused by a sync conflict when Instant is enabled.\nThe update of this form field was skipped.");if(c.readOnly!==e.readOnly){const t=e.annotationIds.map((e=>s.get(e))).filter(Boolean);(0,k.CU)({formFields:a,backend:l},t,e)}const u=e.merge({value:c.value,values:c.values});t(_((0,i.aV)([u]))),null===(o=n().formFieldManager)||void 0===o||o.updateObject(u)}}function G(e){return(t,n)=>{var o;const r=n(),a=e.annotationIds.map((e=>r.annotations.get(e))).filter(Boolean);a.isEmpty()||(t((0,u.aF)(a.map((e=>null==e?void 0:e.id)).toSet())),a.forEach((e=>{var t;null===(t=r.annotationManager)||void 0===t||t.deleteObject(e)}))),t(N((0,i.l4)([e.id]))),null===(o=n().formFieldManager)||void 0===o||o.deleteObject(e)}}function W(e,t){return(n,o)=>{const i=H(o(),e,t).map((e=>{const{name:t}=e;let n;return e instanceof s.$o||e instanceof s.XQ?n=e.defaultValue:e instanceof s.Dz||e instanceof s.rF?n=e.defaultValues:e instanceof s.R0?n=null:(0,r.kG)(!1),new s.KD({name:t,value:n})}));g.Options.PDF_JAVASCRIPT&&n(K(i)),n(I(i)),i.forEach((e=>{var t;null===(t=o().formFieldValueManager)||void 0===t||t.updateObject(e)}))}}function q(e){return(t,n)=>{var o;const a=n();let l,c=!1;if(null===(o=a.formFieldValueManager)||void 0===o||o.eventEmitter.emit("willSubmit",{preventDefault:()=>c=!0}),c)return;const{uri:u,fields:d,includeExclude:p,exportFormat:f,getMethod:h,submitPDF:m,xfdf:g}=e,v=(0,i.D5)(H(a,d,p).filter((e=>!e.noExport)).map((e=>{const{name:t}=e;return[t,e instanceof s.R0?null:void 0===e.value?e.values:e.value]})));if(f){const e=function(e){const t=[];return e.forEach(((e,n)=>{const o=encodeURIComponent(n);"string"==typeof e?t.push(`${o}=${encodeURIComponent(e)}`):null===e?t.push(`${o}=`):e instanceof i.aV&&e.forEach((e=>{t.push(`${o}[]=${encodeURIComponent(e)}`)}))})),t.join("&")}(v);if(h)l=Promise.resolve({uri:`${u}?${e}`,fetchOptions:{method:"GET"}});else{const t={headers:new Headers({"Content-Type":"application/x-www-form-urlencoded"}),method:"POST",body:e};l=Promise.resolve({uri:u,fetchOptions:t})}}else{if(!m)return g?void(0,r.vU)("XFDF Form submission not supported yet."):void(0,r.vU)("FDF Form submission not supported yet.");var y;l=null===(y=a.backend)||void 0===y?void 0:y.exportPDF({flatten:!0,incremental:!1}).then((e=>{const t={headers:new Headers({"Content-Type":"application/pdf"}),method:"POST",body:e};return{uri:u,fetchOptions:t}}))}l.then((e=>{let{uri:t,fetchOptions:n}=e;fetch(t,n).then((e=>{var t;null===(t=a.formFieldValueManager)||void 0===t||t.eventEmitter.emit("didSubmit",{response:e})}))})).catch((e=>{var t;e(`Form submission failed with the following error:\n\n${e}`),null===(t=a.formFieldValueManager)||void 0===t||t.eventEmitter.emit("didSubmit",{error:e})}))}}function H(e,t,n){let o;const r=e.formFields.keySeq().toSet();return o=t?n?r.subtract(t):r.intersect(t):r,e.get("formFields").valueSeq().filter((e=>o.includes(e.name))).toList()}},92234:(e,t,n)=>{"use strict";n.d(t,{KX:()=>w,QQ:()=>S,Yw:()=>b,ou:()=>E,pB:()=>y,z9:()=>P});var o=n(84121),r=n(35369),i=n(47347),a=n(25387),s=n(69939),l=n(39728),c=n(32125),u=n(95651),d=n(67699),p=n(51333),f=n(33320),h=n(96114);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e){return{type:a.faS,historyChangeContext:e}}function y(e,t){return(n,o)=>{const{historyChangeContext:r}=o();n(v(e)),t(),n(v(r))}}function b(){return(e,t)=>{const{undoActions:n,annotations:o,isHistoryEnabled:m}=t();if(!m)throw new i.p2("Cannot undo: the Undo Redo history API is disabled.");if(0===n.size)throw new i.p2("Cannot undo: the Undo actions history is empty.");const v=n.last(),b=(0,l.kM)(v,o);e(y(d.j.HISTORY,(()=>{"create"===v.type?e(function(e){return function(t,n){const{historyIdsMap:o,backend:i}=n();let l=e.payload;const c=e.formField;if(e.restoreAPStream&&"STANDALONE"===(null==i?void 0:i.type)&&(l=l.set("APStreamCache",{attach:o.get(l.id)||l.id})),t((0,s.$d)(l)),c&&t((0,h.kW)(c)),l.isCommentThreadRoot&&e.comments){e.comments.map((t=>t.set("rootId",e.payload.id).set("id",(0,f.C)()))).forEach((e=>{t((0,p.Jr)(e))}))}e.restoreAPStream?t((0,s.ug)((0,r.D5)({[l.id]:l.pageIndex}))):t((0,s.GI)((0,r.D5)({[l.id]:l.pageIndex})));const u={type:"delete",payload:{id:l.id}};t({type:a.bVL,nextRedoAction:u})}}(v)):"update"===v.type?e(function(e){return function(t,n){const{annotations:o,historyIdsMap:d,backend:p}=n();let f=o.get(e.payload.id);!f&&e.deletedAnnotation&&(f=e.deletedAnnotation.set("id",(0,u.xc)()),t((0,s.$d)(f))),(0,i.kG)(f instanceof c.Z);let h=f.merge(g(g({},e.payload),{},{pdfObjectId:f.pdfObjectId,id:f.id}));e.restoreAPStream&&"STANDALONE"===(null==p?void 0:p.type)&&(h=h.set("APStreamCache",{attach:d.get(h.id)||h.id})),t((0,s.FG)(h)),e.restoreAPStream&&t((0,s.ug)((0,r.D5)({[h.id]:h.pageIndex})));const m={type:"update",payload:g(g({},(0,l.mZ)(h,f)),{},{id:f.id})};t({type:a.bVL,nextRedoAction:m}),t({type:a.tC1,oldId:d.get(e.payload.id)||e.payload.id,newId:f.id})}}(v)):"delete"===v.type?e(function(e){return function(t,n){const o=n(),{annotations:i,commentThreads:d,comments:p,historyIdsMap:f}=o,m=i.get(e.payload.id);if(!(m instanceof c.Z))return;t((0,s.hQ)(m));const g=(0,u.xc)(),v=(0,l.Yr)(m,g,d,p),y=(0,l.ax)(m,g,o);y&&t((0,h.M$)((0,r.l4)([y.id])));const b={type:"create",payload:m.merge(e.payload).set("id",g),comments:v,formField:y};t({type:a.bVL,nextRedoAction:b,oldId:e.payload.id}),t({type:a.tC1,oldId:f.get(e.payload.id)||e.payload.id,newId:g})}}(v)):(0,i.Rz)(v.type)})));const{annotations:w,eventEmitter:S}=t(),P=(0,l.FA)(v,w,v.payload.id);S.emit("history.undo",{before:b,after:P}),S.emit("history.change",{before:b,after:P,action:"undo"})}}function w(){return(e,t)=>{const{redoActions:n,annotations:o,isHistoryEnabled:r}=t();if(!r)throw new i.p2("Cannot redo: the Undo Redo history API is disabled.");if(0===n.size)throw new i.p2("Cannot redo: the Redo actions history is empty.");const m=n.last(),v=(0,l.kM)(m,o);e(y(d.j.HISTORY,(()=>{"create"===m.type?e(function(e){return t=>{const n=e.payload,o=e.formField;if(t((0,s.$d)(n)),n.isCommentThreadRoot&&e.comments){e.comments.map((e=>e.set("rootId",n.id).set("id",(0,f.C)()))).forEach((e=>{t((0,p.Jr)(e))}))}o&&t((0,h.kW)(o));const r={type:"delete",payload:{id:n.id}};t({type:a.iwn,nextUndoAction:r})}}(m)):"update"===m.type?e(function(e){return(t,n)=>{const{annotations:o}=n(),r=o.get(e.payload.id);(0,i.kG)(r instanceof c.Z);const d=r.merge(g(g({},e.payload),{},{id:r.id})),p=(0,u.pe)(n,r,(()=>{t((0,s.FG)(d))})),f={type:"update",payload:(0,l.mZ)(d,r),restoreAPStream:p};t({type:a.iwn,nextUndoAction:f})}}(m)):"delete"===m.type&&e(function(e){return(t,n)=>{const o=n(),{historyIdsMap:r,annotations:d,commentThreads:p,comments:f}=o,h=d.get(e.payload.id);(0,i.kG)(h instanceof c.Z);const m=(0,u.pe)(n,h,(()=>{t((0,s.hQ)(h))})),g=(0,u.xc)(),v=(0,l.Yr)(h,g,p,f),y=(0,l.ax)(h,g,o),b={type:"create",payload:h.set("id",g),restoreAPStream:m,comments:v,formField:y};t({type:a.iwn,nextUndoAction:b,oldId:e.payload.id}),t({type:a.tC1,oldId:r.get(e.payload.id)||e.payload.id,newId:g})}}(m))})));const{annotations:b,eventEmitter:w}=t(),S=(0,l.FA)(m,b,m.payload.id);w.emit("history.redo",{before:v,after:S}),w.emit("history.change",{before:v,after:S,action:"redo"})}}function S(){return(e,t)=>{e({type:a._Qf});const{backend:n,eventEmitter:o}=t();"STANDALONE"===(null==n?void 0:n.type)&&n.clearAPStreamCache(),o.emit("history.clear")}}function P(){return{type:a._33}}function E(){return{type:a.wG7}}},44763:(e,t,n)=>{"use strict";n.d(t,{C0:()=>m,Ik:()=>c,Se:()=>d,U7:()=>h,VO:()=>u,Xh:()=>p,eO:()=>l,v9:()=>f});var o=n(47347),r=n(20234),i=n(30570),a=n(63738),s=n(25387);function l(e){return{type:s.$8O,measurementToolState:e}}function c(e){return{type:s.UP4,hintLines:e}}function u(e){return{type:s.Zt9,secondaryMeasurementUnit:e}}function d(e){return{type:s.VNu,activeMeasurementScale:e}}function p(e){return{type:s.wgG,isCalibratingScale:e}}const f=e=>async(t,n)=>{const r=n();(0,o.kG)(r.backend);const{backend:i,secondaryMeasurementUnit:a}=r;try{e&&(await(null==i?void 0:i.setSecondaryMeasurementUnit(e)),t(u(e))),a&&!e&&(await(null==i?void 0:i.setSecondaryMeasurementUnit(null)),t(u(null)))}catch(e){(0,o.ZK)(`Failed to set secondary measurement unit: ${e}.`),t(u(a))}},h=(e,t)=>async(n,s)=>{const l=s();(0,o.kG)(l.backend);const{backend:c,measurementScales:u}=l,d="STANDALONE"===c.type;(0,o.kG)(u);const{added:p,deleted:f}=(0,i.Rc)(u,e),h=f.map((async e=>{d&&await(null==c?void 0:c.removeMeasurementScale(e));(null==t?void 0:t.find((t=>t.prevScale===e)))||await(0,i.fH)({deletedScale:e,getState:s,dispatch:n})})),m=p.map((async e=>{d&&await(null==c?void 0:c.addMeasurementScale(e))})),g=null==t?void 0:t.map((async t=>{await(0,i.Hg)({scale:e[t.index],oldScale:t.prevScale,getState:s,dispatch:n})}));Promise.all([h,m,g]).then((async()=>{d||(p.length>0?await(null==c?void 0:c.addMeasurementScale(p[0])):f.length>0&&await(null==c?void 0:c.removeMeasurementScale(f[0])),n((0,r.KY)(!0))),n((0,a.RN)(e))}))},m=e=>async(t,n)=>{const r=n();(0,o.kG)(r.backend);const{backend:i,measurementScales:s}=r;await(null==i?void 0:i.addMeasurementScale(e)),t((0,a.RN)(s?[...s,e]:[e]))}},3219:(e,t,n)=>{"use strict";n.d(t,{IT:()=>a,Ic:()=>p,Pt:()=>P,U1:()=>b,YA:()=>s,Yr:()=>S,_R:()=>g,ac:()=>E,du:()=>y,dx:()=>d,fz:()=>i,kN:()=>c,kr:()=>h,lO:()=>v,lt:()=>l,nr:()=>f,vG:()=>m,vP:()=>u,vc:()=>w});var o=n(25387),r=n(51333);const i=()=>({type:o.wtk}),a=()=>({type:o.mE7}),s=e=>({type:o.RxB,pageIndex:e}),l=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:o.mLh,scrollPosition:e,lastScrollUsingKeyboard:t}},c=(e,t)=>({type:o.g4f,pageIndex:e,rect:t}),u=(e,t)=>({type:o.Lyo,pageIndex:e,rect:t});function d(e,t){return n=>{n({type:o.xYE,viewportRect:e,isTriggeredByOrientationChange:t}),n((0,r.$z)())}}const p=(e,t)=>({type:o.syg,zoomLevel:e,scrollPosition:t}),f=e=>({type:o.ZGb,viewportState:e}),h=()=>({type:o.UFs}),m=()=>({type:o.RCc}),g=()=>({type:o.MfE}),v=()=>({type:o.BWS}),y=()=>({type:o.QU3}),b=e=>({type:o.lD1,degCW:e}),w=()=>({type:o.kRo}),S=()=>({type:o.UFK}),P=e=>({type:o.D1d,width:e}),E=e=>({type:o.WsN,shouldDisable:e})},38858:(e,t,n)=>{"use strict";n.d(t,{GO:()=>r,Lv:()=>a,at:()=>s,g5:()=>l,uM:()=>i});var o=n(25387);function r(e,t){return{type:o.ME7,payload:e,pageKeys:t}}function i(e){return{type:o.dCo,payload:e}}const a=(e,t)=>({type:o.GZZ,pageIndex:e,textLines:t});function s(e){return{type:o.fnw,backendPermissions:e}}function l(e){return{type:o.bM3,pageKeysForPages:e}}},25644:(e,t,n)=>{"use strict";n.d(t,{xF:()=>T,WQ:()=>A,S0:()=>F});var o=n(35369),r=n(47347),i=n(91859),a=n(80440),s=n(66687),l=n(36095);const c=l.Ni;function u(e,t,n){const o=i.nJ[n];let r=o>=i.nJ[a.g.LOW]&&c?i.nJ[a.g.MEDIUM]:o;t||(r=i.nJ[a.g.MEDIUM]);let l=e.scale(r).floor();return l.width>i.Qr&&l.width>l.height&&(l=new s.$u({width:i.Qr,height:Math.round(i.Qr*l.height/l.width)})),l.height>i.Qr&&l.height>l.width&&(l=new s.$u({width:Math.round(i.Qr*l.width/l.height),height:i.Qr})),[l,r]}const d=e=>{const t=e.scale(i.Ui);return new s.$u({width:Math.ceil(t.width),height:Math.floor(t.height)})};function p(e,t,n,o){const a=e.ownerDocument,l=a.createElement("div");l.id="print";const c=a.createElement("style");c.textContent=function(e){const t=`\n @page {\n size: ${e.width}pt ${e.height}pt;\n }\n\n \n @page {\n margin: 0;\n }`;return`\n @media print {\n \n * {\n ${f()}\n padding: 0 !important;\n margin: 0 !important;\n box-sizing: initial !important;\n display: none !important;\n visibility: hidden !important;\n }\n\n html, body {\n ${f()}\n height: 100% !important;\n width: 100% !important;\n display: block !important;\n visibility: visible !important;\n }\n\n \n\n body {\n background: transparent none !important;\n }\n\n #print, #print-container {\n ${f()}\n display: block !important;\n visibility: visible !important;\n height: 100% !important;\n }\n\n #print-container > div {\n ${f()}\n display: block !important;\n visibility: visible !important;\n position: relative !important;\n top: 0 !important;\n left: 0 !important;\n width: 1px !important;\n height: 1px !important;\n overflow: visible !important;\n page-break-after: always !important;\n page-break-inside: avoid !important;\n }\n\n #print-container canvas {\n ${f()}\n display: block !important;\n visibility: visible !important;\n }\n\n \n #print-container > .rotate90 {\n ${f()}\n display: block !important;\n visibility: visible !important;\n transform: rotate(90deg) !important;\n }\n\n \n #print-container > .rotateNegative90 {\n ${f()}\n display: block !important;\n visibility: visible !important;\n transform: translateY(${Math.abs(e.height-e.width)}pt) rotate(-90deg) !important;\n }\n\n \n @-moz-document url-prefix() {\n #print-container > .rotateNegative90 , #print-container > .rotate90 {\n margin-bottom: ${Math.abs(e.height-e.width)}pt !important;\n }\n }\n\n\n\n\n ${t}\n `}(function(e){const t=e.first();if(!t)return new s.$u({width:i.zA,height:i._2});let n=!1;const o=e.reduce(((e,t)=>{let{pageSize:o}=t;return o.width<e.width?(n=!0,o):(o.height!=e.height&&(n=!0),e)}),t.pageSize).floor();return n&&(0,r.ZK)("Printing documents using PrintMode.DOM may lead to incorrect results because not all pages have the same size.\nFor more information, see: https://pspdfkit.com/guides/web/current/features/printing/"),o}(n));const u=a.createElement("div");return u.id="print-container",t.forEach(((e,t)=>{const{rotation:r}=n.get(t)||{},i=a.createElement("div");if(i.classList.add("page"),o){e.width>e.height&&(1===r?i.classList.add("rotateNegative90"):i.classList.add("rotate90"))}i.appendChild(e),u.appendChild(i)})),l.appendChild(c),l.appendChild(u),e.appendChild(l),()=>{e.removeChild(l)}}function f(){return"animation: none 0s ease 0s 1 normal none running !important;\nbackface-visibility: visible !important;\nbackground: transparent none repeat 0 0/auto auto padding-box border-box scroll !important;\nborder: medium none currentColor !important;\nborder-collapse: separate !important;\nborder-image: none !important;\nborder-radius: 0 !important;\nborder-spacing: 0 !important;\nbottom: auto !important;\nbox-shadow: none !important;\nbox-sizing: content-box !important;\ncaption-side: top !important;\nclear: none !important;\nclip: auto !important;\ncolor: #000 !important;\ncolumns: auto !important;\ncolumn-count: auto !important;\ncolumn-fill: balance !important;\ncolumn-gap: normal !important;\ncolumn-rule: medium none currentColor !important;\ncolumn-span: 1 !important;\ncolumn-width: auto !important;\ncontent: normal !important;\ncounter-increment: none !important;\ncounter-reset: none !important;\ncursor: auto !important;\ndirection: ltr !important;\ndisplay: inline !important;\nempty-cells: show !important;\nfloat: none !important;\nfont-family: serif !important;\nfont-size: medium !important;\nfont-style: normal !important;\nfont-variant: normal !important;\nfont-weight: 400 !important;\nfont-stretch: normal !important;\nline-height: normal !important;\nheight: auto !important;\nhyphens: none !important;\nleft: auto !important;\nletter-spacing: normal !important;\nlist-style: disc outside none !important;\nmargin: 0 !important;\nmax-height: none !important;\nmax-width: none !important;\nmin-height: 0 !important;\nmin-width: 0 !important;\nopacity: 1 !important;\norphans: 2 !important;\noutline: medium none invert !important;\noverflow: visible !important;\noverflow-x: visible !important;\noverflow-y: visible !important;\npadding: 0 !important;\npage-break-after: auto !important;\npage-break-before: auto !important;\npage-break-inside: auto !important;\nperspective: none !important;\nperspective-origin: 50% 50% !important;\nposition: static !important;\nright: auto !important;\ntab-size: 8 !important;\ntable-layout: auto !important;\ntext-align: left !important;\ntext-align-last: auto !important;\ntext-decoration: none !important;\ntext-indent: 0 !important;\ntext-shadow: none !important;\ntext-transform: none !important;\ntop: auto !important;\ntransform: none !important;\ntransform-origin: 50% 50% 0 !important;\ntransform-style: flat !important;\ntransition: none 0s ease 0s !important;\nunicode-bidi: normal !important;\nvertical-align: baseline !important;\nvisibility: visible !important;\nwhite-space: normal !important;\nwidows: 2 !important;\nwidth: auto !important;\nword-spacing: normal !important;\nz-index: auto !important;\nall-initial !important;"}n(75376);var h=n(63738),m=n(16126),g=n(55615),v=n(95651),y=n(39511),b=n(97413);const w={macos:{blink:!0,webkit:!0},windows:{blink:!0,trident:!0},ios:{webkit:!0},android:{},linux:{blink:!0},unknown:{}};let S=null,P=null,E=null,x=null;function D(){E&&(clearTimeout(E),E=null),x&&(clearTimeout(x),x=null),S&&S.parentNode&&(S.parentNode.removeChild(S),S=null),P&&P()}var C=n(25387),k=n(19815);function O(){return{type:C.skc}}function A(){return{type:C.snh}}function T(){return{type:C._uU}}function I(e){const t="number"==typeof e?e:null;return{type:C.qV6,currentPage:t}}function F(){let{mode:e,excludeAnnotations:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(n,o)=>{e||(e=o().printMode);return(e===y.X.DOM?_:N)(n,o,t)}}let M=()=>{};async function _(e,t,n){e((0,h.X2)()),e(I(0)),e(O());const r=[];let i=t(),a=[];function c(){a.forEach((e=>{e()})),a=[]}M(),M=c;for(const{pageIndex:p,pageSize:h}of i.pages){if(!t().isPrinting)return M(),M=()=>{},void e(I(null));const[g,w]=u(h,(0,k.jb)(i),i.printQuality);try{var f;await(null===(f=i.annotationManager)||void 0===f?void 0:f.loadAnnotationsForPageIndex(p)),i=t();const c=i.pages.get(p);let u;if((0,b.k)(c&&i.backend),n)u=i.backend.renderTile(p,g,new s.UL({width:g.width,height:g.height}),!0,!0).promise;else{var y;const{annotationIds:e}=c,t=e.map((e=>i.annotations.get(e))).filter(Boolean).filter((e=>(0,v.x2)(e)&&(0,v.d)(e)&&!(e instanceof s.Jn||e instanceof s.On&&i.commentThreads.has(e.id)))).toList(),n=i.formFields.filter((e=>e.annotationIds.some((e=>{const t=i.annotations.get(e);return!(!t||t.pageIndex!==p)})))),r=(0,m.Qg)(n),a=t.reduce(((e,t)=>e.merge((0,v.Dc)(i,t))),(0,o.D5)()),l=null===(y=i.digitalSignatures)||void 0===y||null===(y=y.signatures)||void 0===y?void 0:y.filter((e=>n.some((t=>{let{name:n}=t;return n===e.signatureFormFQN}))));u=i.backend.renderTile(p,g,new s.UL({width:g.width,height:g.height}),!0,!0,{annotations:t,formFieldValues:r,attachments:a,signatures:l,formFields:n.toList()}).promise}let{element:S,release:P}=await u;if(a.push(P),"IMG"===S.nodeName){const e=S,t=document.createElement("canvas");t.width=g.width,t.height=g.height;const n=t.getContext("2d");(0,b.k)(n),null==n||n.drawImage(e,0,0),S=t}const{renderPageCallback:E}=i;if("function"==typeof E){const e=S.getContext("2d");null==e||e.scale(w,w),E(e,p,h)}const x=l.G6?h:d(h);S.style.cssText=`width: ${x.width}px !important;\nheight: ${x.height}px !important; display: none; filter: none; ${l.vU?"border: 1px solid transparent !important":""}`,r.push(S),e(I(p+1))}catch(e){throw c(),e}}try{(0,b.k)(document.body,"Printing requires a `<body>` tag in the main HTML layout.");const{pages:t}=i,n=function(e){let t;for(const[n,{pageSize:o}]of e.entries()){const e=o.width>o.height?"landscape":"portrait";if(0!==n){if(e!==t)return!0}else t=e}return!1}(t),o=p(document.body,r,t,n);M=()=>{c(),o()},await(w=()=>{if((0,g.il)(),window.focus(),l.b5){let e=!1;const t=()=>{e=!0,window.focus()},n=()=>{e=!1},o=()=>{e||(window.removeEventListener("focus",o),window.removeEventListener("beforeprint",t),window.removeEventListener("afterprint",n),M(),M=()=>{})};window.addEventListener("focus",o),window.addEventListener("beforeprint",t),window.addEventListener("afterprint",n)}window.print()},S=()=>{e((0,h.Zg)()),e(A()),e(I(null))},new Promise((e=>{const t=Date.now();setTimeout((()=>{w(),S();const n=Date.now()-t>500?25:18e4;setTimeout(e,n)}))})))}catch(e){throw e}finally{l.b5||(M(),M=()=>{})}var w,S}async function N(e,t,n){const o=t().backend;if((0,b.k)(o),!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.By,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.SR,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:navigator.plugins;const o=w[e].hasOwnProperty(t);let r="ios"===e;const i=/pdf/i;for(let e=0;e<n.length;e++)n[e].name.match(i)&&(r=!0);return o&&r}()||t().hasPassword)if("STANDALONE"===o.type&&"function"==typeof navigator.msSaveOrOpenBlob){const e=await o.exportPDF({flatten:!0,incremental:!1,includeComments:!1,saveForPrinting:!0,excludeAnnotations:n});navigator.msSaveOrOpenBlob(new Blob([e],{type:"application/pdf"}),"document.pdf")}else{const{promise:e}=o.getPDFURL({includeComments:!1,saveForPrinting:!0,excludeAnnotations:n});!function(e){const t=window.open(e,"_blank");t?(t.opener=null,t.focus()):(0,r.cM)("PSPDFKit: cannot open the PDF document in another window. You browser is probably blocking the popup.")}(await e)}else{e(O());try{await function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.SR,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return new Promise((async(o,r)=>{const i=12e4;D();const a=document.documentElement;(0,b.k)(a,"Could not access document.documentElement");const s=e=>{e.dataset.pspdfkitPrint="true",e.style.position="absolute",e.style.bottom="0px",e.style.left="0px",e.style.width="0px",e.style.height="0px",e.style.border="none",e.setAttribute("type","application/pdf")},{promise:l,revoke:c}=e.generatePDFObjectURL({includeComments:!1,saveForPrinting:!0,excludeAnnotations:n});P=c;const u=await l;if("trident"===t){S=document.createElement("embed"),S.setAttribute("src",u),s(S),a.appendChild(S),S.focus();const e=Date.now();!function t(){const n=document.querySelector("embed[data-pspdfkit-print=true]");(0,b.k)(n,"element not found"),Date.now()-e>3e4&&(c(),r(new Error("timeout")));try{n.print(),o(),E=setTimeout(D,i)}catch(e){x=setTimeout(t,500)}}()}else try{S=document.createElement("iframe"),S.setAttribute("src",u),S.setAttribute("aria-hidden","true"),s(S),S.onload=()=>{(0,b.k)(S,"iframe.onload called without element"),(0,b.k)(S instanceof HTMLIFrameElement,"element must be of type iframe");const e=S.contentWindow;if("webkit"===t){const t=setInterval((()=>{var n;"about:blank"!==(null==e?void 0:e.location.href)&&"complete"===(null==e?void 0:e.document.readyState)&&(clearInterval(t),null===(n=S)||void 0===n||n.focus(),null==e||e.print(),o(),E=setTimeout(D,i))}),100);setTimeout((()=>{clearInterval(t),r("Print failed: the document is taking too long to prepare"),D()}),5e3)}else S.focus(),null==e||e.print(),o(),E=setTimeout(D,i)},a.appendChild(S)}catch(e){r(e),D()}}))}(o,void 0,n),e(A())}catch(t){e(A())}}}},24852:(e,t,n)=>{"use strict";n.d(t,{g:()=>s});var o=n(47347),r=n(30761),i=n(18146),a=n(33320);function s(e,t){return async(n,i)=>{const{backend:a,features:s}=i();try{(0,o.kG)(a),a.cancelRequests(),await a.applyRedactionsAndReload(),await(0,r.jX)(n,i,{features:s,pageKeys:l(i())})}catch(e){return t(e)}i().eventEmitter.emit("document.change",[]),e()}}function l(e){const{pages:t,annotations:n}=e,o=n.filter((e=>e instanceof i.Z)).map((e=>e.pageIndex)).toSet();return t.map((e=>o.includes(e.pageIndex)?(0,a.C)():e.pageKey))}},70006:(e,t,n)=>{"use strict";n.d(t,{M0:()=>d,Sc:()=>p,Xe:()=>s,_8:()=>r,ct:()=>l,dZ:()=>a,j8:()=>f,jL:()=>i,nJ:()=>u,t2:()=>h,tB:()=>c});var o=n(25387);function r(e){return{type:o.FH6,term:e}}function i(){return{type:o.$Jy}}function a(){return{type:o.gIV}}function s(){return{type:o.$hO}}function l(){return{type:o._AY}}function c(){return{type:o.Ifu}}function u(){return{type:o.nFn}}function d(e){return{type:o.F6q,isLoading:e}}function p(e){return{type:o.qZT,results:e}}function f(e){return{type:o.p1u,state:e}}function h(e){return{type:o.esN,provider:e}}},34573:(e,t,n)=>{"use strict";n.d(t,{Ab:()=>C,BO:()=>D,Df:()=>T,FP:()=>w,IP:()=>_,J4:()=>O,Oc:()=>R,Q2:()=>N,Sb:()=>F,VR:()=>I,Y1:()=>A,_:()=>K,_3:()=>L,d5:()=>P,fz:()=>k,mg:()=>j,mv:()=>B,oX:()=>M,td:()=>E,tu:()=>Z,vR:()=>S});var o=n(67366),r=n(35369),i=n(47347),a=n(66687),s=n(18803),l=n(19815),c=n(95651),u=n(51333),d=n(69939),p=n(75237),f=n(68382),h=n(25387),m=n(49177),g=n(61631),v=n(62164),y=n(91039),b=n(44763);const w=(e,t)=>n=>{n((0,u.Dm)()),n(((e,t)=>({type:h.f3N,textRange:e,inlineTextMarkupToolbar:t}))(e,t))},S=()=>(e,t)=>{(0,s.a7)(t().frameWindow),e({type:h.MOe})},P=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,r.l4)(),t=arguments.length>1?arguments[1]:void 0;return{type:h._fK,newSelectedAnnotationsIds:e,annotationClass:t}},E=e=>(t,n)=>{const{annotations:o,selectedAnnotationIds:i}=n(),a=i.reduce(((e,t)=>{const n=o.get(t);return n?e.push(n):e}),(0,r.aV)());t(x(a)),t(P((0,r.l4)(),e))},x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,r.aV)(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,r.aV)(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(0,r.aV)();return(o,r)=>{const i=r().currentItemPreset;e.forEach((e=>{e&&o((0,d.hQ)(e)),e&&!p.ZP[i]&&o((0,d.sF)(e.id))})),t.forEach((e=>{o((0,d.$d)(e)),i&&!p.ZP[i]&&o((0,d.pZ)(e.id,i))})),n.forEach((e=>{o((0,d.uk)(e))}))}},D=e=>(t,n)=>{const o=n();if(!o.currentTextSelection)return t(E(e)),void t(S());const i=o.annotations.filter((e=>o.selectedAnnotationIds.has(e.id))).mapEntries((e=>{let[,t]=e;return[null!=t.pageIndex?t.pageIndex:o.viewportState.currentPageIndex,null!=t.pageIndex?t:t.set("pageIndex",o.viewportState.currentPageIndex)]})),a=(0,m.Bx)(o,i,e),s=i.reduce(((e,t)=>a.find((e=>e.id===t.id))?e:e.push(t)),(0,r.aV)()),l=a.filter((e=>!o.selectedAnnotationIds.has(e.id))),c=a.filter((e=>o.selectedAnnotationIds.has(e.id)&&!e.equals(i.get(e.pageIndex))));t(x(s,l,c));const u=(0,r.l4)(a.map((e=>e.id)));t(P(u,e))},C=()=>(e,t)=>{const n=t();n.selectedAnnotationIds.toSeq().map((e=>n.annotations.get(e))).filter(Boolean).filter((e=>e instanceof a.gd?!e.text.value||""===e.text.value:(e instanceof a.Hi||e instanceof a.om)&&(!e.points||e.points.size<=1))).forEach((t=>{e((0,d.hQ)(t))}))},k=()=>(e,t)=>{var n;(0,s.a7)(t().frameWindow),(0,o.dC)((()=>{e((0,u.Dm)()),e(C()),e((0,d.i0)()),e({type:h.MOe}),e({type:h.a33}),e((0,u.$z)()),e(z(null)),e((0,b.Ik)(null))})),null===(n=t().annotationManager)||void 0===n||n.autoSave()},O=(e,t)=>(n,o)=>{const r=o(),c=r.annotations.filter(((t,n)=>e.includes(n))),d=(0,l.ix)(r),p=c.some((e=>e instanceof a.x_));(0,i.kG)(!p||d,"Widget annotations cannot be selected without the corresponding license feature nor without instant enabled.");const f=c.map((e=>e.id)).toSet();n((0,u.Dm)()),(0,s.a7)(r.frameWindow);const m=f.find((e=>r.commentThreads.has(e)));if(m){const e=r.commentThreads.get(m);(0,i.kG)(null!=e);(0,v._P)(e,r.comments)||n((0,u.mh)(m))}n({type:h._Yi,annotations:f,mode:t,selectedAnnotationShouldDrag:null}),n((0,u.$z)())},A=()=>({type:h.RvB}),T=(e,t)=>(n,o)=>{const{commentThreads:a,comments:s,annotationsGroups:l}=o();if(1===e.size){const o=null==l?void 0:l.find((t=>{let{annotationsIds:n}=t;return n.has(e.first())}));if(o)return n(T(o.annotationsIds,t||null)),void n(z(o.groupKey))}e.forEach((e=>{if(a.has(e)){const t=a.get(e);(0,i.kG)(t);(0,v._P)(t,s)||n((0,u.mh)(e))}})),n(((e,t)=>({type:h._Yi,annotations:(0,r.l4)(e),mode:f.o.SELECTED,selectedAnnotationShouldDrag:t}))(e,t)),n((0,u.$z)())},I=e=>({type:h._Yi,annotations:(0,r.l4)([e]),mode:f.o.EDITING});function F(){return{type:h.c3G}}const M=e=>({type:h.TPT,id:e}),_=e=>({type:h.iyZ,id:e}),N=e=>({type:h.qh0,id:e}),R=e=>({type:h.rm,id:e}),L=e=>(t,n)=>{const{eventEmitter:o}=n();if(e){let t=!1;if(o.emit("annotationNote.hover",{preventDefault:()=>t=!0,annotationNote:e}),t)return}t({type:h.yyM,annotationNote:e})},B=e=>(t,n)=>{const{eventEmitter:o}=n();if(e){let t=!1;if(o.emit("annotationNote.press",{preventDefault:()=>t=!0,annotationNote:e}),t)return}t({type:h.vSH,annotationNote:e})},j=function(e,t){let{selectedAnnotationShouldDrag:n,preventDefault:i,stopPropagation:s,ignoreReadOnly:u,isAnnotationPressPrevented:p,clearSelection:f,longPress:h}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{selectedAnnotationShouldDrag:null,preventDefault:!1,stopPropagation:!1,ignoreReadOnly:!1,isAnnotationPressPrevented:void 0,clearSelection:!1,longPress:!1};return(m,v)=>{var b,w;const S=v(),{selectedAnnotationIds:P,annotations:E,activeAnnotationNote:x,collapseSelectedNoteContent:D,interactionsDisabled:C,eventEmitter:O,formDesignMode:A,isMultiSelectionEnabled:I}=S,F=!!e&&(e instanceof a.Qi||(e instanceof a.Jn||e instanceof a.FV)&&e.isCommentThreadRoot);if(null!=e&&e.locked&&!F)return;const M=P.size>1,_=t.shiftKey;if(x&&m(B(null)),D&&m((0,d.i0)()),!u&&(C||e&&(!("action"in e)||!e.action)&&(null===(b=e.additionalActions)||void 0===b||!b.onPointerDown)&&!e.isCommentThreadRoot&&(0,l.lV)(e,S)))return;if(void 0===p&&(p=!!e&&(0,c.TW)({annotation:e,nativeEvent:t.nativeEvent,selected:!1},O)),p)return;if((i||t.hasOwnProperty("type")&&"keypress"===t.type)&&t.preventDefault(),s&&t.stopPropagation(),f&&m(k()),!e)return;if(_){const t=E.get(P.first());if((null==t?void 0:t.pageIndex)!==e.pageIndex)return}const N=P.has(e.id);if("action"in e&&e.action&&!h&&!N&&!_)return void m((0,g.oo)(e));if("additionalActions"in e&&null!==(w=e.additionalActions)&&void 0!==w&&w.onPointerDown)return void m((0,g.TU)(e,"onPointerDown"));const R=!(0,y.Zt)(S,e)&&(!(e instanceof a.x_)||A);if(!R)return;const L=S.annotationsGroups.find((t=>{let{annotationsIds:n}=t;return n.has(e.id)}));if(N||!R||_||L){if(_&&I){if(N)return m(T(P.remove(e.id),n||null)),void m(z(null));if(L)return void(0,o.dC)((()=>{m(T(S.selectedAnnotationIds.merge(L.annotationsIds),n||null)),m(z(null))}));if(!N&&!L)return m(T(P.add(e.id),n||null)),void m(z(null))}if(!_){if(!N&&!L)return void(0,o.dC)((()=>{m(k()),m(T((0,r.l4)([e.id]),n||null))}));N||!L||M||(0,o.dC)((()=>{m(T(L.annotationsIds,n||null)),m(z(L.groupKey))}))}}else(0,o.dC)((()=>{m(k()),m(T((0,r.l4)([e.id]),n||null))}))}},z=e=>({type:h.t$K,groupId:e}),K=e=>({type:h.vBn,pullToRefreshNewState:e}),Z=e=>({type:h.L2A,inlineTextSelectionToolbarItemsCallback:e})},52042:(e,t,n)=>{"use strict";n.d(t,{Bm:()=>y,T6:()=>m,Th:()=>h,de:()=>b,l5:()=>g,nR:()=>v});var o=n(35369),r=n(47347),i=n(25387),a=n(36658),s=n(4352),l=n(20449),c=n(52871),u=n(95651),d=n(3845),p=n(29165),f=n(69939);function h(e,t){let{signatureRect:n,signaturePageIndex:p}=t,{hash:f,attachment:h}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(t,m)=>{var g,v;null===p&&(p=m().viewportState.currentPageIndex),(0,r.kG)("number"==typeof p,"Page index for a signature should be a number.");const y=m().pages.get(p);(0,r.kG)(y,`Cannot find page at index ${p}`);const b=y.pageSize;let w,S=e.withMutations((e=>{const t=(0,u.lx)(m());Object.keys(t).forEach((n=>{e.set(n,t[n])})),e.set("pageIndex",p),e.set("isSignature",!0)}));if(n){S=S.set("boundingBox",S.boundingBox.set("top",0).set("left",0)),S=(0,s.o)(S,new l.Z({width:n.width,height:n.height}),!0);const{boundingBox:e}=S,t=n.left+(n.width-e.width)/2,o=n.top+(n.height-e.height)/2;w=new c.Z({x:t,y:o})}else if(!S.boundingBox.top&&!S.boundingBox.left){const{boundingBox:e}=S;w=new c.Z({x:b.width/2-e.width/2,y:b.height/2-e.height/2})}w&&(S=(0,a.c)(S,w,b,new c.Z));const P={annotations:(0,o.aV)([S]),reason:d.f.SELECT_END};m().eventEmitter.emit("annotations.willChange",P),t({type:i.mGH,signature:S}),null===(g=m().annotationManager)||void 0===g||g.createObject(S,{attachments:f&&h?(0,o.D5)([[f,h]]):(0,o.D5)()}),null===(v=m().annotationManager)||void 0===v||v.autoSave()}}function m(e,t){return(n,o)=>{const r=e.merge({id:null,name:null,pageIndex:0});t&&n({type:i.W0l,annotation:r}),o().eventEmitter.emit("inkSignatures.create",r),o().eventEmitter.emit("inkSignatures.change"),o().eventEmitter.emit("storedSignatures.create",r),o().eventEmitter.emit("storedSignatures.change")}}function g(e,t,n,o){let{dimensions:r,hash:i,attachment:a,file:s}=e,{signatureRect:l,signaturePageIndex:c}=o;return(e,o)=>{let d;e((0,f.Ds)("image")),d=s instanceof File?(0,u.om)(o(),r,i,s.type,s.name):(0,u.om)(o(),r,i,"image/png"),d=d.set("isSignature",!0),e((0,p.O)(i,a)),e(h(d,{signatureRect:l,signaturePageIndex:c},{hash:i,attachment:a})),t&&e(m(d,n))}}function v(e){return{type:i.Kw7,annotations:e}}function y(e,t){return(n,o)=>{t&&n({type:i.Kc8,annotation:e}),o().eventEmitter.emit("inkSignatures.delete",e),o().eventEmitter.emit("inkSignatures.change"),o().eventEmitter.emit("storedSignatures.delete",e),o().eventEmitter.emit("storedSignatures.change")}}function b(){return async(e,t)=>{const{populateStoredSignatures:n}=t().signatureState;e(v(await n()))}}},93092:(e,t,n)=>{"use strict";n.d(t,{De:()=>r,LT:()=>a,v1:()=>i});var o=n(25387);const r=e=>({type:o.aWu,toolbarItems:e}),i=e=>({type:o.T3g,annotationToolbarItemsCallback:e}),a=e=>({type:o.A8G,height:e})},60840:(e,t,n)=>{"use strict";n.d(t,{Z:()=>S});var o=n(84121),r=n(67294),i=n(66687),a=n(7844),s=n(13944),l=n(36095),c=n(4054),u=n(90523),d=n.n(u),p=n(95919),f=n.n(p),h=n(14483),m=n.n(h),g=n(39583),v=n(44763);const y=(0,l.yx)(),b="data:image/svg+xml;base64,"+globalThis.btoa(f()),w="data:image/svg+xml;base64,"+globalThis.btoa(m());class S extends r.Component{constructor(){super(...arguments),(0,o.Z)(this,"shouldComponentUpdate",a.O),(0,o.Z)(this,"position",null),(0,o.Z)(this,"rect",null),(0,o.Z)(this,"state",{isDrawing:!1,isPenUser:!1,explicitScroll:!1,clientX:0,clientY:0,canAutoCloseShape:!1}),(0,o.Z)(this,"_drawingAreaEl",null),(0,o.Z)(this,"lastClickTime",null),(0,o.Z)(this,"_drawingAreaRef",(e=>{var t;(this._drawingAreaEl=e,e&&l.TL)&&(null===(t=this._drawingAreaEl)||void 0===t||t.addEventListener("touchmove",c.PF))})),(0,o.Z)(this,"onUnmount",(()=>{var e;this._drawingAreaEl&&l.TL&&(null===(e=this._drawingAreaEl)||void 0===e||e.removeEventListener("touchmove",c.PF));this._drawingAreaEl=null})),(0,o.Z)(this,"_handlePointerDown",(e=>{let t=!0;if(y&&this.props.canScrollWhileDrawing&&("pen"!==e.pointerType||this.state.isPenUser?"touch"===e.pointerType&&this.state.isPenUser&&(this.setState({explicitScroll:!0,clientX:e.clientX,clientY:e.clientY}),t=!1):this.setState({explicitScroll:!1,isPenUser:!0})),this.state.isDrawing)return void this._handlePointerUp();if(!e.isPrimary)return;if(!this._drawingAreaEl)return;this.rect=this._drawingAreaEl.getBoundingClientRect(),e.stopPropagation();const n=new i.E9({x:e.clientX,y:e.clientY}),o=this.position&&n.distance(this.position)<=10;var r,a;(this.position=n,this._buffer=[],this.setState({isDrawing:!0}),this.props.currentAnnotation instanceof i.om||this.props.currentAnnotation instanceof i.Hi)&&(null===(r=(a=this.props).dispatch)||void 0===r||r.call(a,(0,v.Ik)(null)));const{onDrawStart:s,onDoubleClick:l}=this.props,c=(new Date).getTime();if(this.lastClickTime&&l&&c-this.lastClickTime<500&&o)return l(this._transformPoint(n)),void(this.lastClickTime=null);this.lastClickTime=c,t&&s&&s(this._transformPoint(n),n)})),(0,o.Z)(this,"_buffer",[]),(0,o.Z)(this,"_throttleMove",P()),(0,o.Z)(this,"_throttleUp",P()),(0,o.Z)(this,"_handlePointerMove",(e=>{if(this.state.explicitScroll){const t={x:e.clientX,y:e.clientY},n={x:this.state.clientX,y:this.state.clientY};return requestAnimationFrame((()=>{if(this.props.scrollElement){const e=this.props.scrollElement.scrollTop+(n.y-t.y),o=this.props.scrollElement.scrollLeft+(n.x-t.x);this.props.scrollElement.scrollTop=e,this.props.scrollElement.scrollLeft=o}})),void this.setState({clientX:t.x,clientY:t.y})}this._handleDrawLine(e),this._handleCursorMove(e)})),(0,o.Z)(this,"_handleCursorMove",(e=>{if(this.props.currentAnnotation instanceof i.om||this.props.currentAnnotation instanceof i.Hi){if(!this.props.defaultAutoCloseThreshold)return;const a=new i.E9({x:e.clientX,y:e.clientY}),s=this.props.currentAnnotation.points,l=s.last(),c=this._transformPoint(a);var t,n;if(l&&c)null===(t=(n=this.props).dispatch)||void 0===t||t.call(n,(0,v.Ik)({lines:[{start:l,end:c}],pageIndex:this.props.currentAnnotation.pageIndex}));if(s&&s.size<3)return;const u=(0,g.KM)(this.props.currentAnnotation,0,this.props.defaultAutoCloseThreshold,new i.E9({x:c.x,y:c.y}));var o,r;if(-1!==u&&u!==s.size-1)this.setState({canAutoCloseShape:!0}),null===(o=(r=this.props).dispatch)||void 0===o||o.call(r,(0,v.Ik)({lines:[{start:l,end:s.get(u)}],pageIndex:this.props.currentAnnotation.pageIndex}));else this.setState({canAutoCloseShape:!1})}})),(0,o.Z)(this,"_handlePointerUp",(e=>{e&&!e.isPrimary||(e&&e.stopPropagation(),this.setState({isDrawing:!1}),this.state.isPenUser&&"touch"==(null==e?void 0:e.pointerType)?this.setState({explicitScroll:!1}):this._throttleUp((()=>{const{onDrawEnd:e}=this.props;this._drawingAreaEl&&(this.rect=this._drawingAreaEl.getBoundingClientRect(),this._buffer=[],this.position&&e&&e(this._transformPoint(this.position)))})))})),(0,o.Z)(this,"_defaultTransformPoint",(e=>{if(!this.rect)return e;const t=this.props.size.width/this.rect.width,n=this.props.size.height/this.rect.height,o="number"==typeof this.rect.x?this.rect.x:this.rect.left,r="number"==typeof this.rect.y?this.rect.y:this.rect.top;return new i.Wm({x:e.x-o,y:e.y-r}).scale(t,n)})),(0,o.Z)(this,"_transformPoint",(e=>this._clipPointToContainerBounds((this.props.transformPoint||this._defaultTransformPoint)(new i.Wm({x:e.x,y:e.y})))))}render(){return r.createElement(s.Z,{onPointerDown:this._handlePointerDown,onRootPointerMove:this.state.isDrawing?this._handlePointerMove:this._handleCursorMove,onRootPointerUpCapture:this.state.isDrawing?this._handlePointerUp:void 0,interactionMode:this.props.interactionMode},r.createElement("div",{"data-testid":"drawcomponent",role:"application"},r.createElement("div",{className:d().layer,style:(this.props.currentAnnotation instanceof i.om||this.props.currentAnnotation instanceof i.Hi)&&!l.G6?{cursor:this.state.canAutoCloseShape?`url(${w}) 6 6, auto`:`url(${b}) 6 6, auto`}:{},ref:this._drawingAreaRef})))}_handleDrawLine(e){e.preventDefault(),e.stopPropagation();const t=new i.E9({x:e.clientX,y:e.clientY});if(t.equals(this.position))return;this.position=t;const{onDrawCoalesced:n}=this.props;if(n){const t=e.getCoalescedEvents();this._buffer=this._buffer.concat(t),this._throttleMove((()=>{const[e,t]=this._buffer.reduce(((e,t)=>{const n=new i.E9({x:t.clientX,y:t.clientY});return e[0].push(this._transformPoint(n)),e[1].push(n),e}),[[],[]]);this._buffer=[],n(e,t)}))}}_clipPointToContainerBounds(e){if(this._isPointWithinContainer(e))return e;const{size:t}=this.props;return e.x>t.width&&(e=e.set("x",t.width)),e.x<0&&(e=e.set("x",0)),e.y>t.height&&(e=e.set("y",t.height)),e.y<0&&(e=e.set("y",0)),e}_isPointWithinContainer(e){const{size:t}=this.props;return new i.UL({width:t.width,height:t.height}).isPointInside(e)}}function P(){let e;return t=>{e||requestAnimationFrame((()=>{const t=e;e=null,t()})),e=t}}},86366:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var o=n(84121),r=n(47347),i=n(67294),a=n(94184),s=n.n(a),l=n(94385),c=n(4054),u=n(21824),d=n.n(u);class p extends i.PureComponent{constructor(){var e;super(...arguments),e=this,(0,o.Z)(this,"_cancelImagePromise",null),(0,o.Z)(this,"_throttledFetchImage",(0,l.Z)(this._fetchImage,"number"==typeof this.props.throttleTimeout?this.props.throttleTimeout:2e3,!0)),(0,o.Z)(this,"imageRef",i.createRef()),(0,o.Z)(this,"_replaceImage",(function(t){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.imageRef.current?(e.imageRef.current.appendChild(t.element),setTimeout((()=>t.release()),500),e.imageRef.current&&e.imageRef.current.children.length>1&&e.imageRef.current.removeChild(e.imageRef.current.firstChild),e.props.onRenderFinished&&e.props.onRenderFinished(),n&&e._throttledFetchImage()):t.release()})),(0,o.Z)(this,"_onImageAvailable",(function(t){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{label:o,visible:i}=e.props,a=t.element;a&&e.imageRef.current&&a!==e.imageRef.current.firstChild&&(a.setAttribute("alt",o||""),i||a.setAttribute("role","presentation"),(0,c.sR)(a).then((()=>requestAnimationFrame((()=>e._replaceImage(t,n))))).catch((t=>{(0,r.vU)(t),e.props.onError&&e.props.onError(t)})))}))}componentDidMount(){this._throttledFetchImage()}refresh(){this._throttledFetchImage()}refreshSkippingThrottle(){this._fetchImage()}async _fetchImage(){let e;this._cancelOutstandingRequests();const{promise:t,isProvisional:n,cancel:o}=this.props.fetchImage();this._cancelImagePromise=o;try{var i,a;if(e=await t,e)this._onImageAvailable(e,n);else null===(i=(a=this.props).onError)||void 0===i||i.call(a)}catch(e){var s,l;(0,r.vU)(e),o(e),null===(s=(l=this.props).onError)||void 0===s||s.call(l,e)}this._cancelImagePromise=null}_cancelOutstandingRequests(){this._cancelImagePromise&&this._cancelImagePromise()}componentWillUnmount(){this._cancelOutstandingRequests()}render(){const{className:e,rectStyle:t}=this.props;return i.createElement("div",{className:s()(d().root,e),style:t,ref:this.imageRef})}}},6437:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var o=n(22122),r=n(84121),i=n(25915),a=n(67294),s=n(94184),l=n.n(s),c=n(18390),u=n(30667),d=n(88804),p=n(36095),f=n(6006),h=n.n(f);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const v=250;function y(e){const{pageIndex:t,cssPrefix:n,renderItemCallback:r,itemState:i,clickDisabled:s,onItemPress:d,onItemFocus:f,size:m,itemScale:y}=e,b=v*y,w=g(g({},m.toJS()),{},{paddingTop:32*y,paddingRight:32*y,paddingBottom:24*y,paddingLeft:32*y}),[,S]=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0;const[o,r]=a.useState(null),[i,s]=a.useState(!1),l=e=>{t||s(e)};function c(){n=Date.now(),l(!1)}return[i,{onTouchStart(){n=Date.now(),l(!0)},onTouchEnd:c,onTouchCancel:c,onMouseEnter(){Date.now()-n>500&&l(!0)},onMouseLeave(){l(!1)},onMouseDown(e){r(e)},onPointerDown(e){r(e)},onClick(t){o&&o.clientX===t.clientX&&o.clientY===t.clientY&&(e(t),r(null))}}]}((()=>{i.dragging||d(t)})),{item:P,label:E,props:x}=r(t,b,v),D=l()(h().thumbnail,n+"-Thumbnails-Page-Image",{[h().thumbnailClickDisabled]:s,[h().thumbnailSelected]:i.selected,[h().thumbnailBeingDragged]:i.dragging});return a.createElement("div",(0,o.Z)({style:w,className:l()(h().column,n+"-Thumbnails-Page",h()[`engine-${p.SR}`],{[n+"-Thumbnails-Page-Selected"]:i.selected}),"data-testid":"grid-column","data-page-index":t},x),a.createElement("div",{style:{width:b,height:b},className:h().columnPreview},e.clickDisabled?a.createElement("div",{className:D},P):a.createElement(c.Z,(0,o.Z)({is:"div",className:D,"aria-label":`Select Page ${E}`,"aria-pressed":i.selected,onKeyPress:e=>{const{charCode:n}=e;n===u.tW&&d(t)},onFocus:()=>f(t),onBlur:()=>f(null),ref:i.itemRef},"object"==typeof S&&S),P)),a.createElement("div",{style:{height:24,maxWidth:b,marginTop:16*y,lineHeight:"24px"},className:l()(h().label,n+"-Thumbnails-Page-Label",{[h().labelSelected]:i.selected})},E))}const b=e=>{const{cssPrefix:t,clickDisabled:n,width:o,moveCursor:r}=e;let{itemScale:s}=e;const[c,u]=a.useState(null);s=Math.min(s,(o-15)/314),s=Math.max(s,.01);const p=a.useMemo((function(){return new d.$u({width:314*s,height:322*s+24})}),[s]),f=v*s,m=r?"left"===r.position?r.pageIndex:r.pageIndex+1:void 0;return a.createElement(i.FE,{width:e.width,height:e.height,canInsert:e.canInsert,draggingEnabled:!!e.onItemsMove&&!n,totalItems:e.totalItems,itemWidth:p.width,itemHeight:p.height,itemPaddingLeft:32*s,itemPaddingRight:32*s,renderItem:(o,r)=>a.createElement(y,{selectedItemIndexes:e.selectedItemIndexes,size:p,itemScale:s,pageIndex:o,itemState:r,cssPrefix:t,clickDisabled:n||!1,renderItemCallback:e.renderItemCallback,onItemPress:e.onItemPress,onItemFocus:e=>u(e)}),itemKey:e.itemKeyCallback,renderDragPreview:e.renderDragPreviewCallback?(t,n)=>e.renderDragPreviewCallback?e.renderDragPreviewCallback(n,t,f,v):null:void 0,renderInsertionCursor:(e,t)=>{const n={top:32*s+1,height:v*s-1};return a.createElement("div",{style:n,className:l()(h().moveCursor,{[h().moveCursorDisabled]:!e})},null!=(null==r?void 0:r.previewContent)&&a.createElement("div",{className:l()(h().moveCursorPreview,{[h().moveCursorPreviewEnd]:t})},r.previewContent))},onDragEnd:e.onItemsMove,selectedItemIndexes:e.selectedItemIndexes,insertionIndex:m,focusedItemIndex:c})}},13540:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var o=n(22122),r=n(17375),i=n(67294);const a=["src"];function s(e){let{src:t}=e,n=(0,r.Z)(e,a);const s=i.useRef(null);return i.useEffect((function(){if(s.current){const e=s.current.childNodes[0];"function"==typeof e.setAttribute&&e.setAttribute("focusable","false")}}),[]),i.createElement("span",(0,o.Z)({},n,{dangerouslySetInnerHTML:{__html:t},ref:s}))}},26467:(e,t,n)=>{"use strict";n.d(t,{O:()=>p});var o=n(84121),r=n(67294);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const s={strokeDasharray:100},l=a(a({},s),{},{fill:"none"}),c=e=>r.createElement("polygon",{points:"0.5,2 0.5,0.5 3.5,0.5 3.5,3.5 0.5,3.5 0.5,2",style:a(a({},e),s)}),u=e=>r.createElement("circle",{cx:"2",cy:"2",r:"1.5",style:a(a({},e),s)}),d=e=>r.createElement("line",{x1:"0",y1:"2",x2:"4",y2:"2",style:a(a({},e),l)}),p={none:{startElement:d,endElement:d,width:4},square:{startElement:c,endElement:c,width:3.5},circle:{startElement:u,endElement:u,width:3.5},diamond:{startElement:e=>r.createElement("polygon",{points:"3.5,2 2.25,3.25 1,2 2.25,0.75 3.5,2 4,2",style:a(a({},e),s)}),endElement:e=>r.createElement("polygon",{points:"0.75,2 2,0.75 3.25,2 2,3.25 0.75,2 0.25,2",style:a(a({},e),s)}),width:3.5},openArrow:{startElement:e=>r.createElement("polyline",{points:"4.25,0.5 1.25,2 4.25,3.5 1.25,2 4.75,2",style:a(a({},e),l)}),endElement:e=>r.createElement("polyline",{points:"0.25,0.5 3.25,2 0.25,3.5 3.25,2 -0.25,2",style:a(a({},e),l)}),width:3.75},closedArrow:{startElement:e=>r.createElement("polygon",{points:"3.75,2 3.75,0.75 1.25,2 3.75,3.25 3.75,2 4.75,2",style:a(a({},e),s)}),endElement:e=>r.createElement("polygon",{points:"0.75,2 0.75,0.75 3.25,2 0.75,3.25 0.75,2 -0.75,2",style:a(a({},e),s)}),width:3.75},butt:{startElement:e=>r.createElement("line",{x1:"3.75",y1:"0.5",x2:"3.75",y2:"3.5",style:a(a({},e),l)}),endElement:e=>r.createElement("line",{x1:"0.5",y1:"0.5",x2:"0.5",y2:"3.5",style:a(a({},e),l)}),width:.5},reverseOpenArrow:{startElement:e=>r.createElement("polyline",{points:"1,0.5 4,2 1,3.5",style:a(a({},e),l)}),endElement:e=>r.createElement("polyline",{points:"3.25,0.5 0.25,2 3.25,3.5",style:a(a({},e),l)}),width:3},reverseClosedArrow:{startElement:e=>r.createElement("polygon",{points:"4,2 1.5,3.25 1.5,0.75",style:a(a({},e),s)}),endElement:e=>r.createElement("polygon",{points:"0.25,2 2.75,3.25 2.75,0.75",style:a(a({},e),s)}),width:2.75},slash:{startElement:e=>r.createElement("polyline",{points:"3.25,0.5 2.25,3.75 2.85,2 3.75,2",style:a(a({},e),l)}),endElement:e=>r.createElement("polyline",{points:"1.85,0.5 0.85,3.75 1.25,2 0.35,2",style:a(a({},e),l)}),width:1.5}}},73264:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var o=n(67294),r=n(94184),i=n.n(r),a=n(71945),s=n.n(a);function l(e){let{scale:t=1,rotate:n=0}=e;const[r,a]=o.useState(!1);o.useEffect((()=>{const e=setTimeout((()=>{a(!0)}),400);return()=>{clearTimeout(e)}}),[]);const l=`scale(${t})`,c={transform:n?`rotate(${n}deg) ${l}`:l,transformOrigin:"center center"};return o.createElement("div",{style:c,className:i()("PSPDFKit-Loading-Indicator",s().loader,{[s().loaderShown]:r})},o.createElement("div",{className:s().loaderDot}),o.createElement("div",{className:s().loaderDot}),o.createElement("div",{className:s().loaderDot}))}},40045:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});var o=n(84121),r=n(67366),i=n(67294),a=n(52560),s=n(27515),l=n(18803),c=n(36095),u=n(47710),d=n(3219),p=n(66687),f=n(42911),h=n(97413);const m=(0,f.Yw)(),g={onPinchStart:"pinchstart",onPinchIn:"pinchin",onPinchOut:"pinchout",onPinchCancel:"pinchcancel",onPinchEnd:"pinchend",onSwipeLeft:"swipeleft",onSwipeRight:"swiperight",onDoubleTap:"doubletap"};function v(e,t,n){t&&Object.keys(t).forEach((o=>{const r=g[o];!r||"function"!=typeof t[o]||n&&"function"==typeof n[o]&&n[o]===t[o]||e.off(r,t[o])})),n&&(n.enablePinch&&e.get("pinch").set({enable:!0,threshold:.3}),n.onDoubleTap&&e.get("doubletap").set({posThreshold:50}),Object.keys(n).forEach((o=>{const r=g[o];!r||"function"!=typeof n[o]||t&&"function"==typeof n[o]&&n[o]===t[o]||e.on(r,n[o])})))}class y extends i.Component{constructor(){super(...arguments),(0,o.Z)(this,"_handleRef",(e=>{e&&((0,h.k)("string"==typeof e.nodeName,"TRC requires a basic HTML element as children. This looks like a custom react component."),this._refElement=e)}))}componentDidMount(){this.initializeHammer(),v(this._hammer,null,this.props)}initializeHammer(){this._hammer=new m(this._refElement,{touchAction:"pan-x pan-y"}),this._refElement.style.msTouchSelect="initial"}componentDidUpdate(e){this._hammer&&v(this._hammer,e,this.props)}componentWillUnmount(){v(this._hammer,this.props,null),this._hammer&&(this._hammer.stop(),this._hammer.destroy()),this._hammer=null}render(){const e=i.Children.only(this.props.children);return(0,h.k)(!e.ref,"TRC requires the child element to not have a `ref` assigned. Consider inserting a new `<div>` in between."),i.cloneElement(e,{ref:this._handleRef})}}const b=!n(71231).Gn||{passive:!1,capture:!0};class w extends i.Component{constructor(){super(...arguments),(0,o.Z)(this,"_trackpadRef",i.createRef()),(0,o.Z)(this,"_hasWheelEventStarted",!1),(0,o.Z)(this,"_currentWheelTimeout",null),(0,o.Z)(this,"_lastScale",1),(0,o.Z)(this,"_handleWheel",(e=>{if(!e.ctrlKey)return;e.preventDefault(),e.stopPropagation(),this._currentWheelTimeout&&clearTimeout(this._currentWheelTimeout),this._currentWheelTimeout=setTimeout((()=>{this.props.onPinchEnd(),this._hasWheelEventStarted=!1,this._lastScale=1}),250);const t=function(e,t){return{center:{x:e.clientX,y:e.clientY},scale:t-e.deltaY/120,pointerType:"mouse",preventDefault:e.preventDefault,srcEvent:e}}(e,this._lastScale);let n=1;n=t.scale>1?1.05*this._lastScale:.95*this._lastScale,t.scale=n,n*this.props.zoomLevel>this.props.minZoomLevel&&n*this.props.zoomLevel<this.props.maxZoomLevel&&(this._hasWheelEventStarted||(this.props.onPinchStart(t),this._hasWheelEventStarted=!0),this._lastScale=n,this.props.onPinch(t))})),(0,o.Z)(this,"_handleGestureStart",(e=>{e.preventDefault(),this.props.onPinchStart(S(e))})),(0,o.Z)(this,"_handleGestureChange",(e=>{e.preventDefault(),this.props.onPinch(S(e))})),(0,o.Z)(this,"_handleGestureEnd",(e=>{e.preventDefault(),this.props.onPinchEnd(S(e))}))}componentDidMount(){const{current:e}=this._trackpadRef;if(e){const t=e.ownerDocument;t.addEventListener("wheel",this._handleWheel,b),"ios"!==c.By&&(t.addEventListener("gesturestart",this._handleGestureStart),t.addEventListener("gesturechange",this._handleGestureChange),t.addEventListener("gestureend",this._handleGestureEnd))}}componentWillUnmount(){const{current:e}=this._trackpadRef;if(e){const t=e.ownerDocument;t.removeEventListener("wheel",this._handleWheel,b),"ios"!==c.By&&(t.removeEventListener("gesturestart",this._handleGestureStart),t.removeEventListener("gesturechange",this._handleGestureChange),t.removeEventListener("gestureend",this._handleGestureEnd))}}render(){return i.createElement("div",{ref:this._trackpadRef},this.props.children)}}function S(e){return{center:{x:e.clientX,y:e.clientY},scale:e.scale,pointerType:"mouse",preventDefault:e.preventDefault,srcEvent:e}}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class x extends i.Component{constructor(){super(),(0,o.Z)(this,"_zoomLayerRef",i.createRef()),(0,o.Z)(this,"_handleDoubleTap",(e=>{if("touch"!==e.pointerType)return;const{viewportState:t}=this.props,{viewportRect:n,zoomLevel:o}=t;this._startZooming();const r=new p.E9({x:e.center.x,y:e.center.y}).translate(n.getLocation().scale(-1)),i=this.props.viewportState.scrollMode===u.G.PER_SPREAD||this.props.viewportState.scrollMode===u.G.DISABLED?(0,a.vw)(t):(0,a.kh)(t),s=o>i?i:1.5*o,l=(0,a.cq)(t,s,{zoomCenter:r});this.setState({nextViewportState:l,shouldAnimate:!0}),this._callEndZoomingAfterTransition(l)})),(0,o.Z)(this,"_handlePinchStart",(e=>{const{viewportState:t}=this.props,{viewportRect:n}=t;this._startZooming(),this._touchZoomCenter=new p.E9({x:e.center.x,y:e.center.y}).translate(n.getLocation().scale(-1))})),(0,o.Z)(this,"_handlePinch",(e=>{this._isZooming&&(this._lastPinchScale=e.scale,this.requestAnimationFrameId||(this.requestAnimationFrameId=window.requestAnimationFrame(this._renderNextFrame)),null!==this._pinchResetTimeoutId&&clearTimeout(this._pinchResetTimeoutId),this._pinchResetTimeoutId=setTimeout((()=>this._handlePinchEnd()),2e3))})),(0,o.Z)(this,"_handlePinchEnd",(()=>{if(!this._isZooming)return;null!==this._pinchResetTimeoutId&&(clearTimeout(this._pinchResetTimeoutId),this._pinchResetTimeoutId=null);const{viewportState:e}=this.props,{zoomLevel:t}=e;if(!this._touchZoomCenter)return;this.requestAnimationFrameId&&(window.cancelAnimationFrame(this.requestAnimationFrameId),this.requestAnimationFrameId=null);const n=t*this._lastPinchScale,o=(0,a.cq)(e,n,{zoomCenter:this._touchZoomCenter});this.state.nextViewportState&&(0,a.hT)(this.state.nextViewportState)?(this.setState({nextViewportState:o,shouldAnimate:!0}),this._callEndZoomingAfterTransition(o)):this._zoomComplete(o)})),(0,o.Z)(this,"_renderNextFrame",(()=>{const{viewportState:e}=this.props,{zoomLevel:t}=e,n=t*this._lastPinchScale,o=(0,a.cq)(e,n,{zoomCenter:this._touchZoomCenter,unbounded:!0});this.setState({nextViewportState:o}),this.requestAnimationFrameId=null})),(0,o.Z)(this,"_zoomComplete",(e=>{(0,r.dC)((()=>{this.props.dispatch((0,d.nr)(e)),this._endZooming()}))})),this._touchZoomCenter=new p.E9,this._isZooming=!1,this.state={shouldAnimate:!1,nextViewportState:null},this.requestAnimationFrameId=null}render(){const{children:e,viewportState:t}=this.props,{nextViewportState:n}=this.state,o=(0,s.G4)(t);let r={transformOrigin:"0 0",width:o.width+t.viewportPadding.x,height:o.height+t.viewportPadding.y};if(n){const e=n.scrollPosition.scale(n.zoomLevel).translate(t.scrollPosition.scale(-t.zoomLevel)),o=(0,s.G4)(n).translate(e.scale(-1)),i=n.zoomLevel/t.zoomLevel;r=E(E({},r),{},{transform:`translate(${o.left}px, ${o.top}px)\n scale(${i}, ${i})`,willChange:"transform",transition:this.state.shouldAnimate?"transform 150ms ease-in":""})}else r=E(E({},r),{},{transform:`translate(${Math.ceil(o.left)}px, ${Math.ceil(o.top)}px)`});return i.createElement(w,{onPinchStart:this._handlePinchStart,onPinch:this._handlePinch,onPinchEnd:this._handlePinchEnd,zoomLevel:this.props.viewportState.zoomLevel,minZoomLevel:(0,a.Yo)(this.props.viewportState),maxZoomLevel:(0,a.Sm)(this.props.viewportState)},i.createElement(y,{onPinchStart:this._handlePinchStart,onPinchIn:this._handlePinch,onPinchOut:this._handlePinch,onPinchEnd:this._handlePinchEnd,onPinchCancel:this._handlePinchEnd,onDoubleTap:this._handleDoubleTap,enablePinch:!0},i.createElement("div",null,i.createElement("div",{ref:this._zoomLayerRef,style:r,className:"PSPDFKit-Zoom"},e))))}_callEndZoomingAfterTransition(e){this._removeAnimationEventListener();const t=this._zoomComplete.bind(this,e);this._zoomCompleteFn=t,this._zoomLayerRef.current&&this._zoomLayerRef.current.addEventListener("transitionend",this._zoomCompleteFn),setTimeout((()=>{this._zoomCompleteFn&&t===this._zoomCompleteFn&&this._zoomCompleteFn()}),250)}_startZooming(){if(!this._isZooming&&(this._isZooming=!0,"gecko"===c.SR&&"windows"===c.By&&this._zoomLayerRef.current)){const{defaultView:e}=this._zoomLayerRef.current.ownerDocument;(0,l.a7)(e)}}_endZooming(){this._resetState()}_resetState(){this.setState({shouldAnimate:!1,nextViewportState:null}),this._lastPinchScale=1,this._touchZoomCenter=new p.E9,this._isZooming=!1,this._removeAnimationEventListener()}_removeAnimationEventListener(){this._zoomLayerRef.current&&this._zoomLayerRef.current.removeEventListener("transitionend",this._zoomCompleteFn),this._zoomCompleteFn=null}}},99728:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>ne,getDocumentKeyForReferencePoints:()=>te,messages:()=>oe});var o,r,i,a,s,l,c,u,d=n(67294),p=n(73935),f=n(76154),h=n(51559),m=n(55024),g=n(84121),v=n(73264),y=n(22122),b=n(67665),w=n(94184),S=n.n(w),P=n(67366),E=n(40045),x=n(60840),D=n(13540),C=n(88804),k=n(58479),O=n(20500),A=n(20792),T=n(72800),I=n(98013),F=n(36095),M=n(53033),_=n.n(M);const N=(0,F.b1)(),R=N?{x:31.25,y:13}:{x:12.5,y:-4},L=e=>{const{viewportState:t,backend:o,scrollElement:r,styles:i,currentDocumentKey:a,referencePoints:s,addReferencePoint:l,page:c,isAutoCompare:u,interactionMode:p}=e,{formatMessage:h}=(0,f.YB)(),g=(0,k.tm)(),[v,y]=d.useState(!1),w=d.useRef(null),F=(0,k.R9)((e=>{N?(v||y(!0),w.current&&clearTimeout(w.current),w.current=setTimeout((()=>{w.current=null,g()&&y(!1)}),300)):e()})),M=a!==m.Q.result?a===m.Q.documentA?s.slice(0,3):s.slice(3,6):[],L=s.length<6&&M.filter(Boolean).length<3&&!u&&p!==A.A.PAN&&(a===m.Q.documentA&&s.length<3||a===m.Q.documentB&&s.length>=3),B={width:c.pageSize.width*t.zoomLevel,height:c.pageSize.height*t.zoomLevel},z=d.useRef(null),K=S()({"PSPDFKit-Page":!0,[`PSPDFKit-Page-Rotation-${t.pagesRotation}-degree`]:!0,[i.page]:!0,[i["deg-"+t.pagesRotation]]:!0}),Z=(0,k._x)(),U=(0,P.v9)((e=>e.showToolbar))?I.k3:0,V=(0,k.R9)((()=>{l(Z(new C.Wm({x:t.viewportRect.width/2+2,y:t.viewportRect.height/2+U})))})),G={inViewport:!0,page:c,backend:o,shouldPrerender:!0,zoomLevel:t.zoomLevel,rotation:t.pagesRotation,renderPageCallback:e.renderPageCallback,allowedTileScales:e.allowedTileScales,documentHandle:a,viewportRect:t.viewportRect,forceDetailView:!1,renderPagePreview:e.renderPagePreview,isPageSizeReal:!0,crispTiles:!0,inContentEditorMode:!1},W=(0,P.v9)((e=>e.scrollbarOffset)),q=M.map(((e,n)=>e?d.createElement("div",{className:S()({"PSPDFKit-DocumentComparison-ReferencePoint-Marker":!0,[i.referencePoint]:!0}),style:{left:e.x*t.zoomLevel-R.x+(N?W/2:0),top:e.y*t.zoomLevel-R.y},key:`point_${n}`},d.createElement(j,{touchDevice:N,className:i.comparisonPin},n+1)):null));return d.createElement(d.Fragment,null,d.createElement("div",{className:S()({[i.source]:!N,[i.sourceTouch]:!!N,"PSPDFKit-DocumentComparison-Source":!0,[`PSPDFKit-DocumentComparison-Source-${a}`]:!!a}),style:{cursor:L&&!N?`url('data:image/svg+xml,${_()}') 4 20, crosshair`:"auto"}},L&&N&&d.createElement(b.m,null,d.createElement("div",{className:i.crosshair,ref:z},d.createElement("div",{className:S()(i.selectPoint,{[i.hidden]:v}),onClick:V},h(oe.Comparison_selectPoint)),d.createElement(D.Z,{src:n(96373)}))),d.createElement(E.Z,{dispatch:e.dispatch,viewportState:t},d.createElement("section",{className:K,style:B,"data-page-index":c?c.pageIndex:""},d.createElement(T.Z,G),q,N?null:d.createElement("div",{className:i.pointerLayer},L?d.createElement(x.Z,{size:c.pageSize,onDrawEnd:l,transformPoint:Z,interactionMode:p,scrollElement:r}):null)))),r&&!N?d.createElement(O.B,{viewportState:t,scrollElement:r,onScroll:F,currentMainToolbarHeight:U,className:"PSPDFKit-DocumentComparison-Magnifier",pageIndex:c.pageIndex,pageRendererComponentProps:G},q):null)},B=N?{width:"100",height:"100",viewBox:"-10 0 90 100",fill:"none",xmlns:"http://www.w3.org/2000/svg"}:{width:"66",height:"66",viewBox:"-10 0 56 66",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j=e=>{let{children:t,touchDevice:n,className:p}=e;return d.createElement("svg",(0,y.Z)({},B,{className:p}),n?d.createElement("g",{stroke:"#f5281b"},o||(o=d.createElement("path",{d:"M44.0171 43.4142L72.3014 71.6985",strokeWidth:"4"})),r||(r=d.createElement("path",{d:"M12.9043 12.3015L41.1886 40.5858",strokeWidth:"4"})),i||(i=d.createElement("path",{d:"M72.3013 12.3015L44.017 40.5858",strokeWidth:"4"})),a||(a=d.createElement("path",{d:"M41.189 43.4142L12.9047 71.6985",strokeWidth:"4"})),d.createElement("text",{x:"-10",y:"82",fontSize:"28",fill:"#f5281b",dominantBaseline:"central"},t)):d.createElement("g",{stroke:"#f5281b"},s||(s=d.createElement("path",{d:"M26.0083 25.7072L40.1505 39.8493",strokeWidth:"1.99616"})),l||(l=d.createElement("path",{d:"M10.4521 10.1508L24.5943 24.2929",strokeWidth:"1.99616"})),c||(c=d.createElement("path",{d:"M40.1509 10.1508L26.0087 24.2929",strokeWidth:"1.99616"})),u||(u=d.createElement("path",{d:"M24.5952 25.7072L10.453 39.8493",strokeWidth:"1.99616"})),d.createElement("text",{x:"0",y:"44",fontSize:"14",fill:"#f5281b",dominantBaseline:"central"},t)))};var z=n(25915);const K=e=>{const{addSource:t}=e,n=d.useCallback((e=>{(null==e?void 0:e.click)&&e.click()}),[]),o=d.useCallback((e=>{if(e.target.files[0]){const n=new FileReader;n.onload=e=>{var n;t(null===(n=e.target)||void 0===n?void 0:n.result)},n.readAsArrayBuffer(e.target.files[0])}}),[t]);return d.createElement(z.TX,{tag:"div"},d.createElement("input",{ref:n,"aria-label":"","aria-hidden":!0,type:"file",accept:"image/png, image/jpeg, image/tiff, application/pdf",onChange:o,tabIndex:-1}))};var Z,U=n(9946),V=n(80399),G=n(3219),W=n(22660),q=n(2270);function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){(0,g.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const X=e=>{const{styles:t,currentDocumentKey:n,referencePoints:o,addReferencePoint:r,settings:i,completionConfiguration:a,setDocumentSources:s,documentSources:l,backend:c,viewportState:u,interactionMode:f,dispatch:g,isAutoCompare:y,renderPagePreview:b}=e,w=(0,k.tm)(),[S,P]=d.useState(null),[E,x]=d.useState(!1),D=(0,k.R9)((()=>{S&&g((0,G.nr)((0,h.mr)(u,S)))}));d.useEffect((()=>{D()}),[S,D]);const[O,A]=(0,k.dX)();d.useEffect((()=>{A(!1)}),[y,A]);const T=(0,k.R9)((e=>{e&&!l[e]&&i[e].source!==U.b.USE_OPEN_DOCUMENT||async function(){if(E)return;let t;e!==m.Q.result&&e?(S&&P(null),t=await c.openComparisonDocument(e)):(S&&P(null),t=O?await c.openComparisonDocument(m.Q.result):await Y(o,i,c),A(!0));const n=i[m.Q.documentA].pageIndex||0,r=new V.Z($({pageSize:new C.$u(t.pages[n])},t.pages[n]));w()&&P(r)}()})),I=d.useRef(null);d.useEffect((()=>{I.current!==n&&S&&P(null),I.current=n}),[n,S]),d.useEffect((()=>{S||E||T(n)}),[S,n,T,E,l]);const F=6===o.length||y;d.useEffect((()=>{F&&!y&&T(null)}),[T,F,y]),d.useEffect((()=>{!async function(){try{await a.start.promise,w()&&(0,p.unstable_batchedUpdates)((()=>{x(!0),P(null)}))}catch(e){a.start.reject(e)}}()}),[a,w]),d.useEffect((()=>{E&&async function(){try{await c.cleanupDocumentComparison(),a.end.resolve()}catch(e){a.end.reject(e)}}()}),[E,c,a]);const M=d.useCallback((async e=>{e&&(await c.setComparisonDocument(n,e),w()&&s($($({},l),{},{[n]:e})))}),[n,l,s,c,w]);return S?d.createElement(L,{backend:e.backend,renderPageCallback:e.renderPageCallback,allowedTileScales:e.allowedTileScales,viewportState:u,scrollElement:e.scrollElement,styles:t,dispatch:e.dispatch,viewportWidth:e.viewportWidth,currentDocumentKey:n,addReferencePoint:r,referencePoints:o,page:S,isAutoCompare:y,interactionMode:f,renderPagePreview:b}):F||l[n]||i[n].source!==U.b.USE_FILE_DIALOG?d.createElement("div",{className:t.documentComparisonPageLoading},Z||(Z=d.createElement(v.Z,{scale:2}))):d.createElement(K,{addSource:M})},Y=async(e,t,n)=>{var o,r,i,a,s,l;let c;c=e&&e.length?[[[e[3].x,e[3].y],[e[0].x,e[0].y]],[[e[4].x,e[4].y],[e[1].x,e[1].y]],[[e[5].x,e[5].y],[e[2].x,e[2].y]]]:h.h6;return await n.documentCompareAndOpen({documentA:{pageIndex:t.documentA.pageIndex||0,strokeColor:null!==(o=t.strokeColors)&&void 0!==o&&o.documentA?(0,W.C)(null===(r=t.strokeColors)||void 0===r?void 0:r.documentA):(0,W.C)(null===(i=q.se.strokeColors)||void 0===i?void 0:i.documentA)},documentB:{pageIndex:t.documentB.pageIndex||0,strokeColor:null!==(a=t.strokeColors)&&void 0!==a&&a.documentB?(0,W.C)(null===(s=t.strokeColors)||void 0===s?void 0:s.documentB):(0,W.C)(null===(l=q.se.strokeColors)||void 0===l?void 0:l.documentB)},options:{type:"path",points:c,blendMode:t.blendMode||"darken"}})},J=e=>{const{onHide:t,styles:o}=e,{formatMessage:r}=(0,f.YB)();return d.createElement("div",{className:o.container},d.createElement("div",{className:o.wrapper},d.createElement(D.Z,{src:n(96462),className:o.icon}),d.createElement("div",{className:o.header},r(Q.UserHint_title)),d.createElement("div",{className:o.hint},r(Q.UserHint_description)),d.createElement("div",{className:o.hideButton},d.createElement(z.zx,{onClick:t},r(Q.UserHint_dismissMessage)))))},Q=(0,f.vU)({UserHint_title:{id:"UserHint_Select",defaultMessage:"Selecting Points",description:"User hint Title. User should select points to compare documents."},UserHint_description:{id:"UserHint_description",defaultMessage:"Select 3 points on both documents for manual alignment. For best results, choose points near corners of the document, and make sure to choose the points in the same order on both documents.",description:"Main body of the user hint. Explains what to do to compare documents"},UserHint_dismissMessage:{id:"UserHint_dismissMessage",defaultMessage:"Dismiss Message",description:"Dismiss user hint message"}}),ee=(0,F.b1)(),te=e=>e.length<3?m.Q.documentA:e.length<6?m.Q.documentB:m.Q.result,ne=e=>{const{interactionMode:t,initialDocumentSources:n,settings:o,backend:r}=e,{styles:i}=e.CSS_HACK,a=(0,k.tm)(),[s,l]=(0,k.nG)(),[c,u]=(0,k.jw)(),[f]=(0,k.$)(),[g,v]=d.useState(!0),y=(0,h.SH)(c),b=(0,k.R9)((e=>{e!==y&&u(e||m.Q.result)})),w=d.useCallback((e=>{const t=[...s,e];(0,p.unstable_batchedUpdates)((()=>{l(t),b(te(t))}))}),[s,b,l]),[S,P]=d.useState(null);return d.useEffect((()=>{!async function(){const[e,t]=await Promise.all([n[m.Q.documentA],n[m.Q.documentB]]);(e&&e.byteLength>0||o[m.Q.documentA].source===U.b.USE_OPEN_DOCUMENT)&&await r.setComparisonDocument(m.Q.documentA,e),(t&&t.byteLength>0||o[m.Q.documentB].source===U.b.USE_OPEN_DOCUMENT)&&await r.setComparisonDocument(m.Q.documentB,t),a()&&P({[m.Q.documentA]:e,[m.Q.documentB]:t,[m.Q.result]:{source:null}})}()}),[n,r,o,a]),d.createElement("div",{className:i.docComparison},S?d.createElement(X,{backend:r,renderPageCallback:e.renderPageCallback,allowedTileScales:e.allowedTileScales,viewportState:e.viewportState,interactionMode:t,scrollElement:e.scrollElement,styles:i,dispatch:e.dispatch,settings:o,completionConfiguration:e.completionConfiguration,documentSources:S,setDocumentSources:P,viewportWidth:e.viewportWidth,currentDocumentKey:y,addReferencePoint:w,referencePoints:s,isAutoCompare:f,renderPagePreview:e.renderPagePreview}):null,!ee&&!(6===s.length)&&!f&&g&&d.createElement(J,{styles:i.userHintStyles,onHide:()=>v(!1)}))},oe=(0,f.vU)({Comparison_documentOld:{id:"Comparison_documentOld",defaultMessage:"Old Document",description:"One of the documents to be compared."},Comparison_documentOldTouch:{id:"Comparison_documentOldTouch",defaultMessage:"Old",description:"The original document used in the comparison."},Comparison_documentNew:{id:"Comparison_documentNew",defaultMessage:"New Document",description:"The new document used in the comparison."},Comparison_documentNewTouch:{id:"Comparison_documentNewTouch",defaultMessage:"New",description:"The new document used in the comparison."},Comparison_result:{id:"Comparison_result",defaultMessage:"Comparison",description:"The compared document."},Comparison_resetButton:{id:"Comparison_resetButton",defaultMessage:"Reset",description:"Reset all placed alignment points."},Comparison_alignButton:{id:"Comparison_alignButton",defaultMessage:"Align Documents",description:"Start the manual document alignment process."},Comparison_alignButtonTouch:{id:"Comparison_alignButtonTouch",defaultMessage:"Align",description:"Start the manual document alignment process."},Comparison_selectPoint:{id:"Comparison_selectPoint",defaultMessage:"Select Point",description:"Select alignment point."}})},2270:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>P,se:()=>y});var o=n(84121),r=n(67294),i=n(73264),a=n(83634),s=n(9946),l=n(51559),c=n(55024),u=n(79973),d=n.n(u),p=n(94287),f=n.n(p);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const g={styles:m(m({},d()),{},{userHintStyles:f()})},v=r.lazy((()=>Promise.resolve().then(n.bind(n,99728)))),y={documentA:{source:s.b.USE_OPEN_DOCUMENT,pageIndex:0},documentB:{source:s.b.USE_FILE_DIALOG,pageIndex:0},strokeColors:{documentA:new a.Z({r:245,g:40,b:27}),documentB:new a.Z({r:49,g:193,b:255})},blendMode:"darken",autoCompare:!1},b=r.createElement("div",{className:d().documentComparisonPageLoading,"data-testid":"documentComparisonFallback"},r.createElement(i.Z,{scale:2})),w=(e,t)=>({documentA:m(m({},y.documentA),{},{pageIndex:(null==e?void 0:e.documentA.source)===s.b.USE_OPEN_DOCUMENT?t:0},null==e?void 0:e.documentA),documentB:m(m({},y.documentB),{},{pageIndex:(null==e?void 0:e.documentB.source)===s.b.USE_OPEN_DOCUMENT?t:0},null==e?void 0:e.documentB),strokeColors:m(m({},y.strokeColors),null==e?void 0:e.strokeColors),blendMode:(null==e?void 0:e.blendMode)||y.blendMode,autoCompare:e.autoCompare}),S=e=>e!==s.b.USE_OPEN_DOCUMENT&&e!==s.b.USE_FILE_DIALOG?(0,l.rh)(e):null,P=e=>{const{backend:t,viewportState:n,interactionMode:o=null,configuration:i}=e,a=r.useMemo((()=>w(i,n.currentPageIndex)),[i,n.currentPageIndex]);r.useEffect((()=>{let e;a[c.Q.documentA].source===s.b.USE_OPEN_DOCUMENT?e=c.Q.documentA:a[c.Q.documentB].source===s.b.USE_OPEN_DOCUMENT&&(e=c.Q.documentB),t.persistOpenDocument(e)}),[t,a]);const l=r.useRef({[c.Q.documentA]:S(a.documentA.source),[c.Q.documentB]:S(a.documentB.source)});return r.createElement(r.Suspense,{fallback:b},r.createElement(v,{backend:e.backend,interactionMode:o,renderPageCallback:e.renderPageCallback,allowedTileScales:e.allowedTileScales,viewportState:n,scrollElement:e.scrollElement,CSS_HACK:g,viewportWidth:e.viewportWidth,dispatch:e.dispatch,settings:a,completionConfiguration:i.completion,initialDocumentSources:l.current,renderPagePreview:e.renderPagePreview}))}},84537:(e,t,n)=>{"use strict";n.d(t,{n:()=>l});var o=n(22122),r=n(67294),i=n(25915),a=n(72673),s=n.n(a);function l(e){return r.createElement(i.bK,(0,o.Z)({},e,{styles:{label:s().label,input:s().input}}))}},28910:(e,t,n)=>{"use strict";n.d(t,{U:()=>l});var o=n(67294),r=n(25915),i=n(13540),a=n(99580),s=n.n(a);function l(e){let{title:t,children:a}=e;const[l,c]=o.useState(!1),u=(0,o.useCallback)((()=>c((e=>!e))),[]);return o.createElement(o.Fragment,null,o.createElement(r.w6,{expanded:l,onPress:u,className:s().wrapper},o.createElement("div",{className:s().controlContent},o.createElement(i.Z,{src:n(35982)(`./caret-${l?"down":"right"}.svg`),className:s().icon}),o.createElement("span",null,t))),o.createElement(r.F0,{expanded:l},o.createElement("div",{className:s().content},a)))}},40853:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>F,ck:()=>T,zx:()=>A});var o=n(84121),r=n(22122),i=n(67294),a=n(76154),s=n(94184),l=n.n(s),c=n(18390),u=n(35129),d=n(28910),p=n(13540),f=n(66003),h=n(2726),m=n(84537),g=n(5462),v=n(45395),y=n(13448),b=n(95651),w=n(22458),S=n.n(w),P=n(9437),E=n.n(P),x=n(93628),D=n.n(x);function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e){return I[e]||u.Z[e]}const A=(e,t,n)=>o=>{let{btnComponentProps:a,selectedItem:s}=o;return i.createElement(c.Z,(0,r.Z)({is:"div"},a,{className:l()("PSPDFKit-Input-Dropdown-Button",D().selectBox,S().selectBox,{[D().measurementDropdownText]:"measurement"===t}),style:{minWidth:"measurement"===t?"60px":"100px",columnGap:"measurement"===t?"8px":"",width:n?`${n}px`:""}}),i.createElement("span",null,null!=s&&s.label?O(s.label)?e(O(s.label)):s.label:null),i.createElement("div",null,(0,y.Z)({type:"caret-down",style:{width:12,height:12,flexBasis:12},className:l()(D().dropdownIcon)})))},T=(e,t)=>n=>{let{item:o,state:a,itemComponentProps:s,ref:u}=n;return i.createElement(c.Z,(0,r.Z)({is:"div",className:l()(D().item,{[D().isSelected]:(null==a?void 0:a.includes("selected"))||(null==a?void 0:a.includes("focused")),[D().measurementDropdownText]:"measurement"===t}),name:null==o?void 0:o.value},s,{ref:u}),i.createElement("span",null,null!=o&&o.label?O(o.label)?e(O(o.label)):o.label:null))};const I=(0,a.vU)({borderColor:{id:"borderColor",defaultMessage:"Border Color",description:"Form designer popover style section border color label"},borderWidth:{id:"borderWidth",defaultMessage:"Border Width",description:"Form designer popover style section border width label"},borderStyle:{id:"borderStyle",defaultMessage:"Border Style",description:"Form designer popover style section border style label"},print:{id:"print",defaultMessage:"Print",description:"Form designer popover style section print label"},solid:{id:"solid",defaultMessage:"Solid",description:"Form designer popover style section solid border label"},dashed:{id:"dashed",defaultMessage:"Dashed",description:"Form designer popover style section dashed border label"},beveled:{id:"beveled",defaultMessage:"Beveled",description:"Form designer popover style section beveled border label"},inset:{id:"inset",defaultMessage:"Inset",description:"Form designer popover style section inset border label"},underline:{id:"underline",defaultMessage:"Underline",description:"Form designer popover style section unredline border label"}}),F=function(e){var t;let{annotation:o,updateAnnotation:r,intl:a,frameWindow:s,label:l,pageSize:c}=e;const y=i.useCallback((e=>a.formatMessage(u.Z.numberInPt,{arg0:e.toFixed(0)})),[a]),w=i.useCallback((e=>`${Math.round(e)}%`),[]),P=i.useCallback((e=>r({borderWidth:e})),[r]),x=i.useCallback((e=>{if(!c)return;const t=Number(e);if(90!==Math.abs(t-o.rotation)&&270!==Math.abs(t-o.rotation))r({rotation:t});else{const e=(0,b.eJ)(o,c),n=e.set("rotation",t);r({rotation:n.rotation,boundingBox:e.boundingBox})}}),[c,r,o]),D=i.useMemo((()=>[{label:"none",value:"none"},...Object.keys(v.N).map((e=>({label:e,value:e})))]),[]),C=null!==(t=D.find((e=>{var t;return(null!==(t=o.borderStyle)&&void 0!==t?t:"none")===e.value})))&&void 0!==t?t:null,F=[{label:"0°",value:"0"},{label:"90°",value:"90"},{label:"180°",value:"180"},{label:"270°",value:"270"}];let M=o.rotation?F.find((e=>{let{value:t}=e;return Number(t)===o.rotation})):F[0];void 0===M&&(M=F[0]);const _=i.useCallback(A(a.formatMessage),[a.formatMessage]),N=i.useCallback(T(a.formatMessage),[a.formatMessage]);return i.createElement(d.U,{title:l},i.createElement("div",{className:S().item},i.createElement(p.Z,{src:n(59601),className:S().itemIcon,role:"presentation"}),i.createElement("div",{className:S().itemLabel},a.formatMessage(u.Z.fillColor)),i.createElement(f.Z,{record:o,onChange:r,styles:k(k({},E()),{},{colorSvg:S().colorSvg,colorItem:S().colorItem,controlWrapper:k(k({},E().controlWrapper),{},{width:"auto"})}),accessibilityLabel:a.formatMessage(u.Z.fillColor),caretDirection:"down",colorProperty:"backgroundColor",frameWindow:s,className:S().colorDropdown})),i.createElement("div",{className:S().item},i.createElement(p.Z,{src:n(35147),className:S().itemIcon,role:"presentation"}),i.createElement("div",{className:S().itemLabel},a.formatMessage(I.borderColor)),i.createElement(f.Z,{record:o,onChange:r,styles:k(k({},E()),{},{colorSvg:S().colorSvg,colorItem:S().colorItem,controlWrapper:k(k({},E().controlWrapper),{},{width:"auto"})}),accessibilityLabel:a.formatMessage(I.borderColor),caretDirection:"down",colorProperty:"borderColor",frameWindow:s,className:S().colorDropdown})),i.createElement("div",{className:S().item},i.createElement(p.Z,{src:n(81913),className:S().itemIcon,role:"presentation"}),i.createElement("div",{className:S().itemLabel},a.formatMessage(I.borderStyle)),i.createElement("div",{className:S().nativeDropdown},i.createElement("select",{"aria-label":a.formatMessage(I.borderStyle),className:"PSPDFKit-Input-Dropdown-Select",value:o.borderStyle||"",onChange:e=>{e.target.value!==D[0].value?void 0!==e.target.value&&r({borderStyle:e.target.value}):r({borderStyle:null})}},D.map((e=>i.createElement("option",{key:e.value,value:e.value,disabled:e.disabled},e.label?a.formatMessage(O(e.label)):""))))),i.createElement(g.Z,{items:D,value:C,accessibilityLabel:a.formatMessage(I.borderStyle),discreteDropdown:!1,isActive:!1,caretDirection:"down",className:S().dropdownGroupComponent,menuClassName:S().dropdownGroupMenu,ButtonComponent:_,ItemComponent:N,onSelect:(e,t)=>{t.value!==D[0].value?void 0!==t.value&&r({borderStyle:t.value}):r({borderStyle:null})},frameWindow:s})),i.createElement("div",{className:S().item},i.createElement(p.Z,{src:n(62846),className:S().itemIcon,role:"presentation"}),i.createElement("div",{className:S().itemLabel},a.formatMessage(I.borderWidth)),i.createElement(h.Z,{onChange:P,value:o.borderWidth||0,name:"borderWidth",caretDirection:"down",min:0,max:40,valueLabel:y,className:S().sliderDropdown,accessibilityLabel:a.formatMessage(I.borderWidth)})),i.createElement("div",{className:S().item},i.createElement(p.Z,{src:n(53491),className:S().itemIcon,role:"presentation"}),i.createElement("div",{className:S().itemLabel},a.formatMessage(u.Z.opacity)),i.createElement(h.Z,{onChange:e=>r({opacity:e/100}),value:100*o.opacity,name:"opacity",caretDirection:"down",valueLabel:w,className:S().sliderDropdown,accessibilityLabel:a.formatMessage(u.Z.opacity)})),i.createElement("div",{className:S().item},i.createElement(p.Z,{src:n(55426),className:S().itemIcon,role:"presentation"}),i.createElement("div",{className:S().itemLabel},a.formatMessage(u.Z.rotation)),i.createElement("div",{className:S().nativeDropdown},i.createElement("select",{"aria-label":a.formatMessage(u.Z.rotation),className:"PSPDFKit-Input-Dropdown-Select",value:o.rotation||0,onChange:e=>{e.target.value&&x(e.target.value)}},F.map((e=>i.createElement("option",{key:e.value,value:e.value,disabled:e.disabled},e.label))))),i.createElement(g.Z,{items:F,value:M,accessibilityLabel:a.formatMessage(u.Z.rotation),discreteDropdown:!1,isActive:!1,caretDirection:"down",className:S().dropdownGroupComponent,menuClassName:S().dropdownGroupMenu,ButtonComponent:_,ItemComponent:N,onSelect:(e,t)=>{t.value&&x(t.value)},frameWindow:s})),i.createElement("div",{className:S().item},i.createElement(p.Z,{src:n(54629),className:S().itemIcon,role:"presentation"}),i.createElement("div",{className:S().itemLabel},a.formatMessage(I.print)),i.createElement(m.n,{value:!o.noPrint,onUpdate:e=>r({noPrint:!e}),accessibilityLabel:a.formatMessage(I.print)})))}},98785:(e,t,n)=>{"use strict";n.d(t,{X:()=>f,Z:()=>h});var o=n(67294),r=n(35369),i=n(55961),a=n(87515),s=n(88804),l=n(73815),c=n(95651),u=n(16126),d=n(10333),p=n.n(d);function f(e,t,n,o){const{width:r,height:i}=e,a=Math.min(n/r,n/i),s=Math.min(o/r,o/i),c=Math.ceil(r*s*(0,l.L)()),u=Math.ceil(i*s*(0,l.L)()),d=Math.floor(r*a),p=Math.floor(i*a);let f=d,h=p;90!==t&&270!==t||(f=p,h=d);let m=0,g=0;return 90===t?m=f:180===t?(m=f,g=h):270===t&&(g=h),{ratio:a,tileRatio:s,tileWidth:c,tileHeight:u,containerWidth:d,containerHeight:p,rotatedWidth:f,rotatedHeight:h,translationX:m,translationY:g}}const h=(0,i.x)((function(e,t){const{page:n}=t,{backend:o,annotations:i,attachments:a,formFields:s,showAnnotations:l,renderPageCallback:d}=e,p=l?(0,c.xp)(i,n):void 0,f=l?(0,u.ET)(s,n):void 0,h=l&&f?(0,u.Qg)(f.reduce(((e,t)=>e.set(t.name,t)),(0,r.D5)())):void 0;return{annotations:p,formFields:f,formFieldValues:h,attachments:l?a:void 0,backend:o,renderPageCallback:d,digitalSignatures:e.digitalSignatures}}))((function(e){const{page:{pageSize:t,pageIndex:n,pageKey:r},size:i,maxSize:c,backend:u,annotations:d,attachments:h,formFields:m,formFieldValues:g,renderPageCallback:v,digitalSignatures:y,pageRef:b}=e,w=e.rotation||0,{ratio:S,tileRatio:P,tileWidth:E,tileHeight:x,rotatedWidth:D,rotatedHeight:C,translationX:k,translationY:O}=f(t,w,i,c),A=o.useMemo((function(){return new s.$u({width:E,height:x})}),[x,E]),T=o.useMemo((function(){return new s.UL({width:E,height:x})}),[x,E]),I={width:D,height:C,transform:`\n translateX(${k}px)\n translateY(${O}px)\n rotate(${w}deg)\n scale(${S/P/(0,l.L)()})\n `,transformOrigin:"top left"};return o.createElement("div",{style:I,ref:b},o.createElement("div",{className:p().tilePlaceholder,style:{width:E,height:x}}),o.createElement(a.Z,{backend:u,pageIndex:n,originalPageSize:t,scaledPageSize:A,rect:T,annotations:d,attachments:h,formFields:m,formFieldValues:g,renderPageCallback:v,digitalSignatures:y,pageKey:r}))}))},34855:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var o=n(22122),r=n(84121),i=n(67294),a=n(73935),s=n(7844),l=n(66687),c=n(45719),u=n.n(c);class d extends i.Component{constructor(){super(...arguments),(0,r.Z)(this,"shouldComponentUpdate",s.O),(0,r.Z)(this,"_lastOrientationChange",0),(0,r.Z)(this,"_handleResize",(()=>{const e=this._element&&this._element.getBoundingClientRect();if(!e)return;const t=Date.now()-this._lastOrientationChange<1e3;(0,a.unstable_batchedUpdates)((()=>{this.props.onResize(l.UL.fromClientRect(e),t)}))})),(0,r.Z)(this,"_handleOrientationChange",(()=>{this._lastOrientationChange=Date.now()})),(0,r.Z)(this,"_handleRef",(e=>{this._element=e}))}componentDidMount(){const e=this._getIFrameWindow();null==e||e.addEventListener("resize",this._handleResize),null==e||e.addEventListener("orientationchange",this._handleOrientationChange),this._handleResize()}componentWillUnmount(){const e=this._getIFrameWindow();null==e||e.removeEventListener("resize",this._handleResize),null==e||e.removeEventListener("orientationchange",this._handleOrientationChange)}_getIFrameWindow(){var e;return null===(e=this._element)||void 0===e?void 0:e.contentWindow}render(){return i.createElement("iframe",(0,o.Z)({ref:this._handleRef,className:u().root},{inert:""},{"aria-hidden":!0,tabIndex:"-1"}))}}},13448:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var o=n(67294),r=n(94184),i=n.n(r),a=n(13540),s=n(25393),l=n.n(s),c=n(30360);function u(e){const{icon:t,type:r,style:s=null}=e,u=i()(l().root,e.className,"PSPDFKit-Icon","PSPDFKit-Icon-"+(0,c.in)(r));if(t)return/<svg/i.test(t)?o.createElement(a.Z,{src:t,className:u,role:"presentation",style:s||void 0}):o.createElement("img",{src:t,role:"presentation",className:u,style:s||void 0});if("custom"===r)return null;let d;try{d=n(89457)(`./${r}.svg`)}catch(e){}return d?o.createElement(a.Z,{src:d,className:u,"aria-hidden":"true",style:s||void 0}):null}},66003:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var o=n(84121),r=n(67294),i=n(66687),a=n(97528),s=n(18146),l=n(95651),c=n(32801),u=n(35129);const d=[i.Xs,i.gd,i.Zc,s.Z,i.FV,i.o9,i.om,i.Hi,i.b3,i.x_];class p extends r.PureComponent{static getDerivedStateFromProps(e){if(e.annotationToolbarColorPresets){const t=e.annotationToolbarColorPresets({propertyName:(()=>{for(const[t,n]of l.fc.entries())if(n===e.colorProperty)return t})(),defaultAnnotationToolbarColorPresets:a.Options.COLOR_PRESETS});if(void 0!==t)return!1===t.showColorPicker?{hasColorPicker:t.showColorPicker,colors:t.presets,isUsingCustomConfig:!0}:{colors:t.presets,hasColorPicker:!0,isUsingCustomConfig:!0}}return e.colors?{colors:e.colors}:{colors:a.Options.COLOR_PRESETS}}constructor(e){super(e),(0,o.Z)(this,"state",{colors:a.Options.COLOR_PRESETS,colorPresets:(0,l.sH)(this.props.colorProperty),creatingColor:void 0,hasColorPicker:!0,isDeleteButtonVisible:void 0,isUsingCustomConfig:!1}),(0,o.Z)(this,"defaultBorderColor","#404040"),(0,o.Z)(this,"_autoFocused",!1),(0,o.Z)(this,"_onChange",(e=>{this.props.onChange({[this.props.colorProperty]:e?e.color:null})})),(0,o.Z)(this,"showCustomPickerForAnnotation",(e=>d.some((t=>e instanceof t)))),(0,o.Z)(this,"_setStoredColors",(e=>localStorage.setItem(`persistedColors${this.props.colorProperty}`,JSON.stringify(e))))}render(){var e;const{record:t}=this.props,n=this.state.hasColorPicker&&(!(t instanceof i.q6)||this.showCustomPickerForAnnotation(t)),o=this.props.record[this.props.colorProperty],a=null!==(e=this.state.colors.find((e=>!(null!=e.color&&!e.color.transparent||null!=o)||null!=e.color&&null!=o&&e.color.equals(o))))&&void 0!==e?e:{color:o,localization:u.Z.color};return r.createElement(c.Z,{colors:this.state.colors,value:a,customColorPresets:this.state.colorPresets,setCustomColorPresets:e=>e?this.setState({colorPresets:e}):null,onChange:this._onChange,className:this.props.className,caretDirection:this.props.caretDirection,removeTransparent:this.props.removeTransparent,opacity:this.props.record.opacity,accessibilityLabel:this.props.accessibilityLabel,keepOpacity:this.props.keepOpacity,frameWindow:this.props.frameWindow,innerRef:this.props.innerRef,lastToolbarActionUsedKeyboard:this.props.lastToolbarActionUsedKeyboard,styles:this.props.styles,setStoredColors:this._setStoredColors,shouldShowCustomColorPicker:n,unavailableItemFallback:{type:"swatch"},isUsingCustomConfig:this.state.isUsingCustomConfig})}}(0,o.Z)(p,"defaultProps",{className:"",removeTransparent:!1,lastToolbarActionUsedKeyboard:!1})},32801:(e,t,n)=>{"use strict";n.d(t,{Z:()=>X});var o=n(22122),r=n(18390),i=n(67294),a=n(21614),s=n(47347),l=n(25915),c=n(94184),u=n.n(c),d=n(76154),p=n(44364),f=n.n(p),h=n(97528),m=n(66687),g=n(62967),v=n.n(g),y=n(93628),b=n.n(y),w=n(27435),S=n.n(w),P=n(38006),E=n.n(P),x=n(35129),D=n(5462),C=n(23093),k=n.n(C),O=n(36095),A=n(4054),T=n(13448),I=n(13540),F=n(775),M=n(47650),_=n.n(M);const N=i.memo((function(e){const{onCreateNewColor:t,onChange:n,disabled:o,isChoosingColor:r}=e,[a,s]=i.useState("#000000"),l={opacity:o?"40%":"100%",backgroundImage:r?"none":_().nativeColorInput.backgroundImage,backgroundColor:r?a:null,border:r?"1px solid var(--PSPDFKit-ColorDropdownPickerComponent-item-circle-border-stroke)":"none",width:r?"18px":"22px",height:r?"18px":"22px"};return i.createElement("label",{htmlFor:"input-color"},i.createElement("div",{className:_().nativeColorInputWrapper},i.createElement(F.DebounceInput,{className:u()(_().nativeColorInput,"PSPDFKit-Custom-Color-Input"),style:l,type:"color",id:"input-color",debounceTimeout:200,value:a,onChange:e=>{const t=e.target.value;t&&(s(t),n(m.Il.fromHex(t)))},onBlur:e=>{const n=e.target.value;n&&t(m.Il.fromHex(n))},disabled:o})))}));var R,L,B,j,z;const K=e=>{var t,n;const o=null!==(t=e.colors)&&void 0!==t?t:h.Options.COLOR_PRESETS,{formatMessage:r}=(0,d.YB)(),{removeTransparent:s=!1,customColorPresets:l=[],setCustomColorPresets:c,setStoredColors:p,lastToolbarActionUsedKeyboard:f=!1,opacity:g=1,innerRef:v,value:y,caretDirection:b,keepOpacity:w,frameWindow:S,accessibilityLabel:P,onChange:E,unavailableItemFallback:x={type:"label"},disabled:C=!1,styles:k,shouldShowCustomColorPicker:A=!1,isUsingCustomConfig:T=!1,menuClassName:I}=e,[F,M]=i.useState(),[_,R]=i.useState(),L=i.useRef(!1),B=i.useCallback((e=>{const t=[...o,...l].find((t=>{var n,o,r,i;return null!==(n=null!=t.color&&null!=(null==e||null===(o=e.value)||void 0===o?void 0:o.color)&&(null===(r=e.value.color)||void 0===r?void 0:r.equals(t.color)))&&void 0!==n?n:null==(null==e||null===(i=e.value)||void 0===i?void 0:i.color)&&null==t.color})),n=[...o,...l].find((e=>t?V(e)===V(t):null));E(null!=n?n:null)}),[o,l,E]),j=i.useCallback((e=>{var t;const n={color:e,localization:{id:`custom-${(0,a.v4)()}`,defaultMessage:"Custom",description:"Custom color"}},o=[...l,n];null==p||p(o),c&&(c(o),M(void 0)),null!=y&&null!==(t=y.color)&&void 0!==t&&t.equals(e)||E(n)}),[l,c,p,E,y]),z=i.useCallback((e=>{var t;const n=l.filter((t=>t.localization.id!==e.localization.id));null==p||p(n),c&&(c(n),M(void 0)),e.color&&null!=y&&null!==(t=y.color)&&void 0!==t&&t.equals(e.color)&&E(o[0])}),[l,E,c,p,o,y]),K=i.useCallback((e=>{M(e);const t={color:e,localization:{id:`custom-${(0,a.v4)()}`,defaultMessage:"Custom",description:"Custom color"}};E(t)}),[E]),U=[...o,...l].filter((e=>!(s&&(null===e.color||e.color.transparent)))).map((e=>({label:e.localization.id,value:e,disabled:!1}))),G=H({caretDirection:b,colors:o,customColorPresets:l,colorItems:U,disabled:C,innerRef:v,keepOpacity:w,lastToolbarActionUsedKeyboard:f,opacity:g,unavailableItemFallback:x,styles:k,value:y,formatMessage:r,autoFocused:L}),W=$({colors:o,customColorPresets:l,isDeleteButtonVisible:_,setIsDeleteButtonVisible:R,formatMessage:r,handleChange:B,handleDeleteColor:z,keepOpacity:w,opacity:g,styles:k});return i.createElement("div",{className:k.controlWrapper},i.createElement("div",{className:k.control},i.createElement(D.Z,{items:U,value:null!=y&&null!==(n=U.find((e=>V(e.value)===V(y))))&&void 0!==n?n:null,discreteDropdown:!1,isActive:!1,caretDirection:b,className:`${e.className} ${k.colorSelect}`,menuClassName:u()(k.dropdownMenu,k.colorPickerDropdownMenu,I),ButtonComponent:G,ItemComponent:W,onSelect:(0,O.b1)()?void 0:(e,t)=>{B(t)},frameWindow:S,accessibilityLabel:P,maxCols:6,itemWidth:30,appendAfter:A?{node:Z,index:T?o.length-1:o.length-(s?2:1)}:null},A&&i.createElement(N,{onCreateNewColor:j,onChange:K,disabled:l.length>=17,isChoosingColor:F instanceof m.Il}))))},Z=()=>i.createElement("label",{style:{width:"100%",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"5px"}},"Custom");function U(e){let{onClick:t}=e;return i.createElement(r.Z,{onClick:t,is:"button",className:u()(`PSPDFKit-AnnotationToolbar-Custom-Color-Delete-Button ${v().colorDeleteButton}`)},R||(R=i.createElement(I.Z,{src:k(),"aria-hidden":"true"})))}function V(e){return null!=e?null!=e.color?e.color.toCSSValue():"none":"N/A"}function G(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return{stroke:"var(--PSPDFKit-ColorDropdownPickerComponent-item-circle-border-stroke)",fill:e?e.toCSSValue():"none",strokeWidth:1,fillOpacity:t?n:1}}const W=()=>i.createElement(i.Fragment,null,i.createElement("defs",null,i.createElement("pattern",{id:"PSPDFKit-Color-Background-Chessboard",width:"0.5",height:"0.5",patternContentUnits:"objectBoundingBox"},i.createElement("rect",{x:"0",y:"0",width:"0.25",height:"0.25",style:{fill:"rgba(0,0,0,.2)"}}),i.createElement("rect",{x:"0.25",y:"0.25",width:"0.25",height:"0.25",style:{fill:"rgba(0,0,0,.2)"}}))),i.createElement("circle",{cx:"12",cy:"12",r:"10",style:{fill:"url(#PSPDFKit-Color-Background-Chessboard)"}})),q=()=>i.createElement("g",{transform:"translate(5 5)"},i.createElement("line",{x1:"2",x2:"12",y1:"12",y2:"2",style:{stroke:"#F00",strokeWidth:2},strokeLinecap:"round"})),H=e=>t=>{var n,r,a;let{btnComponentProps:s,selectedItem:c}=t,d=!1;if(null!=(null==c||null===(n=c.value)||void 0===n?void 0:n.color)){var p;const t=null===(p=c.value)||void 0===p?void 0:p.color;d=Boolean(!e.colorItems.some((e=>{var n;return null===(n=e.value)||void 0===n||null===(n=n.color)||void 0===n?void 0:n.equals(t)})))}else d=!e.colorItems.some((e=>{var t,n,o;return null==(null===(t=e.value)||void 0===t?void 0:t.color)&&null==(null==c||null===(n=c.value)||void 0===n?void 0:n.color)||(null===(o=e.value)||void 0===o||null===(o=o.color)||void 0===o?void 0:o.transparent)}));const f=[...e.colors,...e.customColorPresets].find((e=>{var t;return c?V(e)===V(c.value):null===(t=e.color)||void 0===t?void 0:t.transparent})),h=f?V(f):null,m=e.formatMessage(f?f.localization:{id:"transparent",defaultMessage:"Transparent",description:"Transparent"}),g=e.value,v=(!g||!f||"transparent"===f.localization.id||!e.keepOpacity&&e.opacity<1)&&(L||(L=i.createElement(W,null)));return i.createElement("button",(0,o.Z)({},s,{className:u()("PSPDFKit-Input-Dropdown-Button","PSPDFKit-Input-Color-Dropdown",e.styles.colorSelectButton,{[S().isDisabled]:e.disabled,[e.styles.controlIsDisabled]:e.disabled}),ref:t=>{s.ref(t),"function"==typeof e.innerRef?e.innerRef(t):e.innerRef&&"object"==typeof e.innerRef&&"current"in e.innerRef&&(e.innerRef.current=t),e.innerRef&&t&&!e.autoFocused.current&&(t.focus(),e.autoFocused.current=!0,e.lastToolbarActionUsedKeyboard&&(t.classList.add(E().focusedFocusVisible),t.addEventListener("blur",A.Cz)))},name:"clickableBox",disabled:e.disabled}),d&&"label"===e.unavailableItemFallback.type?i.createElement("span",null,null!==(r=e.unavailableItemFallback.label)&&void 0!==r?r:"N/A"):i.createElement(i.Fragment,null,i.createElement(l.TX,{tag:"div"},m),i.createElement("svg",(0,o.Z)({viewBox:"0 0 24 24",className:e.styles.colorSvg,key:h},{title:m,value:h},{"aria-hidden":!0}),v,(f&&"transparent"===f.localization.id||!g)&&(B||(B=i.createElement(q,null))),i.createElement("circle",{cx:"12",cy:"12",r:"10",style:G(null!==(a=null==g?void 0:g.color)&&void 0!==a?a:null)}))),i.createElement("div",null,(0,T.Z)({type:`caret-${e.caretDirection}`,style:{width:12,height:12,flexBasis:12},className:u()(b().dropdownIcon)})))},$=e=>t=>{var n,a;let{item:c,state:d,itemComponentProps:p}=t;const h=[...e.colors,...e.customColorPresets].find((e=>{var t,n;return null!=e.color&&null!=(null==c||null===(t=c.value)||void 0===t?void 0:t.color)?e.color.equals(null==c?void 0:c.value.color):null==e.color&&null==(null==c||null===(n=c.value)||void 0===n?void 0:n.color)})),m=e.colors.some((e=>{var t,n;return null!=e.color&&null!=(null==c||null===(t=c.value)||void 0===t?void 0:t.color)?e.color.equals(c.value.color):null==e.color&&null==(null==c||null===(n=c.value)||void 0===n?void 0:n.color)}));(0,s.kG)(h,"Couldn't find matching color.");const g=V(h),y=m?e.formatMessage(h.localization):e.formatMessage(x.Z.newColor),w=e.customColorPresets.find((e=>{var t,n;return null!=e.color&&null!=(null==c||null===(t=c.value)||void 0===t?void 0:t.color)?e.color.equals(c.value.color):null==e.color&&null==(null==c||null===(n=c.value)||void 0===n?void 0:n.color)}));let P,E=0;const D=("transparent"===h.localization.id||!e.keepOpacity&&e.opacity<1)&&(j||(j=i.createElement(W,null)));return i.createElement("div",{"data-testid":"color-swatch",className:v().colorItemContainer},w&&(e.isDeleteButtonVisible===g||!(0,O.b1)())&&i.createElement(U,{onClick:()=>e.handleDeleteColor(w)}),i.createElement(r.Z,(0,o.Z)({is:"div",className:u()(f().root,S().root,{[b().isSelected]:(null==d?void 0:d.includes("selected"))||(null==d?void 0:d.includes("focused"))},b().item,e.styles.colorItem),name:null!==(n=null==c||null===(a=c.value)||void 0===a?void 0:a.localization.id)&&void 0!==n?n:""},p,{onPointerDown:(0,O.b1)()?()=>{E=Date.now(),P=setTimeout((()=>{e.setIsDeleteButtonVisible(g)}),300)}:void 0,onPointerUp:(0,O.b1)()?(t=>()=>{Date.now()-E<300&&(window.clearTimeout(P),e.setIsDeleteButtonVisible(void 0),e.handleChange(t))})(c):void 0}),i.createElement(l.TX,{tag:"div"},y),i.createElement("svg",(0,o.Z)({viewBox:"0 0 24 24",className:`PSPDFKit-Input-Dropdown-Item ${e.styles.colorSvg}`,key:g},{title:y,value:g},{"aria-hidden":"true"}),D,"transparent"===h.localization.id&&(z||(z=i.createElement(q,null))),i.createElement("circle",{cx:"12",cy:"12",r:"10",style:G(h.color,e.keepOpacity)}))))},X=i.memo(K)},2726:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var o=n(22122),r=n(84121),i=(n(47347),n(67294)),a=n(94184),s=n.n(a),l=n(25915),c=n(13540),u=n(7844),d=n(23215),p=n.n(d);let f=0;class h extends i.Component{constructor(){super(...arguments),(0,r.Z)(this,"inputRef",i.createRef()),(0,r.Z)(this,"shouldComponentUpdate",u.O),(0,r.Z)(this,"_guid",f++),(0,r.Z)(this,"triggerChange",(()=>{this.inputRef.current&&this.props.onChange(Number(this.inputRef.current.value))}))}render(){const{label:e,accessibilityLabel:t}=this.props;return i.createElement("div",{className:`PSPDFKit-Input-Slider ${this.props.className} ${p().root}`},this.props.label?i.createElement("label",{htmlFor:`${p().label}-${this._guid}`,className:p().label},this.props.label):this.props.accessibilityLabel?i.createElement(l.TX,{tag:"label",htmlFor:`${p().label}-${this._guid}`},this.props.accessibilityLabel):null,i.createElement("div",{className:p().input},i.createElement("input",{id:`${p().label}-${this._guid}`,type:"range",ref:this.inputRef,className:"PSPDFKit-Input-Slider-Input",min:this.props.min,max:this.props.max,step:this.props.step,value:this.props.value,onChange:this.triggerChange})),!this.props.hideLabel&&i.createElement("label",{className:`PSPDFKit-Input-Slider-Value ${p().value}`},this.props.valueLabel(this.props.value)))}}(0,r.Z)(h,"defaultProps",{min:0,max:100,step:1,valueLabel:e=>e.toString(),className:""});var m=n(19770),g=n.n(m);let v=0;class y extends i.Component{constructor(){super(...arguments),(0,r.Z)(this,"controlRef",i.createRef()),(0,r.Z)(this,"state",{isOpen:!1}),(0,r.Z)(this,"_guid",v++),(0,r.Z)(this,"_toggleItems",(()=>{this.state.isOpen?this._hideItems():this._showItems()})),(0,r.Z)(this,"_handleKeyDown",(e=>{"ArrowDown"!==e.key||this.state.isOpen||this._toggleItems()})),(0,r.Z)(this,"_handleBlur",(e=>{e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),setTimeout((()=>{const e=this.controlRef.current,t=e&&e.ownerDocument&&e.ownerDocument.activeElement;this.state.isOpen&&e&&!e.contains(t)&&this._hideItems()}),0)}))}_showItems(){this.setState({isOpen:!0})}_hideItems(){this.setState({isOpen:!1})}render(){const{label:e,accessibilityLabel:t,caretDirection:o}=this.props;const r=this.props.className?this.props.className:"",a=s()(g().root,this.state.isOpen&&g().show,r,"PSPDFKit-Input-Dropdown",this.state.isOpen&&"PSPDFKit-Input-Dropdown-open");return i.createElement("div",{style:this.props.style,className:a,onBlur:this._handleBlur,ref:this.controlRef,tabIndex:-1},i.createElement("button",{className:`PSPDFKit-Input-Dropdown-Button ${g().button}`,onClick:this._toggleItems,onKeyDown:this._handleKeyDown,"aria-labelledby":`${g().srLabel}-${this._guid} ${g().value}-${this._guid}`,style:{height:32},ref:this.props.innerRef,"aria-expanded":this.state.isOpen,"aria-controls":`${g().dropdownItems}-${this._guid}`,type:"button"},i.createElement("span",{className:`PSPDFKit-Input-Dropdown-FlexContainer ${g().flexContainer}`,"aria-hidden":"true"},i.createElement("span",{className:`PSPDFKit-Input-Slider-Value ${g().value}`,id:`${g().value}-${this._guid}`},this.props.valueLabel(this.props.value))),i.createElement(l.TX,{id:`${g().srLabel}-${this._guid}`},t||null),i.createElement(c.Z,{src:n("down"===o?58021:7359),className:g().toggle,"aria-hidden":"true"})),i.createElement("div",{className:s()("PSPDFKit-Input-Dropdown-Items",g().dropdownItems,g().dropdown,{[g().dropDownItemsUp]:"up"===this.props.caretDirection}),id:`${g().dropdownItems}-${this._guid}`},this.state.isOpen&&this._renderDropdownItems()))}_renderDropdownItems(){return i.createElement("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",width:"auto",padding:"5px 10px"}},i.createElement(h,(0,o.Z)({},this.props,{className:`${this.props.className} ${g().slider}`,hideLabel:!0})))}}(0,r.Z)(y,"defaultProps",{min:0,max:100,step:1,valueLabel:e=>e.toString(),className:""})},20500:(e,t,n)=>{"use strict";n.d(t,{B:()=>E});var o,r=n(22122),i=n(67294),a=n(67665),s=n(94184),l=n.n(s),c=n(27515),u=n(73815),d=n(36095),p=n(58479),f=n(13944),h=n(66687),m=n(72800),g=n(71693),v=n(89029),y=n.n(v);const b=d.G6&&(0,u.L)()>1,w=b?2:1,S=16/w;function P(e,t){const{zoomLevel:n}=e;return Math.round((0,g.e8)(e,(0,g.dF)(e,t))*n)}const E=e=>{const{pageRendererComponentProps:t,contentState:n,pageIndex:s,viewportState:g,onScroll:v,currentMainToolbarHeight:E,className:x,scrollElement:D,label:C,cursorPosition:k,isMobile:O}=e,[{x:A,y:T},I]=i.useState({x:0,y:0}),[{scrollTop:F,scrollLeft:M},_]=i.useState({scrollLeft:(null==D?void 0:D.scrollLeft)||0,scrollTop:((null==D?void 0:D.scrollTop)||0)-P(g,s)}),N=(0,p.R9)((e=>{k||I({x:e.clientX,y:e.clientY})})),R=(0,p.tm)(),L=(0,p.R9)((()=>{if(!D||!R())return;const e={scrollLeft:D.scrollLeft,scrollTop:D.scrollTop-P(g,s)};v?v((()=>_(e))):_(e)}));i.useEffect((()=>(null==D||D.addEventListener("scroll",L,!1),()=>{null==D||D.removeEventListener("scroll",L,!1)})),[L,D]);const B=O?136:174,j=g.scrollPosition.scale(g.zoomLevel).translate(g.scrollPosition.scale(-g.zoomLevel)),z=(0,c.G4)(g).translate(j.scale(-1)),K=(0,u.L)(),Z=Math.floor(K*(((null==k?void 0:k.x)||A)-z.left+M))/K,U=Math.floor(K*(((null==k?void 0:k.y)||T)-z.top-E+F))/K,V=Math.floor(B/2-Z),G=Math.floor(B/2-U),W=K/(w*S/K)+.5/w,q=w*S*.5*K,H=C||`${(g.zoomLevel*S*K/2).toFixed(1).replace(".0","")}x`;return i.createElement(f.Z,{onRootPointerMove:N},i.createElement(a.m,null,i.createElement("div",{className:l()(y().magnifierContainer,{[y().magnifierContainerMobile]:O},x)},i.createElement("div",{className:y().magnifier,style:{transformOrigin:`${Z}px ${U}px`,transform:`scale(${S*K/2}) translate(-${W}px, -${W}px)`,left:V,top:G}},i.createElement(m.Z,(0,r.Z)({},t,{contentState:n,viewportRect:new h.UL({left:Z,top:U,width:B,height:B}),forceDetailView:!0})),e.children),i.createElement("div",{className:y().magnifierGridContainer},i.createElement("svg",{width:B,height:B,viewBox:`0 0 ${B*K} ${B*K}`},i.createElement("defs",null,i.createElement("pattern",{id:"grid",x:O?-3*K:K>1?-.5*K:0,y:O?-3*K:K>1?-.5*K:0,width:q,height:q,patternUnits:"userSpaceOnUse"},i.createElement("polyline",{points:`${q-.5},0 ${q-.5},${q-.5} 0,${q-.5}`,className:y().magnifierGridStroke,strokeWidth:1,strokeLinejoin:"miter",strokeLinecap:"butt",shapeRendering:"crispEdges"}))),i.createElement("g",{transform:`translate(-${1+q/2},-${1+q/2})`},o||(o=i.createElement("rect",{fill:"url(#grid)",x:"0",y:"0",width:"100%",height:"100%",strokeLinejoin:"miter",strokeLinecap:"butt",shapeRendering:"crispEdges"})),i.createElement("rect",{x:Math.floor(B*K/2)+K*(b||d.vU&&K>1?0:.5),y:Math.floor(B*K/2)+(b?1:0),width:q,height:q,className:y().magnifierCenterStroke,strokeWidth:1,strokeLinejoin:"miter",strokeLinecap:"butt",shapeRendering:"crispEdges"}),i.createElement("rect",{x:Math.floor(B*K/2)-1,y:Math.floor(B*K/2)-1,width:q+3,height:q+3,className:y().magnifierCenterOutlineStroke,strokeWidth:2,strokeLinejoin:"miter",strokeLinecap:"butt",shapeRendering:"crispEdges"}))),i.createElement("div",{className:y().magnifierLabelBackground}),i.createElement("div",{className:y().magnifierLabelText},H)))))}},27001:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>$,qw:()=>J,sY:()=>X});var o,r,i,a,s=n(22122),l=n(67294),c=n(94184),u=n.n(c),d=n(76154),p=n(35369),f=n(25915),h=n(47347),m=n(67366),g=n(18390),v=n(20234),y=n(9599),b=n(20792),w=n(34573),S=n(44763),P=n(35129),E=n(51205),x=n(22458),D=n.n(x),C=n(56966),k=n(69939),O=n(13540),A=n(4132),T=n(30570),I=n(36095),F=n(5462),M=n(40853),_=n(3845),N=n(36489),R=n(23756),L=n.n(R),B=n(10754),j=n.n(B),z=n(80324),K=n.n(z),Z=n(93628),U=n.n(Z),V=n(79827),G=n(63738),W=n(2383),q=n(70190),H=n.n(q);const $=function(e){var t,o,r,i,a,s,c,g,x;let{referenceRect:I,viewportState:R,isHidden:B,annotation:z,frameWindow:Z,eventEmitter:U,setModalClosurePreventionError:q}=e;(0,h.kG)(z.measurementPrecision&&z.measurementScale);const{formatMessage:H}=(0,d.YB)(),$=(0,m.I0)(),Y=z.getMeasurementDetails().value,Q=(0,m.v9)((e=>e.backend)),ee=(0,m.v9)((e=>e.measurementScales)),te=(0,m.v9)((e=>e.activeMeasurementScale)),[ne,oe]=(0,l.useState)(!1),[re,ie]=(0,l.useState)(!1),ae=te&&!ne?te.precision:z.measurementPrecision,[se,le]=(0,l.useState)((0,p.l4)([])),[ce,ue]=(0,l.useState)(Y.toFixed(T._P[ae])),de=l.useMemo((()=>te&&!ne?{unitFrom:te.scale.unitFrom,unitTo:te.scale.unitTo,fromValue:te.scale.fromValue,toValue:te.scale.toValue}:z.measurementScale),[te,z.measurementScale,ne]),[pe,fe]=(0,l.useState)((0,y.sJ)({scale:de,precision:ae}).label),[he,me]=(0,l.useState)(null==de?void 0:de.fromValue.toString()),[ge,ve]=(0,l.useState)(null==de?void 0:de.toValue.toString()),[ye,be]=(0,l.useState)(!1),we=(0,l.useCallback)((e=>{const t=z.merge(e),n={annotations:(0,p.aV)([t]),reason:_.f.PROPERTY_CHANGE};U.emit("annotations.willChange",n),$((0,k.FG)(t)),oe(!0)}),[z,$,U]),Se=l.useCallback((e=>{const t=(0,T.P_)(z,e);we({measurementScale:t}),me(t.fromValue.toString()),ve(t.toValue.toString())}),[z,we]);(0,l.useEffect)((()=>{q({error:C.x.MEASUREMENT_ERROR,annotationId:z.id})}),[z.id]),(0,l.useEffect)((()=>{Se(parseFloat(ce||"1"))}),[ce,de]),(0,l.useEffect)((()=>{$((0,G.M4)(ae))}),[ae]),(0,l.useEffect)((()=>{re&&pe||(fe((0,y.sJ)({scale:de,precision:ae}).label),le(se.delete("scaleName")));const e=null==ee?void 0:ee.find((e=>{let{scale:t,precision:n}=e;return t.fromValue===Number(null==de?void 0:de.fromValue)&&t.toValue===Number(null==de?void 0:de.toValue)&&t.unitFrom===(null==de?void 0:de.unitFrom)&&t.unitTo===(null==de?void 0:de.unitTo)&&n===ae}));le(e?se.add("duplicate"):se.delete("duplicate"))}),[he,ge,ce,de,ae]);const Pe="startPoint"in z&&z.startPoint,Ee="endPoint"in z&&z.endPoint;(0,l.useEffect)((()=>{ue(z.getMeasurementDetails().value.toFixed(T._P[ae]))}),[Pe,Ee,ae]);const xe=l.useCallback((0,M.zx)(H,"measurement"),[H]),De=l.useCallback((0,M.ck)(H),[H]),Ce=l.useCallback((()=>{const e={name:pe,scale:{fromValue:parseFloat(he),toValue:parseFloat(ge),unitFrom:null==de?void 0:de.unitFrom,unitTo:null==de?void 0:de.unitTo},precision:ae};(0,m.dC)((()=>{$((0,S.C0)(e)),$((0,S.Se)(e))})),"SERVER"===(null==Q?void 0:Q.type)?(0,m.dC)((()=>{$((0,k.hQ)(z)),$((0,w.fz)()),$((0,G.UF)(b.A.MEASUREMENT)),$((0,S.Xh)(!1)),$((0,v.KY)(!0))})):be(!0)}),[be,$,he,ae,null==de?void 0:de.unitFrom,null==de?void 0:de.unitTo,pe,ge]),ke="in"===z.measurementScale.unitTo||"ft"===z.measurementScale.unitTo||"yd"===z.measurementScale.unitTo?T.nK:T.nK.filter((e=>!e.label.includes("/")));return ye?l.createElement(f.u_,{onEscape:()=>{(0,m.dC)((()=>{$((0,k.hQ)(z)),$((0,w.fz)()),$((0,G.UF)(b.A.MEASUREMENT)),$((0,S.Xh)(!1))}))},background:"var(--PSPDFKit-MeasurementModalComponent-background-color)",className:K().calibrationSuccessModal},l.createElement("div",{className:K().calibrationSuccessModalContainer},l.createElement("div",{className:K().calibrationSuccessRow},l.createElement(O.Z,{src:n(17076),className:D().itemIcon,role:"presentation"}),l.createElement("div",{onClick:()=>{(0,m.dC)((()=>{$((0,k.hQ)(z)),$((0,w.fz)()),$((0,G.UF)(b.A.MEASUREMENT)),$((0,S.Xh)(!1))}))}},l.createElement(O.Z,{src:n(58054),className:D().itemIcon,role:"presentation",style:{cursor:"pointer"}}))),l.createElement("div",{className:u()(K().calibrationSuccessRow,K().calibrationSuccessTitle)},l.createElement("p",null,H(X.calibrationScaleSuccess))),l.createElement("div",{className:K().calibrationSuccessRow},l.createElement("p",null,H(X.calibrationScaleSubtitle))))):B?null:l.createElement(E.Z,{referenceRect:I,viewportState:R,className:"PSPDFKit-Measurement-Popover",wrapperClassName:"PSPDFKit-Measurement-Editor",title:H(X.calibrateScale),footer:l.createElement("div",{className:u()(K().footer,K().contentRow,K().spaceBetweenRow)},l.createElement(f.hE,{className:"PSPDFKit-Confirm-Dialog-Buttons",align:"end"},l.createElement(f.zx,{autoFocus:!0,onClick:()=>{(0,m.dC)((()=>{$((0,S.Xh)(!1)),$((0,k.hQ)(z)),$((0,w.fz)()),$((0,G.UF)(b.A.MEASUREMENT))}))},className:u()("PSPDFKit-Confirm-Dialog-Button","PSPDFKit-Confirm-Dialog-Button-Cancel",K().button)},H(P.Z.delete)),l.createElement(f.zx,{onClick:()=>Ce(),primary:!0,disabled:se.size>0,className:u()("PSPDFKit-Confirm-Dialog-Button","PSPDFKit-Confirm-Dialog-Button-Confirm",K().button)},H(P.Z.done))))},l.createElement("div",{className:j().calibration},l.createElement("div",{className:j().calibrationTop},l.createElement(O.Z,{src:n(96810),className:D().itemIcon,role:"presentation"}),l.createElement("div",{className:D().itemLabel},H(X.measurementCalibrateLength)),l.createElement("div",{className:j().calibrateRight},l.createElement(f.oi,{type:"number",value:ce,onChange:e=>{if(ue(e.target.value),!function(e){const t=parseFloat(e);return!isNaN(t)&&isFinite(t)&&t>0}(e.target.value))return void le(se.add("calibrationValue"));le(se.delete("calibrationValue"));const t=parseFloat(e.target.value);Se(t)},required:!0,style:{height:32,width:90,borderColor:se.has("calibrationValue")?"#FF0000":void 0},className:u()(L().input,"PSPDFKit-Calibration-Input")}),l.createElement("div",{className:u()(D().nativeDropdown,j().nativeButton)},l.createElement("select",{"aria-label":H(X.calibrate),className:u()("PSPDFKit-Input-Dropdown-Select","PSPDFKit-Calibration-UnitTo"),value:null!==(t=null===(o=T.b5.find((e=>e.value===(null==de?void 0:de.unitTo))))||void 0===o?void 0:o.value)&&void 0!==t?t:null===(r=z.measurementScale)||void 0===r?void 0:r.unitTo,onChange:e=>{var t;we({measurementScale:null===(t=z.measurementScale)||void 0===t?void 0:t.set("unitTo",e.target.value)})}},Object.keys(V.K).map((e=>l.createElement("option",{key:e,value:V.K[e]},V.K[e]))))),l.createElement(F.Z,{items:T.b5,value:null!==(i=T.b5.find((e=>e.value===(null==de?void 0:de.unitTo))))&&void 0!==i?i:null,accessibilityLabel:H(X.calibrate),discreteDropdown:!1,isActive:!1,caretDirection:"down",className:u()(D().dropdownGroupComponent,"PSPDFKit-Calibration-UnitTo"),menuClassName:D().dropdownGroupMenu,ButtonComponent:xe,ItemComponent:De,onSelect:(e,t)=>{var n;we({measurementScale:null===(n=z.measurementScale)||void 0===n?void 0:n.set("unitTo",t.value)})},frameWindow:Z})))),l.createElement("span",{className:j().spacer}),l.createElement("div",{className:j().scale},l.createElement("div",{className:j().scaleTop},l.createElement(O.Z,{src:n(69695),className:D().itemIcon,role:"presentation"}),l.createElement("div",{className:D().itemLabel},H(X.measurementScale))),l.createElement("div",{style:{width:"100%"},className:j().itemHeader},l.createElement(f.oi,{type:"text",value:pe,onChange:e=>{e.target.value?le(se.delete("scaleName")):le(se.add("scaleName")),fe(e.target.value),re||ie(!0)},required:!0,style:{height:32,width:"100%",borderColor:se.has("scaleName")?"#FF0000":void 0},className:u()(L().input,"PSPDFKit-Calibration-Name")})),l.createElement("div",{className:j().scaleBottom},l.createElement("div",null,l.createElement(f.oi,{type:"number",value:he,required:!0,disabled:!0,style:{height:32,width:90,borderColor:se.has("fromValue")?"#FF0000":void 0,opacity:"var(--PSPDFKit-Button-isDisabled-opacity)"},className:u()(L().input,L().disabled)}),l.createElement("div",{className:u()(D().nativeDropdown,j().nativeButton)},l.createElement("select",{"aria-label":H(X.measurementScale),className:"PSPDFKit-Input-Dropdown-Select",value:(null===(a=z.measurementScale)||void 0===a?void 0:a.unitFrom)||"",disabled:!0},Object.keys(N.s).map((e=>l.createElement("option",{key:e,value:N.s[e]},N.s[e]))))),l.createElement(F.Z,{items:T.m_,value:null!==(s=T.m_.find((e=>e.value===(null==de?void 0:de.unitFrom))))&&void 0!==s?s:null,accessibilityLabel:H(X.measurementScale),discreteDropdown:!1,isActive:!1,caretDirection:"down",className:D().dropdownGroupComponent,menuClassName:D().dropdownGroupMenu,ButtonComponent:xe,ItemComponent:De,disabled:!0,frameWindow:Z})),":",l.createElement("div",null,l.createElement(f.oi,{type:"number",value:ge,required:!0,disabled:!0,style:{height:32,width:90,borderColor:se.has("toValue")?"#FF0000":void 0,opacity:"var(--PSPDFKit-Button-isDisabled-opacity)"},className:u()(L().input,L().disabled)}),l.createElement("div",{className:u()(D().nativeDropdown,j().nativeButton)},l.createElement("select",{"aria-label":H(X.measurementScale),className:"PSPDFKit-Input-Dropdown-Select",value:(null===(c=z.measurementScale)||void 0===c?void 0:c.unitTo)||"",disabled:!0},Object.keys(V.K).map((e=>l.createElement("option",{key:e,value:V.K[e]},V.K[e]))))),l.createElement(F.Z,{items:T.b5,value:null!==(g=T.b5.find((e=>e.value===(null==de?void 0:de.unitTo))))&&void 0!==g?g:null,accessibilityLabel:H(X.measurementScale),discreteDropdown:!1,isActive:!1,caretDirection:"down",className:D().dropdownGroupComponent,menuClassName:D().dropdownGroupMenu,ButtonComponent:xe,ItemComponent:De,disabled:!0,frameWindow:Z})))),l.createElement("span",{className:j().spacer}),l.createElement("div",{className:D().item},l.createElement("div",{className:u()(D().itemLabel,j().itemLabel)},H(X.measurementPrecision)),l.createElement("div",{className:u()(D().nativeDropdown,j().nativeButton)},l.createElement("select",{style:{height:30},"aria-label":H(X.measurementPrecision),className:u()("PSPDFKit-Input-Dropdown-Select","PSPDFKit-Calibration-Precision"),value:z.measurementPrecision||"",onChange:e=>{we({measurementPrecision:e.target.value})}},Object.keys(A.L).map(((e,t)=>l.createElement("option",{key:e,value:A.L[e]},T.W9[t]))))),l.createElement(F.Z,{items:ke,value:null!==(x=ke.find((e=>e.value===z.measurementPrecision)))&&void 0!==x?x:null,accessibilityLabel:H(X.measurementPrecision),discreteDropdown:!1,isActive:!1,caretDirection:"down",className:u()(D().dropdownGroupComponent,"PSPDFKit-Measurement-Popover-Precision-Dropdown","PSPDFKit-Calibration-Precision"),menuClassName:D().dropdownGroupMenu,ButtonComponent:xe,ItemComponent:J,onSelect:(e,t)=>{we({measurementPrecision:t.value}),ue(Y.toFixed(T._P[t.value]).toString())},frameWindow:Z})),se.has("duplicate")&&l.createElement("p",{className:K().scaleError},H(W.s.duplicateScaleError)))},X=(0,d.vU)({calibrationScaleSuccess:{id:"calibrationScaleSuccess",defaultMessage:"Scale has been successfully set",description:"Scale has been successfully set"},calibrationScaleSubtitle:{id:"calibrationScaleSubtitle",defaultMessage:"Start measuring by selecting one of the measurement tools.",description:"Start measuring by selecting one of the measurement tools."},perimeterMeasurementSettings:{id:"perimeterMeasurementSettings",defaultMessage:"Perimeter Measurement Settings",description:"Perimeter Measurement Settings"},polygonAreaMeasurementSettings:{id:"polygonAreaMeasurementSettings",defaultMessage:"Polygon Area Measurement Settings",description:"Polygon Area Measurement Settings"},rectangularAreaMeasurementSettings:{id:"rectangularAreaMeasurementSettings",defaultMessage:"Rectangle Area Measurement Settings",description:"Rectangle Area Measurement Settings"},ellipseAreaMeasurementSettings:{id:"ellipseAreaMeasurementSettings",defaultMessage:"Ellipse Area Measurement Settings",description:"Ellipse Area Measurement Settings"},measurementCalibrateLength:{id:"measurementCalibrateLength",defaultMessage:"Calibrate Length",description:"Calibrate"},measurementPrecision:{id:"measurementPrecision",defaultMessage:"Precision",description:"Precision"},measurementScale:{id:"measurementScale",defaultMessage:"Scale",description:"Scale"},calibrateScale:{id:"calibrateScale",defaultMessage:"Calibrate Scale",description:"Calibrate Scale"},calibrate:{id:"calibrate",defaultMessage:"Calibrate",description:"Calibrate"}});const Y=e=>I.G6?l.createElement("span",null,e.label):"1/2"===e.label?o||(o=l.createElement("span",null,"12 in")):"1/4"===e.label?r||(r=l.createElement("span",null,"14 in")):"1/8"===e.label?i||(i=l.createElement("span",null,"18 in")):"1/16"===e.label?a||(a=l.createElement("span",null,"116 in ")):l.createElement("span",null,e.label),J=e=>{let{item:t,state:n,itemComponentProps:o,ref:r}=e;return l.createElement(g.Z,(0,s.Z)({is:"div",className:u()(U().item,{[U().isSelected]:(null==n?void 0:n.includes("selected"))||(null==n?void 0:n.includes("focused"))},U().measurementDropdownText),name:null==t?void 0:t.value},o,{ref:r}),null!=n&&n.includes("selected")?l.createElement(O.Z,{src:H(),className:j().icon}):l.createElement("span",{className:j().icon}),l.createElement(Y,{label:null==t?void 0:t.label}))}},90012:(e,t,n)=>{"use strict";n.d(t,{Z:()=>I,s:()=>F});var o=n(67294),r=n(76154),i=n(25915),a=n(94184),s=n.n(a),l=n(67366),c=n(19338),u=n(71603),d=n(69939),p=n(34573),f=n(63738),h=n(35860),m=n(2383),g=n(28890),v=n(35129),y=n(80324),b=n.n(y),w=n(84537),S=n(10754),P=n.n(S),E=n(79827),x=n(22458),D=n.n(x),C=n(5462),k=n(40853),O=n(4132),A=n(30570),T=n(44763);const I=function(e){var t,n;let{frameWindow:a}=e;const y=(0,r.YB)(),{formatMessage:S}=(0,r.YB)(),x=(0,l.v9)((e=>e.measurementScales)),I=(0,l.v9)((e=>e.secondaryMeasurementUnit)),[M,_]=o.useState(Boolean(I)),[N,R]=o.useState(null==I?void 0:I.unitTo),[L,B]=o.useState(null==I?void 0:I.precision),[j,z]=o.useState(!1),[K,Z]=o.useState([]),[U,V]=o.useState(null),[G,W]=o.useState(null),[q,H]=o.useState(!1),$=(0,l.v9)((e=>{const{selectedAnnotationIds:t,annotations:n}=e;return t.map((e=>n.get(e)))})),X=(0,l.I0)(),Y=o.useCallback((0,k.zx)(S,"measurement"),[S]),J=o.useCallback((0,k.ck)(S),[S]),Q=o.useCallback((()=>{X((0,f.jJ)()),X((0,p.fz)()),X((0,d.Ds)("measurement")),X((0,f.BR)())}),[X]),ee=o.useCallback((e=>{if(j&&K&&x){const{deleted:t}=(0,A.Rc)(x,K);if(t.filter((e=>!(null==G?void 0:G.find((t=>t.prevScale===e))))).length>0&&!e)return void H(!0);(0,l.dC)((()=>{X((0,T.U7)(K,G)),X((0,T.Se)(U))}))}M&&N&&L&&X((0,T.v9)({unitTo:N,precision:L})),!I||N||L||X((0,T.v9)(null)),$.size>0&&(0,l.dC)((()=>{$.toList().forEach((e=>{const t=e.set("measurementScale",new u.Z({fromValue:Number(null==U?void 0:U.scale.fromValue),toValue:Number(null==U?void 0:U.scale.toValue),unitFrom:null==U?void 0:U.scale.unitFrom,unitTo:null==U?void 0:U.scale.unitTo})).set("measurementPrecision",null==U?void 0:U.precision);X((0,d.FG)(t))}))})),Q()}),[U,j,X,G,x,Q,K,I,N,L,M]),te=o.useMemo((()=>!!N&&(0,A.B0)(N)),[N]);return q?o.createElement(h.z,{onConfirm:()=>{ee(!0)},onCancel:()=>{H(!1)},accessibilityLabel:S(F.scaleAnnotationsDeleteWarning),accessibilityDescription:S(F.scaleAnnotationsDeleteWarning),intl:y},o.createElement("p",null,S(F.scaleAnnotationsDeleteWarning))):o.createElement(g.Z,{onEscape:Q,background:"var(--PSPDFKit-MeasurementModalComponent-background-color)",className:b().modal},o.createElement("h2",{className:s()(b().title,b().header,b().contentRow)},S(F.setScale)),o.createElement(m.Z,{frameWindow:a,setAreValidScales:z,scalesSetter:Z,activeScaleSetter:V,editedScalesSetter:W}),o.createElement("h2",{className:s()(b().contentRow,b().sectionTitle,b().spaceBetweenRow)},S(F.secondaryUnit)),o.createElement("div",{className:s()(b().contentRow,b().spaceBetweenRow)},o.createElement("p",null,S(F.displaySecondaryUnit)),o.createElement(w.n,{value:M,onUpdate:()=>{M?(R(void 0),B(void 0)):(R(E.K.INCHES),B(O.L.WHOLE)),_(!M)},accessibilityLabel:S(F.displaySecondaryUnit)})),M?o.createElement("div",{className:"PSPDFKit-Secondary-Measurement"},o.createElement("div",{className:s()(b().contentRow,b().spaceBetweenRow)},o.createElement("p",null,S(F.unit)),o.createElement("div",{className:s()(b().nativeDropdown,P().nativeButton)},o.createElement("select",{style:{height:30},"aria-label":S(F.measurementScale),value:(null===(t=A.b5.find((e=>e.value===N)))||void 0===t?void 0:t.value)||"",className:"PSPDFKit-Input-Dropdown-Select",onChange:e=>{R(e.target.value)}},Object.keys(E.K).map((e=>o.createElement("option",{key:e,value:E.K[e]},E.K[e]))))),o.createElement(C.Z,{items:A.b5,value:null!==(n=A.b5.find((e=>e.value===N)))&&void 0!==n?n:null,accessibilityLabel:S(F.measurementScale),discreteDropdown:!1,isActive:!1,caretDirection:"down",className:s()(b().dropdownGroupComponent,D().dropdownGroupComponent,"PSPDFKit-Secondary-Measurement-UnitTo"),menuClassName:D().dropdownGroupMenu,ButtonComponent:Y,ItemComponent:J,onSelect:(e,t)=>{(0,A.B0)(t.value)&&(0,A.zl)(L)&&!te&&B(void 0),R(t.value)},frameWindow:a})),o.createElement("div",{className:s()(b().contentRow,b().spaceBetweenRow)},o.createElement("p",null,S(F.measurementPrecision)),o.createElement(c.Z,{frameWindow:a,unit:N,onPrecisionChange:B,selectedPrecision:L,precisionDropdownClassname:"PSPDFKit-Secondary-Measurement-Precision",accessibilityLabel:S(F.measurementPrecision)}))):null,o.createElement("div",{className:s()(b().footer,b().contentRow,b().spaceBetweenRow)},o.createElement(i.hE,{className:"PSPDFKit-Confirm-Dialog-Buttons",align:"end"},o.createElement(i.zx,{autoFocus:!0,onClick:Q,className:s()("PSPDFKit-Confirm-Dialog-Button","PSPDFKit-Confirm-Dialog-Button-Cancel",b().button)},S(v.Z.cancel)),o.createElement(i.zx,{onClick:()=>ee(),primary:!0,disabled:M&&(!N||!L)||!j,className:s()("PSPDFKit-Confirm-Dialog-Button","PSPDFKit-Confirm-Dialog-Button-Confirm",b().button)},S(v.Z.done)))))},F=(0,r.vU)({distanceMeasurementSettings:{id:"distanceMeasurementSettings",defaultMessage:"Distance Measurement Settings",description:"Distance Measurement Settings"},perimeterMeasurementSettings:{id:"perimeterMeasurementSettings",defaultMessage:"Perimeter Measurement Settings",description:"Perimeter Measurement Settings"},polygonAreaMeasurementSettings:{id:"polygonAreaMeasurementSettings",defaultMessage:"Polygon Area Measurement Settings",description:"Polygon Area Measurement Settings"},rectangularAreaMeasurementSettings:{id:"rectangularAreaMeasurementSettings",defaultMessage:"Rectangle Area Measurement Settings",description:"Rectangle Area Measurement Settings"},ellipseAreaMeasurementSettings:{id:"ellipseAreaMeasurementSettings",defaultMessage:"Ellipse Area Measurement Settings",description:"Ellipse Area Measurement Settings"},measurementCalibrateLength:{id:"measurementCalibrateLength",defaultMessage:"Calibrate Length",description:"Calibrate"},measurementPrecision:{id:"measurementPrecision",defaultMessage:"Precision",description:"Precision"},measurementScale:{id:"measurementScale",defaultMessage:"Scale",description:"Measurement Scale"},setScale:{id:"setScale",defaultMessage:"Set Scale",description:"Set Scale"},unit:{id:"unit",defaultMessage:"Unit",description:"Unit"},secondaryUnit:{id:"Secondary Unit",defaultMessage:"Secondary Unit",description:"Secondary Unit"},displaySecondaryUnit:{id:"displaySecondaryUnit",defaultMessage:"Display Secondary Unit",description:"Display Secondary Unit"},scaleAnnotationsDeleteWarning:{id:"scaleAnnotationsDeleteWarning",defaultMessage:"Deleting the scale will also delete measurements using the scale.",description:"Message displayed in the scales deletion dialog"}})},19338:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var o=n(94184),r=n.n(o),i=n(67294),a=n(76154),s=n(40853),l=n(27001),c=n(10754),u=n.n(c),d=n(90012),p=n(80324),f=n.n(p),h=n(22458),m=n.n(h),g=n(5462),v=n(4132),y=n(30570);const b=e=>{var t,n;let{unit:o,frameWindow:c,selectedPrecision:p,onPrecisionChange:h,wrapperClass:b,precisionDropdownClassname:w,accessibilityLabel:S,index:P}=e;const{formatMessage:E}=(0,a.YB)(),x=(0,i.useMemo)((()=>!!o&&(0,y.B0)(o)),[o]),D=(0,i.useMemo)((()=>x?y.Qc:y.nK),[x]),C=i.useCallback((0,s.zx)(E,"measurement"),[E]);return i.createElement("div",{className:b||void 0},i.createElement("div",{className:r()(f().nativeDropdown,u().nativeButton)},i.createElement("select",{style:{height:30},"aria-label":E(d.s.measurementPrecision),"data-test-id":void 0!==P?`PSPDFKit-Scale-${P+1}-Precision`:"PSPDFKit-Scale-Precision",value:(null===(t=y.nK.find((e=>e.value===p||e.label===p)))||void 0===t?void 0:t.value)||"",className:r()("PSPDFKit-Input-Dropdown-Select","PSPDFKit-Measurement-Precision-Dropdown"),onChange:e=>{h(e.target.value)}},Object.keys(v.L).filter((e=>x?!(0,y.zl)(v.L[e]):e)).map(((e,t)=>i.createElement("option",{key:e,value:v.L[e]},y.W9[t]))))),i.createElement(g.Z,{items:D,value:null!==(n=D.find((e=>e.value===p||e.label===p)))&&void 0!==n?n:null,accessibilityLabel:S,discreteDropdown:!1,isActive:!1,caretDirection:"down",className:r()("PSPDFKit-Input-Dropdown-Select",f().dropdownGroupComponent,"PSPDFKit-Measurement-Precision-Dropdown",w),"data-test-id":void 0!==P?`PSPDFKit-Scale-${P+1}-Precision`:"PSPDFKit-Scale-Precision",menuClassName:m().dropdownGroupMenu,ButtonComponent:C,ItemComponent:l.qw,onSelect:(e,t)=>{h(t.value)},frameWindow:c}))}},2383:(e,t,n)=>{"use strict";n.d(t,{Z:()=>L,s:()=>R});var o=n(84121),r=n(25915),i=n(94184),a=n.n(i),s=n(67294),l=n(76154),c=n(67366),u=n(19338),d=n(4132),p=n(40853),f=n(22458),h=n.n(f),m=n(23756),g=n.n(m),v=n(13540),y=n(27001),b=n(10754),w=n.n(b),S=n(35129),P=n(5462),E=n(36489),x=n(79827),D=n(30570),C=n(80324),k=n.n(C);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const T="duplicate",I="name",F="fromValue",M="toValue",_="precision";function N(e){const t=parseFloat(e);return!isNaN(t)&&isFinite(t)&&t>0}const R=(0,l.vU)({scaleSelector:{id:"scaleSelector",defaultMessage:"Scale {arg0}",description:"Scale checkbox selector for multiple scale selection accessibility"},scaleName:{id:"scaleName",defaultMessage:"Scale Name",description:"Scale Name"},scaleUnitFrom:{id:"scaleUnitFrom",defaultMessage:"Scale unit from",description:"Scale unit from"},scaleUnitTo:{id:"scaleUnitTo",defaultMessage:"Scale unit to",description:"Scale unit to"},newScale:{id:"newScale",defaultMessage:"Add new scale",description:"Add new scale"},duplicateScaleError:{id:"duplicateScaleError",defaultMessage:"Scale with these settings has already been defined. Please choose a different scale.",description:"Scale with these settings has already been defined. Please choose a different scale."}}),L=function(e){const{frameWindow:t,setAreValidScales:o,scalesSetter:i,activeScaleSetter:f,editedScalesSetter:m}=e,{formatMessage:b}=(0,l.YB)(),C=(0,c.v9)((e=>e.measurementScales)),O=(0,c.v9)((e=>e.activeMeasurementScale)),[L,B]=(0,s.useState)([]),[j,z]=(0,s.useState)(C),[K,Z]=(0,s.useState)(O?null==C?void 0:C.findIndex((e=>(0,D.cd)(e,O))):0),[U,V]=(0,s.useState)([]),[G,W]=(0,s.useState)([]);s.useEffect((()=>{const e=function(e,t){const n=[];return t.forEach((t=>{const o=e[t],r=[],i=o.scale.fromValue,a=o.scale.toValue,s=o.precision;N(i)||r.push(F),N(a)||r.push(M),s||r.push(_);const l=[];e.forEach(((e,n)=>{n!==t&&(l.push(n),o.name&&o.name===e.name&&!r.includes(I)&&r.push(I),(0,D.cd)(o,e)&&!r.includes(T)&&r.push(T))})),r.length>0&&n.push({index:t,fields:r,conflicts:l})})),n}(j,G);if(e.length>0){const t=e[e.length-1];B([t])}else B([]),W([]),i(j);o(0===e.length)}),[j,i,o]),s.useEffect((()=>{z(C)}),[C]),s.useEffect((()=>{const e=null==j?void 0:j.find(((e,t)=>t===K));e&&f(e)}),[K,f,j]),s.useEffect((()=>{m(U)}),[U]);const q=(e,t,n)=>{z((o=>{const r=null==o?void 0:o.map((e=>A(A({},e),{},{scale:A({},e.scale)})));return"precision"===t?r[e][t]=n:r[e].scale=A(A({},r[e].scale),{},{[t]:n}),r})),null!=C&&C.find((t=>JSON.stringify(t)===JSON.stringify(null==j?void 0:j[e])))&&U&&!U.find((t=>t===e))&&V([...U,{index:e,prevScale:C[e]}]),G.includes(e)||W([...G,e])},H=s.useCallback((0,p.zx)(b,"measurement"),[b]),$=s.useCallback((0,p.ck)(b),[b]);return s.createElement("div",{className:k().scale},null==j?void 0:j.map(((e,o)=>{var i,l;const c=e.name,d=e.scale,p=e.precision,f=null==d?void 0:d.unitFrom,m=null==d?void 0:d.unitTo,O=null==d?void 0:d.fromValue,N=null==d?void 0:d.toValue,B=L.find((e=>e.index===o)),X=null==B?void 0:B.fields.includes(T),Y=null==B?void 0:B.fields.includes(I),J=null==B?void 0:B.fields.includes(F),Q=null==B?void 0:B.fields.includes(M),ee=null==B?void 0:B.fields.includes(_);return s.createElement("div",{key:o,style:{marginBottom:"var(--PSPDFKit-spacing-6)"}},s.createElement("div",{className:a()(k().scaleRow),style:X?{borderBottom:0}:{},"data-test-id":`PSPDFKit-Scale-${o+1}`},s.createElement("input",{key:c,type:"radio",checked:Boolean(K===o&&!X),value:o,id:b(R.scaleSelector,{arg0:o+1}),name:b(R.scaleSelector,{arg0:o+1}),onChange:e=>{e.target.checked&&Z(o)},className:a()(k().activeScaleRadio,"PSPDFKit-Active-Scale-Radio-Input")}),s.createElement("div",{className:a()(k().scaleContent,k().scaleMiddleSection)},s.createElement("div",{className:a()(k().scaleRow,k().spaceBetweenRow,k().rowSeparator)},s.createElement(r.oi,{type:"text",value:c,placeholder:b(R.scaleName),onChange:e=>{((e,t)=>{G.includes(e)||W([...G,e]),z((n=>{const o=null==n?void 0:n.map((e=>A(A({},e),{},{scale:A({},e.scale)})));return o[e].name=t,o})),null!=C&&C.find((t=>JSON.stringify(t)===JSON.stringify(null==j?void 0:j[e])))&&U&&!U.find((t=>t===e))&&V([...U,{index:e,prevScale:C[e]}])})(o,e.target.value)},required:!0,style:{height:32,width:"100%",borderColor:Y?"#FF0000":void 0},className:a()(g().input),maxLength:40})),s.createElement("div",{className:a()(k().scaleRow,k().rowSeparator)},s.createElement("div",{className:k().scaleRowContent},s.createElement(r.oi,{type:"number",value:""+O,onChange:e=>{q(o,"fromValue",e.target.value)},required:!0,style:{height:32,width:54,borderColor:J||X?"#FF0000":void 0},"data-test-id":`PSPDFKit-Scale-${o+1}-FromValue`,className:a()(g().input)}),s.createElement("div",{className:a()(k().nativeDropdown,w().nativeButton)},s.createElement("select",{style:{height:30},"aria-label":`${b(R.scaleUnitFrom)} ${o+1}`,className:a()("PSPDFKit-Input-Dropdown-Select"),"data-test-id":`PSPDFKit-Scale-${o+1}-UnitFrom`,value:f||"",onChange:e=>{q(o,"unitFrom",e.target.value)}},Object.keys(E.s).map((e=>s.createElement("option",{key:e,value:E.s[e]},E.s[e]))))),s.createElement(P.Z,{items:D.m_,value:null!==(i=D.m_.find((e=>e.value===f)))&&void 0!==i?i:null,accessibilityLabel:`${b(R.scaleUnitFrom)} ${o+1}`,discreteDropdown:!1,isActive:!1,caretDirection:"down","data-test-id":`PSPDFKit-Scale-${o+1}-UnitFrom`,className:a()(k().dropdownGroupComponent,h().dropdownGroupComponent),menuClassName:h().dropdownGroupMenu,ButtonComponent:H,ItemComponent:$,onSelect:(e,t)=>{q(o,"unitFrom",t.value)},frameWindow:t})),"=",s.createElement("div",{className:k().scaleRowContent},s.createElement(r.oi,{type:"number",value:""+N,onChange:e=>{q(o,"toValue",e.target.value)},required:!0,style:{height:32,width:54,borderColor:Q||X?"#FF0000":void 0},"data-test-id":`PSPDFKit-Scale-${o+1}-ToValue`,className:a()(g().input)}),s.createElement("div",{className:a()(k().nativeDropdown,w().nativeButton)},s.createElement("select",{style:{height:30},"aria-label":`${b(R.scaleUnitFrom)} ${o+1}`,"data-test-id":`PSPDFKit-Scale-${o+1}-UnitTo`,className:a()("PSPDFKit-Input-Dropdown-Select"),value:m||"",onChange:e=>{q(o,"unitTo",e.target.value)}},Object.keys(x.K).map((e=>s.createElement("option",{key:e,value:x.K[e]},x.K[e]))))),s.createElement(P.Z,{items:D.b5,value:null!==(l=D.b5.find((e=>e.value===m)))&&void 0!==l?l:null,accessibilityLabel:`${b(R.scaleUnitFrom)} ${o+1}`,discreteDropdown:!1,isActive:!1,caretDirection:"down","data-test-id":`PSPDFKit-Scale-${o+1}-UnitTo`,className:a()(k().dropdownGroupComponent,h().dropdownGroupComponent),menuClassName:h().dropdownGroupMenu,ButtonComponent:H,ItemComponent:$,onSelect:(e,t)=>{q(o,"unitTo",t.value)},frameWindow:t}))),s.createElement("div",{className:a()(k().scaleRow,k().spaceBetweenRow,k().rowSeparator)},s.createElement("p",{className:h().itemLabel},b(y.sY.measurementPrecision)),s.createElement(u.Z,{frameWindow:t,unit:m,onPrecisionChange:e=>q(o,"precision",e),selectedPrecision:p,wrapperClass:a()({[k().error]:ee}),accessibilityLabel:`${y.sY.measurementScale} ${b(y.sY.measurementPrecision)} ${o+1}`,index:o}))),s.createElement("div",null,s.createElement(r.zx,{"data-test-id":`PSPDFKit-Scale-${o+1}-RemoveScale`,className:a()(k().closeButton,"PSPDFKit-Measurement-Exit-Dialog-Close-Button"),onClick:()=>{(e=>{if(z((t=>{const n=null==t?void 0:t.map((e=>A(A({},e),{},{scale:A({},e.scale)})));return n.splice(e,1),n})),U){const t=U.filter((t=>t.index!==e)).map((e=>A(A({},e),{},{index:e.index-1})));V(t)}if(G){const t=G.filter((t=>t!==e)).map((e=>e-1));W(t)}Z((e=>e?e-1:0))})(o)},"aria-label":b(S.Z.close),disabled:1===j.length,style:{position:"relative",top:"7px"}},s.createElement(v.Z,{className:k().signatureValidationCloseIcon,src:n(15708)})))),(X||Y)&&s.createElement("p",{className:a()(k().scaleError)},b(R.duplicateScaleError)))})),s.createElement("div",{className:k().addNewScale,onClick:()=>{z((e=>{const t=null==e?void 0:e.map((e=>A(A({},e),{},{scale:A({},e.scale)})));return t.push({name:"",scale:{unitFrom:"cm",unitTo:"cm",fromValue:1,toValue:1},precision:d.L.WHOLE}),t})),W([...G,null==j?void 0:j.length])}},s.createElement(v.Z,{className:k().signatureValidationCloseIcon,src:n(88232)}),s.createElement("u",{style:{color:"var(--color-blue600)"}},b(R.newScale))))}},9599:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>j,sJ:()=>L});var o=n(22122),r=n(94184),i=n.n(r),a=n(18390),s=n(85628),l=n.n(s),c=n(67294),u=n(76154),d=n(67366),p=n(70190),f=n.n(p),h=n(30570),m=n(90012),g=n(71603),v=n(20792),y=n(69939),b=n(44763),w=n(40853),S=n(93628),P=n.n(S),E=n(22458),x=n.n(E),D=n(10754),C=n.n(D),k=n(5462),O=n(63738),A=n(13540),T=n(9437),I=n.n(T),F=n(20683),M=n(80324),_=n.n(M),N=n(35129);function R(e,t){const n=Math.round(e*t);return new(l())(n/t).toFraction(!0)}function L(e){if(!e)return{label:"",value:null};let t,n;const o=function(e){switch(e){case"whole":return"1";case"oneDp":return"0.1";case"twoDp":return"0.001";case"threeDp":case"fourDp":return"0.0001";default:return null}}(e.precision)||e.precision;if(["1","0.1","0.01","0.001","0.0001"].includes(o)){const r=function(e){switch(e){case"1":default:return 0;case"0.1":return 1;case"0.01":return 2;case"0.001":return 3;case"0.0001":return 4}}(o);t=Number(e.scale.fromValue).toFixed(r),n=Number(e.scale.toValue).toFixed(r)}else if(["1/2","1/4","1/8","1/16"].includes(o)){const r=Number(o.split("/")[1]);t=R(e.scale.fromValue,r),n=R(e.scale.toValue,r)}return{label:e.name||`${t} ${e.scale.unitFrom} : ${n} ${e.scale.unitTo}`,value:e}}const B=(0,u.vU)({unit:{id:"unit",defaultMessage:"Unit",description:"Unit"},scalesDropdown:{id:"scalesDropdown",defaultMessage:"Scales dropdown",description:"Scales dropdown"},editAddScale:{id:"editAddScale",defaultMessage:"Edit or add new scale",description:"Edit or add new scale"},useCalibrationTool:{id:"useCalibrationTool",defaultMessage:"Use calibration tool",description:"Use calibration tool"}}),j=function(e){var t;let{frameWindow:o,selectedAnnotation:r,onAnnotationScaleUpdate:a,selectedAnnotations:s}=e;const l=(0,d.v9)((e=>e.measurementScales)),p=(0,d.v9)((e=>e.activeMeasurementScale)),f=(0,d.I0)(),{formatMessage:S}=(0,u.YB)(),E=c.useMemo((()=>function(e,t){if(t&&e)return null==e?void 0:e.find((e=>{var n,o,r,i;const a=e.precision===t.measurementPrecision,s=e.scale.fromValue===(null===(n=t.measurementScale)||void 0===n?void 0:n.fromValue),l=e.scale.toValue===(null===(o=t.measurementScale)||void 0===o?void 0:o.toValue),c=e.scale.unitFrom===(null===(r=t.measurementScale)||void 0===r?void 0:r.unitFrom),u=e.scale.unitTo===(null===(i=t.measurementScale)||void 0===i?void 0:i.unitTo);return a&&s&&l&&c&&u}))}(l,r)||p),[l,r,p]),D=c.useCallback((0,w.zx)(S,"measurement",200),[S]),T=c.useMemo((()=>!!s&&(0,h.mq)(s)),[s]),M=c.useMemo((()=>function(e,t,n){const o=e.map((e=>L(e)));return t?[...o,{label:n,value:n}]:o}(l,T,S(N.Z.mixed))),[T,S,l]),R=c.useCallback((e=>{if(e.value!==S(N.Z.mixed))if(r){const{value:t}=e,{precision:n,scale:o}=t,{fromValue:r,toValue:i,unitFrom:s,unitTo:l}=o;null==a||a({measurementPrecision:n,measurementScale:new g.Z({fromValue:Number(r),toValue:Number(i),unitFrom:s,unitTo:l})})}else f((0,b.Se)(e.value))}),[f,S,a,r]);if(!l)return null;if(!E)return c.createElement("div",{className:I().warningButton,onClick:()=>f((0,O.PR)())},c.createElement(A.Z,{src:n(78339),role:"presentation",className:I().warningButtonIcon}),c.createElement("span",{className:I().radioButtonWarningLabel},S(m.s.setScale)));function j(){(0,d.dC)((()=>{f((0,b.Xh)(!0)),f((0,y.Ds)("distance")),f((0,O.yg)(F.Z,v.A.DISTANCE))}))}return c.createElement("div",{className:C().scaleDropdownContainer},c.createElement("div",{className:i()(x().nativeDropdown,C().nativeButton)},c.createElement("select",{"aria-label":S(B.scalesDropdown),value:T?S(N.Z.mixed):null===(t=M.find((e=>JSON.stringify(e.value)===JSON.stringify(E))))||void 0===t?void 0:t.label,className:i()("PSPDFKit-Input-Dropdown-Select","PSPDFKit-Scales-Dropdown"),onChange:e=>{const t=e.target.value;"editAddScale"===t?f((0,O.PR)()):"calibrationTool"===t?j():R(M.find((e=>e.label===t)))}},null==M?void 0:M.map((e=>c.createElement("option",{key:e.label,value:e.label},e.label))),c.createElement("option",{key:S(B.editAddScale),value:"editAddScale"},S(B.editAddScale),"..."),c.createElement("option",{key:S(B.useCalibrationTool),value:"calibrationTool"},S(B.useCalibrationTool),"..."))),c.createElement(k.Z,{items:M,value:T?{label:S(N.Z.mixed),value:S(N.Z.mixed)}:M.find((e=>JSON.stringify(e.value)===JSON.stringify(E))),accessibilityLabel:S(B.scalesDropdown),discreteDropdown:!1,isActive:!1,caretDirection:"down",className:i()(x().dropdownGroupComponent,"PSPDFKit-Measurement-Popover-Precision-Dropdown","PSPDFKit-Scales-Dropdown"),menuClassName:i()(x().dropdownGroupMenu,P().measurementDropdownText),ButtonComponent:D,ItemComponent:z,onSelect:(e,t)=>R(t),frameWindow:o},c.createElement("div",{className:_().scalesDropdownItem,onClick:()=>f((0,O.PR)())},S(B.editAddScale),"..."),c.createElement("div",{className:_().scalesDropdownItem,onClick:()=>{j()}},S(B.useCalibrationTool),"...")))},z=e=>{let{item:t,state:n,itemComponentProps:o,ref:r}=e;return c.createElement(K,{item:t,state:n,itemComponentProps:o,ref:r})},K=c.forwardRef(((e,t)=>{var n;let{item:r,state:s,itemComponentProps:l,width:u}=e;return c.createElement(a.Z,(0,o.Z)({is:"div",className:i()(P().item,_().item,{[P().isSelected]:(null==s?void 0:s.includes("selected"))||(null==s?void 0:s.includes("focused"))}),name:null!==(n=null==r?void 0:r.value)&&void 0!==n?n:null==r?void 0:r.label,style:{width:u},ref:t},l),null!=s&&s.includes("selected")?c.createElement(A.Z,{src:f(),className:_().icon}):c.createElement("span",{className:_().icon}),null==r?void 0:r.label)}))},35129:(e,t,n)=>{"use strict";n.d(t,{A:()=>a,Z:()=>i});var o=n(76154),r=n(83634);const i=(0,o.vU)({color:{id:"color",defaultMessage:"Color",description:"Color"},fillColor:{id:"fillColor",defaultMessage:"Fill Color",description:"Background color"},newColor:{id:"newColor",defaultMessage:"New Color",description:"New Custom Color"},[r.Z.BLACK.toCSSValue()]:{id:"black",defaultMessage:"Black",description:"Black, the color"},[r.Z.WHITE.toCSSValue()]:{id:"white",defaultMessage:"White",description:"White, the color"},[r.Z.BLUE.toCSSValue()]:{id:"blue",defaultMessage:"Blue",description:"Blue, the color"},[r.Z.RED.toCSSValue()]:{id:"red",defaultMessage:"Red",description:"Red, the color"},[r.Z.GREEN.toCSSValue()]:{id:"green",defaultMessage:"Green",description:"Green, the color"},[r.Z.ORANGE.toCSSValue()]:{id:"orange",defaultMessage:"Orange",description:"Orange, the color"},[r.Z.LIGHT_BLUE.toCSSValue()]:{id:"lightBlue",defaultMessage:"Light Blue",description:"Light Blue color"},[r.Z.LIGHT_RED.toCSSValue()]:{id:"lightRed",defaultMessage:"Light Red",description:"Light Red color"},[r.Z.LIGHT_GREEN.toCSSValue()]:{id:"lightGreen",defaultMessage:"Light Green",description:"Light Green color"},[r.Z.LIGHT_YELLOW.toCSSValue()]:{id:"yellow",defaultMessage:"Yellow",description:"Yellow color"},opacity:{id:"opacity",defaultMessage:"Opacity",description:"Opacity"},thickness:{id:"thickness",defaultMessage:"Thickness",description:"Thickness of a line"},"linecaps-dasharray":{id:"linecaps-dasharray",defaultMessage:"Line Style",description:"Select line caps and dash pattern of lines"},linestyle:{id:"dasharray",defaultMessage:"Line style",description:"Select line style"},borderStyle:{id:"borderStyle",defaultMessage:"Border style",description:"Select border style"},borderColor:{id:"borderColor",defaultMessage:"Border color",description:"Select border color"},font:{id:"font",defaultMessage:"Font",description:"Font"},fontSize:{id:"fontSize",defaultMessage:"Font size",description:"Font size selection"},fonts:{id:"fonts",defaultMessage:"Fonts",description:"Fonts"},allFonts:{id:"allFonts",defaultMessage:"All Fonts",description:"Used when presenting a list of fonts"},fontFamilyUnsupported:{id:"fontFamilyUnsupported",defaultMessage:"{arg0} (not supported)",description:"Font family (type) is not supported"},alignment:{id:"alignment",defaultMessage:"Alignment",description:"Alignment (left, center, right, top, middle, bottom)"},alignmentRight:{id:"alignmentRight",defaultMessage:"Right",description:"Right alignment"},alignmentLeft:{id:"alignmentLeft",defaultMessage:"Left",description:"Left alignment"},alignmentCenter:{id:"alignmentCenter",defaultMessage:"center",description:"Center alignment"},verticalAlignment:{id:"verticalAlignment",defaultMessage:"Vertical Alignment",description:"Vertical Alignment (top, center, bottom)"},horizontalAlignment:{id:"horizontalAlignment",defaultMessage:"Horizontal Alignment",description:"Horizontal Alignment (left, center, right)"},size:{id:"size",defaultMessage:"Size",description:"Used to label sizes (eg. font)"},numberInPt:{id:"numberInPt",defaultMessage:"{arg0} pt",description:"A number in pt (points). eg. 10pt"},startLineCap:{id:"startLineCap",defaultMessage:"Line Start",description:'Start line cap marker. eg. "open arrow"'},strokeDashArray:{id:"strokeDashArray",defaultMessage:"Line Style",description:"Line Style"},endLineCap:{id:"endLineCap",defaultMessage:"Line End",description:'End line cap marker. eg. "open arrow"'},edit:{id:"edit",defaultMessage:"Edit",description:"Generic edit label"},save:{id:"save",defaultMessage:"Save",description:"Generic save label"},saveAs:{id:"saveAs",defaultMessage:"Save As...",description:'Generic "save as" label'},export:{id:"export",defaultMessage:"Export",description:'Generic "export" label'},delete:{id:"delete",defaultMessage:"Delete",description:"Generic delete label"},cancel:{id:"cancel",defaultMessage:"Cancel",description:"Cancel"},ok:{id:"ok",defaultMessage:"OK",description:"Ok, usually used to confirm an action"},close:{id:"close",defaultMessage:"Close",description:'Generic, usually to close something. "something" can be inferred from the context in which the message appears'},done:{id:"done",defaultMessage:"Done",description:'Generic "done" message. Usually used in a button.'},annotationsCount:{id:"annotationsCount",defaultMessage:"{arg0, plural,\n =0 {{arg0} Annotations}\n one {{arg0} Annotation}\n two {{arg0} Annotations}\n other {{arg0} Annotations}\n }",description:"Amount of annotations."},annotations:{id:"annotations",defaultMessage:"Annotations",description:"PDF Annotations"},bookmark:{id:"bookmark",defaultMessage:"Bookmark",description:"PDF Bookmark"},bookmarks:{id:"bookmarks",defaultMessage:"Bookmarks",description:"PDF Bookmarks"},annotation:{id:"annotation",defaultMessage:"Annotation",description:"Annotation"},selectedAnnotation:{id:"selectedAnnotation",defaultMessage:"selected {arg0}",description:"Selected Annotation"},selectedAnnotationWithText:{id:"selectedAnnotationWithText",defaultMessage:"Selected {arg0} with {arg1} as content",description:"Selected Text or Note Annotation"},noteAnnotation:{id:"noteAnnotation",defaultMessage:"Note",description:"Text Note Annotation"},comment:{id:"comment",defaultMessage:"Comment",description:"Comment"},commentAction:{id:"commentAction",defaultMessage:"Comment",description:"Comment"},comments:{id:"comments",defaultMessage:"Comments",description:"Comments"},textAnnotation:{id:"textAnnotation",defaultMessage:"Text",description:"Free Text Annotation"},calloutAnnotation:{id:"calloutAnnotation",defaultMessage:"Callout",description:"Free Text Annotation (Callout)"},pen:{id:"pen",defaultMessage:"Drawing",description:"Ink Annotation used to do freehand drawing."},eraser:{id:"eraser",defaultMessage:"Ink Eraser",description:"Ink Eraser tool to remove ink annotations points by hand."},inkAnnotation:{id:"inkAnnotation",defaultMessage:"Drawing",description:"Ink Annotation used to do freehand drawing."},highlighterAnnotation:{id:"highlighterAnnotation",defaultMessage:"Freeform Highlight",description:"Ink Annotation used to highlight content."},highlightAnnotation:{id:"highlightAnnotation",defaultMessage:"Text Highlight",description:"Highlight Annotation used to select and mark text."},underlineAnnotation:{id:"underlineAnnotation",defaultMessage:"Underline",description:"Undeline Annotation used to select and mark text."},squiggleAnnotation:{id:"squiggleAnnotation",defaultMessage:"Squiggle",description:"Squiggle Annotation used to select and mark text."},strikeOutAnnotation:{id:"strikeOutAnnotation",defaultMessage:"Strikethrough",description:"StrikeOut Annotation used to select and mark text."},lineAnnotation:{id:"lineAnnotation",defaultMessage:"Line",description:"Shape Annotation used to draw straight lines."},arrowAnnotation:{id:"arrowAnnotation",defaultMessage:"Arrow",description:"Shape Annotation used to draw an arrow."},rectangleAnnotation:{id:"rectangleAnnotation",defaultMessage:"Rectangle",description:"Shape Annotation used to draw rectangles."},ellipseAnnotation:{id:"ellipseAnnotation",defaultMessage:"Ellipse",description:"Shape Annotation used to draw ellipses."},polygonAnnotation:{id:"polygonAnnotation",defaultMessage:"Polygon",description:"Shape Annotation used to draw polygons."},polylineAnnotation:{id:"polylineAnnotation",defaultMessage:"Polyline",description:"Shape Annotation used to draw polylines."},imageAnnotation:{id:"imageAnnotation",defaultMessage:"Image",description:"Image Annotation"},stampAnnotation:{id:"stampAnnotation",defaultMessage:"Stamp",description:"Stamp Annotation"},redactionAnnotation:{id:"redactionAnnotation",defaultMessage:"Redaction",description:"Redaction Annotation"},arrow:{id:"arrow",defaultMessage:"Line with arrow",description:"Shape Annotation used to draw straight lines with an arrow."},highlighter:{id:"highlighter",defaultMessage:"Freeform Highlight",description:"Ink Annotation used to highlight content with freehand drawing."},icon:{id:"icon",defaultMessage:"Icon",description:"Label for when users need to select an icon"},pageXofY:{id:"pageXofY",defaultMessage:"Page {arg0} of {arg1}",description:"Page indicator."},pageX:{id:"pageX",defaultMessage:"Page {arg0}",description:"Page number"},searchDocument:{id:"searchDocument",defaultMessage:"Search Document",description:"Search document (for text)"},sign:{id:"sign",defaultMessage:"Sign",description:"Label for a signature field"},signed:{id:"signed",defaultMessage:"Signed",description:"Label for a signed field"},signatures:{id:"signatures",defaultMessage:"Signatures",description:"Signatures title"},blendMode:{id:"blendMode",defaultMessage:"Blend Mode",description:"Blend Mode"},linesCount:{id:"linesCount",defaultMessage:"{arg0, plural,\n =0 {{arg0} Lines}\n one {{arg0} Line}\n two {{arg0} Lines}\n other {{arg0} Lines}\n }",description:"Amount of lines (for example in a ink annotation)."},filePath:{id:"filePath",defaultMessage:"File Path",description:"Location of a file or file name"},useAnExistingStampDesign:{id:"useAnExistingStampDesign",defaultMessage:"Use an existing stamp design",description:"Use an existing stamp design"},customStamp:{id:"customStamp",defaultMessage:"Custom Stamp",description:"Custom Stamp"},stampText:{id:"stampText",defaultMessage:"Stamp Text",description:"Stamp Text"},clear:{id:"clear",defaultMessage:"Clear",description:"Clear"},date:{id:"date",defaultMessage:"Date",description:"Date."},time:{id:"time",defaultMessage:"Time",description:"Time."},sidebar:{id:"sidebar",defaultMessage:"Sidebar",description:"Generic label for a sidebar"},gotoPageX:{id:"gotoPageX",defaultMessage:"Go to Page {arg0}",description:"Go to a page"},name:{id:"name",defaultMessage:"Name",description:"Name field usually."},chooseColor:{id:"chooseColor",defaultMessage:"Choose Color",description:"Choose color from the UI."},textHighlighter:{id:"textHighlighter",defaultMessage:"Text highlighter",description:"Highlighter tool used to highlight selected text."},undo:{id:"undo",defaultMessage:"Undo",description:"Undo last action."},redo:{id:"redo",defaultMessage:"Redo",description:"Redo last undone action."},showMore:{id:"showMore",defaultMessage:"Show More",description:"Show more"},showLess:{id:"showLess",defaultMessage:"Show Less",description:"Show Less"},nMoreComments:{id:"nMoreComments",defaultMessage:"{arg0, plural,\none {{arg0} more comment}\nother {{arg0} more comments}\n}",description:"n more comments"},documentEditor:{id:"documentEditor",defaultMessage:"Document Editor",description:"Document Editor toolbar label"},areaRedaction:{id:"areaRedaction",defaultMessage:"Area Redaction",description:"Area Redaction toolbar item label"},textRedaction:{id:"textRedaction",defaultMessage:"Text Redaction",description:"Text Redaction toolbar item label"},outlineColor:{id:"outlineColor",defaultMessage:"Outline Color",description:"Outline color"},overlayText:{id:"overlayText",defaultMessage:"Overlay text",description:"Overlay text"},insertOverlayText:{id:"overlayTextPlaceholder",defaultMessage:"Insert overlay text",description:"Overlay Text property placeholder"},repeatText:{id:"repeatText",defaultMessage:"Repeat text",description:"Repeat text placeholder"},preview:{id:"preview",defaultMessage:"Preview",description:"Preview"},markupToolbar:{id:"markupAnnotationToolbar",defaultMessage:"Markup annotation toolbar",description:"Label for the markup annotation toolbar popover"},documentViewport:{id:"documentViewport",defaultMessage:"document viewport",description:"Label for document viewport region"},top:{id:"top",defaultMessage:"Top",description:"Top"},bottom:{id:"bottom",defaultMessage:"Bottom",description:"Bottom"},resize:{id:"resize",defaultMessage:"Resize",description:"Resize action when an annotation is selected."},resizeHandleTop:{id:"resizeHandleTop",defaultMessage:"top",description:"One of the top resize handlers."},resizeHandleBottom:{id:"resizeHandleBottom",defaultMessage:"bottom",description:"One of the bottom resize handlers."},resizeHandleLeft:{id:"resizeHandleLeft",defaultMessage:"left",description:"One of the left resize handlers."},resizeHandleRight:{id:"resizeHandleRight",defaultMessage:"right",description:"One of the right resize handlers."},cropAll:{id:"cropAll",defaultMessage:"Crop All",description:"Crop all pages."},cropAllPages:{id:"cropAllPages",defaultMessage:"Crop All Pages",description:"Crop all pages."},cropCurrent:{id:"cropCurrent",defaultMessage:"Crop Current",description:"Crop current page."},cropCurrentPage:{id:"cropCurrentPage",defaultMessage:"Crop Current Page",description:"Crop current page."},documentCrop:{id:"documentCrop",defaultMessage:"Document Crop",description:"Crop document pages."},documentComparison:{id:"documentComparison",defaultMessage:"Document Comparison",description:"Compare two documents."},rotateCounterclockwise:{id:"rotateCounterclockwise",defaultMessage:"Rotate counterclockwise",description:"Label for the rotate counterclockwise button"},rotateClockwise:{id:"rotateClockwise",defaultMessage:"Rotate clockwise",description:"Label for the rotate clockwise button"},rotation:{id:"rotation",defaultMessage:"Rotate",description:"Label for the rotate button"},applyRedactions:{id:"applyRedactions",defaultMessage:"Apply Redactions",description:"Applies redactions to document"},cloudyRectangleAnnotation:{id:"cloudyRectangleAnnotation",defaultMessage:"Cloudy Rectangle",description:"Cloudy Rectangle"},dashedRectangleAnnotation:{id:"dashedRectangleAnnotation",defaultMessage:"Dashed Rectangle",description:"Dashed Rectangle"},cloudyEllipseAnnotation:{id:"cloudyEllipseAnnotation",defaultMessage:"Cloudy Ellipse",description:"Cloudy Ellipse"},dashedEllipseAnnotation:{id:"dashedEllipseAnnotation",defaultMessage:"Dashed Ellipse",description:"Dashed Ellipse"},cloudyPolygonAnnotation:{id:"cloudyPolygonAnnotation",defaultMessage:"Cloudy Polygon",description:"Cloudy Polygon"},dashedPolygonAnnotation:{id:"dashedPolygonAnnotation",defaultMessage:"Dashed Polygon",description:"Dashed Polygon"},cloudAnnotation:{id:"cloudAnnotation",defaultMessage:"Cloud",description:"Cloud Annotation"},addSignature:{id:"addSignature",defaultMessage:"Add Signature",description:"Add Signature"},storeSignature:{id:"storeSignature",defaultMessage:"Store Signature",description:"Store the signature that is in creation"},clearSignature:{id:"clearSignature",defaultMessage:"Clear Signature",description:"Clear the signature canvas"},button:{id:"button",defaultMessage:"Button Field",description:"Button Field"},textField:{id:"textField",defaultMessage:"Text Field",description:"Text Field"},radioField:{id:"radioField",defaultMessage:"Radio Field",description:"Radio Field"},checkboxField:{id:"checkboxField",defaultMessage:"Checkbox Field",description:"Checkbox Field"},comboBoxField:{id:"comboBoxField",defaultMessage:"Combo Box Field",description:"Combo Box Field"},listBoxField:{id:"listBoxField",defaultMessage:"List Box Field",description:"List Box Field"},signatureField:{id:"signatureField",defaultMessage:"Signature Field",description:"Signature Field"},dateField:{id:"dateField",defaultMessage:"Date Field",description:"Date Field"},formCreator:{id:"formCreator",defaultMessage:"Form Creator",description:"Create, edit or Delete widget annotations."},mediaAnnotation:{id:"mediaAnnotation",defaultMessage:"Media Annotation",description:"Media Annotation"},mediaFormatNotSupported:{id:"mediaFormatNotSupported",defaultMessage:"This browser does not support embedded medias.",description:"The browser does not support embedded medias"},contentEditor:{id:"contentEditor",defaultMessage:"Content Editor",description:"Content Editor"},saveAndClose:{id:"saveAndClose",defaultMessage:"Save & Close",description:"Save changes"},none:{id:"none",defaultMessage:"None",description:"Normal line"},linkAnnotation:{id:"linkAnnotation",defaultMessage:"Link",description:"Link Annotation"},measurement:{id:"measurement",defaultMessage:"Measurement",description:"Measurement"},Snapping:{id:"Snapping",defaultMessage:"Snapping",description:"Snapping"},distanceMeasurement:{id:"distanceMeasurement",defaultMessage:"Distance",description:"Measurement Annotation used to measure distance between 2 points"},multiAnnotationsSelection:{id:"multiAnnotationsSelection",defaultMessage:"Select Multiple Annotations",description:"Multiple annotations selection tool used to enable selection of multiple annotations."},rectangularAreaMeasurement:{id:"rectangularAreaMeasurement",defaultMessage:"Rectangle Area",description:"Measurement Annotation used to measure rectangle areas."},ellipseAreaMeasurement:{id:"ellipseAreaMeasurement",defaultMessage:"Ellipse Area",description:"Measurement Annotation used to measure elliptical areas."},polygonAreaMeasurement:{id:"polygonAreaMeasurement",defaultMessage:"Polygon Area",description:"Measurement Annotation used to measure polygon areas."},perimeterMeasurement:{id:"perimeterMeasurement",defaultMessage:"Perimeter",description:"Measure Annotation used to measure perimeter."},bold:{id:"bold",defaultMessage:"Bold",description:"Bold text"},italic:{id:"italic",defaultMessage:"Italic",description:"Italic text"},underline:{id:"underline",defaultMessage:"Underline",description:"Underline"},discard:{id:"discardChanges",defaultMessage:"Discard Changes",description:"Discard"},anonymous:{id:"anonymous",defaultMessage:"Anonymous",description:"Anonymous"},loading:{id:"loading",defaultMessage:"Loading...",description:"Shown while the document is being fetched"},group:{id:"group",defaultMessage:"Group",description:"Group annotations."},ungroup:{id:"ungroup",defaultMessage:"Ungroup",description:"Ungroup annotations."},mixedMeasurements:{id:"mixedMeasurements",defaultMessage:"Mixed Measurements",description:"Mixed Measurements"},mixed:{id:"mixed",defaultMessage:"Mixed",description:"Mixed"},back:{id:"back",defaultMessage:"Back",description:"back"},readOnlyAnnotationFlag:{id:"readOnly",defaultMessage:"Read-only",description:"this annotation is read only"},lockedContents:{id:"lockedContents",defaultMessage:"Locked Contents",description:"this annotation has its contents locked"},locked:{id:"locked",defaultMessage:"Locked",description:"this annotation is locked"}}),a=(0,o.vU)({numberValidationBadFormat:{id:"numberValidationBadFormat",defaultMessage:"The value entered does not match the format of the field [{arg0}]",description:"The number form field value format is wrong."},dateValidationBadFormat:{id:"dateValidationBadFormat",defaultMessage:"Invalid date/time: please ensure that the date/time exists. Field [{arg0}] should match format {arg1}",description:"The date form field value format is wrong."}})},35860:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f,z:()=>p});var o=n(25915),r=n(76154),i=n(67294),a=n(94184),s=n.n(a),l=n(35129),c=n(28890),u=n(73535),d=n.n(u);class p extends i.PureComponent{render(){const{formatMessage:e}=this.props.intl;return i.createElement(c.Z,{role:"alertdialog",onEscape:this.props.onCancel,background:"rgba(0,0,0,.1)",className:"PSPDFKit-Confirm-Dialog",accessibilityLabel:this.props.accessibilityLabel||"Confirm Dialog",accessibilityDescription:this.props.accessibilityDescription,restoreOnClose:this.props.restoreOnClose},i.createElement(c.Z.Section,{style:{paddingBottom:0}},i.createElement("div",{className:`${d().content} PSPDFKit-Confirm-Dialog-Content`},this.props.children)),i.createElement(c.Z.Section,null,i.createElement(o.hE,{className:"PSPDFKit-Confirm-Dialog-Buttons",align:"end"},i.createElement(o.zx,{autoFocus:!0,onClick:this.props.onCancel,className:s()("PSPDFKit-Confirm-Dialog-Button","PSPDFKit-Confirm-Dialog-Button-Cancel",d().button)},e(l.Z.cancel)),i.createElement(o.zx,{onClick:this.props.onConfirm,primary:!0,className:s()("PSPDFKit-Confirm-Dialog-Button","PSPDFKit-Confirm-Dialog-Button-Confirm",d().button)},e(l.Z.delete)))))}}const f=(0,r.XN)(p)},72800:(e,t,n)=>{"use strict";n.d(t,{Z:()=>P});var o=n(67294),r=n(73264),i=n(87515),a=n(66687);function s(e){const{backend:t,onInitialRenderFinished:n,pageIndex:r,pageSize:s,pageKey:l,renderPageCallback:c,zoomLevel:u,scaleFactor:d}=e,p=o.useRef(!1),f=o.useCallback((function(){p.current||(p.current=!0,n&&n())}),[n]),h=o.useMemo((function(){return new a.UL({width:Math.ceil(s.width*d),height:Math.ceil(s.height*d)})}),[s,d]),m=e.inContentEditorMode||!1;return o.createElement("div",{style:{transform:`scale(${u/d})`,transformOrigin:"0 0"},key:l},o.createElement(i.Z,{backend:t,pageIndex:r,scaledPageSize:h,originalPageSize:s,onRenderFinished:f,rect:h,renderPageCallback:c,pageKey:l,hasInitialRenderFinished:p.current,inContentEditorMode:m}))}var l=n(55961),c=n(22122),u=n(27515),d=n(88804),p=n(91859);function f(e){let{backend:t,viewportState:n,page:r,tileSize:a,tileOverlapping:s,scale:l,renderPageCallback:d,tilesRenderedCallback:f,contentState:m,crispTiles:g,inContentEditorMode:v}=e;const{pageIndex:y,pageSize:b,pageKey:w}=r,[S,P]=function(e,t,n,r,i,a,s){const[l,c]=o.useState({}),d=o.useRef([]),f=o.useMemo((function(){return function(e,t,n,o,r,i,a){const{viewportRect:s}=e,l=(0,u.Ek)(e,r),c=s.apply(l).scale(a).round(),d=t.scale(a).ceil(),f={};h(f,c,d,n,o,i,a);const m=s.grow(Math.min(p.pK,n)).apply(l).scale(a).round();return h(f,m,d,n,o,i,a)}(e,t,n,r,i,a,s)}),[i,a,t,s,r,n,e]);o.useLayoutEffect((function(){c((e=>function(e,t,n){const o={};for(const n of t)o[n]=e[n];for(const e in n)o[e]=n[e];return o}(e,d.current,f)))}),[f]);return[o.useMemo((function(){return function(e){const t=[];for(const n in e){const o=e[n],{scale:r}=o;let i=t.find((function(e){return e[0]===r}));if(void 0===i){let e;for(i=[r,[]],e=0;e<t.length&&t[e][0]<r;e++);t.splice(e,0,i)}i[1].push(o)}return t}(l)}),[l]),function(e){if(!l.hasOwnProperty(e))return void 0;const t=Object.keys(l).length;d.current.length+1>=t?(d.current=Object.keys(f),c(f)):d.current.push(e)}]}(n,b,a,s,y,w,l);return o.createElement(o.Fragment,null,S.map((e=>{let[a,s]=e;const l=b,u=l.scale(a).ceil();return o.createElement("div",{key:a},s.map((e=>o.createElement(i.Z,(0,c.Z)({key:e.key,rect:e.rect,pageIndex:y,originalPageSize:l,scaledPageSize:u,backend:t,renderPageCallback:d,onRenderFinished:()=>{P(e.key),f()},pageKey:r.pageKey,crisp:g,inContentEditorMode:v},m,{tileScale:n.zoomLevel/a})))))})))}function h(e,t,n,o,r,i,a){for(let s=0;s<=n.height;s+=o){let l=o;if(s+l>n.height&&(l=Math.floor(n.height-s)),s+l<=t.top||s>=t.bottom||l<=0)s-=r;else{for(let c=0;c<=n.width;c+=o){let u=o;if(c+o>n.width&&(u=Math.floor(n.width-c)),c+u<=t.left||c>=t.right||u<=0){c-=r;continue}const p=`${i}-sw${n.width}-sh${n.height}-x${c}-y${s}-w${u}-h${l}`;e[p]={key:p,scale:a,rect:new d.UL({width:u,height:l,left:c,top:s})},c-=r}s-=r}}return e}const m=o.memo(f,(function(e,t){return e.page.pageKey===t.page.pageKey&&!(0,u.pA)(e.viewportState,t.viewportState)&&e.inContentEditorMode===t.inContentEditorMode}));const g=(0,l.x)((function(e){var t;return{viewportState:e.viewportState,backend:e.backend,tileSize:"SERVER"===(null===(t=e.backend)||void 0===t?void 0:t.type)?p.uq:p.Bd,tileOverlapping:p.Dx,renderPageCallback:e.renderPageCallback}}))(m);var v=n(73815),y=n(36095);var b=n(58479),w=n(90523),S=n.n(w);const P=function(e){const{inViewport:t,shouldPrerender:n,rotation:i,backend:a,zoomLevel:l,renderPageCallback:c,page:u,onInitialOverviewRenderFinished:d,allowedTileScales:p,forceDetailView:f,renderPagePreview:h,isPageSizeReal:m,crispTiles:w=!1,inContentEditorMode:P,contentState:E}=e,[x,D]=o.useState(!h),C=o.useCallback((function(){D(!0),d&&d()}),[d]),k=function(e,t,n){var o;let r=(0,v.L)();const i=window.navigator,a=null==i||null===(o=i.connection)||void 0===o?void 0:o.saveData;"STANDALONE"===t.type&&y.Ni&&r>2&&(r=2),"SERVER"===t.type&&a&&(r=1);const s=e*r;return"all"===n?s:n.reduce(((e,t)=>e<s?t:e))}(l,a,p),O=o.useMemo((()=>u.pageSize.floor()),[u.pageSize]),A=o.useMemo((function(){const t=Math.min((0,v.L)(),2);return Math.min(e.viewportRect.width*t/O.width,1)}),[O.width,e.viewportRect.width]),[T,I]=o.useState(!1),F=(0,b.R9)((()=>{T||h||I(!0)})),M=t&&m&&(!h||k>1||f||l>A)?o.createElement("div",{style:{opacity:x?1:0}},o.createElement(g,{contentState:E,page:u,scale:k,key:u.pageKey,crispTiles:w,tilesRenderedCallback:F,inContentEditorMode:P})):null;return o.createElement("div",null,(!x||!m||!T&&!h)&&o.createElement("div",{className:`${S().layer} ${S().deadCenter}`},o.createElement(r.Z,{scale:1.5,rotate:-i})),(t||x||n)&&h&&m&&o.createElement(s,{backend:a,pageIndex:u.pageIndex,pageSize:O,pageKey:u.pageKey,onInitialRenderFinished:C,zoomLevel:l,scaleFactor:A,renderPageCallback:c,inContentEditorMode:P}),M)}},87515:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var o=n(84121),r=n(67294),i=n(35369),a=n(94184),s=n.n(a),l=n(86366),c=n(97333),u=n(95651),d=n(36095),p=n(10333),f=n.n(p);class h extends r.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"imageFetcherRef",r.createRef()),(0,o.Z)(this,"_fetchImage",(()=>{const{backend:e,originalPageSize:t,scaledPageSize:n,pageIndex:o,rect:r,attachments:a,renderPageCallback:s,digitalSignatures:l}=this.props,d=(this.props.annotations||(0,i.aV)()).filter(u.bz),p=this.props.formFields||(0,i.aV)(),f=this.props.formFieldValues||(0,i.aV)(),h=l&&l.signatures||[],m=this.props.inContentEditorMode||!1;let g;if((d.size>0||f.size>0)&&(g={annotations:d,formFieldValues:f,formFields:p,attachments:a||(0,i.D5)(),signatures:h}),!n.width||!n.height)return{promise:Promise.resolve(null),cancel:()=>{}};const{cancel:v,promise:y}=e.renderTile(o,n,r,!1,!m,g);return(0,c.uZ)(y.then((e=>{let{element:i}=e;if("function"==typeof s){var a,l;let u;if("IMG"===i.nodeName){var c;const e=i,t=document.createElement("canvas");t.width=r.width,t.height=r.height,u=t.getContext("2d"),null===(c=u)||void 0===c||c.drawImage(e,0,0),i=t}u||(u=i.getContext("2d")),null===(a=u)||void 0===a||a.translate(-r.left,-r.top),null===(l=u)||void 0===l||l.scale(n.width/t.width,n.height/t.height),s(u,o,t);const d=document.createElement("img");d.src=i.toDataURL(),e.element=d}return e})),v)}))}componentDidUpdate(e){const{annotations:t,formFieldValues:n}=this.props,{annotations:o,formFieldValues:r}=e;(null!=this.props.hasInitialRenderFinished&&!this.props.hasInitialRenderFinished||!this.props.scaledPageSize.equals(e.scaledPageSize)||!this.props.rect.equals(e.rect)||t&&t!==o&&!t.equals(o)||n&&n!==r&&!n.equals(r)||this.props.pageKey!==e.pageKey||this.props.inContentEditorMode!==e.inContentEditorMode)&&this.imageFetcherRef.current&&this.imageFetcherRef.current.refresh()}render(){const{onRenderFinished:e,rect:t,tileScale:n=1,crisp:o=!1}=this.props,{width:i,height:a,left:c,top:u}=t,p={width:i*n,height:a*n,left:c*n,top:u*n,outline:null},h=s()({[f().tile]:!0,[f().tileChrome]:d.i7,[f().tileFirefox]:d.vU,[f().tileSafari]:d.G6,[f().crispTile]:o});return r.createElement(l.Z,{fetchImage:this._fetchImage,className:h,rectStyle:p,onRenderFinished:e,visible:!1,ref:this.imageFetcherRef})}}},51205:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c,j:()=>u});var o=n(67294),r=n(94184),i=n.n(r),a=n(48311),s=n(22181),l=n.n(s);function c(e){let{referenceRect:t,viewportState:n,isHidden:r,children:s,title:c,className:u,wrapperClassName:d,innerWrapperClassName:p,footerClassName:f,footer:h,centeredTitle:m}=e;return o.createElement(a.Z,{referenceRect:t,viewportState:n,className:i()(l().popover,u,{[l().popoverHidden]:r})},o.createElement("div",{className:i()(l().container,d)},o.createElement("div",{className:i()(l().innerContainer,p)},o.createElement("h2",{className:i()(l().title,{[l().centeredTitle]:m})},c),s&&o.createElement("div",{className:l().content},s),h&&o.createElement("div",{className:i()(l().footer,f)},h))," "))}function u(e){let{children:t,className:n,onClick:r}=e;return o.createElement("button",{className:i()(l().footerButton,n),onClick:r},t)}},48311:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var o=n(84121),r=n(67294),i=n(94184),a=n.n(i),s=n(13944),l=n(34855),c=n(88804),u=n(30360),d=n(32905),p=n.n(d);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){let{top:o,right:r,bottom:i,left:a}=n,s=null,l=null;return e.isRectInside(t.setLocation(o))?(l=o,s="top"):e.isRectInside(t.setLocation(i))?(l=i,s="bottom"):e.isRectInside(t.setLocation(a))?(l=a,s="left"):e.isRectInside(t.setLocation(r))&&(l=r,s="right"),{direction:s,position:l}}function g(e){let{children:t,referenceRect:n,viewportRect:o,scroll:i=new c.E9,onPositionInfoChange:a,onPositionConflict:s}=e;const[u,d]=r.useState({position:null,direction:null}),[p,f]=r.useState(null);r.useLayoutEffect((()=>{if(!p)return;const e=o.translate(i);if(!e.isRectInside(n)&&!e.isRectOverlapping(n))return;const t=function(e){let{viewportRect:t,referenceRect:n,contentRect:o,scroll:r,onPositionConflict:i}=e,a=n.left+n.width/2-o.width/2;const s=new c.E9({x:a,y:n.top-o.height}),l=new c.E9({x:a,y:n.bottom});let u=n.top+n.height/2-o.height/2;const d=new c.E9({x:n.left-o.width,y:u}),p=new c.E9({x:n.right,y:u});let{position:f,direction:h}=m(t,o,{top:s,right:p,bottom:l,left:d});f||(a<t.left?a=t.left:a+o.width>t.width+t.left&&(a=t.width+t.left-o.width),u<t.top?u=t.top:u+o.height>t.height+t.top&&(u=t.height+t.top-o.height),({position:f,direction:h}=m(t,o,{top:s.set("x",a),right:p.set("y",u),bottom:l.set("x",a),left:d.set("y",u)}))),f||("function"==typeof i?({position:f,direction:h}=i({referenceRect:n,viewportRect:t,contentRect:o,scroll:r,attempts:{top:s,right:p,bottom:l,left:d}})):t.isRectOverlapping(n)&&(f=new c.E9({x:t.left+t.width/2-o.width/2,y:t.top+t.height/2-o.height/2}),h="center"));return{direction:h,position:f}}({viewportRect:e,referenceRect:n,contentRect:p,scroll:i,onPositionConflict:s});t.position&&d(t)}),[o,n,p,s,i]),r.useEffect((()=>{a&&a(u)}),[u,a]);const{direction:g}=u,v=u.position&&u.position.translate(o.getLocation().scale(-1)),y=h(h({position:"absolute"},v?{top:v.y,left:v.x}:{top:-1e5,left:-1e5}),{},{visibility:v?void 0:"hidden"}),b=e=>{(e.height||e.width||e.top||e.left)&&f(e)};return"function"==typeof t?t({style:y,direction:g,onResize:b}):r.createElement("div",{style:y},r.createElement(l.Z,{onResize:b}),t)}const v=function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()};function y(e){let{children:t,referenceRect:n,color:o,baseColor:i,className:d,arrowClassName:f,viewportState:m,onPositionInfoChange:y,arrowSize:b=5,customZIndex:w}=e;const{viewportRect:S,zoomLevel:P,scrollPosition:E}=m;return r.createElement(g,{referenceRect:n.grow(b),viewportRect:S,scroll:E.scale(P),onPositionInfoChange:y},(e=>{let{style:m,direction:g,onResize:y}=e;const P=g&&(0,u.kC)(g),E=g&&"center"!==g?function(e){let t,n,{referenceRect:o,viewportRect:r,size:i,direction:a}=e;switch("top"===a||"bottom"===a?n=o.left+o.width/2-i:t=o.top+o.height/2-i,a){case"top":t=o.top-i;break;case"bottom":t=o.top+o.height;break;case"left":n=o.left-i;break;case"right":n=o.left+o.width;break;default:throw new Error("invalid direction")}return new c.E9({y:t,x:n}).translate(r.getLocation().scale(-1))}({referenceRect:n,viewportRect:S,size:b,direction:g}):null,x={};let D;if(o){switch(g){case"top":x.color=o[o.length-1].toCSSValue();break;case"bottom":x.color=o[0].toCSSValue();break;default:x.color=o[Math.floor((o.length-1)/2)].toCSSValue()}const e=o.map(((e,t)=>`${e.toCSSValue()} ${100*t/(o.length-1)}%`)).join(", ");i&&(m=h(h({},m),{},{backgroundColor:i.toCSSValue()}),D={color:i.toCSSValue()}),m=h(h({},m),{},{backgroundImage:`linear-gradient(to bottom, ${e})`,zIndex:w})}return r.createElement(s.Z,{onPointerUp:v},r.createElement("div",{className:d},E&&r.createElement("span",{style:h(h({},D),{},{zIndex:w})},r.createElement("div",{style:h({position:"absolute",top:E.y,left:E.x,width:b,height:b,zIndex:w},x),className:a()(p().arrow,f,P&&p()[`arrow${P}`],"PSPDFKit-Popover-Arrow",P&&"PSPDFKit-Popover-Arrow-"+P)})),r.createElement("div",{style:m,className:a()(p().root,"PSPDFKit-Popover",P&&"PSPDFKit-Popover-"+P)},t,r.createElement(l.Z,{onResize:y}))))}))}},54543:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});var o=n(47347),r=n(49242);const i=e=>t=>e(function(e){const t=e.nativeEvent||e;let n=!1,i=0,a=0;const s=t.shiftKey;let l=t.pointerType||"mouse";const c=(void 0!==e.touches||void 0!==e.changedTouches)&&void 0===e.width;c?(l="touch",n=1==t.touches.length||"touchend"===e.type,n&&t.changedTouches.length&&(i=t.changedTouches[0].clientX,a=t.changedTouches[0].clientY)):(n=e.isPrimary||(0,r.I)(e),i=e.clientX,a=e.clientY);let u={clientX:i,clientY:a,isPrimary:n,pointerType:l,shiftKey:s,metaKey:t.metaKey,ctrlKey:t.ctrlKey,getCoalescedEvents:"function"==typeof t.getCoalescedEvents?()=>{const e=t.getCoalescedEvents.call(t);return e.length?e:[u]}:()=>[u],stopPropagation:()=>{e.stopPropagation(),t.stopImmediatePropagation()},preventDefault:()=>{e.preventDefault()},get target(){if(c&&void 0!==e.target.ownerDocument){const t=e.target.ownerDocument;return t&&t.elementFromPoint?t.elementFromPoint(i,a):e.target}return e.target},nativeEvent:t,get buttons(){return c?(0,o.ZK)("TouchEvent do not have the method buttons"):e.buttons}};return u}(t))},13944:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var o=n(22122),r=n(84121),i=n(67294),a=n(47347),s=n(54543),l=n(71231),c=n(36095);const u=l.Gn?{passive:!1}:void 0,d=!l.Gn||{passive:!1,capture:!0},p=1e3;let f=0,h=0;function m(e){return e?function(){if(f=Date.now(),!(Date.now()-h<p))return e(...arguments)}:e}function g(e){return e?function(){const t=Date.now();if(!(t-h<p||t-f<p))return e(...arguments)}:e}function v(e){return e?function(){return h=Date.now(),e(...arguments)}:e}function y(){}class b extends i.PureComponent{constructor(){super(...arguments),(0,r.Z)(this,"_attachedListeners",{touchstart:[null,null],touchmove:[null,null],touchend:[null,null],touchcancel:[null,null],mousedown:[null,null],mousemove:[null,null],mouseup:[null,null],mouseenter:[null,null],mouseleave:[null,null],pointerdown:[null,null],pointermove:[null,null],pointerup:[null,null],pointerenter:[null,null],pointerleave:[null,null],pointercancel:[null,null]}),(0,r.Z)(this,"_handleRef",(e=>{this.props.onDOMElement&&this.props.onDOMElement(e),e&&((0,a.kG)("string"==typeof e.nodeName,"PRC requires a basic HTML element as children (so that we can find the proper `ownerDocument`)."),this._refDocument=e.ownerDocument)}))}componentDidMount(){this._updateRootListeners(this.props)}componentDidUpdate(){this._updateRootListeners(this.props)}componentWillUnmount(){this._removeAllRootListeners()}_updateListener(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=this._refDocument;let r=null,i=null;const a=this._attachedListeners[e][n?1:0];if(a&&([r,i]=a),i!==t&&(r&&(o.removeEventListener(e,r,n?d:u),this._attachedListeners[e][n?1:0]=null),"function"==typeof t)){const r=(0,s.S)(t);o.addEventListener(e,r,n?d:u),this._attachedListeners[e][n?1:0]=[r,t]}}_removeAllRootListeners(){const e=this._refDocument;Object.entries(this._attachedListeners).forEach((t=>{let[n,o]=t;const[r,i]=o;r&&e.removeEventListener(n,r[0],u),i&&e.removeEventListener(n,i[0],d)}))}_updateRootListeners(e){Object.entries(e).forEach((e=>{let[t,n]=e;switch(t){case"onRootPointerDown":this._updateListener("touchstart",m(n)),this.disablePointerEvents||this._updateListener("pointerdown",v(n)),this._updateListener("mousedown",g(n));break;case"onRootPointerDownCapture":this._updateListener("touchstart",m(n),!0),this.disablePointerEvents||this._updateListener("pointerdown",v(n),!0),this._updateListener("mousedown",g(n),!0);break;case"onRootPointerMove":this._updateListener("touchmove",m(n)),this.disablePointerEvents||this._updateListener("pointermove",v(n)),this._updateListener("mousemove",g(n));break;case"onRootPointerMoveCapture":this._updateListener("touchmove",m(n),!0),this.disablePointerEvents||this._updateListener("pointermove",v(n),!0),this._updateListener("mousemove",g(n),!0);break;case"onRootPointerUp":this._updateListener("touchend",m(n)),this.disablePointerEvents||this._updateListener("pointerup",v(n)),this._updateListener("mouseup",g(n));break;case"onRootPointerEnter":this.disablePointerEvents||this._updateListener("pointerenter",v(n)),this._updateListener("mouseenter",g(n));break;case"onRootPointerLeave":this.disablePointerEvents||this._updateListener("pointerleave",v(n)),this._updateListener("mouseleave",g(n));break;case"onRootPointerUpCapture":this._updateListener("touchend",m(n),!0),this.disablePointerEvents||this._updateListener("pointerup",v(n),!0),this._updateListener("mouseup",g(n),!0);break;case"onRootPointerEnterCapture":this.disablePointerEvents||this._updateListener("pointerenter",v(n),!0),this._updateListener("mouseenter",g(n),!0);break;case"onRootPointerLeaveCapture":this.disablePointerEvents||this._updateListener("pointerleave",v(n),!0),this._updateListener("mouseleave",g(n),!0);break;case"onRootPointerCancel":this.disablePointerEvents||this._updateListener("pointercancel",v(n)),this._updateListener("touchcancel",m(n));break;case"onRootPointerCancelCapture":this.disablePointerEvents||this._updateListener("pointercancel",v(n),!0),this._updateListener("touchcancel",m(n),!0)}}))}render(){const e={};let t=!1;if(this.disablePointerEvents="INK"!==this.props.interactionMode&&(0,c.yx)(),Object.entries(this.props).forEach((n=>{let[o,r]=n;if("function"==typeof r)switch(o){case"onPointerDown":e.onTouchStart=m((0,s.S)(r)),this.disablePointerEvents||(e.onPointerDown=v((0,s.S)(r))),e.onMouseDown=g((0,s.S)(r)),t=!0;break;case"onPointerDownCapture":e.onTouchStartCapture=m((0,s.S)(r)),this.disablePointerEvents||(e.onPointerDownCapture=v((0,s.S)(r))),e.onMouseDownCapture=g((0,s.S)(r)),t=!0;break;case"onPointerMove":e.onTouchMove=m((0,s.S)(r)),this.disablePointerEvents||(e.onPointerMove=v((0,s.S)(r))),e.onMouseMove=g((0,s.S)(r)),t=!0;break;case"onPointerMoveCapture":e.onTouchMoveCapture=m((0,s.S)(r)),this.disablePointerEvents||(e.onPointerMoveCapture=v((0,s.S)(r))),e.onMouseMoveCapture=g((0,s.S)(r)),t=!0;break;case"onPointerUp":e.onTouchEnd=m((0,s.S)(r)),this.disablePointerEvents||(e.onPointerUp=v((0,s.S)(r))),e.onMouseUp=g((0,s.S)(r)),t=!0;break;case"onPointerUpCapture":e.onTouchEndCapture=m((0,s.S)(r)),this.disablePointerEvents||(e.onPointerUpCapture=v((0,s.S)(r))),e.onMouseUpCapture=g((0,s.S)(r)),t=!0;break;case"onPointerEnter":this.disablePointerEvents||(e.onPointerEnter=v((0,s.S)(r))),e.onMouseEnter=g((0,s.S)(r)),t=!0;break;case"onPointerEnterCapture":this.disablePointerEvents||(e.onPointerEnterCapture=v((0,s.S)(r))),e.onMouseEnterCapture=g((0,s.S)(r)),t=!0;break;case"onPointerLeave":this.disablePointerEvents||(e.onPointerLeave=v((0,s.S)(r))),e.onMouseLeave=g((0,s.S)(r)),t=!0;break;case"onPointerLeaveCapture":this.disablePointerEvents||(e.onPointerLeaveCapture=v((0,s.S)(r))),e.onMouseLeaveCapture=g((0,s.S)(r)),t=!0;break;case"onPointerCancel":this.disablePointerEvents||(e.onPointerCancel=v((0,s.S)(r))),e.onTouchCancel=m((0,s.S)(r)),t=!0;break;case"onPointerCancelCapture":this.disablePointerEvents||(e.onPointerCancelCapture=v((0,s.S)(r))),e.onTouchCancelCapture=m((0,s.S)(r)),t=!0;break;case"onRootPointerDown":case"onRootPointerDownCapture":e.onTouchStart=e.onTouchStart||y,this.disablePointerEvents||(e.onPointerDown=e.onPointerDown||y),e.onMouseDown=e.onMouseDown||y;break;case"onRootPointerMove":case"onRootPointerMoveCapture":e.onTouchMove=e.onTouchMove||y,this.disablePointerEvents||(e.onPointerMove=e.onPointerMove||y),e.onMouseMove=e.onMouseMove||y;break;case"onRootPointerUp":case"onRootPointerUpCapture":e.onTouchEnd=e.onTouchEnd||y,this.disablePointerEvents||(e.onPointerUp=e.onPointerUp||y),e.onMouseUp=e.onMouseUp||y;break;case"onRootPointerEnter":case"onRootPointerEnterCapture":this.disablePointerEvents||(e.onPointerEnter=e.onPointerEnter||y),e.onMouseEnter=e.onMouseEnter||y;break;case"onRootPointerLeave":case"onRootPointerLeaveCapture":this.disablePointerEvents||(e.onPointerLeave=e.onPointerLeave||y),e.onMouseLeave=e.onMouseLeave||y;break;case"onRootPointerCancel":case"onRootPointerCancelCapture":this.disablePointerEvents||(e.onPointerCancel=e.onPointerCancel||y),e.onTouchCancel=e.onTouchCancel||y}})),!t)return i.createElement("div",(0,o.Z)({ref:this._handleRef},e),this.props.children);const n=i.Children.only(this.props.children);return e.ref=this._handleRef,(0,a.kG)(!n.ref,"PRC requires the child element to not have a `ref` assigned. Consider inserting a new `<div>` in between."),i.cloneElement(n,e)}}},41775:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});const o=(0,n(76154).vU)({approved:{id:"approved",defaultMessage:"Approved",description:"Approved Stamp Annotation"},notApproved:{id:"notApproved",defaultMessage:"Not Approved",description:"Not Approved Stamp Annotation"},draft:{id:"draft",defaultMessage:"Draft",description:"Draft Stamp Annotation"},final:{id:"final",defaultMessage:"Final",description:"Final Stamp Annotation"},completed:{id:"completed",defaultMessage:"Completed",description:"Completed Stamp Annotation"},confidential:{id:"confidential",defaultMessage:"Confidential",description:"Confidential Stamp Annotation"},forPublicRelease:{id:"forPublicRelease",defaultMessage:"For Public Release",description:"For Public Release Stamp Annotation"},notForPublicRelease:{id:"notForPublicRelease",defaultMessage:"Not For Public Release",description:"Not For Public Release Stamp Annotation"},forComment:{id:"forComment",defaultMessage:"For Comment",description:"ForComment Stamp Annotation"},void:{id:"void",defaultMessage:"Void",description:"Void Stamp Annotation"},preliminaryResults:{id:"preliminaryResults",defaultMessage:"Preliminary Results",description:"Preliminary Results Stamp Annotation"},informationOnly:{id:"informationOnly",defaultMessage:"Information Only",description:"Information Only Stamp Annotation"},rejected:{id:"rejected",defaultMessage:"Rejected",description:"Rejected Stamp Annotation"},accepted:{id:"accepted",defaultMessage:"Accepted",description:"Accepted Stamp Annotation"},initialHere:{id:"initialHere",defaultMessage:"Initial Here",description:"Initial Here Stamp Annotation"},signHere:{id:"signHere",defaultMessage:"Sign Here",description:"Sign Here Stamp Annotation"},witness:{id:"witness",defaultMessage:"Witness",description:"Witness Stamp Annotation"},asIs:{id:"asIs",defaultMessage:"As Is",description:"As Is Stamp Annotation"},departmental:{id:"departmental",defaultMessage:"Departmental",description:"Departmental Stamp Annotation"},experimental:{id:"experimental",defaultMessage:"Experimental",description:"Experimental Stamp Annotation"},expired:{id:"expired",defaultMessage:"Expired",description:"Expired Stamp Annotation"},sold:{id:"sold",defaultMessage:"Sold",description:"Sold Stamp Annotation"},topSecret:{id:"topSecret",defaultMessage:"Top Secret",description:"TopSecret Stamp Annotation"},revised:{id:"revised",defaultMessage:"Revised",description:"Revised Stamp Annotation"},custom:{id:"custom",defaultMessage:"Custom",description:"Custom Stamp Annotation"},stampAnnotationTemplatesDialog:{id:"stampAnnotationTemplatesDialog",defaultMessage:"Stamp Annotation Templates",description:"Stamp Annotation Templates Dialog"},stampAnnotationTemplatesDialogDescription:{id:"stampAnnotationTemplatesDialogDesc",defaultMessage:"This dialog lets you select a stamp annotation to insert into the document or create a custom stamp annotation with your own text.",description:"Stamp Annotation Templates Dialog Description"}})},11010:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var o=n(22122),r=n(67294),i=n(94184),a=n.n(i),s=(n(44364),n(94505)),l=n(27435),c=n.n(l);const u=r.forwardRef((function(e,t){const{selected:n,disabled:i}=e,l=a()(c().root,n&&c().isActive,i&&c().isDisabled,"string"==typeof e.className&&e.className,"PSPDFKit-Toolbar-Button",n&&"PSPDFKit-Toolbar-Button-active",i&&"PSPDFKit-Toolbar-Button-disabled");return r.createElement(s.Z,(0,o.Z)({},e,{className:l,iconClassName:"PSPDFKit-Toolbar-Button-Icon",ref:t,itemComponentProps:e.itemComponentProps}))}))},98013:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>Ie,k3:()=>Ce});var o=n(84121),r=n(67294),i=n(35369),a=n(94184),s=n.n(a),l=n(30845),c=n(76154),u=n(47347),d=n(25915),p=n(30667),f=n(67366),h=n(7844),m=n(22122),g=n(67665),v=n(41756),y=n(26353),b=n(84013),w=n(47710),S=n(63738),P=n(58924),E=n(93628),x=n.n(E),D=n(60964),C=n.n(D),k=n(11010),O=n(23477),A=n.n(O),T=n(77973),I=n(3219),F=n(34573),M=n(11521),_=n.n(M),N=n(13448);function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function B(e){let{isActive:t,isHighlighted:n,type:o,title:i,className:a,itemProps:l}=e;return r.createElement("span",(0,m.Z)({className:s()(C().button,a,"PSPDFKit-Layout-Config-Option",t&&"PSPDFKit-Layout-Config-Option-Active",n&&"PSPDFKit-Layout-Config-Option-Highlighted"),title:i,"aria-label":i},l),(0,N.Z)({type:`layout-config/${o.toLowerCase()}`,style:{width:36,height:36},className:s()(C().icon,t&&C().activeIcon,n&&C().highlightedIcon,"PSPDFKit-Layout-Config-Option-Icon")}))}const j=[{type:"layout",mode:T.X.SINGLE},{type:"layout",mode:T.X.DOUBLE},{type:"layout",mode:T.X.AUTO},{type:"scroll",mode:w.G.CONTINUOUS},{type:"scroll",mode:w.G.PER_SPREAD},{type:"rotate",mode:"-90"},{type:"rotate",mode:"90"}];function z(e,t){switch(t.type){case v.ZP.stateChangeTypes.keyDownEnter:case v.ZP.stateChangeTypes.clickItem:return L(L({},t),{},{isOpen:e.isOpen,highlightedIndex:e.highlightedIndex});default:return t}}const K=(0,c.XN)((function(e){const{dispatch:t,layoutMode:n,scrollMode:o,disabled:i}=e,{formatMessage:a}=e.intl,l=r.useRef();return r.createElement(v.ZP,{onSelect:function(e){if(e)switch(e.type){case"layout":t((0,S.YA)(e.mode));break;case"scroll":t((0,S._U)(e.mode));break;case"rotate":t((0,I.U1)(e.mode))}},itemToString:e=>null===e?"":`${e.type} ${e.mode}`,stateReducer:z,environment:e.frameWindow},(c=>{let{getToggleButtonProps:u,getMenuProps:d,getItemProps:p,isOpen:f,highlightedIndex:h,setHighlightedIndex:v}=c,S=!1;const E=d({onMouseDown:()=>{S=!0},onTouchStart:()=>{S=!0}},{suppressRefError:!0}),D=u(),O="down"===e.caretDirection;return r.createElement("div",{className:s()(f&&"PSPDFKit-Input-Dropdown-open")},r.createElement("div",(0,m.Z)({ref:l},L(L({},D),e.disabled?{onClick:null}:null),{onBlur:function(e){if(S&&(S=!1,e.nativeEvent.preventDownshiftDefault=!0,l.current)){const e=l.current.querySelector("button");e&&e.focus()}D.onBlur(e)}}),r.createElement(k.Z,{type:"layout-config",selected:f,title:a(Z.pageLayout),icon:e.icon,className:s()(A().toolbarButton,"PSPDFKit-Toolbar-Button-Layout-Config",e.className),onPress:e=>{e.target.focus&&e.target.focus(),f||t((0,F.fz)())},disabled:i})),r.createElement(g.m,null,r.createElement(b.Z,null,f&&r.createElement(y.Z,{timeout:{enter:window["PSPDFKit-disable-animations"]?0:240,exit:window["PSPDFKit-disable-animations"]?0:80},classNames:{enter:s()(_().scaleInEnter,{[_().scaleInEnterTop]:O,[_().scaleInEnterBottom]:!O}),enterActive:_().scaleInEnterActive,exit:s()(_().scaleInExit,{[_().scaleInExitTop]:O,[_().scaleInExitBottom]:!O}),exitActive:s()(_().scaleInExitActive,{[_().scaleInExitActiveTop]:O,[_().scaleInExitActiveBottom]:!O})}},r.createElement(P.Z,{referenceElement:l.current,horizontalAlignment:"center"},r.createElement("div",(0,m.Z)({},E,{className:s()(x().root,C().dropdownMenu,"PSPDFKit-Dropdown-Layout-Config",{[C().dropdownMenuUp]:!O}),style:{padding:0},onMouseLeave:()=>v(null)}),r.createElement("table",{className:s()(C().table,"PSPDFKit-Layout-Config")},r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",{className:"PSPDFKit-Layout-Config-Label"},a(Z.pageMode)),r.createElement("td",{style:{textAlign:"right"},className:"PSPDFKit-Layout-Config-Options"},r.createElement(B,{itemProps:p({item:j[0]}),isActive:n===T.X.SINGLE,isHighlighted:0===h,type:T.X.SINGLE,className:"PSPDFKit-Layout-Config-Option-Layout-Mode-Single",title:a(Z.pageModeSingle)}),r.createElement(B,{itemProps:p({item:j[1]}),isActive:n===T.X.DOUBLE,isHighlighted:1===h,type:T.X.DOUBLE,className:"PSPDFKit-Layout-Config-Option-Layout-Mode-Double",title:a(Z.pageModeDouble)}),r.createElement(B,{itemProps:p({item:j[2]}),isActive:n===T.X.AUTO,isHighlighted:2===h,type:T.X.AUTO,className:"PSPDFKit-Layout-Config-Option-Layout-Mode-Auto",title:a(Z.pageModeAutomatic)}))),r.createElement("tr",null,r.createElement("td",{className:"PSPDFKit-Layout-Config-Label"},a(Z.pageTransition)),r.createElement("td",{style:{textAlign:"right"},className:"PSPDFKit-Layout-Config-Options"},r.createElement(B,{itemProps:p({item:j[3]}),isActive:o===w.G.CONTINUOUS,isHighlighted:3===h,type:w.G.CONTINUOUS,className:"PSPDFKit-Layout-Config-Option-Scroll-Mode-Continuous",title:a(Z.pageTransitionContinuous)}),r.createElement(B,{itemProps:p({item:j[4]}),isActive:o===w.G.PER_SPREAD,isHighlighted:4===h,type:"single",className:"PSPDFKit-Layout-Config-Option-Scroll-Mode-Per-Spread",title:a(Z.pageTransitionJump)}))),r.createElement("tr",null,r.createElement("td",{className:"PSPDFKit-Layout-Config-Label"},a(Z.pageRotation)),r.createElement("td",{style:{textAlign:"right"},className:"PSPDFKit-Layout-Config-Options"},r.createElement(B,{itemProps:p({item:j[5]}),type:"view_rotate_left",title:a(Z.pageRotationLeft),className:"PSPDFKit-Layout-Config-Option-Page-Rotation-Left",isHighlighted:5===h,isActive:!1}),r.createElement(B,{itemProps:p({item:j[6]}),type:"view_rotate_right",title:a(Z.pageRotationRight),className:"PSPDFKit-Layout-Config-Option-Page-Rotation-Right",isHighlighted:6===h,isActive:!1})))))))))),!f&&r.createElement("div",E),r.createElement(g.m,null,r.createElement(b.Z,null,f&&r.createElement(y.Z,{timeout:{enter:window["PSPDFKit-disable-animations"]?0:240,exit:window["PSPDFKit-disable-animations"]?0:80},classNames:{enter:s()(_().scaleInEnter,{[_().scaleInEnterTop]:O,[_().scaleInEnterBottom]:!O}),enterActive:_().scaleInEnterActive,exit:s()(_().scaleInExit,{[_().scaleInExitTop]:O,[_().scaleInExitBottom]:!O}),exitActive:s()(_().scaleInExitActive,{[_().scaleInExitActiveTop]:O,[_().scaleInExitActiveBottom]:!O})}},r.createElement(P.Z,{referenceElement:l.current,horizontalAlignment:"center"},r.createElement(r.Fragment,null,r.createElement("div",{className:s()(C().arrow,{[C().arrowUp]:!O})},r.createElement("div",{className:s()({[C().arrowFill]:O,[C().arrowFillUp]:!O})}))))))))}))}));const Z=(0,c.vU)({pageLayout:{id:"pageLayout",defaultMessage:"Page Layout",description:'Button to open the "change page layout" menu'},pageMode:{id:"pageMode",defaultMessage:"Page Mode",description:"Label for the page mode configuration"},pageModeSingle:{id:"pageModeSingle",defaultMessage:"Single",description:"Single page mode"},pageModeDouble:{id:"pageModeDouble",defaultMessage:"Double",description:"Double page mode"},pageModeAutomatic:{id:"pageModeAutomatic",defaultMessage:"Automatic",description:"Automatic page mode"},pageTransition:{id:"pageTransition",defaultMessage:"Page Transition",description:"Label for the page transition mode"},pageTransitionContinuous:{id:"pageTransitionContinuous",defaultMessage:"Continuous",description:"Continuous page transition mode"},pageTransitionJump:{id:"pageTransitionJump",defaultMessage:"Jump",description:"Jump-ing page transition mode (one page at the time)"},pageRotation:{id:"pageRotation",defaultMessage:"Page Rotation",description:"Label for the page rotation mode (left, right)"},pageRotationLeft:{id:"pageRotationLeft",defaultMessage:"Rotate Left",description:"Button to rotate the page to the left of 90°"},pageRotationRight:{id:"pageRotationRight",defaultMessage:"Rotate Right",description:"Button to rotate the page to the right of 90°"}});var U=n(13540),V=n(36105),G=n.n(V);const W=e=>{["-","+",".","e","E"].some((t=>e.key===t))&&e.preventDefault()},q=e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},H=e=>{e.currentTarget.select()},$=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{withParens:!1};return t=>r.createElement("div",{className:G().desktop},e.withParens&&"(",t.map(((e,t)=>r.createElement("span",{key:t},e))),e.withParens&&")")};const X=(0,c.XN)((function(e){const t=e.pages.get(e.currentPageNumber-1);(0,u.kG)(null!=t,`Couldn't get page number ${e.currentPageNumber}`);const o=r.useMemo((()=>e.pages.some((e=>e.pageLabel!==(e.pageIndex+1).toString()))),[e.pages]),[i,a]=r.useState(null==t?void 0:t.pageLabel);r.useEffect((()=>{a(null==t?void 0:t.pageLabel)}),[null==t?void 0:t.pageLabel]);const l=n=>{if(o){const t=e.pages.findIndex((e=>e.pageLabel===n));if(t>=0&&!e.readOnly)return void e.dispatch((0,I.YA)(t))}const r=parseInt(n);1<=r&&r<=e.totalPages&&!e.readOnly?e.dispatch((0,I.YA)(r-1)):a(t.pageLabel)},{formatMessage:d}=e.intl,p=s()({"PSPDFKit-Page-Indicator-Prev":!0,[G().prev]:!0,"PSPDFKit-Page-Indicator-Prev-disabled":1===e.currentPageNumber}),f=s()({"PSPDFKit-Page-Indicator-Next":!0,[G().next]:!0,"PSPDFKit-Page-Indicator-Next-disabled":e.currentPageNumber===e.totalPages}),h=r.createElement("div",{className:G().control},r.createElement("button",{className:p,title:d(Y.prevPage),onClick:()=>e.dispatch((0,I.IT)()),disabled:1===e.currentPageNumber||e.readOnly},r.createElement(U.Z,{src:n(28069),className:G().icon})),r.createElement("label",{className:G().inputLabel,htmlFor:G().input},d(Y.goToPage)),r.createElement("input",(0,m.Z)({id:G().input,type:o?"text":"number",value:i,className:`PSPDFKit-Page-Indicator-Input ${G().input}`,onMouseDown:q,onFocus:H,onChange:t=>{e.readOnly||a(t.currentTarget.value)},onBlur:e=>{l(e.currentTarget.value)},onKeyPress:e=>{"Enter"===e.key&&l(e.currentTarget.value)},disabled:e.readOnly},o?{}:{min:1,max:e.totalPages,onKeyDown:W,pattern:"[0-9]"})),r.createElement("button",{className:f,onClick:()=>e.dispatch((0,I.fz)()),title:d(Y.nextPage),disabled:e.currentPageNumber===e.totalPages||e.readOnly},r.createElement(U.Z,{src:n(14341),className:G().icon})));return r.createElement("div",{className:`PSPDFKit-Page-Indicator ${G().root}`},o?r.createElement(r.Fragment,null,r.createElement(c._H,{id:"pageX",defaultMessage:"Page {arg0}",description:"Page indicator prefix",values:{arg0:h},children:$()}),r.createElement(c._H,{id:"XofY",defaultMessage:"{arg0} of {arg1}",description:"Page indicator label",values:{arg0:e.currentPageNumber,arg1:e.totalPages},children:$({withParens:!0})})):r.createElement(c._H,{id:"pageXofY",defaultMessage:"Page {arg0} of {arg1}",description:"Page indicator control. arg0 is an interactive widget to select pages.",values:{arg0:h,arg1:e.totalPages},children:$()}),r.createElement("div",{className:G().mobile},r.createElement("label",{className:G().label},r.createElement("strong",null,e.currentPageNumber)," ","/"," ",e.totalPages)))})),Y=(0,c.vU)({prevPage:{id:"prevPage",defaultMessage:"Previous Page",description:"Button to go to the previous page"},nextPage:{id:"nextPage",defaultMessage:"Next Page",description:"Button to go to the next page"},goToPage:{id:"goToPage",defaultMessage:"Go to Page",description:"label for the go to page selector"}}),J=(0,f.$j)((e=>({currentPageNumber:e.viewportState.currentPageIndex+1})))(X);var Q=n(11378),ee=n(44706),te=n(84747),ne=n(66687),oe=n(18146),re=n(3845),ie=n(38151),ae=n(69939),se=n(51333),le=n(77528),ce=n(25644),ue=n(70006),de=n(36095);function pe(e,t){const n=document.createElement("a");n.href=e,n.style.display="none",n.download=t,n.setAttribute("download",t);const o=document.body;return o?(o.appendChild(n),n.click(),()=>{const e=document.body;e&&e.removeChild(n)}):()=>{}}var fe=n(97528),he=n(20792),me=n(19702),ge=n(28098),ve=n(67628),ye=n(89e3),be=n(35129),we=n(92234),Se=n(2270),Pe=n(16126),Ee=n(96114);function xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ce=44;class ke extends r.Component{constructor(){for(var e,t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];super(...n),e=this,(0,o.Z)(this,"state",{currentPageIndex:0,items:null,responsiveGroupItems:null,activeResponsiveGroup:null,mediaQueryDidUpdate:{},lastSelectedToolbarItemType:null,prevActiveGroup:null}),(0,o.Z)(this,"imagePickerRef",r.createRef()),(0,o.Z)(this,"itemToFocusRef",r.createRef()),(0,o.Z)(this,"_mediaListeners",{}),(0,o.Z)(this,"_handlePanTap",(()=>{const{interactionMode:e,dispatch:t}=this.props;t((0,F.fz)()),e===he.A.PAN?t((0,I.Yr)()):t((0,I.vc)())})),(0,o.Z)(this,"handleFormDesignerTap",(()=>{const{interactionMode:e,dispatch:t}=this.props;t((0,F.fz)()),(0,Pe.fF)(e)?t((0,Ee.h4)()):t((0,Ee.el)())})),(0,o.Z)(this,"_handleZoomOutTap",(()=>{this.props.dispatch((0,I.vG)())})),(0,o.Z)(this,"_handleZoomInTap",(()=>{this.props.dispatch((0,I.kr)())})),(0,o.Z)(this,"_handleUndoTap",(()=>{this.props.canUndo&&this.props.dispatch((0,we.Yw)())})),(0,o.Z)(this,"_handleRedoTap",(()=>{this.props.canRedo&&this.props.dispatch((0,we.KX)())})),(0,o.Z)(this,"_handleMarqueeZoomTap",(()=>{const{interactionMode:e,dispatch:t}=this.props;t((0,F.fz)()),e===he.A.MARQUEE_ZOOM?t((0,S.si)()):t((0,S.xF)())})),(0,o.Z)(this,"_handleFitToWidthTap",(()=>{this.props.dispatch((0,I.du)())})),(0,o.Z)(this,"_handleFitToBothTap",(()=>{this.props.dispatch((0,I.lO)())})),(0,o.Z)(this,"handleCalloutTap",((e,t,n)=>{const{interactionMode:o,dispatch:r}=this.props;r((0,F.fz)()),o===he.A.CALLOUT&&n===this.props.currentItemPreset?(r((0,ae.Ds)(null)),r((0,S.k4)())):(r((0,ae.Ds)(n)),r((0,S.Lt)()))})),(0,o.Z)(this,"_handleTextTap",((e,t,n)=>{const{interactionMode:o,dispatch:r}=this.props;r((0,F.fz)()),o===he.A.TEXT&&n===this.props.currentItemPreset?(r((0,ae.Ds)(null)),r((0,S.k4)())):(r((0,ae.Ds)(n)),r((0,S.DU)()))})),(0,o.Z)(this,"_handleTextKeyPress",(()=>{const{dispatch:e}=this.props;e((0,F.fz)()),e((0,ae.RK)())})),(0,o.Z)(this,"_handleTextHighlighterTap",((e,t,n)=>{const{interactionMode:o,dispatch:r}=this.props;r((0,F.fz)()),o===he.A.TEXT_HIGHLIGHTER&&n===this.props.currentItemPreset?r((0,S.lC)()):r((0,S.d5)(n))})),(0,o.Z)(this,"_handleLinkTap",((e,t,n)=>{const{interactionMode:o,dispatch:r}=this.props;r((0,F.fz)()),o===he.A.LINK&&n===this.props.currentItemPreset?(r((0,ae.Ds)(null)),r((0,S.UU)())):(r((0,ae.Ds)(n)),r((0,S.Jn)()))})),(0,o.Z)(this,"_handleInkTap",((e,t,n)=>{const{interactionMode:o,dispatch:r}=this.props;r((0,F.fz)()),o===he.A.INK&&n===this.props.currentItemPreset?(r((0,ae.Ds)(null)),r((0,S.s3)())):(r((0,ae.Ds)(n)),r((0,S.P4)()))})),(0,o.Z)(this,"_handleMeasurementTap",((e,t,n)=>{const{interactionMode:o,dispatch:r}=this.props;r((0,F.fz)()),o===he.A.MEASUREMENT&&n===this.props.currentItemPreset?(r((0,ae.Ds)(null)),r((0,S.hS)())):(r((0,ae.Ds)(n)),r((0,S.BR)()))})),(0,o.Z)(this,"_handleInkEraserTap",((e,t,n)=>{const{interactionMode:o,dispatch:r}=this.props;r((0,F.fz)()),o===he.A.INK_ERASER?(r((0,ae.Ds)(null)),r((0,S.VU)())):(r((0,ae.Ds)(n)),r((0,S.Ug)()))})),(0,o.Z)(this,"_handleLineTap",((e,t,n)=>this._handleShapeTap(ne.o9,he.A.SHAPE_LINE,n))),(0,o.Z)(this,"_handleRectangleTap",((e,t,n)=>this._handleShapeTap(ne.b3,he.A.SHAPE_RECTANGLE,n))),(0,o.Z)(this,"_handleEllipseTap",((e,t,n)=>this._handleShapeTap(ne.Xs,he.A.SHAPE_ELLIPSE,n))),(0,o.Z)(this,"_handlePolygonTap",((e,t,n)=>this._handleShapeTap(ne.Hi,he.A.SHAPE_POLYGON,n))),(0,o.Z)(this,"_handlePolylineTap",((e,t,n)=>this._handleShapeTap(ne.om,he.A.SHAPE_POLYLINE,n))),(0,o.Z)(this,"_handleShapeTap",((e,t,n)=>{const{interactionMode:o,dispatch:r}=this.props;r((0,F.fz)()),o===t&&n===this.props.currentItemPreset?(r((0,ae.Ds)(null)),r((0,S.Ce)())):(r((0,ae.Ds)(n)),r((0,S.yg)(e,t)))})),(0,o.Z)(this,"_handleNoteTap",((e,t,n)=>{const{interactionMode:o,dispatch:r}=this.props;r((0,F.fz)()),o===he.A.NOTE&&n===this.props.currentItemPreset?(r((0,ae.Ds)(null)),r((0,S.dp)())):(r((0,ae.Ds)(n)),r((0,S.i9)()))})),(0,o.Z)(this,"_handleNoteKeyPress",(()=>{const{dispatch:e}=this.props;e((0,F.fz)()),e((0,ae.XG)())})),(0,o.Z)(this,"_handleCommentMarkerTap",(()=>{const{interactionMode:e,dispatch:t}=this.props;t((0,F.fz)()),e===he.A.COMMENT_MARKER?t((0,S.tr)()):t((0,S.k6)())})),(0,o.Z)(this,"_handleCommentMarkerKeyPress",(()=>{const{dispatch:e}=this.props;e((0,F.fz)()),e((0,se.GH)())})),(0,o.Z)(this,"_handleSignatureTap",((e,t,n)=>{const{interactionMode:o,dispatch:r}=this.props;r((0,F.fz)()),o===he.A.INK_SIGNATURE||o===he.A.SIGNATURE?(r((0,ae.Ds)(null)),r((0,S.MV)())):(r((0,ae.Ds)(n)),r((0,S.Cc)()))})),(0,o.Z)(this,"_handleStampTap",(()=>{const{interactionMode:e,dispatch:t}=this.props;t((0,F.fz)()),e===he.A.STAMP_PICKER?t((0,S.pM)()):t((0,S.C4)())})),(0,o.Z)(this,"_handleRedactRectangleTap",((e,t,n)=>{const{interactionMode:o,dispatch:r}=this.props;r((0,F.fz)()),o===he.A.REDACT_SHAPE_RECTANGLE&&n===this.props.currentItemPreset?r((0,S.jP)()):r((0,S.t)(n))})),(0,o.Z)(this,"_handleRedactTextHighlighterTap",((e,t,n)=>{const{interactionMode:o,dispatch:r}=this.props;r((0,F.fz)()),o===he.A.REDACT_TEXT_HIGHLIGHTER&&n===this.props.currentItemPreset?r((0,S.TR)()):r((0,S.aw)(n))})),(0,o.Z)(this,"_handleResponsiveGroupTap",(e=>{this.setState({activeResponsiveGroup:e}),e&&this.setState({prevActiveGroup:e})})),(0,o.Z)(this,"_handleAnnotateResponsiveGroupTap",(()=>this._handleResponsiveGroupTap("annotate"))),(0,o.Z)(this,"_handlePrintTap",(()=>{this.props.printingEnabled&&this.props.dispatch((0,ce.S0)())})),(0,o.Z)(this,"_handleSearchTap",(()=>{const{interactionMode:e,dispatch:t}=this.props;t((0,F.fz)()),e===he.A.SEARCH?t((0,ue.ct)()):t((0,ue.Xe)())})),(0,o.Z)(this,"handleCropTap",(()=>{const{interactionMode:e,dispatch:t}=this.props;t((0,F.fz)()),e===he.A.DOCUMENT_CROP?t((0,S.Cn)()):t((0,S.rL)())})),(0,o.Z)(this,"handleDocumentComparisonTap",(()=>{const{currentDocumentComparisonMode:e,dispatch:t}=this.props;t((0,F.fz)()),t(e?(0,S.cz)(null):(0,S.cz)(Se.se))})),(0,o.Z)(this,"_handleExportPDFTap",(async()=>{this.props.exportEnabled&&this.props.dispatch(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(t,n)=>{const{backend:o}=n();(0,u.kG)(o);const r=HTMLAnchorElement.prototype.hasOwnProperty("download"),i=await o.exportPDF(e),a=i.mimeType||"application/pdf",s=i.extension||"pdf",l=new Blob([i],{type:a}),c=`${(await o.documentInfo()).title||"document"}.${s}`;let d=()=>{};if(navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(l,c);else if(r){const e=window.URL.createObjectURL(l),t=pe(e,c);d=()=>{t(),window.URL.revokeObjectURL(e)}}else{const e=new FileReader;e.onloadend=()=>{d=pe(e.result,s)},e.readAsDataURL(l)}window.setTimeout(d,1e3)}}())})),(0,o.Z)(this,"_handleDebugTap",(()=>{this.props.dispatch((0,S.BB)())})),(0,o.Z)(this,"_handleThumbnailsSidebarTap",(()=>{const{sidebarMode:e,dispatch:t}=this.props;e===me.f.THUMBNAILS?t((0,S.mu)()):t((0,S.el)())})),(0,o.Z)(this,"_handleDocumentOutlineSidebarTap",(()=>{const{sidebarMode:e,dispatch:t}=this.props;e===me.f.DOCUMENT_OUTLINE?t((0,S.mu)()):t((0,S.EJ)())})),(0,o.Z)(this,"_handleDocumentEditorTap",(()=>{const{dispatch:e}=this.props;e((0,S.lV)())})),(0,o.Z)(this,"_handleAnnotationsSidebarTap",(()=>{const{sidebarMode:e,dispatch:t}=this.props;e===me.f.ANNOTATIONS?t((0,S.mu)()):t((0,S.ze)())})),(0,o.Z)(this,"_handleBookmarksSidebarTap",(()=>{const{sidebarMode:e,dispatch:t}=this.props;e===me.f.BOOKMARKS?t((0,S.mu)()):t((0,S.Hf)())})),(0,o.Z)(this,"_handleImageTap",(()=>{const e={annotations:(0,i.aV)([new ne.sK({pageIndex:this.state.currentPageIndex})]),reason:re.f.SELECT_START};this.props.eventEmitter.emit("annotations.willChange",e);const t=this.imagePickerRef&&this.imagePickerRef.current;if(t)try{const{formatMessage:e}=this.props.intl;this.props.dispatch((0,S.iJ)(e(Fe.selectAFileForImage))),t.removeAttribute("aria-hidden"),t.click()}catch(e){t.setAttribute("aria-hidden","true");const n={annotations:(0,i.aV)(),reason:re.f.SELECT_END};this.props.eventEmitter.emit("annotations.willChange",n)}})),(0,o.Z)(this,"_handleImageSelect",(e=>{if(e.target.setAttribute("aria-hidden","true"),e.target.files[0]){this.props.dispatch((0,F.fz)());{this.props.dispatch((0,ae.Ds)("image")),this.props.dispatch((0,ae.$e)(e.target.files[0]));const{formatMessage:t}=this.props.intl;this.props.dispatch((0,S.iJ)(t(Fe.newAnnotationCreated,{arg0:"image"})))}e.target.value=""}})),(0,o.Z)(this,"_handleResponsiveGroupClose",(()=>{this.props.dispatch((0,F.fz)()),this._handleResponsiveGroupTap(null)})),(0,o.Z)(this,"_handleContentEditorTap",(()=>{const{interactionMode:e,dispatch:t,isContentEditorSessionDirty:n}=this.props;e===he.A.CONTENT_EDITOR?t(n?(0,ie.Yg)(!0):ie.u8):t(ie.gY)})),(0,o.Z)(this,"_handleMultiAnnotationsSelectionTap",(()=>{const{interactionMode:e,dispatch:t}=this.props;e===he.A.MULTI_ANNOTATIONS_SELECTION?t((0,S.FA)()):t((0,S.YF)())})),(0,o.Z)(this,"_getBuiltInDefaults",(0,l.Z)(((e,t,n,o,r,i,a,s,l,c,u,d,p,f,h,m,g,v)=>{const{formatMessage:y}=e,b=n===he.A.CONTENT_EDITOR;return{debug:{className:"",onPress:this._handleDebugTap,title:"Debug Info",forceHide:!t},image:{className:"PSPDFKit-Toolbar-Button-Image-Annotation",title:y(be.Z.imageAnnotation),forceHide:o(ne.sK),responsiveGroup:"annotate",preset:"image",onPress:this._handleImageTap,dropdownGroup:"image",disabled:b},stamp:{className:"PSPDFKit-Toolbar-Button-Stamp-Annotation",selected:n===he.A.STAMP_PICKER||n===he.A.STAMP_CUSTOM,onPress:this._handleStampTap,title:y(be.Z.stampAnnotation),forceHide:o(ne.GI),responsiveGroup:"annotate",preset:"stamp",dropdownGroup:"image",disabled:b},link:{className:"PSPDFKit-Toolbar-Button-Link-Annotation",selected:n===he.A.LINK&&"link"===this.state.lastSelectedToolbarItemType,onPress:this._handleLinkTap,title:y(be.Z.linkAnnotation),forceHide:o(ne.R1),responsiveGroup:"annotate",preset:"link",dropdownGroup:"image",disabled:b},ink:{className:"PSPDFKit-Toolbar-Button-Ink-Annotation",selected:n===he.A.INK&&"ink"===h,onPress:this._handleInkTap,title:y(be.Z.pen),forceHide:o(ne.Zc),responsiveGroup:"annotate",dropdownGroup:"ink",preset:"ink",disabled:b},"ink-eraser":{className:"PSPDFKit-Toolbar-Button-Ink-Eraser",selected:n===he.A.INK_ERASER&&"ink-eraser"===h,onPress:this._handleInkEraserTap,title:y(be.Z.eraser),forceHide:o(ne.Zc),responsiveGroup:"annotate",dropdownGroup:"ink",preset:"ink",disabled:b},highlighter:{className:"PSPDFKit-Toolbar-Button-Ink-Annotation PSPDFKit-Toolbar-Button-Variant-Highlighter",selected:n===he.A.INK&&"highlighter"===h,onPress:this._handleInkTap,title:y(be.Z.highlighter),forceHide:o(ne.Zc),responsiveGroup:"annotate",dropdownGroup:"ink",preset:"highlighter",disabled:b},"text-highlighter":{className:"PSPDFKit-Toolbar-Button-TextHighlighter-Annotation",selected:n===he.A.TEXT_HIGHLIGHTER&&"text-highlighter"===h,onPress:this._handleTextHighlighterTap,title:y(be.Z.textHighlighter),forceHide:o(ne.FV),responsiveGroup:"annotate",dropdownGroup:"ink",preset:"text-highlighter",disabled:b},line:{className:"PSPDFKit-Toolbar-Button-Shape-Annotation PSPDFKit-Toolbar-Button-Line-Annotation",selected:n===he.A.SHAPE_LINE&&"line"===h,onPress:this._handleLineTap,title:y(be.Z.lineAnnotation),forceHide:o(ne.o9),responsiveGroup:"annotate",dropdownGroup:"shapes",preset:"line",disabled:b},arrow:{className:"PSPDFKit-Toolbar-Button-Shape-Annotation PSPDFKit-Toolbar-Button-Line-Annotation PSPDFKit-Toolbar-Button-Variant-Arrow",selected:n===he.A.SHAPE_LINE&&"arrow"===h,onPress:this._handleLineTap,title:y(be.Z.arrow),forceHide:o(ne.o9),responsiveGroup:"annotate",dropdownGroup:"shapes",preset:"arrow",disabled:b},rectangle:{className:"PSPDFKit-Toolbar-Button-Shape-Annotation PSPDFKit-Toolbar-Button-Rectangle-Annotation",selected:n===he.A.SHAPE_RECTANGLE&&"rectangle"===h,onPress:this._handleRectangleTap,title:y(be.Z.rectangleAnnotation),forceHide:o(ne.b3),responsiveGroup:"annotate",dropdownGroup:"shapes",preset:"rectangle",disabled:b},"cloudy-rectangle":{className:"PSPDFKit-Toolbar-Button-Shape-Annotation PSPDFKit-Toolbar-Button-Rectangle-Annotation PSPDFKit-Toolbar-Button-Variant-CloudyRectangle",selected:n===he.A.SHAPE_RECTANGLE&&"cloudy-rectangle"===h,onPress:this._handleRectangleTap,title:y(be.Z.cloudyRectangleAnnotation),forceHide:o(ne.b3),responsiveGroup:"annotate",dropdownGroup:"shapes",preset:"cloudy-rectangle",disabled:b},"dashed-rectangle":{className:"PSPDFKit-Toolbar-Button-Shape-Annotation PSPDFKit-Toolbar-Button-Rectangle-Annotation PSPDFKit-Toolbar-Button-Variant-DashedRectangle",selected:n===he.A.SHAPE_RECTANGLE&&"dashed-rectangle"===h,onPress:this._handleRectangleTap,title:y(be.Z.dashedRectangleAnnotation),forceHide:o(ne.b3),responsiveGroup:"annotate",dropdownGroup:"shapes",preset:"dashed-rectangle",disabled:b},ellipse:{className:"PSPDFKit-Toolbar-Button-Shape-Annotation PSPDFKit-Toolbar-Button-Ellipse-Annotation",selected:n===he.A.SHAPE_ELLIPSE&&"ellipse"===h,onPress:this._handleEllipseTap,title:y(be.Z.ellipseAnnotation),forceHide:o(ne.Xs),responsiveGroup:"annotate",dropdownGroup:"shapes",preset:"ellipse",disabled:b},"cloudy-ellipse":{className:"PSPDFKit-Toolbar-Button-Shape-Annotation PSPDFKit-Toolbar-Button-Ellipse-Annotation PSPDFKit-Toolbar-Button-Variant-CloudyEllipse",selected:n===he.A.SHAPE_ELLIPSE&&"cloudy-ellipse"===h,onPress:this._handleEllipseTap,title:y(be.Z.cloudyEllipseAnnotation),forceHide:o(ne.Xs),responsiveGroup:"annotate",dropdownGroup:"shapes",preset:"cloudy-ellipse",disabled:b},"dashed-ellipse":{className:"PSPDFKit-Toolbar-Button-Shape-Annotation PSPDFKit-Toolbar-Button-Ellipse-Annotation PSPDFKit-Toolbar-Button-Variant-DashedEllipse",selected:n===he.A.SHAPE_ELLIPSE&&"dashed-ellipse"===h,onPress:this._handleEllipseTap,title:y(be.Z.dashedEllipseAnnotation),forceHide:o(ne.Xs),responsiveGroup:"annotate",dropdownGroup:"shapes",preset:"dashed-ellipse",disabled:b},polygon:{className:"PSPDFKit-Toolbar-Button-Shape-Annotation PSPDFKit-Toolbar-Button-Polygon-Annotation",selected:n===he.A.SHAPE_POLYGON&&"polygon"===h,onPress:this._handlePolygonTap,title:y(be.Z.polygonAnnotation),forceHide:o(ne.Hi),responsiveGroup:"annotate",dropdownGroup:"shapes",preset:"polygon",disabled:b},"cloudy-polygon":{className:"PSPDFKit-Toolbar-Button-Shape-Annotation PSPDFKit-Toolbar-Button-Polygon-Annotation PSPDFKit-Toolbar-Button-Variant-CloudyPolygon",selected:n===he.A.SHAPE_POLYGON&&"cloudy-polygon"===h,onPress:this._handlePolygonTap,title:Te("cloudy-",this.props.items)?y(be.Z.cloudAnnotation):y(be.Z.cloudyPolygonAnnotation),forceHide:o(ne.Hi),responsiveGroup:"annotate",dropdownGroup:"shapes",preset:"cloudy-polygon",disabled:b},"dashed-polygon":{className:"PSPDFKit-Toolbar-Button-Shape-Annotation PSPDFKit-Toolbar-Button-Polygon-Annotation PSPDFKit-Toolbar-Button-Variant-DashedPolygon",selected:n===he.A.SHAPE_POLYGON&&"dashed-polygon"===h,onPress:this._handlePolygonTap,title:y(be.Z.dashedPolygonAnnotation),forceHide:o(ne.Hi),responsiveGroup:"annotate",dropdownGroup:"shapes",preset:"dashed-polygon",disabled:b},polyline:{className:"PSPDFKit-Toolbar-Button-Shape-Annotation PSPDFKit-Toolbar-Button-Polyline-Annotation",selected:n===he.A.SHAPE_POLYLINE&&"polyline"===h,onPress:this._handlePolylineTap,title:y(be.Z.polylineAnnotation),forceHide:o(ne.om),responsiveGroup:"annotate",dropdownGroup:"shapes",preset:"polyline",disabled:b},note:{className:"PSPDFKit-Toolbar-Button-Note-Annotation",selected:n===he.A.NOTE&&"note"===h,onPress:this._handleNoteTap,onKeyPress:this._handleNoteKeyPress,title:y(be.Z.noteAnnotation),forceHide:o(ne.Qi),responsiveGroup:"annotate",preset:"note",disabled:b},comment:{className:"PSPDFKit-Toolbar-Button-Comment-Marker-Annotation",selected:n===he.A.COMMENT_MARKER,title:y(be.Z.comment),onPress:this._handleCommentMarkerTap,onKeyPress:this._handleCommentMarkerKeyPress,forceHide:o(ne.Jn),responsiveGroup:"annotate",disabled:b},signature:{className:"PSPDFKit-Toolbar-Button-InkSignature-Annotation PSPDFKit-Toolbar-Button-Signature",selected:n===he.A.INK_SIGNATURE||n===he.A.SIGNATURE,onPress:this._handleSignatureTap,title:y(be.Z.sign),forceHide:s===ve.H.NONE||a||o(ne.Zc)&&s!==ve.H.ELECTRONIC_SIGNATURES,responsiveGroup:"annotate",preset:s===ve.H.ELECTRONIC_SIGNATURES?"es-signature":"ink-signature",disabled:b},"redact-text-highlighter":{className:"PSPDFKit-Toolbar-Button-RedactTextHighlighter-Annotation",selected:n===he.A.REDACT_TEXT_HIGHLIGHTER,onPress:this._handleRedactTextHighlighterTap,title:y(be.Z.textRedaction),forceHide:o(oe.Z),responsiveGroup:"annotate",dropdownGroup:"redaction",preset:"redaction",disabled:b},"redact-rectangle":{className:"PSPDFKit-Toolbar-Button-Redaction-Annotation PSPDFKit-Toolbar-Button-Rectangle-Redaction-Annotation",selected:n===he.A.REDACT_SHAPE_RECTANGLE,onPress:this._handleRedactRectangleTap,title:y(be.Z.areaRedaction),forceHide:o(oe.Z),responsiveGroup:"annotate",dropdownGroup:"redaction",preset:"redaction",disabled:b},"form-creator":{className:"PSPDFKit-Toolbar-Button-Form-Creator",selected:(0,Pe.fF)(n),onPress:this.handleFormDesignerTap,title:y(be.Z.formCreator),forceHide:o(ne.x_),disabled:b},pan:{className:"PSPDFKit-Toolbar-Button-Pan",selected:n===he.A.PAN,onPress:this._handlePanTap,title:y(Fe.panMode),forceHide:de.Ni,disabled:b},print:{className:"PSPDFKit-Toolbar-Button-Print",onPress:this._handlePrintTap,title:y(Fe.print),disabled:!l||b},"document-editor":{className:"PSPDFKit-Toolbar-Button-Document-Editor",onPress:this._handleDocumentEditorTap,title:y(be.Z.documentEditor),dropdownGroup:"editor",disabled:b},"document-crop":{className:"PSPDFKit-Toolbar-Button-Document-Crop",onPress:this.handleCropTap,title:y(be.Z.documentCrop),dropdownGroup:"editor",selected:n===he.A.DOCUMENT_CROP,disabled:b},"document-comparison":{className:"PSPDFKit-Toolbar-Button-Document-Comparison",onPress:this.handleDocumentComparisonTap,title:y(be.Z.documentComparison),dropdownGroup:"editor",forceHide:!r,selected:i,disabled:b},search:{className:"PSPDFKit-Toolbar-Button-Search",selected:n===he.A.SEARCH,onPress:this._handleSearchTap,title:y(be.Z.searchDocument),disabled:b},text:{className:"PSPDFKit-Toolbar-Button-Text-Annotation",selected:n===he.A.TEXT&&"text"===this.state.lastSelectedToolbarItemType,onPress:this._handleTextTap,onKeyPress:this._handleTextKeyPress,title:y(be.Z.textAnnotation),forceHide:o(ne.gd),dropdownGroup:"text",responsiveGroup:"annotate",preset:"text",disabled:b},callout:{className:"PSPDFKit-Toolbar-Button-Callout-Annotation",selected:n===he.A.CALLOUT&&"callout"===this.state.lastSelectedToolbarItemType,onPress:this.handleCalloutTap,title:y(be.Z.calloutAnnotation),forceHide:o(ne.gd),dropdownGroup:"text",responsiveGroup:"annotate",preset:"callout",disabled:b},"zoom-mode":De({mediaQueries:[de.Ni?`(min-width: ${fe.Options.BREAKPOINT_MD_TOOLBAR}px)`:"all"]},u===ge.c.FIT_TO_VIEWPORT?{className:"PSPDFKit-Toolbar-Button-Fit-To-Width",onPress:this._handleFitToWidthTap,title:y(Fe.fitWidth),type:"fit-width",disabled:b}:{className:"PSPDFKit-Toolbar-Button-Fit-To-Page",onPress:this._handleFitToBothTap,title:y(Fe.fitPage),type:"fit-page",disabled:b}),"zoom-out":{className:"PSPDFKit-Toolbar-Button-Zoom-Out",disabled:p,onPress:this._handleZoomOutTap,title:y(Fe.zoomOut),mediaQueries:[de.Ni?`(min-width: ${fe.Options.BREAKPOINT_MD_TOOLBAR}px)`:"all"]},"zoom-in":{className:"PSPDFKit-Toolbar-Button-Zoom-In",disabled:d,onPress:this._handleZoomInTap,title:y(Fe.zoomIn),mediaQueries:[de.Ni?`(min-width: ${fe.Options.BREAKPOINT_MD_TOOLBAR}px)`:"all"]},undo:{className:"PSPDFKit-Toolbar-Button-Undo",disabled:!m||b,onPress:this._handleUndoTap,title:y(Fe.undo),forceHide:a,responsiveGroup:"annotate"},redo:{className:"PSPDFKit-Toolbar-Button-Redo",disabled:!g||b,onPress:this._handleRedoTap,title:y(Fe.redo),forceHide:a,responsiveGroup:"annotate"},"marquee-zoom":{className:"PSPDFKit-Toolbar-Button-Marquee-Zoom",selected:n===he.A.MARQUEE_ZOOM,onPress:this._handleMarqueeZoomTap,title:y(Fe.marqueeZoom),disabled:b},spacer:{},pager:{disabled:b},"layout-config":{mediaQueries:[`(min-width: ${fe.Options.BREAKPOINT_SM_TOOLBAR+1}px)`],disabled:b},"multi-annotations-selection":{className:"PSPDFKit-Toolbar-Button-Multiple-Annotations-Selection",selected:n===he.A.MULTI_ANNOTATIONS_SELECTION,onPress:this._handleMultiAnnotationsSelectionTap,title:y(be.Z.multiAnnotationsSelection),disabled:!v||b},annotate:{className:"PSPDFKit-Toolbar-Button-Annotate",onPress:this._handleAnnotateResponsiveGroupTap,title:y(be.Z.annotations),forceHide:o(ne.q6),mediaQueries:[`(max-width: ${fe.Options.BREAKPOINT_MD_TOOLBAR}px)`],disabled:b},measure:{className:"PSPDFKit-Toolbar-Button-Measurement-Annotation",selected:n===he.A.MEASUREMENT||n===he.A.DISTANCE||n===he.A.PERIMETER||n===he.A.RECTANGLE_AREA||n===he.A.POLYGON_AREA||n===he.A.ELLIPSE_AREA,onPress:this._handleMeasurementTap,title:y(be.Z.measurement),forceHide:o(ne.q6),responsiveGroup:"annotate",preset:"measurement",disabled:b},"responsive-group":{onPress:(e,t)=>this._handleResponsiveGroupTap(t),disabled:b},"sidebar-thumbnails":{className:"PSPDFKit-Toolbar-Button-Sidebar PSPDFKit-Toolbar-Button-Sidebar-Thumbnails",title:y(Fe.thumbnails),onPress:this._handleThumbnailsSidebarTap,selected:f===me.f.THUMBNAILS,dropdownGroup:"sidebar",disabled:b},"sidebar-document-outline":{className:"PSPDFKit-Toolbar-Button-Sidebar PSPDFKit-Toolbar-Button-Sidebar-Document-Outline",title:y(Fe.outline),onPress:this._handleDocumentOutlineSidebarTap,selected:f===me.f.DOCUMENT_OUTLINE,dropdownGroup:"sidebar",disabled:b},"sidebar-annotations":{className:"PSPDFKit-Toolbar-Button-Sidebar PSPDFKit-Toolbar-Button-Sidebar-Annotations",title:y(be.Z.annotations),onPress:this._handleAnnotationsSidebarTap,selected:f===me.f.ANNOTATIONS,dropdownGroup:"sidebar",disabled:b},"sidebar-bookmarks":{className:"PSPDFKit-Toolbar-Button-Bookmarks PSPDFKit-Toolbar-Button-Sidebar-Bookmarks",title:y(be.Z.bookmarks),onPress:this._handleBookmarksSidebarTap,selected:f===me.f.BOOKMARKS,dropdownGroup:"sidebar",disabled:b},"export-pdf":{className:"PSPDFKit-Toolbar-Button-Export-PDF",title:y(be.Z.export),onPress:this._handleExportPDFTap,disabled:!c||b,selected:!1},"content-editor":{className:"PSPDFKit-Toolbar-Button-Content-Editor",onPress:this._handleContentEditorTap,title:y(be.Z.contentEditor),selected:n===he.A.CONTENT_EDITOR}}}))),(0,o.Z)(this,"_prepareToolbarItems",(0,l.Z)(((e,t,n,o,r,i,a,s,l,c,u,d,p,f,h,m,g,v,y,b,w,S)=>{const P=this._getBuiltInDefaults(e,t,n,r,i,a,o,s,l,c,u,d,p,f,y,b,w,S),E=a?h:(0,le.q1)(h,P,m),x=(0,le.DQ)(E,P),D=a?function(e){return e.filter((e=>Ae.includes(e.get("type"))))}(x):x,C=(0,le.Ut)((0,le.hJ)(D)),k=(0,le.Ut)(D,!0,g);return{items:C,groupedItems:this.getDropdownGroupGroupedItems(C),groupedResponsiveItems:this.getDropdownGroupGroupedItems(k)}}))),(0,o.Z)(this,"_onMediaQueryUpdate",(()=>{var e;null!==(e=this.props.frameWindow)&&void 0!==e&&e.matchMedia("print").matches||this.setState({mediaQueryDidUpdate:{}})})),(0,o.Z)(this,"_updateMediaQueryListener",(()=>{const{intl:e,debugMode:t,interactionMode:n,isAnnotationTypeReadOnly:o,isDocumentComparisonAvailable:r,currentDocumentComparisonMode:i,isDocumentReadOnly:a,signatureFeatureAvailability:s,printingEnabled:l,exportEnabled:c,zoomMode:u,maxZoomReached:d,minZoomReached:p,sidebarMode:f,items:h,canUndo:m,canRedo:g,isMultiSelectionEnabled:v}=this.props,y=this._getBuiltInDefaults(e,t,n,o,r,!!i,a,s,l,c,u,d,p,f,this.state.lastSelectedToolbarItemType,m,g,v),b=(0,le.se)(h,y);b.forEach((e=>{var t;if(this._mediaListeners.hasOwnProperty(e))return;const n=null===(t=this.props.frameWindow)||void 0===t?void 0:t.matchMedia(e);null==n||n.addListener(this._onMediaQueryUpdate),this._mediaListeners[e]=n})),Object.keys(this._mediaListeners).filter((e=>!b.includes(e))).forEach((e=>{this._mediaListeners[e].removeListener(this._onMediaQueryUpdate),delete this._mediaListeners[e]}))})),(0,o.Z)(this,"_handleKeyPress",(e=>{e.keyCode===p.zz&&this.state.activeResponsiveGroup&&this._handleResponsiveGroupClose()})),(0,o.Z)(this,"_handleOnPress",(function(t,n,o,r,i){let a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=arguments.length>6?arguments[6]:void 0;(0,le.Li)(r)&&e.setState({lastSelectedToolbarItemType:r}),(0,f.dC)((()=>{a&&s?s(n,o,i,a):t(n,o,i,a),e.props.dispatch((0,S.qB)(a))}))})),(0,o.Z)(this,"DropdownItemComponent",r.forwardRef(((e,t)=>{if(!e.item)return null;const n=e.item.item,o=e.item.index,{isSelectedItem:r,state:i,itemComponentProps:a}=e;return Oe(this.props,De(De({},n),{},{className:s()(n.className,{[A().dropdownButtonSelected]:null==i?void 0:i.includes("selected"),[A().dropdownButtonDisabled]:null==i?void 0:i.includes("disabled"),[A().dropdownButtonFocused]:null==i?void 0:i.includes("focused")}),onPress:r?n.onPress:void 0}),o,this._handleOnPress,!r,t,a)}))),(0,o.Z)(this,"_renderGroupedItems",(e=>{let{groupedItems:t,classNamePartial:n}=e;return t.map(((e,t)=>Array.isArray(e)?e.length<2?Oe(this.props,e[0].item,e[0].index,this._handleOnPress,!1,0===t?this.itemToFocusRef:void 0):r.createElement(te.Z,{frameWindow:this.props.frameWindow,items:e,disabled:e.every((e=>e.item.disabled)),ItemComponent:this.DropdownItemComponent,role:"menu",onSelect:(t,n)=>{const{onPress:o,id:r,type:i,preset:a,disabled:s}=n.item;if(!s&&(e.forEach((e=>{delete e.item.selected})),o)){const e="keydown"===t.type;this._handleOnPress(o,t,r,i,a,e)}},isActive:e.some((e=>e.item.selected)),key:`toolbar-items-group-${t}-${n}`,caretDirection:this.props.toolbarPlacement===ye.p.TOP?"down":"up",ref:0===t?this.itemToFocusRef:void 0}):Oe(this.props,e.item,e.index,this._handleOnPress,!1,0===t||e.item.type===this.state.prevActiveGroup?this.itemToFocusRef:void 0)))}))}static getDerivedStateFromProps(e,t){let n=null;if(e.interactionMode&&e.interactionMode in le.FO){const t=le.FO[e.interactionMode];Array.isArray(t)?n=e.currentItemPreset&&t.includes(e.currentItemPreset)?e.currentItemPreset:t[0]:"string"==typeof t&&(n=t)}return n!==t.lastSelectedToolbarItemType?{lastSelectedToolbarItemType:n,currentPageIndex:e.currentPageIndex}:{currentPageIndex:e.currentPageIndex}}getDropdownGroupGroupedItems(e){let t=(0,i.aV)();const n={};return e.forEach(((e,o)=>{const r=(0,i.D5)({index:o,item:e}),a=e.get("dropdownGroup");a?void 0!==n[a]?t=t.update(n[a],(e=>e instanceof i.aV?e.push(r):e)):(n[a]=t.size,t=t.push((0,i.aV)([r]))):t=t.push(r)})),t.toJS()}componentDidUpdate(e,t){this._updateMediaQueryListener();const n=t&&!t.activeResponsiveGroup&&this.state.activeResponsiveGroup,o=t&&t.activeResponsiveGroup&&!this.state.activeResponsiveGroup;(n||o)&&this.itemToFocusRef.current&&this.itemToFocusRef.current.focus()}componentDidMount(){this._updateMediaQueryListener()}componentWillUnmount(){Object.keys(this._mediaListeners).forEach((e=>{this._mediaListeners[e].removeListener(this._onMediaQueryUpdate),delete this._mediaListeners[e]}))}shouldComponentUpdate(e,t){const n=De(De({},e),{},{currentPageIndex:this.props.currentPageIndex}),o=De(De({},t),{},{currentPageIndex:this.state.currentPageIndex});return h.O.bind(this)(n,o)}render(){const{props:e}=this,{intl:t,debugMode:n,interactionMode:o,isDocumentReadOnly:i,isAnnotationTypeReadOnly:a,isDocumentComparisonAvailable:s,currentDocumentComparisonMode:l,signatureFeatureAvailability:c,printingEnabled:u,exportEnabled:p,zoomMode:f,maxZoomReached:h,minZoomReached:m,sidebarMode:g,items:v,frameWindow:y,toolbarPlacement:b,canUndo:w,canRedo:S,isMultiSelectionEnabled:P}=e,{formatMessage:E}=t,{activeResponsiveGroup:x,mediaQueryDidUpdate:D,lastSelectedToolbarItemType:C}=this.state,{groupedItems:k,groupedResponsiveItems:O}=this._prepareToolbarItems(t,n,o,i,a,s,!!l,c,u,p,f,h,m,g,v,y,x,D,C,w,S,P),T=x&&O.length,I=T?this._renderGroupedItems({groupedItems:O,classNamePartial:"groupedResponsiveItems"}):this._renderGroupedItems({groupedItems:k,classNamePartial:"groupedItems"}),F=T&&k.filter((e=>!Array.isArray(e))).find((e=>e.item.id===x)),M=F&&F.item?F.item.title:void 0,_=v.some((e=>"image"===e.get("type")));return r.createElement("div",{className:`PSPDFKit-Toolbar ${A().root}`,onKeyDown:this._handleKeyPress},T?null:I,r.createElement(ee.Z,{onClose:this._handleResponsiveGroupClose,isPrimary:!0,position:b===ye.p.TOP?"top":"bottom",accessibilityLabel:M},T?I:null),_&&r.createElement(d.TX,{tag:"div"},r.createElement("input",{ref:this.imagePickerRef,"aria-label":E(Fe.selectImage),"aria-hidden":!0,type:"file",accept:"image/png, image/jpeg, application/pdf",onChange:this._handleImageSelect,tabIndex:-1})))}}function Oe(e,t,n,o,i,a,l){switch(t.type){case"spacer":return r.createElement("div",{style:{flex:1},key:`spacer-${n}`});case"pager":return r.createElement(J,{dispatch:e.dispatch,pages:e.pages,totalPages:e.totalPages,key:e.currentPageIndex.toString(),readOnly:e.scrollMode===w.G.DISABLED});case"layout-config":var c;return r.createElement(K,{dispatch:e.dispatch,key:"layout-config",className:t.className,icon:t.icon,layoutMode:e.layoutMode,scrollMode:e.scrollMode,caretDirection:e.toolbarPlacement===ye.p.TOP?"down":"up",frameWindow:e.frameWindow,disabled:null!==(c=t.disabled)&&void 0!==c&&c});default:{const{type:e,id:c,className:u,disabled:d,selected:p,icon:f,title:h,onPress:m,preset:g,onKeyPress:v}=t;return"custom"===e&&t.node?r.createElement(Q.Z,{node:t.node,className:u,onPress:m?t=>o(m,t,c,e,g):void 0,title:h,disabled:d,selected:p,ref:a,itemComponentProps:l,key:`custom-node-${n}`}):r.createElement(k.Z,{type:e,className:s()(u,i?A().dropdownButton:A().toolbarButton),disabled:d,selected:p,icon:f,title:h,onPress:m?(t,n)=>o(m,t,c,e,g,n,v):void 0,key:`${e}-${n}`,children:i?h:void 0,role:i?"menuitem":void 0,ref:a,itemComponentProps:l,doNotAutoFocusOnFirstItem:!0})}}}const Ae=["pan","zoom-in","zoom-out","fit-page","fit-width","spacer","export-pdf","document-comparison"];function Te(e,t){return 1===t.filter((t=>{var n;return null===(n=t.get("type"))||void 0===n?void 0:n.startsWith(e)})).size}const Ie=(0,c.XN)(ke),Fe=(0,c.vU)({thumbnails:{id:"thumbnails",defaultMessage:"Thumbnails",description:"Show or hide the thumbnails sidebar"},outline:{id:"outline",defaultMessage:"Outline",description:"Show or hide the document outline sidebar"},panMode:{id:"panMode",defaultMessage:"Pan Mode",description:"Activate and deactivate the pan mode (the hand cursor to move the page)"},zoomIn:{id:"zoomIn",defaultMessage:"Zoom In",description:"Zoom in the document"},zoomOut:{id:"zoomOut",defaultMessage:"Zoom Out",description:"Zoom out the document"},undo:{id:"undo",defaultMessage:"Undo",description:"Undo a previous annotation operation"},redo:{id:"redo",defaultMessage:"Redo",description:"Redo a previous annotation operation"},marqueeZoom:{id:"marqueeZoom",defaultMessage:"Marquee Zoom",description:"Enables Marquee Zoom mode which allows to zoom to a rectangle"},fitPage:{id:"fitPage",defaultMessage:"Fit Page",description:"Fit the page in the viewer based on the bigger dimension"},fitWidth:{id:"fitWidth",defaultMessage:"Fit Width",description:"Fit the page in the document based on its width"},print:{id:"print",defaultMessage:"Print",description:"print"},selectImage:{id:"selectImage",defaultMessage:"Select Image",description:"Label for the select image field"},unsupportedImageFormat:{id:"unsupportedImageFormat",defaultMessage:"Unsupported type for image annotation: {arg0}. Please use a JPEG, PNG or PDF.",description:"Unsupported image type error."},newAnnotationCreated:{id:"newAnnotationCreated",defaultMessage:"New {arg0} annotation created.",description:"A new annotation was created."},selectAFileForImage:{id:"selectAFileForImage",defaultMessage:"Select a file for the new image annotation.",description:"Select a file from the file dialog for the new image annotation."}})},5462:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var o=n(22122),r=n(84121),i=n(67294),a=n(94184),s=n.n(a),l=n(76154),c=n(41756),u=n(67665),d=n(30667),p=n(25915),f=n(35369),h=n(36095),m=n(13448),g=n(58924),v=n(91859),y=n(27435),b=n.n(y),w=n(93628),S=n.n(w),P=n(38006),E=n.n(P),x=n(20276);function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t){var n,r,a;const{items:y,value:w,onSelect:P,children:D,appendAfter:k,menuPositionOffsets:O}=e,{formatMessage:I}=(0,l.YB)(),F=i.useRef(null),M=i.useCallback((e=>{let{selectedItem:t}=e;P&&P(F.current||(0,x._)("click"),t),F.current=null}),[P]),_=i.useRef(),N=null!==(n=i.useMemo((()=>y.find((e=>e.value===(null==w?void 0:w.value)))),[y,w]))&&void 0!==n?n:w,R=e.ItemComponent,L={root:s()("PSPDFKit-Input-Dropdown",e.isActive&&!e.disabled&&"PSPDFKit-Input-Dropdown-active","PSPDFKit-Toolbar-Dropdown",e.className,b().withDropdown,!e.isActive&&b().withDropdownIdle,e.disabled&&b().withDropdownDisabled,N&&"string"==typeof N.icon?N.icon:void 0),button:s()("PSPDFKit-Input-Dropdown-Button",b().dropdown,e.isActive&&!e.disabled&&b().isActive,{[b().discreteDropdown]:e.discreteDropdown,[b().isDisabled]:e.disabled}),menu:s()("PSPDFKit-Input-Dropdown-Items",S().root,e.menuClassName)},[B,j]=i.useState(!1),{getToggleButtonProps:z,getMenuProps:K,getItemProps:Z,getLabelProps:U,isOpen:V,selectedItem:G,highlightedIndex:W,setHighlightedIndex:q}=(0,c.L7)(C(C({items:y,itemToString:A,selectedItem:N,onHighlightedIndexChange:e=>{switch(e.type){case c.L7.stateChangeTypes.MenuKeyDownArrowDown:case c.L7.stateChangeTypes.MenuKeyDownArrowUp:case c.L7.stateChangeTypes.MenuKeyDownEscape:case c.L7.stateChangeTypes.MenuKeyDownHome:case c.L7.stateChangeTypes.MenuKeyDownEnd:case c.L7.stateChangeTypes.MenuKeyDownEnter:case c.L7.stateChangeTypes.MenuKeyDownSpaceButton:case c.L7.stateChangeTypes.MenuKeyDownCharacter:case c.L7.stateChangeTypes.FunctionSetHighlightedIndex:!B&&j(!0);break;default:B&&j(!1)}},onSelectedItemChange:t=>{"menu"!==e.role&&M(t)}},e.frameWindow?{environment:e.frameWindow}:null),{},{circularNavigation:!e.hasOwnProperty("circularNavigation")||e.circularNavigation,getA11yStatusMessage(){},getA11ySelectionMessage(){}})),H=z({onKeyDown:e=>{let{nativeEvent:t,key:n}=e;"Enter"===n&&(F.current=t)},onClick:e=>{e.target.focus&&e.target.focus()},"aria-haspopup":"menu"===e.role?"true":"listbox"}),$=K({onKeyDown:t=>{if(t.keyCode===d.zz&&V&&!e.propagateEscPress)t.stopPropagation();else if((t.keyCode===d.E$||t.keyCode===d.tW)&&W>-1&&"menu"===e.role&&V&&!y[W].disabled)F.current=t.nativeEvent,M({selectedItem:y[W]});else if(t.keyCode===d.P9&&Q>1)q(0===W?y.length:W-1);else if(t.keyCode===d.gs&&Q>1)q(W===y.length-1?0:W+1);else if(t.keyCode===d.OC&&_.current){const e=_.current.querySelector(`#${H.id}`);e&&e.focus()}}},{suppressRefError:!0}),X=U(),Y=e.ButtonComponent,J="menu"===e.role?{role:void 0,"aria-labelledby":void 0,"aria-haspopup":void 0,"aria-expanded":void 0}:{},Q=Math.min(y.length,e.maxCols||1),ee={display:"flex",flexDirection:Q>1?"row":"column",flexWrap:"wrap",width:e.itemWidth?Q*e.itemWidth:"auto",boxSizing:"content-box"},te=null!=e.icon?e.icon:{};return i.createElement("div",(0,o.Z)({className:s()(V&&"PSPDFKit-Input-Dropdown-open",L.root)},J,{"data-test-id":e["data-test-id"]}),i.createElement(p.TX,{tag:"div"},i.createElement("span",X,e.accessibilityLabel)),i.createElement("div",{ref:_,className:s()(b().wrapper,{[b().disabledWrapper]:e.disabled,[b().isDisabled]:e.disabled})},Y?Y({btnComponentProps:H,selectedItem:G,ref:t,caretDirection:e.caretDirection,disabled:null!==(r=e.disabled)&&void 0!==r&&r,isOpen:V}):i.createElement(i.Fragment,null,R({item:G,isSelectedItem:!0,state:null,ref:t}),i.createElement("button",(0,o.Z)({},C(C({},H),e.disabled?{onClick:null}:null),{className:L.button,style:{minWidth:0},type:"button"}),i.createElement(m.Z,(0,o.Z)({type:`caret-${e.caretDirection}`,style:{width:12,height:"100%"},className:s()("PSPDFKit-Toolbar-Button-Icon",b().dropdownIcon,{[b().disabledDropdownIcon]:e.disabled})},te)),i.createElement(p.TX,{tag:"div"},i.createElement("span",null,null==G?void 0:G.label))))),i.createElement(u.m,null,i.createElement(g.Z,{referenceElement:_.current,measure:V,offsets:O},(t=>{let{ref:n,style:r}=t;const l="down"===e.caretDirection;let c;c=(e.frameWindow?e.frameWindow.innerWidth:_.current.ownerDocument.defaultView.innerWidth)>=v.Fg?_.current.offsetWidth:"auto";const u=r.top,d={maxHeight:l&&"auto"!==u?`calc(100vh - ${u}px)`:void 0,overflowY:"auto"};return i.createElement("div",{ref:n,style:C({minWidth:c},r)},i.createElement("div",(0,o.Z)({},$,{className:`${L.menu} ${s()({[S().hiddenMenu]:!V})}`,style:C(C({},d),ee),onMouseLeave:()=>q(null),role:"menu"===e.role?"menu":"listbox","aria-labelledby":H["aria-label"]?void 0:$["aria-labelledby"],"aria-label":H["aria-label"],"aria-hidden":!V}),V&&y.map(((t,n)=>{var o;const r=!!G&&(G.value||t.label)===(t.value||t.label),l=function(e,t,n){return t.indexOf(e)===n}(t,y,W);let c=(0,f.l4)();t.disabled&&(c=c.add("disabled")),l&&(c=c.add("focused")),r&&(c=c.add("selected")),t.disabled||l||r||(c=c.add("default"));const u=s()("PSPDFKit-Input-Dropdown-Item",{"PSPDFKit-Input-Dropdown-Item-disabled":t.disabled,"PSPDFKit-Input-Dropdown-Item-focused":!t.disabled&&l,"PSPDFKit-Input-Dropdown-Item-selected":!t.disabled&&r,"PSPDFKit-Input-Dropdown-Item-default":!t.disabled&&!r&&!l,[E().focusVisible]:l&&B}),d=Z(C({item:t,index:n,disabled:null!==(o=t.disabled)&&void 0!==o&&o,onClick:n=>{let{nativeEvent:o}=n;t.disabled||(F.current=o,"menu"===e.role&&V&&M({selectedItem:t}))}},"menu"===e.role?{"aria-selected":void 0,role:void 0}:h.G6?{}:{"aria-selected":void 0,"aria-label":r?I(T.selectedItem,{arg0:t.label}):void 0}));return i.createElement(i.Fragment,{key:`${A(t)}${n}`},i.createElement("div",{className:u},R({item:t,isSelectedItem:!1,state:c,itemComponentProps:d})),null!=k&&(null==k?void 0:k.index)===n&&(a||(a=i.createElement(k.node,null))))})),D))}))))}const O=(0,i.memo)(i.forwardRef(k));function A(e){return null!=e&&e.label?null==e?void 0:e.label:(null!=(null==e?void 0:e.value)&&"object"==typeof e.value&&"toString"in e.value&&"function"==typeof e.value.toString&&e.value.toString(),null!=(null==e?void 0:e.value)&&"string"==typeof e.value?e.value:"N/A")}const T=(0,l.vU)({accessibilityLabelDropdownGroupToggle:{id:"accessibilityLabelDropdownGroupToggle",defaultMessage:"{arg0} tools, toggle menu",description:"Accessible label to announce the button to open and close a toolbar menu which contains tools like shapes or ink annotations buttons."},selectedItem:{id:"selectedItem",defaultMessage:"{arg0}, selected",description:"Label for selected item in a dropdown"}})},84747:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var o=n(22122),r=n(17375),i=n(76154),a=n(67294),s=n(94184),l=n.n(s),c=n(27435),u=n.n(c),d=n(5462),p=n(97413);const f=["item"],h=["selectedItem"],m=a.memo(a.forwardRef((function(e,t){const{items:n,noInitialSelection:s,ItemComponent:c,ButtonComponent:m}=e,[b,w]=a.useState(null),{formatMessage:S}=(0,i.YB)(),P=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Toolbar";return e.charAt(0).toUpperCase()+e.substr(1)}(n[0].item.dropdownGroup),E=a.useMemo((()=>n.find((e=>e.item.selected))||b||(s?null:n[0])),[n,s,b]),x=l()("PSPDFKit-Toolbar-DropdownGroup",P&&"PSPDFKit-Toolbar-DropdownGroup-"+P,e.className,E?"string"==typeof E.item.icon?E.item.icon:"string"==typeof E.item.type&&"custom"!==E.item.type?u().withDropdownIcon:void 0:void 0),D=e.items.map(g),C=E?g(E):null,k=a.useCallback((e=>{const{item:i}=e,s=(0,r.Z)(e,f),l=n.find((e=>null!=i?v(i,e):null));return a.createElement(c,(0,o.Z)({item:l},s,{ref:t}))}),[n,c,t]),O=a.useCallback((e=>{const{selectedItem:t}=e,i=(0,r.Z)(e,h),s=n.find((e=>null!=t?v(t,e):null));return(0,p.k)(s,"A dropdown item must be present for the button"),(0,p.k)(m,"A button must be available to render dropdown"),a.createElement(m,(0,o.Z)({selectedItem:s},i))}),[m,n]);return a.createElement(d.Z,{onSelect:(t,n)=>{const o=e.items.find((e=>v(n,e)));var r;null!=o&&(null===(r=e.onSelect)||void 0===r||r.call(e,t,o));if(b!==e.items.find((e=>v(n,e)))){const t=e.items.find((e=>v(n,e)));t&&w(t)}},items:D,value:C,ItemComponent:k,ButtonComponent:m?O:void 0,isActive:e.isActive,className:x,menuClassName:e.menuClassName,icon:e.icon,discreteDropdown:e.discreteDropdown,caretDirection:e.caretDirection,frameWindow:e.frameWindow,role:e.role,ref:t,accessibilityLabel:e.accessibilityLabel||S(y.accessibilityLabelDropdownGroupToggle,{arg0:P}),noInitialSelection:e.noInitialSelection,maxCols:e.maxCols,itemWidth:e.itemWidth,circularNavigation:e.circularNavigation,propagateEscPress:e.propagateEscPress,appendAfter:e.appendAfter,disabled:e.disabled},e.children)})));function g(e){var t,n,o,r;return{value:null!==(t=null!==(n=null!==(o=e.item.id)&&void 0!==o?o:e.item.title)&&void 0!==n?n:e.item.type)&&void 0!==t?t:"",icon:e.item.icon,label:null!==(r=e.item.title)&&void 0!==r?r:"",disabled:e.item.disabled}}function v(e,t){return t.item.id===e.value||t.item.title===e.value||t.item.type===e.value}const y=(0,i.vU)({accessibilityLabelDropdownGroupToggle:{id:"accessibilityLabelDropdownGroupToggle",defaultMessage:"{arg0} tools, toggle menu",description:"Accessible label to announce the button to open and close a toolbar menu which contains tools like shapes or ink annotations buttons."},selectedItem:{id:"selectedItem",defaultMessage:"{arg0}, selected",description:"Label for selected item in a dropdown"}})},11378:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var o=n(22122),r=n(67294),i=n(94184),a=n.n(i),s=n(3999);const l=r.forwardRef((function(e,t){const{selected:n,disabled:i}=e,l=a()("string"==typeof e.className&&e.className,"PSPDFKit-Toolbar-Node",n&&"PSPDFKit-Toolbar-Node-active",i&&"PSPDFKit-Toolbar-Node-disabled");return r.createElement(s.Z,(0,o.Z)({},e,{className:l,ref:t,itemComponentProps:e.itemComponentProps}))}))},44706:(e,t,n)=>{"use strict";n.d(t,{B:()=>f,Z:()=>h});var o=n(67294),r=n(76154),i=n(26353),a=n(84013),s=n(94184),l=n.n(s),c=n(85578),u=n.n(c),d=n(35129),p=n(11010);function f(e){let{children:t,onClose:n,isPrimary:r,position:s,intl:c,accessibilityLabel:f,onEntered:h,className:m}=e;const{formatMessage:g}=c,v=o.Children.count(t)>0;return o.createElement(a.Z,null,v&&o.createElement(i.Z,{timeout:{enter:window["PSPDFKit-disable-animations"]?0:150,exit:window["PSPDFKit-disable-animations"]?0:120},classNames:{enter:u().slideRightEnter,enterActive:u().slideRightEnterActive,enterDone:u().slideRightEnterDone,exit:u().slideRightExit,exitActive:u().slideRightExitActive},onEntered:h},o.createElement("div",{className:l()({[u().responsiveGroup]:!0,[u().primary]:r,[u().secondary]:!r,[u().stickToBottom]:"bottom"===s,"PSPDFKit-Toolbar-Responsive-Group":!0},m),role:"dialog","aria-label":f},o.createElement(p.Z,{type:"custom",title:g(d.Z.close),className:u().button,onPress:n},o.createElement("div",{className:u().animatedArrow})),o.createElement("div",{style:{flex:1}}),o.createElement("div",{className:u().items},t))))}const h=(0,r.XN)(f)},94505:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var o=n(22122),r=n(67294),i=n(94184),a=n.n(i),s=n(13448),l=n(44364),c=n.n(l);const u=r.memo(r.forwardRef((function(e,t){const{type:n,selected:i,disabled:l,onPress:u,icon:d,role:p,title:f,doNotAutoFocusOnFirstItem:h=!1}=e,m=r.useRef(!1),g=r.useCallback((function(e){e.preventDefault(),!l&&u&&u(e.nativeEvent,m.current)}),[u,l]),v=r.useCallback((function(){m.current=!0}),[]),y=r.useCallback((function(){m.current=!1}),[]),b=(0,s.Z)({icon:d,type:n,className:a()(void 0!==e.children&&c().withLabel,"PSPDFKit-Tool-Button-Icon",e.iconClassName)}),w=e.children||(b?null:f),S=a()(c().root,i&&c().isActive,l&&c().isDisabled,"string"==typeof e.className&&e.className,"PSPDFKit-Tool-Button",i&&"PSPDFKit-Tool-Button-active",l&&"PSPDFKit-Tool-Button-disabled");r.useEffect((()=>{!e.presentational&&t&&t.current&&!h&&t.current.focus()}),[e.presentational,t,h]);const P=r.createElement("button",(0,o.Z)({className:S,title:f,"aria-label":f,disabled:l,onClick:u?g:void 0,onKeyDown:u?v:void 0,onPointerUp:u?y:void 0,"aria-pressed":"annotate"!==n&&"responsive-group"!==n&&void 0!==i?i:void 0},e.itemComponentProps,{role:p||(e.itemComponentProps?e.itemComponentProps.role:void 0),type:"button",ref:t}),b,null!=w&&r.createElement("span",null,w));return e.presentational?r.createElement("div",null,r.createElement("div",{className:S,title:f,"aria-hidden":"true",role:"presentation"},b)):e.disabled?r.createElement("div",{className:a()({[c().disabledWrapper]:e.disabled})},P):P})))},3999:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var o=n(22122),r=n(67294),i=n(94184),a=n.n(i),s=n(18571),l=n.n(s);const c=r.memo(r.forwardRef((function(e,t){const{node:n,title:i,selected:s,disabled:c}=e,u=r.useRef();r.useImperativeHandle(t,(()=>({focus:()=>{n instanceof n.ownerDocument.defaultView.HTMLElement&&n.focus()}}))),r.useLayoutEffect((()=>{const e=u&&u.current;e&&(e.innerHTML="",e.appendChild(n))}),[n]);const d=a()("PSPDFKit-Tool-Node",{"PSPDFKit-Tool-Node-active":s,"PSPDFKit-Tool-Node-disabled":c},e.className,l().root,{[l().disabled]:c,[l().annotationToolbar]:"annotationToolbar"===e.variant}),p=e.onPress?t=>{let{nativeEvent:n}=t;e.onPress&&e.onPress(n)}:void 0;return r.createElement("div",(0,o.Z)({onClick:p,className:d,title:i,"aria-label":i,tabIndex:c?-1:void 0,"aria-disabled":!!c||void 0},e.itemComponentProps,{ref:u}))})))},97528:(e,t,n)=>{"use strict";n.d(t,{Options:()=>m,W:()=>f,n:()=>v});var o=n(84121),r=n(80857),i=n(59386),a=n(83634),s=n(86071),l=n(65627),c=n(35129),u=n(24871),d=n(91859);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}const f=s.Z.filter((e=>e.color!==a.Z.DARK_BLUE)),h={MIN_TEXT_ANNOTATION_SIZE:5,MIN_INK_ANNOTATION_SIZE:16,MIN_SHAPE_ANNOTATION_SIZE:16,MIN_IMAGE_ANNOTATION_SIZE:5,MIN_STAMP_ANNOTATION_SIZE:15,MIN_WIDGET_ANNOTATION_SIZE:3,ENABLE_INK_SMOOTH_LINES:!0,INK_EPSILON_RANGE_OPTIMIZATION:10,SIGNATURE_SAVE_MODE:i.f.USING_UI,INITIAL_DESKTOP_SIDEBAR_WIDTH:300,IGNORE_DOCUMENT_PERMISSIONS:!1,SELECTION_OUTLINE_PADDING:function(e){return e.width>d.y$?10:13},RESIZE_ANCHOR_RADIUS:function(e){return e.width>d.y$?7:10},SELECTION_STROKE_WIDTH:2,TEXT_ANNOTATION_AUTOFIT_TEXT_ON_EXPORT:!0,TEXT_ANNOTATION_AUTOFIT_BOUNDING_BOX_ON_EDIT:!0,DISABLE_KEYBOARD_SHORTCUTS:!1,DEFAULT_INK_ERASER_CURSOR_WIDTH:12.5,COLOR_PRESETS:f,LINE_CAP_PRESETS:["none"].concat(u.a),LINE_WIDTH_PRESETS:null,HIGHLIGHT_COLOR_PRESETS:[a.Z.LIGHT_YELLOW,a.Z.LIGHT_BLUE,a.Z.LIGHT_GREEN,a.Z.LIGHT_RED].map((e=>({color:e,localization:c.Z[e.toCSSValue()]}))),TEXT_MARKUP_COLOR_PRESETS:s.Z.filter((e=>[a.Z.BLACK,a.Z.BLUE,a.Z.RED,a.Z.GREEN].includes(e.color))),NOTE_COLOR_PRESETS:l.W,PDF_JAVASCRIPT:!0,BREAKPOINT_MD_TOOLBAR:1070,BREAKPOINT_SM_TOOLBAR:768},m=Object.preventExtensions(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},h)),g=(0,r.Z)("Options"),v=e=>{for(const t in e)g(void 0!==h[t],`Option \`${t}\` is not available in the \`Options\` object`),g(typeof h[t]==typeof e[t],`Option \`${t}\` is of incorrect type \`${typeof e[t]}\`, should be \`${typeof h[t]}\``)}},25387:(e,t,n)=>{"use strict";n.d(t,{$8O:()=>Eo,$Jy:()=>Tt,$VE:()=>ht,$hO:()=>Ft,A8G:()=>Pe,AIf:()=>et,ArU:()=>Zn,B1n:()=>nt,BS3:()=>o,BWS:()=>se,Ce5:()=>g,D1d:()=>no,D5x:()=>Un,D_w:()=>$t,Dj2:()=>ue,Dl4:()=>q,Dqw:()=>uo,Dzg:()=>it,Ebp:()=>Fo,EpY:()=>kn,F6q:()=>Rt,FH6:()=>At,FHt:()=>M,FQb:()=>Go,FdD:()=>yt,G5w:()=>de,G6t:()=>wo,G8_:()=>Qt,GHc:()=>l,GW4:()=>pe,GXR:()=>qe,GZZ:()=>ze,GfR:()=>H,Gkm:()=>yo,Gox:()=>Wn,HS7:()=>Et,HYy:()=>Ro,Han:()=>zo,Hbz:()=>pt,Hrp:()=>s,IFt:()=>mn,ILc:()=>Pt,Ifu:()=>_t,IyB:()=>eo,J7J:()=>He,JQC:()=>Q,JRS:()=>Gn,JS9:()=>Qe,JwD:()=>Oe,JyO:()=>$e,K26:()=>dt,KA1:()=>Hn,KYU:()=>V,Kc8:()=>rn,Kpf:()=>zn,KqR:()=>rt,Kw7:()=>on,L2A:()=>co,L8n:()=>ct,L9g:()=>W,Lyo:()=>E,M3C:()=>at,M85:()=>St,ME7:()=>y,MGL:()=>po,MOe:()=>Fe,MYU:()=>$n,MfE:()=>ae,MuN:()=>fe,NAH:()=>ge,NB4:()=>wt,NDs:()=>Xe,NfO:()=>K,Nl1:()=>G,Oh4:()=>Xt,Q2U:()=>hn,QU3:()=>le,QYP:()=>j,Qm9:()=>fo,R1i:()=>ke,R7l:()=>mo,R8P:()=>Dt,RCc:()=>ie,RPc:()=>gn,RTr:()=>h,RvB:()=>je,RxB:()=>k,S$y:()=>Je,S0t:()=>yn,SdX:()=>Po,T3g:()=>io,TG1:()=>Qo,TPT:()=>Me,TUA:()=>We,TYu:()=>so,Ty$:()=>sn,U7k:()=>Lo,UFK:()=>R,UFs:()=>re,UII:()=>u,UL9:()=>Qn,UP4:()=>xo,UX$:()=>Yn,UiQ:()=>Ce,Ui_:()=>Kt,VK7:()=>Ut,VNM:()=>Xo,VNu:()=>lr,VOt:()=>Io,Vje:()=>ir,Vpf:()=>go,Vu4:()=>Ye,W0l:()=>nn,WaW:()=>Tn,Whn:()=>Yt,WmI:()=>Ko,WsN:()=>tr,WtY:()=>v,Wyx:()=>qt,XTO:()=>ar,Xlm:()=>Z,Y4:()=>No,YHT:()=>d,YIz:()=>ut,YS$:()=>bn,ZDQ:()=>tt,ZGb:()=>T,ZLr:()=>p,ZbY:()=>fn,ZgW:()=>Bo,Zt9:()=>sr,_33:()=>Bn,_AY:()=>Mt,_Qf:()=>Ln,_TO:()=>Dn,_Yi:()=>Le,_fK:()=>dn,_ko:()=>F,_n_:()=>we,_uU:()=>ne,a33:()=>Te,aWu:()=>Ee,aYj:()=>L,b0l:()=>be,b4I:()=>Ho,bM3:()=>ur,bOH:()=>jo,bP3:()=>J,bV3:()=>xn,bVL:()=>Mn,bui:()=>On,bxr:()=>I,bzW:()=>qo,c3G:()=>Be,cbv:()=>Ge,ciU:()=>Mo,ckI:()=>gt,cyk:()=>U,dCo:()=>b,dEe:()=>Sn,dVW:()=>en,eFQ:()=>lt,eI4:()=>Y,eJ4:()=>to,esN:()=>jt,f3N:()=>Ie,fAF:()=>wn,fDl:()=>Ht,fLm:()=>_o,fQw:()=>Oo,faS:()=>Nn,fnw:()=>w,fwq:()=>bo,g30:()=>Ve,g4f:()=>P,gF5:()=>Ct,gIV:()=>It,gbd:()=>f,hC8:()=>cn,heZ:()=>m,hlI:()=>Se,hpj:()=>B,ht3:()=>_,huI:()=>Ot,hv0:()=>X,hw0:()=>qn,hxO:()=>vt,iJ2:()=>zt,iMs:()=>Pn,iQZ:()=>$,iZ1:()=>un,ieh:()=>In,iwn:()=>_n,iyZ:()=>_e,jJ7:()=>Jt,joZ:()=>ko,jzI:()=>xt,kD6:()=>Co,kRo:()=>N,kVz:()=>Fn,kg:()=>bt,kt4:()=>ao,l$y:()=>Do,lD1:()=>ce,lRe:()=>Cn,m3$:()=>Zt,mE7:()=>C,mGH:()=>tn,mLh:()=>S,m_C:()=>rr,mbD:()=>Xn,mfU:()=>Jo,mqf:()=>Ke,nFn:()=>Nt,nI6:()=>Zo,nmm:()=>r,oE1:()=>xe,oWy:()=>De,oZW:()=>Uo,obk:()=>vn,odo:()=>Vo,oj5:()=>c,p1u:()=>Bt,pNz:()=>En,pnu:()=>ot,poO:()=>ln,qKG:()=>vo,qRJ:()=>an,qV6:()=>oe,qZT:()=>Lt,qh0:()=>oo,rWQ:()=>ye,rm:()=>ro,rpU:()=>Vn,rxv:()=>a,sCM:()=>kt,sYK:()=>ft,skc:()=>ee,snK:()=>er,snh:()=>te,syg:()=>O,t$K:()=>Wo,tC1:()=>Rn,tIQ:()=>dr,tLW:()=>Ze,tPZ:()=>ve,tS$:()=>Ue,tYC:()=>me,teI:()=>ho,tie:()=>st,tzG:()=>nr,u7V:()=>Gt,u9b:()=>A,uFU:()=>pn,uOP:()=>Yo,uo5:()=>To,vBn:()=>$o,vSH:()=>Re,vVk:()=>An,vgx:()=>lo,vkF:()=>So,wG7:()=>jn,wPI:()=>Kn,wgG:()=>cr,wog:()=>Jn,wtk:()=>D,x0v:()=>Ae,xYE:()=>x,xhM:()=>Ao,xk1:()=>he,yET:()=>Vt,yPS:()=>or,yrz:()=>mt,yyM:()=>Ne,zGM:()=>Wt,zKF:()=>z,zZV:()=>i});const o="CONNECTING",r="CONNECTED",i="CONNECTION_FAILED",a="SET_ANNOTATION_MANAGER",s="SET_BOOKMARK_MANAGER",l="SET_FORM_FIELD_VALUE_MANAGER",c="SET_FORM_FIELD_MANAGER",u="SET_COMMENT_MANAGER",d="SET_MENTIONABLE_USERS",p="SET_MAX_MENTION_SUGGESTIONS",f="SET_CHANGE_MANAGER",h="SET_HAS_FETCHED_INITIAL_RECORDS_FROM_INSTANT",m="SET_GROUP",g="SET_CLIENTS_UPDATE_CALLBACK",v="SET_TRANSFORM_CLIENT_TO_PAGE",y="FETCH_DOCUMENT_SUCCESS",b="FETCH_PAGES_SUCCESS",w="SET_BACKEND_PERMISSIONS",S="SCROLLED",P="JUMP_TO_RECT",E="JUMP_AND_ZOOM_TO_RECT",x="RESIZED",D="NEXT_PAGE",C="PREVIOUS_PAGE",k="SET_PAGE",O="SET_ZOOM_LEVEL",A="SET_ZOOM_STEP",T="SET_VIEWPORT_STATE",I="SET_SPREAD_SPACING",F="SET_PAGE_SPACING",M="SET_FIRST_PAGE_ALWAYS_SINGLE",_="SET_VIEWPORT_PADDING",N="ENABLE_PANNING",R="DISABLE_PANNING",L="ENABLE_PRINTING",B="DISABLE_PRINTING",j="ENABLE_EXPORT",z="DISABLE_EXPORT",K="ENABLE_READ_ONLY",Z="DISABLE_READ_ONLY",U="SHOW_ANNOTATIONS",V="HIDE_ANNOTATIONS",G="SHOW_COMMENTS",W="HIDE_COMMENTS",q="SHOW_ANNOTATION_NOTES",H="HIDE_ANNOTATION_NOTES",$="SET_FEATURES",X="SET_SIDEBAR_MODE",Y="SET_SIDEBAR_PLACEMENT",J="SET_SIDEBAR_OPTIONS",Q="SET_SIGNATURE_FEATURE_AVAILABILITY",ee="START_PRINTING",te="END_PRINTING",ne="ABORT_PRINTING",oe="UPDATE_PRINT_LOADING_INDICATOR",re="ZOOM_IN",ie="ZOOM_OUT",ae="ZOOM_TO_AUTO",se="ZOOM_TO_FIT_TO_VIEWPORT",le="ZOOM_TO_FIT_TO_WIDTH",ce="ROTATE",ue="ENABLE_DEBUG_MODE",de="SHOW_DEBUG_CONSOLE",pe="HIDE_DEBUG_CONSOLE",fe="SHOW_TOOLBAR",he="HIDE_TOOLBAR",me="ENABLE_ANNOTATION_TOOLBAR",ge="DISABLE_ANNOTATION_TOOLBAR",ve="SET_SCROLLBAR_OFFSET",ye="SET_LAYOUT_MODE",be="SET_SCROLL_MODE",we="SET_SCROLL_ELEMENT",Se="SET_ANNOTATION_CREATOR",Pe="SET_ANNOTATION_TOOLBAR_HEIGHT",Ee="UPDATE_TOOLBAR_ITEMS",xe="UPDATE_CURRENT_PRESET",De="SET_CURRENT_ITEM_PRESET",Ce="UPDATE_ANNOTATION_PRESETS",ke="ADD_ANNOTATION_PRESET_ID",Oe="SET_CURRENT_ITEM_PRESET_FROM_ANNOTATION",Ae="REMOVE_ANNOTATION_PRESET_ID",Te="DESELECT",Ie="TEXT_SELECTED",Fe="TEXT_DESELECTED",Me="SET_ANNOTATION_HOVER",_e="UNSET_ANNOTATION_HOVER",Ne="SET_ANNOTATION_NOTE_HOVER",Re="SET_ACTIVE_ANNOTATION_NOTE",Le="SET_SELECTED_ANNOTATIONS",Be="UNSET_SELECTED_ANNOTATION_SHOULD_DRAG",je="SET_SELECTED_TEXT_ON_EDIT",ze="FETCH_TEXT_LINES_SUCCESS",Ke="ENABLE_TEXT_HIGHLIGHTER_MODE",Ze="DISABLE_TEXT_HIGHLIGHTER_MODE",Ue="ENABLE_REDACT_TEXT_HIGHLIGHTER_MODE",Ve="DISABLE_REDACT_TEXT_HIGHLIGHTER_MODE",Ge="ENABLE_REDACT_SHAPE_RECTANGLE_MODE",We="DISABLE_REDACT_SHAPE_RECTANGLE_MODE",qe="ENABLE_INK_MODE",He="DISABLE_INK_MODE",$e="ENABLE_INK_ERASER_MODE",Xe="DISABLE_INK_ERASER_MODE",Ye="ENABLE_SIGNATURE_MODE",Je="DISABLE_SIGNATURE_MODE",Qe="ENABLE_SHAPE_MODE",et="DISABLE_SHAPE_MODE",tt="ENABLE_NOTE_MODE",nt="DISABLE_NOTE_MODE",ot="ENABLE_TEXT_MODE",rt="DISABLE_TEXT_MODE",it="ENABLE_STAMP_PICKER_MODE",at="ENABLE_STAMP_CUSTOM_MODE",st="DISABLE_STAMP_MODE",lt="ENABLE_INTERACTIONS",ct="DISABLE_INTERACTIONS",ut="SHOW_DOCUMENT_EDITOR",dt="HIDE_DOCUMENT_EDITOR",pt="ENABLE_MARQUEE_ZOOM",ft="DISABLE_MARQUEE_ZOOM",ht="SET_INTERACTION_MODE",mt="RESET_INTERACTION_MODE",gt="CREATE_COMMENTS",vt="CREATE_COMMENT_DRAFT",yt="UPDATE_COMMENTS",bt="DELETE_COMMENTS",wt="COMPUTE_COMMENT_MODE",St="CREATE_ANNOTATIONS",Pt="CREATE_INK_ANNOTATION_ON_NEW_PAGE",Et="CREATE_SHAPE_ANNOTATION_ON_NEW_PAGE",xt="CREATE_REDACTION_ANNOTATION_ON_NEW_PAGE",Dt="UPDATE_ANNOTATIONS",Ct="DELETE_ANNOTATIONS",kt="SET_ANNOTATIONS_TO_DELETE",Ot="CREATE_ATTACHMENT",At="SEARCH_FOR_TERM",Tt="FOCUS_NEXT_SEARCH_HIGHLIGHT",It="FOCUS_PREVIOUS_SEARCH_HIGHLIGHT",Ft="SHOW_SEARCH",Mt="HIDE_SEARCH",_t="FOCUS_SEARCH",Nt="BLUR_SEARCH",Rt="SET_SEARCH_IS_LOADING",Lt="SET_SEARCH_RESULTS",Bt="SET_SEARCH_STATE",jt="SET_SEARCH_PROVIDER",zt="SET_FORM_JSON",Kt="CREATE_FORM_FIELD_VALUES",Zt="SET_FORM_FIELD_VALUES",Ut="SET_FORMATTED_FORM_FIELD_VALUES",Vt="SET_EDITING_FORM_FIELD_VALUES",Gt="DELETE_FORM_FIELD_VALUES",Wt="CREATE_FORM_FIELDS",qt="UPDATE_FORM_FIELDS",Ht="REPLACE_FORM_FIELD",$t="DELETE_FORM_FIELDS",Xt="SET_DOCUMENT_OUTLINE",Yt="TOGGLE_DOCUMENT_OUTLINE_ELEMENT",Jt="SET_CUSTOM_OVERLAY_ITEM",Qt="REMOVE_CUSTOM_OVERLAY_ITEM",en="I18N_SET_LOCALE",tn="CREATE_SIGNATURE",nn="STORE_SIGNATURE",on="SET_STORED_SIGNATURES",rn="DELETE_STORED_SIGNATURE",an="UPDATE_STAMP_ANNOTATION_TEMPLATES",sn="SHOW_PASSWORD_PROMPT",ln="SET_HAS_PASSWORD",cn="UNLOCKED_VIA_MODAL",un="SET_ALLOWED_TILE_SCALES",dn="UPDATE_SELECTED_MARKUP_ANNOTATIONS",pn="SET_IS_EDITABLE_ANNOTATION",fn="SET_EDITABLE_ANNOTATION_TYPES",hn="SET_IS_EDITABLE_COMMENT",mn="SET_FORM_DESIGN_MODE",gn="SET_INK_ERASER_WIDTH",vn="RESET_DOCUMENT_STATE",yn="SET_DOCUMENT_HANDLE",bn="SET_DOCUMENT_HANDLE_OUTDATED",wn="UPDATE_CUSTOM_RENDERERS",Sn="ENABLE_COMMENT_MARKER",Pn="DISABLE_COMMENT_MARKER",En="START_DIGITAL_SIGNATURE",xn="END_DIGITAL_SIGNATURE",Dn="SET_SHOW_SIGNATURE_VALIDATION_STATUS_MODE",Cn="SET_DIGITAL_SIGNATURES",kn="START_REDACTION",On="END_REDACTION",An="SET_PREVIEW_REDACTION_MODE",Tn="SET_COLLAPSE_SELECTED_NOTE_CONTENT",In="INVALIDATE_AP_STREAMS",Fn="VALIDATE_AP_STREAMS",Mn="HISTORY_UPDATE_FROM_UNDO",_n="HISTORY_UPDATE_FROM_REDO",Nn="SET_HISTORY_CHANGE_CONTEXT",Rn="HISTORY_IDS_MAP_ADD",Ln="CLEAR_HISTORY",Bn="ENABLE_HISTORY",jn="DISABLE_HISTORY",zn="UPDATE_DOCUMENT_EDITOR_FOOTER_ITEMS",Kn="UPDATE_DOCUMENT_EDITOR_TOOLBAR_ITEMS",Zn="SET_EDITABLE_ANNOTATION_STATE",Un="SET_A11Y_STATUS_MESSAGE",Vn="SET_LAST_TOOLBAR_ACTION_USED_KEYBOARD",Gn="ENABLE_DOCUMENT_CROP_MODE",Wn="DISABLE_DOCUMENT_CROP_MODE",qn="SET_ON_ANNOTATION_RESIZE_START",Hn="SET_DOCUMENT_COMPARISON_STATE",$n="ENABLE_SCROLL_WHILE_DRAWING",Xn="DISABLE_SCROLL_WHILE_DRAWING",Yn="SET_REUSE_STATE",Jn="ENABLE_KEEP_SELECTED_TOOL",Qn="DISABLE_KEEP_SELECTED_TOOL",eo="SET_INSTANCE",to="SET_CUSTOM_UI_STORE",no="SET_SIDEBAR_WIDTH",oo="SET_READ_ONLY_ANNOTATION_FOCUS",ro="UNSET_READ_ONLY_ANNOTATION_FOCUS",io="SET_ANNOTATION_TOOLBAR_ITEMS_CALLBACK",ao="TOGGLE_CLIPBOARD_ACTIONS",so="SET_ON_WIDGET_CREATION_START_CALLBACK",lo="SET_FORM_DESIGNER_LOCAL_WIDGET_ANNOTATION",co="SET_INLINE_TOOLBAR_ITEMS_CALLBACK",uo="ADD_ANNOTATION_VARIANTS",po="ENABLE_CONTENT_EDITOR",fo="DISABLE_CONTENT_EDITOR",ho="CHANGE_CONTENT_EDITOR_SESSION_MODE",mo="ENABLE_LINK_MODE",go="DISABLE_LINK_MODE",vo="DISABLE_DRAWING_LINK_ANNOTATION_MODE",yo="SET_MEASUREMENT_SNAPPING",bo="SET_MEASUREMENT_PRECISION",wo="SET_MEASUREMENT_SCALE",So="SET_MEASUREMENT_VALUE_CONFIGURATION_CALLBACK",Po="SET_MEASUREMENT_SCALES",Eo="SET_MEASUREMENT_TOOL_STATE",xo="SET_HINT_LINES",Do="CONTENT_EDITOR/PAGE/LOADING",Co="CONTENT_EDITOR/PAGE/LOADED",ko="CONTENT_EDITOR/TEXT_BLOCK/INTERACTION/ACTIVE",Oo="CONTENT_EDITOR/TEXT_BLOCK/INTERACTION/TOGGLE",Ao="CONTENT_EDITOR/TEXT_BLOCK/INTERACTION/SELECT",To="CONTENT_EDITOR/TEXT_BLOCK/CREATE",Io="CONTENT_EDITOR/TEXT_BLOCK/UPDATE_INFO",Fo="CONTENT_EDITOR/TEXT_BLOCK/SET_FORMAT",Mo="CONTENT_EDITOR_/TEXT_BLOCK/RESIZE",_o="CONTENT_EDITOR_/TEXT_BLOCK/MOVE",No="CONTENT_EDITOR/SAVING",Ro="CONTENT_EDITOR/SET_DIRTY",Lo="CONTENT_EDITOR/FACE_LIST/LOADING",Bo="CONTENT_EDITOR/FACE_LIST/SET",jo="CONTENT_EDITOR_SET_EXIT_DIALOG",zo="CONTENT_EDITOR_SHOW_FONT_MISMATCH_TOOLTIP",Ko="CONTENT_EDITOR_HIDE_FONT_MISMATCH_TOOLTIP",Zo="CONTENT_EDITOR_FONT_MISMATCH_TOOLTIP_ABORT_CONTROLLER",Uo="ENABLE_MULTI_ANNOTATIONS_SELECTION_MODE",Vo="DISABLE_MULTI_ANNOTATIONS_SELECTION_MODE",Go="CREATE_ANNOTATION_GROUP",Wo="SET_SELECTED_GROUP",qo="DELETE_ANNOTATION_GROUP",Ho="REMOVE_ANNOTATION_FROM_GROUP",$o="SET_PULL_TO_REFRESH_STATE",Xo="SET_RICH_EDITOR_REF",Yo="FOCUS_WIDGET_ANNOTATION",Jo="SET_ON_COMMENT_CREATION_START_CALLBACK",Qo="INVALIDATE_PAGE_KEYS",er="CONTENT_EDITOR_ACTIVE_TEXT_BLOCK_DELETE",tr="CHANGE_SCROLL_STATE",nr="SET_CUSTOM_FONTS_READABLE_NAMES",or="ENABLE_MEASUREMENT_MODE",rr="DISABLE_MEASUREMENT_MODE",ir="SHOW_MEASUREMENT_SETTINGS",ar="HIDE_MEASUREMENT_SETTINGS",sr="SET_SECONDARY_MEASUREMENT_UNIT",lr="SET_ACTIVE_MEASUREMENT_SCALE",cr="SET_CALIBRATION_MODE",ur="UPDATE_PAGE_KEYS",dr="SET_DISABLE_POINT_SNAPPING"},91859:(e,t,n)=>{"use strict";n.d(t,{$P:()=>V,Bd:()=>D,Bs:()=>j,Dx:()=>O,Fg:()=>i,GI:()=>r,Hr:()=>x,J8:()=>M,Kk:()=>P,M5:()=>N,QS:()=>m,Qc:()=>$,Qq:()=>o,Qr:()=>L,RI:()=>s,SP:()=>I,Sk:()=>S,St:()=>q,Ui:()=>R,V4:()=>A,W3:()=>Y,XU:()=>f,XZ:()=>v,YJ:()=>w,_2:()=>K,c1:()=>E,cY:()=>h,g3:()=>c,gZ:()=>b,h8:()=>p,i1:()=>H,j1:()=>u,mM:()=>U,nJ:()=>B,oW:()=>_,pK:()=>k,pt:()=>X,rB:()=>G,re:()=>T,rm:()=>l,sP:()=>W,uq:()=>C,wK:()=>y,xD:()=>d,y$:()=>a,zA:()=>z,zT:()=>Z,zh:()=>g,zk:()=>F});const o=1200,r=1070,i=768,a=480,s=32768,l=18,c=50,u=a,d=a,p=320,f=250,h=.5,m=10,g=1.25,v=5,y=30,b=2,w=20,S=0,P=20,E=5,x=1,D=1536,C=512,k=512,O=5,A=1.25,T="PSPDFKit-Root",I=32,F=32,M=5,_=0,N=1,R=96/72,L=5e3,B={LOW:75/72,MEDIUM:150/72,HIGH:300/72},j=2/3,z=595,K=842,Z=50,U=96,V=2*U,G=300,W=1e3,q=4.25,H=2,$=10,X=16383,Y=4},75237:(e,t,n)=>{"use strict";n.d(t,{AQ:()=>d,ZP:()=>g,hD:()=>m});var o=n(84121),r=n(35369),i=n(83634),a=n(15973),s=n(24871);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const u={line:a.o9,rectangle:a.b3,"cloudy-rectangle":a.b3,"dashed-rectangle":a.b3,ellipse:a.Xs,"cloudy-ellipse":a.Xs,"dashed-ellipse":a.Xs,polygon:a.Hi,"cloudy-polygon":a.Hi,"dashed-polygon":a.Hi,polyline:a.om,ink:a.Zc,note:a.Qi,text:a.gd,stamp:a.GI,image:a.sK,widget:a.x_,strikeout:a.R9,underline:a.xu,squiggle:a.hL,highlight:a.FV,arrow:a.o9,highlighter:a.Zc,"text-highlighter":a.FV,"ink-signature":a.Zc,redaction:a.Wk,"es-signature":a.Zc,perimeter:a.om,distance:a.o9,"ellipse-area":a.Xs,"rectangle-area":a.b3,"polygon-area":a.Hi},d={line:{},rectangle:{},ellipse:{},polygon:{},polyline:{},ink:{},note:{},text:{},stamp:{},image:{},widget:{},strikeout:{},underline:{},squiggle:{},highlight:{},redaction:{}},p={arrow:{lineCaps:{end:"openArrow"}},"cloudy-rectangle":{cloudyBorderIntensity:2},"dashed-rectangle":{strokeDashArray:[3,3]},"cloudy-ellipse":{cloudyBorderIntensity:2},"dashed-ellipse":{strokeDashArray:[3,3]},"cloudy-polygon":{cloudyBorderIntensity:2},"dashed-polygon":{strokeDashArray:[3,3]},highlighter:{strokeColor:i.Z.LIGHT_YELLOW,lineWidth:30,blendMode:"multiply",opacity:1},"text-highlighter":{color:i.Z.LIGHT_YELLOW,blendMode:"multiply",opacity:1},"ink-signature":{isSignature:!0},"es-signature":{isSignature:!0,strokeColor:i.Z.BLACK},distance:{lineCaps:{start:s.u.butt,end:s.u.butt},strokeWidth:3,strokeColor:i.Z.RED},perimeter:{lineCaps:{start:s.u.butt,end:s.u.openArrow},strokeWidth:3,strokeColor:i.Z.RED},"ellipse-area":{strokeWidth:3,strokeColor:i.Z.RED},"rectangle-area":{strokeWidth:3,strokeColor:i.Z.RED},"polygon-area":{strokeWidth:3,strokeColor:i.Z.RED}},f=["lines","points","startPoint","endPoint"],h=e=>Object.keys(e).filter((t=>!f.includes(t)&&null!=e[t])).reduce(((t,n)=>(t[n]=e[n],t)),{});for(const e in d){const t=u[e];Object.getPrototypeOf(t)===a.UX?d[e]=h(c(c({},a.UX.defaultValues),t.defaultValues)):Object.getPrototypeOf(t)===a.On?d[e]=h(c(c({},a.On.defaultValues),t.defaultValues)):d[e]=h(t.defaultValues)}for(const e in p){const t=u[e];Object.getPrototypeOf(t)===a.UX?p[e]=h(c(c(c({},a.UX.defaultValues),t.defaultValues),p[e])):Object.getPrototypeOf(t)===a.On?p[e]=h(c(c(c({},a.On.defaultValues),t.defaultValues),p[e])):p[e]=h(c(c({},t.defaultValues),p[e]))}const m=(0,r.D5)([[a.FV,"highlight"],[a.xu,"underline"],[a.hL,"squiggle"],[a.R9,"strikeout"]]),g=(0,r.D5)(c(c({},d),p))},54097:(e,t,n)=>{"use strict";n.d(t,{J:()=>i,Z:()=>a});var o=n(35369),r=n(15973);const i=[r.Xs,r.FV,r.sK,r.Zc,r.o9,r.Qi,r.Hi,r.om,r.b3,r.hL,r.GI,r.R9,r.gd,r.xu,r.x_],a=(0,o.d0)(i)},84674:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i,l:()=>r});var o=n(35369);const r=[{type:"cancel"},{type:"selected-pages"},{type:"spacer"},{type:"loading-indicator"},{type:"save-as"},{type:"save"}],i=(0,o.d0)(r)},98158:(e,t,n)=>{"use strict";n.d(t,{L:()=>r,Z:()=>i});var o=n(35369);const r=[{type:"add"},{type:"remove"},{type:"duplicate"},{type:"rotate-left"},{type:"rotate-right"},{type:"move"},{type:"move-left"},{type:"move-right"},{type:"import-document"},{type:"spacer"},{type:"undo"},{type:"redo"},{type:"select-all"},{type:"select-none"}],i=(0,o.d0)(r)},79941:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(15973);const r=Object.freeze([o.Xs,o.FV,o.sK,o.Zc,o.o9,o.Qi,o.Hi,o.om,o.b3,o.Wk,o.hL,o.GI,o.R9,o.gd,o.x_,o.xu,o.Jn,o.R1].filter(Boolean))},64845:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var o=n(83634);const r=new o.Z({r:70,g:54,b:227}),i={color:o.Z.BLUE,localization:{id:"blue",defaultMessage:"Blue",description:"Blue color"}},a=[{color:o.Z.BLACK,localization:{id:"black",defaultMessage:"Black",description:"Black color"}},i,{color:r,localization:{id:"darkBlue",defaultMessage:"Dark blue",description:"Dark blue color"}}]},151:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(52247);const r=Object.freeze([o.M.DRAW,o.M.IMAGE,o.M.TYPE])},84760:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(39745);const r=Object.freeze([new o.Z({name:"Caveat"}),new o.Z({name:"Pacifico"}),new o.Z({name:"Marck Script"}),new o.Z({name:"Meddon"})])},64125:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>l});var o=n(15973),r=n(55237);const i=n(36095).Ni?396:240,a=new r.Z({width:i,height:i/3,left:0,top:0}),s=new r.Z({width:i,height:i,left:0,top:0}),l=Object.freeze([["Approved",a],["NotApproved",a],["Draft",a],["Final",a],["Completed",a],["Confidential",a],["ForPublicRelease",a],["NotForPublicRelease",a],["ForComment",a],["Void",a],["PreliminaryResults",a],["InformationOnly",a],["Rejected",s],["Accepted",s],["InitialHere",a],["SignHere",a],["Witness",a],["AsIs",a],["Departmental",a],["Experimental",a],["Expired",a],["Sold",a],["TopSecret",a],["Revised",a],["RejectedWithText",a]].map((e=>{let[t,n]=e;return new o.GI({stampType:t,boundingBox:n})})))},92457:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>r,_o:()=>i});const o=[{type:"sidebar-thumbnails"},{type:"sidebar-document-outline"},{type:"sidebar-annotations"},{type:"sidebar-bookmarks"},{type:"pager"},{type:"multi-annotations-selection"},{type:"pan"},{type:"zoom-out"},{type:"zoom-in"},{type:"zoom-mode"},{type:"spacer"},{type:"annotate"},{type:"ink"},{type:"highlighter"},{type:"text-highlighter"},{type:"ink-eraser"},{type:"signature"},{type:"image"},{type:"stamp"},{type:"note"},{type:"text"},{type:"callout"},{type:"line"},{type:"link"},{type:"arrow"},{type:"rectangle"},{type:"ellipse"},{type:"polygon"},{type:"cloudy-polygon"},{type:"polyline"},{type:"print"},{type:"document-editor"},{type:"document-crop"},{type:"search"},{type:"export-pdf"},{type:"debug"}],r=(0,n(35369).d0)(o),i=[...o.map((e=>e.type)),"layout-config","marquee-zoom","custom","responsive-group","comment","redact-text-highlighter","redact-rectangle","cloudy-rectangle","dashed-rectangle","cloudy-ellipse","dashed-ellipse","dashed-polygon","document-comparison","measure","undo","redo","form-creator","content-editor","distance","perimeter","rectangle-area","ellipse-area","polygon-area"]},28890:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var o=n(67366),r=n(25915);const i=(0,o.$j)((function(e,t){var n;let{restoreOnClose:o=!0}=t;const r=null===(n=e.frameWindow)||void 0===n?void 0:n.document;return{restoreOnCloseElement:o?null!=r&&r.hasFocus()?r.activeElement&&"function"==typeof r.activeElement.focus?r.activeElement:r.body:document.activeElement:null}}))(r.u_)},58924:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var o=n(67366),r=n(84121),i=n(67294);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}class s extends i.Component{constructor(){super(...arguments),(0,r.Z)(this,"elRef",i.createRef()),(0,r.Z)(this,"state",{styles:this._calculatePositionStyles()})}_calculatePositionStyles(){var e;const{referenceElement:t,horizontalAlignment:n}=this.props,{containerRect:o,offsets:r}=this.props,i=null!==(e=null==r?void 0:r.top)&&void 0!==e?e:0,a=this.elRef.current,s=t?t.getBoundingClientRect():null,l=a?a.getBoundingClientRect():null;let c=s?s.top+s.height:0;if(null!==l&&null!==s&&s.top+s.height+l.height>o.height&&0!==s.top&&(c=Math.max(0,s.top-l.height)),!a||!s)return{top:c+i,right:"auto",left:"auto"};if(a.offsetWidth>o.width)return{top:c+i,right:0,left:0};const u=this.props.isRTL?"right":"left",d=this.props.isRTL?"left":"right";let p="left"===u?s.left:s.right;switch(n){case"center":p-=(a.offsetWidth-s.width)/2;break;case"end":p=p-a.offsetWidth+s.width}return p<0?{top:c+i,[u]:0,[d]:"auto"}:p+a.offsetWidth>o.width?{top:c+i,[d]:0,[u]:"auto"}:"auto"===n&&p>o.width/2?{top:c+i,[u]:p-a.offsetWidth+s.width,[d]:"auto"}:{top:c+i,[u]:p,[d]:"auto"}}componentDidUpdate(e){(e.containerRect!==this.props.containerRect||this.props.measure&&!e.measure)&&this.setState({styles:this._calculatePositionStyles()})}componentDidMount(){this.setState({styles:this._calculatePositionStyles()})}render(){const{children:e}=this.props,t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({position:"absolute"},this.state.styles);return"function"==typeof e?e({ref:this.elRef,style:t}):i.createElement("div",{ref:this.elRef,style:t},e)}}(0,r.Z)(s,"defaultProps",{horizontalAlignment:"auto",measure:!0});const l=(0,o.$j)((e=>({containerRect:e.containerRect})))(s)},76192:(e,t,n)=>{"use strict";n.d(t,{u:()=>o});const o={IMMEDIATE:"IMMEDIATE",INTELLIGENT:"INTELLIGENT",DISABLED:"DISABLED"}},86617:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});const o={normal:"normal",multiply:"multiply",screen:"screen",overlay:"overlay",darken:"darken",lighten:"lighten",colorDodge:"colorDodge",colorBurn:"colorBurn",hardLight:"hardLight",softLight:"softLight",difference:"difference",exclusion:"exclusion"}},45395:(e,t,n)=>{"use strict";n.d(t,{N:()=>o});const o={solid:"solid",dashed:"dashed",beveled:"beveled",inset:"inset",underline:"underline"}},87222:(e,t,n)=>{"use strict";n.d(t,{_:()=>o});const o={SIDEBAR:"SIDEBAR",PANE:"PANE"}},94905:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});const o={TEXT:"text"}},89849:(e,t,n)=>{"use strict";n.d(t,{F:()=>o});const o={PASSWORD_REQUIRED:"PASSWORD_REQUIRED",CONNECTING:"CONNECTING",CONNECTED:"CONNECTED",CONNECTION_FAILED:"CONNECTION_FAILED"}},55024:(e,t,n)=>{"use strict";n.d(t,{Q:()=>o});const o={documentA:"documentA",documentB:"documentB",result:"result"}},9946:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});const o={USE_OPEN_DOCUMENT:"USE_OPEN_DOCUMENT",USE_FILE_DIALOG:"USE_FILE_DIALOG"}},52247:(e,t,n)=>{"use strict";n.d(t,{M:()=>o});const o={DRAW:"DRAW",IMAGE:"IMAGE",TYPE:"TYPE"}},67699:(e,t,n)=>{"use strict";n.d(t,{j:()=>o});const o={DEFAULT:"DEFAULT",EXTERNAL:"EXTERNAL",HISTORY:"HISTORY"}},52842:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});const o={POINT:"POINT",STROKE:"STROKE"}},20792:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o={TEXT_HIGHLIGHTER:"TEXT_HIGHLIGHTER",INK:"INK",INK_SIGNATURE:"INK_SIGNATURE",SIGNATURE:"SIGNATURE",STAMP_PICKER:"STAMP_PICKER",STAMP_CUSTOM:"STAMP_CUSTOM",SHAPE_LINE:"SHAPE_LINE",SHAPE_RECTANGLE:"SHAPE_RECTANGLE",SHAPE_ELLIPSE:"SHAPE_ELLIPSE",SHAPE_POLYGON:"SHAPE_POLYGON",SHAPE_POLYLINE:"SHAPE_POLYLINE",INK_ERASER:"INK_ERASER",NOTE:"NOTE",COMMENT_MARKER:"COMMENT_MARKER",TEXT:"TEXT",CALLOUT:"CALLOUT",PAN:"PAN",SEARCH:"SEARCH",DOCUMENT_EDITOR:"DOCUMENT_EDITOR",MARQUEE_ZOOM:"MARQUEE_ZOOM",REDACT_TEXT_HIGHLIGHTER:"REDACT_TEXT_HIGHLIGHTER",REDACT_SHAPE_RECTANGLE:"REDACT_SHAPE_RECTANGLE",DOCUMENT_CROP:"DOCUMENT_CROP",BUTTON_WIDGET:"BUTTON_WIDGET",TEXT_WIDGET:"TEXT_WIDGET",RADIO_BUTTON_WIDGET:"RADIO_BUTTON_WIDGET",CHECKBOX_WIDGET:"CHECKBOX_WIDGET",COMBO_BOX_WIDGET:"COMBO_BOX_WIDGET",LIST_BOX_WIDGET:"LIST_BOX_WIDGET",SIGNATURE_WIDGET:"SIGNATURE_WIDGET",DATE_WIDGET:"DATE_WIDGET",FORM_CREATOR:"FORM_CREATOR",LINK:"LINK",DISTANCE:"DISTANCE",PERIMETER:"PERIMETER",RECTANGLE_AREA:"RECTANGLE_AREA",ELLIPSE_AREA:"ELLIPSE_AREA",POLYGON_AREA:"POLYGON_AREA",CONTENT_EDITOR:"CONTENT_EDITOR",MULTI_ANNOTATIONS_SELECTION:"MULTI_ANNOTATIONS_SELECTION",MEASUREMENT:"MEASUREMENT",MEASUREMENT_SETTINGS:"MEASUREMENT_SETTINGS"}},77973:(e,t,n)=>{"use strict";n.d(t,{X:()=>o});const o={SINGLE:"SINGLE",DOUBLE:"DOUBLE",AUTO:"AUTO"}},60132:(e,t,n)=>{"use strict";n.d(t,{q:()=>o});const o={ANNOTATION_EDITING:"annotation_editing",FORMS:"acro_forms",DIGITAL_SIGNATURES:"digital_signatures",DOCUMENT_COMPARISON:"comparison",DOCUMENT_EDITING:"document_editing",WEB_VIEWER:"web:viewer",WEB_ANNOTATION_EDITING:"web:annotation_editing",INSTANT:"instant",SERVER_OPT_OUT_ANALYTICS:"server:disable-analytics",UI:"user_interface",TEXT_SELECTION:"text_selection",ELECTRON:"web:electron",FORM_DESIGNER:"editable_forms",COMMENTS:"comments",REDACTIONS:"redaction",ELECTRONIC_SIGNATURES:"electronic_signatures",CONTENT_EDITING:"content_editing",MEASUREMENT_TOOLS:"measurement_tools",TEXT_COMPARISON:"text_comparison"}},24871:(e,t,n)=>{"use strict";n.d(t,{a:()=>r,u:()=>o});const o={square:"square",circle:"circle",diamond:"diamond",openArrow:"openArrow",closedArrow:"closedArrow",butt:"butt",reverseOpenArrow:"reverseOpenArrow",reverseClosedArrow:"reverseClosedArrow",slash:"slash"},r=Object.values(o)},4132:(e,t,n)=>{"use strict";n.d(t,{L:()=>o});const o={WHOLE:"whole",ONE:"oneDp",TWO:"twoDp",THREE:"threeDp",FOUR:"fourDp",HALVES:"1/2",QUARTERS:"1/4",EIGHTHS:"1/8",SIXTEENTHS:"1/16"}},36489:(e,t,n)=>{"use strict";n.d(t,{s:()=>o});const o={INCHES:"in",MILLIMETERS:"mm",CENTIMETERS:"cm",POINTS:"pt"}},79827:(e,t,n)=>{"use strict";n.d(t,{K:()=>o});const o={INCHES:"in",MILLIMETERS:"mm",CENTIMETERS:"cm",POINTS:"pt",FEET:"ft",METERS:"m",YARDS:"yd",KILOMETERS:"km",MILES:"mi"}},56966:(e,t,n)=>{"use strict";n.d(t,{x:()=>o});const o={FORM_DESIGNER_ERROR:"FORM_DESIGNER_ERROR",MEASUREMENT_ERROR:"MEASUREMENT_ERROR"}},18025:(e,t,n)=>{"use strict";n.d(t,{V9:()=>i,Y4:()=>r,Zi:()=>o});const o={COMMENT:"COMMENT",RIGHT_POINTER:"RIGHT_POINTER",RIGHT_ARROW:"RIGHT_ARROW",CHECK:"CHECK",CIRCLE:"CIRCLE",CROSS:"CROSS",INSERT:"INSERT",NEW_PARAGRAPH:"NEW_PARAGRAPH",NOTE:"NOTE",PARAGRAPH:"PARAGRAPH",HELP:"HELP",STAR:"STAR",KEY:"KEY"},r={[o.COMMENT]:"comment",[o.RIGHT_POINTER]:"rightPointer",[o.RIGHT_ARROW]:"rightArrow",[o.CHECK]:"check",[o.CIRCLE]:"circle",[o.CROSS]:"cross",[o.INSERT]:"insert",[o.NEW_PARAGRAPH]:"newParagraph",[o.NOTE]:"note",[o.PARAGRAPH]:"paragraph",[o.HELP]:"help",[o.STAR]:"star",[o.KEY]:"key"},i=Object.keys(r).reduce(((e,t)=>(e[r[t]]=t,e)),{})},63632:(e,t,n)=>{"use strict";n.d(t,{w:()=>o});const o={PDFA_1A:"pdfa-1a",PDFA_1B:"pdfa-1b",PDFA_2A:"pdfa-2a",PDFA_2U:"pdfa-2u",PDFA_2B:"pdfa-2b",PDFA_3A:"pdfa-3a",PDFA_3U:"pdfa-3u",PDFA_3B:"pdfa-3b",PDFA_4:"pdfa-4",PDFA_4E:"pdfa-4e",PDFA_4F:"pdfa-4f"}},39511:(e,t,n)=>{"use strict";n.d(t,{X:()=>o});const o={DOM:"DOM",EXPORT_PDF:"EXPORT_PDF"}},80440:(e,t,n)=>{"use strict";n.d(t,{g:()=>o});const o={LOW:"LOW",MEDIUM:"MEDIUM",HIGH:"HIGH"}},3150:(e,t,n)=>{"use strict";n.d(t,{l:()=>o});const o={smallerSize:"smallerSize",fasterProcessing:"fasterProcessing"}},5038:(e,t,n)=>{"use strict";n.d(t,{x:()=>o});const o={SharePoint:"SharePoint",Salesforce:"Salesforce",Maui_Android:"Maui_Android",Maui_iOS:"Maui_iOS",Maui_MacCatalyst:"Maui_MacCatalyst",Maui_Windows:"Maui_Windows"}},72131:(e,t,n)=>{"use strict";n.d(t,{J:()=>o});let o=function(e){return e.NO="NO",e.VIA_VIEW_STATE="VIA_VIEW_STATE",e.VIA_BACKEND_PERMISSIONS="VIA_BACKEND_PERMISSIONS",e.LICENSE_RESTRICTED="LICENSE_RESTRICTED",e}({})},51731:(e,t,n)=>{"use strict";n.d(t,{V:()=>o});const o={TOP:"TOP",BOTTOM:"BOTTOM",LEFT:"LEFT",RIGHT:"RIGHT",TOP_LEFT:"TOP_LEFT",TOP_RIGHT:"TOP_RIGHT",BOTTOM_RIGHT:"BOTTOM_RIGHT",BOTTOM_LEFT:"BOTTOM_LEFT"}},47710:(e,t,n)=>{"use strict";n.d(t,{G:()=>o});const o={CONTINUOUS:"CONTINUOUS",PER_SPREAD:"PER_SPREAD",DISABLED:"DISABLED"}},94681:(e,t,n)=>{"use strict";n.d(t,{n:()=>o});const o={CREDIT_CARD_NUMBER:"credit_card_number",DATE:"date",TIME:"time",EMAIL_ADDRESS:"email_address",INTERNATIONAL_PHONE_NUMBER:"international_phone_number",IP_V4:"ipv4",IP_V6:"ipv6",MAC_ADDRESS:"mac_address",NORTH_AMERICAN_PHONE_NUMBER:"north_american_phone_number",SOCIAL_SECURITY_NUMBER:"social_security_number",URL:"url",US_ZIP_CODE:"us_zip_code",VIN:"vin"}},96617:(e,t,n)=>{"use strict";n.d(t,{S:()=>o});const o={TEXT:"text",PRESET:"preset",REGEX:"regex"}},68382:(e,t,n)=>{"use strict";n.d(t,{o:()=>o});const o={SELECTED:"SELECTED",EDITING:"EDITING"}},64494:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});const o={IF_SIGNED:"IF_SIGNED",HAS_WARNINGS:"HAS_WARNINGS",HAS_ERRORS:"HAS_ERRORS",NEVER:"NEVER"}},19702:(e,t,n)=>{"use strict";n.d(t,{f:()=>o});const o={ANNOTATIONS:"ANNOTATIONS",BOOKMARKS:"BOOKMARKS",DOCUMENT_OUTLINE:"DOCUMENT_OUTLINE",THUMBNAILS:"THUMBNAILS",CUSTOM:"CUSTOM"}},65872:(e,t,n)=>{"use strict";n.d(t,{d:()=>o});const o={START:"START",END:"END"}},37231:(e,t,n)=>{"use strict";n.d(t,{H:()=>o});const o={signatureOnly:"signatureOnly",signatureAndDescription:"signatureAndDescription",descriptionOnly:"descriptionOnly"}},67628:(e,t,n)=>{"use strict";n.d(t,{H:()=>o});const o={ELECTRONIC_SIGNATURES:"electronic_signatures",LEGACY_SIGNATURES:"legacy_signatures",NONE:"none"}},59386:(e,t,n)=>{"use strict";n.d(t,{f:()=>o});const o={ALWAYS:"ALWAYS",NEVER:"NEVER",USING_UI:"USING_UI"}},68138:(e,t,n)=>{"use strict";n.d(t,{Q:()=>o});const o={LIGHT:"LIGHT",DARK:"DARK",AUTO:"AUTO"}},89e3:(e,t,n)=>{"use strict";n.d(t,{p:()=>o});const o={TOP:"TOP",BOTTOM:"BOTTOM"}},78399:(e,t,n)=>{"use strict";n.d(t,{Y:()=>o});const o={COMMENT_THREAD:"COMMENT_THREAD",ANNOTATIONS_SIDEBAR:"ANNOTATIONS_SIDEBAR"}},28098:(e,t,n)=>{"use strict";n.d(t,{c:()=>o});const o={AUTO:"AUTO",FIT_TO_WIDTH:"FIT_TO_WIDTH",FIT_TO_VIEWPORT:"FIT_TO_VIEWPORT",CUSTOM:"CUSTOM"}},68258:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>f,sS:()=>p,z5:()=>d});var o=n(80857),r=n(29662),i=n.n(r),a=n(57742),s=n(13997),l=n(53678);const c=(0,o.Z)("I18n"),u=e=>e.split("-")[0],d=e=>{let t=e;return i().includes(t)||(t=u(t),c(i().includes(t),`The "${t}" locale is not supported. Available locales are: ${i().join(", ")}. You can also add "${t}" as a custom one with PSPDFKit.I18n.locales.push('${t}')`)),t};async function p(e){await(0,a.EV)(e),await(0,a.wP)(u(e))}const f={locales:i(),messages:a.ZP,preloadLocalizationData:async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"==typeof t.baseUrl&&(0,l.Pn)(t.baseUrl);const o=t.baseUrl||(0,s.SV)(window.document);n.p=o;const r=d(e);await p(r)}}},29662:e=>{e.exports=["cs","cy","da","de","el","en-GB","en","es","fi","fr-CA","fr","hr","id","it","ja","ko","ms","nb-NO","nl","pl","pt-PT","pt","ru","sk","sl","sv","th","tr","uk","zh-Hans","zh-Hant"]},57742:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>l,wP:()=>u,EV:()=>c});var o=n(80857),r=n(37756);const i={cs:()=>n.e(3005).then(n.t.bind(n,12282,23)),cy:()=>n.e(7050).then(n.t.bind(n,26873,23)),da:()=>n.e(752).then(n.t.bind(n,5407,23)),de:()=>n.e(8869).then(n.t.bind(n,60333,23)),el:()=>n.e(1882).then(n.t.bind(n,80056,23)),en:()=>n.e(5014).then(n.t.bind(n,32778,23)),es:()=>n.e(1252).then(n.t.bind(n,53802,23)),fi:()=>n.e(5528).then(n.t.bind(n,15857,23)),fr:()=>n.e(1145).then(n.t.bind(n,75828,23)),hr:()=>n.e(9677).then(n.t.bind(n,34029,23)),id:()=>n.e(5192).then(n.t.bind(n,32419,23)),it:()=>n.e(3424).then(n.t.bind(n,81998,23)),ja:()=>n.e(4728).then(n.t.bind(n,55389,23)),ko:()=>n.e(1089).then(n.t.bind(n,97301,23)),ms:()=>n.e(1518).then(n.t.bind(n,55367,23)),nb:()=>n.e(2279).then(n.t.bind(n,93673,23)),nl:()=>n.e(9486).then(n.t.bind(n,80953,23)),pl:()=>n.e(6523).then(n.t.bind(n,12533,23)),pt:()=>n.e(4932).then(n.t.bind(n,28708,23)),ru:()=>n.e(1385).then(n.t.bind(n,63409,23)),sk:()=>n.e(1077).then(n.t.bind(n,87042,23)),sl:()=>n.e(1277).then(n.t.bind(n,13367,23)),sv:()=>n.e(2727).then(n.t.bind(n,64520,23)),th:()=>n.e(1063).then(n.t.bind(n,69909,23)),tr:()=>n.e(9384).then(n.t.bind(n,99102,23)),uk:()=>n.e(1843).then(n.t.bind(n,32058,23)),zh:()=>n.e(4072).then(n.t.bind(n,2725,23))},a=(0,o.Z)("I18n"),s={},l=s;async function c(e){if(!(e in s))try{const t=await r.o[e]();s[e]=t.default}catch(t){a(!1,`Cannot find translations for "${e}". Please retry or add them manually to PSPDFKit.I18n.messages["${e}"]`)}return s[e]}async function u(e){if(i[e])try{await i[e]()}catch(t){a(!1,`Cannot find locale data for "${e}". Please retry or contact support for further assistance.`)}}},37756:(e,t,n)=>{"use strict";n.d(t,{o:()=>o});const o={cs:()=>n.e(3579).then(n.t.bind(n,46984,19)),cy:()=>n.e(7578).then(n.t.bind(n,50706,19)),da:()=>n.e(1139).then(n.t.bind(n,32156,19)),de:()=>n.e(1009).then(n.t.bind(n,47875,19)),el:()=>n.e(1323).then(n.t.bind(n,87908,19)),"en-GB":()=>n.e(6045).then(n.t.bind(n,29207,19)),en:()=>n.e(1874).then(n.t.bind(n,70840,19)),es:()=>n.e(473).then(n.t.bind(n,59657,19)),fi:()=>n.e(9390).then(n.t.bind(n,5317,19)),"fr-CA":()=>n.e(2916).then(n.t.bind(n,76215,19)),fr:()=>n.e(3360).then(n.t.bind(n,28435,19)),hr:()=>n.e(157).then(n.t.bind(n,24733,19)),id:()=>n.e(9726).then(n.t.bind(n,33615,19)),it:()=>n.e(8839).then(n.t.bind(n,24068,19)),ja:()=>n.e(3463).then(n.t.bind(n,87854,19)),ko:()=>n.e(1168).then(n.t.bind(n,23980,19)),ms:()=>n.e(1391).then(n.t.bind(n,48853,19)),"nb-NO":()=>n.e(4966).then(n.t.bind(n,16844,19)),nl:()=>n.e(5677).then(n.t.bind(n,14314,19)),pl:()=>n.e(4899).then(n.t.bind(n,16365,19)),"pt-PT":()=>n.e(5431).then(n.t.bind(n,55910,19)),pt:()=>n.e(517).then(n.t.bind(n,7638,19)),ru:()=>n.e(8057).then(n.t.bind(n,21652,19)),sk:()=>n.e(9971).then(n.t.bind(n,57298,19)),sl:()=>n.e(5595).then(n.t.bind(n,33943,19)),sv:()=>n.e(6530).then(n.t.bind(n,99649,19)),th:()=>n.e(5666).then(n.t.bind(n,81446,19)),tr:()=>n.e(407).then(n.t.bind(n,18141,19)),uk:()=>n.e(3095).then(n.t.bind(n,76911,19)),"zh-Hans":()=>n.e(6678).then(n.t.bind(n,47224,19)),"zh-Hant":()=>n.e(7579).then(n.t.bind(n,58372,19))}},3479:(e,t,n)=>{e.exports=n(12708).default},31835:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});class o{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.events=e,this.listeners={}}on(e,t){if("function"!=typeof t)throw new TypeError("Listener must be a function");if(!this.supportsEvent(e))throw new TypeError(`Event '${e}' is not supported. Only supporting ${this.events.join(", ")}`);this.listeners[e]=this.listeners[e]||[],this.listeners[e].push(t)}off(e,t){if("function"!=typeof t)throw new TypeError("Listener must be a function");if(!this.supportsEvent(e))throw new TypeError(`Event '${e}' is not supported. Only supporting ${this.events.join(", ")}`);const n=this.listeners[e]||[];n.forEach(((e,o)=>{e===t&&n.splice(o,1)})),0===n.length&&delete this.listeners[e]}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];if(!this.supportsEvent(e))throw new TypeError(`Event '${e}' is not supported. Only supporting ${this.events.join(", ")}`);const r=this.listeners[e];void 0!==r&&r.forEach((e=>{e.call(null,...n)}))}supportsEvent(e){return 0===this.events.length||-1!==this.events.indexOf(e)}}},8503:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});var o=n(84121),r=n(35369),i=n(3534),a=n(76192),s=n(96846);class l{constructor(e,t){(0,o.Z)(this,"localFormFieldsMapping",(0,r.D5)()),(0,o.Z)(this,"onCreate",(e=>{this.localFormFieldsMapping=this.localFormFieldsMapping.set(e.id,e.name)})),(0,o.Z)(this,"onUpdate",(e=>{this.onCreate(e)})),(0,o.Z)(this,"onDelete",(e=>{this.localFormFieldsMapping=this.localFormFieldsMapping.delete(e.id)})),this.formFieldProvider=e,this.localFormFieldCallbacks=t}createBackendObject(e){return this.formFieldProvider.createFormField(e)}updateBackendObject(e){return this.formFieldProvider.updateFormField(e)}deleteBackendObject(e){return this.formFieldProvider.deleteFormField(e)}createStoreObjects(e){this.localFormFieldsMapping=this.localFormFieldsMapping.withMutations((t=>{e.forEach((e=>{t.set(e.id,e.name)}))})),this.localFormFieldCallbacks.createFormFields(e)}updateStoreObjects(e){this.localFormFieldsMapping=this.localFormFieldsMapping.withMutations((t=>{e.forEach((e=>{t.set(e.id,e.name)}))})),this.localFormFieldCallbacks.updateFormFields(e)}deleteStoreObjects(e){this.localFormFieldsMapping=this.localFormFieldsMapping.withMutations((t=>{e.forEach((e=>{t.delete(e)}))})),this.localFormFieldCallbacks.deleteFormFields(e)}validateObject(e){if(!e.name||"string"!=typeof e.name||!e.id||"string"!=typeof e.id)return!1;try{return(0,i.Gu)(e),!0}catch(e){return!1}}getObjectById(e){const t=this.localFormFieldsMapping.get(e);return t?this.localFormFieldCallbacks.getFormFieldByName(t):null}getObjectId(e){return e.id}refresh(){this.localFormFieldCallbacks.refreshSignaturesInfo()}syncChanges(){return this.formFieldProvider.syncChanges()}}class c extends s.a{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.u.IMMEDIATE,r=arguments.length>3?arguments[3]:void 0;super(new l(e,t),n,r),(0,o.Z)(this,"loadFormFields",function(){let e=null;return async function(){e||(e=this.formFieldProvider.loadFormFields()),await e}}()),this.formFieldProvider=e}}},60797:(e,t,n)=>{"use strict";n.d(t,{D:()=>l,V:()=>s});var o=n(84121),r=n(35369);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e){const t=e.defaultValues||{},n=e.prototype;n._defaultValues=a(a({},n._defaultValues||{}),t);const o=Object.keys(n._defaultValues);n._keys=o,n._indices={};for(let e=0;e<o.length;e++){const t=o[e];n._indices[t]=e}o.forEach((e=>{Object.defineProperty(n,e,{get(){return this.get(e)},set(t){this.set(e,t)}})}))}class l extends((0,r.WV)({})){constructor(e){super(e)}}},55615:(e,t,n)=>{"use strict";n.d(t,{mH:()=>f,ZP:()=>v,il:()=>g});var o=n(84121),r=n(35369),i=n(21614),a=n(47347);function s(e,t){const n=t.record_rev,o=e.stagedRecordsChanges;if((0,a.kG)("number"==typeof n&&n>=0,"Tried to apply changes but the server responded with no `record_rev`"),(0,a.kG)(n>=e.localRecordsRev,"The server revision number is lower than the current one."),n<=e.localRecordsRev)return e;(0,a.kG)("number"==typeof t.previous_record_rev,"The payload must have a `previous_record_rev`"),(0,a.kG)(t.previous_record_rev>=e.localRecordsRev,"The payload's `previous_record_rev` is unknown to us, this means we missed out on changes.");let i=0;const s=e.requiredAttachmentIds;let l=(0,r.l4)(),c=(0,r.aV)();const u=[],d=e.localRecordsContents.withMutations((e=>{let n;n={accepted:{created:t=>{let{id:n,permissions:r,group:s,isAnonymous:l}=t;(0,a.kG)(!e.has(n),"There's already a record with the newly created record id");const c=o.find((e=>e.id===n));if(!c)return;c.resolve(null);const{content:u}=c;e.set(n,{content:u,permissions:r,group:s,isAnonymous:l}),i++},updated:t=>{let{id:n,permissions:r,group:s,isAnonymous:l}=t;(0,a.kG)(e.has(n),"Tried to update a record that is not present");const c=o.find((e=>e.id===n));if(!c)return;c.resolve(!0);const{content:u}=c;e.set(n,{content:u,permissions:r,group:s,isAnonymous:l}),i++},deleted:t=>{(0,a.kG)(e.has(t),"Tried to delete a record that is not present");const n=o.find((e=>e.id===t));n&&(n.resolve(!0),e.delete(t),i++)}},rejected:(e,t)=>{let[n,r]=t;const d=o.find((e=>e.id===n));if(d)switch(i++,r){case"conflict":d.reject(new a.p2("The server rejected the change due to a conflict")),"created"!==e&&u.push(n);break;case"attachment_not_found":{const e=Object.keys(d.attachments),t=!s.intersect(e).isEmpty();if(d.attachments&&!t&&Object.keys(d.attachments).length>0){l=l.union(Object.keys(d.attachments)),c=c.push(d);break}}default:d.reject(new a.p2("The server rejected the change")),"created"!==e&&u.push(n)}},changes:{created:t=>{(0,a.kG)(!e.has(t.id),"The change set tried to add a record that is already present");const{content:n,permissions:o,group:r,isAnonymous:i}=t;e.set(t.id,{content:n,permissions:o,group:r,isAnonymous:i})},updated:t=>{(0,a.kG)(e.has(t.id),`The change set tried to update a record with id ${t.id} that was not present`);const{content:n,permissions:o,group:r,isAnonymous:i}=t;e.set(t.id,{content:n,permissions:o,group:r,isAnonymous:i}),u.push(t.id)},deleted:t=>{(0,a.kG)(e.has(t),`The change set you tried to delete a record with id ${t} that was not present`),e.delete(t),u.push(t)}}},t.accepted.created.forEach(n.accepted.created),t.accepted.updated.forEach(n.accepted.updated),t.accepted.deleted.forEach(n.accepted.deleted),["created","updated","deleted"].forEach((e=>{Object.entries(t.rejected[e]).forEach((t=>{let o=t[1];"conflict"!==o&&"attachment_not_found"!==o&&(o=null),n.rejected(e,[t[0],o])}))})),t.changes.created.forEach(n.changes.created),t.changes.updated.forEach(n.changes.updated),t.changes.deleted.forEach(n.changes.deleted)}));(0,a.kG)(i===o.size,"Some changes were not processed by the server");const p=function(e,t){const n=e.localRecordsChanges.filter((e=>"created"===e.type||!t.includes(e.id)||(e.reject(new a.p2("Request was cleared because a newer revision arrived.")),!1)));return e.set("localRecordsChanges",n)}(e,(0,r.aV)(u));return p.withMutations((e=>e.set("requiredAttachmentIds",l).update("localRecordsChanges",(e=>e.merge(c))).set("stagedRecordsChanges",(0,r.aV)()).set("localRecordsContents",d).set("localRecordsRev",n)))}class l{constructor(e,t){(0,o.Z)(this,"_currentDelay",0),this._initialDelay=e,this._delayGrowthCap=t,this._currentDelay=e}schedule(e){const t=this._currentDelay;this.cancel(),t<this._delayGrowthCap&&(this._currentDelay+=1e3+Math.ceil(Math.random()*t)),this._timeout=setTimeout((()=>e()),t)}cancel(){this._timeout&&(clearTimeout(this._timeout),this._timeout=null)}reset(){this._currentDelay=this._initialDelay,this.cancel()}}var c=n(23413),u=n(89551);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const f=3e4;let h=0;const m=new Set;function g(){m.forEach((e=>{e._currentRequest&&!e._currentRequestHasChanges&&(e._abortCurrentRequest(),setTimeout((()=>e.nextCycle().catch(console.log)),0))}))}class v{constructor(e){let{getState:t,setState:n,onChanges:r,onAcceptedRecords:i,longPollingTimeout:a=f,backoffTimer:s=new l(1e3,6e4),RequestClass:u=c.Z}=e;(0,o.Z)(this,"onDocumentHandleConflictCallback",(()=>{})),(0,o.Z)(this,"_lastAbortedRequest",null),(0,o.Z)(this,"_handleBeforeUnload",(()=>{this._abortCurrentRequest()})),this._currentRequestHasChanges=!1,this._isDestroyed=!1,this.getState=t,this.setState=n,this.onChangesCallback=r||(()=>{}),this.onAcceptedRecordsCallback=i||(()=>{}),this.RequestClass=u,this._longPollingTimeout=a,this._backoffTimer=s,window.addEventListener("beforeunload",this._handleBeforeUnload),m.add(this)}async nextCycle(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._longPollingTimeout;if(this._isDestroyed)return;if(this._currentRequest&&this._currentRequestHasChanges)return(0,a.kG)(this._currentRequestPromise,"Expected to have request running but no one was ever made."),this._currentRequestPromise;this._currentRequest&&(this._abortCurrentRequest(),this._backoffTimer&&this._backoffTimer.cancel());const o=this.getState(),l=o.localRecordsChanges;this.setState(o.set("localRecordsChanges",(0,r.aV)()).set("stagedRecordsChanges",l));const c=this._createSyncRequest(),d=!l.isEmpty(),f=new Promise(((n,o)=>{e=n,t=o})),m=(0,i.v4)(),g={request_id:m,record_rev:o.localRecordsRev,changes:{created:l.filter((e=>"created"===e.type)).map((e=>{let{id:t,content:n,group:o,isAnonymous:r}=e;const i=n&&"isAnonymous"in n?n.isAnonymous:r;return p(p(p({id:t},"boolean"==typeof i&&{isAnonymous:i}),n&&{content:n}),o&&{group:o})})).toJS(),updated:l.filter((e=>"updated"===e.type)).map((e=>{let{id:t,content:n,group:o,isAnonymous:r}=e;const i=n&&"isAnonymous"in n?n.isAnonymous:r;return p(p(p({id:t},"boolean"==typeof i&&{isAnonymous:i}),n&&{content:n}),o&&{group:o})})).toJS(),deleted:l.filter((e=>"deleted"===e.type)).map((e=>e.id)).toJS()},timeout:d?0:n},v=o.requiredAttachmentIds.isEmpty()?g:function(e,t){const n=new FormData;return n.append("sync",JSON.stringify(e)),t.requiredAttachmentIds.forEach((e=>{var o;n.append(e,null===(o=t.localRecordsChanges.find((t=>t.attachments.hasOwnProperty(e))))||void 0===o?void 0:o.attachments[e])})),n}(g,o);return c.request({method:"POST",data:v}).then((t=>{void 0!==t.request_id&&(0,a.kG)(t.request_id===m,"The response doesn't match the client request ID"),(0,a.kG)(c!==this._lastAbortedRequest,"A manually aborted request still managed to resolve."),(0,a.kG)(c===this._currentRequest,"Expected the resolved request to be the latest created request."),(0,a.kG)(!this._isDestroyed,"The instance is destroyed yet the request managed to resolve.");const n=this.getState(),o=s(n,p(p({},t),{},{previous_record_rev:n.localRecordsRev}));this.setState(o),this._currentRequestHasChanges=!1,this._currentRequest=null,h-=1,e();try{t.record_rev>n.localRecordsRev&&(this.onAcceptedRecordsCallback(t.accepted),this.onChangesCallback(t.changes)),this._scheduleNextCycle(!1,(()=>!o.localRecordsChanges.isEmpty()))}catch(e){throw h+=1,e}})).catch((e=>{if("Outdated layer handle"===e.message&&!this._isDestroyed)return this.onDocumentHandleConflictCallback(),this.destroy(),t();c===this._lastAbortedRequest?t(new a.p2("A manually aborted request still managed to reject.")):c!==this._currentRequest?t(new a.p2("Expected the reject request to be the latest created request.")):this._isDestroyed?t(new a.p2("The instance is destroyed yet the request managed to reject.")):t(new a.p2("Pushing changes failed"+(e&&e.message?`: ${e.message}`:"")));const n=(0,u.n)({oldChanges:l,newChanges:this.getState().localRecordsChanges});this.setState(o.set("localRecordsChanges",n).set("stagedRecordsChanges",(0,r.aV)())),this._currentRequestHasChanges=!1,this._currentRequest=null,h-=1,this._scheduleNextCycle(!0)})),h+=1,h>3&&(0,a.ZK)(`PSPDFKit: detected ${h} open sync requests. This might be due to multiple PSPDFKit for Web instances running in parallel, did you forget to \`unload\` any of them? Due to the browser limit of maximum number of default simultaneous persistent connections per server, this might cause subsequent requests to be queued and processed later which might result in a slowdown for your app.`),this._currentRequest=c,this._currentRequestHasChanges=d,this._currentRequestPromise=f,f}setOnDocumentHandleConflictCallback(e){this.onDocumentHandleConflictCallback=e}destroy(){this._abortCurrentRequest(),window.removeEventListener("beforeunload",this._handleBeforeUnload),this._isDestroyed=!0,m.delete(this)}log(e){(0,a.cM)(e)}_scheduleNextCycle(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>!0;const n=()=>{this.nextCycle().catch(this.log)};e?this._backoffTimer.schedule(n):(this._backoffTimer.reset(),(this._longPollingTimeout>0||t())&&n())}_createSyncRequest(){const{serverURL:e,authPayload:t}=this.getState().requestInfo;return(0,a.kG)("string"==typeof e,"Cannot call request without serverURL"),(0,a.kG)(t&&"string"==typeof t.auth_token,"Cannot call request without authPayload"),new this.RequestClass(e,t.auth_token)}_abortCurrentRequest(){this._currentRequest&&(h-=1,this._lastAbortedRequest=this._currentRequest,this._currentRequest.abort(),this._currentRequest=null)}}},89551:(e,t,n)=>{"use strict";n.d(t,{n:()=>r});var o=n(47347);function r(){let{oldChanges:e,newChanges:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e;return t.forEach((e=>{n=i({oldChanges:n,newChange:e})})),n}function i(){let{oldChanges:e,newChange:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t,r=e.filter((e=>{if(e.id===t.id){switch(t.type){case"updated":if("created"===e.type){n=a(e,t.set("type","created"));break}if("updated"===e.type){n=a(e,t);break}case"deleted":if("created"===e.type){e.resolve(),t.resolve(),n=null;break}if("updated"===e.type){n=a(e,t);break}default:e.reject(new o.p2("Request was cleared because a more recent update was queued."))}return!1}return!0}));return n&&(r=r.push(n)),r}function a(e,t){const n=e.resolve,o=t.resolve,r=e.reject,i=t.reject;return t.set("resolve",(e=>{n(e),o(e)})).set("reject",(e=>{r(e),i(e)}))}},71652:(e,t,n)=>{"use strict";n.d(t,{V:()=>r,h:()=>i});var o=n(47347);function r(e,t){let n;return n=e instanceof Error?e:new Error(e),Object.setPrototypeOf(n,r.prototype),n.reason=t,n}function i(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new r(n?`Some changes could not be ${t?"synced":"saved"} to backend: ${n}`:`Some changes could not be ${t?"synced":"saved"} to backend.`,e)}r.prototype=Object.create(o.p2.prototype,{name:{value:"PSPDFKitSaveError",enumerable:!1}})},83253:(e,t,n)=>{"use strict";n.d(t,{y:()=>o,z:()=>r});const o=1,r=2},34710:(e,t,n)=>{"use strict";n.d(t,{f:()=>c});var o=n(84121),r=n(35369),i=n(47347),a=n(88804);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class c{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=arguments.length>4?arguments[4]:void 0;if(this.examples=t,this.customStyles=n,this.document=a?a.ownerDocument:e,this.wrapper=e.createElement("div"),this.wrapper.setAttribute("aria-hidden","true"),this.wrapper.className=o,this._setStyles(this.wrapper,l(l({},c.defaultWrapperStyles),n)),t instanceof r.aV)t.forEach((t=>{const n="string"==typeof t?t:"",o=e.createElement("span");o.setAttribute("aria-hidden","true"),o.style.display="inline-block",o.style.whiteSpace="pre-wrap",o.innerText=n,this.wrapper.appendChild(o)}));else{const e="string"==typeof t?t:"";this.wrapper.innerHTML=e}const s=a||this.document.documentElement;(0,i.kG)(s,"documentElement must not be null"),s.appendChild(this.wrapper)}measure(){const e=a.UL.fromClientRect(this.wrapper.getBoundingClientRect()),t=e.getLocation().scale(-1);return this.examples instanceof r.aV?this.examples.map(((e,n)=>{const o=this.wrapper.childNodes[n];return a.UL.fromClientRect(o.getBoundingClientRect()).translate(t)})):(0,r.aV)([e.translate(t)])}remove(){this.wrapper.parentNode&&this.wrapper.parentNode.removeChild(this.wrapper),this.wrapper=null,this.examples=null}_setStyles(e,t){for(const n in t)e.style[n]=t[n]}}(0,o.Z)(c,"defaultWrapperStyles",Object.freeze({maxWidth:"none",display:"inline-block",position:"absolute",height:"auto",width:"auto",margin:"0",padding:"0",whiteSpace:"nowrap",top:"-10000px",left:"-10000px",fontSize:"80px",fontWeight:"normal"}))},60619:(e,t,n)=>{"use strict";n.d(t,{GA:()=>A,Nk:()=>O,oD:()=>k});var o=n(47347),r=n(35369),i=n(67366),a=n(15973),s=n(66687),l=n(18146),c=n(80857),u=n(25797),d=n(95651),p=n(69939),f=n(17746),h=n(33754),m=n(68250),g=n(55909),v=n(19815),y=n(59780),b=n(10284),w=n(22571),S=n(45395),P=n(51269),E=n(60132);const x=(0,c.Z)("Annotations"),D="The API you're trying to use requires a annotation editing license. Annotation Editing is a component of PSPDFKit for Web and thus sold separately.\nhttps://pspdfkit.com/guides/web/current/annotations/introduction-to-annotations/",C="WidgetAnnotation can only be modified if you are using Standalone setup or with Instant turned on. If you are using server backed setup, make sure `instant` is set to `true` in configuration.",k="The API you're trying to use requires a measurement license. Measurement is a component of PSPDFKit for Web and sold separately.";class O extends m.I{constructor(e,t){super(t().annotationManager),this.dispatch=e,this.getState=t}async create(e,t){const n=this.getState(),r=e.map((e=>{T(n,e,"create");const r=e.id;if("string"==typeof r&&x(!n.annotations.has(r),`Annotation id (${r}) is already used.`),e instanceof a.x_&&t){A(n,e)||x(t.some((t=>t instanceof y.Wi&&t.name===e.formFieldName)),`Widget orphan: The widget annotation can't be created because no form field was found with the name '${e.formFieldName}'. Please ensure that you create the corresponding form field together with the widget via instance.create([widget, formField]).`)}const{annotationCreatorName:i,annotationCreatorNameReadOnly:s}=n;if(e.creatorName&&e.creatorName!==i&&s)throw new o.p2("The annotation creator name is different from the one set on the JWT.");M(e);let l=e.withMutations((t=>{t.merge((0,d.lx)(n.set("currentItemPreset",null))),["name","id","creatorName","createdAt","updatedAt"].map((n=>e[n]&&t.set(n,e[n])))}));if(e instanceof a.x_&&e.group)throw new o.p2("If you want to define the `group` of this widget annotation, pass it to the corresponding form field instead. Widget annotations inherit the `group` from their form field.");if(l instanceof a.x_&&(l=l.delete("group")),e instanceof a.x_){const n=this.getState;if((null==t?void 0:t.some((t=>t instanceof y.Wi&&t.name===e.formFieldName)))&&!!A(n(),e))throw new o.p2(`The widget annotation can't be created because the form field it'll be created with has a duplicated form field name '${e.formFieldName}'. Please ensure the form field name is unique.`);setTimeout((()=>{x(l instanceof a.x_,"Expected widget annotation");null==A(n(),l)&&(this.dispatch((0,p.hQ)(l)),(0,o.ZK)(`Widget orphan: The widget annotation has been deleted because no form was field found with the name ${l.formFieldName} after 500ms. Please ensure that once instance.create() resolves, a corresponding form field is created with instance.create(). (See: https://pspdfkit.com/api/web/PSPDFKit.Instance.html#create)`))}),500)}return l=_(l),l}));return(0,i.dC)((()=>{r.forEach((e=>{e instanceof Error||(this.dispatch((0,p.$d)(e)),this.autoSave())}))})),(0,P.s)(r)}async update(e){const t=this.getState(),n=e.map((e=>{var n;T(t,e,"update"),x("string"==typeof e.id,"The annotation you passed to Instance.update() has no id.\nPlease use Instance.create() first to assign an id.");const r=t.annotations.get(e.id);x(r,"An annotation that does not exist was updated. This is probably caused by a sync conflict when Instant is enabled.\nThe update of this annotation was skipped."),x(!(e instanceof a.sK&&e.imageAttachmentId!==(null===(n=t.annotations.get(e.id))||void 0===n?void 0:n.imageAttachmentId)),"Changing the imageAttachmentId of an annotation is not allowed."),x(t.backend),t.backend.isCollaborationPermissionsEnabled()||e.group===r.group&&e.isEditable===r.isEditable&&e.isDeletable===r.isDeletable&&e.canSetGroup===r.canSetGroup||(e=e.set("group",r.group).set("isEditable",r.isEditable).set("isDeletable",r.isDeletable).set("canSetGroup",r.canSetGroup),(0,o.ZK)("`group`, `isEditable`, `isDeletable` and `canSetGroup` are only relevant when Collaboration Permissions are enabled in server backed setup. You do not have it enabled so these values are set to `undefined`."));if(!e.delete("group").equals(r.delete("group"))&&!(0,b.CM)(r,t))throw new o.p2("You don't have permission to update this annotation.");if(e instanceof a.x_&&e.group!==r.group)throw new o.p2("The `group` property of widget annotations is read only and can't be updated directly. If you want to do that you should update the `group` property of the connected form field and this annotation will inherit that `group`.");if(e.group!==r.group&&!(0,b.uW)(r,t))throw new o.p2("You don't have permission to update the `group` of this annotation.");if(e.isEditable!==r.isEditable||e.isDeletable!==r.isDeletable||e.canSetGroup!==r.canSetGroup)throw new o.p2("You can't update `isEditable`, `canSetGroup` or `isDeletable` since they are read only properties which depend on the `group` property.");if(e.creatorName!==r.creatorName&&t.annotationCreatorNameReadOnly)throw new o.p2("You can't change the creatorName of an annotation if it was already set on the JWT.");const i=(e=_(e)).set("updatedAt",new Date);return M(i),i}));return n.length>0&&(0,i.dC)((()=>{n.forEach((e=>{e instanceof Error||this.dispatch((0,p.FG)(e))})),this.autoSave()})),(0,P.s)(n)}async delete(e){const t=this.getState(),n=e.map((e=>{T(t,e,"delete");const n=t.annotations.get(e.id);if(x(n,`No annotation with id ${e.id} found.`),!(0,b.Kd)(n,t))throw new o.p2("You don't have permission to delete this annotation.");return e}));return n.length>0&&(0,i.dC)((()=>{n.forEach((e=>{e instanceof Error||this.dispatch((0,p.hQ)(e))})),this.autoSave()})),(0,P.s)(n)}async ensureChangesSaved(e){x("string"==typeof e.id,"The annotation you passed to Instance.ensureChangesSaved() has no id.\nPlease use Instance.create() first to assign an id.");const{annotationManager:t}=this.getState();return x(t),await t.ensureObjectSaved(e)}async getObjectById(e){x("string"==typeof e,"The supplied id is not a valid id.");const{annotations:t,features:n}=this.getState();return(0,v.Vz)(n)?t.get(e):null}}function A(e,t){const n=e.annotations.get(t.id);let o=t.formFieldName;return null!=n&&null!=n.formFieldName&&(o=n.formFieldName),null!=o?e.formFields.get(o):null}function T(e,t,n){const{features:r}=e;if(!(0,v.Vz)(r)){if(!(t instanceof s.Zc||t instanceof a.sK))throw new o.p2(`Annotations: ${D}`);if(!0===t.isSignature&&!r.includes(E.q.ELECTRONIC_SIGNATURES))throw new o.p2("Annotations: The API you're trying to use requires either an electronic signatures or annotation editing license. Electronic Signatures and Annotation Editing are components of PSPDFKit for Web and thus sold separately.\nhttps://pspdfkit.com/guides/web/current/annotations/introduction-to-annotations/");if(!t.isSignature||!r.includes(E.q.ELECTRONIC_SIGNATURES))throw new o.p2(`Annotations: ${D}`)}let i="";t.id&&(i=` with id "${t.id}"`),t instanceof a.x_&&function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const{features:n}=e;x(n.includes(E.q.FORM_DESIGNER),(t||"")+g.RB),x((0,v.k_)(e.backend),C)}(e,`Tried to ${n} a widget annotation${i}. Widget annotations are part of forms. `),x(!(t instanceof l.Z)||r.includes(E.q.REDACTIONS),`Tried to ${n} a redaction annotation${i}. ${u.q}`),x(!(t instanceof s.UX&&t.isMeasurement())||r.includes(E.q.MEASUREMENT_TOOLS),`Tried to ${n} a measurement annotation${i}. ${k}`)}function I(e){x(e instanceof s.UL,"`boundingBox` must be an instance of PSPDFKit.Geometry.Rect");for(const[t,n]of e)x("number"==typeof n,`invalid value \`${n}\` for \`boundingBox.${t}\``)}function F(e){x(e instanceof s.E9,"`startPoint` and `endPoint` must be instances of PSPDFKit.Geometry.Point");for(const[t,n]of e)x("number"==typeof n,`invalid value \`${n}\` for \`point.${t}\``)}function M(e){if(x(e instanceof a.q6,"Invalid annotation"),x("number"==typeof e.pageIndex,"`pageIndex` must be a number"),x("number"==typeof e.opacity,"`opacity` must be a number"),x("boolean"==typeof e.noView,"`noView` must be a boolean"),x("boolean"==typeof e.noPrint,"`noPrint` must be a boolean"),x("boolean"==typeof e.hidden,"`hidden` must be a boolean"),x(null==e.customData||(0,o.PO)(e.customData)&&(0,o.AK)(e.customData),"`customData` must be a serializable object"),I(e.boundingBox),"text"in e&&null!=e.text&&(x("object"==typeof e.text&&null!==e.text,"`text` is not an object with properties `format` and `value`"),x("plain"===e.text.format||"xhtml"===e.text.format,"Invalid text format"),x("string"==typeof e.text.value,"`text.value` must be a string")),e instanceof s.Qi&&x("plain"===e.text.format,"Invalid text format. Only `plain` format is supported"),e instanceof a.x_){if(e.additionalActions)for(const[t,n]of Object.entries(e.additionalActions))x("onBlur"===t||"onFocus"===t||"onInput"===t||"onFormat"===t||"onChange"===t,`Invalid attribute ${t} in \`additionalActions\`. Supported attributes: \`onBlur\`, \`onFocus\`, \`onInput\`, \`onFormat\`, \`onChange\``),x(n instanceof w.b,`Invalid attribute type of ${t} in \`additionalActions\`. ${t} must be of type \`PSPDFKit.Actions.JavaScriptAction\``);x("string"==typeof e.formFieldName&&e.formFieldName.length>0,"Annotation attribute `formFieldName` must be of type `string` and larger than 0 characters")}if((e instanceof a.x_||e instanceof a.gd)&&(null!=e.isItalic&&x("boolean"==typeof e.isItalic,"Annotation attribute `isItalic` must be of type `boolean`"),null!=e.isBold&&x("boolean"==typeof e.isBold,"Annotation attribute `isBold` must be of type `boolean`"),null!=e.verticalAlign&&x("string"==typeof e.verticalAlign&&("top"===e.verticalAlign||"center"===e.verticalAlign||"bottom"===e.verticalAlign),"Annotation attribute `verticalAlign` must be of type `string` and either `top`, `center`, or `bottom`"),null!=e.horizontalAlign&&x("string"==typeof e.horizontalAlign&&("left"===e.horizontalAlign||"center"===e.horizontalAlign||"right"===e.horizontalAlign),"Annotation attribute `horizontalAlign` must be of type `string` and either `left`, `center`, or `right`"),null!=e.borderWidth&&x("number"==typeof e.borderWidth,"Annotation attribute `borderWidth` must be of type `number`"),null!=e.borderStyle&&x(e.borderStyle===S.N.solid||e.borderStyle===S.N.dashed||e.borderStyle===S.N.beveled||e.borderStyle===S.N.inset||e.borderStyle===S.N.underline,"Annotation attribute `borderStyle` must be one of `solid`, `dashed`, `beveled`, `inset`, `underline`"),null!=e.font&&x("string"==typeof e.font&&e.font.length>0,"Annotation attribute `font` must be of type `string` and larger than 0 characters."),null!=e.fontSize&&x("number"==typeof e.fontSize||"auto"===e.fontSize,"Annotation attribute `fontSize` must be of type `number` or the string `auto`")),["fillColor","backgroundColor","fontColor","color","borderColor","strokeColor"].forEach((t=>{e.has(t)&&null!==e.get(t)&&x(e.get(t)instanceof s.Il,`\`${t}\` must be an instance of PSPDFKit.Color`)})),e.has("lines")&&(x("lines"in e&&e.lines instanceof r.aV,"lines must be an instance of PSPDFKit.Immutable.List"),e.lines.forEach(((e,t)=>{x(e instanceof r.aV,"line must be an instance of PSPDFKit.Immutable.List"),e.some(((e,n)=>{x(e instanceof f.Z,`found an invalid DrawingPoint at index ${n} for line ${t}`)}))}))),e instanceof a.On&&x(e.has("rects"),"Text markup annotations must have `rects`"),e instanceof a.GI&&x(h.pY[e.stampType],`Unknown stamp annotation stampType: \`${e.stampType}\``),e.has("rects")&&(x("rects"in e&&e.rects instanceof r.aV,"rects must be an instance of `PSPDFKit.Immutable.List`"),x(e.rects.size>0,"rects must be contain at least one rect"),e.rects.forEach(I)),e.has("startPoint")&&(x("startPoint"in e&&e.startPoint instanceof s.E9,"startPoint must be an instance of `PSPDFKit.Immutable.Point`"),F(e.startPoint)),e.has("endPoint")&&(x("endPoint"in e&&e.endPoint instanceof s.E9,"endPoint must be an instance of `PSPDFKit.Immutable.Point`"),F(e.endPoint)),e.has("rotation")){const t=e.rotation;e instanceof a.x_?x(0===t||90===t||180===t||270===t,"`rotation` must be of type `number` and one of 0, 90, 180, or 270."):(e instanceof a.gd||e instanceof a.GI||e instanceof a.sK)&&x(Math.abs(t)%1==0,"`rotation` must be an integer")}}function _(e){let t=e;return e instanceof a.gd&&"xhtml"===e.text.format&&(x(t instanceof a.gd,"Expected TextAnnotation"),e.text.value.startsWith("<p>")&&e.text.value.endsWith("</p>")||((0,o.ZK)("TextAnnotation text value must be wrapped in <p> tags if the format is `xhtml`."),t=t.set("text",{format:"xhtml",value:`<p>${t.text.value}</p>`})),e.fontColor&&((0,o.ZK)('TextAnnotation fontColor is not supported for xhtml formatted text. You should add inline span element to the text value instead.\n\n Example: <p><span style="color: #ff0000;">your text</span></p>'),t=t.set("fontColor",null)),e.text.value||(t=t.set("text",{format:"xhtml",value:'<p><span style="color: #000000"></span></p>'}))),t}},68250:(e,t,n)=>{"use strict";n.d(t,{I:()=>r});var o=n(47347);class r{constructor(e){this._objectManager=e}create(e,t){return Promise.reject(new o.p2("create() is not implemented"))}update(e,t){return Promise.reject(new o.p2("update() is not implemented"))}delete(e){return Promise.reject(new o.p2("delete() is not implemented"))}getObjectById(e){return Promise.resolve(null)}ensureChangesSaved(e){throw new o.p2("ensureChangesSaved() is not implemented")}hasUnsavedChanges(){return!!this._objectManager&&this._objectManager.hasUnsavedChanges()}manualSave(e){return this._objectManager?this._objectManager.manualSave(e):Promise.resolve()}autoSave(){this._objectManager&&this._objectManager.autoSave()}getEventEmitter(){return this._objectManager?this._objectManager.eventEmitter:null}lockSave(){return this._objectManager?this._objectManager.lockSave():()=>{}}}},55909:(e,t,n)=>{"use strict";n.d(t,{BZ:()=>P,Bl:()=>S,DR:()=>b,RB:()=>w,_1:()=>k,fu:()=>x});var o=n(34997),r=n(35369),i=n(47347),a=n(67366),s=n(80857),l=n(16126),c=n(19815),u=n(96114),d=n(11032),p=n(68250),f=n(10284),h=n(22571),m=n(51269),g=n(66687),v=n(59780),y=n(60132);const b="The API you're trying to use requires a forms license. Forms is a component of PSPDFKit for Web and thus sold separately.\nhttps://pspdfkit.com/guides/web/current/forms/introduction-to-forms/",w="The API you're trying to use requires a license that includes the Form Designer component on standalone mode or with PSPDFKit Instant. This is a separate component of PSPDFKit for Web and thus sold separately.\nhttps://pspdfkit.com/guides/web/current/forms/introduction-to-forms/",S="The API you're trying to use is only available when using the standalone mode or with PSPDFKit Instant.",P="The API you're trying to use is not available when `disableForms` is set to `true`.",E=(0,s.Z)("Forms");class x extends p.I{constructor(e,t){super(t().formFieldManager),this.dispatch=e,this.getState=t}async create(e,t){const n=[],i=this.getState();D(i,"Tried to create a form field. ");const s=e.map((e=>{try{const r=e.id;"string"==typeof r&&E(!(0,l.CL)(i,r),`Form field id (${r}) is already used.`),C(e,i,t);let a="string"==typeof r?e:e.set("id",(0,o.SK)());if(E(i.backend),E(i.formFieldValueManager),i.backend.isCollaborationPermissionsEnabled()&&!e.group&&i.group!==i.backend.getDefaultGroup()&&(a=a.set("group",i.group)),void 0!==e.value||void 0!==e.values){const t=new d.Z({name:e.name,value:void 0!==e.value?e.value:e.values});n.push(t)}return a}catch(e){return e}}));return(0,a.dC)((()=>{s.forEach((e=>{e instanceof Error||(this.dispatch((0,u.kW)(e)),this.autoSave())}))})),n.forEach((e=>{this.dispatch((0,u.xW)((0,r.aV)([e]))),E(i.formFieldValueManager),i.formFieldValueManager.createObject(e),i.formFieldValueManager.autoSave()})),(0,m.s)(s)}async update(e,t){const n=this.getState();E(n.formFieldValueManager);const o=e.map((e=>{try{D(n,"Tried to update a form field. "),E("string"==typeof e.id,"The form field you passed to Instance.update() has no id.\n Please use Instance.create() first to assign an id."),C(e,n,t);const o=(0,l.CL)(n,e.id);E(o,"A form field that does not exist was updated. This is probably caused by a sync conflict when Instant is enabled.\nThe update of this form field was skipped."),E(n.backend),n.backend.isCollaborationPermissionsEnabled()||e.group===o.group&&e.isEditable===o.isEditable&&e.isDeletable===o.isDeletable&&e.canSetGroup===o.canSetGroup&&e.isFillable===o.isFillable||(e=e.set("group",o.group).set("isEditable",o.isEditable).set("isDeletable",o.isDeletable).set("canSetGroup",o.canSetGroup).set("isFillable",o.isFillable),(0,i.ZK)("`group`, `isEditable`, `isDeletable`, `isFillable` and `canSetGroup` are only relevant when Collaboration Permissions are enabled in server backed setup. You do not have it enabled so these values are set to `undefined`."));if(!e.delete("group").equals(o.delete("group"))&&!(0,f.iR)(o,n))throw new i.p2("You don't have permission to update this form field.");if(e.group!==o.group&&!(0,f.uW)(o,n))throw new i.p2("You don't have permission to update the `group` of this form field.");if(e.isEditable!==o.isEditable||e.isDeletable!==o.isDeletable||e.canSetGroup!==o.canSetGroup||e.isFillable!==o.isFillable)throw new i.p2("You can't update `isFillable`, `isEditable`, `canSetGroup` or `isDeletable` since they are read only properties which depend on the `group` property.");return e}catch(e){return e}}));return(0,a.dC)((()=>{o.forEach((e=>{e instanceof Error||(this.dispatch((0,u.vK)(e)),this.autoSave())}))})),(0,m.s)(o)}async delete(e){const t=this.getState();D(t,"Tried to delete a form field. ");const n=e.map((e=>{try{const o=(0,l.CL)(t,e.id);if(E(o,`There is no form field with id '${e.id}'`),E(t.formFieldValueManager),!(0,f.ev)(o,t))throw new i.p2("You don't have permission to delete this form field.");var n;if(void 0!==o.value||void 0!==o.values)null===(n=t.formFieldValueManager)||void 0===n||n.deleteObject(new d.Z({name:o.name,value:void 0!==o.value?o.value:o.values})),t.formFieldValueManager.autoSave();return e}catch(e){return e}}));return(0,a.dC)((()=>{n.forEach((e=>{e instanceof Error||(this.dispatch((0,u.Wh)(e)),this.autoSave())}))})),(0,m.s)(n)}async ensureChangesSaved(e){E("string"==typeof e.id,"The form field you passed to Instance.ensureSaved() has no id.\n Please use Instance.create() first to assign an id.");const{formFieldManager:t}=this.getState();return E(t),await t.ensureObjectSaved(e)}async getObjectById(e){return E("string"==typeof e,"The supplied id is not a valid id."),(0,l.CL)(this.getState(),e)}}function D(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const{features:n,formsEnabled:o}=e;E(n.includes(y.q.FORMS),(t||"")+b),E(o,(t||"")+P),E(n.includes(y.q.FORM_DESIGNER),(t||"")+w),E((0,c.k_)(e.backend),S)}function C(e,t,n){if(e.additionalActions)for(const[t,n]of Object.entries(e.additionalActions))E("onCalculate"===t||"onChange"===t||"onFormat"===t||"onInput"===t,`Invalid attribute ${t} in \`additionalActions\`. Supported attributes: \`onCalculate\`, \`onChange\`, \`onFormat\`, \`onInput\``),E(n instanceof h.b,`Invalid attribute type of ${t} in \`additionalActions\`. ${t} must be of type \`PSPDFKit.Actions.JavaScriptAction\``);e.annotationIds&&(E(e.annotationIds instanceof r.aV,"Invalid form field `annotationIds` attribute. `annotationIds` must be of type `PSPDFKit.Immutable.List`"),E(e.annotationIds.every((e=>"string"==typeof e)),"Invalid form field `annotationIds` attribute. `annotationIds` should only contain string values."),e.annotationIds.forEach((e=>{!function(e,t,n){const o=e.get("annotations");if(!(((null==t?void 0:t.find((e=>e instanceof g.q6&&e.id===n)))||o.get(n)||o.find((e=>{var t;return(null==e||null===(t=e.pdfObjectId)||void 0===t?void 0:t.toString())===n})))instanceof g.x_))throw new i.p2("Invalid form field `annotationIds` attribute. `annotationIds` should only contain references to widget annotations.")}(t,n,e)}))),null!=e.id&&E("string"==typeof e.id&&e.id.length>0,"Invalid form field `id` attribute. `id` must be of type `string` and larger than 0 characters."),null!=e.label&&E("string"==typeof e.label,"Invalid form field `label` attribute. `label` must be of type `string`"),E("string"==typeof e.name&&e.name.length>0,"Invalid form field `name` attribute. `name` must be of type `string` and larger than 0 characters."),null!=e.noExport&&E("boolean"==typeof e.noExport,"Invalid form field `noExport` attribute. `noExport` must be of type `boolean`"),null!=e.pdfObjectId&&E("number"==typeof e.pdfObjectId,"Invalid form field `pdfObjectId` attribute. `pdfObjectId` must be of type `number`"),null!=e.readOnly&&E("boolean"==typeof e.readOnly,"Invalid form field `readOnly` attribute. `readOnly` must be of type `boolean`"),null!=e.required&&E("boolean"==typeof e.required,"Invalid form field `required` attribute. `required` must be of type `boolean`")}function k(e,t){e instanceof v.$o?E("string"==typeof(t=t||""),`The type of action value for a TextFormField ${e.name} is ${typeof t}, but has to be a string`):e instanceof v.Dz||e instanceof v.rF?E(t instanceof r.aV,`The type of action value for the ${e instanceof v.Dz?"ChoiceFormField":"CheckBoxFormField"} ${e.name} is ${typeof t}, but has to be a List of strings`):e instanceof v.XQ?E("string"==typeof t||null===t,`The type of action value for a RadioButtonFormField ${e.name} is ${typeof t}, but has to either be a string or null`):e instanceof v.R0||e instanceof v.Yo||E(!1,`Cannot set form field value for ${e.name}: unknown form field type`)}},92466:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});class o{constructor(e,t){this.element=e,this.release=t}}},96846:(e,t,n)=>{"use strict";n.d(t,{a:()=>w});var o=n(84121),r=n(35369),i=n(47347),a=n(76192);const s="CREATED",l="UPDATED",c="DELETED";var u=n(97333),d=n(31835),p=n(80857),f=n(34997);class h{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{};(0,o.Z)(this,"_locks",(0,r.l4)()),this._onUnlockCallback=e}lock(){const e=(0,f.SK)();return this._locks=this._locks.add(e),()=>{this._locks=this._locks.remove(e),this._locks.isEmpty()&&this._onUnlockCallback()}}isLocked(){return!this._locks.isEmpty()}}var m=n(71652);const g=(0,p.Z)("SaveModeQueue");class v{constructor(e){let{autoSaveMode:t,flushCreateObject:n,flushUpdateObject:i,flushDeleteObject:s,validateObject:l,getObjectId:c,syncChanges:u=(async()=>{})}=e;(0,o.Z)(this,"eventEmitter",new d.Z(["willSave","didSave","saveStateChange"])),(0,o.Z)(this,"_modifications",(0,r.D5)()),(0,o.Z)(this,"_inFlightModifications",(0,r.D5)()),(0,o.Z)(this,"_savedObjects",(0,r.l4)()),(0,o.Z)(this,"_ensureSavedRequests",(0,r.D5)()),(0,o.Z)(this,"_prevHasUnsavedObjects",!1),(0,o.Z)(this,"_saveLock",new h((()=>{if(this._autoSaveMode===a.u.IMMEDIATE||!this._saveRequests.isEmpty()){const e=this._autoSaveMode===a.u.IMMEDIATE||this._saveRequests.some((e=>e.syncChanges)),t=this._saveRequests.some((e=>e.manualSave)),n=this._saveRequests;this._saveRequests=this._saveRequests.clear(),this._save(e,t).then((()=>{n.forEach((e=>{e.resolve()}))})).catch((e=>{n.forEach((t=>{t.reject(e)}))}))}}))),(0,o.Z)(this,"_saveRequests",(0,r.aV)()),this._autoSaveMode=t,this._flushCreateObject=n,this._flushUpdateObject=i,this._flushDeleteObject=s,this._validateObject=l,this._getObjectId=c,this._syncChanges=u}lockSave(){return this._saveLock.lock()}assertSaveLocked(){g(this._saveLock.isLocked(),"This method can't be used without active save lock, use saveLock() to acquire the lock.")}createObject(e){this.assertSaveLocked();const t=this._getObjectId(e);this._setModificationsAndNotifyChange(this._modifications.set(t,{object:e,type:s}))}updateObject(e){this.assertSaveLocked();const t=this._getObjectId(e),n=this._modifications.get(t),o=n&&n.type===s&&!this._inFlightModifications.has(t);this._setModificationsAndNotifyChange(this._modifications.set(t,{object:e,type:o?s:l}))}deleteObject(e){this.assertSaveLocked();const t=this._getObjectId(e),n=this._modifications.get(t);n&&n.type===s?this._setModificationsAndNotifyChange(this._modifications.delete(t)):this._setModificationsAndNotifyChange(this._modifications.set(t,{object:e,type:c}))}enqueueInFlightModification(e){const t=this._getObjectId(e.object);return this._inFlightModifications.has(t)?this._inFlightModifications=this._inFlightModifications.updateIn([t],(t=>t.push(e))):this._inFlightModifications=this._inFlightModifications.set(t,(0,r.aV)([e])),this._notifySaveStateChange(),()=>{this._inFlightModifications=this._inFlightModifications.updateIn([t],(t=>t.filter((t=>t!==e))));const n=this._inFlightModifications.get(t);n&&0===n.size&&(this._inFlightModifications=this._inFlightModifications.delete(t)),this._notifySaveStateChange()}}clearQueueForObject(e){this._setModificationsAndNotifyChange(this._modifications.delete(e))}queuedObjectType(e){const t=this._inFlightModifications.get(e);if(t&&t.size>0)return t.last().type;{const t=this._modifications.get(e);return t?t.type:null}}hasUnsavedObjects(){return this._modifications.size>0||this._inFlightModifications.size>0}autoSave(){this._autoSaveMode===a.u.INTELLIGENT&&this.manualSave(!0).catch((()=>{}))}manualSave(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._save(e,!0)}_save(e,t){return new Promise(((n,o)=>{if(this._saveLock.isLocked())this._saveRequests=this._saveRequests.push({resolve:n,reject:o,syncChanges:e,manualSave:t});else{const a=this._modifications.filter((e=>{let{type:t}=e;return t!==c})).filter((e=>{let{object:t}=e;return!this._validateObject(t)}));t&&a.forEach((e=>{(0,i.ZK)(`Can not save invalid object with ID: ${this._getObjectId(e.object)}.\n Make sure to remove or update this object, before trying to save again.`)}));let d=(0,r.aV)();const p=this._modifications.filter(((e,t)=>!a.has(t))),f=p.map((e=>{let{object:t,type:n}=e;const o={object:t,type:n};let r;switch(d=d.push(this.enqueueInFlightModification(o)),n){case s:r=this._flushCreateObject(t);break;case l:r=this._flushUpdateObject(t);break;default:r=this._flushDeleteObject(t)}return r.then((()=>{this._markModificationAsSaved(o)})).catch((e=>{throw y(e),e}))})).valueSeq().toArray();if(this._setModificationsAndNotifyChange(a,!1),e&&f.length>0&&f.push(this._syncChanges().catch((e=>{throw y(e),e}))),this.eventEmitter.emit("willSave"),0===f.length)return this.eventEmitter.emit("didSave"),void n();let h;(0,u.jK)(f).catch((t=>{const n=p.toList(),o=e?t.pop():null,i=t.map(((e,t)=>{const o=n.get(t);if(e&&o)return{error:e,object:o.object,modificationType:o.type}})).filter(Boolean);throw h=(0,r.aV)(i),(0,m.h)(i,Boolean(o),o?o.message:null)})).finally((()=>{d.forEach((e=>{e()}));let e=p;h&&(e=e.withMutations((e=>{g(h),h.forEach((t=>{const n=this._getObjectId(t.object);e.remove(n)}))}))),this._resolveEnsureSavedRequests(e.map((e=>e.object)).valueSeq().toArray()),h&&this._rejectEnsureSavedRequests(h.toArray()),this.eventEmitter.emit("didSave")})).then((()=>{n()})).catch(o)}}))}markObjectsAsSaved(e){this._savedObjects=this._savedObjects.union(e)}isSaved(e){return this._savedObjects.has(e)&&null==this.queuedObjectType(e)}ensureObjectSaved(e){return new Promise(((t,n)=>{const o=this._getObjectId(e);this.isSaved(o)?t(e):this._ensureSavedRequests=this._ensureSavedRequests.withMutations((e=>{const i=e.get(o);i?e.set(o,i.push({resolve:t,reject:n})):e.set(o,(0,r.aV)([{resolve:t,reject:n}]))}))}))}_resolveEnsureSavedRequests(e){this._ensureSavedRequests=this._ensureSavedRequests.withMutations((t=>{e.forEach((e=>{const n=this._getObjectId(e),o=t.get(n);o&&this.isSaved(n)&&(o.forEach((t=>{let{resolve:n}=t;n(e)})),t.delete(n))}))}))}_rejectEnsureSavedRequests(e){this._ensureSavedRequests=this._ensureSavedRequests.withMutations((t=>{e.forEach((e=>{const n=this._getObjectId(e.object),o=t.get(n);o&&(o.forEach((t=>{let{reject:n}=t;n(e.error)})),t.delete(n))}))}))}_markModificationAsSaved(e){const t=this._getObjectId(e.object);switch(e.type){case"CREATED":case"UPDATED":this._savedObjects=this._savedObjects.add(t);break;case"DELETED":this._savedObjects=this._savedObjects.remove(t)}}_setModificationsAndNotifyChange(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._modifications=e,t&&this._notifySaveStateChange()}_notifySaveStateChange(){const e=this.hasUnsavedObjects();this._prevHasUnsavedObjects!==e&&(this._prevHasUnsavedObjects=e,this.eventEmitter.emit("saveStateChange",e))}}function y(e){(0,i.vU)(e)}var b=n(83253);class w{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.u.IMMEDIATE,n=arguments.length>2?arguments[2]:void 0;(0,o.Z)(this,"eventEmitter",new d.Z(this._getSupportedEvents())),(0,o.Z)(this,"_createdObjects",(0,r.D5)()),(0,o.Z)(this,"_updatedObjects",(0,r.D5)()),(0,o.Z)(this,"_deletedObjects",(0,r.D5)()),(0,o.Z)(this,"_crudEventsLock",new h((()=>{(this._createdObjects.size||this._updatedObjects.size||this._deletedObjects.size)&&this.eventEmitter.emit("change"),this._createdObjects.size&&(this.eventEmitter.emit("create",(0,r.aV)(this._createdObjects.values())),this._createdObjects=this._createdObjects.clear()),this._updatedObjects.size&&(this.eventEmitter.emit("update",(0,r.aV)(this._updatedObjects.values())),this._updatedObjects=this._updatedObjects.clear()),this._deletedObjects.size&&(this.eventEmitter.emit("delete",(0,r.aV)(this._deletedObjects.values())),this._deletedObjects=this._deletedObjects.clear())}))),this._callbacks=e,this._autoSaveMode=t,null!=n&&(this.eventEmitter=n),this._saveModeQueue=new v({autoSaveMode:t,flushCreateObject:async e=>{try{await this._callbacks.createBackendObject(e.object,e.additionalFields)}catch(t){throw this._callbacks.deleteStoreObjects((0,r.l4)([e.id])),this.eventEmitter.emit("change"),this.eventEmitter.emit("delete",(0,r.aV)([e.object])),t}this._callbacks.refresh()},flushUpdateObject:async e=>{await this._callbacks.updateBackendObject(e.object,e.additionalFields),this._callbacks.refresh()},flushDeleteObject:async e=>{try{await this._callbacks.deleteBackendObject(e.object,e.additionalFields)}catch(t){throw this._callbacks.createStoreObjects((0,r.aV)([e.object])),this.eventEmitter.emit("change"),this.eventEmitter.emit("create",(0,r.aV)([e.object])),t}this._callbacks.refresh()},validateObject:e=>this._callbacks.validateObject(e.object),getObjectId:e=>e.id,syncChanges:()=>this._callbacks.syncChanges()}),this._saveModeQueue.eventEmitter.on("willSave",(()=>{this.eventEmitter.emit("change"),this.eventEmitter.emit("willSave")})),this._saveModeQueue.eventEmitter.on("didSave",(()=>{this.eventEmitter.emit("change"),this.eventEmitter.emit("didSave")})),this._saveModeQueue.eventEmitter.on("saveStateChange",(e=>this.eventEmitter.emit("saveStateChange",e)))}autoSave(){this._saveModeQueue.autoSave()}manualSave(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._saveModeQueue.manualSave(e).catch((e=>{throw(0,i.kG)(e instanceof m.V),e.reason&&(e.reason=e.reason.map((e=>({error:e.error,modificationType:e.modificationType,object:e.object.object})))),e}))}ensureObjectSaved(e){return this._saveModeQueue.ensureObjectSaved(this._createSaveQueueObject(this._callbacks.getObjectId(e),e)).then((e=>e.object))}hasUnsavedChanges(){return this._saveModeQueue.hasUnsavedObjects()}lockSave(){const e=this._crudEventsLock.lock(),t=this._saveModeQueue.lockSave();return()=>{t(),e()}}createObject(e,t){const n=this.lockSave();try{const o=this._callbacks.getObjectId(e);(0,i.kG)(o);const r=this._saveModeQueue.queuedObjectType(o),a=this._saveModeQueue.isSaved(o)||r===l,c=r===s;a||c?(this._callbacks.onUpdate&&this._callbacks.onUpdate(e,t),this._saveModeQueue.updateObject(this._createSaveQueueObject(o,e,t)),this._updatedObjects=this._updatedObjects.set(o,e)):(this._callbacks.onCreate&&this._callbacks.onCreate(e,t),this._saveModeQueue.createObject(this._createSaveQueueObject(o,e,t)),this._createdObjects=this._createdObjects.set(o,e))}finally{n()}}updateObject(e,t){this.createObject(e,t)}deleteObject(e,t){const n=this.lockSave();try{const o=this._callbacks.getObjectId(e);(0,i.kG)(o);const r=this._saveModeQueue.queuedObjectType(o),a=this._saveModeQueue.isSaved(o)||r===l,c=r===s;this._callbacks.onDelete&&this._callbacks.onDelete(e,t),(a||c)&&this._saveModeQueue.deleteObject(this._createSaveQueueObject(o,e,t)),this._deletedObjects=this._deletedObjects.set(o,e)}finally{n()}}backendObjectsCreated(e,t,n){const o=t===b.y,r=e.map((e=>this._callbacks.getObjectId(e))).toArray();this._saveModeQueue.markObjectsAsSaved(r),this._callbacks.createStoreObjects(e,n),this.eventEmitter.emit("change"),this.eventEmitter.emit(o?"load":"create",e),r.forEach((e=>{this._saveModeQueue.clearQueueForObject(e)})),!o&&this._callbacks.refresh()}backendObjectsUpdated(e,t){this._callbacks.updateStoreObjects(e),t||(this.eventEmitter.emit("change"),this.eventEmitter.emit("update",e));e.map((e=>this._callbacks.getObjectId(e))).toArray().forEach((e=>{this._saveModeQueue.clearQueueForObject(e)})),this._callbacks.refresh()}backendObjectsDeleted(e){const t=e.map((e=>this._callbacks.getObjectById(e))).filter(Boolean).toList();this._callbacks.deleteStoreObjects(e),e.forEach((e=>{this._saveModeQueue.clearQueueForObject(e)})),this.eventEmitter.emit("change"),this.eventEmitter.emit("delete",t),this._callbacks.refresh()}_getSupportedEvents(){return["change","willSave","didSave","load","create","update","delete","saveStateChange"]}_createSaveQueueObject(e,t,n){return void 0===n?{id:e,object:t}:{id:e,object:t,additionalFields:n}}}},46292:(e,t,n)=>{"use strict";n(84121),n(13096)},56664:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});n(46292);let o;function r(){return o}},75376:(e,t,n)=>{"use strict";n(47347);var o=n(35369),r=(n(95651),n(20792),n(66687),n(63564)),i=(n(75237),n(59780),n(44048),n(2810),n(97528),n(88804),n(19702),n(65872),n(30578),n(92457)),a=n(56664);n(46791),n(52247),n(68258),n(97413),n(46292),n(13096);i.ZP.toJS(),(0,o.d0)({});(0,a.Z)();Object.entries(r.qH.toJS()).reduce(((e,t)=>{var n;let[o,r]=t;return e[o]=null===(n=r.desktop)||void 0===n?void 0:n.map((e=>({type:e}))),e}),{})},13096:(e,t,n)=>{"use strict";n(84121)},23413:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var o=n(53678),r=n(13997);class i{constructor(e,t){this.identifier=this.url=e,this.token=t,this.aborted=!1}request(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{method:"GET"};const{method:t,data:n=null}=e,i=new XMLHttpRequest;return i.open(t,this.url,!0),i.setRequestHeader("X-PSPDFKit-Token",this.token),i.setRequestHeader("PSPDFKit-Platform","web"),i.setRequestHeader("PSPDFKit-Version",(0,r.oM)()),new Promise(((e,t)=>{i.onreadystatechange=()=>{this.aborted||4===i.readyState&&((0,o.vu)(i.status)?e(JSON.parse(i.responseText)):t({message:i.responseText}))},this.httpRequest=i,i.send(n instanceof FormData?n:"object"==typeof n?JSON.stringify(n):void 0)}))}abort(){this.httpRequest&&(this.aborted=!0,this.httpRequest.abort(),this.httpRequest=null)}}},16159:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var o=n(84121),r=n(47347),i=n(31712),a=n(93572),s=n(84778);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class u{constructor(e){this.annotation=e}toJSON(){var e,t;return c(c(c({id:this.annotation.id,name:this.annotation.name,subject:this.annotation.subject,v:u.VERSION,pdfObjectId:this.annotation.pdfObjectId,pageIndex:this.annotation.pageIndex,bbox:(0,a.u)(this.annotation.boundingBox),opacity:this.annotation.opacity,flags:this.serializeFlags(),action:this.annotation.action&&(0,i.vP)(this.annotation.action),note:this.annotation.note,createdAt:this.annotation.createdAt.toISOString(),updatedAt:this.annotation.updatedAt.toISOString(),creatorName:this.annotation.creatorName,customData:this.annotation.customData,isCommentThreadRoot:this.annotation.isCommentThreadRoot,isAnonymous:this.annotation.isAnonymous},this.annotation.blendMode&&"normal"!==this.annotation.blendMode?{blendMode:this.annotation.blendMode}:null),null!==(e=this.annotation.APStreamCache)&&void 0!==e&&e.cache||null!==(t=this.annotation.APStreamCache)&&void 0!==t&&t.attach?{APStreamCache:this.annotation.APStreamCache}:null),(0,s.Ut)(this.annotation))}static fromJSON(e,t,n){(0,r.kG)(null==t.name||"string"==typeof t.name,"`name` must be of type `string`"),(0,r.kG)(t.v<=u.VERSION,"Version Unknown"),(0,r.kG)(void 0!==e&&"number"!=typeof e,"`id` must be of type `string`"),(0,r.kG)("object"==typeof t.bbox,"Missing `bbox` field"),(0,r.kG)("number"==typeof t.opacity,"Missing `opacity` field"),(0,r.kG)("number"==typeof t.pageIndex,"Missing `pageIndex` field"),(0,r.kG)(null==t.customData||(0,r.PO)(t.customData),"`customData` must be an object"),(0,r.kG)("boolean"==typeof t.isCommentThreadRoot||void 0===t.isCommentThreadRoot,"`isCommentThreadRoot` should be a `undefined` or `boolean`"),(0,r.kG)("boolean"==typeof t.isAnonymous||void 0===t.isAnonymous,"`isAnonymous` should be a `undefined` or `boolean`"),(0,s.G)(n);const o=Array.isArray(t.flags)?t.flags:[];let l;try{l=t.action&&(0,i.lk)(t.action)}catch(e){(0,r.ZK)(`PDF Action not supported:\n\n${t.action}`)}return c(c({id:e,name:t.name||null,subject:t.subject||null,pdfObjectId:t.pdfObjectId||null,pageIndex:t.pageIndex,opacity:t.opacity,boundingBox:(0,a.k)(t.bbox),noPrint:o.includes("noPrint"),noZoom:o.includes("noZoom"),noRotate:o.includes("noRotate"),noView:o.includes("noView"),hidden:o.includes("hidden"),locked:o.includes("locked"),lockedContents:o.includes("lockedContents"),readOnly:o.includes("readOnly"),action:l,note:t.note||null,createdAt:t.createdAt?new Date(t.createdAt):new Date(0),updatedAt:t.updatedAt?new Date(t.updatedAt):new Date(0),creatorName:t.creatorName||null,customData:t.customData||null,isCommentThreadRoot:!!t.isCommentThreadRoot,isAnonymous:!!t.isAnonymous},u.blendModeObjectForAnnotation(t)),(0,s.a5)(n))}static blendModeObjectForAnnotation(e){return e.blendMode?{blendMode:e.blendMode}:"pspdfkit/markup/highlight"===e.type?{blendMode:"normal"}:null}serializeFlags(){const e=[];return["noPrint","noZoom","noRotate","noView","hidden","locked","lockedContents","readOnly"].forEach((t=>{this.annotation[t]&&e.push(t)})),e.length?e:null}}(0,o.Z)(u,"VERSION",2)},81041:(e,t,n)=>{"use strict";n.d(t,{M:()=>d,Z:()=>p});var o=n(84121),r=n(35369),i=n(16159),a=n(15973),s=n(93572),l=n(97413);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const d={"pspdfkit/markup/highlight":a.FV,"pspdfkit/markup/squiggly":a.hL,"pspdfkit/markup/strikeout":a.R9,"pspdfkit/markup/underline":a.xu,"pspdfkit/markup/redaction":a.Wk};class p extends i.Z{constructor(e){super(e)}toJSON(){return u(u({},super.toJSON()),{rects:this.annotation.rects.map((e=>(0,s.u)(e))).toJS()})}static fromJSON(e,t,n){return(0,l.k)("object"==typeof t.rects,"Missing `rects` field"),u(u({},super.fromJSON(e,t,n)),{},{rects:(0,r.aV)(t.rects).map((e=>(0,s.k)(e)))})}}},44048:(e,t,n)=>{"use strict";n.d(t,{a:()=>a,i:()=>s});var o=n(47347),r=n(31712),i=n(1053);function a(e){return{id:e.id,v:1,pdfBookmarkId:e.pdfBookmarkId,type:"pspdfkit/bookmark",name:e.name,sortKey:e.sortKey,action:e.action&&(0,r.vP)(e.action)}}function s(e,t){let n;(0,o.kG)(null==e||"string"==typeof e,"`id` must be null or of type `string`"),(0,o.kG)(null==t.name||"string"==typeof t.name,"`name` must be of type `string`"),(0,o.kG)(null==t.sortKey||"number"==typeof t.sortKey,"`sortKey` must be of type `number`"),(0,o.kG)("object"==typeof t.action,"Missing `action` field");try{n=(0,r.lk)(t.action)}catch(e){(0,o.ZK)(`PDF Action not supported:\n\n${t.action}`)}return new i.Z({id:e,pdfBookmarkId:t.pdfBookmarkId||null,name:t.name,sortKey:t.sortKey,action:n})}},56460:(e,t,n)=>{"use strict";n.d(t,{o:()=>c,z:()=>u});var o=n(84121),r=n(47347),i=n(66687),a=n(84778);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){return l({id:e.id,type:"pspdfkit/comment",v:2,rootId:t,pageIndex:e.pageIndex,pdfObjectId:e.pdfObjectId,creatorName:e.creatorName,createdAt:e.createdAt,updatedAt:e.updatedAt,text:e.text,customData:e.customData,isAnonymous:e.isAnonymous},(0,a.Ut)(e))}function u(e,t,n){return(0,r.kG)(2===t.v,"Unknown comment version"),(0,r.kG)("pspdfkit/comment"===t.type,"Invalid comment type"),(0,r.kG)("string"==typeof t.rootId||"number"==typeof t.rootId,"`rootId` must be of type `string` or `number`"),(0,r.kG)("number"==typeof t.pageIndex,"`pageIndex` must be of type `number`"),(0,r.kG)(null==t.pdfObjectId||"number"==typeof t.pdfObjectId,"`pdfObjectId` must be of type `number`"),(0,r.kG)(null==t.creatorName||"string"==typeof t.creatorName,"`creatorName` must be of type `string`"),(0,r.kG)("object"==typeof t.text,"`text` must be of type `object`"),(0,r.kG)("string"==typeof t.text.value,"`text.value` must be of type `string`"),(0,r.kG)("plain"===t.text.format||"xhtml"===t.text.format,"`text.format` must be `plain` or `xhtml`"),(0,r.kG)(null==t.customData||(0,r.PO)(t.customData),"`customData` must be a JSON-serializable object"),(0,r.kG)(void 0===(null==n?void 0:n.isAnonymous)||"boolean"==typeof(null==n?void 0:n.isAnonymous)||null===(null==n?void 0:n.isAnonymous),"`isAnonymous` should be `undefined` or `boolean`."),(0,a.G)(n),new i.sv(l({id:e,rootId:t.rootId.toString(),pageIndex:t.pageIndex,pdfObjectId:t.pdfObjectId,creatorName:t.creatorName,createdAt:t.createdAt?new Date(t.createdAt):new Date(0),updatedAt:t.updatedAt?new Date(t.updatedAt):new Date(0),text:t.text,customData:t.customData,isAnonymous:null==n?void 0:n.isAnonymous},(0,a.a5)(n)))}},12671:(e,t,n)=>{"use strict";n.d(t,{T8:()=>i,X$:()=>o,hH:()=>a,uE:()=>r});const o=e=>e.toJS(),r=e=>e.toJS(),i=(e,t)=>{return{maxWidth:e.maxWidth,alignment:e.alignment,lineSpacingFactor:e.lineSpacingFactor,modificationsCharacterStyle:(n=t,n.toJS())};var n},a=e=>i(e.layout,e.modificationsCharacterStyle)},37927:(e,t,n)=>{"use strict";function o(e){var t;return{type:e.type,options:{numberOfContextWords:null===(t=e.options)||void 0===t?void 0:t.numberOfContextWords}}}function r(e){return{filePath:e.filePath,password:e.password,pageIndexes:e.pageIndexes,jwt:e.jwt}}n.d(t,{c:()=>r,j:()=>o})},30578:(e,t,n)=>{"use strict";n.d(t,{a:()=>l,i:()=>c});var o=n(47347),r=n(35369),i=n(31712),a=n(22660),s=n(66687);function l(e){return{type:"pspdfkit/outline-element",children:e.children&&e.children.map((e=>l(e))).toJS(),title:e.title,color:e.color&&(0,a.C)(e.color),isBold:e.isBold,isItalic:e.isItalic,isExpanded:e.isExpanded,action:e.action&&(0,i.vP)(e.action)}}function c(e){let t,n;(0,o.kG)("pspdfkit/outline-element"===e.type,"invalid outline element type."),(0,o.kG)(null==e.children||Array.isArray(e.children),"children must be an Array<OutlineElement>."),(0,o.kG)("string"==typeof e.title,"title must be a string."),(0,o.kG)(null==e.isBold||"boolean"==typeof e.isBold,"isBold must be a boolean."),(0,o.kG)(null==e.isItalic||"boolean"==typeof e.isItalic,"isItalic must be a boolean."),(0,o.kG)(null==e.isExpanded||"boolean"==typeof e.isExpanded,"isExpanded must be a boolean.");try{t=e.action&&(0,i.lk)(e.action)}catch(t){(0,o.ZK)(`PDF Action not supported\n\n${e.action}`)}try{n=e.color&&(0,a.b)(e.color)}catch(t){(0,o.ZK)(`Invalid color:\n\n${e.color}`)}const l={title:e.title,color:n,isBold:!0===e.isBold,isItalic:!0===e.isItalic,isExpanded:!0===e.isExpanded,action:t,children:(0,r.aV)()};return e.children&&e.children.length>0&&(l.children=(0,r.aV)(e.children.map(c))),new s.sT(l)}},13071:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var o=n(84121),r=n(47347),i=n(22660),a=n(18146),s=n(5020),l=n(81041);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class d extends l.Z{constructor(e){super(e)}toJSON(){return u(u({},super.toJSON()),{},{type:"pspdfkit/markup/redaction",fillColor:this.annotation.fillColor&&(0,i.C)(this.annotation.fillColor),outlineColor:this.annotation.outlineColor&&(0,i.C)(this.annotation.outlineColor),overlayText:this.annotation.overlayText,repeatOverlayText:this.annotation.repeatOverlayText,rotation:this.annotation.rotation,color:this.annotation.color&&(0,i.C)(this.annotation.color)})}static fromJSON(e,t,n){var o,l;(0,r.kG)("pspdfkit/markup/redaction"===t.type,"Wrong `type` field");const c="number"==typeof t.rotation?(0,s.Lv)(t.rotation):0;return new a.Z(u(u({},super.fromJSON(e,t,n)),{},{fillColor:t.fillColor?(0,i.b)(t.fillColor):a.Z.defaultValues.fillColor,outlineColor:t.outlineColor?(0,i.b)(t.outlineColor):a.Z.defaultValues.outlineColor,overlayText:null!==(o=t.overlayText)&&void 0!==o?o:null,repeatOverlayText:null!==(l=t.repeatOverlayText)&&void 0!==l?l:null,rotation:c,color:t.color?(0,i.b)(t.color):a.Z.defaultValues.color}))}}},74115:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h,q:()=>f});var o=n(84121),r=n(35369),i=n(22660),a=n(16159),s=n(20367),l=n(97413),c=n(71603),u=n(4132);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const f={1:"whole",.1:"oneDp",.01:"twoDp",.001:"threeDp",1e-4:"fourDp"};class h extends a.Z{toJSON(){return p(p({},super.toJSON()),{strokeWidth:this.annotation.strokeWidth,strokeColor:this.annotation.strokeColor&&(0,i.C)(this.annotation.strokeColor),fillColor:this.annotation.fillColor&&(0,i.C)(this.annotation.fillColor),strokeDashArray:this.annotation.strokeDashArray,measurementPrecision:this.annotation.measurementPrecision,measurementScale:this.annotation.measurementScale&&(e=this.annotation.measurementScale,{unitFrom:e.unitFrom,unitTo:e.unitTo,from:e.fromValue,to:e.toValue})});var e}static fromJSON(e,t,n){var o;((0,l.k)("number"==typeof t.strokeWidth||"number"==typeof t.lineWidth,"Missing `strokeWidth` or deprecated `lineWidth` field"),t.measurementPrecision)&&(t.measurementPrecision&&Object.keys(f).includes(t.measurementPrecision)&&(t.measurementPrecision=null!==(o=f[t.measurementPrecision])&&void 0!==o?o:u.L.TWO));return p(p({},super.fromJSON(e,t,n)),{strokeWidth:null!=t.strokeWidth?t.strokeWidth:null!=t.lineWidth?t.lineWidth:null,strokeColor:null!=t.strokeColor?(0,i.b)(t.strokeColor):null,fillColor:t.fillColor?(0,i.b)(t.fillColor):null,strokeDashArray:t.strokeDashArray,measurementPrecision:t.measurementPrecision,measurementScale:t.measurementScale?m(t.measurementScale):null})}_pointsToJSON(){return this.annotation.points.map((e=>(0,s.K)(e))).toJS()}static _JSONToPoints(e){return(0,r.aV)(e.map((e=>(0,s.W)(e))))}static _JSONLinesToPoints(e){return(0,r.aV)(e.points[0].map(s.W))}}function m(e){return new c.Z({unitFrom:e.unitFrom,unitTo:e.unitTo,fromValue:e.from,toValue:e.to})}},78162:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var o=n(84121),r=n(47347),i=n(45395),a=n(22660),s=n(66687),l=n(16159),c=n(31712),u=n(2810),d=n(5020);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class h extends l.Z{constructor(e){super(e)}toJSON(){return f(f({},super.toJSON()),{type:"pspdfkit/widget",formFieldName:this.annotation.formFieldName,borderColor:this.annotation.borderColor&&(0,a.C)(this.annotation.borderColor),borderStyle:this.annotation.borderStyle,borderDashArray:this.annotation.borderDashArray,borderWidth:this.annotation.borderWidth,font:this.annotation.font,fontSize:this.annotation.fontSize,fontColor:this.annotation.fontColor&&(0,a.C)(this.annotation.fontColor),backgroundColor:this.annotation.backgroundColor&&(0,a.C)(this.annotation.backgroundColor),horizontalAlign:this.annotation.horizontalAlign,verticalAlign:this.annotation.verticalAlign,fontStyle:(0,u.XH)(this.annotation),rotation:this.annotation.rotation,additionalActions:this.annotation.additionalActions&&(0,c.GI)(this.annotation.additionalActions),lineHeightFactor:this.annotation.lineHeightFactor})}static fromJSON(e,t,n){return(0,r.kG)("pspdfkit/widget"===t.type,"Wrong `type` field"),(0,r.kG)("string"==typeof t.formFieldName,"Wrong `formFieldName` field"),t.borderStyle&&((0,r.kG)("string"==typeof i.N[t.borderStyle],"Invalid value for `borderStyle`"),(0,r.kG)("number"==typeof t.borderWidth,"Missing `borderWidth` field")),t.horizontalAlign&&(0,r.kG)(["left","center","right"].includes(t.horizontalAlign),"Wrong `horizontalAlign` field"),t.verticalAlign&&(0,r.kG)(["top","center","bottom"].includes(t.verticalAlign),"Wrong `verticalAlign` field"),new s.x_(f(f({},super.fromJSON(e,t,n)),{formFieldName:t.formFieldName,borderColor:t.borderColor?(0,a.b)(t.borderColor):null,borderStyle:t.borderStyle&&i.N[t.borderStyle],borderDashArray:t.borderDashArray,borderWidth:t.borderWidth,fontColor:t.fontColor?(0,a.b)(t.fontColor):null,fontSize:t.fontSize,font:t.font||null,backgroundColor:t.backgroundColor?(0,a.b)(t.backgroundColor):null,horizontalAlign:t.horizontalAlign?t.horizontalAlign:null,verticalAlign:t.verticalAlign?t.verticalAlign:null,isBold:t.fontStyle&&t.fontStyle.includes("bold"),isItalic:t.fontStyle&&t.fontStyle.includes("italic"),rotation:"number"==typeof t.rotation?(0,d.n5)(t.rotation):0,additionalActions:t.additionalActions?(0,c.eb)(t.additionalActions):null,lineHeightFactor:t.lineHeightFactor}))}}},31712:(e,t,n)=>{"use strict";n.d(t,{GI:()=>f,eb:()=>p,lk:()=>u,vP:()=>c});var o=n(84121),r=n(35369),i=n(47347),a=n(89335);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e){return function e(t){const n=l({},t.subActions&&{subactions:t.subActions.map((t=>e(t))).toArray()});if(t instanceof a.lm)return l({type:"uri",uri:t.uri},n);if(t instanceof a.Di)return l({type:"goTo",pageIndex:t.pageIndex},n);if(t instanceof a.Qr)return l({type:"goToEmbedded",newWindow:t.newWindow,relativePath:t.relativePath,targetType:t.targetType},n);if(t instanceof a._6)return l({type:"goToRemote",relativePath:t.relativePath,namedDestination:t.namedDestination},n);if(t instanceof a.ZD)return l({type:"hide",hide:t.hide,annotationReferences:t.annotationReferences.toJS()},n);if(t instanceof a.bp)return l({type:"javaScript",script:t.script},n);if(t instanceof a.b)return l({type:"launch",filePath:t.filePath},n);if(t instanceof a.oH)return l({type:"named",action:t.action},n);if(t instanceof a.BO)return l({type:"resetForm",fields:t.fields?t.fields.toArray():null,flags:t.includeExclude?"includeExclude":null},n);if(t instanceof a.pl)return l({type:"submitForm",uri:t.uri,fields:t.fields?t.fields.toArray():null,flags:d(t)},n);throw new Error(`Unknown action type: ${t.constructor.name}`)}(e)}function u(e){return function e(t){let n=null;switch(t.subactions&&(n={subActions:(0,r.aV)(t.subactions.map((t=>e(t))))}),t.type){case"uri":return(0,i.kG)("string"==typeof t.uri,"URI action must have a `uri`"),new a.lm(l({uri:t.uri},n));case"goTo":return(0,i.kG)("number"==typeof t.pageIndex,"Goto action must have a `pageIndex`"),new a.Di(l({pageIndex:t.pageIndex},n));case"goToEmbedded":return(0,i.kG)("boolean"==typeof t.newWindow,"GoToEmbeddedAction must have `newWindow`"),(0,i.kG)("parent"===t.targetType||"child"===t.targetType,"GoToEmbeddedAction must have a valid `targetType`"),new a.Qr(l({newWindow:t.newWindow,relativePath:t.relativePath||"",targetType:t.targetType||""},n));case"goToRemote":return new a._6(l({relativePath:t.relativePath||"",namedDestination:t.namedDestination||""},n));case"hide":return(0,i.kG)(Array.isArray(t.annotationReferences),"HideAction must have `annotationReferences`"),new a.ZD(l({hide:!!t.hide,annotationReferences:(0,r.aV)(t.annotationReferences)},n));case"javaScript":return new a.bp(l({script:t.script||""},n));case"launch":return new a.b(l({filePath:t.filePath||""},n));case"named":return new a.oH(l({action:t.action||""},n));case"resetForm":{(0,i.kG)(t.fields instanceof Array||void 0===t.fields,"The value of the `fields` field of ResetForm Action has to be an array or undefined"),(0,i.kG)("string"==typeof t.flags||void 0===t.flags,"The value of the `flags` field of ResetForm Action has to be a string or undefined");const e="includeExclude"===t.flags;return new a.BO(l({fields:t.fields?(0,r.aV)(t.fields):void 0,includeExclude:e},n))}case"submitForm":return(0,i.kG)("string"==typeof t.uri,"The value of the `uri` field of SubmitForm Action has to be a string"),(0,i.kG)(t.fields instanceof Array||void 0===t.fields,"The value of the `fields` field of SubmitForm Action has to be an array or undefined"),(0,i.kG)(t.flags instanceof Array||void 0===t.flags,"The value of the `flags` field of SubmitForm Action has to be a array or undefined"),t.flags||(t.flags=[]),new a.pl(l({fields:t.fields?(0,r.aV)(t.fields):void 0,uri:t.uri,includeExclude:t.flags.includes("includeExclude"),includeNoValueFields:t.flags.includes("includeNoValueFields"),exportFormat:t.flags.includes("exportFormat"),getMethod:t.flags.includes("getMethod"),submitCoordinated:t.flags.includes("submitCoordinated"),xfdf:t.flags.includes("xfdf"),includeAppendSaves:t.flags.includes("includeAppendSaves"),includeAnnotations:t.flags.includes("includeAnnotations"),submitPDF:t.flags.includes("submitPDF"),canonicalFormat:t.flags.includes("canonicalFormat"),excludeNonUserAnnotations:t.flags.includes("excludeNonUserAnnotations"),excludeFKey:t.flags.includes("excludeFKey"),embedForm:t.flags.includes("embedForm")},n));default:throw new Error(`Unknown action: ${t}`)}}(e)}function d(e){const t=[];return["includeExclude","includeNoValueFields","exportFormat","getMethod","submitCoordinated","xfdf","includeAppendSaves","includeAnnotations","submitPDF","canonicalFormat","excludeNonUserAnnotations","excludeFKey","embedForm"].forEach((n=>{e[n]&&t.push(n)})),t.length?t:null}function p(e){return Object.keys(e).reduce(((t,n)=>{const o=e[n];return o&&(t[n]=u(o)),t}),{})}function f(e){return Object.keys(e).reduce(((t,n)=>{const o=e[n];return o instanceof a.aU&&(t[n]=c(o)),t}),{})}},84778:(e,t,n)=>{"use strict";n.d(t,{G:()=>s,Ut:()=>c,a5:()=>l});var o=n(84121),r=n(47347);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{group:t,permissions:n}=e;(0,r.kG)(void 0===t||"string"==typeof t||null===t,"`group` should be `undefined` or `string`."),(0,r.kG)(void 0===n||(0,r.PO)(n),"`permissions` should be `undefined` or an `object`."),(0,r.PO)(n)&&((0,r.kG)("boolean"==typeof n.edit,"`permissions.edit` should be `boolean`."),(0,r.kG)("boolean"==typeof n.delete,"`permissions.delete` should be `boolean`."),(0,r.kG)("boolean"==typeof n.setGroup,"`permissions.setGroup` should be `boolean`."),void 0!==n.fill&&(0,r.kG)("boolean"==typeof n.fill,"`permissions.fill` should be `boolean`."),void 0!==n.reply&&(0,r.kG)("boolean"==typeof n.reply,"`permissions.reply` should be `boolean`."))}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{group:t,permissions:n}=e;let o={group:t};return(0,r.PO)(n)&&(o=a(a({},o),{},{canSetGroup:n.setGroup,isEditable:n.edit,isDeletable:n.delete}),"boolean"==typeof n.fill&&(o.isFillable=n.fill),"boolean"==typeof n.reply&&(o.canReply=n.reply)),o}function c(e){const t="boolean"==typeof e.isEditable&&"boolean"==typeof e.canSetGroup&&"boolean"==typeof e.isDeletable;let n={group:e.group};return t&&((0,r.kG)("boolean"==typeof e.isEditable),(0,r.kG)("boolean"==typeof e.isDeletable),(0,r.kG)("boolean"==typeof e.canSetGroup),n=a(a({},n),{},{permissions:{edit:e.isEditable,delete:e.isDeletable,setGroup:e.canSetGroup}}),"boolean"==typeof e.isFillable&&(n.permissions=a(a({},n.permissions),{},{fill:e.isFillable})),"boolean"==typeof e.canReply&&(n.permissions=a(a({},n.permissions),{},{reply:e.canReply}))),n}},22660:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,b:()=>a});var o=n(47347),r=n(66687);function i(e){return e.toHex()}function a(e){if((0,o.kG)(7===e.length||9===e.length,"Tried to deserialize color that does not have 7 or 9 characters"),"#00000000"===e)return r.Il.TRANSPARENT;const t=parseInt(e.substring(1,3),16),n=parseInt(e.substring(3,5),16),i=parseInt(e.substring(5,7),16);return new r.Il({r:t,g:n,b:i})}},62793:(e,t,n)=>{"use strict";n.d(t,{B:()=>i,r:()=>a});var o=n(47347),r=n(66687);function i(e){return[e.left,e.top,e.right,e.bottom]}function a(e){return(0,o.kG)(4===e.length,"Tried to deserialize inset that does not have 4 entries"),new r.eB({left:e[0],top:e[1],right:e[2],bottom:e[3]})}},20367:(e,t,n)=>{"use strict";n.d(t,{K:()=>i,W:()=>a});var o=n(47347),r=n(66687);function i(e){return[e.x,e.y]}function a(e){return(0,o.kG)(2===e.length,"Tried to deserialize point that does not have 2 entries"),new r.E9({x:e[0],y:e[1]})}},93572:(e,t,n)=>{"use strict";n.d(t,{k:()=>a,u:()=>i});var o=n(47347),r=n(66687);function i(e){return[e.left,e.top,e.width,e.height]}function a(e){return(0,o.kG)(4===e.length,"Tried to deserialize rect that does not have 4 entries"),new r.UL({left:e[0],top:e[1],width:e[2],height:e[3]})}},2810:(e,t,n)=>{"use strict";n.d(t,{Lw:()=>qe,vH:()=>Fe,Mu:()=>Ne,IN:()=>Me,u9:()=>Be,Vl:()=>it,rS:()=>je,XH:()=>tt,l9:()=>Ye,Fd:()=>Je,_o:()=>et,_Q:()=>Ge,Qp:()=>We,$T:()=>Qe,Hs:()=>Ie,jA:()=>Re,kg:()=>nt,vD:()=>_e,kr:()=>Le,xT:()=>$e,sr:()=>Ue,_D:()=>Ke,eE:()=>Ze,_L:()=>Ve,YA:()=>rt,MR:()=>Xe});var o=n(17375),r=n(84121),i=n(47347),a=n(35369),s=n(66687),l=n(18146),c=n(74973),u=n(22660),d=n(20367),p=n(16159);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class m extends p.Z{constructor(e){super(e)}toJSON(){return h(h({},super.toJSON()),{type:"pspdfkit/ink",lines:this._linesToJSON(),lineWidth:this.annotation.lineWidth,strokeColor:this.annotation.strokeColor&&(0,u.C)(this.annotation.strokeColor),backgroundColor:this.annotation.backgroundColor&&(0,u.C)(this.annotation.backgroundColor),isDrawnNaturally:this.annotation.isDrawnNaturally,isSignature:this.annotation.isSignature})}static fromJSON(e,t,n){return(0,i.kG)("pspdfkit/ink"===t.type,"Wrong `type` field"),(0,i.kG)("object"==typeof t.lines,"Missing `lines` field"),(0,i.kG)("number"==typeof t.lineWidth,"Missing `lineWidth` field"),(0,i.kG)("boolean"==typeof t.isDrawnNaturally,"Missing `isDrawnNaturally` field"),new s.Zc(h(h({},super.fromJSON(e,t,n)),{lines:this._JSONToLines(t.lines),lineWidth:t.lineWidth,strokeColor:t.strokeColor?(0,u.b)(t.strokeColor):null,backgroundColor:t.backgroundColor?(0,u.b)(t.backgroundColor):null,isDrawnNaturally:t.isDrawnNaturally,isSignature:t.isSignature}))}_linesToJSON(){return{points:this.annotation.lines.map((e=>e.map((e=>(0,d.K)(e))))).toJS(),intensities:this.annotation.lines.map((e=>e.map((e=>e.intensity)))).toJS()}}static _JSONToLines(e){return(0,a.aV)(e.points).map(((t,n)=>{const o=e.intensities[n];return(0,a.aV)(t).map(((e,t)=>{const n=o[t],r=(0,d.W)(e);return new s.Wm({x:r.x,y:r.y,intensity:n})}))}))}}var g=n(74115),v=n(97413);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class w extends g.Z{toJSON(){return b(b({},super.toJSON()),{type:"pspdfkit/shape/line",startPoint:(0,d.K)(this.annotation.startPoint),endPoint:(0,d.K)(this.annotation.endPoint),lineCaps:this.annotation.lineCaps})}static fromJSON(e,t,n){var o,r,i,a;return(0,v.k)("pspdfkit/shape/line"===t.type,"Wrong `type` field"),(0,v.k)("object"==typeof t.startPoint||"object"==typeof(null===(o=t.lines)||void 0===o?void 0:o.points[0][0]),"Missing `startPoint` or deprecated `lines.points[0][0]` field"),(0,v.k)("object"==typeof t.endPoint||"object"==typeof(null===(r=t.lines)||void 0===r?void 0:r.points[0][1]),"Missing `endPoint` or deprecated `lines.points[0][1]` field"),new s.o9(b(b({},super.fromJSON(e,t,n)),{startPoint:(0,d.W)(t.startPoint||(null===(i=t.lines)||void 0===i?void 0:i.points[0][0])),endPoint:(0,d.W)(t.endPoint||(null===(a=t.lines)||void 0===a?void 0:a.points[0][1])),lineCaps:t.lineCaps}))}}var S=n(62793),P=n(93572);function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class D extends g.Z{toJSON(){return x(x({},super.toJSON()),{type:"pspdfkit/shape/rectangle",cloudyBorderIntensity:this.annotation.cloudyBorderIntensity,cloudyBorderInset:this.annotation.cloudyBorderInset?(0,S.B)(this.annotation.cloudyBorderInset):null,measurementBBox:this.annotation.measurementBBox?(0,P.u)(this.annotation.measurementBBox):null})}static fromJSON(e,t,n){return(0,v.k)("pspdfkit/shape/rectangle"===t.type,"Wrong `type` field"),new s.b3(x(x({},super.fromJSON(e,t,n)),{cloudyBorderIntensity:t.cloudyBorderIntensity,cloudyBorderInset:Array.isArray(t.cloudyBorderInset)?(0,S.r)(t.cloudyBorderInset):null,measurementBBox:t.measurementBBox?(0,P.k)(t.measurementBBox):null}))}}function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class O extends g.Z{toJSON(){return k(k({},super.toJSON()),{type:"pspdfkit/shape/ellipse",cloudyBorderIntensity:this.annotation.cloudyBorderIntensity,cloudyBorderInset:this.annotation.cloudyBorderInset?(0,S.B)(this.annotation.cloudyBorderInset):null,measurementBBox:this.annotation.measurementBBox?(0,P.u)(this.annotation.measurementBBox):null})}static fromJSON(e,t,n){return(0,i.kG)("pspdfkit/shape/ellipse"===t.type,"Wrong `type` field"),new s.Xs(k(k({},super.fromJSON(e,t,n)),{cloudyBorderIntensity:t.cloudyBorderIntensity,cloudyBorderInset:Array.isArray(t.cloudyBorderInset)?(0,S.r)(t.cloudyBorderInset):null,measurementBBox:t.measurementBBox?(0,P.k)(t.measurementBBox):null}))}}function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class I extends g.Z{toJSON(){return T(T({},super.toJSON()),{type:"pspdfkit/shape/polygon",points:this._pointsToJSON(),cloudyBorderIntensity:this.annotation.cloudyBorderIntensity})}static fromJSON(e,t,n){return(0,i.kG)("pspdfkit/shape/polygon"===t.type,"Wrong `type` field"),new s.Hi(T(T({},super.fromJSON(e,t,n)),{points:t.points?this._JSONToPoints(t.points):this._JSONLinesToPoints(t.lines),cloudyBorderIntensity:t.cloudyBorderIntensity}))}}function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class _ extends g.Z{toJSON(){return M(M({},super.toJSON()),{type:"pspdfkit/shape/polyline",points:this._pointsToJSON(),lineCaps:this.annotation.lineCaps})}static fromJSON(e,t,n){return(0,i.kG)("pspdfkit/shape/polyline"===t.type,"Wrong `type` field"),new s.om(M(M({},super.fromJSON(e,t,n)),{points:t.points?this._JSONToPoints(t.points):this._JSONLinesToPoints(t.lines),lineCaps:t.lineCaps}))}}function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class L extends p.Z{constructor(e){super(e)}toJSON(){return R(R({},super.toJSON()),{type:"pspdfkit/link",borderColor:this.annotation.borderColor?(0,u.C)(this.annotation.borderColor):null,borderWidth:this.annotation.borderWidth,borderStyle:this.annotation.borderStyle})}static fromJSON(e,t,n){return(0,i.kG)("pspdfkit/link"===t.type,"Wrong `type` field"),(0,i.kG)("object"==typeof t.action,"Missing `action` field"),new s.R1(R(R({},super.fromJSON(e,t,n)),{},{borderColor:t.borderColor?(0,u.b)(t.borderColor):null,borderWidth:t.borderWidth,borderStyle:t.borderStyle}))}}var B=n(18025);function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class K extends p.Z{constructor(e){super(e)}toJSON(){return(0,v.k)("object"==typeof this.annotation.text,"`text` must be an object"),(0,v.k)("plain"===this.annotation.text.format||"xhtml"===this.annotation.text.format,"Invalid `text.format` field"),(0,v.k)("string"==typeof this.annotation.text.value,"Missing `text.value` field"),"xhtml"===this.annotation.text.format&&(0,i.ZK)("NoteAnnotationSerializer: `text.format` is set to `xhtml`, but this is not supported by PSPDFKit for Web. Falling back to `plain`."),z(z({},super.toJSON()),{type:"pspdfkit/note",text:this.annotation.text,icon:B.Y4[this.annotation.icon]||this.annotation.icon,color:(0,u.C)(this.annotation.color)})}static fromJSON(e,t,n){(0,v.k)("pspdfkit/note"===t.type,"Wrong `type` field");const o={};if("string"==typeof t.icon){const e=B.V9[t.icon];o.icon=e||t.icon}var r;("string"==typeof t.color&&(o.color=(0,u.b)(t.color)),"object"==typeof t.text)&&(o.text=t.text,"xhtml"===(null===(r=t.text)||void 0===r?void 0:r.format)&&((0,i.ZK)("NoteAnnotationSerializer: `text.format` is set to `xhtml`, but this is not supported by PSPDFKit for Web. Falling back to `plain`."),o.text.format="plain"));return new s.Qi(z(z({},super.fromJSON(e,t,n)),o))}}var Z=n(45395),U=n(24871),V=n(5020);function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class q extends p.Z{constructor(e){super(e)}toJSON(){return W(W({},super.toJSON()),{type:"pspdfkit/text",text:this.annotation.text,fontColor:this.annotation.fontColor&&(0,u.C)(this.annotation.fontColor),backgroundColor:this.annotation.backgroundColor&&(0,u.C)(this.annotation.backgroundColor),font:this.annotation.font,borderColor:this.annotation.borderColor&&(0,u.C)(this.annotation.borderColor),rotation:"number"==typeof this.annotation.rotation?(0,V.Lv)(this.annotation.rotation):this.annotation.rotation,fontSize:this.annotation.fontSize,fontStyle:tt(this.annotation)||[],horizontalAlign:this.annotation.horizontalAlign,verticalAlign:this.annotation.verticalAlign,callout:this._calloutToJSON(),borderStyle:this.annotation.borderStyle,borderWidth:this.annotation.borderWidth,isFitting:this.annotation.isFitting,lineHeightFactor:this.annotation.lineHeightFactor})}static fromJSON(e,t,n){(0,i.kG)("pspdfkit/text"===t.type,"Wrong `type` field"),(0,i.kG)("object"==typeof t.text,"Missing `text` field"),(0,i.kG)("string"==typeof t.text.format,"Missing `text.format` field"),(0,i.kG)("string"==typeof t.text.value,"Missing `text.value` field"),(0,i.kG)("string"==typeof t.font,"Missing `font` field"),t.borderStyle&&((0,i.kG)("string"==typeof Z.N[t.borderStyle],"Invalid value for `borderStyle`"),(0,i.kG)("number"==typeof t.borderWidth,"Missing `borderWidth` field"));const o=t.fontStyle instanceof Array?t.fontStyle:[],r="number"==typeof t.rotation?(0,V.Lv)(t.rotation):0;return new s.gd(W(W({},super.fromJSON(e,t,n)),{text:t.text,fontColor:t.fontColor?(0,u.b)(t.fontColor):null,backgroundColor:t.backgroundColor?(0,u.b)(t.backgroundColor):null,font:t.font,rotation:r,fontSize:null!=t.fontSize?t.fontSize:s.gd.defaultValues.fontSize,isBold:o.includes("bold"),isItalic:o.includes("italic"),horizontalAlign:t.horizontalAlign||"left",verticalAlign:t.verticalAlign||"top",callout:this._JSONToCallout(t.callout),borderStyle:t.borderStyle&&Z.N[t.borderStyle],borderWidth:t.borderWidth,borderColor:t.borderColor?(0,u.b)(t.borderColor):null,isFitting:!!t.isFitting||null==t.fontSize,lineHeightFactor:t.lineHeightFactor}))}_calloutToJSON(){const{callout:e}=this.annotation;return e?((0,i.kG)(e.start instanceof s.E9),(0,i.kG)(e.end instanceof s.E9),(0,i.kG)(!e.innerRectInset||e.innerRectInset instanceof s.eB),{start:(0,d.K)(e.start),knee:e.knee&&(0,d.K)(e.knee),end:(0,d.K)(e.end),cap:e.cap,innerRectInset:e.innerRectInset&&(0,S.B)(e.innerRectInset)}):null}static _JSONToCallout(e){return e?((0,i.kG)("object"==typeof e.start,"Missing `callout.start` field"),(0,i.kG)("object"==typeof e.end,"Missing `callout.end` field"),(0,i.kG)(!e.cap||"string"==typeof U.u[e.cap],"Invalid value for `callout.cap`"),new s.UW({start:(0,d.W)(e.start),knee:e.knee&&(0,d.W)(e.knee),end:(0,d.W)(e.end),cap:e.cap&&U.u[e.cap],innerRectInset:e.innerRectInset&&(0,S.r)(e.innerRectInset)})):null}}var H=n(81041);function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class Y extends H.Z{constructor(e){super(e)}toJSON(){return X(X({},super.toJSON()),{},{type:this.typeForAnnotation(),color:(0,u.C)(this.annotation.color)})}static fromJSON(e,t,n){(0,i.kG)(t.type.startsWith("pspdfkit/markup/"),"Wrong `type` field"),(0,i.kG)("string"==typeof t.color,"Missing `color` field");return new(0,H.M[t.type])(X(X({},super.fromJSON(e,t,n)),{},{color:(0,u.b)(t.color)}))}typeForAnnotation(){const e=this.annotation.constructor;for(const t of Object.keys(H.M))if(e===H.M[t])return t;throw new Error("Unknown text markup annotation")}}function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class ee extends p.Z{constructor(e){super(e)}toJSON(){return Q(Q({},super.toJSON()),{},{type:"pspdfkit/unknown"})}static fromJSON(e,t,n){return new s.Ih(super.fromJSON(e,t,n))}}function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class oe extends p.Z{constructor(e){super(e)}toJSON(){return ne(ne({},super.toJSON()),ne(ne({type:"pspdfkit/image",description:this.annotation.description,fileName:this.annotation.fileName,contentType:this.annotation.contentType,imageAttachmentId:this.annotation.imageAttachmentId,rotation:this.annotation.rotation,isSignature:this.annotation.isSignature},this.annotation.xfdfAppearanceStream?{xfdfAppearanceStream:this.annotation.xfdfAppearanceStream}:null),this.annotation.xfdfAppearanceStreamOriginalPageRotation?{xfdfAppearanceStreamOriginalPageRotation:this.annotation.xfdfAppearanceStreamOriginalPageRotation}:null))}static fromJSON(e,t,n){(0,i.kG)("pspdfkit/image"===t.type,"Wrong `type` field");const o={};return"string"==typeof t.description&&(o.description=t.description),"string"==typeof t.fileName&&(o.fileName=t.fileName),"string"==typeof t.contentType&&(o.contentType=t.contentType),"string"==typeof t.imageAttachmentId&&(o.imageAttachmentId=t.imageAttachmentId),"boolean"==typeof t.isSignature&&(o.isSignature=t.isSignature),"string"==typeof t.xfdfAppearanceStream&&(o.xfdfAppearanceStream=t.xfdfAppearanceStream),"number"==typeof t.xfdfAppearanceStreamOriginalPageRotation&&(o.xfdfAppearanceStreamOriginalPageRotation=t.xfdfAppearanceStreamOriginalPageRotation),o.rotation="number"==typeof t.rotation?(0,V.Lv)(t.rotation):0,new s.sK(ne(ne({},super.fromJSON(e,t,n)),o))}}var re=n(33754);function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class se extends p.Z{constructor(e){super(e)}toJSON(){return ae(ae({},super.toJSON()),ae(ae({type:"pspdfkit/stamp",stampType:this.annotation.stampType,title:this.annotation.title,color:this.annotation.color&&(0,u.C)(this.annotation.color),subtitle:this.annotation.subtitle,rotation:"number"==typeof this.annotation.rotation?(0,V.Lv)(this.annotation.rotation):this.annotation.rotation},this.annotation.xfdfAppearanceStream?{xfdfAppearanceStream:this.annotation.xfdfAppearanceStream}:null),this.annotation.xfdfAppearanceStreamOriginalPageRotation?{xfdfAppearanceStreamOriginalPageRotation:this.annotation.xfdfAppearanceStreamOriginalPageRotation}:null))}static fromJSON(e,t,n){(0,i.kG)("pspdfkit/stamp"===t.type,"Wrong `type` field");const o={};return re.pY[t.kind||t.stampType]&&(o.stampType=t.stampType||t.kind),"string"==typeof t.title&&(o.title=t.title),"string"!=typeof t.subTitle&&"string"!=typeof t.subtitle||(o.subtitle=t.subtitle||t.subTitle),"string"==typeof t.color&&(o.color=(0,u.b)(t.color)),"string"==typeof t.xfdfAppearanceStream&&(o.xfdfAppearanceStream=t.xfdfAppearanceStream),"number"==typeof t.xfdfAppearanceStreamOriginalPageRotation&&(o.xfdfAppearanceStreamOriginalPageRotation=t.xfdfAppearanceStreamOriginalPageRotation),o.rotation="number"==typeof t.rotation?(0,V.Lv)(t.rotation):0,new s.GI(ae(ae({},super.fromJSON(e,t,n)),o))}}var le=n(78162);function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class de extends p.Z{constructor(e){super(e)}toJSON(){return ue(ue({},super.toJSON()),{},{type:"pspdfkit/comment-marker"})}static fromJSON(e,t,n){return(0,i.kG)("pspdfkit/comment-marker"===t.type,"Wrong `type` field"),new s.Jn(super.fromJSON(e,t,n))}}var pe=n(13071);function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function he(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class me extends p.Z{constructor(e){super(e)}toJSON(){return he(he({},super.toJSON()),{type:"pspdfkit/media",description:this.annotation.description,fileName:this.annotation.fileName,contentType:this.annotation.contentType,mediaAttachmentId:this.annotation.mediaAttachmentId})}static fromJSON(e,t,n){(0,i.kG)("pspdfkit/media"===t.type,"Wrong `type` field");const o={};return"string"==typeof t.description&&(o.description=t.description),"string"==typeof t.fileName&&(o.fileName=t.fileName),"string"==typeof t.contentType&&(o.contentType=t.contentType),"string"==typeof t.mediaAttachmentId&&(o.mediaAttachmentId=t.mediaAttachmentId),new c.Z(he(he({},super.fromJSON(e,t,n)),o))}}var ge=n(59780),ve=n(19209),ye=n(3534),be=n(31712),we=n(84778);function Se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ee=n(26248),xe=n(76367),De=n(56460);const Ce=["watermarkImage"],ke=["signatureType","certificates"];function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Te=e=>{Object.keys(e).forEach((t=>{null==e[t]||e[t]instanceof Array&&0===e[t].length?delete e[t]:"object"!=typeof e[t]||e[t]instanceof Array||Te(e[t])}))};function Ie(e){const t=new(function(e){switch(e){case s.Zc:return m;case s.o9:return w;case s.b3:return D;case s.Xs:return O;case s.Hi:return I;case s.om:return _;case s.R1:return L;case s.FV:case s.R9:case s.xu:case s.hL:return Y;case l.Z:return pe.Z;case s.gd:return q;case s.Qi:return K;case s.sK:return oe;case s.GI:return se;case s.x_:return le.Z;case s.Jn:return de;case s.Ih:return ee;case c.Z:return me;default:throw new Error("Unsupported annotation type")}}(e.constructor))(e).toJSON();return Te(t),t}function Fe(e,t,n){return He(t.type).fromJSON(e,t,n)}function Me(e,t,n){return function(e,t,n){(0,v.k)(1===t.v,"Version Unknown"),(0,v.k)("string"==typeof e,"`id` must be of type `string`"),(0,v.k)(null==t.name||"string"==typeof t.name,"`name` must be of type `string`"),(0,v.k)("string"==typeof t.type&&t.type.startsWith("pspdfkit/form-field/")&&3===t.type.split("/").length,`Invalid type for form field '${t.type}'`),(0,we.G)(n);const o=t.type.split("/")[2],r=t.flags?t.flags.reduce(((e,t)=>(e[t]=!0,e)),{}):{},s=Pe({id:e,pdfObjectId:t.pdfObjectId||null,name:t.name,annotationIds:(0,a.aV)(t.annotationIds),label:t.label,readOnly:r.readOnly,required:r.required,noExport:r.noExport,additionalActions:t.additionalActions?(0,be.eb)(t.additionalActions):null},(0,we.a5)(n));switch(t.type){case"pspdfkit/form-field/button":return new ge.R0(Pe(Pe({},s),{},{buttonLabel:t.buttonLabel}));case"pspdfkit/form-field/checkbox":return new ge.rF(Pe(Pe({},s),{},{defaultValues:(0,a.aV)(t.defaultValues),options:(0,a.aV)(t.options.map((e=>new ve.Z(e))))}));case"pspdfkit/form-field/combobox":return new ge.fB(Pe(Pe({},s),{},{options:(0,a.aV)(t.options.map((e=>new ve.Z(e)))),multiSelect:t.multiSelect,commitOnChange:t.commitOnChange,defaultValues:(0,a.aV)(t.defaultValues),edit:t.edit,doNotSpellCheck:t.doNotSpellCheck}));case"pspdfkit/form-field/listbox":return new ge.Vi(Pe(Pe({},s),{},{options:(0,a.aV)(t.options.map((e=>new ve.Z(e)))),multiSelect:t.multiSelect,commitOnChange:t.commitOnChange,defaultValues:(0,a.aV)(t.defaultValues)}));case"pspdfkit/form-field/radio":return new ge.XQ(Pe(Pe({},s),{},{noToggleToOff:t.noToggleToOff,radiosInUnison:t.radiosInUnison,defaultValue:t.defaultValue,options:(0,a.aV)(t.options.map((e=>new ve.Z(e))))}));case"pspdfkit/form-field/text":return new ge.$o(Pe(Pe({},s),{},{defaultValue:t.defaultValue,password:t.password,maxLength:t.maxLength,doNotSpellCheck:t.doNotSpellCheck,doNotScroll:t.doNotScroll,multiLine:t.multiLine,comb:t.comb}));case"pspdfkit/form-field/signature":return new ge.Yo(s);default:throw new i.p2(`Form field type not deserializable: ${o}`)}}(e,t,n)}function _e(e){return function(e){const t=ye.Mr.filter((t=>e[t])),n=Pe(Pe({id:e.id,v:1,pdfObjectId:e.pdfObjectId,name:e.name,annotationIds:e.annotationIds.toArray(),label:e.label,additionalActions:e.additionalActions&&(0,be.GI)(e.additionalActions)},(0,we.Ut)(e)),(null==t?void 0:t.length)&&{flags:t});if(e instanceof ge.R0)return Pe(Pe({},n),{},{type:"pspdfkit/form-field/button",buttonLabel:e.buttonLabel});if(e instanceof ge.rF)return Pe(Pe({},n),{},{type:"pspdfkit/form-field/checkbox",defaultValues:e.defaultValues.toArray(),options:e.options.toJS()});if(e instanceof ge.fB)return Pe(Pe({},n),{},{type:"pspdfkit/form-field/combobox",options:e.options.toJS(),multiSelect:e.multiSelect,commitOnChange:e.commitOnChange,defaultValues:e.defaultValues.toArray(),edit:e.edit,doNotSpellCheck:e.doNotSpellCheck});if(e instanceof ge.Vi)return Pe(Pe({},n),{},{type:"pspdfkit/form-field/listbox",options:e.options.toJS(),multiSelect:e.multiSelect,commitOnChange:e.commitOnChange,defaultValues:e.defaultValues.toArray()});if(e instanceof ge.XQ)return Pe(Pe({},n),{},{type:"pspdfkit/form-field/radio",options:e.options.toJS(),noToggleToOff:e.noToggleToOff,radiosInUnison:e.radiosInUnison,defaultValue:e.defaultValue});if(e instanceof ge.$o)return Pe(Pe({},n),{},{type:"pspdfkit/form-field/text",password:e.password,maxLength:e.maxLength,doNotSpellcheck:e.doNotSpellCheck,doNotScroll:e.doNotScroll,multiLine:e.multiLine,comb:e.comb,defaultValue:e.defaultValue});if(e instanceof ge.Yo)return Pe(Pe({},n),{},{type:"pspdfkit/form-field/signature"});throw new i.p2("Form field type not serializable")}(e)}function Ne(e,t,n){return(0,De.z)(e,t,n)}function Re(e,t){return(0,De.o)(e,t)}function Le(e){const t=a.aV.isList(e.value)?e.value.toArray():null==e.value?void 0:e.value;return Ae(Ae({v:1,type:"pspdfkit/form-field-value",name:e.name,value:t},e.optionIndexes&&e.optionIndexes.size>=1?{optionIndexes:e.optionIndexes.toArray()}:null),"boolean"==typeof e.isFitting&&{isFitting:e.isFitting})}function Be(e){(0,i.kG)("pspdfkit/form-field-value"===e.type,"Invalid `type` for form field value."),(0,i.kG)(1===e.v,"Invalid `version` for form field value."),(0,i.kG)("string"==typeof e.name,"Invalid `name` for form field value. Must be of type `string`."),(0,i.kG)(void 0===e.value||null===e.value||"string"==typeof e.value||Array.isArray(e.value),"Invalid `value` for form field value. Must be of type `undefined`, `null`, `string`, or `Array<string>`."),(0,i.kG)(void 0===e.optionIndexes||Array.isArray(e.optionIndexes)&&e.optionIndexes.every(Number.isInteger),"Invalid `optionIndexes` value for form field value. Must be an Array of integers."),(0,i.kG)(void 0===(null==e?void 0:e.isFitting)||"boolean"==typeof e.isFitting,"Invalid `isFitting` value for form field value. Must be a boolean.");const t=e.value instanceof Array?(0,a.aV)(e.value):e.value,n=e.name;return new ge.KD(Ae(Ae({name:n,value:t},e.optionIndexes&&e.optionIndexes.length>=1?{optionIndexes:(0,a.aV)(e.optionIndexes)}:null),"boolean"==typeof e.isFitting&&{isFitting:e.isFitting}))}function je(e){if(!Object.values(xe._).includes(e.status))throw new i.p2("Invalid `status` for signatures info. Must be one of the `PSPDFKit.DocumentValidationStatus` values");if("string"!=typeof e.checkedAt)throw new i.p2("Invalid `checkedAt` for signatures info. Must be of type `string`.");if(void 0!==e.signatures&&!Array.isArray(e.signatures))throw new i.p2("Invalid `signatures` for signatures info. Must be of type `undefined` or `Array`.");if(!["undefined","boolean"].includes(typeof e.documentModifiedSinceSignature))throw new i.p2("Invalid `documentModifiedSinceSignature` for signatures info. Must be of type `undefined` or `boolean`.");const{checkedAt:t,signatures:n,documentModifiedSinceSignature:o}=e;return Ae(Ae({status:xe._[e.status],checkedAt:new Date(t)},n?{signatures:ze(n)}:null),"boolean"==typeof o?{documentModifiedSinceSignature:o}:null)}function ze(e){return e.map((e=>{if("pspdfkit/signature-info"!==e.type)throw new i.p2("Invalid `type` for signature info.");if(["signerName","creationDate","signatureReason","signatureLocation"].forEach((t=>{if(!["undefined","string"].includes(typeof e[t]))throw new i.p2(`Invalid \`${t}\` for signature info. Must be \`undefined\` or \`string\`.`)})),["isTrusted","isSelfSigned","isExpired","documentModifiedSinceSignature"].forEach((t=>{if(!["boolean"].includes(typeof e[t]))throw new i.p2(`Invalid \`${t}\` for signature info. Must be \`boolean\``)})),!["string"].includes(typeof e.signatureFormFQN))throw new i.p2("Invalid `signatureFormFQN` for signature info. Must be a `string`.");if(!Object.values(Ee.QA).includes(e.documentIntegrityStatus))throw new i.p2("Invalid `documentIntegrityStatus` for signature info. Must be one of the `PSPDFKit.DocumentIntegrityStatus` values");if(e.signatureType&&!Object.values(Ee.Xl).includes(e.signatureType))throw new i.p2(`Invalid \`signatureType\` for signature info: ${e.signatureType}. Must be 'cms' or 'cades' if present`);if(!Object.values(Ee.wk).includes(e.certificateChainValidationStatus))throw new i.p2("Invalid `certificateChainValidationStatus` for signature info. Must be one of the `PSPDFKit.CertificateChainValidationStatus` values");if(!Object.values(Ee.qA).includes(e.signatureValidationStatus))throw new i.p2("Invalid `signatureValidationStatus` for signature info. Must be one of the `PSPDFKit.SignatureValidationStatus` values");return Ae(Ae({type:e.type},e.signatureType?{signatureType:ot[e.signatureType]}:null),{},{documentIntegrityStatus:Ee.QA[e.documentIntegrityStatus],certificateChainValidationStatus:Ee.wk[e.certificateChainValidationStatus],signatureValidationStatus:Ee.qA[e.signatureValidationStatus],isTrusted:e.isTrusted,isSelfSigned:e.isSelfSigned,isExpired:e.isExpired,documentModifiedSinceSignature:e.documentModifiedSinceSignature,signerName:e.signerName,signatureReason:e.signatureReason,signatureLocation:e.signatureLocation,creationDate:e.creationDate?new Date(e.creationDate):void 0,signatureFormFQN:e.signatureFormFQN,PAdESSignatureLevel:e.PAdESSignatureLevel,validFrom:e.validFrom,validUntil:e.validUntil,timestampInfo:e.timestampInfo})}))}function Ke(e){return Ae({type:"pspdfkit/signature-metadata"},e)}function Ze(e){return e?{type:"pspdfkit/signature-position",pageIndex:e.pageIndex,rect:(0,P.u)(e.boundingBox)}:null}function Ue(e){if(!e)return null;const{watermarkImage:t}=e,n=(0,o.Z)(e,Ce);let r;return t&&(r=t.type),Ae(Ae({type:"pspdfkit/signature-appearance"},n),r?{contentType:r}:null)}function Ve(e){const t=e||{},{signatureType:n,certificates:r}=t,i=(0,o.Z)(t,ke);return Ae({type:"pspdfkit/signer-data-source",certificates:r||[],signatureType:rt[n||(r&&r.length>0?Ee.BG.CAdES:Ee.BG.CMS)]||Ee.Xl.cms},i)}function Ge(e){return"string"==typeof e.type&&e.type.startsWith("pspdfkit/form-field/")}function We(e){return"pspdfkit/form-field-value"===e.type}function qe(e){return e.map((e=>e.data)).toJS()}const He=e=>{switch(e){case"pspdfkit/ink":return m;case"pspdfkit/shape/line":return w;case"pspdfkit/shape/rectangle":return D;case"pspdfkit/shape/ellipse":return O;case"pspdfkit/shape/polygon":return I;case"pspdfkit/shape/polyline":return _;case"pspdfkit/link":return L;case"pspdfkit/markup/highlight":case"pspdfkit/markup/squiggly":case"pspdfkit/markup/strikeout":case"pspdfkit/markup/underline":return Y;case"pspdfkit/markup/redaction":return pe.Z;case"pspdfkit/text":return q;case"pspdfkit/note":return K;case"pspdfkit/image":return oe;case"pspdfkit/stamp":return se;case"pspdfkit/widget":return le.Z;case"pspdfkit/comment-marker":return de;case"pspdfkit/media":return me;default:return ee}};function $e(e){const t=Object.entries(e).reduce(((e,t)=>{let[n,o]=t;switch(n){case"color":case"fontColor":case"strokeColor":case"backgroundColor":case"borderColor":case"fillColor":case"outlineColor":e[n]=o&&(0,u.C)(o);break;case"startPoint":case"endPoint":e[n]=o&&(0,d.K)(o);break;case"icon":e.icon=B.Y4[o];break;case"points":e.points=o&&o.map((e=>(0,d.K)(e))).toJS();break;case"lines":e.lines=o&&{points:o.map((e=>e.map((e=>(0,d.K)(e))))).toJS(),intensities:o.map((e=>e.map((e=>e.intensity)))).toJS()};break;case"isBold":e.fontStyle=Array.isArray(e.fontStyle)?e.fontStyle.concat("bold"):["bold"];break;case"isItalic":e.fontStyle=Array.isArray(e.fontStyle)?e.fontStyle.concat("italic"):["italic"];break;case"callout":e.callout=o&&{start:(0,d.K)(o.start),knee:o.knee&&(0,d.K)(o.knee),end:(0,d.K)(o.end),cap:o.cap};break;case"boundingBox":e.bbox=o&&(0,P.u)(o);break;case"cloudyBorderInset":e.cloudyBorderInset=o&&(0,S.B)(o);break;case"strokeDashArray":case"borderDashArray":e.strokeDashArray=o;break;case"action":e.action=o&&(0,be.vP)(o);break;case"createdAt":case"updatedAt":e[n]=o&&o.toISOString();break;case"noPrint":case"noZoom":case"noRotate":case"noView":case"hidden":!0===o&&(e.flags=Array.isArray(e.flags)?e.flags.concat(n):[n]);break;default:e[n]=o}return e}),{});return Te(t),t}function Xe(e){const t=Object.entries(e).reduce(((e,t)=>{let[n,o]=t;switch(n){case"color":case"fontColor":case"strokeColor":case"backgroundColor":case"borderColor":case"fillColor":case"outlineColor":e[n]=null!=o?(0,u.b)(o):null;break;case"startPoint":case"endPoint":e[n]=o&&(0,d.W)(o);break;case"icon":e.icon=B.V9[o];break;case"points":e.points=o&&(0,a.aV)(o.map((e=>(0,d.W)(e))));break;case"lines":e.lines=o&&(0,a.aV)(o.points).map(((e,t)=>{const n=o.intensities[t];return(0,a.aV)(e).map(((e,t)=>{const o=n[t],r=(0,d.W)(e);return new s.Wm({x:r.x,y:r.y,intensity:o})}))}));break;case"fontStyle":e.isBold=o&&o.includes("bold"),e.isItalic=o&&o.includes("italic");break;case"callout":e.callout=o&&{start:(0,d.W)(o.start),knee:o.knee&&(0,d.W)(o.knee),end:(0,d.W)(o.end),cap:o.cap};break;case"bbox":e.boundingBox=o&&(0,P.k)(o);break;case"cloudyBorderInset":e.cloudyBorderInset=o&&(0,S.r)(o);break;case"strokeDashArray":e.strokeDashArray=o;break;case"action":e.action=o&&(0,be.lk)(o);break;case"createdAt":case"updatedAt":e[n]=new Date(o);break;case"flags":o&&(e.noPrint=o.includes("noPrint"),e.noZoom=o.includes("noZoom"),e.noRotate=o.includes("noRotate"),e.noView=o.includes("noView"),e.hidden=o.includes("hidden"));break;default:e[n]=o}return e}),{});return Te(t),t}function Ye(e){return"pspdfkit/bookmark"===e.type}function Je(e){return"pspdfkit/comment"===e.type}function Qe(e){return"pspdfkit/signature-info"===e.type}function et(e){return"pspdfkit/embedded-file"===e.type}function tt(e){const t=[];return e.isBold&&t.push("bold"),e.isItalic&&t.push("italic"),t.length>0?t:null}function nt(e){if("addPage"===e.type){if("afterPageIndex"in e&&"number"==typeof e.afterPageIndex)return Ae({type:e.type,afterPageIndex:e.afterPageIndex,pageWidth:e.pageWidth,pageHeight:e.pageHeight,rotateBy:e.rotateBy,backgroundColor:e.backgroundColor.toCSSValue()},e.insets&&{insets:(0,P.u)(e.insets)});if("beforePageIndex"in e&&"number"==typeof e.beforePageIndex)return Ae({type:e.type,beforePageIndex:e.beforePageIndex,pageWidth:e.pageWidth,pageHeight:e.pageHeight,rotateBy:e.rotateBy,backgroundColor:e.backgroundColor.toCSSValue()},e.insets&&{insets:(0,P.u)(e.insets)});throw new i.p2("The `addPage` operation is missing either the `afterPageIndex` or the `beforePageIndex` property")}return"cropPages"===e.type?{type:e.type,cropBox:(0,P.u)(e.cropBox),pageIndexes:e.pageIndexes}:e}const ot={cms:"CMS",cades:"CAdES",documentTimestamp:"documentTimestamp"},rt={CMS:"cms",CAdES:"cades",documentTimestamp:"documentTimestamp"};function it(e){return(0,a.aV)(e.map((e=>({c:e.c,rect:(0,P.k)(e.r)}))))}},34852:(e,t,n)=>{"use strict";n.d(t,{eQ:()=>hE,xE:()=>nE,Un:()=>mE,zD:()=>lE,ae:()=>qP,XV:()=>gE,n_:()=>sE,Nt:()=>oE,If:()=>WP});var o=n(84121),r=n(67665),i=n(35369),a=n(67366),s=n(47347),l=n(73935),c=n(67294),u=n(94184),d=n.n(u),p=n(46797),f=n(75920),h=n(87153),m=n.n(h),g=(n(17938),n(21076));function v(e){return(0,s.kG)(Array.isArray(e),"fontSubstitutions must be an array of FontSubstitution objects."),e.every((e=>"string"==typeof(null==e?void 0:e.pattern)&&""!==(null==e?void 0:e.pattern.trim())&&"string"==typeof(null==e?void 0:e.target)&&""!==e.target.trim()))}var y=n(34426),b=n(88804),w=n(66687),S=n(76192),P=n(97333),E=n(40230);function x(e){return function(t){var n=t.dispatch,o=t.getState;return function(t){return function(r){return"function"==typeof r?r(n,o,e):t(r)}}}}var D=x();D.withExtraArgument=x;const C=D;n(94500);var k=n(30570),O=n(79827),A=n(36489),T=n(80857),I=n(72584);const F=(0,T.Z)("MeasurementValueConfiguration");function M(e){let t=!1;e.forEach(((n,o)=>{var r;r=n,F((0,s.PO)(r)&&!!r,"Expected item to be an object"),F((0,s.PO)(r.scale)&&!!r.scale,"Expected scale to be an object"),F(void 0!==r.scale.unitFrom&&Object.values(A.s).includes(r.scale.unitFrom),`Scale ${r.name} does not have a valid 'unitFrom' value.`),F(void 0!==r.scale.unitTo&&Object.values(O.K).includes(r.scale.unitTo),`Scale ${r.name} does not have a valid 'unitTo' value.`),F(void 0!==r.scale.fromValue&&(0,I.hj)(Number(r.scale.fromValue)),`Scale ${r.name} does not have a valid 'fromValue' value.`),F(void 0!==r.scale.toValue&&(0,I.hj)(Number(r.scale.toValue)),`Scale ${r.name} does not have a valid 'toValue' value.`),F("string"==typeof r.precision||void 0===r.precision,"`measurementValueConfiguration.measurementPrecision` must be a string.");for(let t=o+1;t<e.length;t++){const r=(0,k.cd)(n,e[t]);F(!r,`Scale ${n.name||`at index ${o}`} is a duplicate of ${e[t].name||`at index ${t}`}.`)}n.selected&&(F(!t,"Only one scale can be selected at a time. Please check your configuration."),t=!0)}))}var _=n(95651),N=n(20792),R=n(68382),L=n(3026),B=n(25387);function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const K=new w.ZM,Z={[B.M85]:(e,t)=>e.withMutations((e=>{t.annotations.forEach((t=>{(0,_.ud)(e,t)}))})),[B.ILc]:(e,t)=>{const n=t.annotation.withMutations((n=>n.merge((0,_.lx)(e)).set("pageIndex",t.pageIndex)));return e.withMutations((e=>{e.set("selectedAnnotationIds",(0,i.l4)([n.id])),e.set("interactionMode",N.A.INK),e.set("selectedAnnotationMode",R.o.EDITING),(0,_.ud)(e,n)}))},[B.RPc]:(e,t)=>e.set("inkEraserCursorWidth",t.lineWidth),[B.HS7]:(e,t)=>{const n=t.annotation.withMutations((n=>n.merge((0,_.lx)(e)).set("pageIndex",t.pageIndex)));return e.withMutations((e=>{e.set("selectedAnnotationIds",(0,i.l4)([n.id])),e.set("interactionMode",(0,L.R4)(t.annotation.constructor)),e.set("selectedAnnotationMode",R.o.EDITING),(0,_.ud)(e,n)}))},[B.jzI]:(e,t)=>{const n=t.annotation.withMutations((n=>n.merge((0,_.lx)(e)).set("pageIndex",t.pageIndex)));return e.withMutations((e=>{e.set("selectedAnnotationIds",(0,i.l4)([n.id])),e.set("interactionMode",N.A.REDACT_SHAPE_RECTANGLE),e.set("selectedAnnotationMode",R.o.EDITING),(0,_.ud)(e,n)}))},[B.oE1]:(e,t)=>{let{attributes:n}=t;const{currentItemPreset:o}=e;return o?e.hasIn(["annotationPresets"],o)?e.mergeIn(["annotationPresets",o],n):e.setIn(["annotationPresets",o],n):e},[B.oWy]:(e,t)=>{let{currentItemPreset:n}=t;return e.set("currentItemPreset",n)},[B.UiQ]:(e,t)=>{let{annotationPresets:n}=t;return e.set("annotationPresets",n)},[B.R1i]:(e,t)=>{let{annotationID:n,annotationPresetID:o}=t;return e.setIn(["annotationPresetIds",n],o)},[B.x0v]:(e,t)=>{let{annotationID:n}=t;return e.delete("annotationPresetIds",n)},[B.JwD]:(e,t)=>{let{annotationID:n}=t;const o=e.annotationPresetIds.has(n)?e.annotationPresetIds.get(n):(0,_.X5)(e,n);return e.set("currentItemPreset",o)},[B.R8P]:(e,t)=>e.withMutations((e=>{t.annotations.forEach((t=>{(0,_._E)(e,t)}))})),[B.gF5]:(e,t)=>e.withMutations((e=>{t.ids.forEach((t=>{(0,_.Dl)(e,t)}))})),[B.sCM]:(e,t)=>{let{annotationsIDs:n}=t;return e.set("annotationsIdsToDelete",n)},[B.qRJ]:(e,t)=>{let{stampAnnotationTemplates:n}=t;return e.set("stampAnnotationTemplates",n)},[B.WaW]:(e,t)=>e.set("collapseSelectedNoteContent",t.value),[B.ieh]:(e,t)=>e.withMutations((e=>{t.ids.forEach(((t,n)=>{e.invalidAPStreams.get(t)||e.set("invalidAPStreams",e.invalidAPStreams.set(t,(0,i.l4)()));const o=e.invalidAPStreams.get(t);o&&e.set("invalidAPStreams",e.invalidAPStreams.set(t,o.add(n)))}))})),[B.kVz]:(e,t)=>e.withMutations((e=>{t.ids.forEach(((t,n)=>{e.invalidAPStreams.get(t)&&e.deleteIn(["invalidAPStreams",t],n)}))})),[B.hw0]:(e,t)=>e.set("onAnnotationResizeStart",t.callback),[B.$8O]:(e,t)=>{let{measurementToolState:n}=t;return e.set("measurementToolState",n?z(z({},e.measurementToolState),n):null)},[B.UP4]:(e,t)=>{let{hintLines:n}=t;return e.set("hintLines",n)},[B.vkF]:(e,t)=>{let{configurationCallback:n}=t;return e.set("measurementValueConfiguration",n)},[B.SdX]:(e,t)=>{var n,o;let{scales:r}=t;const i=null!==(n=null===(o=e.measurementValueConfiguration)||void 0===o?void 0:o.call(e,r))&&void 0!==n?n:r;i&&M(i);const a=e.activeMeasurementScale||i.find((e=>e.selected))||i[0];return e.withMutations((e=>{e.set("measurementScales",i),a&&e.set("activeMeasurementScale",a)}))},[B.Zt9]:(e,t)=>e.set("secondaryMeasurementUnit",t.secondaryMeasurementUnit),[B.VNu]:(e,t)=>e.set("activeMeasurementScale",t.activeMeasurementScale),[B.wgG]:(e,t)=>e.set("isCalibratingScale",t.isCalibratingScale),[B.Dqw]:(e,t)=>e.withMutations((e=>{"down"===t.variant?e.updateIn(["APStreamVariantsDown"],(e=>e.concat(t.annotationObjectIds))):"rollover"===t.variant&&e.updateIn(["APStreamVariantsRollover"],(e=>e.concat(t.annotationObjectIds)))})),[B.uOP]:(e,t)=>e.set("widgetAnnotationToFocus",t.annotationId)};function U(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K,t=arguments.length>1?arguments[1]:void 0;const n=Z[t.type];return n?n(e,t):e}const V=new w.ZM,G={[B.huI]:(e,t)=>{const{hash:n,attachment:o}=t;return e.setIn(["attachments",n],o)}};function W(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V,t=arguments.length>1?arguments[1]:void 0;const n=G[t.type];return n?n(e,t):e}var q=n(25915),H=n(27515),$=n(18146),X=n(75237),Y=n(79941),J=n(49027),Q=n(3845),ee=n(60132),te=n(72131),ne=n(17375);function oe(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ae=()=>()=>{};function se(){const e=c.createContext(ae);class t extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"state",{instances:{}}),(0,o.Z)(this,"refCreator",((e,t,n)=>o=>{this.setState((r=>{let{instances:i}=r;const a=i[e]||{node:null,portalTarget:document.createElement("div"),target:null};return n&&(a.portalTarget.className=n),a.portalTarget.parentNode!==o&&o&&o.appendChild(a.portalTarget),a.node===t&&a.target===o?null:{instances:ie(ie({},i),{},{[e]:ie(ie({},a),{},{node:t,target:o})})}}),(()=>{if(null===o){null===this.state.instances[e].target&&this.setState((t=>{let{instances:n}=t;const{[e]:o}=n;return{instances:(0,ne.Z)(n,[e].map(oe))}}))}}))}))}render(){const t=Object.entries(this.state.instances).map((e=>{let[t,{node:n,portalTarget:o}]=e;return l.createPortal(void 0===n?null:n,o,t)}));return c.createElement(e.Provider,{value:this.refCreator},this.props.children,t)}}return{Provider:t,Reparent:function(t){let{id:n,children:o,className:r}=t;return c.createElement(e.Consumer,null,(e=>c.createElement("div",{ref:e(n,o,r)})))}}}const le=se(),ce=se();se();var ue=n(22122),de=n(15973);function pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function he(e){let{append:t,node:n,children:o,rendererStyles:r,onDisappear:i}=e;const[a,s]=c.useState(null),l=c.useRef(i);return c.useLayoutEffect((()=>{if(a&&n&&n!==a.firstChild){for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(n)}return()=>{const e=l.current;e&&e(n)}}),[n,a]),c.useLayoutEffect((()=>{l.current=i}),[i]),c.createElement("div",{style:{position:"relative"}},t&&o,n&&c.createElement("div",{ref:s,style:r}))}function me(e,t){return!e&&!t}const ge={node:"object",append:"boolean",noZoom:"boolean",onDisappear:"function"};const ve=(0,a.$j)((e=>({customRenderers:e.customRenderers})))((function(e){const{children:t,customRenderers:n,renderer:o,zoomLevel:r,notCSSScaled:i=!1}=e;if(!n||!n[o])return t;const a=c.Children.only(t),l=a.props,u=ye[o],d=n[o];(0,s.kG)(null!=d);const p=d(u(l));if(!p)return t;!function(e){(0,s.kG)(e.node,"Custom renderers must return an object with a node property.");for(const t in e)e.hasOwnProperty(t)&&((0,s.kG)(void 0!==ge[t],`Render configuration '${t}' property is not supported`),(0,s.kG)(typeof e[t]===ge[t],`Render configuration ${t} property has wrong '${typeof e[t]}' type, should be '${ge[t]}'`))}(p);const{node:f,append:h,noZoom:m=!1,onDisappear:g}=p,v=be[o];(0,s.kG)("boolean"==typeof m);const y=fe({pointerEvents:h?"none":"all"},v?v(l,m,i,r):null);return c.createElement(he,{node:f,append:h,onDisappear:g,rendererStyles:y},a)})),ye={Annotation:e=>({annotation:e.annotation}),CommentAvatar:e=>({comment:e.comment})},be={Annotation:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;if(e&&e.annotation&&e.annotation.boundingBox){const{left:r,top:i,width:a,height:s}=e.annotation.boundingBox;return fe({position:"absolute",left:r*o,top:i*o,width:n?a*o:a,height:n?s*o:s},me(t,n)?{transform:`scale(${o})`,transformOrigin:"0 0"}:null)}return{}},CommentAvatar:null};var we=n(18390),Se=n(76154),Pe=n(97413);function Ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}class xe extends c.PureComponent{render(){const{applyZoom:e,children:t,position:n,zoomLevel:r,noRotate:i,currentPagesRotation:a,disablePointerEvents:s,additionalStyle:l={},isMultiAnnotationsSelected:u}=this.props;(0,Pe.k)(!i||"number"==typeof a);const d=(e?`scale(${r}) `:"")+(i?`rotate(-${String(a)}deg)`:""),p=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({top:n?n.y*r:null,left:n?n.x*r:null,position:"absolute",transform:d,transformOrigin:"0 0",pointerEvents:!0===s?"none":"auto",zIndex:u?2:"unset"},l);return c.createElement("div",{style:p,className:this.props.className},t)}}var De=n(34573),Ce=n(7844),ke=n(35129),Oe=n(13448),Ae=n(14437),Te=n.n(Ae);class Ie extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"shouldComponentUpdate",Ce.O),(0,o.Z)(this,"_onPointerDownUp",(e=>{e.isPrimary&&(!this.props.isReadOnly&&e.preventDefault(),this._handlePress(e,"touch"!==e.pointerType?new w.E9({x:e.clientX,y:e.clientY}):null))})),(0,o.Z)(this,"_handlePress",((e,t)=>{this.props.dispatch((0,De.mg)(this.props.annotation,e,{selectedAnnotationShouldDrag:t,stopPropagation:!0,ignoreReadOnly:!0}))})),(0,o.Z)(this,"_handleClick",(e=>{"keypress"===e.type&&this._handlePress(e,null)})),(0,o.Z)(this,"_onFocus",(e=>{this.props.onFocus&&this.props.onFocus(this.props.annotation,e)})),(0,o.Z)(this,"_onBlur",(e=>{this.props.onBlur&&this.props.onBlur(this.props.annotation,e)}))}render(){const{annotation:e,zoomLevel:t,rotation:n,active:o,intl:{formatMessage:r}}=this.props,{width:i,height:a}=e.boundingBox,s=this.props.isReadOnly?{onPointerUp:this._onPointerDownUp}:{onPointerDown:this._onPointerDownUp},l=d()("PSPDFKit-Annotation","PSPDFKit-Comment-Marker-Annotation",o&&!this.props.isDisabled&&"PSPDFKit-Annotation-Selected",o&&!this.props.isDisabled&&"PSPDFKit-Comment-Marker-Annotation-Selected",Te().annotation);return c.createElement(xe,{position:e.boundingBox.getLocation(),zoomLevel:t,currentPagesRotation:n,noRotate:!0,isMultiAnnotationsSelected:this.props.isMultiAnnotationsSelected},c.createElement(we.Z,(0,ue.Z)({},s,{onClick:this._handleClick,onFocus:this._onFocus,onBlur:this._onBlur,disabled:this.props.isDisabled,style:{width:i,height:a,transformOrigin:"top left",transform:`translate(${i*t/2-i/2}px, ${a*t/2-a/2}px)`},className:l,"data-annotation-id":e.id,"aria-controls":`CommentThread-${e.id}`,"aria-label":`${r(ke.Z.annotation)}: ${r(ke.Z.comment)}`}),c.createElement(Oe.Z,{style:{width:20,height:20},className:d()(Te().icon,o&&Te().iconActive),type:"comment-indicator"})))}}const Fe=(0,Se.XN)(Ie,{forwardRef:!0});var Me,_e=n(45588),Ne=n(86366),Re=n(13540),Le=n(73264),Be=n(91859),je=n(58054),ze=n.n(je),Ke=n(36095),Ze=n(16126),Ue=n(75669),Ve=n(92606),Ge=n.n(Ve);function We(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?We(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):We(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class He extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"isAlive",!0),(0,o.Z)(this,"_shouldShowIndicators",this.props.annotation instanceof w.sK||this.props.annotation instanceof w.R1||this.props.annotation instanceof w.GI||this.props.annotation instanceof w.Ih||this.props.formField instanceof w.Yo),(0,o.Z)(this,"_imageFetcherRef",(e=>{e&&!this._fetchImageComponentInstance&&(this._fetchImageComponentInstance=e)})),(0,o.Z)(this,"_fetchImageComponentInstance",null),(0,o.Z)(this,"state",{loadingState:"LOADING",showLoadingIndicator:!1,renderedAnnotation:null}),(0,o.Z)(this,"_fetchImage",(()=>{const{backend:e,attachment:t,zoomLevel:n,isDetachedAnnotation:o}=this.props;let r=this.props.annotation;return o&&(r=r.update("boundingBox",(e=>null==e?void 0:e.set("left",0).set("top",0)))),(0,_e.an)({backend:e,blob:null==t?void 0:t.data,annotation:r,isDetachedAnnotation:Boolean(o),zoomLevel:n,variant:this.props.variant})})),(0,o.Z)(this,"_renderFinished",(()=>{var e,t;this.isAlive&&(this.props.annotation instanceof w.GI&&this.setState({renderedAnnotation:this.props.annotation}),this._shouldShowIndicators&&this.setState({loadingState:"LOADED"}),null===(e=(t=this.props).onRenderFinished)||void 0===e||e.call(t))})),(0,o.Z)(this,"_showError",(()=>{var e,t;this.isAlive&&(this.props.annotation instanceof w.GI||this.props.annotation instanceof w.sK||this.props.annotation instanceof w.Ih?this._shouldShowIndicators&&this.setState({loadingState:"ERROR"}):null===(e=(t=this.props).onError)||void 0===e||e.call(t))})),(0,o.Z)(this,"_showLoadingIndicator",(()=>{this.isAlive&&this._shouldShowIndicators&&this.setState((e=>({showLoadingIndicator:"LOADING"===e.loadingState})))}))}componentDidUpdate(e){!this.props.isDragging&&this.isAlive&&Ye(e,this.props)&&(this._fetchImageComponentInstance&&this.props.annotation.rotation!==e.annotation.rotation?this._fetchImageComponentInstance.refreshSkippingThrottle():this._fetchImageComponentInstance&&this._fetchImageComponentInstance.refresh())}componentDidMount(){this._shouldShowIndicators&&setTimeout(this._showLoadingIndicator,Be.rB)}componentWillUnmount(){this.isAlive=!1;const{annotation:e,backend:t}=this.props;"imageAttachmentId"in e&&e.imageAttachmentId&&(t.attachmentsCache=t.attachmentsCache.delete((0,_e.UW)(e)))}render(){var e;const{annotation:t,attachment:n,formField:o,label:r,zoomLevel:i}=this.props,a=t instanceof w.GI&&(null===(e=this.state.renderedAnnotation)||void 0===e?void 0:e.opacity)!==t.opacity,l=qe(qe(qe({},$e),function(e){let{annotation:t,attachment:n,zoomLevel:o}=e;if(t instanceof w.x_||t instanceof w.R1)return{position:"absolute",top:0};if(t instanceof w.UX||t instanceof w.Zc)return{padding:Ke.Ni?Be.wK:Be.XZ};if(t instanceof w.GI&&(0,Ue.kv)(t)){const e=(0,Ue.h4)(t),n=(t.boundingBox.width-e.boundingBox.width)/2*o,r=(t.boundingBox.height-e.boundingBox.height)/2*o;return{transformOrigin:"50% 50%",transform:`translate(${-n}px, ${-r}px) rotate(${String(t.rotation)}deg)`,width:t.boundingBox.width*o,height:t.boundingBox.height*o}}if(t instanceof w.gd&&(0,Ue.kv)(t)){const e=(0,Ue.h4)(t),n=(t.boundingBox.width-e.boundingBox.width)/2*o,r=(t.boundingBox.height-e.boundingBox.height)/2*o;return{transformOrigin:"50% 50%",transform:`translate(${-n}px, ${-r}px) rotate(${String(t.rotation)}deg)`,width:t.boundingBox.width*o,height:t.boundingBox.height*o}}if(t instanceof w.sK&&n&&t.opacity<1)return{opacity:t.opacity};if(t instanceof w.R1||t instanceof w.gd||t instanceof w.On||t instanceof w.Qi||t instanceof w.Ih||t instanceof w.sK||t instanceof w.GI)return{};(0,s.Rz)(t.constructor)}({annotation:this.state.renderedAnnotation||t,attachment:n,zoomLevel:i})),a?{opacity:t.opacity}:null),u=d()(Ge().wrapper,"PSPDFKit-APStream-Wrapper",{[Ge().loading]:this._shouldShowIndicators&&"LOADING"===this.state.loadingState&&this.state.showLoadingIndicator,[Ge().error]:this._shouldShowIndicators&&"ERROR"===this.state.loadingState}),p=d()(t instanceof w.GI&&Ge().stampAnnotation,t instanceof w.x_&&Ge().widgetAnnotation,"PSPDFKit-APStream"),f=t instanceof w.GI||t instanceof w.sK||t instanceof w.Ih||t instanceof w.x_&&o instanceof w.Yo?null:0;return c.createElement("figure",{style:l,className:u,"data-name":null==o?void 0:o.name},c.createElement(Ne.Z,{className:p,fetchImage:this._fetchImage,label:r,visible:!0,onRenderFinished:this._renderFinished,onError:this._showError,throttleTimeout:f,rectStyle:Xe,ref:this._imageFetcherRef}),"description"in t&&t.description&&c.createElement(q.TX,{tag:"figcaption"},t.description),this._shouldShowIndicators&&"LOADING"===this.state.loadingState&&this.state.showLoadingIndicator?c.createElement("div",{className:Ge().placeholder},Me||(Me=c.createElement(Le.Z,null))):this._shouldShowIndicators&&"ERROR"===this.state.loadingState?c.createElement("div",{className:Ge().placeholder},c.createElement(Re.Z,{src:ze(),className:Ge().errorIcon})):null)}}const $e={position:"relative",overflow:"hidden",margin:0,pointerEvents:"none",width:"100%",height:"100%"},Xe={pointerEvents:"none",width:"100%",height:"100%"};function Ye(e,t){return t.zoomLevel>e.zoomLevel||(0,_.AC)(e.annotation,t.annotation)||(0,_.TL)(e.formField,t.formField)||t.formField&&e.formField&&t.formField.formattedValue!==e.formField.formattedValue||!(0,Ze.BT)(t.formField,e.formField)||e.variant!==t.variant||e.isDigitallySigned!==t.isDigitallySigned}var Je=n(13944),Qe=n(24011),et=n.n(Qe);class tt extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"el",null),(0,o.Z)(this,"_innerRef",(e=>{this.el=e})),(0,o.Z)(this,"_handlePointerDown",(e=>{e.isPrimary&&this.props.isSelectable&&this._handlePress(e,"touch"!==e.pointerType?new w.E9({x:e.clientX,y:e.clientY}):null)})),(0,o.Z)(this,"_handlePress",((e,t)=>{this.props.dispatch((0,De.mg)(this.props.annotation,e,{selectedAnnotationShouldDrag:t,stopPropagation:!0}))})),(0,o.Z)(this,"_handleClick",(e=>{"keypress"===e.type&&this._handlePress(e,null)})),(0,o.Z)(this,"_handlePointerUp",(e=>{e.stopPropagation()})),(0,o.Z)(this,"_handleFocus",(e=>{const{onFocus:t,annotation:n}=this.props;n.locked||n.readOnly||(t&&t(n,e),this.props.dispatch((0,De.Q2)(n.id)))})),(0,o.Z)(this,"_handleBlur",(e=>{const{onBlur:t,annotation:n}=this.props;t&&t(n,e),this.props.dispatch((0,De.Oc)(n.id))}))}componentDidUpdate(){this.props.isFocused&&this.el&&this.el.focus()}render(){const{annotation:e,attachment:t,backend:n,onRenderFinished:o,zoomLevel:r,isSelectable:i,isDisabled:a,isDragging:s,intl:{formatMessage:l}}=this.props,{boundingBox:u,id:p}=e,f={cursor:(0,_.B7)(e,{isSelectable:i}),overflow:"hidden",width:u.width*r,height:u.height*r,display:"block",outline:this.props.isFocused?_.A8:null};return c.createElement(le.Reparent,{id:`annotation-image-${p}`},c.createElement(xe,{position:u.getLocation(),zoomLevel:r,isMultiAnnotationsSelected:this.props.isMultiAnnotationsSelected},c.createElement(Je.Z,{onPointerUp:this._handlePointerUp,onPointerEnter:()=>{this.props.dispatch((0,De.oX)(e.id))},onPointerLeave:()=>{this.props.dispatch((0,De.IP)(e.id))}},c.createElement(we.Z,{disabled:a,onPointerDown:this._handlePointerDown,onClick:this._handleClick,onFocus:this._handleFocus,onBlur:this._handleBlur,style:f,className:d()("PSPDFKit-Annotation PSPDFKit-Image-Annotation",{[et().readOnlyOutline]:e.readOnly||e.locked}),"data-annotation-id":e.id,"aria-label":`${l(ke.Z.annotation)}: ${l(ke.Z.imageAnnotation)}`,innerRef:this._innerRef},c.createElement(He,{annotation:e,attachment:t,backend:n,onRenderFinished:o,zoomLevel:r,label:l(ke.Z.imageAnnotation),isDragging:s,onError:this.props.onError})))))}}const nt=(0,Se.XN)(tt,{forwardRef:!0});var ot=n(4352),rt=n(97528),it=n(70994),at=n.n(it);function st(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?st(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):st(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class ct extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"precision",(0,ot.HB)(this.props.zoomLevel)),(0,o.Z)(this,"_handlePointerDown",(e=>{e.persist(),e.isPrimary&&(e.preventDefault(),this._handlePress(e,"touch"!==e.pointerType?new w.E9({x:e.clientX,y:e.clientY}):null))})),(0,o.Z)(this,"_handlePress",((e,t)=>{this.precision=(0,ot.HB)(this.props.zoomLevel),this.props.dispatch((0,De.mg)(this.props.annotation,e,{selectedAnnotationShouldDrag:t,stopPropagation:!0}))})),(0,o.Z)(this,"_handleClick",(e=>{"keypress"===e.type&&this._handlePress(e,null)})),(0,o.Z)(this,"_handleFocus",(e=>{const{onFocus:t,annotation:n}=this.props;t&&t(n,e)})),(0,o.Z)(this,"_handleBlur",(e=>{const{onBlur:t,annotation:n}=this.props;t&&t(n,e),this.props.dispatch((0,De.Oc)(n.id))})),(0,o.Z)(this,"_handlePointerUp",(e=>{e.stopPropagation()})),(0,o.Z)(this,"el",null),(0,o.Z)(this,"_innerRef",(e=>{this.el=e}))}componentDidUpdate(){this.props.isFocused&&this.el&&this.el.focus()}render(){const{annotation:e,intl:{formatMessage:t},isSelectable:n,pathDataFromFragments:o,backend:r,zoomLevel:i,isDragging:a=!1,shouldKeepRenderingAPStream:s=!1}=this.props,{boundingBox:l,blendMode:u}=e,p=l.grow(Ke.Ni?Be.wK:Be.XZ),f=(0,_.B7)(e,{isSelectable:n}),h=lt(lt({},p.toJS()),{},{cursor:f,outline:this.props.isFocused?_.A8:null}),m=u&&"normal"!==u?lt({mixBlendMode:(0,_.vk)(u)},Ke.G6?{transform:"translate3d(0,0,0)"}:null):{};return c.createElement("div",{style:m},c.createElement(xe,{zoomLevel:this.props.zoomLevel,applyZoom:!0,isMultiAnnotationsSelected:this.props.isMultiAnnotationsSelected},c.createElement(Je.Z,{onPointerEnter:()=>{this.props.dispatch((0,De.oX)(e.id))},onPointerLeave:()=>{this.props.dispatch((0,De.IP)(e.id))}},c.createElement(we.Z,{disabled:this.props.isDisabled,onClick:this._handleClick,onFocus:this._handleFocus,onBlur:this._handleBlur,onPointerUp:s?this._handlePointerUp:void 0,className:d()(at().container,{[at().cursorNotAllowed]:e.readOnly||e.locked},"PSPDFKit-Ink-Annotation PSPDFKit-Annotation"),style:h,"data-annotation-id":e.id,"aria-label":`${t(ke.Z.annotation)}: ${t(ke.Z.inkAnnotation)}`,innerRef:this._innerRef},c.createElement(dt,{annotation:e,onPointerDown:this._handlePointerDown,isSelectable:this.props.isSelectable,viewBox:p,pathDataFromFragments:o,renderInvisibleClickPath:s,precision:this.precision}),s&&r&&c.createElement(le.Reparent,{id:`annotation-ink-${e.id}`},c.createElement(He,{annotation:e,backend:r,zoomLevel:i,label:t(ke.Z.inkAnnotation),isDragging:a,onError:this.props.onError}))))))}}const ut=(0,Se.XN)(ct,{forwardRef:!0}),dt=function(e){let{annotation:t,isSelectable:n,viewBox:o,pathDataFromFragments:r=(()=>null),onPointerDown:a,renderInvisibleClickPath:s=!1,precision:l=(0,ot.HB)(1)}=e;const{ENABLE_INK_SMOOTH_LINES:u}=rt.Options,p=c.useMemo((()=>u?e=>(0,ot.vR)(e,l):ot.$U),[l,u]),f=c.useRef([]),h=c.useCallback(((e,n,o)=>r(t.id,n,o)||(0,ot.IQ)(e).map(p).flat()),[r,p,t]);f.current=c.useMemo((()=>{t.lines.size!==f.current.length&&(f.current=[]);const e=[];return t.lines.forEach((function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.aV)(),n=arguments.length>1?arguments[1]:void 0;e.push(h(t,n,f.current[n]))})),e}),[t,h]);const m=c.useMemo((()=>{const{strokeColor:e,lineWidth:o,lines:r}=t,i={stroke:(null==e?void 0:e.toCSSValue())||"transparent",strokeWidth:o,pointerEvents:"none"},l={strokeWidth:n?Math.max(Ke.Ni?Be.wK:Be.XZ,o):0},p=d()({[at().path]:!0,[at().selectable]:!t.readOnly&&!t.locked,"PSPDFKit-Smooth-Lines":u}),h=r.map(((e,t)=>{const o=(0,ot.u8)(f.current[t]);return c.createElement("g",{key:t},!s&&c.createElement("path",{className:p,style:i,d:o,"data-testid":"ink-path"}),n&&c.createElement("path",{onPointerDown:a,className:p,style:l,stroke:"transparent",d:o,"data-testid":"clickable-path"}))}));return c.createElement("g",null,h)}),[t,n,a,u,s]),g=c.useMemo((()=>{const{backgroundColor:e,boundingBox:n}=t,o=d()({[at().rect]:!0,[at().selectable]:!!e}),r={fill:(null==e?void 0:e.toCSSValue())||"transparent"},{width:i,height:s,top:l,left:u}=n;return c.createElement("rect",{onPointerDown:a,x:u,y:l,width:i,height:s,className:o,style:r})}),[a,t,s]),v=`${o.left} ${o.top} ${o.width} ${o.height}`,y={left:0,top:0,width:"100%",height:"100%",opacity:t.opacity,overflow:"hidden"};return c.createElement("svg",{viewBox:v,style:y,className:at().svg,focusable:!1,"data-testid":"ink-svg"},g,m)};var pt=n(17090),ft=n.n(pt),ht=n(89335);function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mt(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const vt=c.memo((function(e){const{annotation:t,isDisabled:n,onFocus:o,onBlur:r,annotation:{boundingBox:i},zoomLevel:a,isFocused:l,shouldKeepRenderingAPStream:u,dispatch:p,backend:f,isDragging:h=!1,isMultiAnnotationsSelected:m=!1}=e,{formatMessage:g}=(0,Se.YB)(),v=(0,c.useRef)(null),y=d()(ft().annotationRect,"PSPDFKit-Link-Annotation","PSPDFKit-Annotation"),{boundingBox:b,borderColor:w,borderStyle:S,borderWidth:P,opacity:E}=t,x=gt(gt({},b),{},{outline:l?_.A8:null}),D=(0,_.B7)(t),C={width:i.width*a,height:i.height*a,borderWidth:P||0,borderColor:w?w.toCSSValue():"transparent",borderStyle:S||(P&&w?"solid":""),opacity:E,cursor:D},k=c.useMemo((()=>function(e){var t;switch((null===(t=e.action)||void 0===t?void 0:t.constructor)||null){case ht.lm:{const t=e.action;return(0,s.kG)("string"==typeof t.uri,"URIAction requires `uri`"),{type:"a",props:{href:t.uri,"aria-label":t.uri}}}case ht.Di:{const t=e.action;(0,s.kG)("number"==typeof t.pageIndex,"GoToAction requires `pageIndex`");const n=`#page=${t.pageIndex}`;return{type:"a",props:{href:n,"aria-label":n}}}case ht.BO:{const t=e.action;return(0,s.kG)("boolean"==typeof t.includeExclude,"ResetFormAction requires `includeExclude`"),{type:"button",props:{type:"reset","aria-label":`Reset${t.fields?t.fields.join(" "):""}`}}}case ht.pl:{const t=e.action;return(0,s.kG)("string"==typeof t.uri,"ResetFormAction requires `uri`"),(0,s.kG)("boolean"==typeof t.includeExclude,"ResetFormAction requires `includeExclude`"),{type:"button",props:{type:"submit","aria-label":`Submit to ${t.uri}`}}}default:return{type:"div",props:{}}}}(t)),[t]),O=c.useCallback((function(e){o(t,e)}),[t,o]),A=c.useCallback((function(e){r(t,e)}),[t,r]);return c.createElement(xe,{position:i.getLocation(),zoomLevel:a,disablePointerEvents:!0,isMultiAnnotationsSelected:m},c.createElement(we.Z,{disabled:n,className:d()(`PSPDFKit-${t.constructor.readableName}-Annotation PSPDFKit-Annotation`),style:x,onClick:function(e){"keypress"===e.type&&function(e,n){(0,De.mg)(t,e,{selectedAnnotationShouldDrag:n,stopPropagation:!0})}(e,null)},onFocus:function(t){const{onFocus:n,annotation:o}=e;n&&n(o,t)},onBlur:function(t){const{onBlur:n,annotation:o}=e;n&&n(o,t),p((0,De.Oc)(o.id))},onPointerUp:u?function(e){e.stopPropagation()}:void 0,"data-annotation-id":t.id,"aria-label":"Link-annotation",innerRef:v,onMouseEnter:()=>{p((0,De.oX)(t.id))},onMouseLeave:()=>{p((0,De.IP)(t.id))}},c.createElement(k.type,(0,ue.Z)({},k.props,{className:y,style:C,onFocus:O,onBlur:A,"data-annotation-id":t.id,tabIndex:n?-1:0,"aria-disabled":n?"true":"false"})),u&&f&&c.createElement(le.Reparent,{id:`annotation-link-${t.id}`},c.createElement(He,{annotation:t,backend:f,zoomLevel:a,label:g(ke.Z.linkAnnotation),isDragging:h,onError:e.onError}))))}));const yt=vt;var bt=n(69939),wt=n(18025),St=n(72032),Pt=n.n(St);class Et extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"shouldComponentUpdate",Ce.O),(0,o.Z)(this,"el",null),(0,o.Z)(this,"_innerRef",(e=>{this.el=e})),(0,o.Z)(this,"onClick",(()=>{this.props.dispatch((0,bt.i0)()),window.setTimeout((()=>{this.props.dispatch((0,De.VR)(this.props.annotation.id))}),0)})),(0,o.Z)(this,"_onPointerDownUp",(e=>{e.isPrimary&&(this.props.isReadOnly||e.preventDefault(),this._handlePress(e,"touch"!==e.pointerType?new w.E9({x:e.clientX,y:e.clientY}):null),this.props.isOpen||this.props.dispatch((0,De.IP)(this.props.annotation.id)),e.stopPropagation())})),(0,o.Z)(this,"_handlePress",((e,t)=>{this.props.dispatch((0,De.mg)(this.props.annotation,e,{selectedAnnotationShouldDrag:t,stopPropagation:!0,ignoreReadOnly:!0}))})),(0,o.Z)(this,"_handleClick",(e=>{"keypress"===e.type&&this._handlePress(e,null)})),(0,o.Z)(this,"_onMouseEnter",(()=>{this.props.dispatch((0,De.oX)(this.props.annotation.id))})),(0,o.Z)(this,"_onMouseLeave",(()=>{this.props.dispatch((0,De.IP)(this.props.annotation.id))})),(0,o.Z)(this,"_onFocus",(e=>{this.props.annotation.locked||this.props.annotation.readOnly||(this.props.onFocus&&this.props.onFocus(this.props.annotation,e),this.props.dispatch((0,De.Q2)(this.props.annotation.id)))})),(0,o.Z)(this,"_onBlur",(e=>{this.props.onBlur&&this.props.onBlur(this.props.annotation,e),this.props.dispatch((0,De.Oc)(this.props.annotation.id))}))}componentDidUpdate(){this.props.isFocused&&this.el&&this.el.focus()}render(){const{intl:{formatMessage:e},backend:t,shouldKeepRenderingAPStream:o,isFocused:r,isSelectable:i}=this.props,a=!this.props.isOpen&&!this.props.isFullscreen&&!Ke.Ni,{annotation:s,zoomLevel:l,rotation:u}=this.props,{boundingBox:p,color:f,icon:h}=s,{width:m,height:g}=p,v=(0,_.B7)(s,{isSelectable:i}),y={width:m,height:g,transformOrigin:"top left",transform:`translate(${m*l/2-m/2}px, ${g*l/2-g/2}px)`,color:f.toCSSValue(),opacity:s.opacity,outline:r?_.A8:null,cursor:v},b=wt.Y4[h]||wt.Y4[wt.Zi.COMMENT],w=(0,I.Oe)(b);let S;try{S=n(91435)(`./${b}.svg`)}catch(e){}const P=this.props.isReadOnly?{onPointerUp:this._onPointerDownUp}:{onPointerDown:this._onPointerDownUp},E=d()({"PSPDFKit-Annotation":!0,"PSPDFKit-Note-Annotation":!0,[`PSPDFKit-Note-Annotation-Icon-${w}`]:!0,[Pt().annotation]:!0});return c.createElement(c.Fragment,null,c.createElement(xe,{position:p.getLocation(),zoomLevel:l,currentPagesRotation:u,noRotate:!0,isMultiAnnotationsSelected:this.props.isMultiAnnotationsSelected},c.createElement(we.Z,(0,ue.Z)({},P,{onClick:this._handleClick,onFocus:this._onFocus,onBlur:this._onBlur,disabled:this.props.isDisabled,style:y,className:E,onPointerEnter:a?this._onMouseEnter:void 0,onPointerLeave:a?this._onMouseLeave:void 0,"data-annotation-id":s.id,"aria-label":`${e(ke.Z.annotation)}: ${e(ke.Z.noteAnnotation)}`,"aria-controls":`NoteAnnotationContent-${s.id}`,innerRef:this._innerRef}),o?c.createElement(le.Reparent,{id:`annotation-note-${s.id}`},c.createElement(He,{annotation:s,zoomLevel:l,backend:t,label:e(ke.Z.noteAnnotation),onError:this.props.onError})):S?c.createElement(Re.Z,{src:S,className:Pt().icon,role:"presentation"}):b)),!this.props.isOpen&&c.createElement(q.TX,{id:`NoteAnnotationContent-${s.id}`}))}}const xt=(0,Se.XN)(Et,{forwardRef:!0});const Dt=(0,a.$j)((function(e,t){let{annotation:n}=t;return{annotation:n,isFullscreen:e.viewportState.viewportRect.width<=Be.j1,rotation:e.viewportState.pagesRotation,isOpen:e.selectedAnnotationIds.has(n.id)&&"number"==typeof n.pageIndex}}),null,null,{forwardRef:!0})(xt),Ct=Dt;var kt=n(34997),Ot=n(26467);const At=e=>{let{lineCap:t,style:n,id:o,position:r}=e;return c.createElement("marker",{id:o,style:n,markerWidth:"5",markerHeight:"5",refX:"start"===r?3.75:.5,refY:"2",orient:"auto"},Ot.O[t][`${r}Element`](n))};var Tt=n(29978),It=n.n(Tt);const Ft=e=>{let{isSelectable:t,onPointerDown:n,annotation:{strokeDashArray:o,strokeColor:r,strokeWidth:a,startPoint:s,endPoint:l,lineCaps:u,fillColor:p,pageIndex:f,id:h=(0,kt.SK)(),locked:m,readOnly:g},renderInvisibleClickPath:v=!1}=e;if(null===f||0===a&&!v)return null;const y={stroke:(null==r?void 0:r.toCSSValue())||"transparent",strokeWidth:a,fill:"transparent"},b=d()({[It().visible]:!0}),w=t?Ke.Ni?Math.max(Be.wK,a):Math.max(Be.XZ,a):0,S=d()({[It().selectable]:!g&&!m}),P={stroke:(null==r?void 0:r.toCSSValue())||"transparent",pointerEvents:"none",fill:(null==p?void 0:p.toCSSValue())||"transparent",strokeWidth:1},E=`${h}-StartLineCap`,x=`${h}-EndLineCap`,D=(0,L.CW)((0,i.aV)([s,l]),a,u||{}),C=D.first(),k=D.get(1),O={x1:void 0!==C?C.x:s.x,y1:void 0!==C?C.y:s.y,x2:void 0!==k?k.x:l.x,y2:void 0!==k?k.y:l.y},A=O.x1!==s.x||O.y1!==s.y,T=O.x2!==l.x||O.y2!==l.y,I=u&&A?`url(#${E})`:void 0,F=u&&T?`url(#${x})`:void 0;return c.createElement("g",{style:{strokeWidth:a}},(A||T)&&c.createElement("defs",null,u&&A&&u.start&&c.createElement(At,{style:P,lineCap:u.start,id:E,position:"start"}),u&&T&&u.end&&c.createElement(At,{style:P,lineCap:u.end,id:x,position:"end"})),!v&&c.createElement("line",{className:b,style:y,x1:O.x1,y1:O.y1,x2:O.x2,y2:O.y2,strokeDasharray:o?o.map((e=>e*a)).join(","):"",markerStart:I,markerEnd:F,strokeLinecap:"butt"}),t&&c.createElement("line",{onPointerDown:n,className:S,stroke:"transparent",style:{fill:"none",strokeWidth:w},x1:s.x,y1:s.y,x2:l.x,y2:l.y}))},Mt=e=>{let{isSelectable:t,onPointerDown:n,annotation:o,renderInvisibleClickPath:r=!1}=e;const{strokeDashArray:i,strokeColor:a,strokeWidth:s,fillColor:l,pageIndex:u,boundingBox:p,cloudyBorderIntensity:f,cloudyBorderInset:h}=o,m=Number(f);if(null===u||0===s&&!l&&!r)return null;const{width:g,height:v,top:y,left:b}=p,S={stroke:(null==a?void 0:a.toCSSValue())||"transparent",strokeWidth:s,fill:(null==l?void 0:l.toCSSValue())||"transparent"},P=d()({[It().visible]:!0,[It().cloudy]:!!m,[It().strokeDashArray]:!!i}),E=t?Ke.Ni?Math.max(Be.wK,s):Math.max(Be.XZ,s):0,x={fill:l&&!l.equals(w.Il.TRANSPARENT)?"transparent":"none",strokeWidth:E},D=d()({[It().selectable]:!o.readOnly&&!o.locked,[It().cloudy]:!!m}),C=g>s?g-s:g/4,k=v>s?v-s:v/4,O=i?i.map((e=>e*s)).join(","):"",A=m>0,T=A?_t(m,h,p):"";return c.createElement(c.Fragment,null,!r&&(A?c.createElement("path",{d:T,className:P,style:S,strokeDasharray:O}):c.createElement("rect",{className:P,style:S,strokeDasharray:O,x:b+s/2,y:y+s/2,width:C,height:k})),t&&(A?c.createElement("path",{onPointerDown:n,d:T,className:D,style:x,stroke:"transparent"}):c.createElement("rect",{onPointerDown:n,className:D,stroke:"transparent",style:x,x:b+s/2,y:y+s/2,width:C,height:k})))},_t=(e,t,n)=>{const{left:o,top:r,width:i,height:a}=t instanceof w.eB?w.eB.applyToRect(t,n):n;return(0,L.rr)({points:[[o,r],[o+i,r],[o+i,r+a],[o,r+a]],intensity:e})},Nt=e=>{let{isSelectable:t,onPointerDown:n,annotation:o,renderInvisibleClickPath:r=!1}=e;const{strokeDashArray:i,strokeColor:a,strokeWidth:s,fillColor:l,pageIndex:u,boundingBox:p,cloudyBorderIntensity:f,cloudyBorderInset:h}=o,m=Number(f);if(null===u||0===s&&!l&&!r)return null;const{width:g,height:v,top:y,left:b}=p,S={stroke:(null==a?void 0:a.toCSSValue())||"transparent",strokeWidth:s,fill:(null==l?void 0:l.toCSSValue())||"transparent"},P=d()({[It().visible]:!0,[It().cloudy]:!!m,[It().strokeDashArray]:!!i}),E=t?Ke.Ni?Math.max(Be.wK,s):Math.max(Be.XZ,s):0,x={fill:l&&!l.equals(w.Il.TRANSPARENT)?"transparent":"none",strokeWidth:E},D=d()({[It().selectable]:!o.readOnly&&!o.locked,[It().cloudy]:!!m}),C=g>2*s?(g-s)/2:g/4,k=v>2*s?(v-s)/2:v/4,O=i?i.map((e=>e*s)).join(","):"",A=m>0,T=A?(0,L.Hz)({boundingBox:p,cloudyBorderIntensity:m,cloudyBorderInset:h}):"";return c.createElement(c.Fragment,null,!r&&(A?c.createElement("path",{className:P,style:S,strokeDasharray:O,d:T}):c.createElement("ellipse",{className:P,style:S,strokeDasharray:O,cx:b+g/2,cy:y+v/2,rx:C,ry:k})),t&&(A?c.createElement("path",{onPointerDown:n,className:D,style:x,d:T,stroke:"transparent"}):c.createElement("ellipse",{onPointerDown:n,className:D,stroke:"transparent",style:x,cx:b+g/2,cy:y+v/2,rx:C,ry:k})))},Rt=e=>{let{isSelectable:t,onPointerDown:n,annotation:o,renderInvisibleClickPath:r=!1}=e;const{strokeDashArray:i,strokeColor:a,strokeWidth:s,fillColor:l,pageIndex:u,points:p,cloudyBorderIntensity:f}=o,h=Number(f);if(null===u||0===p.size||0===s&&(!l||l.equals(w.Il.TRANSPARENT))&&!r)return null;const m={stroke:a?a.toCSSValue():"transparent",strokeWidth:s,fill:(null==l?void 0:l.toCSSValue())||"transparent"},g=d()({[It().visible]:!0,[It().cloudy]:!!h,[It().strokeDashArray]:!!i}),v=t?Ke.Ni?Math.max(Be.wK,s):Math.max(Be.XZ,s):0,y={fill:l&&!l.equals(w.Il.TRANSPARENT)?"transparent":"none",strokeWidth:v},b=d()({[It().selectable]:!o.readOnly&&!o.locked,[It().cloudy]:!!h}),S=p.first();if(void 0===S)return null;const P=1===p.size||2===p.size?p.push(S):p,E=i?i.map((e=>e*s)).join(","):"",x=h>0&&P.size>2,D=x?Lt({annotation:o,intensity:h}):`${P.map((e=>`${e.x},${e.y}`)).join(" ")}`;return c.createElement(c.Fragment,null,!r&&(x?c.createElement("path",{className:g,style:m,strokeDasharray:E,d:D}):c.createElement("polygon",{className:g,style:m,strokeDasharray:E,points:D})),t&&(x?c.createElement("path",{onPointerDown:n,className:b,style:y,stroke:"transparent",d:D}):c.createElement("polygon",{onPointerDown:n,className:b,stroke:"transparent",style:y,points:D})))},Lt=e=>{let{intensity:t,annotation:n}=e;return(0,L.rr)({points:n.points.map((e=>[e.x,e.y])).toArray(),intensity:t})},Bt=e=>{let{isSelectable:t,onPointerDown:n,annotation:{strokeDashArray:o,strokeColor:r,strokeWidth:i,lineCaps:a,fillColor:s,pageIndex:l,points:u,id:p=(0,kt.SK)(),locked:f,readOnly:h},renderInvisibleClickPath:m=!1}=e;if(null===l||void 0===u||0===u.size||0===i&&!m)return null;const g=u.first(),v=u.last();if(!g||!v)return null;const y={stroke:(null==r?void 0:r.toCSSValue())||"transparent",strokeWidth:i,fill:"transparent"},b=d()({[It().visible]:!0}),w=t?Ke.Ni?Math.max(Be.wK,i):Math.max(Be.XZ,i):0,S=d()({[It().selectable]:!h&&!f}),P={stroke:(null==r?void 0:r.toCSSValue())||"transparent",pointerEvents:"none",fill:(null==s?void 0:s.toCSSValue())||"transparent",strokeWidth:1},E=`${p}-StartLineCap`,x=`${p}-EndLineCap`,D=1===u.size?` ${g.x},${g.y}`:"",C=(0,L.CW)(u,i,a||{}),k=C.first(),O=C.last();if(!k||!O)return null;const A=a&&(k.x!==g.x||k.y!==g.y),T=a&&(O.x!==v.x||O.y!==v.y),I=`${C.map((e=>`${e.x},${e.y}`)).join(" ")}${D}`,F=a&&A?`url(#${E})`:void 0,M=a&&T?`url(#${x})`:void 0;return c.createElement("g",{style:{strokeWidth:i}},(A||T)&&c.createElement("defs",null,a&&A&&a.start&&c.createElement(At,{style:P,lineCap:a.start,id:E,position:"start"}),a&&T&&a.end&&c.createElement(At,{style:P,lineCap:a.end,id:x,position:"end"})),!m&&c.createElement("polyline",{className:b,style:y,points:I,strokeDasharray:o?o.map((e=>e*i)).join(","):"",markerStart:F,markerEnd:M}),t&&c.createElement("polyline",{onPointerDown:n,className:S,stroke:"transparent",style:{fill:"none",strokeWidth:w},points:I}))},jt=e=>{const{annotation:t,viewBox:n,isSelectable:o,onPointerDown:r,renderInvisibleClickPath:i=!1}=e,a=`${n.left} ${n.top} ${n.width} ${n.height}`,s={left:0,top:0,width:"100%",height:"100%",opacity:t.opacity,overflow:"hidden"},l=(e=>{switch(e){case w.o9:return Ft;case w.b3:return Mt;case w.Xs:return Nt;case w.Hi:return Rt;case w.om:return Bt;default:throw new Error("Unexpected shape annotation type")}})(t.constructor);return c.createElement("svg",{viewBox:a,style:s,className:It().svg,focusable:!1},c.createElement(l,{isSelectable:o,onPointerDown:r,annotation:t,renderInvisibleClickPath:i}))};var zt=n(60840),Kt=n(63738);function Zt(e,t){return e.distance(t)>Be.c1}var Ut=n(44763),Vt=n(39583);function Gt(e){const{pageIndex:t,currentAnnotation:n,onAnnotationUpdate:o,keepSelectedTool:r,interactionMode:s,defaultAutoCloseThreshold:l,backend:u,disablePointSnapping:d}=e,p=c.useRef(null),f=(0,a.v9)((e=>e.eventEmitter)),h=(0,a.I0)(),[m,g]=c.useState(!1),[v,y]=c.useState(null),b=c.useMemo((()=>(0,L.sS)(n.constructor)),[n.constructor]),S=c.useCallback((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];h((0,bt.FG)(e)),t&&(h((0,Kt.Ce)()),h((0,De.Df)((0,i.l4)([e.id]),null)),h((0,bt.ZE)(e.id)),h((0,Ut.eO)(null)))}),[h]),P=c.useCallback((()=>{(n instanceof w.om||n instanceof w.Hi)&&S(n,!0)}),[n,S]),E=c.useCallback(((e,r)=>{var a,s;(0,Vt.mE)(u,n,d)&&u.configureSnapper(t);let l=n;const c={annotations:(0,i.aV)([l]),reason:Q.f.DRAW_START};f.emit("annotations.willChange",c);const m=new w.E9({x:e.x,y:e.y});if(l instanceof w.o9)l=l.merge({startPoint:m,endPoint:m});else if(l instanceof w.b3||l instanceof w.Xs){p.current=m;const e=l.cloudyBorderIntensity*Be.St+l.strokeWidth/2;l=l.merge({boundingBox:new w.UL({left:m.x,top:m.y,width:0,height:0}),cloudyBorderInset:l.cloudyBorderIntensity?l.cloudyBorderInset||w.eB.fromValue(e):null})}else if(l instanceof $.Z){p.current=m;const e=new w.UL({left:m.x,top:m.y,width:0,height:0});l=l.merge({boundingBox:e,rects:(0,i.aV)([e])})}else(l instanceof w.Hi||l instanceof w.om)&&(l=l.update("points",(e=>e.push(m))));l=l.set("boundingBox",b(l));const g=l.pageIndex;if(null===g)l=l.set("pageIndex",t);else if(g!==t){l=l.set("pageIndex",t);const e=l instanceof $.Z?bt.hj:bt.hX;h(e(l,t))}l instanceof w.Xs||!("isMeasurement"in l)||null===(a=(s=l).isMeasurement)||void 0===a||!a.call(s)||h((0,Ut.eO)({magnifierLabel:l.getMeasurementDetails().label,drawnAnnotationID:l.id,drawnAnnotationPageIndex:l.pageIndex,magnifierCursorPosition:r})),o(l)}),[n,h,f,t,o,b]),x=c.useCallback((async(e,t)=>{var r,a;let s=n,c=e[e.length-1];const f=t[t.length-1];if((0,Vt.mE)(u,s,d)){const e=await u.getClosestSnapPoint(new w.E9({x:c.x,y:c.y}));c=c.set("x",e.x).set("y",e.y)}const P=new w.E9({x:c.x,y:c.y});if(s instanceof w.o9)s=s.set("endPoint",P);else if(s instanceof w.b3||s instanceof w.Xs){(0,Pe.k)(null!=p.current);const e=p.current,t=new w.UL({left:Math.min(e.x,P.x),top:Math.min(e.y,P.y),width:Math.abs(P.x-e.x),height:Math.abs(P.y-e.y)});s=s.merge({boundingBox:t})}else if(s instanceof $.Z){(0,Pe.k)(null!=p.current);const e=p.current,t=new w.UL({left:Math.min(e.x,P.x),top:Math.min(e.y,P.y),width:Math.abs(P.x-e.x),height:Math.abs(P.y-e.y)});s=s.merge({boundingBox:t,rects:(0,i.aV)([t])})}else if(s instanceof w.Hi||s instanceof w.om){const e=s.points.size-1;if(v&&Zt(v,P))g(!1),y(null);else if(!m){const t=(0,Vt.KM)(s,e,l),n=-1!==t;s=Wt(s,P,n,t),n&&(S(s),g(!0),y(s.points.get(e)))}s.isMeasurement()&&"isMeasurement"in s&&h((0,Ut.eO)({magnifierLabel:s.getMeasurementDetails().label,drawnAnnotationID:s.id,drawnAnnotationPageIndex:s.pageIndex,magnifierCursorPosition:f}))}s=s.set("boundingBox",b(s)),o(s),s instanceof w.Xs||s instanceof w.om||s instanceof w.Hi||!("isMeasurement"in s)||null===(r=(a=s).isMeasurement)||void 0===r||!r.call(a)||h((0,Ut.eO)({magnifierLabel:s.getMeasurementDetails().label,magnifierCursorPosition:t[t.length-1]}))}),[n,b,o,v,m,l,S,h]),D=c.useCallback((()=>{var e,t;let a=n;const{left:c,top:u,width:d,height:p}=a.boundingBox,m={annotations:(0,i.aV)([a]),reason:Q.f.DRAW_END};if(f.emit("annotations.willChange",m),a instanceof w.Xs||!("isMeasurement"in a)||null===(e=(t=a).isMeasurement)||void 0===e||!e.call(t)||h((0,Ut.eO)(null)),a instanceof w.o9)Zt(a.startPoint,a.endPoint)?(h((0,bt.FG)(a)),h((0,Kt.Ce)()),h((0,De.Df)((0,i.l4)([a.id]),null)),h((0,bt.ZE)(a.id)),r&&h((0,Kt.yg)(a.constructor,s))):(a=a.merge({startPoint:new w.E9,endPoint:new w.E9,boundingBox:new w.UL}),o(a));else if(a instanceof w.b3||a instanceof w.Xs||a instanceof $.Z)if(Zt(new w.E9({x:c,y:u}),new w.E9({x:c+d,y:u+p})))h((0,bt.FG)(a)),h((0,De.Df)((0,i.l4)([a.id]),null)),a instanceof $.Z||h((0,Kt.Ce)()),h((0,bt.ZE)(a.id)),a instanceof $.Z&&r&&h((0,Kt.t)()),r&&a instanceof w.UX&&h((0,Kt.yg)(a.constructor,s));else{const e=new w.UL;a=a instanceof $.Z?a.merge({boundingBox:e,rects:(0,i.aV)([e])}):a.merge({boundingBox:e}),o(a)}else if(a instanceof w.Hi||a instanceof w.om){const e=a.points.size-1,t=(0,Vt.KM)(a,e,l),n=-1!==t,o=Wt(a,a.points.last(),n,t);n?S(o):h((0,bt.FG)(o))}else h((0,bt.FG)(a))}),[n,o,h,f,r,s]),C=(0,a.v9)((e=>(0,H.zi)(e,t))),k=c.useCallback((e=>e.apply(C)),[C]);return c.createElement(zt.Z,{size:e.pageSize,onDrawStart:E,onDrawCoalesced:x,onDrawEnd:D,transformPoint:k,interactionMode:s,scrollElement:e.scrollElement,onDoubleClick:P,currentAnnotation:n,defaultAutoCloseThreshold:l,dispatch:h})}const Wt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3?arguments[3]:void 0;if(n){var r;const t=null===(r=e.get("points"))||void 0===r?void 0:r.get(o);return e.update("points",(e=>e.set(e.size-1,t)))}return e.update("points",(e=>e.set(e.size-1,t)))};function qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Ht(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qt(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $t(e){return{calculateBoundingBox:(0,L.sS)(e.shapeAnnotation.constructor),currentShapeAnnotation:e.shapeAnnotation,shapeAnnotationFromCurrentProps:e.shapeAnnotation}}class Xt extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"state",Ht({isDrawing:!1},$t(this.props))),(0,o.Z)(this,"_handleAnnotationUpdate",(e=>{this.setState({currentShapeAnnotation:e,isDrawing:!0})}))}static getDerivedStateFromProps(e,t){return(0,i.is)(t.shapeAnnotationFromCurrentProps,e.shapeAnnotation)||(0,i.is)(t.currentShapeAnnotation,e.shapeAnnotation)?null:$t(e)}componentDidMount(){this.props.dispatch((0,Kt.X2)())}componentWillUnmount(){this.props.dispatch((0,Kt.Zg)())}render(){const e=this.state.currentShapeAnnotation,{pageSize:t,viewportState:{zoomLevel:n}}=this.props,{boundingBox:o}=e,r=d()({[It().canvas]:!0});return c.createElement("div",{className:r},c.createElement(xe,{zoomLevel:n,applyZoom:!0},e.isMeasurement()&&this.state.isDrawing?c.createElement("div",{className:"PSPDFKit-Measurement-Label",style:(0,k.KI)(e)},c.createElement(Jt,{value:e.getMeasurementDetails().label})):null,c.createElement("div",{style:Ht(Ht({},o.toJS()),{},{position:"absolute"})},c.createElement(jt,{isSelectable:!1,annotation:e,viewBox:o}))),c.createElement(Gt,{pageSize:t,pageIndex:this.props.pageIndex,currentAnnotation:e,onAnnotationUpdate:this._handleAnnotationUpdate,keepSelectedTool:this.props.keepSelectedTool,interactionMode:this.props.interactionMode,scrollElement:this.props.scrollElement,defaultAutoCloseThreshold:this.props.defaultAutoCloseThreshold,backend:this.props.backend,disablePointSnapping:this.props.disablePointSnapping}))}}const Yt=(0,a.$j)(((e,t)=>{let{pageIndex:n}=t;return{viewportState:e.viewportState,clientToPageTransformation:(0,H.zi)(e,n),eventEmitter:e.eventEmitter,keepSelectedTool:e.keepSelectedTool,interactionMode:e.interactionMode,scrollElement:e.scrollElement,defaultAutoCloseThreshold:e.defaultAutoCloseThreshold}}))(Xt),Jt=e=>{let{value:t,isSecondaryMeasurement:n}=e;if(n&&t.includes("/")){const e=t.split("/");return c.createElement("span",null,"  (",c.createElement("span",null,e[0],c.createElement(c.Fragment,null,""),e[1]),")")}if(n&&!t.includes("/"))return c.createElement("span",null,"  (",c.createElement("span",null,t),")");if(!n&&t.includes("/")){const e=t.split("/");return c.createElement("span",null,e[0],c.createElement(c.Fragment,null,""),e[1],";")}return c.createElement("span",null,t)};function Qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function en(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qt(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class tn extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"handlePointerDown",(e=>{e.isPrimary&&this.props.isSelectable&&(e.preventDefault(),this.handlePress(e,"touch"!==e.pointerType?new w.E9({x:e.clientX,y:e.clientY}):null))})),(0,o.Z)(this,"handlePress",((e,t)=>{this.props.dispatch((0,De.mg)(this.props.annotation,e,{selectedAnnotationShouldDrag:t,stopPropagation:!0}))})),(0,o.Z)(this,"handleClick",(e=>{"keypress"===e.type&&this.handlePress(e,null)})),(0,o.Z)(this,"handleFocus",(e=>{const{onFocus:t,annotation:n}=this.props;n.readOnly||n.locked||(t&&t(n,e),this.props.dispatch((0,De.Q2)(this.props.annotation.id)))})),(0,o.Z)(this,"handleBlur",(e=>{const{onBlur:t,annotation:n}=this.props;t&&t(n,e),this.props.dispatch((0,De.Oc)(n.id))})),(0,o.Z)(this,"handlePointerUp",(e=>{e.stopPropagation()})),(0,o.Z)(this,"el",null),(0,o.Z)(this,"innerRef",(e=>{this.el=e}))}componentDidUpdate(){this.props.isFocused&&this.el&&this.el.focus()}render(){const{annotation:e,intl:{formatMessage:t},zoomLevel:n,backend:o,isDragging:r,shouldKeepRenderingAPStream:i}=this.props,{boundingBox:a}=e;let s;s=!!((0,k.S6)(e)&&!e.measurementBBox&&(a.width<100||a.height<100)||e.isMeasurement()&&!i);const l=a.grow(Ke.Ni?Be.wK:Be.XZ),u=l.toJS(),p=(0,_.B7)(e),f=en(en({},u),{},{outline:this.props.isFocused?_.A8:null,cursor:p}),h=e.constructor.readableName,m=h&&ke.Z[`${h.charAt(0).toLowerCase()+h.slice(1)}Annotation`],g=(0,_.vk)(e.blendMode),v=g?{mixBlendMode:g}:{},y=e.isMeasurement()&&this.props.secondaryMeasurementUnit&&(0,k.Rw)(e,this.props.secondaryMeasurementUnit);return c.createElement(xe,{zoomLevel:n,additionalStyle:v,applyZoom:!0,isMultiAnnotationsSelected:this.props.isMultiAnnotationsSelected},e.isMeasurement()&&s&&c.createElement("div",{className:"PSPDFKit-Measurement-Label",style:(0,k.KI)(e,!!y)},c.createElement(Jt,{value:e.getMeasurementDetails().label}),y?c.createElement(Jt,{value:y.label,isSecondaryMeasurement:!0}):null),c.createElement(Je.Z,{onPointerEnter:()=>{this.props.dispatch((0,De.oX)(e.id))},onPointerLeave:()=>{this.props.dispatch((0,De.IP)(e.id))}},c.createElement(we.Z,{disabled:this.props.isDisabled,className:d()(It().container,`PSPDFKit-${nn(e)}-Annotation`,"PSPDFKit-Shape-Annotation","PSPDFKit-Annotation",{[It().cursorNotAllowed]:e.readOnly||e.locked}),style:f,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onPointerUp:i?this.handlePointerUp:void 0,"data-annotation-id":e.id,"aria-label":`${t(ke.Z.annotation)}${h&&m?`: ${t(m)}`:""}`,innerRef:this.innerRef},c.createElement(jt,{annotation:e,onPointerDown:this.handlePointerDown,isSelectable:this.props.isSelectable,viewBox:l,renderInvisibleClickPath:i}),i&&c.createElement(le.Reparent,{id:`annotation-shape-${e.id}`},c.createElement(He,{annotation:e,zoomLevel:n,backend:o,label:t(h&&m?m:ke.Z.annotation),isDragging:r,onError:this.props.onError})))))}}function nn(e){const t=e.constructor.readableName;return e.isMeasurement()?"Line"===t?"Distance":"Polyline"===t?"Perimeter":"Polygon"===t?"Polygon-Area":"Rectangle"===t?"Rectangle-Area":"Ellipse"===t?"Ellipse-Area":void 0:t}const on=(0,Se.XN)(tn,{forwardRef:!0});function rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}class an extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"_handlePointerDown",(e=>{e.isPrimary&&this.props.isSelectable&&this._handlePress(e,"touch"!==e.pointerType?new w.E9({x:e.clientX,y:e.clientY}):null)})),(0,o.Z)(this,"_handlePress",((e,t)=>{this.props.dispatch((0,De.mg)(this.props.annotation,e,{selectedAnnotationShouldDrag:t,stopPropagation:!0}))})),(0,o.Z)(this,"_handleClick",(e=>{"keypress"===e.type&&this._handlePress(e,null)})),(0,o.Z)(this,"_handlePointerUp",(e=>{e.stopPropagation()})),(0,o.Z)(this,"_handleFocus",(e=>{const{onFocus:t,annotation:n}=this.props;n.locked||n.readOnly||(t&&t(n,e),this.props.dispatch((0,De.Q2)(this.props.annotation.id)))})),(0,o.Z)(this,"_handleBlur",(e=>{const{onBlur:t,annotation:n}=this.props;t&&t(n,e),this.props.dispatch((0,De.Oc)(n.id))})),(0,o.Z)(this,"el",null),(0,o.Z)(this,"_innerRef",(e=>{this.el=e}))}componentDidUpdate(){this.props.isFocused&&this.el&&this.el.focus()}render(){const{annotation:e,globalAnnotation:t,onRenderFinished:n,zoomLevel:r,backend:i,isSelectable:a,isDisabled:s,isDragging:l,cursor:u,intl:{formatMessage:p},isFocused:f}=this.props,{boundingBox:h,id:m}=e,g=h.width*r,v=h.height*r,y=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rn(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({cursor:(0,_.B7)(e,{isSelectable:a,cursor:u}),overflow:"hidden",width:g,height:v,display:"block",outline:f?_.A8:null,outlineOffset:f?"10px":null},(0,Ue.kv)(e)?{transformOrigin:"50% 50%",transform:`rotate(${String(-e.rotation)}deg)`}:null),b="STANDALONE"===i.type&&"number"!=typeof e.pdfObjectId,w=b?t.set("id",null):t;return c.createElement(le.Reparent,{id:`annotation-stamp-${m}`},c.createElement(xe,{position:h.getLocation(),zoomLevel:r,isMultiAnnotationsSelected:this.props.isMultiAnnotationsSelected},c.createElement(Je.Z,{onPointerUp:this._handlePointerUp,onPointerEnter:()=>{this.props.dispatch((0,De.oX)(e.id))},onPointerLeave:()=>{this.props.dispatch((0,De.IP)(e.id))}},c.createElement(we.Z,{disabled:s,onPointerDown:this._handlePointerDown,onClick:this._handleClick,onFocus:this._handleFocus,onBlur:this._handleBlur,style:y,className:d()("PSPDFKit-Annotation PSPDFKit-Stamp-Annotation",{[et().readOnlyOutline]:e.readOnly||e.locked}),"data-annotation-id":e.id,"aria-label":`${p(ke.Z.annotation)}: ${p(ke.Z.stampAnnotation)}`,innerRef:this._innerRef},c.createElement(He,{annotation:w,zoomLevel:r,backend:i,onRenderFinished:n,label:p(ke.Z.stampAnnotation),isDragging:l,isDetachedAnnotation:b,onError:this.props.onError})))))}}const sn=(0,Se.XN)(an,{forwardRef:!0});var ln=n(27856),cn=n.n(ln),un=n(78233),dn=n(3119),pn=n.n(dn),fn=n(45071),hn=n(30360);function mn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}const gn=c.forwardRef(((e,t)=>{var n;let{annotation:{callout:r,borderWidth:i,borderStyle:l,boundingBox:u,borderColor:d,id:p,backgroundColor:f,verticalAlign:h,fontSize:m,font:g},annotation:v,children:y,isEditing:b}=e;const w=(0,a.I0)(),S=c.useRef(null),P=(0,a.v9)((e=>e.viewportState.zoomLevel));(0,s.kG)(r,"CalloutTextComponent: callout is undefined");const E=(0,c.useRef)(!0);(0,fn.useGranularLayoutEffect)((()=>{if(E.current)E.current=!1;else{var e;const t=null===(e=S.current)||void 0===e?void 0:e.getBoundingClientRect();if(!t)return;const n=(0,hn.Vq)({annotation:v,rect:t,zoomLevel:P,callout:v.callout,text:v.text});n&&w((0,bt.FG)(n))}}),[m,g],[v,P]);const x=null===(n=r.innerRectInset)||void 0===n?void 0:n.setScale(P),D=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mn(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({position:"absolute",borderWidth:i||void 0,borderStyle:l||void 0,borderColor:(null==d?void 0:d.toCSSValue())||void 0,backgroundColor:(null==f?void 0:f.toCSSValue())||void 0,left:null==x?void 0:x.left,top:null==x?void 0:x.top,right:null==x?void 0:x.right,bottom:null==x?void 0:x.bottom,padding:"4px 8px 4px 0"},b&&{right:void 0,width:"max-content",bottom:void 0,height:"auto",outline:"1px solid rgba(60, 151, 254, 0.5)",outlineOffset:2}),C=`${p}-calloutLinecapId`,k=u.scale(P),O={stroke:(null==d?void 0:d.toCSSValue())||"black",pointerEvents:"none",strokeWidth:1,fill:"transparent"},A=[r.start,r.knee,r.end].filter(Boolean).map((e=>{(0,s.kG)(e,"CalloutTextComponent: point is undefined");const{x:t,y:n}=function(e,t,n){return{x:(e.x-t.left)*n,y:(e.y-t.top)*n}}(e,u,P);return`${t},${n}`})).join(" ");return c.createElement(c.Fragment,null,c.createElement("svg",{style:{position:"absolute",inset:0},width:k.width,height:k.height,stroke:null==d?void 0:d.toCSSValue(),viewBox:`0 0 ${k.width} ${k.height}`},c.createElement("g",null,r.cap&&c.createElement("defs",null,c.createElement(At,{lineCap:r.cap,style:O,id:C,position:"start"})),c.createElement("polyline",{fill:"none",points:A,stroke:(null==d?void 0:d.toCSSValue())||"black",strokeWidth:i||void 0,markerStart:`url(#${C})`}))),c.createElement("div",{style:D,ref:t,className:"Callout"},c.createElement("div",{style:{verticalAlign:"center"===h?"middle":h,display:"inline-block"},ref:S},y)))}));const vn=["backgroundColor"];function yn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function bn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yn(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class wn extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"shouldComponentUpdate",Ce.O),(0,o.Z)(this,"el",null),(0,o.Z)(this,"_innerRef",(e=>{this.el=e})),(0,o.Z)(this,"onClick",(e=>{if("function"==typeof this.props.onClick){if(this.props.annotation.lockedContents)return;this.props.onClick(e)}window.setTimeout((()=>{this.props.dispatch((0,De.VR)(this.props.annotation.id))}),0)})),(0,o.Z)(this,"_handlePointerDown",(e=>{e.isPrimary&&this.props.isSelectable&&(e.preventDefault(),this._handlePress(e,"touch"!==e.pointerType?new w.E9({x:e.clientX,y:e.clientY}):null))})),(0,o.Z)(this,"_handlePress",((e,t)=>{"function"==typeof this.props.onClick||this.props.annotation.locked?this.onClick(e):this.props.dispatch((0,De.mg)(this.props.annotation,e,{selectedAnnotationShouldDrag:t,stopPropagation:!0}))})),(0,o.Z)(this,"_handleClick",(e=>{"keypress"===e.type&&this._handlePress(e,null)})),(0,o.Z)(this,"_handleFocus",(e=>{const{onFocus:t,annotation:n}=this.props;n.readOnly||(t&&t(n,e),this.props.dispatch((0,De.Q2)(this.props.annotation.id)))})),(0,o.Z)(this,"_handleBlur",(e=>{const{onBlur:t,annotation:n}=this.props;t&&t(n,e),this.props.dispatch((0,De.Oc)(n.id))})),(0,o.Z)(this,"_handlePointerUp",(e=>{e.stopPropagation()}))}componentDidUpdate(){this.props.isFocused&&this.el&&this.el.focus()}render(){const{annotation:{boundingBox:e},annotation:t,globalAnnotation:n,zoomLevel:o,isDisabled:r,isSelectable:i,intl:{formatMessage:a},backend:s,isDragging:l,cursor:u,shouldKeepRenderingAPStream:p,isFocused:f,isMultiAnnotationsSelected:h}=this.props,m=(0,_.B7)(t,{isSelectable:i,cursor:u});l||(this._lastFittingFontSizeAnnotation=(0,un.MF)(t,o));const g=bn(bn({},(0,un.z1)(t.isFitting?this._lastFittingFontSizeAnnotation:t,o,p)),{},{cursor:m,outline:f?_.A8:null,outlineOffset:f?"10px":null},(0,Ue.kv)(t)&&p?{transformOrigin:"50% 50%",transform:`rotate(${String(-t.rotation)}deg)`}:null),{backgroundColor:v}=g,y=(0,ne.Z)(g,vn),b="xhtml"===t.text.format;let w;var S,P;p||(w=b?c.createElement("div",{dangerouslySetInnerHTML:{__html:null===(S=t.text)||void 0===S?void 0:S.value}}):cn().sanitize((0,un.hr)(null===(P=t.text)||void 0===P?void 0:P.value)),b&&(y.color=void 0));return c.createElement(xe,{position:e.getLocation(),zoomLevel:o,isMultiAnnotationsSelected:h},c.createElement(Je.Z,{onPointerUp:p?this._handlePointerUp:void 0,onPointerEnter:()=>{this.props.dispatch((0,De.oX)(t.id))},onPointerLeave:()=>{this.props.dispatch((0,De.IP)(t.id))}},c.createElement(we.Z,{disabled:r,onPointerDown:this._handlePointerDown,onClick:this._handleClick,onFocus:this._handleFocus,onBlur:this._handleBlur,style:bn(bn({},y),{},{backgroundColor:(0,_.Vc)(t)?void 0:v}),className:d()(pn().annotation,{[pn().readOnlyOutline]:t.readOnly||t.locked},"PSPDFKit-Text-Annotation PSPDFKit-Annotation"),"data-annotation-id":t.id,"aria-label":`${a(ke.Z.annotation)}: ${a(ke.Z.textAnnotation)}`,innerRef:this._innerRef},p?c.createElement(le.Reparent,{id:`annotation-text-${t.id}`},c.createElement(He,{annotation:n,zoomLevel:o,backend:s,label:a(ke.Z.textAnnotation),isDragging:l,onError:this.props.onError})):t.callout?c.createElement(gn,{annotation:t},w):w)))}}const Sn=(0,Se.XN)(wn,{forwardRef:!0});var Pn=n(54670),En=n(20276),xn=n(92135),Dn=n.n(xn);function Cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function kn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cn(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function On(e){const{annotation:t,previewRedactionMode:n,zoomLevel:o,isSelectable:r}=e,{boundingBox:i}=t,[a,s]=c.useState(0),l=10*o,u=Math.round(1.75*o),p=Math.floor(Math.floor(l)+u);c.useLayoutEffect((()=>{if(n&&t.overlayText&&t.repeatOverlayText){const e=new Pn.default(`${l}px Helvetica, sans-serif`),{width:n}=e.measureText(t.overlayText);s(n),e.clean()}}),[n,t.overlayText,t.repeatOverlayText,l,s]);const f=c.useMemo((()=>t.overlayText&&!t.repeatOverlayText?t.rects.sortBy({0:e=>[e.top,e.left],90:e=>[e.left,-e.top],180:e=>[-e.top,-e.left],270:e=>[-e.left,e.top]}[t.rotation||"0"],Ce.b).first():null),[t.overlayText,t.repeatOverlayText,t.rects,t.rotation]),h=t.rects.map(((e,s)=>{const u=e.scale(o),{overlayText:h,textHeight:m}=function(e,t,n,o,r,i){let a=e.overlayText,s=o;if(t&&a&&e.repeatOverlayText&&n){const e=i.width/n,t=Math.max(1,Math.floor(i.height/o)),l=Math.ceil(e*t);s=o*t,s+r<=i.height&&(s+=r),a=a.repeat(l)}return{overlayText:a,textHeight:s}}(t,n,a,p,l,u),g={fontSize:l,lineHeight:`${p}px`,height:t.repeatOverlayText?m:"100%"};if((0,Ue.kv)(t)){const e=90===t.rotation||270===t.rotation;g.transformOrigin="50% 50%",g.transform=(e?`translate(${Math.round(u.width/2-u.height/2)}px, ${-Math.round(u.width/2-u.height/2)}px) `:"")+`rotate(${String(-t.rotation)}deg)`,e&&(g.width=u.height,g.height=u.width)}const v=(0,_.B7)(t,{isSelectable:r}),y={top:(e.top-i.top)*o,left:(e.left-i.left)*o,width:u.width,height:u.height,cursor:v,backgroundColor:n?"white":void 0},b={width:u.width,height:u.height},S=kn(kn({},b),{},{border:t.outlineColor instanceof w.Il?`2px solid ${t.outlineColor.toCSSValue()}`:void 0,opacity:t.opacity}),P=kn(kn({},b),{},{border:0,color:t.color instanceof w.Il?t.color.toCSSValue():void 0,backgroundColor:t.fillColor instanceof w.Il?t.fillColor.toCSSValue():"black",opacity:t.opacity}),E=d()({[Dn().textContainer]:!0,[Dn().selectable]:!0});return c.createElement("div",{key:s,className:Dn().rectContainer,style:y},c.createElement("div",{className:E,style:n?P:S},n&&(t.repeatOverlayText||e.equals(f))&&c.createElement("span",{className:Dn().textSpan,style:g},h)))}));return c.createElement(c.Fragment,null,h)}const An=function(e){const{isSelectable:t,dispatch:n,annotation:o,zoomLevel:r,onFocus:i,onBlur:s,active:l,isDisabled:u,isMultiAnnotationsSelected:p}=e,{boundingBox:f}=o,h=c.useRef(l),m=c.useCallback((e=>{n((0,De.mg)(o,e))}),[n,o]),g=c.useCallback((e=>{i&&i(o,e)}),[i,o]),v=c.useCallback((e=>{s&&s(o,e)}),[s,o]),y=c.useRef(null),b=(0,a.v9)((e=>e.previewRedactionMode));c.useEffect((()=>{y.current&&y.current.ownerDocument.activeElement!==y.current&&(!h.current&&l?y.current.focus():h.current&&!l&&u&&v((0,En.M)("blur"))),h.current=l}),[l,v,u]);const w={width:f.width*r,height:f.height*r,cursor:t?"pointer":"auto"};return c.createElement(xe,{zoomLevel:e.zoomLevel,position:f.getLocation(),className:Dn().wrapper,disablePointerEvents:!0,isMultiAnnotationsSelected:p},c.createElement(Je.Z,{onPointerEnter:()=>{e.dispatch((0,De.oX)(o.id))},onPointerLeave:()=>{e.dispatch((0,De.IP)(o.id))}},c.createElement(we.Z,{is:"div",disabled:Boolean(e.isDisabled),className:d()(Dn().container,"PSPDFKit-Redaction-Annotation PSPDFKit-Annotation",l&&!e.isDisabled&&"PSPDFKit-Annotation-Selected",l&&!e.isDisabled&&"PSPDFKit-Redaction-Annotation-Selected"),style:w,"data-annotation-id":o.id,onClick:m,onFocus:g,onBlur:v,innerRef:y},e.active?c.createElement("div",{className:Dn().active}):null,c.createElement(On,{annotation:o,previewRedactionMode:b,isSelectable:t,zoomLevel:r}))))};var Tn,In=n(65642),Fn=n.n(In);class Mn extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"shouldComponentUpdate",Ce.O)}render(){const{color:e,markupStyle:t,zoomLevel:n,pageRotation:o}=this.props,r=(0,kt.SK)(),i=0!==o?{transform:`rotate(${90*o}deg)`}:{};return c.createElement("svg",{className:Fn().markup,style:t,focusable:!1},c.createElement("defs",null,c.createElement("pattern",{id:r,width:"8",height:"3",patternUnits:"userSpaceOnUse",fill:e instanceof w.Il?e.toCSSValue():"transparent",style:i},Tn||(Tn=c.createElement("path",{d:"M8 2.9C7.2 2.9 6.7 2.3 6.5 1.9 6.2 1.5 6.1 1.4 6 1.4 5.9 1.4 5.8 1.5 5.5 1.9 5.3 2.3 4.8 2.9 4 2.9 3.2 2.9 2.7 2.3 2.5 1.9 2.2 1.5 2.1 1.4 2 1.4 1.9 1.4 1.8 1.5 1.5 1.9 1.3 2.3 0.8 2.9 0 2.9L0 1.6C0.1 1.6 0.2 1.5 0.5 1.1 0.7 0.7 1.2 0.1 2 0.1 2.8 0.1 3.3 0.7 3.5 1.1 3.8 1.5 3.9 1.6 4 1.6 4.1 1.6 4.2 1.5 4.5 1.1 4.7 0.7 5.2 0.1 6 0.1 6.8 0.1 7.3 0.7 7.5 1.1 7.8 1.5 7.9 1.6 8 1.6L8 2.9 8 2.9Z"})))),c.createElement("rect",{fill:`url(#${r})`,width:"100%",height:"100%",transform:`scale(${n<1?`1, ${n}`:`${n}`})`}))}}function _n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Nn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_n(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_n(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class Rn extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"shouldComponentUpdate",Ce.O),(0,o.Z)(this,"el",null),(0,o.Z)(this,"_innerRef",(e=>{this.el=e})),(0,o.Z)(this,"_handlePress",(e=>{this.props.dispatch((0,De.mg)(this.props.annotation,e))})),(0,o.Z)(this,"_handleFocus",(e=>{const{onFocus:t,annotation:n}=this.props;t&&t(n,e)})),(0,o.Z)(this,"_handleBlur",(e=>{const{onBlur:t,annotation:n}=this.props;t&&t(n,e),this.props.dispatch((0,De.Oc)(n.id))})),(0,o.Z)(this,"_handleCommentIconPress",(e=>{this._handlePress(e),e.stopPropagation()}))}componentDidUpdate(e){this.el&&this.el.ownerDocument.activeElement!==this.el&&(this.props.isFocused&&this.el&&this.el.focus(),!e.active&&this.props.active?this.el.focus():e.active&&!this.props.active&&this.props.isDisabled&&this._handleBlur((0,En.M)("blur")))}render(){const{active:e,annotation:t,zoomLevel:n,isSelectable:o,intl:{formatMessage:r},backend:i,shouldKeepRenderingAPStream:a,pageRotation:l}=this.props,u=t instanceof w.FV,p=(0,_.B7)(t,{isSelectable:o}),{boundingBox:f}=t,h=t.rects.map(((o,r)=>{const i=d()({[Fn().annotationRect]:!0,[Fn()[t.constructor.className]]:!0}),a={top:(o.top-f.top)*n,left:(o.left-f.left)*n,width:o.width*n,height:o.height*n,opacity:t.opacity,cursor:p},s=function(e){let{annotation:t,rect:n,zoomLevel:o,pageRotation:r}=e;const i=(0,_.B7)(t),a={width:n.width*o,height:n.height*o,backgroundColor:t.color instanceof w.Il?t.color.toCSSValue():"transparent",cursor:i};if(t instanceof w.R9)switch(r){case 0:return Nn(Nn({},a),{},{height:Math.max(1,Math.floor(2*o)),marginTop:Math.max(1,Math.floor(-1*o))});case 1:return Nn(Nn({},a),{},{width:Math.max(1,Math.floor(2*o)),left:"auto",right:"50%",top:0,marginRight:Math.max(1,Math.floor(-1*o))});case 2:return Nn(Nn({},a),{},{height:Math.max(1,Math.floor(2*o)),top:"auto",bottom:"50%",marginBottom:Math.max(1,Math.floor(-1*o))});case 3:return Nn(Nn({},a),{},{width:Math.max(1,Math.floor(2*o)),right:"auto",left:"50%",top:0,marginLeft:Math.max(1,Math.floor(-1*o))})}else if(t instanceof w.xu)switch(r){case 0:return Nn(Nn({},a),{},{marginTop:Math.max(1,Math.floor(2*o)),height:Math.max(1,Math.floor(2*o))});case 1:return Nn(Nn({},a),{},{marginRight:Math.max(1,Math.floor(2*o)),width:Math.max(1,Math.floor(2*o))});case 2:return Nn(Nn({},a),{},{marginBottom:Math.max(1,Math.floor(2*o)),height:Math.max(1,Math.floor(2*o)),top:0});case 3:return Nn(Nn({},a),{},{width:Math.max(1,Math.floor(2*o)),left:"auto",marginLeft:Math.max(1,Math.floor(2*o))})}else if(t instanceof w.hL)switch(r){case 0:return Nn(Nn({},a),{},{height:3*o,overflow:"hidden"});case 1:return Nn(Nn({},a),{},{width:3*o,overflow:"hidden"});case 2:return Nn(Nn({},a),{},{height:3*o,top:0,overflow:"hidden"});case 3:return Nn(Nn({},a),{},{width:3*o,left:"auto",overflow:"hidden"})}return a}({annotation:t,rect:o,zoomLevel:n,pageRotation:l}),h={backgroundColor:t.color instanceof w.Il?t.color.toCSSValue():"transparent"};return c.createElement("div",{key:r,className:i,style:a},e?c.createElement("div",{className:d()({[Fn().active]:!u}),style:h}):null,t instanceof w.hL?c.createElement(Mn,{markupStyle:s,color:t.color,zoomLevel:n,pageRotation:l}):c.createElement("div",{className:Fn().markup,style:s}))})).toArray(),m=(0,_.vk)(t.blendMode),g=m?{mixBlendMode:m}:void 0,v=Nn({width:f.width*n,height:f.height*n,cursor:p,outline:this.props.isFocused?_.A8:null},Ke.G6?null:g),y=function(e){switch(e.constructor){case w.FV:return"Highlight";case w.R9:return"StrikeOut";case w.xu:return"Underline";case w.hL:return"Squiggle";default:throw new s.p2(`Unknown text markup annotation type of annotation: ${JSON.stringify(e.toJS())}`)}}(t),b=ke.Z[`${y.charAt(0).toLowerCase()+y.slice(1)}Annotation`],S=d()(Fn().annotation,"PSPDFKit-Annotation","PSPDFKit-Text-Markup-Annotation",`PSPDFKit-${y}-Annotation`,{[Fn().activeTextMarkup]:e&&u,[Fn().highlight]:u,"PSPDFKit-Text-Markup-Annotation-selected":e,"PSPDFKit-Text-Markup-Comment-Annotation":t.isCommentThreadRoot}),P={};return e&&(P["data-testid"]="selected annotation"),c.createElement(xe,{position:f.getLocation(),zoomLevel:n,disablePointerEvents:!t.readOnly,additionalStyle:Ke.G6?g:void 0},c.createElement(Je.Z,{onPointerEnter:()=>{this.props.dispatch((0,De.oX)(t.id))},onPointerLeave:()=>{this.props.dispatch((0,De.IP)(t.id))}},c.createElement(we.Z,(0,ue.Z)({is:"div",style:v,className:S,onClick:this._handlePress,onFocus:this._handleFocus,onBlur:this._handleBlur,disabled:!!this.props.isDisabled,"data-annotation-id":t.id,"aria-label":`${r(ke.Z.annotation)}: ${r(b)}`,innerRef:this._innerRef},P),c.createElement(c.Fragment,null,a&&c.createElement(He,{annotation:t,zoomLevel:n,backend:i,label:r(b),onError:this.props.onError}),(!a||e)&&h))))}}(0,o.Z)(Rn,"defaultProps",{active:!1});const Ln=(0,Se.XN)(Rn,{forwardRef:!0});var Bn=n(68108),jn=n.n(Bn);function zn(e){let{annotation:t,zoomLevel:n,isDisabled:o,backend:r,isFocused:i,isMultiAnnotationsSelected:a}=e;const s=c.useRef(null),{formatMessage:l}=(0,Se.YB)(),{boundingBox:u}=t,p={width:u.width*n,height:u.height*n};return c.useEffect((()=>{i&&s.current&&s.current.focus()}),[i]),c.createElement(xe,{position:u.getLocation(),zoomLevel:n,applyZoom:!0,isMultiAnnotationsSelected:a},c.createElement(we.Z,{disabled:o,className:d()(jn().annotation,"PSPDFKit-Annotation-Unknown PSPDFKit-Annotation-Unsupported PSPDFKit-Annotation"),style:p,"data-annotation-id":t.id,"aria-label":l(ke.Z.annotation),innerRef:s},r&&c.createElement(He,{annotation:t,backend:r,zoomLevel:n,label:l(ke.Z.annotation)})))}var Kn=n(19815),Zn=n(55961),Un=n(23661),Vn=n.n(Un),Gn=n(29544),Wn=n.n(Gn);function qn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Hn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qn(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class $n extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"shouldComponentUpdate",Ce.O),(0,o.Z)(this,"_inputRef",c.createRef()),(0,o.Z)(this,"_handleClickAction",(e=>{this.props.dispatch((0,De.mg)(this.props.annotation,e))})),(0,o.Z)(this,"_handleFocus",(e=>{const{onFocus:t,annotation:n}=this.props;t&&t(n,e)})),(0,o.Z)(this,"_handleBlur",(e=>{const{onBlur:t,annotation:n,annotationToFocus:o}=this.props;o===n.id&&this.props.dispatch((0,bt.vy)(null)),t&&t(n,e)}))}componentDidUpdate(e){const{annotationToFocus:t}=this.props,{annotationToFocus:n}=e;var o;n!==t&&this.props.annotation.id===t&&(null===(o=this._inputRef.current)||void 0===o||o.focus())}render(){const{annotation:e,formField:{name:t,readOnly:n,buttonLabel:o,label:r},zoomLevel:i,formDesignMode:a,isRenderingAPStream:s,canFillFormFieldCP:l}=this.props,u="number"==typeof e.fontSize?e.fontSize:12,p=Hn({width:Math.ceil(e.boundingBox.width*i),height:Math.ceil(e.boundingBox.height*i)},s?{opacity:0}:Hn(Hn({},(0,Ze.i2)(e,i)),{},{fontSize:Math.ceil(u*i),justifyContent:e.verticalAlign&&Yn[e.verticalAlign]||"center",alignItems:e.horizontalAlign&&Jn[e.horizontalAlign]||"center"})),f=l&&!n,h=!f||a,m=d()({[Vn().widget]:!0,[Vn().onFocus]:!0,[Vn().readOnly]:!f,[Vn().flexText]:!0,[Wn().btn]:!h,[Wn().btnFormDesigner]:a,"PSPDFKit-Annotation-Widget PSPDFKit-Annotation-Widget-Button":!0,"PSPDFKit-Annotation-Widget-read-only":!f});return c.createElement("button",{ref:this._inputRef,className:m,disabled:h,name:t,type:Xn(e),style:p,onClick:this._handleClickAction,onFocus:this._handleFocus,onBlur:this._handleBlur},o||r||"")}}function Xn(e){const{action:t}=e;if(!t)return"button";switch(t.constructor){case ht.BO:return"reset";case ht.pl:return"submit";default:return"button"}}const Yn={top:"flex-start",center:"center",bottom:"flex-end"},Jn={left:"flex-start",center:"center",right:"flex-end"};var Qn=n(96114),eo=n(69554),to=n.n(eo);function no(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}class oo extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"shouldComponentUpdate",Ce.O),(0,o.Z)(this,"state",{checked:(0,Ze.CK)(this.props.formField,this.props.annotation)}),(0,o.Z)(this,"UNSAFE_componentWillReceiveProps",(e=>{e.formField.values.equals(this.props.formField.values)||this.setState({checked:(0,Ze.CK)(e.formField,e.annotation)})})),(0,o.Z)(this,"_inputRef",c.createRef()),(0,o.Z)(this,"_onChange",(()=>{const{formField:e,annotation:t}=this.props,n=(0,Ze.l_)(e,t),o=this.state.checked?(0,i.aV)(["Off"]):(0,i.aV)([n]),r=(0,Ze.g6)(e,t,!this.state.checked);this.setState({checked:!this.state.checked}),this.props.dispatch((0,Qn.xh)([{name:e.name,value:o,optionIndexes:r}]))})),(0,o.Z)(this,"_handleFocus",(e=>{const{onFocus:t,annotation:n}=this.props;null==t||t(n,e)})),(0,o.Z)(this,"_handleBlur",(e=>{const{onBlur:t,annotation:n}=this.props;this.props.annotationToFocus===this.props.annotation.id&&this.props.dispatch((0,bt.vy)(null)),null==t||t(n,e)}))}componentDidUpdate(e){const{annotationToFocus:t}=this.props,{annotationToFocus:n}=e;var o;n!==t&&this.props.annotation.id===t&&(null===(o=this._inputRef.current)||void 0===o||o.focus())}render(){const{annotation:{id:e},annotation:t,zoomLevel:r,formField:i,formDesignMode:a,isRenderingAPStream:s,canFillFormFieldCP:l}=this.props,{readOnly:u}=i,p=(0,Ze.l_)(i,t),f=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?no(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):no(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:Math.ceil(t.boundingBox.width*r),height:Math.ceil(t.boundingBox.height*r)},s?{opacity:0}:(0,Ze.i2)(t,r)),h=l&&!u,m=d()({[to().readOnly]:!h,[to().input]:!0,[Vn().widget]:!0,[Vn().readOnly]:!h,"PSPDFKit-Annotation-Widget-CheckBox-Control":!0}),g=d()({[to().checkradio]:!0,"PSPDFKit-Annotation-Widget PSPDFKit-Annotation-Widget-CheckBox":!0,"PSPDFKit-Annotation-Widget-read-only":!h});return c.createElement("label",{style:f,className:g},c.createElement("input",{ref:this._inputRef,type:"checkbox",disabled:!h||a,name:i.name,value:p,key:e,checked:this.state.checked,onChange:this._onChange,onFocus:this._handleFocus,onBlur:this._handleBlur}),c.createElement("span",{className:m,style:{borderWidth:Math.max(1,r)}}),this.state.checked&&c.createElement("span",{className:to().check,role:"presentation"},c.createElement(Re.Z,{src:n(22171)})))}}var ro=n(41756),io=n(30845),ao=n(45697),so=n.n(ao),lo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};var co=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};var uo,po,fo,ho="start",mo="center",go="vertical",vo="horizontal",yo="observed",bo="requested",wo=((uo={}).vertical="scrollTop",uo.horizontal="scrollLeft",uo),So=((po={}).vertical="height",po.horizontal="width",po),Po=((fo={}).vertical="top",fo.horizontal="left",fo),Eo=function(){function e(e){var t=e.itemCount,n=e.itemSizeGetter,o=e.estimatedItemSize;this.itemSizeGetter=n,this.itemCount=t,this.estimatedItemSize=o,this.itemSizeAndPositionData={},this.lastMeasuredIndex=-1}return e.prototype.updateConfig=function(e){var t=e.itemCount,n=e.estimatedItemSize;this.itemCount=t,this.estimatedItemSize=n},e.prototype.getLastMeasuredIndex=function(){return this.lastMeasuredIndex},e.prototype.getSizeAndPositionForIndex=function(e){if(e<0||e>=this.itemCount)throw Error("Requested index "+e+" is outside of range 0.."+this.itemCount);if(e>this.lastMeasuredIndex){for(var t=this.getSizeAndPositionOfLastMeasuredItem(),n=t.offset+t.size,o=this.lastMeasuredIndex+1;o<=e;o++){var r=this.itemSizeGetter(o);if(null==r||isNaN(r))throw Error("Invalid size returned for index "+o+" of value "+r);this.itemSizeAndPositionData[o]={offset:n,size:r},n+=r}this.lastMeasuredIndex=e}return this.itemSizeAndPositionData[e]},e.prototype.getSizeAndPositionOfLastMeasuredItem=function(){return this.lastMeasuredIndex>=0?this.itemSizeAndPositionData[this.lastMeasuredIndex]:{offset:0,size:0}},e.prototype.getTotalSize=function(){var e=this.getSizeAndPositionOfLastMeasuredItem();return e.offset+e.size+(this.itemCount-this.lastMeasuredIndex-1)*this.estimatedItemSize},e.prototype.getUpdatedOffsetForIndex=function(e){var t=e.align,n=void 0===t?ho:t,o=e.containerSize,r=e.currentOffset,i=e.targetIndex;if(o<=0)return 0;var a,s=this.getSizeAndPositionForIndex(i),l=s.offset,c=l-o+s.size;switch(n){case"end":a=c;break;case mo:a=l-(o-s.size)/2;break;case ho:a=l;break;default:a=Math.max(c,Math.min(l,r))}var u=this.getTotalSize();return Math.max(0,Math.min(u-o,a))},e.prototype.getVisibleRange=function(e){var t=e.containerSize,n=e.offset,o=e.overscanCount;if(0===this.getTotalSize())return{};var r=n+t,i=this.findNearestItem(n);if(void 0===i)throw Error("Invalid offset "+n+" specified");var a=this.getSizeAndPositionForIndex(i);n=a.offset+a.size;for(var s=i;n<r&&s<this.itemCount-1;)s++,n+=this.getSizeAndPositionForIndex(s).size;return o&&(i=Math.max(0,i-o),s=Math.min(s+o,this.itemCount-1)),{start:i,stop:s}},e.prototype.resetItem=function(e){this.lastMeasuredIndex=Math.min(this.lastMeasuredIndex,e-1)},e.prototype.findNearestItem=function(e){if(isNaN(e))throw Error("Invalid offset "+e+" specified");e=Math.max(0,e);var t=this.getSizeAndPositionOfLastMeasuredItem(),n=Math.max(0,this.lastMeasuredIndex);return t.offset>=e?this.binarySearch({high:n,low:0,offset:e}):this.exponentialSearch({index:n,offset:e})},e.prototype.binarySearch=function(e){for(var t=e.low,n=e.high,o=e.offset,r=0,i=0;t<=n;){if(r=t+Math.floor((n-t)/2),(i=this.getSizeAndPositionForIndex(r).offset)===o)return r;i<o?t=r+1:i>o&&(n=r-1)}return t>0?t-1:0},e.prototype.exponentialSearch=function(e){for(var t=e.index,n=e.offset,o=1;t<this.itemCount&&this.getSizeAndPositionForIndex(t).offset<n;)t+=o,o*=2;return this.binarySearch({high:Math.min(t,this.itemCount-1),low:Math.floor(t/2),offset:n})},e}(),xo={overflow:"auto",willChange:"transform",WebkitOverflowScrolling:"touch"},Do={position:"relative",overflow:"hidden",width:"100%",minHeight:"100%"},Co={position:"absolute",left:0,width:"100%"},ko=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.sizeAndPositionManager=new Eo({itemCount:t.props.itemCount,itemSizeGetter:function(e){return t.getSize(e)},estimatedItemSize:t.getEstimatedItemSize()}),t.state={offset:t.props.scrollOffset||null!=t.props.scrollToIndex&&t.getOffsetForIndex(t.props.scrollToIndex)||0,scrollChangeReason:bo},t.styleCache={},t.handleScroll=function(e){var n=t.props.onScroll,o=t.getNodeOffset();o<0||t.state.offset===o||e.target!==t.rootNode||(t.setState({offset:o,scrollChangeReason:yo}),"function"==typeof n&&n(o,e))},t.getRef=function(e){t.rootNode=e},t}return function(e,t){function n(){this.constructor=e}lo(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.scrollOffset,n=e.scrollToIndex;null!=t?this.scrollTo(t):null!=n&&this.scrollTo(this.getOffsetForIndex(n))},t.prototype.componentWillReceiveProps=function(e){var t=this.props,n=t.estimatedItemSize,o=t.itemCount,r=t.itemSize,i=t.scrollOffset,a=t.scrollToAlignment,s=t.scrollToIndex,l=e.scrollToIndex!==s||e.scrollToAlignment!==a,c=e.itemCount!==o||e.itemSize!==r||e.estimatedItemSize!==n;e.itemCount===o&&e.estimatedItemSize===n||this.sizeAndPositionManager.updateConfig({itemCount:e.itemCount,estimatedItemSize:this.getEstimatedItemSize(e)}),c&&this.recomputeSizes(),e.scrollOffset!==i?this.setState({offset:e.scrollOffset||0,scrollChangeReason:bo}):"number"==typeof e.scrollToIndex&&(l||c)&&this.setState({offset:this.getOffsetForIndex(e.scrollToIndex,e.scrollToAlignment,e.itemCount),scrollChangeReason:bo})},t.prototype.componentDidUpdate=function(e,t){var n=this.state,o=n.offset,r=n.scrollChangeReason;t.offset!==o&&r===bo&&this.scrollTo(o)},t.prototype.getEstimatedItemSize=function(e){return void 0===e&&(e=this.props),e.estimatedItemSize||"number"==typeof e.itemSize&&e.itemSize||50},t.prototype.getNodeOffset=function(){var e=this.props.scrollDirection,t=void 0===e?go:e;return this.rootNode[wo[t]]},t.prototype.scrollTo=function(e){var t=this.props.scrollDirection,n=void 0===t?go:t;this.rootNode[wo[n]]=e},t.prototype.getOffsetForIndex=function(e,t,n){void 0===t&&(t=this.props.scrollToAlignment),void 0===n&&(n=this.props.itemCount);var o=this.props.scrollDirection,r=void 0===o?go:o;return(e<0||e>=n)&&(e=0),this.sizeAndPositionManager.getUpdatedOffsetForIndex({align:t,containerSize:this.props[So[r]],currentOffset:this.state&&this.state.offset||0,targetIndex:e})},t.prototype.getSize=function(e){var t=this.props.itemSize;return"function"==typeof t?t(e):Array.isArray(t)?t[e]:t},t.prototype.getStyle=function(e){var t=this.styleCache[e];if(t)return t;var n,o=this.props.scrollDirection,r=void 0===o?go:o,i=this.sizeAndPositionManager.getSizeAndPositionForIndex(e),a=i.size,s=i.offset;return this.styleCache[e]=co({},Co,((n={})[So[r]]=a,n[Po[r]]=s,n))},t.prototype.recomputeSizes=function(e){void 0===e&&(e=0),this.styleCache={},this.sizeAndPositionManager.resetItem(e)},t.prototype.render=function(){var e,t=this.props,n=(t.estimatedItemSize,t.height),o=t.overscanCount,r=void 0===o?3:o,i=t.renderItem,a=(t.itemCount,t.itemSize,t.onItemsRendered),s=(t.onScroll,t.scrollDirection),l=void 0===s?go:s,u=(t.scrollOffset,t.scrollToIndex,t.scrollToAlignment,t.style),d=t.width,p=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n}(t,["estimatedItemSize","height","overscanCount","renderItem","itemCount","itemSize","onItemsRendered","onScroll","scrollDirection","scrollOffset","scrollToIndex","scrollToAlignment","style","width"]),f=this.state.offset,h=this.sizeAndPositionManager.getVisibleRange({containerSize:this.props[So[l]]||0,offset:f,overscanCount:r}),m=h.start,g=h.stop,v=[];if(void 0!==m&&void 0!==g){for(var y=m;y<=g;y++)v.push(i({index:y,style:this.getStyle(y)}));"function"==typeof a&&a({startIndex:m,stopIndex:g})}return(0,c.createElement)("div",co({ref:this.getRef},p,{onScroll:this.handleScroll,style:co({},xo,u,{height:n,width:d})}),(0,c.createElement)("div",{style:co({},Do,(e={},e[So[l]]=this.sizeAndPositionManager.getTotalSize(),e))},v))},t.defaultProps={overscanCount:3,scrollDirection:go,width:"100%"},t.propTypes={estimatedItemSize:ao.number,height:(0,ao.oneOfType)([ao.number,ao.string]).isRequired,itemCount:ao.number.isRequired,itemSize:(0,ao.oneOfType)([ao.number,ao.array,ao.func]).isRequired,onItemsRendered:ao.func,overscanCount:ao.number,renderItem:ao.func.isRequired,scrollOffset:ao.number,scrollToIndex:ao.number,scrollToAlignment:(0,ao.oneOf)(["auto",ho,mo,"end"]),scrollDirection:(0,ao.oneOf)([vo,go]).isRequired,width:(0,ao.oneOfType)([ao.number,ao.string]).isRequired},t}(c.PureComponent);const Oo=ko;var Ao=n(25904),To=n(80599),Io=n.n(To);const Fo=["height","width","opacity"];function Mo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mo(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class No extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"_inputRef",c.createRef()),(0,o.Z)(this,"_memoizedCalculateFontSize",(0,io.Z)(Ao.MX)),(0,o.Z)(this,"latestKeystrokeDiff",null),(0,o.Z)(this,"_getInput",(e=>{if(e.isEmpty())return"";{const t=this.props.formField.options.find((t=>t.get("value")===e.first()));return t?t.label:e.first()||""}})),(0,o.Z)(this,"state",{initialValue:this._getInput(this.props.formField.values),value:this._getInput(this.props.formField.values),values:this.props.formField.values,isOpen:!1,isFocused:!1,textSelected:!1}),(0,o.Z)(this,"_getSelectedLabel",(()=>{const{options:e}=this.props.formField,t=this.state.values.first(),n=e.find((e=>e.value===t));return n&&n.label||t})),(0,o.Z)(this,"UNSAFE_componentWillReceiveProps",(e=>{e.formField.values!==this.props.formField.values&&this.setState({values:e.formField.values})})),(0,o.Z)(this,"_onChange",(e=>{const t=e.currentTarget,{value:n}=t,{backend:o,formField:r,annotation:i}=this.props;if(!(0,Ze.sC)(o,i,r))return void this.setState({value:n,textSelected:!1});const{selectionStart:a,selectionEnd:l}=t,c=(0,I.QE)(this.state.initialValue,n,a);this.latestKeystrokeDiff=c;const u={change:c.change,value:c.prev,returnCode:!0,name:this.props.formField.name,selStart:a,selEnd:l};this.setState({value:n,textSelected:!1}),o.onKeystrokeEvent(u).then((e=>{if(c!==this.latestKeystrokeDiff||0===e.length)return;const n=e[0].object;if(!n.returnCode)return void this.setState({value:this.state.initialValue,textSelected:!1});const o=(0,I.F6)(c,n.change),r=e.slice(1);r.length&&this.props.dispatch((0,Qn.bt)({changes:r})),this.setState({value:o,initialValue:o,textSelected:!1},(function(){n.selStart!==t.selectionStart&&(t.selectionStart=n.selStart),n.selEnd!==t.selectionEnd&&(t.selectionEnd=n.selEnd)}))})).catch(s.vU)})),(0,o.Z)(this,"_onSelect",(e=>{if(!e){const e=this.state;return this.setState({values:e.values,isOpen:!1,value:e.value,textSelected:!1},(()=>{this.props.onOpenStateChange(this.state.isOpen)})),this.latestKeystrokeDiff=null,void(this._button&&this._button.focus())}const t=(0,i.aV)([e.value]);this.setState({values:t,isOpen:!1,value:e.label,textSelected:!1},(()=>{this.props.onOpenStateChange(this.state.isOpen)})),this.latestKeystrokeDiff=null,this.props.formField.commitOnChange&&(this.props.formField.values.equals(t)||this.props.dispatch((0,Qn.xh)([{name:this.props.formField.name,value:t}]))),this._button&&this._button.focus()})),(0,o.Z)(this,"_handleBlur",(e=>{e.persist();const{currentTarget:t}=e;this.props.dispatch((0,bt.vy)(null)),this.latestKeystrokeDiff=null,setTimeout((()=>{if(!t.contains(this.props.frameWindow.document.activeElement)){const t=this._getInput(this.state.values);this.setState({isOpen:!1,isFocused:!1,value:t,initialValue:t},(()=>{this.props.onOpenStateChange(this.state.isOpen)})),this.props.formField.values.equals(this.state.values)||this.props.dispatch((0,Qn.xh)([{name:this.props.formField.name,value:this.state.values}]));const{onBlur:n,annotation:o}=this.props;n&&n(o,e)}}),0)})),(0,o.Z)(this,"calculateFilteredOptions",(()=>{const e=this.state.isOpen,{formField:{options:t,edit:n}}=this.props,o=e?t.toSeq().filter((e=>this.state.textSelected||!this.state.value||e.label.toLowerCase().includes(this.state.value.toLowerCase()))).toList():(0,i.aV)();return n?o.some((e=>this.state.value.includes(e.label)))?o:o.unshift(new w.mv({label:this.state.value,value:this.state.value})):o})),(0,o.Z)(this,"_renderComboBoxTop",((e,t,o,r)=>{const{name:i,readOnly:a}=this.props.formField,s=this.props.formDesignMode,l=this.props.canFillFormFieldCP&&!a,u=d()({[Io().comboBoxTop]:!0,"PSPDFKit-Annotation-Widget-ComboBox-Button":!0,"PSPDFKit-Annotation-Widget-read-only":!l}),p=this._getSelectedLabel();return c.createElement("div",{className:u,onClick:this._openDropdownClick,ref:r},c.createElement("button",{"aria-controls":`PSPDFKit-dd-${this.props.formField.name}-menu`,"aria-expanded":o,"aria-haspopup":"true",tabIndex:o?-1:0,style:e,disabled:!l||s,className:Io().valueBtn,onFocus:e=>{this.setState({isFocused:!0});const{onFocus:t,annotation:n}=this.props;t&&(e.persist(),t(n,e))},ref:e=>this._button=e,name:i,value:p},p),c.createElement("div",(0,ue.Z)({"aria-hidden":!o,className:Io().arrowBtn},t),c.createElement(Re.Z,{src:n(58021)})))})),(0,o.Z)(this,"_openDropdownClick",(()=>{this.props.formField.readOnly||this.props.formField.formDesignMode||!this.props.canFillFormFieldCP||this.setState((e=>{let{isOpen:t}=e;return{isOpen:!t}}),(()=>{this._inputRef.current&&(this._inputRef.current.select(),this.setState({textSelected:!0},(()=>{this.props.onOpenStateChange(this.state.isOpen)})))}))})),(0,o.Z)(this,"_setContentElementRect",(e=>{this.props.handleComboxBoxRect(e)})),(0,o.Z)(this,"_downShiftRenderFn",(e=>{let{getInputProps:t,getItemProps:n,getToggleButtonProps:o,isOpen:r,highlightedIndex:i}=e;const{annotation:{boundingBox:{width:a,height:s}},annotation:l,formField:{doNotSpellCheck:u,readOnly:p,required:f},formDesignMode:h,isRenderingAPStream:m,canFillFormFieldCP:g,viewportState:v}=this.props,{zoomLevel:y}=v,b=this.calculateFilteredOptions(),w=b.size>5?5:b.size,S={fontSize:10*y,padding:2*y},P=p||h||!g,E=t({ref:this._inputRef,value:this.state.value,onFocus:()=>this.setState({isOpen:!0},(()=>{this.props.onOpenStateChange(this.state.isOpen)})),spellCheck:!u,onChange:this._onChange}),x=o(),D=d()({[Io().comboBox]:!0,[Io().expanded]:r,[Vn().widget]:!0,[Vn().focusedWidget]:r||this.state.isFocused,[Vn().readOnly]:P,"PSPDFKit-Annotation-Widget PSPDFKit-Annotation-Widget-ComboBox":!0,"PSPDFKit-Annotation-Widget-ComboBox-isOpen":r,"PSPDFKit-Annotation-Widget-Required":f}),C=Math.max(4,Math.min(.7*s,12))*y,k=90===l.rotation||270===l.rotation,O=this._memoizedCalculateFontSize(this._getSelectedLabel(),a,s,l.fontSize,!1,0,this._inputRef.current),A=_o({width:Math.ceil(l.boundingBox.width*y),height:Math.ceil(l.boundingBox.height*y)},m?{opacity:0}:(0,Ze.i2)(l,y,!1)),{height:T,width:I,opacity:F}=A,M=(0,ne.Z)(A,Fo),_=_o(_o({},(0,Ze.VY)(l,y)),{},{borderWidth:Math.max(1,y),fontSize:C,opacity:F,[k?"height":"width"]:I,[k?"width":"height"]:T}),N=_o(_o({},M),{},{cursor:P?"default":"pointer",padding:`0 ${Ao.DI*y}px`,fontSize:O*y,[k?"width":"height"]:T,[k?"height":"width"]:I}),R=d()({[Io().menu]:!0,"PSPDFKit-Annotation-Widget-ComboBox-Menu":!0});return c.createElement("div",{className:D,style:_o(_o({},_),r?{position:"fixed"}:void 0),tabIndex:-1,onBlur:this._handleBlur},c.createElement(Ro,{viewportRect:v.viewportRect,isVertical:90===l.rotation||270===l.rotation,setContentElementRect:this._setContentElementRect},(e=>{let{referenceRef:t,contentRef:o,style:a}=e;return c.createElement(c.Fragment,null,this._renderComboBoxTop(N,x,r,t),r&&c.createElement("div",{className:R,ref:o,style:a},c.createElement("input",(0,ue.Z)({},E,{className:d()(Io().comboBoxInput,"PSPDFKit-Annotation-Widget-ComboBox-SearchInput"),style:{textAlign:"center"},tabIndex:-1,required:f})),c.createElement("div",{className:d()(Io().comboBoxList,"PSPDFKit-Annotation-Widget-ComboBox-List"),id:`PSPDFKit-dd-${this.props.formField.name}-menu`},b.isEmpty()?c.createElement("div",{className:Io().comboBoxListItem,style:S},"No results found"):c.createElement(Oo,{scrollToIndex:i||0,scrollToAlignment:"auto",width:"100%",height:Math.ceil(20*w*y),itemCount:b.size,itemSize:Math.ceil(20*y),renderItem:e=>{let{index:t,style:o}=e;const r=b.get(t),a=i===t;(0,Pe.k)(r);const s=this.state.values.includes(r.get("value")),l=d()({[Io().comboBoxListItem]:!0,[Io().comboBoxListItemActive]:a,[Io().comboBoxListItemSelected]:s});let u;return u=0===t&&this.props.formField.edit&&!this.props.formField.options.includes(r)?r.label.length?`Create "${r.label}"`:c.createElement("span",{className:Io().empty},"(empty)"):r.label,c.createElement("div",(0,ue.Z)({className:d()(l,"PSPDFKit-Annotation-Widget-ComboBox-ListItem",{"PSPDFKit-Annotation-Widget-ComboBox-ListItem-Active":a,"PSPDFKit-Annotation-Widget-ComboBox-ListItem-Selected":s}),title:r.label},n({key:r.value,index:t,item:r,style:_o(_o({},o),S)})),u)}}))))})))})),(0,o.Z)(this,"_itemToString",(e=>e?e.label:""))}componentDidUpdate(e){const{annotationToFocus:t}=this.props,{annotationToFocus:n}=e;n!==t&&this.props.annotation.id===t&&this._openDropdownClick()}componentWillUnmount(){this.latestKeystrokeDiff=null}render(){const{frameWindow:e}=this.props;return c.createElement(ro.ZP,{environment:e,onSelect:this._onSelect,itemToString:this._itemToString,isOpen:this.state.isOpen,defaultHighlightedIndex:0},this._downShiftRenderFn)}}const Ro=function(e){const{children:t,viewportRect:n,isVertical:o,setContentElementRect:r}=e,[i,a]=c.useState(null),[s,l]=c.useState(null),[u,d]=c.useState(null),p=c.useCallback((()=>{const e=s?s.getBoundingClientRect():null,t=i?i.getBoundingClientRect():null,a=o?"left":"top",l=o?"width":"height";let c=e?e[l]:0;null!==t&&null!==e&&e[a]+e[l]+t[l]>n[l]&&0!==e[a]&&(c=-t[l]),r&&r(t),d({top:c})}),[i,s,n,o]);c.useLayoutEffect((()=>{p()}),[p]);return t({referenceRef:e=>l(e),contentRef:e=>a(e),style:_o(_o({position:"absolute"},u),{},{width:"100%"},s&&i?null:{opacity:0})})};var Lo=n(82654),Bo=n.n(Lo);function jo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function zo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jo(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class Ko extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"shouldComponentUpdate",Ce.O),(0,o.Z)(this,"state",{values:this.props.formField.values}),(0,o.Z)(this,"UNSAFE_componentWillReceiveProps",(e=>{e.formField.values.equals(this.props.formField.values)||this.setState({values:e.formField.values})})),(0,o.Z)(this,"_inputRef",c.createRef()),(0,o.Z)(this,"_onChange",(e=>{const t=e.target.options,n=(0,i.dM)([...t]).filter((e=>e.selected)).map((e=>e.value)).toList();this.setState({values:n}),this.props.formField.commitOnChange&&(this.props.formField.values.equals(n)||this.props.dispatch((0,Qn.xh)([{name:this.props.formField.name,value:n}])))})),(0,o.Z)(this,"_onBlur",(e=>{this.props.annotationToFocus===this.props.annotation.id&&this.props.dispatch((0,bt.vy)(null)),this.props.formField.values.equals(this.state.values)||this.props.dispatch((0,Qn.xh)([{name:this.props.formField.name,value:this.state.values}]));const{onBlur:t,annotation:n}=this.props;t&&t(n,e)})),(0,o.Z)(this,"_onFocus",(e=>{const{onFocus:t,annotation:n}=this.props;t&&t(n,e)}))}componentDidUpdate(e){const{annotationToFocus:t}=this.props,{annotationToFocus:n}=e;var o;n!==t&&this.props.annotation.id===t&&(null===(o=this._inputRef.current)||void 0===o||o.focus())}render(){const{annotation:e,formField:{options:t,name:n,multiSelect:o,readOnly:r,required:i},zoomLevel:a,formDesignMode:s,isRenderingAPStream:l,canFillFormFieldCP:u}=this.props,p=u&&!r,f=zo({width:Math.ceil(e.boundingBox.width*a),height:Math.ceil(e.boundingBox.height*a)},l?{opacity:0}:zo(zo({},(0,Ze.i2)(e,a)),{},{fontSize:Math.ceil(12*a),textAlign:e.horizontalAlign})),h=d()({[Bo().listBox]:!0,[Vn().widget]:!0,[Vn().onFocus]:!0,[Vn().readOnly]:!p,[Bo().listBoxRotated]:!!e.rotation,"PSPDFKit-Annotation-Widget PSPDFKit-Annotation-Widget-ListBox":!0,"PSPDFKit-Annotation-Widget-read-only":!p,"PSPDFKit-Annotation-Widget-Required":i}),m=o?this.state.values.toArray():this.state.values.size>0?this.state.values.get(0):void 0;return c.createElement("select",{ref:this._inputRef,disabled:!p||s,style:f,size:t.size,className:h,name:n,onChange:this._onChange,multiple:o,onBlur:this._onBlur,onFocus:this._onFocus,value:m,required:i},t.map((e=>c.createElement("option",{key:e.value,value:e.value},e.label))))}}var Zo=n(30667);const Uo=["borderColor","borderWidth","borderStyle","height","width","opacity","backgroundColor"];function Vo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Go(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vo(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class Wo extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"shouldComponentUpdate",Ce.O),(0,o.Z)(this,"state",{checked:(0,Ze.CK)(this.props.formField,this.props.annotation)}),(0,o.Z)(this,"UNSAFE_componentWillReceiveProps",(e=>{const t=(0,Ze.CK)(e.formField,e.annotation);this.setState({checked:t})})),(0,o.Z)(this,"_inputRef",c.createRef()),(0,o.Z)(this,"handleChange",(()=>{const{dispatch:e,formField:t,annotation:n}=this.props;if(this.state.checked&&t.noToggleToOff)return;const o=(0,Ze.g6)(t,n,!this.state.checked);e((0,Qn.xh)([{name:t.name,value:this.state.checked?null:(0,Ze.l_)(t,n),optionIndexes:o}])),this.setState((e=>{let{checked:t}=e;return{checked:!t}}))})),(0,o.Z)(this,"uncheck",(e=>{const{formField:t,dispatch:n,annotation:o}=this.props;if(t.readOnly||t.noToggleToOff||!this.state.checked||"keydown"===e.type&&e.keyCode!==Zo.tW)return;"keydown"===e.type&&e.preventDefault();const r=(0,Ze.g6)(t,o,!1);n((0,Qn.xh)([{name:t.name,value:null,optionIndexes:r}]))})),(0,o.Z)(this,"_handleFocus",(e=>{const{onFocus:t,annotation:n}=this.props;t&&t(n,e)})),(0,o.Z)(this,"_handleBlur",(e=>{const{onBlur:t,annotation:n,annotationToFocus:o}=this.props;o===n.id&&this.props.dispatch((0,bt.vy)(null)),t&&t(n,e)}))}componentDidUpdate(e){const{annotationToFocus:t}=this.props,{annotationToFocus:n}=e;var o;n!==t&&this.props.annotation.id===t&&(null===(o=this._inputRef.current)||void 0===o||o.focus())}render(){const{annotation:{id:e},annotation:t,zoomLevel:n,formField:o,formDesignMode:r,isRenderingAPStream:i,canFillFormFieldCP:a}=this.props,{checked:s}=this.state,l=Go({width:Math.ceil(t.boundingBox.width*n),height:Math.ceil(t.boundingBox.height*n)},i?{opacity:0}:(0,Ze.i2)(t,n,!1)),{borderColor:u,borderWidth:p,borderStyle:f,height:h,width:m,opacity:g,backgroundColor:v}=l,y=(0,ne.Z)(l,Uo),{transform:b,transformOrigin:w}=(0,Ze.i2)(t,n);let S={width:m,height:h,opacity:g};(0,Ue.kv)(t)&&(S=Go(Go({},S),{},{transform:b,transformOrigin:w}));const P=a&&!o.readOnly,E=d()({[to().input]:!0,[to().inputRadio]:!0,[Vn().widget]:!0,[Vn().readOnly]:!P,"PSPDFKit-Annotation-Widget-RadioButton-Control":!0}),x=d()({[to().checkradio]:!0,"PSPDFKit-Annotation-Widget PSPDFKit-Annotation-Widget-RadioButton":!0,"PSPDFKit-Annotation-Widget-read-only":!P});return c.createElement("label",{style:S,className:x},c.createElement("input",{ref:this._inputRef,type:"radio",name:o.name,disabled:!P||r,key:e,checked:s,value:(0,Ze.l_)(o,t),className:s?to().checked:null,onChange:P?this.handleChange:void 0,onClick:this.uncheck,onKeyDown:this.uncheck,onFocus:this._handleFocus,onBlur:this._handleBlur,style:y}),c.createElement("span",{className:E,style:{borderColor:u,borderWidth:null!=p?p:Math.max(1,n),borderStyle:f,backgroundColor:v}}))}}var qo=n(43578),Ho=n.n(qo),$o=n(67628);function Xo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Yo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xo(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class Jo extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"shouldComponentUpdate",Ce.O),(0,o.Z)(this,"state",{overlappingAnnotation:null}),(0,o.Z)(this,"_focusableElement",null),(0,o.Z)(this,"_onDOMElement",(e=>{this._focusableElement=e})),(0,o.Z)(this,"_handlePress",(e=>{e.stopPropagation(),e.preventDefault();const t=this.props.features.includes(ee.q.ELECTRONIC_SIGNATURES)?"es-signature":"ink-signature",n=this.props.isAnnotationPressPrevented({annotation:this.props.annotation,nativeEvent:e.nativeEvent,selected:!1});if(!e.isPrimary||n||this.props.isDigitallySigned)return;const{overlappingAnnotation:o}=this.state;o?this.props.dispatch((0,De.mg)(o,e,{selectedAnnotationShouldDrag:"touch"!==e.pointerType?new w.E9({x:e.clientX,y:e.clientY}):null})):(this._focusableElement&&this._focusableElement.focus(),this.props.dispatch((0,bt.Ds)(t)),this.props.dispatch((0,Kt.Cc)({signatureRect:this.props.annotation.boundingBox,signaturePageIndex:this.props.annotation.pageIndex,formFieldName:this.props.formField.name})))})),(0,o.Z)(this,"_handleFocus",(e=>{const{onFocus:t,annotation:n}=this.props;t&&t(n,e)})),(0,o.Z)(this,"_handleBlur",(e=>{const{onBlur:t,annotation:n,annotationToFocus:o}=this.props;o===n.id&&this.props.dispatch((0,bt.vy)(null)),t&&t(n,e)})),(0,o.Z)(this,"_handlePointerUp",(e=>{e.stopPropagation()}))}static getDerivedStateFromProps(e){const t=e.inkAnnotations.find((t=>t.boundingBox.isRectOverlapping(e.annotation.boundingBox)))||e.imageAnnotations.find((t=>t.boundingBox.isRectOverlapping(e.annotation.boundingBox)));return{overlappingAnnotation:t||null}}componentDidUpdate(e){const{annotationToFocus:t}=this.props,{annotationToFocus:n}=e;if(n!==t&&this.props.annotation.id===t&&!this.props.isDigitallySigned){const{overlappingAnnotation:e}=this.state,t=this.props.features.includes(ee.q.ELECTRONIC_SIGNATURES)?"es-signature":"ink-signature";e?this.props.dispatch((0,De.Df)((0,i.l4)([e.id]),null)):(this._focusableElement&&this._focusableElement.focus(),this.props.dispatch((0,bt.Ds)(t)),this.props.dispatch((0,Kt.Cc)({signatureRect:this.props.annotation.boundingBox,signaturePageIndex:this.props.annotation.pageIndex,formFieldName:this.props.formField.name})))}}render(){const{formatMessage:e}=this.props.intl,{annotation:t,annotation:{boundingBox:n,id:o},formField:{readOnly:r,name:i},zoomLevel:a,formDesignMode:s,isDigitallySigned:l,hasSignatureLicenseComponent:u,backend:p,isDragging:f,canFillFormFieldCP:h,signatureFeatureAvailability:m}=this.props,g=Math.ceil(n.height*a),v=Yo(Yo({},(0,Ze.i2)(t,a,!1)),{},{fontSize:(20<g?20:g)*a}),y=h&&!r&&m!==$o.H.NONE,b=d()({[Vn().readOnly]:!y,[Vn().widget]:!0,[Vn().onFocus]:!0,"PSPDFKit-Annotation-Widget PSPDFKit-Annotation-Widget-Signature":!0,"PSPDFKit-Annotation-Widget-read-only":!y}),w=d()({[Ho().sign]:!0,[Ho().signReadOnly]:!y,"PSPDFKit-Annotation-Widget-Signature-Badge":!0}),S=u&&(0,_.U7)(n),P=d()({"PSPDFKit-Annotation-Widget":!0,"PSPDFKit-Annotation-Widget-Signature":!0,"PSPDFKit-Annotation-Widget-Signature-Signed":l}),E=c.createElement(c.Fragment,null,c.createElement("span",{className:w,"aria-hidden":"true"},e(ke.Z.sign)),c.createElement(q.TX,{tag:"span"},`${i}, ${e(ke.Z.sign)}`));return S?c.createElement(le.Reparent,{id:`annotation-signature-widget-${o}`},c.createElement(Je.Z,{onPointerUp:this._handlePointerUp,onPointerDown:y?this._handlePress:void 0,onDOMElement:this._onDOMElement},c.createElement(we.Z,{onFocus:this._handleFocus,onBlur:this._handleBlur,style:Yo(Yo({},v),{},{cursor:y||!l?"pointer":"auto"}),className:P,"data-annotation-id":t.id,"aria-label":`${e(ke.Z.annotation)}: ${e(ke.Z.sign)}`,is:"div"},c.createElement(He,{annotation:t,backend:p,zoomLevel:a,label:`${e(ke.Z.signed)}`,isDragging:f,isDigitallySigned:l,onError:this.props.onError}),l||this.state.overlappingAnnotation?null:E))):c.createElement(Je.Z,{onPointerDown:y?this._handlePress:void 0,onDOMElement:this._onDOMElement},c.createElement("button",{className:b,"data-name":i,style:v,disabled:!y||s,onFocus:this._handleFocus,onBlur:this._handleBlur},this.state.overlappingAnnotation?c.createElement(q.TX,{tag:"span"},i,", ",e(ke.Z.signed)):E))}}const Qo=(0,Se.XN)(Jo,{forwardRef:!0});var er=n(91039);const tr=(0,Zn.x)((function(e,t){const{annotation:n}=t,o=n.pageIndex,r=e.pages.get(o),i=e.features,a=e.signatureFeatureAvailability;(0,Pe.k)(r,"Cannot find page for widgetAnnotation with id ",n.id);const s=(0,_.xp)(e.annotations,r),l=s.filter((e=>e instanceof de.Zc)).toList(),c=s.filter((e=>e instanceof de.sK)).toList();return{isDigitallySigned:(0,er.Zt)(e,n),inkAnnotations:l,imageAnnotations:c,isAnnotationPressPrevented:t=>(0,_.TW)(t,e.eventEmitter),backend:e.backend,features:i,signatureFeatureAvailability:a,hasSignatureLicenseComponent:i.includes(ee.q.DIGITAL_SIGNATURES)||i.includes(ee.q.ELECTRONIC_SIGNATURES)}}))(Qo),nr=tr;function or(e,t){return or=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},or(e,t)}function rr(e,t){if("function"!=typeof t&&null!==t)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&&or(e,t)}var ir=n(34710),ar=n(4054);function sr(){sr=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,o,r){var i=new RegExp(e,o);return t.set(i,r||t.get(e)),or(i,n.prototype)}function o(e,n){var o=t.get(n);return Object.keys(o).reduce((function(t,n){var r=o[n];if("number"==typeof r)t[n]=e[r];else{for(var i=0;void 0===e[r[i]]&&i+1<r.length;)i++;t[n]=e[r[i]]}return t}),Object.create(null))}return rr(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=o(n,this);var r=n.indices;r&&(r.groups=o(r,this))}return n},n.prototype[Symbol.replace]=function(n,r){if("string"==typeof r){var i=t.get(this);return e[Symbol.replace].call(this,n,r.replace(/\$<([^>]+)>/g,(function(e,t){var n=i[t];return"$"+(Array.isArray(n)?n.join("$"):n)})))}if("function"==typeof r){var a=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(o(e,a)),r.apply(this,e)}))}return e[Symbol.replace].call(this,n,r)},sr.apply(this,arguments)}function lr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function cr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lr(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ur=["m/d","m/d/yy","mm/dd/yy","mm/yy","d-mmm","d-mmm-yy","dd-mmm-yy","yy-mm-dd","mmm-yy","mmmm-yy","mmm d, yyyy","mmmm d, yyyy","m/d/yy h:MM tt","m/d/yy HH:MM"],dr=["HH:MM","h:MM tt","HH:MM:ss","h:MM:ss tt"];function pr(e,t){const{value:n,readOnly:o}=e.formField;return{initialValue:n,value:n,valueFromCurrentProps:n,readOnlyFromCurrentProps:o,isFocused:!!t&&t.isFocused,initialEditingValue:e.editingValue,editingValue:t?t.editingValue:e.editingValue,shouldRecalculateWhenOverflow:!1}}class fr extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"state",pr(this.props)),(0,o.Z)(this,"_usedHeight",0),(0,o.Z)(this,"_latestKeystrokeDiff",null),(0,o.Z)(this,"_memoizedGetTextareaUsedHeight",(0,io.Z)(mr)),(0,o.Z)(this,"_memoizedCalculateFontSize",(0,io.Z)(Ao.MX)),(0,o.Z)(this,"_memoizedCalculateCombLetterSpacing",(0,io.Z)(hr)),(0,o.Z)(this,"_reusableRealmRemoveTimeout",null),(0,o.Z)(this,"_reusableRealm",null),(0,o.Z)(this,"_inputRef",c.createRef()),(0,o.Z)(this,"_onChange",(()=>{const e=this._inputRef.current;(0,s.kG)(e);const{value:t}=e,{comb:n,doNotScroll:o,multiLine:r}=this.props.formField,i=t.length<this.state.value.length,{zoomLevel:a,annotation:{fontSize:l,lineHeightFactor:c}}=this.props;if(o&&!n&&!i){const n="auto"===l||null==l?Ao.w5[0]:l,o=e.parentNode;(0,s.kG)(o);const i=e.cloneNode(!0),u=n*a-(r?0:parseFloat(i.style.paddingTop)+parseFloat(i.style.paddingBottom));i.style.fontSize=`${u}px`,i.style.textAlign="left","TEXTAREA"===i.tagName?i.innerText=t:i.value=t;let d=!0;o.appendChild(i);try{if(r){const t=u*(null!=c?c:1),n=parseFloat(e.style.height)/t<2?0:Math.min((null!=c?c:1)*u*.4*a,5*a);i.style.lineHeight=`${t}px`,i.style.paddingTop=`${n}px`,d=(0,ar.f)(i)}else d=(0,ar.o5)(i)}finally{o.removeChild(i)}if(d)return}const{backend:u,formField:d,annotation:p}=this.props;if(!(0,Ze.sC)(u,p,d))return void this.setState({value:t});const{selectionStart:f}=e,h=(0,I.QE)("string"==typeof this.state.initialEditingValue?this.state.initialEditingValue:this.state.initialValue,t,f);this._latestKeystrokeDiff=h;const m={change:h.change,value:h.prev,returnCode:!0,name:this.props.formField.name,selStart:f,selEnd:h.endCursorPosition};this.setState({value:t,editingValue:t}),u.onKeystrokeEvent(m).then((t=>{if(h!==this._latestKeystrokeDiff||0===t.length)return;const n=t[0].object;if(!n.returnCode)return void this.setState({value:this.state.initialValue,editingValue:this.state.initialEditingValue});const o=(0,I.F6)(h,n.change),r=t.slice(1);r.length&&this.props.dispatch((0,Qn.bt)({changes:r})),this.setState({value:o,initialValue:o,editingValue:o,initialEditingValue:o},(function(){n.selStart!==e.selectionStart&&(e.selectionStart=n.selStart),n.selEnd!==h.endCursorPosition&&(e.selectionEnd=n.selEnd)}))})).catch(s.vU)})),(0,o.Z)(this,"_onFocus",(e=>{const t=this._inputRef.current;this.setState({isFocused:!0,shouldRecalculateWhenOverflow:!!t&&t.clientHeight<t.scrollHeight});const{onFocus:n}=this.props;n&&(e.persist(),n(this.props.annotation,e.nativeEvent))})),(0,o.Z)(this,"_onBlur",(e=>{this.setState({isFocused:!1}),this.props.annotationToFocus===this.props.annotation.id&&this.props.dispatch((0,bt.vy)(null)),this._latestKeystrokeDiff=null,this._commitChanges();const{onBlur:t}=this.props;t&&(e.persist(),t(this.props.annotation,e.nativeEvent))}))}static getDerivedStateFromProps(e,t){return t.valueFromCurrentProps!==e.formField.value||t.readOnlyFromCurrentProps!==e.formField.readOnly?pr(e,t):null}componentWillUnmount(){this._latestKeystrokeDiff=null,this._commitChanges();const{onBlur:e,annotation:t}=this.props;e&&e(t,(0,En.M)("blur"))}_commitChanges(){this.props.formField.value!==this.state.value&&this.props.dispatch((0,Qn.xh)([cr({name:this.props.formField.name,value:this.state.value},this.props.formField.multiLine&&{isFitting:(0,Ao.$Z)(this.props.annotation,this.state.value,this.props.zoomLevel)})]))}_dateFormat(){var e;const{annotation:t}=this.props,n=null===(e=t.additionalActions)||void 0===e||null===(e=e.onFormat)||void 0===e?void 0:e.script;if(!n)return null;const o=sr(/(AFTime|AFDate)_([FormatEx]*)\("*([0-9]+|[\w\d\s:\-/]*)"*\)/,{name:1,type:2,argument:3}),r=n.match(o);if(!r)return null;const{argument:i,type:a,name:s}=r.groups;if("FormatEx"===a){const e=i.match(/[d|y|m]/);return"AFDate"===s&&e||"AFTime"===s&&!e?i:null}switch(s){case"AFDate":return ur[i];case"AFTime":return dr[i]}return null}_dateInputType(e){if(e){const t=e.match(/[d|y|m]/),n=e.match(/[H|h|M|t]/);if(t&&n)return"datetime-local";if(n)return"time"}return"date"}_getReusableRealm(){return this._reusableRealm?this._reusableRealm.window.document.body.innerHTML="":this._reusableRealm=(0,ar.Aw)(this.props.frameWindow),this._reusableRealmRemoveTimeout&&clearTimeout(this._reusableRealmRemoveTimeout),this._reusableRealmRemoveTimeout=setTimeout((()=>{this._reusableRealm&&this._reusableRealm.remove(),this._reusableRealm=null,this._reusableRealmRemoveTimeout=null}),200),(0,s.kG)(this._reusableRealm),this._reusableRealm}componentDidMount(){this.props.formField.multiLine&&!this.props.formField.password&&"number"!=typeof this.props.annotation.lineHeightFactor&&this.props.backend.getSuggestedLineHeightFactor(this.props.annotation).then((e=>{this.props.dispatch((0,bt.Zr)((0,i.aV)([this.props.annotation.set("lineHeightFactor",e)])))})).catch(s.vU)}componentDidUpdate(e){var t;e.annotationToFocus!==this.props.annotationToFocus&&this.props.annotationToFocus===this.props.annotation.id&&(null===(t=this._inputRef.current)||void 0===t||t.focus())}render(){const{annotation:{boundingBox:{width:e,height:t},lineHeightFactor:n},annotation:o,formField:{name:r,password:i,maxLength:a,doNotSpellCheck:s,doNotScroll:l,multiLine:u,readOnly:p,comb:f,required:h},zoomLevel:m,formDesignMode:g,formattedValue:v,frameWindow:y,isRenderingAPStream:b,canFillFormFieldCP:w}=this.props,S=function(e,t){return e.isFocused||null==t?e.isFocused&&null!=e.editingValue?e.editingValue:e.value:t}(this.state,v),P=this._memoizedCalculateFontSize(S,e,t,o.fontSize,u,o.borderWidth||0,this._inputRef.current),E=cr({width:o.boundingBox.width*m,height:o.boundingBox.height*m,fontSize:P*m},b?{opacity:0}:cr(cr({},(0,Ze.i2)(o,m)),{},{overflow:l?"hidden":"auto",paddingTop:0,paddingBottom:0,paddingLeft:u?Ao.DI*m:0,paddingRight:u?Ao.DI*m:0}));if(o.horizontalAlign&&(E.textAlign=o.horizontalAlign),o.verticalAlign&&!u&&("bottom"===o.verticalAlign?E.paddingTop=E.height-E.fontSize-2*E.borderWidth:"top"===o.verticalAlign&&(E.paddingBottom=E.height-E.fontSize-2*E.borderWidth)),f&&"number"==typeof a&&!u){const t=this._memoizedCalculateCombLetterSpacing(P,e,a,y.document,this._inputRef.current)*m;E.fontFamily="monospace",E.letterSpacing=t,E.paddingLeft=t/2,E.paddingRight=0}const x=i?"password":"text",D=w&&!p,C=d()({[Vn().readOnly]:!D,[Vn().widget]:!0,[Vn().combNoPaddingLeftOnFocus]:f&&a,[Vn().onFocus]:!0,"PSPDFKit-Annotation-Widget PSPDFKit-Annotation-Widget-Text":!0,"PSPDFKit-Annotation-Widget-read-only":!D,"PSPDFKit-Annotation-Widget-Required":h}),k=!D||g;if(!i&&u){let e=Ao.n*m;const t=E.height-E.fontSize;t-2*e<0&&(e=t>0?t/2:0);const i=E.fontSize*(null!=n?n:1),l=E.height/i<2?0:Math.min(.4*P*m,5*m),u=cr(cr({},E),{},{resize:"none",paddingTop:l,paddingLeft:Ao.DI*m,paddingRight:Ao.DI*m,lineHeight:`${i}px`});if(o.verticalAlign&&"top"!==o.verticalAlign){this._usedHeight=this._memoizedGetTextareaUsedHeight(S||" ",o.boundingBox.width,m,P,this._getReusableRealm());const t=u.height-(this._usedHeight||u.fontSize);"bottom"===o.verticalAlign?u.paddingTop=u.height>this._usedHeight?t-e-2*u.borderWidth:0:"center"===o.verticalAlign&&(u.paddingTop=u.height>this._usedHeight?t/2-u.borderWidth:0,u.paddingBottom=u.height>this._usedHeight?t/2-e-u.borderWidth:0)}return c.createElement("textarea",{ref:this._inputRef,className:C,name:r,disabled:k,value:S,style:u,maxLength:a,spellCheck:!s,onChange:this._onChange,onBlur:this._onBlur,onFocus:this._onFocus,required:h})}const O=this._dateFormat(),A=this._dateInputType(O);return O&&A?c.createElement(q.qe,{ref:this._inputRef,style:E,className:C,name:r,value:S,disabled:k,type:A,maxLength:a,format:O,onChange:this._onChange,onBlur:this._onBlur,onFocus:this._onFocus,required:h}):c.createElement("input",{ref:this._inputRef,className:C,type:x,disabled:k,maxLength:a,name:r,value:S,style:E,spellCheck:!s,onChange:this._onChange,onBlur:this._onBlur,onFocus:this._onFocus,required:h})}}function hr(e,t,n,o,r){let a,l=e/2;try{a=new ir.f(o,(0,i.aV)(["_"]),{fontSize:`${e}px`,width:`${t}px`,wordWrap:"break-word",whiteSpace:"pre-wrap",fontFamily:"monospace"},Vn().widget,r&&r.parentNode);const n=a.measure().first();(0,s.kG)(n),l=n.width}finally{a&&a.remove()}const c=t/n-l;return Math.max(c,0)}function mr(e,t,n,o,r){let i;try{const a={width:`${Math.ceil(t*n)}px`,fontSize:o*n+"px",padding:`0 ${Ao.DI*n}px`,whiteSpace:"pre-wrap",overflowWrap:"break-word",maxWidth:t*n+"px",border:`${Math.max(1,n)}px solid transparent`,boxSizing:"border-box",display:"block",fontFamily:"Helvetica, sans-serif",margin:"0",outline:"0"};return i=new ir.f(r.window.document,e,a),i.wrapper?i.wrapper.scrollHeight:0}finally{i&&i.remove()}}var gr=n(61631),vr=n(5020);function yr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function br(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yr(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class wr extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"shouldComponentUpdate",Ce.O),(0,o.Z)(this,"state",{isFocused:!1,isComboboxOpen:!1,isRollover:!1,isDown:!1}),(0,o.Z)(this,"_elementBoundingBox",null),(0,o.Z)(this,"_pointerRecognizerRef",(e=>{this._pointerRecognizer=e})),(0,o.Z)(this,"onFocus",((e,t)=>{const{onFocus:n,dispatch:o,annotation:{additionalActions:r,formFieldName:i}}=this.props;r&&r.onFocus&&o((0,gr.gH)(r.onFocus.script,i)),n&&n(e,t),this.setState({isFocused:!0})})),(0,o.Z)(this,"onBlur",((e,t)=>{const{onBlur:n,dispatch:o,annotation:{additionalActions:r,formFieldName:i}}=this.props;r&&r.onBlur&&o((0,gr.gH)(r.onBlur.script,i)),n&&n(e,t),this.setState({isFocused:!1})})),(0,o.Z)(this,"onPointerUp",(()=>{var e;null!==(e=this.props.annotation.additionalActions)&&void 0!==e&&e.onPointerUp&&this.props.dispatch((0,gr.TU)(this.props.annotation,"onPointerUp")),this.state.isDown&&this.setState({isDown:!1})})),(0,o.Z)(this,"onPointerEnter",(()=>{var e,t;this._elementBoundingBox=null===(e=this._pointerRecognizer)||void 0===e?void 0:e.getBoundingClientRect(),null!==(t=this.props.annotation.additionalActions)&&void 0!==t&&t.onPointerEnter&&this.props.dispatch((0,gr.TU)(this.props.annotation,"onPointerEnter")),this.props.hasRolloverVariantAPStream&&this.setState({isRollover:!0})})),(0,o.Z)(this,"onPointerLeave",(()=>{var e;null!==(e=this.props.annotation.additionalActions)&&void 0!==e&&e.onPointerLeave&&this.props.dispatch((0,gr.TU)(this.props.annotation,"onPointerLeave")),this.state.isRollover&&this.setState({isRollover:!1,isDown:!1})})),(0,o.Z)(this,"onRootPointerMove",(e=>{var t,n,o,r;this._elementBoundingBox&&this.state.isRollover&&(e.clientX<(null===(t=this._elementBoundingBox)||void 0===t?void 0:t.left)||e.clientX>(null===(n=this._elementBoundingBox)||void 0===n?void 0:n.right)||e.clientY<(null===(o=this._elementBoundingBox)||void 0===o?void 0:o.top)||e.clientY>(null===(r=this._elementBoundingBox)||void 0===r?void 0:r.bottom))&&this.onPointerLeave()})),(0,o.Z)(this,"handlePointerUp",(e=>{e.stopPropagation()})),(0,o.Z)(this,"handleOpenStateChange",(e=>{var t,n;(this.setState({isComboboxOpen:e}),this.props.isComboBoxOpen&&this.props.isComboBoxOpen(e),e)||(null===(t=(n=this.props).handleComboBoxRect)||void 0===t||t.call(n,null))})),(0,o.Z)(this,"handleComboBoxRect",(e=>{var t,n;null===(t=(n=this.props).handleComboBoxRect)||void 0===t||t.call(n,e)})),(0,o.Z)(this,"handlePointerDown",(e=>{if(e.isPrimary&&this.props.isSelectable&&this.props.hasDownVariantAPStream&&this.setState({isDown:!0}),!e.isPrimary||!this.props.isSelectable||this.props.formField instanceof w.R0&&!this.props.formDesignMode)return;const t={selectedAnnotationShouldDrag:"touch"!==e.pointerType?new w.E9({x:e.clientX,y:e.clientY}):null,stopPropagation:!0};this.props.dispatch((0,De.mg)(this.props.annotation,e,t))}))}renderWidgetComponent(e){const{formField:t,canFillFormFieldCP:n,frameWindow:o}=this.props;(0,s.kG)(t),(0,s.kG)(o);const r={dispatch:this.props.dispatch,annotation:this.props.annotation,zoomLevel:this.props.zoomLevel,frameWindow:o,onFocus:this.onFocus,onBlur:this.onBlur,onPointerUp:e?this.handlePointerUp:void 0,formDesignMode:this.props.formDesignMode,backend:this.props.backend,formattedValue:this.props.formattedValue,editingValue:this.props.editingValue,isRenderingAPStream:e,canFillFormFieldCP:n,viewportState:this.props.viewportState,isMultiAnnotationsSelected:this.props.isMultiAnnotationsSelected,annotationToFocus:this.props.annotationToFocus};if(t instanceof w.$o)return c.createElement(fr,(0,ue.Z)({},r,{formField:t}));if(t instanceof w.Vi)return c.createElement(Ko,(0,ue.Z)({},r,{formField:t}));if(t instanceof w.rF)return c.createElement(oo,(0,ue.Z)({},r,{formField:t}));if(t instanceof w.fB)return c.createElement(No,(0,ue.Z)({},r,{handleComboxBoxRect:this.handleComboBoxRect,onOpenStateChange:this.handleOpenStateChange,formField:t}));if(t instanceof w.XQ)return c.createElement(Wo,(0,ue.Z)({},r,{formField:t}));if(t instanceof w.R0)return c.createElement($n,(0,ue.Z)({},r,{formField:t}));if(t instanceof w.Yo)return c.createElement(nr,(0,ue.Z)({},r,{isDragging:this.props.isDragging,formField:t}));throw new Error("Unsupported type for FormField.")}renderWidgetMaybeWithAPStream(){const{annotation:e,zoomLevel:t,backend:n,formField:o,isDragging:r,shouldKeepRenderingAPStream:i,intl:{formatMessage:a}}=this.props,s=i&&!this.state.isComboboxOpen&&(!this.state.isFocused||o instanceof w.rF||o instanceof w.XQ||o instanceof w.R0)&&!(o instanceof w.Yo),l=(0,_.vk)(e.blendMode),u=l?{mixBlendMode:l}:{};let d;return this.state.isRollover&&(d="rollover"),this.state.isDown&&(d="down"),c.createElement("div",{style:u},this.renderWidgetComponent(s),s?c.createElement(le.Reparent,{id:`annotation-widget-${e.id}`,className:Ge().APStreamParent},c.createElement(He,{annotation:e,variant:d,zoomLevel:t,backend:n,formField:o,label:a(ke.Z.annotation),isDragging:r})):null)}render(){const{annotation:{rotation:e,boundingBox:t,id:n},zoomLevel:o,formDesignMode:r,formField:i,isSelectable:a}=this.props;if(!i)return null;const s=90===(0,vr.Lv)(e)||270===(0,vr.Lv)(e);let l=Pr,u=Er;return s&&(l=br(br({},l),{},{transformOrigin:"50% 50%",transform:(0,Ze.G8)({width:Math.ceil(t.width*o),height:Math.ceil(t.height*o),rotation:(0,vr.Lv)(e)})}),u=br(br({},u),{},{transformOrigin:"50% 50%",transform:(0,Ze.G8)({width:Math.ceil(t.width*o),height:Math.ceil(t.height*o),rotation:(0,vr.Lv)(e),reverse:!0})})),c.createElement(xe,{position:t.getLocation(),zoomLevel:o,isMultiAnnotationsSelected:this.props.isMultiAnnotationsSelected},c.createElement(Je.Z,{onPointerDown:this.handlePointerDown,onPointerUp:this.onPointerUp,onPointerEnter:this.onPointerEnter,onPointerLeave:this.onPointerLeave,onRootPointerMove:this.onRootPointerMove,onDOMElement:this._pointerRecognizerRef},r&&a?c.createElement("div",{style:l,className:"PSPDFKit-Annotation","data-annotation-id":n},c.createElement("div",{style:u},this.renderWidgetMaybeWithAPStream())):c.createElement("div",{className:"PSPDFKit-Annotation","data-annotation-id":n},this.renderWidgetMaybeWithAPStream())))}}const Sr=(0,Se.XN)(wr,{forwardRef:!0}),Pr={cursor:"pointer"},Er={pointerEvents:"none"};var xr=n(10284);const Dr=(0,Zn.x)((function(e,t){let{annotation:n}=t;const o=e.formFields.get(n.formFieldName),r=o&&e.formattedFormFieldValues.get(o.name),i=o&&e.editingFormFieldValues.get(o.name);return{annotation:n,formField:(null==o?void 0:o.set("readOnly",(0,Kn.VY)(o,n,e)))||null,frameWindow:e.frameWindow,formDesignMode:e.formDesignMode,backend:e.backend,formattedValue:r,editingValue:i,canFillFormFieldCP:!!o&&(0,xr.os)(o,e),viewportState:e.viewportState,hasDownVariantAPStream:!("number"!=typeof n.pdfObjectId||!e.APStreamVariantsDown.has(n.pdfObjectId)),hasRolloverVariantAPStream:!("number"!=typeof n.pdfObjectId||!e.APStreamVariantsRollover.has(n.pdfObjectId)),annotationToFocus:e.widgetAnnotationToFocus}}),{forwardRef:!0})(Sr),Cr=Dr;var kr=n(57497),Or=n.n(kr),Ar=n(70094);const Tr=Ar.p1;const Ir=function(e){var t;const{annotation:n,dispatch:o,zoomLevel:r,isAnnotationSelected:i,activeAnnotationNote:a,visible:s}=e,l=a&&(null===(t=a.parentAnnotation)||void 0===t?void 0:t.id)===n.id,u=n.isCommentThreadRoot,p=c.useMemo((()=>l&&a?a:(0,Ar.Yu)(n,u?24:Tr,u?24:Tr)),[n,l,u,a]),f=p.position,h=(u||n.note||l)&&function(e){return!(e instanceof de.Qi||e instanceof de.gd||e instanceof de.Jn||e instanceof de.x_||e instanceof de.R1||function(e){return e.creatorName&&/AutoCAD SHX Text/i.test(e.creatorName)}(e))}(n),m=!Ke.Ni&&!u,{width:g,height:v}=p.boundingBox,y={width:g,height:v,transformOrigin:"top left",transform:`translate(${g*r/2-g/2}px, ${v*r/2-v/2}px)`,cursor:(0,_.B7)(n,{isAnnotationNote:!0})},b=n.constructor.readableName,w=(0,_.B7)(n);return c.createElement(c.Fragment,null,h&&c.createElement(xe,{position:f,zoomLevel:r},c.createElement(Je.Z,{onPointerUp:e=>{u?o((0,De.mg)(n,e)):(i||o((0,De.mg)(p.parentAnnotation,e)),o((0,De.mv)(p))),e&&e.stopPropagation()}},c.createElement("div",{className:d()({"PSPDFKit-Annotation-Note":!0,[Or().noteIndicator]:!0,[Or().noteIndicatorActive]:i||l,[`PSPDFKit-Annotation-Note-${b}Annotation`]:!!b}),onMouseEnter:m?e=>{o((0,De._3)(p)),e&&e.stopPropagation()}:void 0,onMouseLeave:m?e=>{o((0,De._3)(null)),e&&e.stopPropagation()}:void 0,style:{cursor:w}},s?c.createElement(Oe.Z,{style:y,className:d()(Or().icon,l&&Or().iconActive),type:u?"comment-indicator":"note-indicator"}):c.createElement("div",{style:y})))))},Fr=c.memo((function(e){const{annotation:t,annotation:{boundingBox:n},zoomLevel:o,backend:r,onFocus:i,onBlur:a,isMultiAnnotationsSelected:l}=e,{formatMessage:u}=(0,Se.YB)(),p={width:n.width*o,height:n.height*o},[f,h]=c.useState(void 0),[m,g]=c.useState(void 0);c.useEffect((()=>{r.cachedRenderAnnotation(t,void 0,p.width,p.height).promise.then((e=>{if((null==e?void 0:e.element)instanceof HTMLImageElement)return g(e.element.src)})).catch((e=>{throw new s.p2(`Could not render the media annotation: ${e.message}`)}))}),[t,r,p.width,p.height]),c.useEffect((()=>{r.getAttachment(t.mediaAttachmentId).then((e=>h(e))).catch((()=>{throw new s.p2("Could not get media attachment for "+t.id)}))}),[t.mediaAttachmentId,r,t.id]);const v=c.useMemo((()=>f?URL.createObjectURL(f):""),[f]);c.useEffect((()=>function(){v&&URL.revokeObjectURL(v)}),[v]);const y=c.useCallback((function(e){i(t,e)}),[t,i]),b=c.useCallback((function(e){a(t,e)}),[t,a]);return v?c.createElement(xe,{position:n.getLocation(),zoomLevel:o,isMultiAnnotationsSelected:l},c.createElement("div",{className:d()("PSPDFKit-MediaAnnotation","PSPDFKit-Annotation"),"data-annotation-id":t.id,tabIndex:0,onFocus:y,onBlur:b},c.createElement("video",{src:v,controls:!0,width:p.width,height:p.height,poster:m,"aria-label":`${u(ke.Z.annotation)}: ${u(ke.Z.mediaAnnotation)} ${t.fileName}`},u(ke.Z.mediaFormatNotSupported)))):null})),Mr=Fr;var _r=n(58479);const Nr=c.forwardRef((function(e,t){let{annotation:n,globalAnnotation:o,attachments:r,backend:i,dispatch:s,isAnnotationReadOnly:l,isDisabled:u,isHover:d,isFocused:p,onBlur:f,onFocus:h,pageSize:m,zoomLevel:g,rotation:v,pageRotation:y,isSelected:b,showAnnotationNotes:w,activeAnnotationNote:S,onClick:P,isResizing:E=!1,isModifying:x=!1,isDragging:D=!1,isRotating:C=!1,cursor:k,shouldRenderAPStream:O,isMultiAnnotationsSelected:A=!1,isComboBoxOpen:T,handleComboBoxRect:I}=e;const[F,M]=c.useState(!1),N=c.useCallback((()=>M(!0)),[]),R=(0,a.v9)((e=>"formFieldName"in n?e.formFields.get(n.formFieldName):void 0)),L=(0,a.v9)((e=>(0,er.Zt)(e,n))),B=(0,_r.jC)({annotation:n,formField:R,zoomLevel:g,isDigitallySignedWidget:L});c.useEffect((()=>{B&&Ye({annotation:n,formField:R,zoomLevel:g,isDigitallySigned:L},B)&&M(!1)}),[n,R,g,L]);const j=l(n),z={backend:i,dispatch:s,isDisabled:u,isSelectable:!j,onBlur:f,onFocus:h,ref:t,zoomLevel:g,rotation:v,isDragging:D,shouldKeepRenderingAPStream:O&&!E&&!x&&!C&&!F,isFocused:p,isMultiAnnotationsSelected:A,cursor:k,isComboBoxOpen:T,handleComboBoxRect:I,onError:N},K=(0,a.v9)((e=>e.secondaryMeasurementUnit));let Z=null;return n instanceof de.Hu&&(Z=c.createElement(Mr,(0,ue.Z)({},z,{annotation:n}))),n instanceof de.sK?Z=c.createElement(nt,(0,ue.Z)({},z,{attachment:n.imageAttachmentId?r.get(n.imageAttachmentId):null,annotation:n})):n instanceof de.Zc?Z=c.createElement(ut,(0,ue.Z)({},z,{annotation:n})):n instanceof de.R1?Z=c.createElement(yt,(0,ue.Z)({},z,{isHover:d,annotation:n})):n instanceof de.Qi?Z=c.createElement(Ct,(0,ue.Z)({},z,{isReadOnly:j,annotation:n})):n instanceof de.UX?Z=c.createElement(on,(0,ue.Z)({},z,{annotation:n,secondaryMeasurementUnit:K})):n instanceof de.GI?Z=c.createElement(sn,(0,ue.Z)({},z,{annotation:n,globalAnnotation:o})):n instanceof de.gd?Z=c.createElement(Sn,(0,ue.Z)({},z,{pageSize:m,onClick:P,annotation:n,globalAnnotation:o})):n instanceof de.Wk?Z=c.createElement(An,(0,ue.Z)({},z,{active:b,annotation:n})):n instanceof de.On?Z=c.createElement(Ln,(0,ue.Z)({},z,{active:b,pageRotation:y,annotation:n})):n instanceof de.Ih?Z=c.createElement(zn,(0,ue.Z)({},z,{annotation:n})):n instanceof de.x_?Z=c.createElement(Cr,(0,ue.Z)({},z,{annotation:n})):n instanceof de.Jn&&(Z=c.createElement(Fe,(0,ue.Z)({},z,{isReadOnly:j,active:b,annotation:n}))),c.createElement(ve,{key:n.id,zoomLevel:g,renderer:"Annotation",notCSSScaled:n instanceof de.x_},c.createElement(Lr,{annotation:n},Z,w&&(0,_.YV)(n)&&c.createElement(Ir,{dispatch:s,annotation:n,zoomLevel:g,isAnnotationSelected:b,activeAnnotationNote:S,visible:!0})))})),Rr=Nr;function Lr(e){let{children:t}=e;return c.createElement("div",null,t)}const Br=(0,a.$j)(((e,t)=>{let{pageIndex:n}=t;return{viewportState:e.viewportState,transformClientToPage:function(t){return e.transformClientToPage(t,n)}}})),jr=(0,a.$j)((e=>({transformClientToPage:e.transformClientToPage})));var zr=n(51333),Kr=n(2019),Zr=n.n(Kr);class Ur extends c.PureComponent{constructor(e){let t,n,r;if(super(e),(0,o.Z)(this,"layerRef",c.createRef()),(0,o.Z)(this,"_handlePointerUp",(e=>{if(!e.isPrimary)return;const t=this._getNormalizedMousePosition(e);if(!t)return;const n=this._fitRectInPage(new w.UL({left:t.x-this.sizes.width/2,top:t.y-this.sizes.height/2,width:this.sizes.width,height:this.sizes.height}),this.props.pageSize),o=this.props.annotation.set("pageIndex",this.props.pageIndex).set("boundingBox",n);e.stopPropagation(),o instanceof w.Qi?this.props.dispatch((0,bt.FG)(o)):o instanceof w.Jn&&(this.props.dispatch((0,bt.Zr)((0,i.aV)([o]))),this.props.dispatch((0,zr.mh)(o.id)))})),e.annotation instanceof w.Qi)t=n=r=Be.SP,this.cursor="context-menu";else{if(!(e.annotation instanceof w.Jn))throw Error("Annotation type not supported.");t=n=r=Be.zk,this.cursor="context-menu"}this.sizes={width:t,height:n,minWidth:r}}_getNormalizedMousePosition(e){const{target:t}=e;if(this.layerRef.current){const{defaultView:n}=this.layerRef.current.ownerDocument;if(t instanceof n.HTMLDivElement)return this.props.transformClientToPage(new w.E9({x:e.clientX,y:e.clientY}),this.props.pageIndex)}}_fitRectInPage(e,t){const{width:n,height:o}=t,r=this.sizes.minWidth||this.sizes.width;return e.top+e.height>o&&(e=e.set("top",o-e.height)),e.left+r>n&&(e=e.set("left",n-r)),e}render(){return c.createElement(Je.Z,{onPointerUp:this._handlePointerUp},c.createElement("div",{"data-testid":"create-annotation-layer"},c.createElement("div",{className:Zr().layer,style:{cursor:this.cursor||"auto"},ref:this.layerRef})))}}const Vr=jr(Ur);var Gr=n(921),Wr=n.n(Gr);class qr extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"state",{currentSelectableAnnotation:null}),(0,o.Z)(this,"_handlePointerDownCapture",(e=>{this._pointerDownTime=Date.now();const t=this._transformToPagePoint(e);this._selectableAnnotation=this.findSelectableAnnotation(t);const n=this._selectableAnnotation instanceof w.R1;var o,r,i,a;(n&&(this._selectedAnnotationOnDown=this.findSelectedAnnotationAtPoint(t)),this._isInterestedInUpCapture=n&&!this._selectedAnnotationOnDown,e.metaKey||e.ctrlKey&&this.props.isMultiSelectionEnabled)?(null===(o=(r=this.props).setMultiAnnsInitialEvent)||void 0===o||o.call(r,e.nativeEvent),this.props.dispatch((0,Kt.YF)(!0))):null===(i=(a=this.props).setMultiAnnsInitialEvent)||void 0===i||i.call(a,void 0)})),(0,o.Z)(this,"_handlePointerUpCapture",(e=>{if(!this._selectableAnnotation||!this._isInterestedInUpCapture||!this.getSelection().isCollapsed)return;const t=Date.now()-this._pointerDownTime>300,n=this._selectableAnnotation,o=n instanceof w.R1;if(t&&!o)return void(this._selectableAnnotation=null);const r=n instanceof w.On||o,i=!this._selectedAnnotationOnDown&&Boolean(this.findSelectedAnnotationAtPoint(this._transformToPagePoint(e)));this.props.dispatch((0,De.mg)(n,e,{preventDefault:r,stopPropagation:r,clearSelection:i,longPress:t&&o}))})),(0,o.Z)(this,"_handlePointerUp",(e=>{if(!this.getSelection().isCollapsed||!this._selectableAnnotation||this._selectedAnnotationOnDown)return;const t=this._selectableAnnotation,n=t instanceof w.On;this.props.dispatch((0,De.mg)(t,e,{preventDefault:n,stopPropagation:n}))})),(0,o.Z)(this,"_handlePointerMove",(e=>{if("mouse"!==e.pointerType)return;const{currentSelectableAnnotation:t}=this.state,n=this._transformToPagePoint(e),o=this.findSelectableAnnotation(n);!(0,i.is)(o,t)&&(t&&this.props.hoverAnnotationIds.has(t.id)&&this.props.dispatch((0,De.IP)(t.id)),!o||this.props.hoverAnnotationIds.has(o.id)||this.checkifHoverPointIsDefferedRegion(new w.E9({x:e.clientX,y:e.clientY}))||this.props.dispatch((0,De.oX)(o.id)),this.setState({currentSelectableAnnotation:o}))}))}checkifHoverPointIsDefferedRegion(e){if(this.props.hitCaptureDeferredRect&&this.props.hitCaptureDeferredRect.length>0)for(const t of this.props.hitCaptureDeferredRect){if(e.x>=t.left&&e.x<=t.right&&e.y>=t.top&&e.y<=t.bottom)return!0}return!1}_transformToPagePoint(e){return this.props.transformClientToPage(new w.E9({x:e.clientX,y:e.clientY}),this.props.pageIndex)}_boundingBoxHitTest(e){const t=Ke.Ni?Be.wK:Be.XZ;return n=>n instanceof w.R1?n.boundingBox.isPointInside(e):n.boundingBox.grow(t).isPointInside(e)}_findSelectableLinkAnnotation(e){return this.props.selectableLinkAnnotations.filter(_.Fp).findLast(this._boundingBoxHitTest(e))}_findSelectableTextMarkupAnnotation(e){return this.props.selectableTextMarkupAnnotations.filter(_.Fp).findLast((t=>t.rects.find((t=>t.grow(Ke.Ni?Be.wK:Be.XZ).isPointInside(e)))))}findSelectableAnnotation(e){const t=this._findSelectableLinkAnnotation(e),n=this._findSelectableTextMarkupAnnotation(e);return t||n}findSelectedAnnotationAtPoint(e){return this.props.selectedAnnotations.findLast(this._boundingBoxHitTest(e))}getSelection(){return this.props.window.getSelection()}render(){const e=!!this.state.currentSelectableAnnotation,t=d()({[Wr().layer]:!0,[Wr().cursorText]:this.props.keepSelectedTool&&"TEXT"===this.props.interactionMode,[Wr().cursorPointer]:e,"PSPDFKit-CursorPointer":e});return c.createElement(Je.Z,{onPointerMove:this._handlePointerMove,onPointerUp:this._handlePointerUp,onPointerDownCapture:this.props.isHitCaptureDeferred?void 0:this._handlePointerDownCapture,onPointerDown:this.props.isHitCaptureDeferred?this._handlePointerDownCapture:void 0,onPointerUpCapture:this._handlePointerUpCapture},c.createElement("div",{className:t},this.props.children))}}const Hr=jr(qr);var $r=n(73815);class Xr extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"precision",(0,ot.HB)(this.props.zoomLevel)),(0,o.Z)(this,"pointsToPathArray",rt.Options.ENABLE_INK_SMOOTH_LINES?e=>(0,ot.vR)(e,this.precision):ot.$U),(0,o.Z)(this,"_pathDataFromFragments",((e,t,n)=>{if(!n||n.length<3)return null;const o=this.props.annotation.lines.get(t);return!o||o.size<n.length||o.size<4?null:o.size===n.length?n:[...n.slice(0,n.length-2),...this.pointsToPathArray(o.slice(n.length-2)).slice(1)]})),(0,o.Z)(this,"_onDrawStart",(e=>{let{annotation:t,onDrawStart:n}=this.props;this.precision=(0,ot.HB)(this.props.zoomLevel),t=t.update("lines",(t=>t.push((0,i.aV)([e,new w.Wm({x:e.x,y:e.y,intensity:e.intensity})])))),t=t.set("boundingBox",(0,ot.gz)(t)),n(t)})),(0,o.Z)(this,"_onDraw",(e=>{let{annotation:t,onDraw:n}=this.props,o=t.lines.last();(0,s.kG)(o),o=e.reduce(((e,t)=>(0,ot.H9)(e,t,this.props.distanceBetweenPoints)?e.push(t):e),o.pop()).push(e[e.length-1]),t=t.setIn(["lines",this.props.annotation.lines.size-1],o),t=t.set("boundingBox",function(e,t){const{boundingBox:n,lineWidth:o}=e;let{left:r,top:i,width:a,height:s}=n,l=Math.floor(r),c=Math.floor(i),u=Math.ceil(r+a),d=Math.ceil(i+s);return t.forEach((e=>{l=Math.floor(Math.min(r,e.x-o/2)),c=Math.floor(Math.min(i,e.y-o/2)),u=Math.ceil(Math.max(r+a,e.x+o/2)),d=Math.ceil(Math.max(i+s,e.y+o/2)),r=l,i=c,a=u-l,s=d-c})),new w.UL({left:r,top:i,width:a,height:s})}(t,o)),n(t)})),(0,o.Z)(this,"_onDrawEnd",(()=>{let{annotation:e,onDrawEnd:t}=this.props;const n=e.lines.last();if((0,s.kG)(n),n.size>1){const t=n.get(n.size-2);t&&0===n.last().distance(t)&&(e=e.updateIn(["lines",e.lines.size-1],(e=>e.pop())))}t(e)}))}render(){const{annotation:e,canvasSize:t,zoomLevel:n}=this.props,{boundingBox:o}=e;return c.createElement("div",{className:at().canvas,style:{cursor:this.props.cursor,mixBlendMode:(0,_.vk)(e.blendMode)},"data-testid":"ink-canvas-outer-div"},c.createElement(xe,{zoomLevel:n,applyZoom:!0},c.createElement("div",{style:{position:"absolute",top:o.top,left:o.left,width:o.width,height:o.height}},c.createElement(dt,{isSelectable:!1,annotation:e,viewBox:o,pathDataFromFragments:this._pathDataFromFragments,precision:this.precision}))),c.createElement(zt.Z,{scrollElement:this.props.scrollElement,size:t,onDrawStart:this._onDrawStart,onDrawCoalesced:this._onDraw,onDrawEnd:this._onDrawEnd,transformPoint:this.props.transformPoint,interactionMode:this.props.interactionMode,canScrollWhileDrawing:this.props.canScrollWhileDrawing}))}}(0,o.Z)(Xr,"defaultProps",{canvasSize:new w.$u({width:300,height:200}),distanceBetweenPoints:0,cursor:"default",zoomLevel:1});const Yr=(0,io.Z)(ot.Vv);function Jr(e){const t=e.inkAnnotation.lineWidth/2*e.viewportState.zoomLevel;return{currentInkAnnotation:e.inkAnnotation,cursor:Yr(t),zoomLevel:e.viewportState.zoomLevel,inkAnnotationFromCurrentProps:e.inkAnnotation}}class Qr extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"state",Jr(this.props)),(0,o.Z)(this,"lastEndDrawingTime",Date.now()),(0,o.Z)(this,"_transformClientToPage",(e=>e.apply(this.props.clientToPageTransformation))),(0,o.Z)(this,"_onDrawStart",(e=>{const t=e.pageIndex,n={annotations:(0,i.aV)([e]),reason:Q.f.DRAW_START};this.props.eventEmitter.emit("annotations.willChange",n),null===t?e=e.set("pageIndex",this.props.pageIndex):t!==this.props.pageIndex?(e=e.set("pageIndex",this.props.pageIndex),this.props.dispatch((0,bt.vc)(e,this.props.pageIndex))):(0,ot.Ip)(e,this.props.pageSize,this.lastEndDrawingTime)||(e=(e=e.update("lines",(e=>(0,i.aV)([e.last()])))).set("boundingBox",(0,ot.gz)(e)),this.props.dispatch((0,bt.vc)(e,this.props.pageIndex))),this.setState({currentInkAnnotation:e})})),(0,o.Z)(this,"_onDraw",(e=>{this.setState({currentInkAnnotation:e})})),(0,o.Z)(this,"_onDrawEnd",(e=>{const t={annotations:(0,i.aV)([e]),reason:Q.f.DRAW_END};this.props.eventEmitter.emit("annotations.willChange",t),this.lastEndDrawingTime=Date.now(),this.setState({currentInkAnnotation:e},(()=>{this.state.currentInkAnnotation.lines.size&&this.props.dispatch((0,bt.FG)(this.state.currentInkAnnotation))}))}))}static getDerivedStateFromProps(e,t){return(0,i.is)(t.inkAnnotationFromCurrentProps,e.inkAnnotation)||(0,i.is)(t.currentInkAnnotation,e.inkAnnotation)&&e.viewportState.zoomLevel===t.zoomLevel?null:Jr(e)}componentDidMount(){this.props.dispatch((0,Kt.X2)())}componentWillUnmount(){this.props.dispatch((0,Kt.Zg)())}render(){const e=this.state.currentInkAnnotation,{pageSize:t}=this.props,{INK_EPSILON_RANGE_OPTIMIZATION:n}=rt.Options;return c.createElement(Xr,{scrollElement:this.props.scrollElement,annotation:e,canvasSize:t,onDrawStart:this._onDrawStart,onDrawEnd:this._onDrawEnd,onDraw:this._onDraw,transformPoint:this._transformClientToPage,distanceBetweenPoints:n/(this.props.viewportState.zoomLevel*(0,$r.L)()),cursor:this.state.cursor,zoomLevel:this.props.viewportState.zoomLevel,interactionMode:this.props.interactionMode,canScrollWhileDrawing:this.props.canScrollWhileDrawing})}}const ei=(0,a.$j)(((e,t)=>{let{pageIndex:n}=t;return{viewportState:e.viewportState,clientToPageTransformation:(0,H.zi)(e,n),eventEmitter:e.eventEmitter,interactionMode:e.interactionMode,canScrollWhileDrawing:e.canScrollWhileDrawing}}))(Qr);var ti=n(52871);const ni=100;function oi(e,t){const n=Math.floor(e.x/ni);return Math.floor(e.y/ni)*t+n}function ri(e,t,n,o){const{lineWidth:r,id:i}=e,a=Math.ceil(o.width/ni),s=t/2;return e.lines.forEach(((e,t)=>{e.forEach(((e,o)=>{if(null==e)return;const l=Math.floor(e.x/ni),c=Math.floor(e.y/ni),u={point:e,annotationId:i,lineIndex:t,pointIndex:o,strokeRadius:r/2},d=Math.ceil((s+u.strokeRadius)/ni);for(let t=c-d;t<=c+d;t++)for(let o=l-d;o<=l+d;o++)if(o>-1&&t>-1){if(new ti.Z({x:o<l?(o+1)*ni:o===l?e.x:o*ni,y:t<c?(t+1)*ni:t===c?e.y:t*ni}).distance(e)<s+u.strokeRadius){const e=t*a+o;n[e]?n[e].push(u):n[e]=[u]}}}))})),n}function ii(e,t,n,o){return!(e.x+o<t.x-n||e.x-o>t.x+n||e.y+o<t.y-n||e.y-o>t.y+n)&&e.distance(t)<n+o}const ai=(0,a.$j)(((e,t)=>{let{pageIndex:n}=t;return{inkEraserCursorWidth:e.inkEraserCursorWidth,zoomLevel:e.viewportState.zoomLevel,clientToPageTransformation:(0,H.zi)(e,n),scrollElement:e.scrollElement,interactionMode:e.interactionMode}}))((function(e){const{canvasSize:t=new w.$u({width:300,height:200}),inkEraserCursorWidth:n,zoomLevel:o,dispatch:r,inkAnnotations:a,clientToPageTransformation:s}=e,l=c.useMemo((function(){return(0,ot.Vv)(n/2*o)}),[n,o]),[u,d]=c.useState({localAnnotations:a,lastErasedPointsPaths:[]}),p=c.useRef(null),f=c.useCallback((e=>e.apply(s)),[s]);c.useEffect((()=>{p.current=a.reduce(((e,o)=>ri(o,n,e,t)),[]),d({localAnnotations:a,lastErasedPointsPaths:[]})}),[a,n,t]);const h=c.useCallback((e=>{d(function(e,t,n,o,r,i){const a=Math.ceil(i.width/ni),s={};return t.forEach((e=>{const t=oi(e,a);o[t]&&o[t].forEach((t=>{t&&t.point&&ii(t.point,e,n/2,t.strokeRadius)&&(t.point=null,r.push([t.annotationId,t.lineIndex,t.pointIndex]),s[t.annotationId]=!0)}))})),{localAnnotations:e.map((e=>s[e.id]?e.withMutations((t=>{r.filter((t=>t[0]===e.id)).forEach((e=>{t.setIn(["lines",e[1],e[2]],null)}))})):e)),lastErasedPointsPaths:r}}(u.localAnnotations,Array.isArray(e)?e:[e],n,p.current,[],t))}),[u.localAnnotations,n,t]),m=c.useCallback((()=>{const e=function(e,t){return e.map(((e,n)=>e===t.get(n)?e:(e=e.withMutations((e=>{e.update("lines",(e=>e.reduce(((e,t)=>e.concat(t.reduce(((e,t)=>null==t?e.push((0,i.aV)()):e.update(-1,(e=>e.push(t)))),(0,i.aV)([(0,i.aV)()])).filter((e=>e.size>0)))),(0,i.aV)()).filter((e=>e.size>0))))}))).set("boundingBox",(0,ot.gz)(e))))}(u.localAnnotations,a);r((0,bt.GZ)(e.filter((e=>e.lines&&e.lines.size>0)),e.filter((e=>!e.lines||0===e.lines.size)).map((e=>e.id))))}),[u.localAnnotations,r,a]);c.useEffect((()=>(r((0,Kt.X2)()),()=>{r((0,Kt.Zg)())})),[r]);const g=c.useCallback(((e,t,n)=>{var o;if(!n)return null;const{lastErasedPointsPaths:r,localAnnotations:i}=u;if(0===r.length)return n;const a=null==i||null===(o=i.find((t=>t.id===e)))||void 0===o?void 0:o.lines.get(t);return a&&a.size===n.length?r.reduce(((n,o)=>{if(function(e,t,n,o){return e[0]===n&&e[1]===o&&"M 0,0"!==t[e[2]]}(o,n,e,t)){n[o[2]]="M 0,0";const e=n[o[2]+1],t=a.get(o[2]+1);if(t&&si(e)){const e=n[o[2]+2];n[o[2]+1]=`${si(e)?"M":"L"} ${t.x},${t.y}`}const r=n[o[2]-1],i=a.get(o[2]-1),s=i?`L ${i.x},${i.y}`:"";if(si(r)){const e=n[o[2]-2];i&&li(e)&&(n[o[2]-1]=s)}else i&&li(r)&&(n[o[2]-1]=s);return n}return n}),n):null}),[u]);return c.createElement("div",{className:at().canvas,style:{cursor:l}},u.localAnnotations.map((e=>c.createElement(ut,{dispatch:r,annotation:e,isSelectable:!1,isDisabled:!0,zoomLevel:o,key:e.id,pathDataFromFragments:g}))),c.createElement(zt.Z,{size:t,onDrawStart:h,onDrawCoalesced:h,onDrawEnd:m,transformPoint:f,interactionMode:e.interactionMode,scrollElement:e.scrollElement}))}));function si(e){return"string"==typeof e&&e.startsWith("C")}function li(e){return"string"==typeof e&&e.startsWith("M")}const ci=(0,a.$j)(((e,t)=>{let{pageIndex:n}=t;return{inkEraserCursorWidth:e.inkEraserCursorWidth,zoomLevel:e.viewportState.zoomLevel,clientToPageTransformation:(0,H.zi)(e,n),scrollElement:e.scrollElement,interactionMode:e.interactionMode}}))((function(e){const{canvasSize:t=new w.$u({width:300,height:200}),inkEraserCursorWidth:n,zoomLevel:o,dispatch:r,inkAnnotations:a,clientToPageTransformation:s}=e,l=c.useMemo((function(){return(0,ot.Vv)(n/2*o)}),[n,o]),[u,d]=c.useState({localAnnotations:a,lastErasedLinesPaths:[]}),p=c.useRef(null),f=c.useCallback((e=>e.apply(s)),[s]);c.useEffect((()=>{p.current=a.reduce(((e,o)=>ri(o,n,e,t)),[]),d({localAnnotations:a,lastErasedLinesPaths:[]})}),[a,n,t]);const h=c.useCallback((e=>{d(function(e,t,n,o,r,a){const s=Math.ceil(a.width/ni),l={};return t.forEach((e=>{const t=oi(e,s);o[t]&&o[t].forEach((t=>{t&&t.point&&ii(t.point,e,n/2,t.strokeRadius)&&(t.point=null,r.push([t.annotationId,t.lineIndex]),l[t.annotationId]=!0)}))})),{localAnnotations:e.map((e=>l[e.id]?e.withMutations((t=>{r.filter((t=>t[0]===e.id)).forEach((e=>{t.setIn(["lines",e[1]],(0,i.aV)([]))}))})):e)),lastErasedLinesPaths:r}}(u.localAnnotations,Array.isArray(e)?e:[e],n,p.current,[],t))}),[u.localAnnotations,n,t]),m=c.useCallback((()=>{const e=function(e,t){return e.map(((e,n)=>e===t.get(n)?e:(e=e.update("lines",(e=>e.filter(Boolean).filter((e=>e.size>0))))).set("boundingBox",(0,ot.gz)(e))))}(u.localAnnotations,a);r((0,bt.GZ)(e.filter((e=>{var t;return(null===(t=e.lines)||void 0===t?void 0:t.size)>0})),e.filter((e=>!e.lines||0===e.lines.size)).map((e=>e.id))))}),[u.localAnnotations,r,a]);return c.useEffect((()=>(r((0,Kt.X2)()),()=>{r((0,Kt.Zg)())})),[r]),c.createElement("div",{className:at().canvas,style:{cursor:l}},u.localAnnotations.map((e=>c.createElement(ut,{dispatch:r,annotation:e,isSelectable:!1,isDisabled:!0,zoomLevel:o,key:e.id}))),c.createElement(zt.Z,{size:t,onDrawStart:h,onDrawCoalesced:h,onDrawEnd:m,transformPoint:f,interactionMode:e.interactionMode,scrollElement:e.scrollElement}))}));class ui extends c.Component{constructor(e){super(e),(0,o.Z)(this,"_handledBlur",!1),(0,o.Z)(this,"editor",c.createRef()),(0,o.Z)(this,"shouldComponentUpdate",Ce.O),(0,o.Z)(this,"clearText",(()=>{const{current:e}=this.editor;if(!e)return"";e.innerText="",setTimeout((()=>{this.props.valueDidUpdate&&this.props.valueDidUpdate()}),0),this.focus()})),(0,o.Z)(this,"focus",(()=>{const{current:e}=this.editor;e&&(e.focus(),setTimeout((()=>{const{current:e}=this.editor;e&&("webkit"!==Ke.SR&&(this._handledBlur=!0,e.blur()),e.focus())}),0),this.setInitialSelection())})),(0,o.Z)(this,"_createRangeAndSelect",(e=>{const{current:t}=this.editor;if(!t)return;const{ownerDocument:n,childNodes:o}=t,r=o[o.length-1];if(!r)return;if(void 0===n.createRange)return;const i=n.createRange();let a;a="gecko"===Ke.SR?r.length-1:r.length,i.setStart(r,e?0:a),i.setEnd(r,a),this.setSelection(i)})),(0,o.Z)(this,"_preventDeselect",(e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()})),(0,o.Z)(this,"_handleKeyDown",(e=>{if(e.keyCode!==Zo.zz){if(e.keyCode===Zo.E$&&e.shiftKey)return this.props.onStopEditing(),void e.preventDefault();if(this.getPlainText().length>=this.props.maxLength)e.preventDefault();else if("blink"===Ke.SR&&e.keyCode===Zo.E$){const{current:n}=this.editor;if(!n)return;const{defaultView:o}=n.ownerDocument;(0,s.kG)(o,"defaultView is null");const r=o.getSelection();if(null!=r&&r.anchorNode&&"#text"===(null==r?void 0:r.anchorNode.nodeName)){var t;const n=di(r);if(null===(t=r.anchorNode.parentNode)||void 0===t||t.normalize(),r.anchorNode&&"#text"===r.anchorNode.nodeName){const t=r.anchorOffset;"Range"===r.type&&r.deleteFromDocument();const o=r.anchorNode.nodeValue;(0,s.kG)(o,"currentText is null");const i=n&&o.replace(/\n/,"").length>0;r.anchorNode.nodeValue=o.substr(0,r.anchorOffset)+"\n"+(i?"\n":"")+o.substr(r.anchorOffset),r.collapse(r.anchorNode,t+1),e.preventDefault(),setTimeout((()=>{this.props.valueDidUpdate&&this.props.valueDidUpdate()}),0)}}}else if("gecko"===Ke.SR&&e.keyCode===Zo.E$){const{current:t}=this.editor;if(!t)return;const{defaultView:o}=t.ownerDocument;(0,s.kG)(o,"defaultView is null");const r=o.getSelection();if(null!=r&&r.anchorNode&&"#text"===(null==r?void 0:r.anchorNode.nodeName)&&(function(e){let{anchorNode:t,anchorOffset:n}=e;return null!=t&&("#text"===t.nodeName&&(0===n||t.nodeValue.length>n&&"\n"===t.nodeValue.charAt(n-1))||"DIV"===t.nodeName&&t.hasChildNodes()&&t.childNodes.length>0&&"BR"===t.childNodes[0].nodeName)}(r)||di(r))){var n;const t=di(r);if(null===(n=r.anchorNode.parentNode)||void 0===n||n.normalize(),r.anchorNode&&"#text"===r.anchorNode.nodeName){const n=r.anchorOffset;"Range"===r.type&&r.deleteFromDocument();const o=r.anchorNode.nodeValue;(0,s.kG)(o,"currentText is null");const i=t&&o.replace(/\n/,"").length>0;r.anchorNode.nodeValue=o.substr(0,r.anchorOffset)+"\n"+(i?"\n":"")+o.substr(r.anchorOffset),r.collapse(r.anchorNode,n+1+(i?1:0)),e.preventDefault(),setTimeout((()=>{this.props.valueDidUpdate&&this.props.valueDidUpdate()}),0)}}}}else this.props.onEscape(e)})),(0,o.Z)(this,"_handleInput",(()=>{const{current:e}=this.editor;if(e){if("gecko"===Ke.SR){const{innerText:t}=e,n=t.charAt(t.length-1);if(" "===n){const t=e.childNodes[e.childNodes.length-1];t.nodeValue===n&&(t.nodeValue="\n")}}this.props.valueDidUpdate&&this.props.valueDidUpdate()}})),(0,o.Z)(this,"_handlePaste",(e=>{var t,n;if(!this.editor.current)return;const o=this.editor.current.ownerDocument;e.preventDefault();const r=null===(t=e.clipboardData)||void 0===t?void 0:t.getData("text/plain");this.getPlainText().length+r.length>=this.props.maxLength||o.execCommand("insertText",!1,cn().sanitize(null===(n=e.clipboardData)||void 0===n?void 0:n.getData("text/plain")))})),(0,o.Z)(this,"_handleDrop",(e=>{if(!this.editor.current)return;const t=this.editor.current.ownerDocument;if(e.preventDefault(),e.dataTransfer){const n=e.dataTransfer.getData("text/plain");if(this.getPlainText.length+n.length>=this.props.maxLength)return;t.execCommand("insertText",!1,n),this.props.valueDidUpdate&&this.props.valueDidUpdate()}})),(0,o.Z)(this,"_handleScroll",(e=>{const{current:t}=this.editor;t&&(t.scrollTop=0,t.scrollLeft=0,e.stopPropagation(),e.preventDefault())})),(0,o.Z)(this,"_handlePointerDown",(e=>{this.editor.current&&(this.editor.current.contains(e.target)||this._handleBlur())})),(0,o.Z)(this,"_handleBlur",(()=>{this._handledBlur||(this._handledBlur=!0,this.props.onBlur())})),(0,o.Z)(this,"_handleFocus",(()=>{this._handledBlur=!1,this.props.onFocus&&this.props.onFocus()})),this.innerText=this.props.defaultValue+"\n"}componentDidMount(){this.editor.current&&(this.props.autoFocus||this.props.autoSelect)&&this.focus()}getElement(){return this.editor.current}getEditorBoundingClientRect(){const{current:e}=this.editor;return(0,s.kG)(e),w.UL.fromClientRect(e.getBoundingClientRect())}getPlainText(){const{current:e}=this.editor;return e?void 0===e.innerText?"":e.innerText.replace(/\n$/,""):""}setSelection(e){const{current:t}=this.editor;if(!t)return;const n=t.ownerDocument.getSelection();null==n||n.removeAllRanges(),null==n||n.addRange(e)}blur(){this.editor.current&&this.editor.current.blur()}setInitialSelection(){if(this.props.autoSelect)return void this.autoSelectText();const{lastMousePoint:e}=this.props;let t,n=!1;if(e){if(!this.editor.current)return;const{ownerDocument:o}=this.editor.current;t=(0,s.Qo)(e,o),n=!!t&&(t.commonAncestorContainer===this.editor.current||t.commonAncestorContainer.parentElement===this.editor.current)}t&&n?this.setSelection(t):this.moveFocusToEnd()}moveFocusToEnd(){this._createRangeAndSelect(!1)}autoSelectText(){this._createRangeAndSelect(!0)}render(){return c.createElement(c.Fragment,null,c.createElement("div",{style:this.props.style,className:pn().editor,onInput:this._handleInput,onBlur:this._handleBlur,onFocus:this._handleFocus,onMouseUp:this._preventDeselect,onPointerUp:this._preventDeselect,onKeyDown:this._handleKeyDown,onKeyUp:this._preventDeselect,onTouchStart:this._preventDeselect,onTouchEnd:this._preventDeselect,onPaste:this._handlePaste,onDrop:this._handleDrop,onScroll:this._handleScroll,ref:this.editor,contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:"false","data-testid":"content-editable-component"},cn().sanitize(this.innerText)),c.createElement(Je.Z,{onRootPointerDownCapture:this._handlePointerDown}))}}function di(e){return null!=e.anchorNode&&null==e.anchorNode.nextSibling&&("#text"===e.anchorNode.nodeName&&e.anchorOffset===e.anchorNode.nodeValue.length||"DIV"===e.anchorNode.nodeName&&e.anchorNode.hasChildNodes()&&e.anchorNode.childNodes.length>0&&"BR"===e.anchorNode.childNodes[0].nodeName)}(0,o.Z)(ui,"defaultProps",{autoFocus:!0,autoSelect:!1});var pi=n(51731),fi=n(32360),hi=n.n(fi),mi=n(13816);function gi(e){let{x:t,y:n,direction:o,startResizing:r,endResizing:i,onFitToSide:a,viewportSize:s,title:l,cursor:u}=e;const p=(0,mi.cL)(pi.V[o]),f=d()({[hi().resizeAnchor]:!0,[hi().nwseCursor]:o===pi.V.TOP_LEFT||o===pi.V.BOTTOM_RIGHT,[hi().neswCursor]:o===pi.V.TOP_RIGHT||o===pi.V.BOTTOM_LEFT,[hi().ewCursor]:o===pi.V.LEFT||o===pi.V.RIGHT,[hi().nsCursor]:o===pi.V.TOP||o===pi.V.BOTTOM,"PSPDFKit-Resize-Anchor":!0,[`PSPDFKit-Resize-Anchor-${p}`]:!0}),{RESIZE_ANCHOR_RADIUS:h}=rt.Options,m=h(s),g=u?{cursor:u}:void 0;return c.createElement(Je.Z,{onPointerDown:r,onPointerUp:i},c.createElement("circle",{cx:t,cy:n,r:m-Be.Hr/2,strokeWidth:Be.Hr,className:f,onDoubleClick:a,style:g},l?c.createElement("title",null,l):null))}function vi(e){let{x:t,y:n,startModifying:o,endModifying:r,pointIndex:i,viewportSize:a,title:s,cursor:l}=e;const u=d()({[hi().resizeAnchor]:!0}),{RESIZE_ANCHOR_RADIUS:p}=rt.Options,f=p(a),h=l?{cursor:l}:void 0;return c.createElement(Je.Z,{onPointerDown:o,onPointerUp:r},c.createElement("circle",(0,ue.Z)({cx:t,cy:n,r:f-Be.Hr/2,strokeWidth:Be.Hr,className:u,id:`pointIndex${i}`,style:h},{title:s})))}function yi(e){let{width:t,startRotating:n,endRotating:o,viewportSize:r,rotationHandleLength:i,rotation:a=0,title:s}=e;const{RESIZE_ANCHOR_RADIUS:l,SELECTION_STROKE_WIDTH:u}=rt.Options,p=d()({"PSPDFKit-Annotations-Rotation-Anchor":!0,[hi().rotateAnchor]:!0}),f=l(r);return c.createElement("svg",{"data-testid":"rotation-handle-ui",className:d()(hi().rotationHandleSvg,"PSPDFKit-Annotations-Rotation-Handle")},c.createElement("line",{className:d()(hi().rotationLine,"PSPDFKit-Annotations-Rotation-Line"),x1:t/2,y1:0,x2:t/2,y2:i,style:{strokeWidth:u}}),c.createElement(Je.Z,{onPointerDown:n,onPointerUp:o},c.createElement("circle",{cx:t/2,cy:i,r:f-Be.Hr/2,strokeWidth:Be.Hr,className:p,style:{cursor:(0,Ue.Mg)(a,"grab")}},s?c.createElement("title",null,s):null)))}var bi=n(41952);function wi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Si(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wi(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pi(e){const{formatMessage:t}=(0,Se.YB)();function n(n,o,r){const i=Ei(r),a=Ei(r+e.pagesRotation),s=`${t(ke.Z.resize)}, ${xi[a].split(",").map((e=>t(ke.Z[`resizeHandle${e.trim()}`]))).join(", ")}`;return c.createElement(gi,{key:r,x:n,y:o,direction:a,title:s,startResizing:t=>{e.startResizing&&e.startResizing(t,i)},endResizing:Di,onFitToSide:()=>{e.onFitToSide&&e.onFitToSide(a)},viewportSize:e.viewportSize,cursor:e.cursor})}const{zoomLevel:o,annotation:r,annotationBoundingBox:i,viewportSize:a,customZIndex:s,cursor:l}=e,{RESIZE_ANCHOR_RADIUS:u,SELECTION_STROKE_WIDTH:p}=rt.Options,f=(0,bi.q)(i.scale(o),a),{SELECTION_OUTLINE_PADDING:h}=rt.Options,m=h(a),g=u(a),v=r?(0,mi.G8)(r)+2*(0,bi.K)(a):0,y=Math.min(2*g,v),b=Math.max(f.width,y),S=Math.max(f.height,y),P=Math.max(g+p/2,p),E=2*P,x=Math.max(g,p/2),D=(0,_.fk)(r,i,o,a,P),C=d()({[hi().selectionRect]:!0,[hi().isDragging]:e.isDragging,"PSPDFKit-Selection-Outline-Rect":!0}),k=!r||(0,_.vj)(r)?Si({strokeWidth:p},l?{cursor:l}:null):{stroke:"transparent",cursor:(0,_.B7)(r,{cursor:l,isSelected:!0})},O=d()({[hi().draggingRect]:!0,[hi().isDragging]:e.isDragging,"PSPDFKit-Selection-Outline-Border":!0}),A=r?r.rotation:e.annotationRotation,T=35*o,I=c.useRef(f),F=r?(0,_.B7)(r,{cursor:l,isSelected:!0}):void 0,M=Si(Si({left:f.left-P,top:f.top-P,width:b+E,height:S+E,overflow:"visible"},r||"number"!=typeof A||0===A?null:{transformOrigin:`${m+I.current.width/2}px ${m+I.current.height/2}px`}),{},{transform:"number"!=typeof A||0===A||r instanceof w.x_||r instanceof w.sK?void 0:`rotate(${-A}deg)`,zIndex:null!=s?s:0,cursor:F}),N=o*(u(a)-Be.Hr/2),R={left:M.left+M.width/2-N,top:M.top+M.height,width:2*N,height:T+N,overflow:"visible",transformOrigin:`center -${M.height/2}px`,transform:"number"==typeof A&&0!==A?`rotate(${-A}deg)`:void 0};return c.createElement(c.Fragment,null,c.createElement("svg",{style:M,className:hi().svg,focusable:!1},r instanceof w.o9?c.createElement("line",{className:C,x1:D[0].x,y1:D[0].y,x2:D[1].x,y2:D[1].y,style:Si(Si({},k),{},{strokeWidth:Ke.Ni?Math.max(Be.wK,r.strokeWidth)*o:Math.max(Be.XZ,r.strokeWidth)*o,pointerEvents:"all"})}):c.createElement("rect",{className:C,style:k,x:P-p/2,y:P-p/2,width:b+p,height:S+p})),e.children||null,c.createElement("svg",{style:M,className:hi().svg,focusable:!1},c.createElement(Je.Z,{onPointerDown:function(t){e.deselectAnnotation&&t.shiftKey&&e.deselectAnnotation?e.deselectAnnotation(t):e.isEditableCP&&2!==t.buttons&&(t.stopPropagation(),null!=e.startDragging&&e.startDragging(t))}},r instanceof w.o9?c.createElement("line",{className:O,x1:D[0].x,y1:D[0].y,x2:D[1].x,y2:D[1].y,style:Si(Si({},k),{},{strokeWidth:Ke.Ni?Math.max(Be.wK,r.strokeWidth)*o:Math.max(Be.XZ,r.strokeWidth)*o,pointerEvents:"all"})}):c.createElement("rect",{x:P-p/2,y:P-p/2,width:b+p,height:S+p,className:O,style:k})),e.startResizing&&e.isResizable?[n(M.width/2,x,0),n(M.width-x,x,45),n(M.width-x,M.height/2,90),n(M.width-x,M.height-x,135),n(M.width/2,M.height-x,180),n(x,M.height-x,225),n(x,M.height/2,270),n(x,x,315)]:null,e.startModifying&&e.isModifiable?D.map(((t,n)=>function(t,n,o,r){return c.createElement(vi,{key:`modifyAnchor${o}`,x:t,y:n,pointIndex:o,title:r,startModifying:t=>{e.startModifying&&e.startModifying(t,o)},endModifying:Di,viewportSize:e.viewportSize,cursor:e.cursor})}(t.x,t.y,n,"Modify point"))):null),e.startRotating&&e.isRotatable?c.createElement("svg",{style:R,className:hi().svg,focusable:!1},c.createElement(yi,{key:"rotateAnchor",width:R.width,startRotating:t=>{var n;return null===(n=e.startRotating)||void 0===n?void 0:n.call(e,t)},endRotating:Di,viewportSize:e.viewportSize,rotationHandleLength:T,rotation:A,title:t(ke.Z.rotation)})):null)}function Ei(e){switch((0,s.kG)(e%45==0,"Only multiples of 45° allowed."),e%360){case 0:return pi.V.TOP;case 45:return pi.V.TOP_RIGHT;case 90:return pi.V.RIGHT;case 135:return pi.V.BOTTOM_RIGHT;case 180:return pi.V.BOTTOM;case 225:return pi.V.BOTTOM_LEFT;case 270:return pi.V.LEFT;case 315:return pi.V.TOP_LEFT;default:throw new Error("Unsupported resize degrees")}}const xi={[pi.V.TOP]:"Top",[pi.V.TOP_RIGHT]:"Top, Right",[pi.V.RIGHT]:"Right",[pi.V.BOTTOM_RIGHT]:"Bottom, Right",[pi.V.BOTTOM]:"Bottom",[pi.V.BOTTOM_LEFT]:"Bottom, Left",[pi.V.LEFT]:"Left",[pi.V.TOP_LEFT]:"Top, Left"};function Di(e){e.stopPropagation()}function Ci(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ki(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ci(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ci(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class Oi extends c.PureComponent{constructor(e){var t,n;super(e),(0,o.Z)(this,"editorRef",c.createRef()),(0,o.Z)(this,"richTextEditorRef",c.createRef()),(0,o.Z)(this,"updateSelectionBoundingBox",(()=>{const e=this._getNormalizedEditorBoundingBox(),t=rt.Options.TEXT_ANNOTATION_AUTOFIT_BOUNDING_BOX_ON_EDIT?e:this.state.selectionBoundingBox.set("left",e.left).set("top",e.top),n=this.props.annotation.set("boundingBox",t);var o,r;w.UL.areRectsCloserThan((0,Ue.h4)(n).boundingBox,(0,Ue.h4)(n.set("boundingBox",this.state.selectionBoundingBox)).boundingBox,this.props.viewportState.zoomLevel)||(this.setState({selectionBoundingBox:n.boundingBox}),null===(o=(r=this.props).onChange)||void 0===o||o.call(r,n.boundingBox,this.getText()))})),(0,o.Z)(this,"handleEscape",(()=>{this.props.dispatch((0,De.fz)()),this.props.onEditingDone()})),(0,o.Z)(this,"handleBlur",(()=>{this._triggerOnEditingDone()})),(0,o.Z)(this,"onStopEditing",(()=>{this._triggerOnEditingDone(!0)})),(0,o.Z)(this,"onRichEditorInit",(e=>{this.props.dispatch((0,Kt.$Q)(e))}));const{annotation:r}=e;this.lastSavedAnnotation=r,this.initialOutlineBoundingBox=this.getInitialBoundingBox(r);let i=!1,a=(0,un.hr)(null===(t=e.annotation.text)||void 0===t?void 0:t.value)||"";var s,l,u;if(e.enableRichText(e.annotation)){if(i=!0,"plain"===(null===(s=e.annotation.text)||void 0===s?void 0:s.format)){var d;const t=(null===(d=e.annotation.fontColor)||void 0===d?void 0:d.toHex())||"",n=q.ri.prepareHTML(e.annotation.text.value);a=q.ri.setStyleOrToggleFormat(q.ri.serialize(q.ri.deserialize(n)),"fontColor",t)}}else"xhtml"===(null===(l=e.annotation.text)||void 0===l?void 0:l.format)&&(a=q.ri.getText((null===(u=e.annotation.text)||void 0===u?void 0:u.value)||""));this.state={selectionBoundingBox:this.initialOutlineBoundingBox,annotation:r,richTextContent:null===(n=e.annotation.text)||void 0===n?void 0:n.value,useRichText:i,text:a}}getInitialBoundingBox(e){let t=e.boundingBox;return(0,_.U7)(t)||(t=t.set("width",rt.Options.MIN_TEXT_ANNOTATION_SIZE).set("height",e.fontSize)),t}componentDidUpdate(e){this.updateSelectionBoundingBox(),e&&!e.annotation.equals(this.props.annotation)&&(this.initialOutlineBoundingBox=this.getInitialBoundingBox(this.props.annotation))}_getNormalizedEditorBoundingBox(){const{current:e}=this.editorRef,{current:t}=this.richTextEditorRef;return t?this.props.transformClientToPage(w.UL.fromClientRect(Ti(t))):e?this.props.transformClientToPage(w.UL.fromClientRect(Ti(e.getElement()))):new w.UL}getText(){const{current:e}=this.editorRef;return e||this.state.useRichText?e?{value:e.getPlainText(),format:"plain"}:{value:this.state.richTextContent,format:"xhtml"}:{value:"",format:"plain"}}_triggerOnEditingDone(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{current:n}=this.editorRef,o=this.getText(),{annotation:r,onChange:i}=this.props;if((0,_.Vc)(r))return void(null==i||i(this.state.selectionBoundingBox,o));if(!n&&!this.state.useRichText)return;let a=(null===(e=this.props.annotation.text)||void 0===e?void 0:e.value)!==o.value?this.props.annotation.set("text",o).set("boundingBox",this.state.selectionBoundingBox):this.props.annotation;if("xhtml"===o.format&&this.props.annotation.fontColor?a=a.set("fontColor",null):"plain"!==o.format||this.props.annotation.fontColor||(a=a.set("fontColor",w.Il.BLACK)),rt.Options.TEXT_ANNOTATION_AUTOFIT_BOUNDING_BOX_ON_EDIT){const e=this._getNormalizedEditorBoundingBox(),t=a.boundingBox;!e.getSize().equals(t.getSize())&&(a=a.set("boundingBox",e)),a=(0,un.XA)(a,this.props.viewportState.zoomLevel)}this.lastSavedAnnotation.equals(a)||(this.lastSavedAnnotation=a,this.props.onEditingDone((0,mi.er)(a,this.props.annotation.boundingBox),t))}render(){var e;const t=this.props.annotation,{zoomLevel:n}=this.props.viewportState,o=t.boundingBox,r=this.props.pageSize.width,i=this.props.pageSize.height,a=(0,un.z1)(t.set("rotation",0),n,!1);let s,l;const u=Math.floor(o.left*n),d=Math.floor(o.top*n);switch(t.rotation){case 0:s=r*n-u,l=i*n-d;break;case 90:s=o.bottom*n,l=r*n-u;break;case 180:s=o.right*n,l=o.bottom*n;break;case 270:s=i*n-d,l=o.right*n}const p=(0,_.Vc)(t),f=ki(ki({},!p&&{left:u,top:d}),{},{minWidth:rt.Options.MIN_TEXT_ANNOTATION_SIZE*n,minHeight:t.fontSize*n,maxWidth:s,maxHeight:l}),h=rt.Options.TEXT_ANNOTATION_AUTOFIT_BOUNDING_BOX_ON_EDIT?f:ki(ki({},a),f);delete a.width,delete a.height,delete a.overflow;const m=Math.ceil(t.boundingBox.width*n),g=Math.ceil(t.boundingBox.height*n);switch(h.transformOrigin="0 0",t.rotation){case 90:h.transform=`translate(0, ${g}px) rotate(${-t.rotation}deg)`;break;case 180:h.transform=`translate(${m}px, ${g}px) rotate(${-t.rotation}deg)`;break;case 270:h.transform=`translate(${m}px, 0) rotate(${-t.rotation}deg)`;break;default:(0,Ue.kv)(t)&&(h.transformOrigin=`${n*this.initialOutlineBoundingBox.width/2}px ${n*this.initialOutlineBoundingBox.height/2}px`,h.transform=`rotate(${String(-t.rotation)}deg)`)}return this.state.useRichText||"xhtml"!==(null===(e=this.props.annotation.text)||void 0===e?void 0:e.format)||(h.color=w.Il.BLACK.toHex()),c.createElement(c.Fragment,null,!p&&c.createElement(Pi,{zoomLevel:n,pagesRotation:this.props.viewportState.pagesRotation,annotationBoundingBox:this.state.selectionBoundingBox,annotationRotation:t.rotation,isResizable:!0,isModifiable:!1,isRotatable:!0,isEditableCP:!0,viewportSize:this.props.viewportState.viewportRect.getSize()}),c.createElement("div",{style:ki(ki({},a),!this.state.useRichText&&{wordBreak:p?void 0:a.wordBreak,overflowWrap:p?"break-word":a.overflowWrap}),className:pn().editorWrapper},this.state.useRichText?c.createElement(q.D,{text:this.state.text,style:ki(ki({},h),{},{color:w.Il.BLACK.toHex()}),updateBoundingBox:this.updateSelectionBoundingBox,ref:this.richTextEditorRef,onValueChange:e=>{this.setState({richTextContent:e})},onBlurSave:this.handleBlur,onStopEditing:this.onStopEditing,onEscape:this.handleEscape,maxLength:Be.RI,lastMousePoint:this.props.lastMousePoint,onEditorInit:this.onRichEditorInit,className:!p&&pn().richEditor,autoFocus:!0}):c.createElement(ui,{style:ki(ki({},h),{position:p?"static":h.position}),valueDidUpdate:this.updateSelectionBoundingBox,onBlur:this.handleBlur,onStopEditing:this.onStopEditing,onEscape:this.handleEscape,ref:this.editorRef,maxLength:Be.RI,defaultValue:this.state.text,lastMousePoint:this.props.lastMousePoint,autoSelect:this.props.autoSelect})))}}(0,o.Z)(Oi,"defaultProps",{autoSelect:!1});const Ai=Br(Oi);function Ti(e){var t;const n=e.cloneNode(!0);n.style.transform="none",n.style.visibility="hidden",n.style.pointerEvents="none",null===(t=e.parentElement)||void 0===t||t.append(n);const o=n.getBoundingClientRect();return n.remove(),o}const Ii=e=>{let{annotation:t,children:n}=e;const[o,r]=(0,c.useState)(t),i=(0,a.v9)((e=>e.viewportState.zoomLevel)),s=(0,c.useRef)(null),l=(0,a.I0)(),u=o.boundingBox.scale(i),d=(0,c.useRef)(o);(0,c.useLayoutEffect)((()=>{d.current=o}),[o]),(0,c.useEffect)((()=>{r((e=>e.set("fontSize",t.fontSize).set("font",t.font).set("horizontalAlign",t.horizontalAlign).set("verticalAlign",t.verticalAlign)))}),[t.font,t.fontSize,t.horizontalAlign,t.verticalAlign]);const p=(0,c.useCallback)(((e,n)=>{var a;const l=null===(a=s.current)||void 0===a?void 0:a.getBoundingClientRect();if(!l)return;const{callout:c}=t,u=(0,hn.Vq)({rect:l,annotation:o,zoomLevel:i,text:n,callout:c});u&&r(u)}),[t,i,o]);return(0,c.useEffect)((()=>()=>{("xhtml"===d.current.text.format?(0,hn.KY)(d.current.text.value):d.current.text.value)||"xhtml"!==o.text.format||l((0,bt.hQ)(d.current))}),[l]),(0,c.useEffect)((()=>{l((0,bt.FG)(o))}),[o,l]),c.createElement("div",{style:{position:"absolute",left:u.left,top:u.top,minHeight:u.height,width:u.width}},c.createElement(gn,{annotation:o,isEditing:!0,ref:s},n(p)))};class Fi extends c.PureComponent{constructor(){var e;super(...arguments),e=this,(0,o.Z)(this,"_onEditingDone",(function(t){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=t&&(0,Ue.az)(t),r=o?(0,i.aV)([o]):(0,i.aV)([]),a={annotations:r,reason:Q.f.TEXT_EDIT_END};e.props.eventEmitter.emit("annotations.willChange",a),o&&(e.props.dispatch((0,bt.FG)(o)),n&&e.props.dispatch((0,De.Df)((0,i.l4)([e.props.annotation.id]),null)),e.props.keepSelectedTool&&e.props.dispatch((0,Kt.DU)()))}))}componentDidMount(){const e={annotations:(0,i.aV)([this.props.annotation]),reason:Q.f.TEXT_EDIT_START};this.props.eventEmitter.emit("annotations.willChange",e),this.props.dispatch((0,Kt.X2)())}componentWillUnmount(){this.props.dispatch((0,Kt.Zg)())}render(){const{annotation:e,autoSelect:t,dispatch:n,pageSize:o,lastMousePoint:r,pageIndex:i,enableRichText:a}=this.props,s=s=>c.createElement(Ai,{dispatch:n,annotation:(0,Ue.h4)(e),lastMousePoint:r,pageSize:o,pageIndex:i,onEditingDone:this._onEditingDone,autoSelect:t,enableRichText:a,onChange:s});return(0,_.Vc)(e)?c.createElement(Ii,{annotation:e},(e=>s(e))):s()}}(0,o.Z)(Fi,"defaultProps",{autoSelect:!1});class Mi extends c.Component{constructor(e){super(e),(0,o.Z)(this,"shouldComponentUpdate",Ce.O),(0,o.Z)(this,"_handlePointerUp",(e=>{if(!e.isPrimary)return;const t=this._getNormalizedMousePosition(e);if(!t)return;const{pagesRotation:n}=this.props.viewportState,o=(0,un.gB)(t,n),r=this._fitRectInPage(o,this.props.pageSize);this.setState({bindPointerUpEvent:!1});let a=this.props.annotation.set("pageIndex",this.props.pageIndex).set("boundingBox",r).set("rotation",n);this.props.interactionMode===N.A.CALLOUT&&(a=function(e,t,n){const o=function(e,t){let n="top-right";const{width:o}=t;e.x+100>o&&(n=n.replace("right","left"));e.y-120<0&&(n=n.replace("top","bottom"));return n}(e,t),r=new w.E9({x:e.x,y:e.y}),i=new w.E9({x:o.includes("right")?e.x+50:e.x-50,y:o.includes("top")?e.y-50:e.y+50}),a=new w.E9({x:o.includes("right")?e.x+50:e.x-50,y:o.includes("top")?e.y-_i:e.y+_i}),s=new w.eB({top:o.includes("top")?0:_i,right:o.includes("right")?0:42,bottom:o.includes("top")?_i:0,left:o.includes("right")?42:0}),l=new w.UW({start:r,knee:i,end:a,innerRectInset:s,cap:"openArrow"}),c=new w.UL({top:o.includes("top")?e.y-100:e.y,left:o.includes("right")?e.x:e.x-85,width:85,height:100});return n.set("callout",l).set("boundingBox",c).set("borderWidth",n.borderWidth||2).set("borderStyle",n.borderStyle||"solid").set("borderColor",n.borderColor||w.Il.BLACK)}(t,this.props.pageSize,a)),this.props.dispatch((0,bt.Zr)((0,i.aV)([a]))),e.stopPropagation()})),this.state={bindPointerUpEvent:!0}}_getNormalizedMousePosition(e){const{target:t}=e;if("DIV"==t.tagName)return this.props.transformClientToPage(new w.E9({x:e.clientX,y:e.clientY}))}_fitRectInPage(e,t){const{width:n,height:o}=t,{MIN_TEXT_ANNOTATION_SIZE:r}=rt.Options;return e.top+e.height>o&&(e=e.set("top",o-e.height)),e.left+r>n&&(e=e.set("left",n-r)),e}render(){const e=d()({[pn().layer]:!0,"PSPDFKit-Text-Canvas":!0});return c.createElement(Je.Z,{onPointerUpCapture:this.state.bindPointerUpEvent?this._handlePointerUp:void 0},c.createElement("div",{className:e,style:{cursor:"text"}}))}}(0,o.Z)(Mi,"defaultProps",{autoSelect:!1});const _i=80;const Ni=Br(Mi);var Ri=n(36658);function Li(e,t,n,o,r,a,s,l,u){const[d,p]=c.useState(!1),f=c.useRef(!1),h=c.useCallback((function(t){if(!(0,ar.eR)(t.target))switch(t.key){case"Enter":case" ":case"Spacebar":if((0,ar.gC)(t.target)||(0,ar.N1)(t.target))return;e(t),t.preventDefault();break;case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":{if((0,ar.N1)(t.target))return;t.preventDefault();const e=t.shiftKey?10:1,r=(0,vr.n5)(Bi[t.key]-s),c=function(e){switch(e){case 0:return new b.E9({x:0,y:-1});case 90:return new b.E9({x:1,y:0});case 180:return new b.E9({x:0,y:1});case 270:return new b.E9({x:-1,y:0});default:throw Error()}}(r),d=0===r||270===r?new b.E9:new b.E9({x:n.boundingBox.width,y:n.boundingBox.height}),h=(0,Ri.c)(n,c.scale(e),a,d,u);if(o(h),!f.current){const e={annotations:(0,i.aV)([n]),reason:Q.f.MOVE_START};l.emit("annotations.willChange",e),f.current=!0}p(!0)}}}),[e,a,s,o,n,l,u]),m=c.useCallback((function(e){if(!(0,ar.eR)(e.target)&&(("Spacebar"!==e.key&&" "!==e.key||!(0,ar.gC)(e.target))&&e.preventDefault(),d&&r(n),f.current)){const e={annotations:(0,i.aV)([n]),reason:Q.f.MOVE_END};l.emit("annotations.willChange",e),f.current=!1}}),[d,n,f,l,r]),g=t.document;c.useLayoutEffect((function(){return g.addEventListener("keydown",h),g.addEventListener("keyup",m),function(){g.removeEventListener("keydown",h),g.removeEventListener("keyup",m)}}),[h,m,g])}const Bi={ArrowUp:0,ArrowRight:90,ArrowDown:180,ArrowLeft:270};var ji=n(18803);function zi(e){var t;null!==(t=e.getSelection())&&void 0!==t&&t.isCollapsed||(0,ji.a7)(e)}function Ki(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Zi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ki(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ki(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ui={isListening:!1,isDragging:!1,previousMousePosition:null,initialClickWithinAnnotation:null,translation:new w.E9,initialDragCompleted:!1};function Vi(e,t){const n=t;switch(n.type){case"start":{const{mousePosition:t,initialClickWithinAnnotation:o}=n;return Zi(Zi({},e),{},{isListening:!0,previousMousePosition:t,initialClickWithinAnnotation:o})}case"drag":{const{mousePosition:t,translation:o}=n;return Zi(Zi({},e),{},{isDragging:!0,previousMousePosition:t,translation:o})}case"scroll":return Zi(Zi({},e),{},{translation:n.translation});case"stop":return Zi(Zi({},Ui),{},{initialDragCompleted:!0});default:throw(0,s.Rz)(n.type)}}function Gi(e){var t;return null===(t=e.target)||void 0===t?void 0:t.classList.contains(hi().selectionRect)}var Wi=n(25256);const qi={pointIndex:null,startingMousePosition:null,isListening:!1};function Hi(e,t,n){let o;return e instanceof w.o9?o=e[["startPoint","endPoint"][t]].apply(n):e instanceof w.om&&(o=e.points.get(t).apply(n)),o}const $i={startingMousePosition:null,startingResizeAnchor:null,isListening:!1};function Xi(e,t,n){const o=e.boundingBox.apply(t);let r;return n===pi.V.TOP_LEFT?r=new w.E9({x:o.left,y:o.top}):n===pi.V.TOP_RIGHT?r=new w.E9({x:o.left+o.width,y:o.top}):n===pi.V.BOTTOM_LEFT?r=new w.E9({x:o.left,y:o.top+o.height}):n===pi.V.BOTTOM_RIGHT&&(r=new w.E9({x:o.left+o.width,y:o.top+o.height})),r}function Yi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Ji(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yi(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Qi=Br((function(e){const{annotation:t,globalAnnotation:n,viewportState:{zoomLevel:o,viewportRect:r,pagesRotation:l},children:u,isResizable:p,isModifiable:f,isRotatable:h,onFocus:m,onBlur:g,getScrollElement:v,transformClientToPage:y,window:S,interactionsDisabled:P,dispatch:E,selectedAnnotationShouldDrag:x,pageSize:D,isAnnotationPressPrevented:C,eventEmitter:O,restrictAnnotationToPageBounds:A,isEditableCP:T,shouldConstrainAspectRatio:I,setGlobalCursor:F,annotationDimensions:M,backend:N,disablePointSnapping:R}=e,L=(0,c.useRef)(!1),{formatMessage:B}=(0,Se.YB)(),j=c.useMemo((()=>{let e;return(0,k.S6)(t)&&t.measurementBBox?(e=t.set("boundingBox",t.measurementBBox),e):t}),[t]),[z,K]=(0,_r.Ah)(j),[Z,U]=c.useState(null),[V,G]=function(e,t,n){const o=c.useRef(null);return[c.useCallback((function(e){const{current:t}=o;if(!t)return;const r="function"==typeof t.getWrappedInstance?t.getWrappedInstance():t;r&&"function"==typeof r.onClick&&!n&&r.onClick(e)}),[n]),o]}(0,0,L.current);(0,c.useEffect)((()=>{z&&O.emit("annotations.transform",{annotation:z})}),[z,O]);const W=c.useMemo((()=>(0,H.cr)(e.viewportState,t.pageIndex)),[e.viewportState,t.pageIndex]),q=c.useCallback((function(e){return e.scale(1/o).rotate(l)}),[o,l]),$=c.useCallback((e=>{U(e),F(e)}),[F]),X=c.useCallback((function(e){const t=(0,Ue.az)(e);if(D&&A){if(!new w.UL({left:0,top:0,width:D.width,height:D.height}).isRectInside(t.boundingBox))return}E((0,bt.FG)(t))}),[E,D,A]),{isDragging:Y,cancelDrag:J,startDraggingWithEvent:ee,startDraggingAtPoint:te,dragListener:ne}=function(e){let{getScrollElement:t,transformClientToPage:n,transformedAnnotation:o,setTransformedAnnotation:r,setGlobalAnnotation:a,annotation:l,interactionsDisabled:u,dispatch:d,frameWindow:p,pageSize:f,onClick:h,transformDeltaFromClientToPage:m,eventEmitter:g,restrictAnnotationToPageBounds:v,isEditableCP:y}=e;const[b,S]=c.useReducer(Vi,Ui),{isListening:P,isDragging:E}=b,x=c.useCallback((function(){return new w.E9({x:t().scrollLeft,y:t().scrollTop})}),[t]);c.useEffect((()=>()=>{E&&u&&d((0,Kt.Zg)())}),[d,u,E]);const D=c.useRef(null),C=c.useCallback((function(e){D.current=x();const t=n(e).translate(l.boundingBox.getLocation().scale(-1)),o=m(e);S({type:"start",mousePosition:o,initialClickWithinAnnotation:t})}),[x,n,m,l.boundingBox]),O=c.useCallback((function(e){e.isPrimary&&C(new w.E9({x:e.clientX,y:e.clientY}))}),[C]),A=c.useCallback((function(){S({type:"stop"}),zi(p),d((0,Kt.Zg)())}),[p,d]),T=c.useCallback((function(e){if((E||Gi(e))&&e.stopPropagation(),o.equals(l)?b.initialDragCompleted&&h(e):a(o),S({type:"stop"}),E){const e={annotations:(0,i.aV)([o]),reason:Q.f.MOVE_END};g.emit("annotations.willChange",e)}zi(p),d((0,Kt.Zg)())}),[l,p,d,E,h,b.initialDragCompleted,o,g,a]),I=c.useCallback((function(e){if(e.stopPropagation(),e.preventDefault(),E&&0===e.buttons)return void T(e);const{previousMousePosition:t,initialClickWithinAnnotation:n,translation:o}=b;(0,s.kG)(t),(0,s.kG)(n);const a=m(new w.E9({x:e.clientX,y:e.clientY})),c=Zt(n,t);!u&&c&&d((0,Kt.X2)());const h=a.translate(t.scale(-1)),y=o.translate(h),P=(0,Ri.c)(l,y,f,n,v),x=(0,k.S6)(P)?P.set("measurementBBox",P.boundingBox):P;if(r(x),S({type:"drag",mousePosition:a,translation:y}),zi(p),!E){const e={annotations:(0,i.aV)([l]),reason:Q.f.MOVE_START};g.emit("annotations.willChange",e)}}),[l,p,d,u,f,r,b,E,m,g,T,v]),F=c.useCallback((function(){const e=t();if(void 0===e.scrollTop||void 0===e.scrollLeft)return;const n=x(),o=D.current;(0,s.kG)(o);const i=m(n.translate(o.scale(-1))),a=b.translation.translate(i);let c=b.initialClickWithinAnnotation;c||(c=new w.E9);const u=(0,Ri.c)(l,a,f,c);r(u),S({type:"scroll",translation:a}),D.current=n,zi(p)}),[l,p,t,x,f,r,b.initialClickWithinAnnotation,b.translation,m]);(0,_r.wA)(P,t,F);const M=P&&c.createElement(Je.Z,{onRootPointerDownCapture:T,onRootPointerMoveCapture:y&&!l.locked?I:void 0,onRootPointerUpCapture:T});return{isDragging:E,cancelDrag:A,startDraggingWithEvent:O,startDraggingAtPoint:C,dragListener:M}}({getScrollElement:v,transformClientToPage:y,transformedAnnotation:z,setTransformedAnnotation:K,setGlobalAnnotation:X,annotation:t,interactionsDisabled:P,dispatch:E,frameWindow:S,pageSize:D,onClick:V,transformDeltaFromClientToPage:q,eventEmitter:O,restrictAnnotationToPageBounds:A,isEditableCP:T}),{startResizing:oe,resizeListener:re,isResizing:ie}=function(e){let{transformedAnnotation:t,setTransformedAnnotation:n,setGlobalAnnotation:o,annotation:r,dispatch:a,frameWindow:l,transformDeltaFromClientToPage:u,eventEmitter:d,pageSize:p,restrictAnnotationToPageBounds:f,shouldConstrainAspectRatio:h,annotationDimensions:m,clientTransformationMatrix:g,interactionsDisabled:v,backend:y,disablePointSnapping:b}=e;const[S,P]=c.useState($i),[E,x]=c.useState(!1),D=c.useRef(void 0),C=c.useRef(null),O=c.useRef(!1);c.useEffect((()=>()=>{E&&v&&a((0,Kt.Zg)())}),[a,v,E]);const A=c.useCallback((function(e,n){var o;if(!e.isPrimary)return;(0,Vt.mE)(y,r,b)&&y.configureSnapper(r.pageIndex);const l=new w.E9({x:e.clientX,y:e.clientY}),c=u(l);P({startingMousePosition:c,startingResizeAnchor:n,isListening:!0}),x(!0);const p={annotations:(0,i.aV)([r]),reason:Q.f.RESIZE_START};d.emit("annotations.willChange",p),r instanceof w.b3&&![pi.V.TOP,pi.V.RIGHT,pi.V.BOTTOM,pi.V.LEFT].includes(n)&&null!==(o=r.isMeasurement)&&void 0!==o&&o.call(r)&&((0,s.kG)(t instanceof w.b3),a((0,Ut.eO)({magnifierLabel:t.getMeasurementDetails().label,drawnAnnotationID:t.id,drawnAnnotationPageIndex:t.pageIndex,magnifierCursorPosition:Xi(r,g,n)}))),a((0,Kt.X2)())}),[t,a,u,r,d,g]),T=c.useCallback((async function(e){var t;e.preventDefault();const o=new w.E9({x:e.clientX,y:e.clientY});let i=u(o);if((0,Vt.mE)(y,r,b)){const e=await y.getClosestSnapPoint(new w.E9({x:i.x,y:i.y}));i=i.set("x",e.x).set("y",e.y)}const{startingMousePosition:c,startingResizeAnchor:d}=S;(0,s.kG)(c),(0,s.kG)(d);const v={annotation:r,resizeAnchor:d,isShiftPressed:e.shiftKey},P=C.current;null!==P&&P.annotation.id===v.annotation.id&&P.isShiftPressed===v.isShiftPressed&&P.resizeAnchor===v.resizeAnchor||(O.current=h(v),D.current=m(v)),C.current=v;const E=i.translate(c.scale(-1)),x=(0,mi.D7)(r,E,d,O.current,void 0,p,f,D.current),A=(0,k.S6)(x)?x.set("measurementBBox",x.boundingBox):x;n(A),zi(l),r instanceof w.b3&&![pi.V.TOP,pi.V.RIGHT,pi.V.BOTTOM,pi.V.LEFT].includes(d)&&null!==(t=r.isMeasurement)&&void 0!==t&&t.call(r)&&((0,s.kG)(x instanceof w.b3),a((0,Ut.eO)({magnifierLabel:x.getMeasurementDetails().label,magnifierCursorPosition:Xi(x,g,d)})))}),[a,r,l,n,g,h,S,u,p,f]),I=c.useCallback((function(e){var n;e.stopPropagation(),x(!1),P($i),o(t),a((0,Kt.Zg)()),zi(l);const s={annotations:(0,i.aV)([t]),reason:Q.f.RESIZE_END};d.emit("annotations.willChange",s),r instanceof w.b3&&null!==(n=r.isMeasurement)&&void 0!==n&&n.call(r)&&a((0,Ut.eO)(null))}),[r,l,a,o,t,d]);return{startResizing:A,resizeListener:S.isListening&&c.createElement(Je.Z,{onRootPointerMoveCapture:T,onRootPointerUpCapture:I}),isResizing:E}}({transformedAnnotation:z,setTransformedAnnotation:K,setGlobalAnnotation:X,annotation:t,dispatch:E,frameWindow:S,transformDeltaFromClientToPage:q,eventEmitter:O,pageSize:D,restrictAnnotationToPageBounds:A,shouldConstrainAspectRatio:I,annotationDimensions:M,clientTransformationMatrix:W,interactionsDisabled:P,backend:N,disablePointSnapping:R}),{startRotating:ae,rotateListener:se,isRotating:le}=function(e){let{transformedAnnotation:t,setTransformedAnnotation:n,setGlobalAnnotation:o,annotation:r,dispatch:a,frameWindow:s,transformClientToPage:l,eventEmitter:u,pageSize:d,restrictAnnotationToPageBounds:p,centerPoint:f,interactionsDisabled:h,setLocalAndGlobalCursor:m}=e;const[g,v]=c.useState(!1),[y,b]=c.useState(!1);c.useEffect((()=>()=>{y&&h&&a((0,Kt.Zg)())}),[a,h,y]);const S=c.useCallback((e=>{const t=new w.E9({x:e.clientX,y:e.clientY}),n=l(t),o=f.x-n.x,r=n.y-f.y,i=-Math.atan2(o,r);return Math.round(i*(180/Math.PI))}),[f,l]),P=c.useCallback((function(e){if(!e.isPrimary)return;v(!0),b(!0);const t={annotations:(0,i.aV)([r]),reason:Q.f.ROTATE_START};u.emit("annotations.willChange",t),a((0,Kt.X2)()),m((0,Ue.Mg)(S(e),"grabbing"))}),[a,r,u,S,m]),E=c.useCallback((function(e){const o=S(e),r=(0,Ue.sw)(t,o,d,p);n(r),zi(s),m((0,Ue.Mg)(o,"grabbing"))}),[t,s,n,S,m,d,p]),x=c.useCallback((function(e){e.stopPropagation(),b(!1),v(!1);const t=S(e),n=(0,Ue.sw)(r,t,d,p);o(n),a((0,Kt.Zg)()),zi(s),m("");const l={annotations:(0,i.aV)([n]),reason:Q.f.ROTATE_END};u.emit("annotations.willChange",l)}),[s,a,o,r,S,u,d,p,m]);return{startRotating:P,rotateListener:g&&c.createElement(Je.Z,{onRootPointerMoveCapture:E,onRootPointerUpCapture:x}),isRotating:y}}({transformedAnnotation:z,setTransformedAnnotation:K,setGlobalAnnotation:X,annotation:t,dispatch:E,frameWindow:S,transformClientToPage:y,eventEmitter:O,pageSize:D,restrictAnnotationToPageBounds:A,centerPoint:t.boundingBox.getCenter(),interactionsDisabled:P,setLocalAndGlobalCursor:$}),ce=(0,_r.lB)(t,D,o,E),{startModifying:ue,modifyListener:de,isModifying:pe}=function(e){let{transformedAnnotation:t,setTransformedAnnotation:n,setGlobalAnnotation:o,annotation:r,dispatch:l,frameWindow:u,transformDeltaFromClientToPage:d,eventEmitter:p,clientTransformationMatrix:f,pageSize:h,restrictAnnotationToPageBounds:m,backend:g,disablePointSnapping:v}=e;const[y,S]=c.useState(qi),[P,E]=c.useState(!1),x=(0,a.v9)((e=>e.defaultAutoCloseThreshold)),D=c.useCallback((async function(e,t){var n;if(!e.isPrimary)return;const o=new w.E9({x:e.clientX,y:e.clientY}),a=d(o);(0,Vt.mE)(g,r,v)&&await g.configureSnapper(r.pageIndex),S({pointIndex:t,startingMousePosition:a,isListening:!0}),E(!0);const s={annotations:(0,i.aV)([r]),reason:Q.f.RESIZE_START};p.emit("annotations.willChange",s),r instanceof w.UX&&null!==(n=r.isMeasurement)&&void 0!==n&&n.call(r)&&l((0,Ut.eO)({magnifierLabel:r.getMeasurementDetails().label,drawnAnnotationID:r.id,drawnAnnotationPageIndex:r.pageIndex,magnifierCursorPosition:Hi(r,t,f)})),l((0,Kt.X2)())}),[l,d,r,p,f]),C=c.useCallback((async function(e){var t,o;e.preventDefault();const i=new w.E9({x:e.clientX,y:e.clientY}),a=d(i),{startingMousePosition:c,pointIndex:p}=y;(0,s.kG)(c),(0,s.kG)(null!==p);const h=a.translate(c.scale(-1));let m=(0,Wi.Sy)(r,h,p);if((0,s.kG)(m),(0,Vt.mE)(g,r,v)){let e=new w.E9({x:0,y:0});m instanceof w.o9?e=m.get(["startPoint","endPoint"][p]):(m instanceof w.om||m instanceof w.Hi)&&(e=m.points.get(p));const t=await g.getClosestSnapPoint(new w.E9({x:e.x,y:e.y}));e=e.set("x",t.x).set("y",t.y),m instanceof w.o9?m=m.set(["startPoint","endPoint"][p],e):(m instanceof w.om||m instanceof w.Hi)&&(m=m.set("points",m.points.set(p,e)))}if(m instanceof w.om||m instanceof w.Hi){const e=(0,Vt.KM)(m,p,x);-1!==e&&(m=(0,Vt.dg)(m,p,e))}n(m),zi(u),"isMeasurement"in m&&null!==(t=(o=m).isMeasurement)&&void 0!==t&&t.call(o)&&l((0,Ut.eO)({magnifierLabel:m.getMeasurementDetails().label,magnifierCursorPosition:Hi(m,p,f)}))}),[l,r,u,n,y,d,f]),k=c.useCallback((function(e){var n;if(e.stopPropagation(),E(!1),S(qi),h&&m&&!new b.UL({left:0,top:0,width:h.width,height:h.height}).isRectInside(t.boundingBox))return;o(t),l((0,Kt.Zg)()),zi(u);const a={annotations:(0,i.aV)([t]),reason:Q.f.RESIZE_END};p.emit("annotations.willChange",a),"isMeasurement"in r&&null!==(n=r.isMeasurement)&&void 0!==n&&n.call(r)&&l((0,Ut.eO)(null))}),[r,u,l,t,p,o,h,m]);return{startModifying:D,modifyListener:y.isListening&&c.createElement(Je.Z,{onRootPointerMoveCapture:C,onRootPointerUpCapture:k}),isModifying:P}}({transformedAnnotation:z,setTransformedAnnotation:K,setGlobalAnnotation:X,annotation:t,dispatch:E,frameWindow:S,transformDeltaFromClientToPage:q,eventEmitter:O,clientTransformationMatrix:W,pageSize:D,restrictAnnotationToPageBounds:A,backend:N,disablePointSnapping:R});(0,_r.Sv)(x,E,te);const fe=function(e,t){return c.Children.map(e,(e=>c.cloneElement(e,Ji(Ji({},t),{},{isDisabled:!0}))))}(u,Ji({annotation:z,globalAnnotation:n,ref:G,isResizing:ie,isModifying:pe,isDragging:Y,isRotating:le},Z?{cursor:Z}:null)),he=c.useRef(null);he.current=function(e){g&&g(t,e)};const me=(0,_r.wL)(v);c.useEffect((function(){const{current:e}=me;return function(){if(e&&e===(null==e?void 0:e.ownerDocument.activeElement)){const e=he.current;e&&e((0,En.M)("blur"))}}}),[]),c.useLayoutEffect((function(){Y&&J()}),[o,J]),Li(V,S,z,K,X,D,l,O,A);const ge=(0,_._k)(z,B);return c.createElement(Je.Z,{onPointerDownCapture:function(e){e.isPrimary&&(L.current=C({annotation:t,nativeEvent:e.nativeEvent,selected:!0},O),L.current||E((0,De.mg)(z,e,{selectedAnnotationShouldDrag:"touch"!==e.pointerType?new w.E9({x:e.clientX,y:e.clientY}):null,stopPropagation:!1,isAnnotationPressPrevented:!1})))},onPointerUp:ea},c.createElement("div",{style:{touchAction:"none"},role:"application"},c.createElement(Pi,{zoomLevel:o,viewportSize:r.getSize(),startModifying:ue,startResizing:oe,startDragging:ee,startRotating:ae,onFitToSide:ce,isDragging:Y,pagesRotation:l,annotation:z,isResizable:p&&T,isModifiable:f&&T,isRotatable:h&&T,isEditableCP:T,annotationBoundingBox:(0,_.SY)(z,l),window:S,cursor:Z},c.createElement("div",{tabIndex:0,ref:me,role:"button","aria-label":z instanceof w.x_?B(ke.Z.selectedAnnotation,{arg0:ge}):z instanceof w.gd||z instanceof w.Qi?B(ke.Z.selectedAnnotationWithText,{arg0:ge,arg1:z.text.value}):B(ke.Z.selectedAnnotation,{arg0:ge}),"data-testid":"selected annotation",onFocus:function(e){m&&m(t,e)},onBlur:he.current,className:d()("PSPDFKit-Annotation-Selected",z.constructor.readableName&&`PSPDFKit-${z.constructor.readableName}-Annotation-Selected`)},fe)),ne,re,de,se))}));function ea(e){e.stopPropagation()}const ta=(0,a.$j)((function(e,t){let{annotation:n}=t;return{interactionsDisabled:e.interactionsDisabled,selectedAnnotationShouldDrag:e.selectedAnnotationShouldDrag,isAnnotationPressPrevented:t=>(0,_.TW)(t,e.eventEmitter),eventEmitter:e.eventEmitter,restrictAnnotationToPageBounds:e.restrictAnnotationToPageBounds,isEditableCP:(0,xr.CM)(n,e),shouldConstrainAspectRatio:t=>(0,_.xU)(t,e),annotationDimensions:t=>(0,_.aI)(t,e)}}))(Qi),na={isListening:!1,isDragging:!1,previousMousePosition:null,initialClickWithinAnnotation:null,translation:new w.E9,initialDragCompleted:!1};function oa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ra(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oa(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ia=Br((function(e){const{children:t,selectedAnnotations:n,selectedGlobalAnnotations:o,dispatch:r,viewportState:{zoomLevel:a,viewportRect:l,pagesRotation:u},isEditableCP:p,getScrollElement:f,transformClientToPage:h,window:m,interactionsDisabled:g,pageSize:v,eventEmitter:y,restrictAnnotationToPageBounds:b,selectedAnnotationShouldDrag:S,onFocus:P,onBlur:E}=e,{formatMessage:x}=(0,Se.YB)(),[D,C]=(0,_r.Ah)(n),k=(0,_r.wL)(f),O=(0,_.Jy)(D),A=c.useCallback((function(e){return e.scale(1/a).rotate(u)}),[a,u]),T=c.useCallback((function(e){const t=e.map((e=>{const t=(0,Ue.az)(e);if(v&&b){if(!new w.UL({left:0,top:0,width:v.width,height:v.height}).isRectInside(t.boundingBox))return null}return t})).filter(Boolean);r((0,bt.GZ)(t,(0,i.aV)()))}),[r,v,b]),{isDragging:I,cancelDrag:F,startDraggingWithEvent:M,startDraggingAtPoint:N,dragListener:R}=function(e){let{getScrollElement:t,transformClientToPage:n,transformedAnnotations:o,setTransformedAnnotations:r,setGlobalAnnotations:i,interactionsDisabled:a,dispatch:l,frameWindow:u,pageSize:d,transformDeltaFromClientToPage:p,eventEmitter:f,restrictAnnotationToPageBounds:h,isEditableCP:m,selectedAnnotationsBoundingBox:g,selectedAnnotations:v}=e;const[y,b]=c.useReducer(Vi,na),{isListening:S,isDragging:P}=y,E=c.useCallback((function(){return new w.E9({x:t().scrollLeft,y:t().scrollTop})}),[t]);c.useEffect((()=>()=>{P&&a&&l((0,Kt.Zg)())}),[l,a,P]);const x=c.useRef(null),D=c.useCallback((function(e){x.current=E();const t=n(e).translate(g.getLocation().scale(-1)),o=p(e);b({type:"start",mousePosition:o,initialClickWithinAnnotation:t})}),[E,n,p,g]),C=c.useCallback((function(e){e.isPrimary&&D(new w.E9({x:e.clientX,y:e.clientY}))}),[D]),k=c.useCallback((function(){b({type:"stop"}),zi(u),l((0,Kt.Zg)())}),[u,l]),O=c.useCallback((function(e){if((P||Gi(e))&&e.stopPropagation(),o&&i(o),b({type:"stop"}),P){const e={annotations:o,reason:Q.f.MOVE_END};f.emit("annotations.willChange",e)}zi(u),l((0,Kt.Zg)())}),[u,l,P,o,f,i]),A=c.useCallback((function(e){if(e.stopPropagation(),e.preventDefault(),P&&0===e.buttons)return void O(e);const{previousMousePosition:t,initialClickWithinAnnotation:n,translation:o}=y;(0,s.kG)(t),(0,s.kG)(n);const i=p(new w.E9({x:e.clientX,y:e.clientY})),c=Zt(n,t);!a&&c&&l((0,Kt.X2)());const m=i.translate(t.scale(-1)),g=o.translate(m),S=v.map((e=>(0,Ri.c)(e,g,d,n,h)));if(function(e,t){return e.left<=0||e.top<=0||e.left+e.width>=t.width||e.top+e.height>=t.height}((0,_.Jy)(S),d)||(r(S),b({type:"drag",mousePosition:i,translation:g})),zi(u),!P){const e={annotations:S,reason:Q.f.MOVE_START};f.emit("annotations.willChange",e)}}),[u,l,a,d,r,y,P,p,f,O,h,v]),T=c.useCallback((function(){const e=t();if(void 0===e.scrollTop||void 0===e.scrollLeft)return;const n=E(),o=x.current;(0,s.kG)(o);const i=p(n.translate(o.scale(-1))),a=y.translation.translate(i),l=y.initialClickWithinAnnotation||new w.E9,c=v.map((e=>(0,Ri.c)(e,a,d,l)));r(c),b({type:"scroll",translation:a}),x.current=n,zi(u)}),[u,t,E,d,r,y.initialClickWithinAnnotation,y.translation,p,v]);(0,_r.wA)(S,t,T);const I=S&&c.createElement(Je.Z,{onRootPointerDownCapture:O,onRootPointerMoveCapture:m?A:void 0,onRootPointerUpCapture:O});return{isDragging:P,cancelDrag:k,startDraggingWithEvent:C,startDraggingAtPoint:D,dragListener:I}}({getScrollElement:f,transformClientToPage:h,transformedAnnotations:D,setTransformedAnnotations:C,setGlobalAnnotations:T,interactionsDisabled:g,dispatch:r,frameWindow:m,pageSize:v,transformDeltaFromClientToPage:A,eventEmitter:y,restrictAnnotationToPageBounds:b,isEditableCP:p,selectedAnnotationsBoundingBox:O,selectedAnnotations:n}),L=c.Children.toArray(t).map((e=>c.isValidElement(e)?function(e,t){return c.cloneElement(e,ra(ra({},t),{},{isDisabled:!0}))}(e,{annotation:D.find((t=>{var n;return t.id===(null===(n=e.props)||void 0===n?void 0:n.annotation.id)})),globalAnnotation:o.find((t=>{var n;return t.id===(null===(n=e.props)||void 0===n?void 0:n.annotation.id)})),isDragging:I}):e));(0,_r.Sv)(S,r,N),c.useLayoutEffect((function(){I&&F()}),[a,F]);const B=c.useRef(null);B.current=function(e,t){E&&E(e,t)};const j=L.filter((e=>Boolean(e.props.annotation))).length>1;return c.createElement(Je.Z,{onPointerDownCapture:function(e){e.isPrimary},onPointerUp:aa},c.createElement("div",{style:{touchAction:"none",zIndex:1}},c.createElement(Pi,{zoomLevel:a,viewportSize:l.getSize(),startDragging:M,isDragging:I,pagesRotation:u,isResizable:!1,isModifiable:!1,isEditableCP:p,annotationBoundingBox:O,isRotatable:!1},L.filter((e=>Boolean(e.props.annotation))).map(((e,t)=>{const n=e.props.annotation,o=(0,_._k)(n,x);return c.createElement(Pi,{key:n.id,zoomLevel:a,viewportSize:l.getSize(),startDragging:M,isDragging:I,pagesRotation:u,isResizable:!1,isModifiable:!1,isRotatable:!1,isEditableCP:p,annotationBoundingBox:(0,_.SY)(n,u),deselectAnnotation:e=>{r((0,De.mg)(n,e))},annotationRotation:n.rotation,customZIndex:2},c.createElement("div",{tabIndex:t,"aria-label":n instanceof de.x_?x(ke.Z.selectedAnnotation,{arg0:o}):n instanceof de.gd||n instanceof de.Qi?x(ke.Z.selectedAnnotationWithText,{arg0:o,arg1:n.text.value}):x(ke.Z.selectedAnnotation,{arg0:o}),ref:j?void 0:k,role:"button","data-testid":`selected annotation ${t}`,onFocus:e=>{return t=n,o=e,void(P&&P(t,o));var t,o},onBlur:e=>{var t;return null===(t=B.current)||void 0===t?void 0:t.call(B,n,e)},className:d()(`PSPDFKit-Annotation-Selected-${t}`,"PSPDFKit-Annotation-Selected",n.constructor.readableName&&`PSPDFKit-${n.constructor.readableName}-Annotation-Selected`)},e))}))),R))}));function aa(e){e.stopPropagation()}const sa=(0,a.$j)((function(e,t){let{annotation:n}=t;return{interactionsDisabled:e.interactionsDisabled,selectedAnnotationShouldDrag:e.selectedAnnotationShouldDrag,eventEmitter:e.eventEmitter,restrictAnnotationToPageBounds:e.restrictAnnotationToPageBounds,isEditableCP:(0,xr.CM)(n,e),shouldConstrainAspectRatio:t=>(0,_.xU)(t,e)}}))(ia);function la(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ca(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?la(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):la(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ua(e){const[t,n]=c.useState(new $.Z),[o,r]=c.useState(new $.Z);(0,i.is)(t,e.redactionAnnotation)||(0,i.is)(o,e.redactionAnnotation)||(r(e.redactionAnnotation),n(e.redactionAnnotation));const{dispatch:s,pageSize:l,keepSelectedTool:u}=e;c.useEffect((()=>(s((0,Kt.X2)()),()=>{s((0,Kt.Zg)())})),[s]);const{pageIndex:p}=e,f=(0,a.v9)((e=>e.viewportState.zoomLevel)),h=d()([Dn().canvas],"PSPDFKit-Redaction-Canvas"),{boundingBox:m}=o,g=(0,a.v9)((e=>e.scrollElement));return c.createElement("div",{className:h},c.createElement(xe,{zoomLevel:f,applyZoom:!0},c.createElement("div",{style:ca(ca({},m.toJS()),{},{position:"absolute"})},c.createElement(On,{annotation:o,zoomLevel:1,previewRedactionMode:!1,isSelectable:!1}))),c.createElement(Gt,{pageSize:l,pageIndex:p,currentAnnotation:o,onAnnotationUpdate:r,keepSelectedTool:u,scrollElement:g}))}var da=n(52842),pa=n(61193),fa=n.n(pa),ha=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ma=function(){return ma=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},ma.apply(this,arguments)},ga={top:{width:"100%",height:"10px",top:"-5px",left:"0px",cursor:"row-resize"},right:{width:"10px",height:"100%",top:"0px",right:"-5px",cursor:"col-resize"},bottom:{width:"100%",height:"10px",bottom:"-5px",left:"0px",cursor:"row-resize"},left:{width:"10px",height:"100%",top:"0px",left:"-5px",cursor:"col-resize"},topRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",top:"-10px",cursor:"ne-resize"},bottomRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",bottom:"-10px",cursor:"se-resize"},bottomLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",bottom:"-10px",cursor:"sw-resize"},topLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",top:"-10px",cursor:"nw-resize"}},va=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return ha(t,e),t.prototype.render=function(){return c.createElement("div",{className:this.props.className||"",style:ma(ma({position:"absolute",userSelect:"none"},ga[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(c.PureComponent),ya=n(53316),ba=n.n(ya),wa=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Sa=function(){return Sa=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Sa.apply(this,arguments)},Pa={width:"auto",height:"auto"},Ea=ba()((function(e,t,n){return Math.max(Math.min(e,n),t)})),xa=ba()((function(e,t){return Math.round(e/t)*t})),Da=ba()((function(e,t){return new RegExp(e,"i").test(t)})),Ca=function(e){return Boolean(e.touches&&e.touches.length)},ka=ba()((function(e,t,n){void 0===n&&(n=0);var o=t.reduce((function(n,o,r){return Math.abs(o-e)<Math.abs(t[n]-e)?r:n}),0),r=Math.abs(t[o]-e);return 0===n||r<n?t[o]:e})),Oa=ba()((function(e,t){return e.substr(e.length-t.length,t.length)===t})),Aa=ba()((function(e){return"auto"===(e=e.toString())||Oa(e,"px")||Oa(e,"%")||Oa(e,"vh")||Oa(e,"vw")||Oa(e,"vmax")||Oa(e,"vmin")?e:e+"px"})),Ta=function(e,t,n,o){if(e&&"string"==typeof e){if(Oa(e,"px"))return Number(e.replace("px",""));if(Oa(e,"%"))return t*(Number(e.replace("%",""))/100);if(Oa(e,"vw"))return n*(Number(e.replace("vw",""))/100);if(Oa(e,"vh"))return o*(Number(e.replace("vh",""))/100)}return e},Ia=ba()((function(e,t,n,o,r,i,a){return o=Ta(o,e.width,t,n),r=Ta(r,e.height,t,n),i=Ta(i,e.width,t,n),a=Ta(a,e.height,t,n),{maxWidth:void 0===o?void 0:Number(o),maxHeight:void 0===r?void 0:Number(r),minWidth:void 0===i?void 0:Number(i),minHeight:void 0===a?void 0:Number(a)}})),Fa=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Ma="__resizable_base__",_a=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0",t.classList?t.classList.add(Ma):t.className+=Ma,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return wa(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Pa},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,o=this.resizable.offsetHeight,r=this.resizable.style.position;"relative"!==r&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:o,this.resizable.style.position=r}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&Oa(e.propsSize[t].toString(),"%")){if(Oa(e.state[t].toString(),"%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return Aa(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?Aa(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?Aa(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%";var o={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,o,r=this.props.boundsByDirection,i=this.state.direction,a=r&&Da("left",i),s=r&&Da("top",i);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=a?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),o=s?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,o=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),o=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),o&&Number.isFinite(o)&&(t=t&&t<o?t:o),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,o=this.props.resizeRatio||1,r=this.state,i=r.direction,a=r.original,s=this.props,l=s.lockAspectRatio,c=s.lockAspectRatioExtraHeight,u=s.lockAspectRatioExtraWidth,d=a.width,p=a.height,f=c||0,h=u||0;return Da("right",i)&&(d=a.width+(e-a.x)*o/n,l&&(p=(d-h)/this.ratio+f)),Da("left",i)&&(d=a.width-(e-a.x)*o/n,l&&(p=(d-h)/this.ratio+f)),Da("bottom",i)&&(p=a.height+(t-a.y)*o/n,l&&(d=(p-f)*this.ratio+h)),Da("top",i)&&(p=a.height-(t-a.y)*o/n,l&&(d=(p-f)*this.ratio+h)),{newWidth:d,newHeight:p}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,o){var r=this.props,i=r.lockAspectRatio,a=r.lockAspectRatioExtraHeight,s=r.lockAspectRatioExtraWidth,l=void 0===o.width?10:o.width,c=void 0===n.width||n.width<0?e:n.width,u=void 0===o.height?10:o.height,d=void 0===n.height||n.height<0?t:n.height,p=a||0,f=s||0;if(i){var h=(u-p)*this.ratio+f,m=(d-p)*this.ratio+f,g=(l-f)/this.ratio+p,v=(c-f)/this.ratio+p,y=Math.max(l,h),b=Math.min(c,m),w=Math.max(u,g),S=Math.min(d,v);e=Ea(e,y,b),t=Ea(t,w,S)}else e=Ea(e,l,c),t=Ea(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),r=o.left,i=o.top,a=o.right,s=o.bottom;this.resizableLeft=r,this.resizableRight=a,this.resizableTop=i,this.resizableBottom=s}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,o=0,r=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)){if(o=e.nativeEvent.clientX,r=e.nativeEvent.clientY,3===e.nativeEvent.which)return}else e.nativeEvent&&Ca(e.nativeEvent)&&(o=e.nativeEvent.touches[0].clientX,r=e.nativeEvent.touches[0].clientY);if(this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var a=this.parentNode;if(a){var s=this.window.getComputedStyle(a).flexDirection;this.flexDir=s.startsWith("row")?"row":"column",n=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:o,y:r,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Sa(Sa({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},t.prototype.onMouseMove=function(e){if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&Ca(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var t=this.props,n=t.maxWidth,o=t.maxHeight,r=t.minWidth,i=t.minHeight,a=Ca(e)?e.touches[0].clientX:e.clientX,s=Ca(e)?e.touches[0].clientY:e.clientY,l=this.state,c=l.direction,u=l.original,d=l.width,p=l.height,f=this.getParentSize(),h=Ia(f,this.window.innerWidth,this.window.innerHeight,n,o,r,i);n=h.maxWidth,o=h.maxHeight,r=h.minWidth,i=h.minHeight;var m=this.calculateNewSizeFromDirection(a,s),g=m.newHeight,v=m.newWidth,y=this.calculateNewMaxFromBoundary(n,o),b=this.calculateNewSizeFromAspectRatio(v,g,{width:y.maxWidth,height:y.maxHeight},{width:r,height:i});if(v=b.newWidth,g=b.newHeight,this.props.grid){var w=xa(v,this.props.grid[0]),S=xa(g,this.props.grid[1]),P=this.props.snapGap||0;v=0===P||Math.abs(w-v)<=P?w:v,g=0===P||Math.abs(S-g)<=P?S:g}this.props.snap&&this.props.snap.x&&(v=ka(v,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(g=ka(g,this.props.snap.y,this.props.snapGap));var E={width:v-u.width,height:g-u.height};if(d&&"string"==typeof d)if(Oa(d,"%"))v=v/f.width*100+"%";else if(Oa(d,"vw")){v=v/this.window.innerWidth*100+"vw"}else if(Oa(d,"vh")){v=v/this.window.innerHeight*100+"vh"}if(p&&"string"==typeof p)if(Oa(p,"%"))g=g/f.height*100+"%";else if(Oa(p,"vw")){g=g/this.window.innerWidth*100+"vw"}else if(Oa(p,"vh")){g=g/this.window.innerHeight*100+"vh"}var x={width:this.createSizeForCssProperty(v,"width"),height:this.createSizeForCssProperty(g,"height")};"row"===this.flexDir?x.flexBasis=x.width:"column"===this.flexDir&&(x.flexBasis=x.height),this.setState(x),this.props.onResize&&this.props.onResize(e,c,this.resizable,E)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,o=t.direction,r=t.original;if(n&&this.resizable){var i={width:this.size.width-r.width,height:this.size.height-r.height};this.props.onResizeStop&&this.props.onResizeStop(e,o,this.resizable,i),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Sa(Sa({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,o=t.handleStyles,r=t.handleClasses,i=t.handleWrapperStyle,a=t.handleWrapperClass,s=t.handleComponent;if(!n)return null;var l=Object.keys(n).map((function(t){return!1!==n[t]?c.createElement(va,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:o&&o[t],className:r&&r[t]},s&&s[t]?s[t]:null):null}));return c.createElement("div",{className:a,style:i},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==Fa.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=Sa(Sa(Sa({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return c.createElement(o,Sa({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&c.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(c.PureComponent),Na=n(91533),Ra=n.n(Na);function La(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Ba(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?La(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):La(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ja={top:d()(Ra().handles,Ra().handleTop,"PSPDFKit-Document-Crop-Resize-Anchor-Top"),right:d()(Ra().handles,Ra().handleRight,"PSPDFKit-Document-Crop-Resize-Anchor-Right"),bottom:d()(Ra().handles,Ra().handleBottom,"PSPDFKit-Document-Crop-Resize-Anchor-Bottom"),left:d()(Ra().handles,Ra().handleLeft,"PSPDFKit-Document-Crop-Resize-Anchor-Left"),topRight:d()(Ra().handles,Ra().handleTopRight,"PSPDFKit-Document-Crop-Resize-Anchor-Top-Right"),bottomRight:d()(Ra().handles,Ra().handleBottomRight,"PSPDFKit-Document-Crop-Resize-Anchor-Bottom-Right"),bottomLeft:d()(Ra().handles,Ra().handleBottomLeft,"PSPDFKit-Document-Crop-Resize-Anchor-Bottom-Left"),topLeft:d()(Ra().handles,Ra().handleTopLeft,"PSPDFKit-Document-Crop-Resize-Anchor-Top-Left")};function za(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.scale(1/t)}function Ka(e){return"touches"in e?{clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}:{clientX:e.clientX,clientY:e.clientY}}let Za=function(e){return e[e.NOT_CREATED=0]="NOT_CREATED",e[e.CREATING=1]="CREATING",e[e.CREATED=2]="CREATED",e}({});const Ua=e=>{let{page:t,viewportState:n,onAreaChangeComplete:o,frameWindow:r,onAreaChangeStart:i,initialDraggingEvent:a}=e;const{zoomLevel:l}=n,[u,p]=(0,c.useState)(l),f=(0,c.useRef)(null),[h,m]=(0,c.useState)({left:0,top:0,height:0,width:0}),[g,v]=(0,c.useState)(!1),[y,b]=(0,c.useState)(null),[S,P]=(0,c.useState)(Za.NOT_CREATED),[E,x]=(0,c.useState)(!1),[D,C]=(0,c.useState)(void 0),[k,O]=(0,c.useState)(!1),A=(0,c.useRef)(null);(0,c.useEffect)((()=>{const e=r.document.querySelector(".PSPDFKit-Scroll");(0,s.kG)(e),e.style.overflow=E?"hidden":"auto",r.document.body.style.overscrollBehavior=E?"contain":"auto"}),[E]),(0,c.useEffect)((()=>{function e(e){"Shift"===e.key&&O(!0)}function t(e){"Shift"===e.key&&O(!1)}return r.document.addEventListener("keydown",e),r.document.addEventListener("keyup",t),()=>{r.document.removeEventListener("keydown",e),r.document.removeEventListener("keyup",t)}}),[]),(0,c.useEffect)((()=>{if(D&&l!==u){const e=D.scale(l/u);C(e),p(l),S===Za.CREATING&&(P(Za.CREATED),null==o||o(za(e,l)))}}),[u,l,D]);const T=(0,c.useCallback)(((e,t,n,o)=>{C((e=>{var n,r;(0,s.kG)(e);let i=new w.UL({left:e.left,top:e.top,width:(null===(n=A.current)||void 0===n?void 0:n.width)+o.width,height:(null===(r=A.current)||void 0===r?void 0:r.height)+o.height});return e&&t.toLowerCase().includes("top")&&(i=i.set("top",e.top-(i.height-e.height))),e&&t.toLowerCase().includes("left")&&(i=i.set("left",e.left-(i.width-e.width))),i}))}),[C,t.pageSize,l,h]);function I(e){var t;return parseInt(null===(t=e.target.closest(".PSPDFKit-Page"))||void 0===t?void 0:t.getAttribute("data-page-index"),10)}const F=(0,_r.R9)((e=>{"touches"in e&&2===e.touches.length&&v(!0);const n=I(e);if(t.pageIndex!==n)return;e.stopImmediatePropagation(),(0,s.kG)(f.current);const o=f.current.getBoundingClientRect(),{clientY:r,clientX:i}=Ka(e);m(o),b(new w.E9({x:i-o.left,y:r-o.top}))}));(0,c.useEffect)((()=>{a&&F(a)}),[a,F]);const M=(0,_r.R9)((e=>{if(!y||S===Za.CREATED)return;const{clientX:t,clientY:n}=Ka(e);if(y.x!==t||y.y!==t){e.stopImmediatePropagation(),x(!0);const o=t-h.left,r=n-h.top,a=new w.UL({left:Math.max(0,Math.min(o,y.x)),top:Math.max(0,Math.min(r,y.y)),width:o<y.x?Math.min(y.x,y.x-o):Math.min(o-y.x,h.width-y.x),height:r<y.y?Math.min(y.y,y.y-r):Math.min(r-y.y,h.height-y.y)});C(a),P(Za.CREATING),S===Za.NOT_CREATED&&(null==i||i(za(a,l)))}})),_=(0,_r.R9)((e=>{if(S===Za.CREATED)return;v(!1);const n=I(e);t.pageIndex===n&&e.stopImmediatePropagation(),x(!1),b(null),D?(null==o||o(za(D,l)),P(Za.CREATED)):P(Za.NOT_CREATED)}));(0,c.useEffect)((()=>(r.document.addEventListener("pointerdown",F),r.document.addEventListener("pointermove",M),r.document.addEventListener("pointerup",_),r.document.addEventListener("touchstart",F),r.document.addEventListener("touchmove",M),r.document.addEventListener("touchend",_),()=>{r.document.removeEventListener("pointerdown",F),r.document.removeEventListener("pointermove",M),r.document.removeEventListener("pointerup",_),r.document.removeEventListener("touchstart",F),r.document.removeEventListener("touchmove",M),r.document.removeEventListener("touchend",_)})),[F,M,_]);const N=D&&{x:D.left,y:D.top,width:D.width,height:D.height};return c.createElement("div",{ref:f,className:Ra().wrapper,onPointerUp:e=>e.stopPropagation(),role:"application"},S!==Za.NOT_CREATED&&c.createElement(c.Fragment,null,S===Za.CREATED&&function(e){const t={position:"absolute",backgroundColor:"rgba(0,0,0,0.2)"};return e?c.createElement(c.Fragment,null,c.createElement("div",{style:Ba(Ba({},t),{},{left:0,top:0,bottom:0,width:e.left})}),c.createElement("div",{style:Ba(Ba({},t),{},{left:e.left,top:0,right:0,height:e.top})}),c.createElement("div",{style:Ba(Ba({},t),{},{left:e.left+e.width,top:e.top,right:0,bottom:0})}),c.createElement("div",{style:Ba(Ba({},t),{},{left:e.left,top:e.top+e.height,bottom:0,width:e.width})})):null}(D),c.createElement(fa(),{position:N,onStart:()=>{(0,s.kG)(D),null==i||i(za(D,l))},onDrag:(e,t)=>{if(g)return!1;C((e=>((0,s.kG)(e),e.merge({left:t.x,top:t.y}))))},onStop:()=>{(0,s.kG)(D),null==o||o(za(D,l))},defaultPosition:N,cancel:`.${Ra().handles}`,bounds:"parent"},c.createElement(_a,{size:D?{width:D.width,height:D.height}:void 0,onResizeStart:()=>{x(!0),(0,s.kG)(f.current&&D),null==i||i(za(D,l)),m(f.current.getBoundingClientRect()),A.current=D},onResize:T,onResizeStop:()=>{x(!1),(0,s.kG)(D),null==o||o(za(D,l)),A.current=null},handleClasses:ja,bounds:"parent",boundsByDirection:!0,lockAspectRatio:k},c.createElement("div",{style:D?{width:D.width,height:D.height}:void 0,className:d()(Ra().cropBox,"PSPDFKit-Document-Crop-Box")})))))};function Va(e){const{dispatch:t,linkAnnotation:n,pageIndex:o}=e;c.useEffect((()=>()=>{t((0,Kt.lL)())}),[]);const r=d()({[Dn().canvas]:!0});return c.createElement("div",{className:r},c.createElement(Ua,{viewportState:e.viewportState,page:e.page,onAreaChangeComplete:function(e){const r=n.set("pageIndex",o).set("boundingBox",e);window.setTimeout((()=>{(0,a.dC)((()=>{t((0,bt.FG)(r)),t((0,Kt.UU)()),t((0,De.Df)((0,i.l4)([r.id]),null)),t((0,bt.ZE)(r.id)),t((0,Kt.lL)())}))}),10)},frameWindow:e.window}))}var Ga=n(76374),Wa=n.n(Ga);const qa=e=>{let{viewportState:t,onAreaChangeComplete:n,frameWindow:o,onAreaChangeStart:r,initialDraggingEvent:i}=e;const l=(0,a.I0)(),{zoomLevel:u}=t,p=(0,c.useRef)(null),[f,h]=(0,c.useState)({left:0,top:0,height:0,width:0}),[m,g]=(0,c.useState)(!1),[v,y]=(0,c.useState)(null),[b,S]=(0,c.useState)(Za.NOT_CREATED),[P,E]=(0,c.useState)(void 0),x=(0,_r.R9)((e=>{"touches"in e&&2===e.touches.length&&g(!0),l((0,De._)(!0)),e.stopImmediatePropagation(),(0,s.kG)(p.current);const t=p.current.getBoundingClientRect(),{clientY:n,clientX:o}=Ka(e);h(t),y(new w.E9({x:o-t.left,y:n-t.top}))}));(0,c.useEffect)((()=>{i&&x(i)}),[i,x]);const D=(0,_r.R9)((e=>{if(!v||b===Za.CREATED)return;const{clientX:t,clientY:n}=Ka(e);if(v.x!==t||v.y!==t){e.stopImmediatePropagation();const o=t-f.left,i=n-f.top,a=new w.UL({left:Math.max(0,Math.min(o,v.x)),top:Math.max(0,Math.min(i,v.y)),width:o<v.x?Math.min(v.x,v.x-o):Math.min(o-v.x,f.width-v.x),height:i<v.y?Math.min(v.y,v.y-i):Math.min(i-v.y,f.height-v.y)});E(a),S(Za.CREATING),b===Za.NOT_CREATED&&(null==r||r(za(a,u)))}})),C=(0,_r.R9)((e=>{b!==Za.CREATED&&(g(!1),l((0,De._)(!1)),e.stopImmediatePropagation(),y(null),P?(null==n||n(za(P,u)),S(Za.CREATED)):S(Za.NOT_CREATED))}));(0,c.useEffect)((()=>(o.document.addEventListener("pointerdown",x),o.document.addEventListener("pointermove",D),o.document.addEventListener("pointerup",C),o.document.addEventListener("touchstart",x),o.document.addEventListener("touchmove",D),o.document.addEventListener("touchend",C),()=>{o.document.removeEventListener("pointerdown",x),o.document.removeEventListener("pointermove",D),o.document.removeEventListener("pointerup",C),o.document.removeEventListener("touchstart",x),o.document.removeEventListener("touchmove",D),o.document.removeEventListener("touchend",C)})),[x,D,C]);const k=P&&{x:P.left,y:P.top,width:P.width,height:P.height};return c.createElement("div",{ref:p,className:Wa().wrapper,onPointerUp:e=>e.stopPropagation(),role:"application"},b!==Za.NOT_CREATED&&c.createElement(c.Fragment,null,c.createElement(fa(),{position:k,onStart:()=>{(0,s.kG)(P),null==r||r(za(P,u))},onDrag:(e,t)=>{if(m)return!1;E((e=>((0,s.kG)(e),e.merge({left:t.x,top:t.y}))))},onStop:()=>{(0,s.kG)(P),null==n||n(za(P,u))},defaultPosition:k,bounds:"parent"},c.createElement("div",{style:P?{width:P.width,height:P.height}:void 0,className:d()(Wa().selectionBox,"PSPDFKit-Multiple-Selection-Box")}))))};function Ha(e){const t=(0,a.I0)(),n=(0,a.v9)((e=>e.annotations)),{pageIndex:o,viewportState:r,window:s,initialDraggingEvent:l,multiAnnotationsUsingShortcut:u}=e;return c.createElement("div",{className:Dn().canvas},c.createElement(qa,{viewportState:r,onAreaChangeComplete:function(e){const r=n.filter((e=>e.pageIndex===o)).toArray(),l=[];r.forEach((t=>{let[n,o]=t;const r=o.boundingBox;e.isRectOverlapping(r)&&l.push(n)})),l.length?s.setTimeout((()=>{(0,a.dC)((()=>{t((0,De.fz)()),t((0,De.Df)((0,i.l4)(l),null))}))}),5):t((0,Kt.FA)())},frameWindow:s,initialDraggingEvent:u?l:void 0}))}const $a=[N.A.SHAPE_LINE,N.A.SHAPE_RECTANGLE,N.A.SHAPE_ELLIPSE,N.A.SHAPE_POLYLINE,N.A.SHAPE_POLYGON],Xa=[N.A.DISTANCE,N.A.PERIMETER,N.A.RECTANGLE_AREA,N.A.ELLIPSE_AREA,N.A.POLYGON_AREA];var Ya=n(33320),Ja=n(71603);function Qa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function es(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qa(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ts=new J.Z,ns={[B.Dj2]:e=>e.set("debugMode",!0),[B.RTr]:e=>e.set("hasFetchedInitialRecordsFromInstant",!0),[B.kt4]:(e,t)=>{let{enabled:n}=t;return e.set("areClipboardActionsEnabled",n)},[B.heZ]:(e,t)=>{let{group:n}=t;return e.set("group",n)},[B.G5w]:e=>e.set("isDebugConsoleVisible",!0),[B.GW4]:e=>e.set("isDebugConsoleVisible",!1),[B.mqf]:(e,t)=>{let{preset:n="text-highlighter"}=t;const o=new w.FV((0,_.lx)(e.set("currentItemPreset",n)));return e.withMutations((e=>{e.set("currentItemPreset",n),e.set("interactionMode",N.A.TEXT_HIGHLIGHTER),e.set("selectedAnnotationIds",(0,i.l4)([o.id])),e.set("selectedAnnotationMode",R.o.EDITING),n&&!(n in X.AQ)&&e.setIn(["annotationPresetIds",o.id],n),e.setIn(["annotations",o.id],o)}))},[B.tLW]:e=>e.withMutations((t=>{t.set("currentItemPreset",null),t.set("interactionMode",null),e.interactionMode===N.A.TEXT_HIGHLIGHTER&&(0,_.Xu)(t),t.set("selectedAnnotationIds",(0,i.l4)())})),[B.tS$]:(e,t)=>{let{preset:n="redaction"}=t;const o=new $.Z((0,_.lx)(e.set("currentItemPreset",n)));return e.withMutations((e=>{e.set("currentItemPreset",n),e.set("interactionMode",N.A.REDACT_TEXT_HIGHLIGHTER),e.set("selectedAnnotationIds",(0,i.l4)([o.id])),e.set("selectedAnnotationMode",R.o.EDITING),n&&!(n in X.AQ)&&e.setIn(["annotationPresetIds",o.id],n),e.setIn(["annotations",o.id],o)}))},[B.g30]:e=>e.withMutations((t=>{t.set("currentItemPreset",null),t.set("interactionMode",null),e.interactionMode===N.A.REDACT_TEXT_HIGHLIGHTER&&(0,_.Xu)(t),t.set("selectedAnnotationIds",(0,i.l4)())})),[B.VNM]:(e,t)=>{let{editor:n}=t;return e.set("richTextEditorRef",n)},[B.yPS]:(e,t)=>{let{preset:n}=t;return e.withMutations((e=>{e.set("interactionMode",N.A.MEASUREMENT),void 0!==n&&e.set("currentItemPreset",n)}))},[B.m_C]:e=>e.set("interactionMode",null),[B.GXR]:(e,t)=>{let{preset:n}=t;const o=new w.Zc((0,_.lx)(e));return e.withMutations((t=>{t.set("interactionMode",N.A.INK),t.set("interactionsDisabled",!0),t.set("selectedAnnotationIds",(0,i.l4)([o.id])),t.set("selectedAnnotationMode",R.o.EDITING),void 0!==n&&t.set("currentItemPreset",n);const r=void 0!==n?n:e.currentItemPreset;r&&!X.AQ[r]&&t.setIn(["annotationPresetIds",o.id],r),t.setIn(["annotations",o.id],o)}))},[B.J7J]:e=>e.set("interactionMode",null),[B.JyO]:e=>e.withMutations((e=>{e.set("interactionMode",N.A.INK_ERASER),e.set("selectedAnnotationIds",(0,i.l4)()),e.set("interactionsDisabled",!0)})),[B.NDs]:e=>e.withMutations((e=>{e.set("interactionMode",null),e.set("interactionsDisabled",!1)})),[B.Vu4]:(e,t)=>{let{signatureRect:n,signaturePageIndex:o,formFieldName:r}=t;null!==o&&(0,s.kG)("number"==typeof o&&o>=0&&o<e.totalPages,"pageIndex must be a number between 0 and "+(e.totalPages-1)),null!==r&&(0,s.kG)("string"==typeof r,"formFieldName must be a string");const a={annotations:(0,i.aV)([new w.Zc({isSignature:!0,pageIndex:o})]),reason:Q.f.SELECT_START};return e.eventEmitter.emit("annotations.willChange",a),e.withMutations((e=>{e.set("interactionMode",N.A.SIGNATURE),e.setIn(["signatureState","signatureRect"],n),e.setIn(["signatureState","signaturePageIndex"],o),e.setIn(["signatureState","formFieldName"],r)}))},[B.S$y]:e=>e.withMutations((e=>{e.set("widgetAnnotationToFocus",null),e.set("interactionMode",null),e.set("currentItemPreset",null),e.setIn(["signatureState","formFieldName"],null),e.setIn(["signatureState","signatureRect"],null),e.setIn(["signatureState","signaturePageIndex"],null)})),[B.Dzg]:e=>{const t={annotations:(0,i.aV)([new w.GI({pageIndex:e.viewportState.currentPageIndex})]),reason:Q.f.SELECT_START};return e.eventEmitter.emit("annotations.willChange",t),e.withMutations((e=>{e.set("interactionMode",N.A.STAMP_PICKER),e.set("currentItemPreset",null)}))},[B.M3C]:e=>e.withMutations((e=>{e.set("interactionMode",N.A.STAMP_CUSTOM),e.set("currentItemPreset",null)})),[B.tie]:e=>e.withMutations((e=>{e.set("interactionMode",null)})),[B.JS9]:(e,t)=>{const n=Xa.includes(t.shapeInteractionMode),o=(0,_.lx)(e),{activeMeasurementScale:r,isCalibratingScale:a}=e;n&&(o.measurementScale=null!=r&&r.scale?new Ja.Z({fromValue:Number(r.scale.fromValue),toValue:Number(r.scale.toValue),unitFrom:r.scale.unitFrom,unitTo:r.scale.unitTo}):e.measurementScale,o.measurementPrecision=null!=r&&r.precision?r.precision:e.measurementPrecision,a&&(o.strokeColor=w.Il.BLUE));const s=new t.shapeClass(o);return e.withMutations((n=>{n.set("interactionMode",t.shapeInteractionMode),n.set("interactionsDisabled",!0),n.set("selectedAnnotationIds",(0,i.l4)([s.id])),n.set("selectedAnnotationMode",R.o.EDITING),void 0!==t.preset&&n.set("currentItemPreset",t.preset);const o=void 0!==t.preset?t.preset:e.currentItemPreset;o&&!X.AQ[o]&&n.setIn(["annotationPresetIds",s.id],o),n.setIn(["annotations",s.id],s)}))},[B.AIf]:e=>e.withMutations((e=>{e.set("interactionMode",null)})),[B.cbv]:(e,t)=>{let{preset:n="redaction"}=t;const o=new $.Z((0,_.lx)(e.set("currentItemPreset",n)));return e.withMutations((e=>{e.set("currentItemPreset",n),e.set("interactionMode",N.A.REDACT_SHAPE_RECTANGLE),e.set("interactionsDisabled",!0),e.set("selectedAnnotationIds",(0,i.l4)([o.id])),e.set("selectedAnnotationMode",R.o.EDITING),n&&!(n in X.AQ)&&e.setIn(["annotationPresetIds",o.id],n),e.setIn(["annotations",o.id],o)}))},[B.TUA]:e=>e.withMutations((t=>{t.set("interactionMode",null),t.set("currentItemPreset",null),e.interactionMode===N.A.REDACT_SHAPE_RECTANGLE&&(0,_.Xu)(t),t.set("selectedAnnotationIds",(0,i.l4)())})),[B.ZDQ]:(e,t)=>{const{annotation:n,preset:o}=t,r=n||new w.Qi((0,_.lx)(e));return e.withMutations((t=>{t.set("interactionMode",N.A.NOTE),t.set("selectedAnnotationIds",(0,i.l4)([r.id])),t.set("selectedAnnotationMode",R.o.EDITING),void 0!==o&&t.set("currentItemPreset",o);const n=void 0!==o?o:e.currentItemPreset;n&&!X.AQ[n]&&t.setIn(["annotationPresetIds",r.id],n),t.setIn(["annotations",r.id],r)}))},[B.B1n]:e=>e.withMutations((e=>{e.set("interactionMode",null)})),[B.dEe]:(e,t)=>{const n=t.annotation?t.annotation:new w.Jn((0,_.lx)(e));return e.withMutations((e=>{e.set("selectedAnnotationIds",(0,i.l4)([n.id])),e.set("selectedAnnotationMode",R.o.EDITING),e.setIn(["annotations",n.id],n),e.set("interactionMode",N.A.COMMENT_MARKER),e.set("currentItemPreset",null)}))},[B.iMs]:e=>e.set("interactionMode",null),[B.pnu]:(e,t)=>{const{annotation:n,preset:o}=t;let r=n;if(!r&&(r=new w.gd((0,_.lx)(e)),e.enableRichText(r))){var a;const e=q.ri.setStyleOrToggleFormat(r.text.value||"","fontColor",(null===(a=r.fontColor)||void 0===a?void 0:a.toHex())||"");r=r.set("fontColor",null).set("text",{format:"xhtml",value:e})}const s=r.id;return e.withMutations((n=>{n.set("interactionMode",t.isCallout?N.A.CALLOUT:N.A.TEXT),void 0!==o&&n.set("currentItemPreset",o);const a=void 0!==o?o:e.currentItemPreset;a&&!X.AQ[a]&&n.setIn(["annotationPresetIds",s],a),n.setIn(["annotations",s],r),n.set("selectedAnnotationIds",(0,i.l4)([s])),n.set("selectedAnnotationMode",R.o.EDITING)}))},[B.KqR]:e=>e.withMutations((e=>{e.set("interactionMode",null)})),[B.JRS]:e=>e.withMutations((e=>{e.set("interactionMode",N.A.DOCUMENT_CROP),e.set("interactionsDisabled",!0),e.set("currentItemPreset",null)})),[B.Gox]:e=>e.withMutations((e=>{e.set("interactionMode",null),e.set("interactionsDisabled",!1)})),[B.eFQ]:e=>e.set("interactionsDisabled",!1),[B.L8n]:e=>e.set("interactionsDisabled",!0),[B.MuN]:e=>e.set("showToolbar",!0),[B.xk1]:e=>e.set("showToolbar",!1),[B.tYC]:e=>e.set("enableAnnotationToolbar",!0),[B.NAH]:e=>e.set("enableAnnotationToolbar",!1),[B.Ce5]:(e,t)=>e.set("clientsChangeCallback",t.callback),[B.WtY]:(e,t)=>e.set("transformClientToPage",t.transformClientToPage),[B.tPZ]:(e,t)=>{const n=t.width>0?Math.abs(t.width-e.scrollbarOffset):-1*e.scrollbarOffset,o=(0,H.a$)(e.viewportState,e.viewportState.viewportRect,!1,n);return e.merge({viewportState:o,scrollbarOffset:t.width})},[B.rWQ]:(e,t)=>{let{layoutMode:n}=t;return e.update("viewportState",(e=>(0,H.YA)(e,n)))},[B.b0l]:(e,t)=>{let{scrollMode:n}=t;return e.update("viewportState",(e=>(0,H._U)(e,n)))},[B._n_]:(e,t)=>{let{scrollElement:n}=t;return e.set("scrollElement",n)},[B.bxr]:(e,t)=>{let{spreadSpacing:n}=t;return e.set("viewportState",(0,H.JN)(e.viewportState,n))},[B._ko]:(e,t)=>{let{pageSpacing:n}=t;return e.set("viewportState",(0,H.vY)(e.viewportState,n))},[B.FHt]:(e,t)=>{let{keepFirstSpreadAsSinglePage:n}=t;return e.set("viewportState",(0,H.EY)(e.viewportState,n))},[B.ht3]:(e,t)=>{let{viewportPadding:n}=t;return e.set("viewportState",(0,H._P)(e.viewportState,n))},[B.aYj]:e=>e.set("printingEnabled",!0),[B.hpj]:e=>e.set("printingEnabled",!1),[B.QYP]:e=>e.set("exportEnabled",!0),[B.zKF]:e=>e.set("exportEnabled",!1),[B.NfO]:(e,t)=>{let{readOnlyEnabled:n}=t;return e.set("readOnlyEnabled",n)},[B.cyk]:e=>e.set("showAnnotations",!0),[B.KYU]:e=>e.set("showAnnotations",!1),[B.Nl1]:e=>e.set("showComments",!0),[B.L9g]:e=>e.set("showComments",!1),[B.Dl4]:e=>e.set("showAnnotationNotes",!0),[B.GfR]:e=>e.set("showAnnotationNotes",!1),[B.Xlm]:e=>((0,s.kG)(!e.backendPermissions.readOnly,"Can not disable read only mode."),e.set("readOnlyEnabled",te.J.NO)),[B.iQZ]:(e,t)=>{let{features:n}=t;return(0,s.kG)(0===e.features.size,"Cannot alterate the supported features list after initialization."),n.includes(ee.q.FORMS)||(e=e.set("formsEnabled",!1)),(0,Kn.Vz)(n)||n.includes(ee.q.ELECTRONIC_SIGNATURES)||(e=(e=e.set("readOnlyEnabled",te.J.LICENSE_RESTRICTED)).setIn(["backendPermissions","readOnly"],!0)),e.set("features",n)},[B.JQC]:(e,t)=>{let{signatureFeatureAvailability:n}=t;return(0,s.kG)(!e.signatureFeatureAvailability,"Cannot alterate the signature feature availability after initialization."),e.set("signatureFeatureAvailability",n)},[B.hv0]:(e,t)=>{let{mode:n}=t;return e.set("sidebarMode",n)},[B.eI4]:(e,t)=>{let{placement:n}=t;return e.set("sidebarPlacement",n)},[B.bP3]:(e,t)=>{let{sidebarOptions:n}=t;return e.set("sidebarOptions",n)},[B._TO]:(e,t)=>{let{showSignatureValidationStatus:n}=t;return e.set("showSignatureValidationStatus",n)},[B.dVW]:(e,t)=>{let{locale:n}=t;return e.set("locale",n)},[B.hlI]:(e,t)=>{let{annotationCreatorName:n,immutable:o}=t;return e.set("annotationCreatorName",n).set("annotationCreatorNameReadOnly",o)},[B.ZbY]:(e,t)=>{let{editableAnnotationTypes:n}=t;return e.set("editableAnnotationTypes",n).set("isEditableAnnotation",null)},[B.uFU]:(e,t)=>{let{isEditableAnnotation:n}=t;return e.set("isEditableAnnotation",n).set("editableAnnotationTypes",(0,i.l4)(Y.Z))},[B.ArU]:(e,t)=>{let{editableAnnotationTypes:n,isEditableAnnotation:o}=t;return e.set("isEditableAnnotation",o).set("editableAnnotationTypes",n)},[B.Q2U]:(e,t)=>{let{isEditableComment:n}=t;return e.set("isEditableComment",n)},[B.IFt]:(e,t)=>{let{formDesignMode:n}=t;return e.withMutations((t=>{t.set("formDesignMode",n),!1===n&&t.set("selectedAnnotationIds",e.selectedAnnotationIds.filter((t=>e.annotations.get(t)&&!(e.annotations.get(t)instanceof w.x_))))}))},[B.YIz]:e=>e.set("interactionMode",N.A.DOCUMENT_EDITOR),[B.Gkm]:(e,t)=>{let{measurementSnapping:n}=t;return e.set("measurementSnapping",n)},[B.fwq]:(e,t)=>{let{measurementPrecision:n}=t;return e.set("measurementPrecision",n)},[B.G6t]:(e,t)=>{let{scale:n}=t;return e.set("measurementScale",n)},[B.K26]:e=>e.set("interactionMode",null),[B.Hbz]:e=>e.set("interactionMode",N.A.MARQUEE_ZOOM),[B.$VE]:(e,t)=>{let{interactionMode:n}=t;return e.set("interactionMode",n)},[B.yrz]:e=>e.set("interactionMode",null),[B.sYK]:e=>e.set("interactionMode",null),[B.fAF]:(e,t)=>e.set("customRenderers",t.customRenderers),[B.pNz]:e=>e.withMutations((e=>{e.set("isSigning",!0),e.set("interactionsDisabled",!0)})),[B.bV3]:e=>e.withMutations((e=>{e.set("isSigning",!1),e.set("interactionsDisabled",!1)})),[B.EpY]:e=>e.withMutations((e=>{e.set("isApplyingRedactions",!0),e.set("interactionsDisabled",!0)})),[B.bui]:e=>e.withMutations((e=>{e.set("isApplyingRedactions",!1),e.set("interactionsDisabled",!1)})),[B.vVk]:(e,t)=>{let{previewRedactionMode:n}=t;return e.set("previewRedactionMode",n)},[B.D5x]:(e,t)=>e.set("a11yStatusMessage",t.a11yStatusMessage),[B.rpU]:(e,t)=>{let{lastToolbarActionUsedKeyboard:n}=t;return e.set("lastToolbarActionUsedKeyboard",n)},[B.KA1]:(e,t)=>{let{documentComparisonState:n}=t;return e.set("documentComparisonState",n?es(es({},e.documentComparisonState),n):null)},[B.MYU]:e=>e.set("canScrollWhileDrawing",!0),[B.mbD]:e=>e.set("canScrollWhileDrawing",!1),[B.wog]:e=>e.set("keepSelectedTool",!0),[B.UL9]:e=>e.set("keepSelectedTool",!1),[B.tIQ]:(e,t)=>{const n=e.viewportState.set("disablePointSnapping",t.disablePointSnapping);return e.set("viewportState",n)},[B.IyB]:(e,t)=>{let{instance:n}=t;return e.set("instance",n)},[B.eJ4]:(e,t)=>{let{customUIStore:n}=t;return e.set("customUIStore",n)},[B.R7l]:e=>{const t=new w.R1((0,_.lx)(e)),n="link";return e.withMutations((e=>{e.set("linkAnnotationMode",!0),e.set("interactionMode",N.A.LINK),e.set("selectedAnnotationIds",(0,i.l4)([t.id])),e.set("selectedAnnotationMode",R.o.EDITING),e.setIn(["annotations",t.id],t),e.set("currentItemPreset",n);const o=n;!X.AQ.link&&e.setIn(["annotationPresetIds",t.id],o)}))},[B.qKG]:e=>e.withMutations((e=>{e.set("linkAnnotationMode",!1)})),[B.oZW]:(e,t)=>{let{multiAnnotationsUsingShortcut:n}=t;return e.withMutations((t=>{e.isMultiSelectionEnabled&&(t.set("interactionMode",N.A.MULTI_ANNOTATIONS_SELECTION),t.set("selectedAnnotationIds",(0,i.l4)()),t.set("selectedAnnotationMode",R.o.SELECTED),t.set("multiAnnotationsUsingShortcut",n))}))},[B.odo]:e=>e.withMutations((e=>{e.set("interactionMode",null),e.set("multiAnnotationsUsingShortcut",null)})),[B.Vje]:e=>e.set("interactionMode",N.A.MEASUREMENT_SETTINGS),[B.XTO]:e=>e.set("interactionMode",null),[B.FQb]:(e,t)=>{let{annotationsIds:n}=t;return e.withMutations((e=>{var t;const{annotationsGroups:o,annotations:r}=e,a=null===(t=r.find((e=>e.get("id")===n.first())))||void 0===t?void 0:t.get("pageIndex");n.forEach((e=>{const t=r.find((t=>t.id===e));(0,s.kG)(t,`Annotation with id ${e} couldn't be found.`),(0,s.kG)(a===t.get("pageIndex"),"Annotations can't be grouped if they are not on the same page")}));const l=o.map((e=>{const t=e.annotationsIds;return e.annotationsIds=t.filter((e=>!n.includes(e))),e})).filter((e=>e.annotationsIds.size>0)),c=(0,Ya.C)();e.set("annotationsGroups",l.set(c,{groupKey:c,annotationsIds:(0,i.l4)(n)})),e.set("selectedGroupId",c)}))},[B.t$K]:(e,t)=>{let{groupId:n}=t;return e.set("selectedGroupId",n)},[B.vBn]:(e,t)=>{let{pullToRefreshNewState:n}=t;return e.set("disablePullToRefresh",n)},[B.bzW]:(e,t)=>{let{groupId:n}=t;return e.withMutations((e=>{const{annotationsGroups:t}=e;e.set("annotationsGroups",t.delete(n)),e.set("selectedGroupId",null)}))},[B.b4I]:(e,t)=>{let{annotationId:n,groupId:o}=t;return e.withMutations((e=>{const{annotationsGroups:t}=e,r=t.get(o);r&&(e.set("annotationsGroups",t.set(o,{groupKey:o,annotationsIds:r.annotationsIds.delete(n)})),e.set("selectedGroupId",null))}))},[B.tzG]:(e,t)=>{let{customFontsReadableNames:n}=t;return e.set("customFontsReadableNames",n)}};function os(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ts,t=arguments.length>1?arguments[1]:void 0;const n=ns[t.type];return n?n(e,t):e}var rs=n(89849);const is=new w.ZM,as={[B.BS3]:(e,t)=>e.set("connectionState",new w.em({name:rs.F.CONNECTING,reason:t.reason,progress:t.progress})),[B.nmm]:e=>e.set("connectionState",new w.em({name:rs.F.CONNECTED})),[B.zZV]:(e,t)=>e.set("connectionState",new w.em({name:rs.F.CONNECTION_FAILED,reason:t.reason})),[B.rxv]:(e,t)=>e.set("annotationManager",t.annotationManager),[B.Hrp]:(e,t)=>e.set("bookmarkManager",t.bookmarkManager),[B.GHc]:(e,t)=>e.set("formFieldValueManager",t.formFieldValueManager),[B.oj5]:(e,t)=>e.set("formFieldManager",t.formFieldManager),[B.UII]:(e,t)=>e.set("commentManager",t.commentManager),[B.gbd]:(e,t)=>e.set("changeManager",t.changeManager),[B.Ty$]:(e,t)=>e.set("connectionState",new w.em({name:rs.F.PASSWORD_REQUIRED})).set("resolvePassword",t.resolvePassword),[B.hC8]:e=>e.set("isUnlockedViaModal",!0).set("resolvePassword",null),[B.poO]:(e,t)=>e.set("hasPassword",t.hasPassword),[B.iZ1]:(e,t)=>e.set("allowedTileScales",t.allowedTileScales)};function ss(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:is,t=arguments.length>1?arguments[1]:void 0;const n=as[t.type];return n?n(e,t):e}const ls=new w.ZM,cs={[B.jJ7]:(e,t)=>{const{item:n}=t;return(0,Pe.k)(e.pages.get(n.pageIndex),`Trying to insert a CustomOverlayItem at pageIndex ${n.pageIndex}. But such a page does not exist.`),e.withMutations((e=>{e.updateIn(["pages",n.pageIndex,"customOverlayItemIds"],(e=>e.add(n.id))).setIn(["customOverlayItems",n.id],n)}))},[B.G8_]:(e,t)=>{const n=e.customOverlayItems.get(t.id);return(0,Pe.k)(n,"CustomOverlayItem not found"),e.withMutations((e=>{e.deleteIn(["pages",n.pageIndex,"customOverlayItemIds",n.id]).deleteIn(["customOverlayItems",n.id])}))}};function us(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ls,t=arguments.length>1?arguments[1]:void 0;const n=cs[t.type];return n?n(e,t):e}const ds=new w.ZM,ps={[B.lRe]:(e,t)=>e.set("digitalSignatures",t.digitalSignatures)};function fs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ds,t=arguments.length>1?arguments[1]:void 0;const n=ps[t.type];return n?n(e,t):e}const hs=new J.Z,ms={[B.Oh4]:(e,t)=>{let{outline:n}=t;return e.withMutations((e=>{e.setIn(["documentOutlineState","elements"],n),e.setIn(["documentOutlineState","expanded"],vs((0,i.D5)(),n,"0"))}))},[B.Whn]:(e,t)=>{let{level:n}=t;return e.updateIn(["documentOutlineState","expanded",n],(e=>!e))}};function gs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:hs,t=arguments.length>1?arguments[1]:void 0;const n=ms[t.type];return n?n(e,t):e}function vs(e,t,n){return t.reduce(((e,t,o)=>{if(0===t.size)return e;const r=`${n}-${o}`;return vs(e.set(r,t.isExpanded),t.children,r)}),e)}var ys=n(71693),bs=n(56956),ws=n(52560),Ss=n(28098);const Ps=new w.ZM,Es={[B.wtk]:e=>{const{viewportState:t}=e,n=(0,ys.dF)(t,t.currentPageIndex),o=(0,ys.kd)(t),r=n>=o-1?o-1:n+1,a=(0,ys.P1)(t,r)[0];return(0,s.kG)("number"==typeof a,"Can not find the next pageIndex."),e.withMutations((t=>{t.set("viewportState",(0,bs.eb)(e.viewportState,a)),t.set("hoverAnnotationIds",(0,i.l4)())}))},[B.mE7]:e=>{const{viewportState:t}=e,n=(0,ys.dF)(t,t.currentPageIndex),o=n<=0?0:n-1,r=(0,ys.P1)(t,o)[0];return(0,s.kG)("number"==typeof r,"Can not find the next pageIndex."),e.withMutations((n=>{n.set("viewportState",(0,bs.eb)(e.viewportState,r)),r!==t.currentPageIndex&&n.set("hoverAnnotationIds",(0,i.l4)())}))},[B.RxB]:(e,t)=>{const{pageIndex:n}=t;return(0,s.kG)(n>=0&&n<e.totalPages,"pageIndex out of bounds"),e.withMutations((t=>{t.set("viewportState",(0,bs.eb)(e.viewportState,n)),n!==e.viewportState.currentPageIndex&&t.set("hoverAnnotationIds",(0,i.l4)())}))},[B.mLh]:(e,t)=>{const{scrollPosition:n,lastScrollUsingKeyboard:o=!1}=t;return e.set("viewportState",(0,bs.hu)(e.viewportState,n).set("lastScrollUsingKeyboard",o))},[B.g4f]:(e,t)=>{let{pageIndex:n,rect:o}=t;return e.set("viewportState",(0,bs.kN)(e.viewportState,n,o))},[B.Lyo]:(e,t)=>{let{pageIndex:n,rect:o}=t;return e.set("viewportState",(0,bs.vP)(e.viewportState,n,o))},[B.xYE]:(e,t)=>{var n;let{viewportRect:o,isTriggeredByOrientationChange:r}=t;const i=w.UL.fromClientRect(null===(n=e.rootElement)||void 0===n?void 0:n.getBoundingClientRect()),a=(0,H.a$)(e.viewportState,o,r,e.scrollbarOffset);return e.withMutations((e=>{e.set("containerRect",i),e.set("viewportState",a)}))},[B.syg]:(e,t)=>{let n=(0,ws.cq)(e.viewportState,t.zoomLevel);return t.scrollPosition&&(n=n.set("scrollPosition",t.scrollPosition)),e.set("viewportState",n)},[B.u9b]:(e,t)=>{const n=e.viewportState.set("zoomStep",t.zoomStep);return e.set("viewportState",n)},[B.ZGb]:(e,t)=>e.set("viewportState",t.viewportState),[B.UFs]:e=>e.set("viewportState",(0,ws.cq)(e.viewportState,e.viewportState.zoomLevel*e.viewportState.zoomStep)),[B.RCc]:e=>e.set("viewportState",(0,ws.cq)(e.viewportState,e.viewportState.zoomLevel/e.viewportState.zoomStep)),[B.MfE]:e=>e.set("viewportState",(0,ws.cq)(e.viewportState,Ss.c.AUTO)),[B.BWS]:e=>e.set("viewportState",(0,ws.cq)(e.viewportState,Ss.c.FIT_TO_VIEWPORT)),[B.QU3]:e=>e.set("viewportState",(0,ws.cq)(e.viewportState,Ss.c.FIT_TO_WIDTH)),[B.lD1]:(e,t)=>{let{degCW:n}=t;return e.update("viewportState",(e=>(0,vr.U1)(e,n)))},[B.kRo]:e=>e.set("interactionMode",N.A.PAN),[B.UFK]:e=>e.set("interactionMode",null),[B.D1d]:(e,t)=>{let{width:n}=t;return e.set("sidebarWidth",n)},[B.WsN]:(e,t)=>{let{shouldDisable:n}=t;return e.set("scrollDisabled",n)}};function xs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ps,t=arguments.length>1?arguments[1]:void 0;const n=Es[t.type];return n?n(e,t):e}var Ds=n(19568),Cs=n(47710),ks=n(4757),Os=n(56169),As=n(98013);function Ts(e){return(0,s.kG)(6===e.length,"Tried to deserialize matrix that does not have 6 entries"),new b.sl({a:e[0],b:e[1],c:e[2],d:e[3],e:e[4],f:e[5]})}var Is=n(93572),Fs=n(76413),Ms=n.n(Fs);function _s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Ns(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_s(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Rs=new w.ZM,Ls={[B.dCo]:(e,t)=>{const n=e.pages.map((e=>e.pageKey)),o=(0,i.aV)(t.payload).map((t=>{var o;const r=new w.$u({width:t.width,height:t.height}),a=n.get(t.pageIndex)||(0,Ya.C)(),s=(null===(o=e.pages.get(t.pageIndex))||void 0===o?void 0:o.annotationIds)||(0,i.hU)();return new w.T3(Ns(Ns({},t),{},{matrix:Ts(t.matrix),reverseMatrix:Ts(t.reverseMatrix),untransformedRect:(0,Is.k)(t.untransformedBBox),transformedRect:(0,Is.k)(t.transformedBBox),rawPdfBoxes:t.rawPdfBoxes,pageKey:a,pageSize:r,annotationIds:s}))})),r=o.map((e=>e.pageSize));return e.withMutations((e=>{const t=e.viewportState.set("pageSizes",r);e.set("pages",o),e.set("viewportState",t),e.set("arePageSizesLoaded",!0)}))},[B.ME7]:(e,t)=>{const n=(0,i.aV)(t.payload.pages).map((e=>{var n;const o=new w.$u({width:e.width,height:e.height}),r=(null===(n=t.pageKeys)||void 0===n?void 0:n.get(e.pageIndex))||(0,Ya.C)();return new w.T3(Ns(Ns({},e),{},{matrix:Ts(e.matrix),reverseMatrix:Ts(e.reverseMatrix),untransformedRect:(0,Is.k)(e.untransformedBBox),transformedRect:(0,Is.k)(e.transformedBBox),rawPdfBoxes:e.rawPdfBoxes,pageKey:r,pageSize:o}))})),o=n.map((e=>e.pageSize));return e.withMutations((r=>{let i=r.viewportState.set("pageSizes",o);if(r.set("pages",n),r.set("totalPages",n.size),r.set("documentPermissions",new Ds.Z(rt.Options.IGNORE_DOCUMENT_PERMISSIONS?void 0:t.payload.permissions)),i.currentPageIndex>=n.size&&(i=i.set("currentPageIndex",0)),i.zoomMode===Ss.c.CUSTOM){const e=(0,ws.Yo)(i),t=(0,ws.Sm)(i);(i.zoomLevel<e||i.zoomLevel>t)&&(i=i.set("zoomMode",Ss.c.AUTO))}if(i=i.zoomMode===Ss.c.CUSTOM?i.merge({zoomLevel:(0,ws.X9)(i,i.zoomLevel)}):i.merge({zoomLevel:(0,ws.X9)(i,i.zoomMode)}),i.scrollMode===Cs.G.PER_SPREAD&&(i=(0,H._U)(i.set("scrollMode",Cs.G.CONTINUOUS),Cs.G.PER_SPREAD)),i.scrollMode===Cs.G.DISABLED&&(i=(0,H._U)(i.set("scrollMode",Cs.G.CONTINUOUS),Cs.G.DISABLED)),i.currentPageIndex>0){if(0===i.viewportRect.width||0===i.viewportRect.height){let t=e.containerRect;e.showToolbar&&(t=t.set("top",As.k3).set("height",t.height-As.k3)),i=i.set("viewportRect",t)}i=(0,bs.eb)(i.set("currentPageIndex",0),i.currentPageIndex)}r.set("viewportState",i)}))},[B.GZZ]:(e,t)=>{const n=(0,i.D5)().withMutations((n=>{const o=[];t.textLines.forEach((t=>{var n;o.push(new ir.f(null===(n=e.frameWindow)||void 0===n?void 0:n.document,(0,i.aV)([(0,ks.LD)((0,Kn.HI)(e),t)]),{},Ms().line))})),t.textLines.forEach(((e,t)=>{const r=o[t].measure().get(0);(0,Pe.k)(r);const{id:i}=e;n.set(i,{scaleX:e.boundingBox.width/r.width,scaleY:e.boundingBox.height/r.height})})),t.textLines.forEach(((e,t)=>{o[t].remove()}))}));return e.setIn(["pages",t.pageIndex,"textLines"],t.textLines).setIn(["pages",t.pageIndex,"textLineScales"],n)},[B.fnw]:(e,t)=>{let{backendPermissions:n}=t;return e.withMutations((e=>{n.readOnly&&e.set("readOnlyEnabled",te.J.VIA_BACKEND_PERMISSIONS),n.downloadingAllowed||(e.set("exportEnabled",!1),e.set("printingEnabled",!1)),e.set("backendPermissions",n)}))},[B.obk]:e=>e.withMutations((e=>{e.set("annotations",(0,i.D5)()),e.set("attachments",(0,i.D5)()),e.set("formFields",(0,i.D5)()),e.set("currentTextSelection",null),e.set("interactionMode",null),e.set("selectedAnnotationIds",(0,i.l4)()),e.set("selectedAnnotationShouldDrag",null),e.set("selectedAnnotationMode",null),e.set("activeAnnotationNote",null),e.set("interactionsDisabled",!1),e.set("annotationPresetIds",(0,i.D5)()),e.set("documentOutlineState",new w.S),e.set("comments",(0,i.D5)()),e.set("commentThreads",(0,i.D5)()),e.set("invalidAPStreams",(0,i.D5)()),e.set("searchState",new Os.Z)})),[B.S0t]:(e,t)=>e.set("documentHandle",t.documentHandle).set("isDocumentHandleOutdated",!1),[B.YS$]:(e,t)=>e.set("isDocumentHandleOutdated",t.isDocumentHandleOutdated),[B.UX$]:(e,t)=>e.set("reuseState",t.state?new J.w(t.state):null),[B.TG1]:(e,t)=>e.withMutations((e=>{t.pageIndexes.forEach((t=>{e.setIn(["pages",t,"pageKey"],(0,Ya.C)())}))})),[B.bM3]:(e,t)=>e.withMutations((e=>{t.pageKeysForPages.forEach((t=>{e.setIn(["pages",t.pageIndex,"pageKey"],t.pageKey)}))}))};function Bs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rs,t=arguments.length>1?arguments[1]:void 0;const n=Ls[t.type];return n?n(e,t):e}const js=new J.Z,zs={[B.skc]:e=>e.set("isPrinting",!0),[B.snh]:e=>e.set("isPrinting",!1),[B._uU]:e=>e.set("isPrinting",!1),[B.qV6]:(e,t)=>{let{currentPage:n}=t;return e.set("printLoadingIndicatorProgress",n)}};function Ks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:js,t=arguments.length>1?arguments[1]:void 0;const n=zs[t.type];return n?n(e,t):e}function Zs(e,t){const{focusedResultIndex:n}=e.searchState,o=e.searchState.results.size;if(o<=0)return e;let r=n+t;r<0&&(r+=o);const i=Math.abs(r%o),a=e.searchState.results.get(i);(0,Pe.k)(a);const s=(0,bs.kN)(e.viewportState,a.pageIndex,w.UL.union(null==a?void 0:a.rectsOnPage));return e.setIn(["searchState","focusedResultIndex"],i).set("viewportState",s)}const Us={[B.FH6]:(e,t)=>t.term.length>=e.searchState.minSearchQueryLength?e.setIn(["searchState","term"],t.term):e.setIn(["searchState","term"],t.term).setIn(["searchState","focusedResultIndex"],-1).setIn(["searchState","results"],(0,i.aV)()).setIn(["searchState","isLoading"],!1),[B.$Jy]:e=>Zs(e,1),[B.gIV]:e=>Zs(e,-1),[B.$hO]:e=>e.set("interactionMode",N.A.SEARCH).setIn(["searchState","isFocused"],!0),[B._AY]:e=>e.set("interactionMode",null).mergeIn(["searchState"],{isFocused:!1,term:"",results:(0,i.aV)(),focusedResultIndex:-1}),[B.Ifu]:e=>e.setIn(["searchState","isFocused"],!0),[B.nFn]:e=>e.setIn(["searchState","isFocused"],!1),[B.F6q]:(e,t)=>{let{isLoading:n}=t;return e.setIn(["searchState","isLoading"],n)},[B.qZT]:(e,t)=>{let{results:n}=t,o=e.viewportState,r=-1;if(-1!==e.searchState.focusedResultIndex){const t=e.searchState.results.get(e.searchState.focusedResultIndex);(0,Pe.k)(t);const{pageIndex:o}=t,i=t.rectsOnPage.first();(0,Pe.k)(i);const{top:a,left:s}=i;r=n.findIndex((e=>{const t=e.rectsOnPage.first();return(0,Pe.k)(t),e.pageIndex===o&&t.top===a&&t.left===s}))}if(-1===r&&n.size>0){r=n.findIndex((t=>t.pageIndex>=e.viewportState.currentPageIndex)),-1===r&&(r=0);const t=n.get(r);(0,Pe.k)(t),o=(0,bs.kN)(e.viewportState,t.pageIndex,w.UL.union(t.rectsOnPage))}return e.setIn(["searchState","results"],n).setIn(["searchState","focusedResultIndex"],r).set("viewportState",o)},[B.p1u]:(e,t)=>{let{state:n}=t;return e.set("searchState",n)},[B.esN]:(e,t)=>{let{provider:n}=t;return e.set("searchProvider",n)}};function Vs(e,t){const n=Us[t.type];return n?n(e,t):e}const Gs=new w.ZM,Ws={[B.f3N]:(e,t)=>{const n=t.textRange,{startTextLineId:o,endTextLineId:r,startPageIndex:a,endPageIndex:s}=n.startAndEndIds(),l=new w.Bs({textRange:t.textRange,startTextLineId:o,endTextLineId:r,startPageIndex:a,endPageIndex:s}),c=e.withMutations((t=>{t.set("currentTextSelection",l),e.interactionMode!==N.A.TEXT_HIGHLIGHTER&&e.interactionMode!==N.A.REDACT_TEXT_HIGHLIGHTER&&t.set("selectedAnnotationIds",(0,i.l4)())}));return(0,Kn.j$)(w.On,e)?c:c.withMutations((e=>{e.set("inlineTextMarkupToolbar",t.inlineTextMarkupToolbar)}))},[B.MOe]:e=>e.delete("currentTextSelection"),[B.a33]:e=>e.withMutations((t=>{t.delete("selectedAnnotationMode"),t.set("currentItemPreset",null),e.interactionMode===N.A.TEXT_HIGHLIGHTER&&(0,_.Xu)(t),t.set("selectedAnnotationIds",(0,i.l4)()),t.set("widgetAnnotationToFocus",null),t.set("interactionMode",e.interactionMode===N.A.PAN||e.interactionMode===N.A.FORM_CREATOR?e.interactionMode:null),t.set("selectedTextOnEdit",!1),t.set("activeAnnotationNote",null),e.interactionMode===N.A.DISTANCE&&e.isCalibratingScale&&t.set("isCalibratingScale",!1)})),[B._Yi]:(e,t)=>{let n=null;const o=t.annotations.filter((t=>{const o=e.annotations.get(t);return n=e.annotationPresetIds.get(t)||null,o&&(o instanceof w.Qi||o.isCommentThreadRoot||!(0,Kn.lV)(o,e))}));return 0===o.size?e:e.withMutations((e=>{e.set("selectedAnnotationIds",o),e.set("currentItemPreset",n),e.set("selectedAnnotationMode",t.mode),e.set("selectedAnnotationShouldDrag",t.selectedAnnotationShouldDrag),e.delete("currentTextSelection")}))},[B.c3G]:e=>e.set("selectedAnnotationShouldDrag",null),[B.RvB]:e=>e.set("selectedTextOnEdit",!0),[B.qh0]:(e,t)=>((0,s.kG)(e.annotations.has(t.id),"Annotation not found"),e.readOnlyEnabled?e.update("focusedAnnotationIds",(e=>e.add(t.id))):e),[B.rm]:(e,t)=>((0,s.kG)(e.annotations.has(t.id),"Annotation not found"),e.readOnlyEnabled?e.update("focusedAnnotationIds",(e=>e.delete(t.id))):e),[B.TPT]:(e,t)=>{(0,s.kG)(e.annotations.has(t.id),"Annotation not found");const n=e.annotations.get(t.id);return e.readOnlyEnabled===te.J.NO||n instanceof w.Qi?e.updateIn(["hoverAnnotationIds"],(e=>e.has(t.id)?e:e.add(t.id))):e},[B.iyZ]:(e,t)=>{(0,s.kG)(e.annotations.has(t.id),"Annotation not found");const n=e.annotations.get(t.id);return e.readOnlyEnabled===te.J.NO||n instanceof w.Qi?e.updateIn(["hoverAnnotationIds"],(e=>e.has(t.id)?e.delete(t.id):e)):e},[B.yyM]:(e,t)=>{const n=t.annotationNote;return e.set("hoverAnnotationNote",n)},[B.vSH]:(e,t)=>e.set("activeAnnotationNote",t.annotationNote),[B._fK]:(e,t)=>e.withMutations((n=>{if(t.newSelectedAnnotationsIds.size>0)n.set("selectedAnnotationIds",t.newSelectedAnnotationsIds);else{const o=1===e.selectedAnnotationIds.size&&e.annotations.get(e.selectedAnnotationIds.first());if(!o||null!=o.pageIndex){const o=new t.annotationClass((0,_.lx)(e));n.setIn(["annotations",o.id],o),n.set("selectedAnnotationIds",(0,i.l4)([o.id])),null!=e.currentItemPreset&&n.setIn(["annotationPresetIds",o.id],e.currentItemPreset)}}})),[B.L2A]:(e,t)=>e.set("inlineTextSelectionToolbarItems",t.inlineTextSelectionToolbarItemsCallback)};function qs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Gs,t=arguments.length>1?arguments[1]:void 0;const n=Ws[t.type];return n?n(e,t):e}const Hs=new w.ZM,$s={[B.mGH]:(e,t)=>{let{signature:n}=t;return e.withMutations((e=>{(0,_.ud)(e,n)}))},[B.W0l]:(e,t)=>{let{annotation:n}=t;return e.signatureState.formFieldName&&(0,s.kG)(!e.signatureState.formFieldsNotSavingSignatures.includes(e.signatureState.formFieldName),`Cannot save signature for the form field \`${e.signatureState.formFieldName}\` because this field is in formFieldsNotSavingSignatures`),e.updateIn(["signatureState","storedSignatures"],(e=>e.push(n)))},[B.Kw7]:(e,t)=>{let{annotations:n}=t;return e.setIn(["signatureState","storedSignatures"],n)},[B.Kc8]:(e,t)=>{let{annotation:n}=t;return e.updateIn(["signatureState","storedSignatures"],(e=>e.filter((e=>!e.equals(n)))))}};function Xs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hs,t=arguments.length>1?arguments[1]:void 0;const n=$s[t.type];return n?n(e,t):e}const Ys=new w.ZM,Js={[B.aWu]:(e,t)=>e.set("toolbarItems",t.toolbarItems),[B.T3g]:(e,t)=>e.set("annotationToolbarItems",t.annotationToolbarItemsCallback),[B.A8G]:(e,t)=>e.set("annotationToolbarHeight",t.height)};function Qs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ys,t=arguments.length>1?arguments[1]:void 0;const n=Js[t.type];return n?n(e,t):e}const el=new w.ZM,tl={[B.iJ2]:(e,t)=>{let{formJSON:n}=t;(0,s.kG)("pspdfkit/form"==n.type,"Invalid type for form JSON."),(0,s.kG)(1==n.v,"Invalid version for form JSON."),(0,s.kG)(n.fields instanceof Array,"Invalid type for `fields` in form JSON.");const o=(0,Ze.U_)(n.fields),r=(0,Ze.hT)(n.annotations);return e.withMutations((e=>{e.set("formFields",o),r.forEach((t=>{const{id:n}=t;e.setIn(["annotations",n],t),(0,s.kG)(e.pages.has(t.pageIndex),"Invalid `pageIndex` of widget annotation: "+t.pageIndex),e.updateIn(["pages",t.pageIndex,"annotationIds"],(e=>e.add(n)))}))}))},[B.zGM]:(e,t)=>e.withMutations((e=>{t.formFields.forEach((t=>{e.setIn(["formFields",t.name],t)}))})),[B.Wyx]:(e,t)=>e.withMutations((n=>{t.formFields.forEach((t=>{const o=e.formFields.valueSeq().find((e=>e.id===t.id));(0,s.kG)(o,"Invalid form field ID: "+t.id);const r=o.name!==t.name;if(t instanceof w.XQ){const n=e.formFields.find((e=>e.name===t.name)),o=null==n?void 0:n.annotationIds;if(o&&n.id!==t.id){let e=o,r=n.options;[...t.annotationIds].forEach(((n,o)=>{e.includes(n)||(e=e.push(n),r=r.push(t.options.get(o)))})),t=t.set("annotationIds",e).set("options",r)}}if(r){t.annotationIds.forEach((e=>{n.annotations.get(e)&&n.setIn(["annotations",e,"formFieldName"],t.name)})),n.deleteIn(["formFields",o.name])}n.setIn(["formFields",t.name],t),(0,Ze.r_)(o,e,n)}))})),[B.fDl]:(e,t)=>{const n=e.formFields.find((e=>e.id===t.formField.id));return e.withMutations((o=>{o.deleteIn(["formFields",null==n?void 0:n.name]),o.setIn(["formFields",t.formField.name],t.formField),(0,Ze.r_)(e.formFields.get(t.formField.name),e,o)}))},[B.D_w]:(e,t)=>e.withMutations((n=>{t.formFieldsIds.forEach((t=>{const o=(0,Ze.CL)(e,t);o&&n.deleteIn(["formFields",o.name])}))})),[B.Ui_]:(e,t)=>e.withMutations((n=>{(0,Ze.AM)({state:e,mutableState:n,formFieldValues:t.formFieldValues,areFormFieldValuesNew:!0})})),[B.m3$]:(e,t)=>e.withMutations((n=>{(0,Ze.AM)({state:e,mutableState:n,formFieldValues:t.formFieldValues,areFormFieldValuesNew:!1})})),[B.VK7]:(e,t)=>{let{formattedFormFieldValues:n}=t;return e.set("formattedFormFieldValues",e.formattedFormFieldValues.merge(n))},[B.yET]:(e,t)=>{let{editingFormFieldValues:n}=t;return e.set("editingFormFieldValues",e.editingFormFieldValues.merge(n))},[B.u7V]:(e,t)=>e.withMutations((n=>{t.formFieldValuesIds.forEach((t=>{const o=t.split("/")[1],r=e.formFields.get(o);r&&(r instanceof w.$o?n.setIn(["formFields",o,"value"],""):r instanceof w.XQ?n.setIn(["formFields",o,"value"],null):r instanceof w.Dz||r instanceof w.rF?n.setIn(["formFields",o,"values"],(0,i.aV)()):r instanceof w.R0||r instanceof w.Yo||(0,s.kG)(!1,`DELETE_FORM_FIELD_VALUE not implemented for ${o}`))}))})),[B.TYu]:(e,t)=>{let{onWidgetCreationStartCallback:n}=t;return e.set("onWidgetAnnotationCreationStart",n)},[B.vgx]:(e,t)=>{let{annotationId:n}=t;return e.set("formDesignerUnsavedWidgetAnnotation",n)}};function nl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:el,t=arguments.length>1?arguments[1]:void 0;const n=tl[t.type];return n?n(e,t):e}var ol=n(62164);const rl=new w.ZM,il={[B.ckI]:(e,t)=>e.withMutations((e=>{t.comments.forEach((t=>{if((0,Pe.k)(t.id&&!e.comments.has(t.id),`Comment with ID ${t.id} already exists.`),t.pageIndex<0||t.pageIndex>=e.pages.size)(0,s.ZK)(`Tried to add a comment with ID ${t.id} with an out of bounds page index (${t.pageIndex}). This comment was skipped.`);else if(e.setIn(["comments",t.id],t),(0,Pe.k)(t.rootId&&t.id),e.commentThreads.has(t.rootId)){const n=e.commentThreads.get(t.rootId);(0,Pe.k)(n),e.setIn(["commentThreads",t.rootId],n.add(t.id).sortBy((t=>{const n=e.comments.get(t);(0,Pe.k)(n);const o=n.createdAt.getTime();return[(0,ol.kT)(n)?1:0,o]}),Ce.b))}else e.setIn(["commentThreads",t.rootId],(0,i.hU)([t.id]))}))})),[B.hxO]:(e,t)=>{const n=t.rootId,o=e.annotations.get(n),r=new Date;let a=new w.sv({id:(0,Ya.C)(),rootId:n,creatorName:e.annotationCreatorName||null,createdAt:r,updatedAt:r,text:{format:"plain",value:""}});if(e.onCommentCreationStart){const t=e.onCommentCreationStart(a);(0,Pe.k)(t instanceof w.sv,"`onCommentCreationStart` should return an instance of `Comment`"),a=t}(0,Pe.k)(e.backend),e.backend.isCollaborationPermissionsEnabled()&&e.group!==e.backend.getDefaultGroup()&&(a=a.set("group",e.group));return!(0,Kn.Ez)(a,e)&&o&&(0,xr.mi)(o,e)?e.withMutations((e=>{e.setIn(["comments",a.id],a),e.commentThreads.has(n)?e.updateIn(["commentThreads",n],(e=>e.add(a.id))):e.setIn(["commentThreads",n],(0,i.hU)([a.id]))})):e.set("interactionMode",null)},[B.FdD]:(e,t)=>e.withMutations((e=>{t.comments.forEach((t=>{(0,Pe.k)(t.id&&e.comments.has(t.id),`Comment with missing ID ${t.id} not found and thus cannot be updated.`),e.setIn(["comments",t.id],t)}))})),[B.kg]:(e,t)=>e.withMutations((e=>{t.ids.forEach((t=>{(0,Pe.k)(e.comments.has(t),`Comment with ID ${t} not found, so it cannot be deleted.`);const n=e.comments.get(t);(0,Pe.k)(null!=n,`Attempted to delete non-existent comment with ID ${t}`),(0,Pe.k)(n.rootId);const o=e.commentThreads.get(n.rootId);if((0,Pe.k)(null!=o,`Comment with ID ${t} has no corresponding thread with matching root ID ${n.rootId}`),(0,Pe.k)(n.id&&o.has(n.id),`Comment with ID ${n.id} is missing from its thread.`),1===o.size)e.removeIn(["commentThreads",n.rootId]);else{const t=o.remove(n.id);if(e.setIn(["commentThreads",n.rootId],t),1===t.size){const o=e.comments.get(t.first());(0,Pe.k)(null!=o),(0,ol.kT)(o)&&(e.removeIn(["commentThreads",n.rootId]),e.removeIn(["comments",o.id]))}}e.removeIn(["comments",t])}))})),[B.NB4]:e=>e.setIn(["viewportState","commentMode"],(0,ol.dq)(e)),[B.YHT]:(e,t)=>e.set("mentionableUsers",t.users),[B.ZLr]:(e,t)=>e.set("maxMentionSuggestions",t.maxSuggestions),[B.mfU]:(e,t)=>{let{onCommentCreationStartCallback:n}=t;return e.set("onCommentCreationStart",n)}};function al(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rl,t=arguments.length>1?arguments[1]:void 0;const n=il[t.type];return n?n(e,t):e}const sl=new w.ZM,ll={[B.Kpf]:(e,t)=>e.set("documentEditorFooterItems",t.documentEditorFooterItems),[B.wPI]:(e,t)=>e.set("documentEditorToolbarItems",t.documentEditorToolbarItems)};function cl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:sl,t=arguments.length>1?arguments[1]:void 0;const n=ll[t.type];return n?n(e,t):e}function ul(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function dl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ul(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ul(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const pl=new J.Z,fl={[B.bVL]:(e,t)=>e.withMutations((n=>{n.set("redoActions",e.redoActions.push(t.nextRedoAction));const o=t.oldId;if(o){n.update("redoActions",(e=>e.map((e=>e.payload.id===t.oldId?dl(dl({},e),{},{payload:dl(dl({},e.payload),{},{id:t.nextRedoAction.payload.id})}):e))));const r=t.nextRedoAction.payload.pageIndex,i="number"==typeof r&&e.invalidAPStreams.has(r)?e.invalidAPStreams.get(r):null;i&&i.has(o)&&n.setIn(["invalidAPStreams",r],i.add(t.nextRedoAction.payload.id).delete(o))}n.set("undoActions",e.undoActions.pop())})),[B.iwn]:(e,t)=>e.withMutations((n=>{n.set("undoActions",e.undoActions.push(t.nextUndoAction));const o=t.oldId;if(o){n.update("undoActions",(e=>e.map((e=>e.payload.id===t.oldId?dl(dl({},e),{},{payload:dl(dl({},e.payload),{},{id:t.nextUndoAction.payload.id})}):e))));const r=t.nextUndoAction.payload.pageIndex,i="number"==typeof r&&e.invalidAPStreams.has(r)?e.invalidAPStreams.get(r):null;i&&i.has(o)&&n.setIn(["invalidAPStreams",r],i.add(t.nextUndoAction.payload.id).delete(o))}n.set("redoActions",e.redoActions.pop())})),[B.faS]:(e,t)=>e.set("historyChangeContext",t.historyChangeContext),[B.tC1]:(e,t)=>e.set("historyIdsMap",e.historyIdsMap.set(t.newId,t.oldId)),[B._Qf]:e=>e.withMutations((t=>{t.set("undoActions",e.undoActions.clear()),t.set("redoActions",e.redoActions.clear()),t.set("historyIdsMap",e.historyIdsMap.clear())})),[B._33]:e=>e.set("isHistoryEnabled",!0),[B.wG7]:e=>e.set("isHistoryEnabled",!1)};function hl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pl,t=arguments.length>1?arguments[1]:void 0;const n=fl[t.type];return n?n(e,t):e}var ml=n(68218);const gl=e=>new ml.Sg(e),vl=e=>new ml.UL({offset:gl(e.offset),size:gl(e.size)}),yl=e=>new ml.W4(e),bl=e=>{let t=i.l4.of();for(const n of e)t=t.add(yl(n));return t},wl=e=>new ml.I5({family:e.family,variants:bl(e.variants)}),Sl=e=>new ml.yO({family:e.family,variant:yl(e.variant)}),Pl=e=>new ml.IA({faceRef:Sl(e.faceRef),size:e.size}),El=e=>new ml.mZ(e),xl=e=>new ml.vz({fontRef:Pl(e.fontRef),color:e.color,effects:El(e.effects)}),Dl=e=>new ml.JR(e),Cl=e=>new ml.yJ({family:e.family,faceMismatch:e.faceMismatch?Dl(e.faceMismatch):null,bold:e.bold,italic:e.italic,xScale:e.xScale,skew:e.skew,color:e.color,size:e.size}),kl=e=>new ml.a2(e),Ol=e=>new ml.DN(e),Al=e=>new ml.FQ({cluster:e.cluster,offset:gl(e.offset),advance:gl(e.advance),text:e.text,control:e.control,lastOfSegment:e.lastOfSegment,beginOfWord:e.beginOfWord,endOfWord:e.endOfWord}),Tl=e=>new ml.tW({offset:gl(e.offset),lineSpacing:kl(e.lineSpacing),elements:i.aV.of(...e.elements.map(Al))});var Il=n(72643);const Fl=new J.Z,Ml=(e,t)=>{let n=!1;const o=vl(t.contentRect);(0,i.is)(o,e.contentRect)||(e=e.set("contentRect",o)),(0,i.is)(t.version,e.version)||(e=e.set("version",t.version),n=!0);const r=(a=t.cursor,new ml.CF({offset:gl(a.offset),lineSpacing:kl(a.lineSpacing)}));var a;(0,i.is)(r,e.cursor)||(e=e.set("cursor",r),n=!0);const s=t.selection?(e=>new ml.Y1(e))(t.selection):null;(0,i.is)(s,e.selection)||(e=e.set("selection",s),n=!0);const l=(e=>new ml.Ts({lines:i.aV.of(...e.lines.map(Tl))}))(t.layoutView);(0,i.is)(l,e.layoutView)||(e=e.set("layoutView",l));const c=(e=>new ml.tk({selectionStyleInfo:e.selectionStyleInfo?Cl(e.selectionStyleInfo):null,modificationsCharacterStyle:e.modificationsCharacterStyle?xl(e.modificationsCharacterStyle):null,modificationsCharacterStyleFaceMismatch:e.modificationsCharacterStyleFaceMismatch?Dl(e.modificationsCharacterStyleFaceMismatch):null}))(t.detectedStyle);if((0,i.is)(c,e.detectedStyle)||(e=e.set("detectedStyle",c)),c.modificationsCharacterStyle){let t=c.modificationsCharacterStyle;t=t.setIn(["effects"],new ml.mZ({})),n&&!(0,i.is)(t,e.modificationsCharacterStyle)&&(e=e.set("modificationsCharacterStyle",t))}return e},_l={[B.MGL]:e=>e.withMutations((e=>{const t=e.contentEditorSession.sessionId+1;e.set("contentEditorSession",new ml.aN({sessionId:t,active:!0})).set("interactionMode",N.A.CONTENT_EDITOR)})),[B.Qm9]:e=>e.withMutations((e=>{e.setIn(["contentEditorSession","active"],!1).set("interactionMode",null)})),[B.l$y]:(e,t)=>e.withMutations((e=>{(0,Pe.k)(!e.contentEditorSession.pageStates.has(t.pageIndex)),e.setIn(["contentEditorSession","pageStates",t.pageIndex],new ml.nv({loading:!0}))})),[B.kD6]:(e,t)=>e.withMutations((e=>{var n;(0,Pe.k)(null===(n=e.contentEditorSession.pageStates.get(t.pageIndex))||void 0===n?void 0:n.loading);let o=e.contentEditorSession.pageStates.get(t.pageIndex);(0,Pe.k)(o);const r=t.initialTextBlocks.map((e=>{const t=e.textBlock,n=gl(t.anchor),o=Ol(t.globalEffects),r=new ml.Ar({maxWidth:t.maxWidth,alignment:t.alignment,lineSpacingFactor:t.lineSpacingFactor}),i=new ml.Q7({id:e.id,initialAnchor:n,initialGlobalEffects:o,initialLayout:r,anchor:n,globalEffects:o,layout:r,modificationsCharacterStyle:xl(t.modificationsCharacterStyle)});return Ml(i,e.updateInfo)})),a=i.aV.of(...r);o=o.set("textBlocks",a),o=o.set("initialTextBlocks",a),o=o.set("loading",!1),e.setIn(["contentEditorSession","pageStates",t.pageIndex],o)})),[B.joZ]:(e,t)=>e.withMutations((e=>{e.setIn(["contentEditorSession","textBlockInteractionState"],new ml._h({pageIndex:t.pageIndex,textBlockId:t.textBlockId,state:ml.FP.Active}))})),[B.fQw]:e=>e.withMutations((e=>{const t=e.contentEditorSession.textBlockInteractionState;if(t.state===ml.FP.Active){let n=e.contentEditorSession.pageStates.get(t.pageIndex);(0,Pe.k)(n),n=n.set("textBlocks",n.textBlocks.filter((e=>!(e.justCreated&&0===e.contentRect.size.x))).map((e=>e.id===t.textBlockId&&e.justCreated?e=e.set("justCreated",!1).set("layout",e.layout.set("maxWidth",Math.max(e.contentRect.size.x,10))):e))),e.setIn(["contentEditorSession","pageStates",t.pageIndex],n)}e.setIn(["contentEditorSession","textBlockInteractionState"],e.contentEditorSession.textBlockInteractionState.state===ml.FP.Active?e.contentEditorSession.textBlockInteractionState.set("state",ml.FP.Selected):new ml._h)})),[B.VOt]:(e,t)=>e.withMutations((e=>{let n=e.contentEditorSession.pageStates.get(t.pageIndex);(0,Pe.k)(n),n=((e,t,n)=>{const o=e.textBlocks.map((e=>e.id!=t?e:Ml(e,n)));return e.set("textBlocks",o)})(n,t.textBlockId,t.updateInfo),e.setIn(["contentEditorSession","pageStates",t.pageIndex],n)})),[B.U7k]:e=>e.withMutations((e=>{e.setIn(["contentEditorSession","availableFaces","loading"],!0)})),[B.ZgW]:(e,t)=>e.withMutations((e=>{const n=(o=t.faceList,i.aV.of(...o.map(wl)));var o;e.setIn(["contentEditorSession","availableFaces"],new ml.t9({faceList:n,loading:!1}))})),[B.Y4]:e=>e.withMutations((e=>{e.setIn(["contentEditorSession","saving"],!0)})),[B.HYy]:e=>e.withMutations((e=>{e.setIn(["contentEditorSession","dirty"],!0)})),[B.bOH]:(e,t)=>e.set("showExitContentEditorDialog",t.isVisible),[B.Han]:(e,t)=>e.set("contentEditorSession",e.contentEditorSession.set("fontMismatchTooltip",new ml.xb({fontFace:t.fontFace,rect:t.tooltipRect}))),[B.WmI]:e=>e.set("contentEditorSession",e.contentEditorSession.set("fontMismatchTooltip",null)),[B.nI6]:(e,t)=>e.contentEditorSession.fontMismatchTooltip?e.setIn(["contentEditorSession","fontMismatchTooltip","dismissAbortController"],t.abortController):e,[B.Ebp]:(e,t)=>e.withMutations((e=>{let n=e.contentEditorSession.pageStates.get(t.pageIndex);(0,Pe.k)(n),n=n.set("textBlocks",n.textBlocks.map((e=>{if(e.id!=t.textBlockId)return e;let n=e.modificationsCharacterStyle;return t.faceRef&&!(0,i.is)(t.faceRef,n.fontRef.faceRef)&&(n=n.setIn(["fontRef","faceRef"],t.faceRef)),t.size&&!(0,i.is)(t.size,n.fontRef.size)&&(n=n.setIn(["fontRef","size"],t.size)),t.color&&!(0,i.is)(t.color,n.color)&&(n=n.set("color",t.color)),e=e.set("modificationsCharacterStyle",n)}))),e.setIn(["contentEditorSession","pageStates",t.pageIndex],n)})),[B.ciU]:(e,t)=>e.withMutations((e=>{e.contentEditorSession.dirty||e.setIn(["contentEditorSession","dirty"],!0);let n=e.contentEditorSession.pageStates.get(t.pageIndex);(0,Pe.k)(n),n=n.set("textBlocks",n.textBlocks.map((e=>{if(e.id!=t.textBlockId)return e;const{fixpointValue:n,newWidth:o}=t,{layout:r,globalEffects:i,anchor:a}=e;(0,Pe.k)(r.maxWidth);const s=(0,Il.uB)(r.alignment,i,n,o-r.maxWidth);return e=(e=e.set("anchor",new ml.Sg({x:a.x+s.x,y:a.y+s.y}))).setIn(["layout","maxWidth"],o)}))),e.setIn(["contentEditorSession","pageStates",t.pageIndex],n)})),[B.fLm]:(e,t)=>e.withMutations((e=>{let n=e.contentEditorSession.pageStates.get(t.pageIndex);(0,Pe.k)(n),e.contentEditorSession.dirty||e.setIn(["contentEditorSession","dirty"],!0),t.isKeyboardMove||e.contentEditorSession.textBlockInteractionState.state===ml.FP.Moving||e.setIn(["contentEditorSession","textBlockInteractionState"],new ml._h({state:ml.FP.Moving,pageIndex:t.pageIndex,textBlockId:t.textBlockId})),n=n.set("textBlocks",n.textBlocks.map((e=>e.id!=t.textBlockId?e:e=e.set("anchor",new ml.Sg({x:t.anchor.x,y:t.anchor.y}))))),e.setIn(["contentEditorSession","pageStates",t.pageIndex],n)})),[B.xhM]:(e,t)=>e.withMutations((e=>{e.setIn(["contentEditorSession","textBlockInteractionState"],new ml._h({pageIndex:t.pageIndex,textBlockId:t.textBlockId,state:ml.FP.Selected}))})),[B.snK]:(e,t)=>e.withMutations((e=>{e.setIn(["contentEditorSession","textBlockInteractionState"],new ml._h);let n=e.contentEditorSession.pageStates.get(t.pageIndex);(0,Pe.k)(n),n=n.set("textBlocks",n.textBlocks.filter((e=>e.id!==t.textBlockId))),e.setIn(["contentEditorSession","pageStates",t.pageIndex],n),e.setIn(["contentEditorSession","mode"],ml.wR.Edit)})),[B.teI]:(e,t)=>e.withMutations((e=>{e.setIn(["contentEditorSession","mode"],t.mode)})),[B.uo5]:(e,t)=>e.withMutations((e=>{var n;let o=e.contentEditorSession.pageStates.get(t.pageIndex);const r=null===(n=e.pages.get(t.pageIndex))||void 0===n||null===(n=n.pageSize)||void 0===n?void 0:n.width;(0,Pe.k)(o),(0,Pe.k)(r);const{pageIndex:i,initialTextBlock:a}=t,s=a.textBlock,l=Ol(s.globalEffects),c=new ml.Ar({maxWidth:r-t.anchor.x,alignment:s.alignment,lineSpacingFactor:s.lineSpacingFactor});let u=new ml.Q7({id:a.id,initialAnchor:t.anchor,initialGlobalEffects:l,initialLayout:c,anchor:t.anchor,globalEffects:l,layout:c,justCreated:!0,modificationsCharacterStyle:xl(s.modificationsCharacterStyle)});return u=Ml(u,a.updateInfo),o=o.set("textBlocks",o.textBlocks.push(u)),e.setIn(["contentEditorSession","pageStates",i],o).setIn(["contentEditorSession","mode"],ml.wR.Edit).setIn(["contentEditorSession","textBlockInteractionState"],new ml._h({pageIndex:i,textBlockId:a.id,state:ml.FP.Active}))}))};function Nl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fl,t=arguments.length>1?arguments[1]:void 0;const n=_l[t.type];return n?n(e,t):e}function Rl(e,t){return[U,W,os,ss,us,fs,gs,xs,Bs,Ks,Vs,qs,Xs,Qs,nl,al,cl,hl,Nl].reduce(((e,n)=>n(e,t)),e)}const Ll=[C];const Bl=(0,E.md)(...Ll)(E.MT);function jl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Bl(Rl,new J.Z(e))}var zl=n(14012),Kl=n(2810),Zl=n(30761);async function Ul(e){let t,{backend:n,dispatch:o,getState:r,maxPasswordRetries:a,password:l,stylesheetPromise:c,formFieldValuesJSON:u,customFonts:d}=e;try{await c;let e=!1;const{features:p,signatureFeatureAvailability:f,hasPassword:h,minSearchQueryLength:m,allowedTileScales:g,creatorName:v,defaultGroup:y}=await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,r=null,i=0;for(;!r;){try{r=await n(e)}catch(n){const r=i<t;if("INVALID_PASSWORD"!==n.message||!r)throw n;e=await o()}i++}if(!r)throw new s.p2("Exceeded the maximum amount of password retries.");return r}(l,a,(t=>n.load({password:t,progressCallback:(t,n)=>{e||o((0,zl.qZ)(t,n))},isPDFJavaScriptEnabled:rt.Options.PDF_JAVASCRIPT})),(()=>(e=!0,new Promise((e=>o((0,zl.uT)(e))))))),{frameWindow:b}=r();let w=(0,i.l4)();if(d&&b){const e=await n.getAvailableFontFaces(d);for(const t of d){const n=e.find((e=>e.name===t.name)),o=(null==n?void 0:n.readableName)||t.name;b.document.fonts.add(new FontFace((0,un.hm)(o),await t.data.arrayBuffer())),w=w.add(o)}w.size>0&&o((0,Kt.p2)(w))}await(0,Zl.jX)(o,r,{attemptedUnlockViaModal:e,features:p,signatureFeatureAvailability:f,hasPassword:h,minSearchQueryLength:m,allowedTileScales:g});const{annotations:S,isAPStreamRendered:P,formFields:E}=r();n.isUsingInstantProvider()&&o((0,Kt.Ie)()),n.isCollaborationPermissionsEnabled()&&o((0,Kt.YK)(y));const x=await n.runPDFFormattingScriptsFromWidgets(S,E,P);if(x.length){const{formFieldManager:e}=r();let n,i;null!==e&&await e.loadFormFields(),t=new Promise(((e,t)=>{n=e,i=t})),o((0,Qn.bt)({changes:x,resolve:n,reject:i}))}"STANDALONE"===n.type&&rt.Options.PDF_JAVASCRIPT&&u&&o((0,Qn.ul)((0,i.aV)(u.map(Kl.u9)))),o((0,zl.Bm)()),v&&o((0,Kt.X8)(v,!0))}catch(e){(0,s.vU)("An error occurred while initializing PSPDFKit for Web.\n\n Please contact our customer support, if you're having troubles setting up PSPDFKit for Web or the PSPDFKit Server: https://pspdfkit.com/guides/web/current/pspdfkit-for-web/troubleshooting/");const t=e instanceof s.p2?e:new s.p2(e);throw-1!==t.message.indexOf("File not in PDF format or corrupted")?o((0,zl.sr)(t.message)):o((0,zl.sr)()),t}return t}var Vl=n(13997),Gl=n(68258);function Wl(e){try{return e.querySelector(":focus-visible"),void(e.documentElement&&e.documentElement.setAttribute("data-focusvisible-supported","true"))}catch(e){}const t="data-focusvisible-polyfill";let n=!0,o=!1,r=null;const i={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function a(t){return!!(t&&t!==e&&"HTML"!==t.nodeName&&"BODY"!==t.nodeName&&"classList"in t&&"contains"in t.classList)}function s(e){e.hasAttribute(t)||e.setAttribute(t,!0)}function l(e){e.removeAttribute(t)}function c(){!0===n&&function(){const t=e.querySelectorAll("[data-focusvisible-polyfill]");for(let e=0;e<t.length;e+=1)l(t[e])}(),n=!1}function u(){e.addEventListener("mousemove",d),e.addEventListener("mousedown",d),e.addEventListener("mouseup",d),e.addEventListener("pointermove",d),e.addEventListener("pointerdown",d),e.addEventListener("pointerup",d),e.addEventListener("touchmove",d),e.addEventListener("touchstart",d),e.addEventListener("touchend",d)}function d(t){var o;"HTML"!==(null===(o=t.target)||void 0===o?void 0:o.nodeName)&&(n=!1,e.removeEventListener("mousemove",d),e.removeEventListener("mousedown",d),e.removeEventListener("mouseup",d),e.removeEventListener("pointermove",d),e.removeEventListener("pointerdown",d),e.removeEventListener("pointerup",d),e.removeEventListener("touchmove",d),e.removeEventListener("touchstart",d),e.removeEventListener("touchend",d))}e.addEventListener("keydown",(function(t){"Tab"!==t.key&&(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)||(a(e.activeElement)&&s(e.activeElement),n=!0)}),!0),e.addEventListener("mousedown",c,!0),e.addEventListener("pointerdown",c,!0),e.addEventListener("touchstart",c,!0),e.addEventListener("focus",(function(e){const t=e.target;a(t)&&(n||function(e){const t=e.type,n=e.tagName,o=e.readOnly;return!("INPUT"!==n||!i[t]||o)||"TEXTAREA"===n&&!o||!!e.isContentEditable}(t))&&s(t)}),!0),e.addEventListener("blur",(function(e){const n=e.target;a(n)&&null!=n&&n.hasAttribute(t)&&(o=!0,window.clearTimeout(r),r=window.setTimeout((function(){o=!1,window.clearTimeout(r)}),100),l(n))}),!0),e.addEventListener("visibilitychange",(function(){"hidden"===e.visibilityState&&(o&&(n=!0),u())}),!0),u()}var ql=n(42911),Hl=n(3150),$l=n(39511),Xl=n(80440),Yl=n(70006),Jl=n(7921);const Ql=[10,20,50,100,200,500];class ec{constructor(e,t){(0,o.Z)(this,"_activeSearches",[]),this.getState=e,this.dispatch=t,this.term="",this._cancelCurrentRequest=null,this._debouncedSearchRequest=(0,Jl.Z)(this._searchRequest,Be.XU)}searchTerm(e){if("pspdfkit:info"===e.toLowerCase()||"pspdf:info"===e.toLowerCase()){const e="PSPDFKit for Web 2023.5.2 (https://pspdfkit.com/web)";return(0,s.wp)(e),void this._cancelSearchRequests()}if("pspdfkit:debug"===e.toLowerCase()||"pspdf:debug"===e.toLowerCase())return this.dispatch((0,Kt.R)()),void this._cancelSearchRequests();const t=this.getState();if(e.length<t.searchState.minSearchQueryLength)return this.term="",void this._cancelSearchRequests();this.dispatch((0,Yl.M0)(!0)),this.term=e,this._debouncedSearchRequest()}async _searchRequest(){if(""===this.term)return;this._cancelSearchRequests();const e=this.getState();(0,s.kG)(e.backend);let t=e.totalPages,n=0;t="STANDALONE"===e.backend.type?5:Ql[n];const o=e.viewportState.currentPageIndex;this._activeSearches.push(!0);const r=this._activeSearches.length-1;let a=(0,i.aV)();for(const i of[0,1]){let s,l;for(0===i?(s=o,l=e.totalPages-s):(s=0,l=o);l>0;){"SERVER"===e.backend.type&&(t=Ql[n],n+=n>=Ql.length-1?0:1);let o=t;l<1.5*t&&(o=l);const i=await e.backend.search(this.term,s,o,!1);if(a=a.concat(i),!this._activeSearches[r])return;this.dispatch((0,Yl.Sc)(a)),l-=o,s+=o}}this.dispatch((0,Yl.M0)(!1))}_cancelSearchRequests(e){for(const t of this._activeSearches.keys())null!=e&&t===e||(this._activeSearches[t]=!1)}}var tc=n(13393),nc=n(17500),oc=n(30679),rc=n(62e3),ic=n(97358),ac=n(94734),sc=n(59739),lc=n(99745),cc=n(32125),uc=n(39745),dc=n(26353),pc=n(84013),fc=n(27001);const hc=(0,c.createContext)((()=>{throw new Error}));var mc=n(3219),gc=n(19702),vc=n(65872),yc=n(59386),bc=n(89e3),wc=n(78399),Sc=n(80303),Pc=n.n(Sc);const Ec=function(e){var t,o;const{formatMessage:r}=(0,Se.YB)(),i=c.useCallback((e=>e.stopPropagation()),[]),a=d()("PSPDFKit-Sidebar-Annotations-Item",e.layoutClassName,Pc().layout,{[Pc().selected]:e.isSelectedItem,[Pc().layoutNavigationDisabled]:e.navigationDisabled,"PSPDFKit-Sidebar-Annotations-Item-Selected":e.isSelectedItem});return c.createElement("div",{ref:e.itemRef},c.createElement(Je.Z,{onPointerUpCapture:i},c.createElement(c.Fragment,null,c.createElement("div",(0,ue.Z)({className:a,onClick:e.onPress},e.itemWrapperProps),e.icon,c.createElement("div",{className:Pc().layoutContent},e.children,(null===(t=e.showFooter)||void 0===t||t)&&(e.author||e.formattedDate)&&c.createElement("footer",{className:d()(Pc().footer,"PSPDFKit-Sidebar-Annotations-Footer")},c.createElement("p",null,e.author&&c.createElement("span",null,e.author,e.formattedDate?", ":""),e.formattedDate&&c.createElement("time",{dateTime:null===(o=e.date)||void 0===o?void 0:o.toISOString()},e.formattedDate)),e.additionalFooter)),e.isDeletable&&c.createElement("button",{className:d()(Pc().delete,"PSPDFKit-Sidebar-Annotations-Delete"),onClick:e.onDelete,"aria-label":r(ke.Z.delete)},c.createElement(Re.Z,{src:n(61019),role:"presentation"}))),c.createElement("div",{className:Pc().flagsContainer},e.isReadOnly&&c.createElement("div",{className:Pc().flagWrapper},c.createElement("div",{className:d()(Pc().lock,"PSPDFKit-Sidebar-Annotations-ReadOnly")},c.createElement(Re.Z,{src:n(65883),role:"presentation"})),c.createElement("div",{className:Pc().label,"aria-label":r(ke.Z.readOnlyAnnotationFlag)},r(ke.Z.readOnlyAnnotationFlag))),e.isLocked&&c.createElement("div",{className:Pc().flagWrapper},c.createElement("span",{className:d()(Pc().lock,"PSPDFKit-Sidebar-Annotations-Locked")},c.createElement(Re.Z,{src:n(65883),role:"presentation"})),c.createElement("span",{className:Pc().label,"aria-label":r(ke.Z.locked)},r(ke.Z.locked))),e.hasLockedContents&&c.createElement("div",{className:Pc().flagWrapper},c.createElement("span",{className:d()(Pc().lock,"PSPDFKit-Sidebar-Annotations-LockedContents")},c.createElement(Re.Z,{src:n(65883),role:"presentation"})),c.createElement("span",{className:Pc().label,"aria-label":r(ke.Z.lockedContents)},r(ke.Z.lockedContents)))))))},xc={highlighter:"highlighter",arrow:"arrow",callout:"textAnnotation","cloudy-rectangle":"cloudyRectangleAnnotation","dashed-rectangle":"dashedRectangleAnnotation","cloudy-ellipse":"cloudyEllipseAnnotation","dashed-ellipse":"dashedEllipseAnnotation","cloudy-polygon":"cloudyPolygonAnnotation","dashed-polygon":"dashedPolygonAnnotation","ellipse-area":"ellipseAreaMeasurement","rectangle-area":"rectangularAreaMeasurement","polygon-area":"polygonAreaMeasurement",distance:"distanceMeasurement",perimeter:"perimeterMeasurement"},Dc=e=>{const{formatMessage:t}=e.intl,n=xc[e.type]||`${e.type}Annotation`;return c.createElement(c.Fragment,null,c.createElement("button",{autoFocus:e.autoFocus},t(ke.Z[n])),","," ",t(ke.Z.linesCount,{arg0:e.annotation.lines.size}))},Cc=e=>{const t=e.annotation.text.value||"";let n=(0,I.aF)("xhtml"===e.annotation.text.format?(0,hn.KY)(t):t);const o=xc[e.type]||"textAnnotation";return 0===n.length&&(n=e.intl.formatMessage(ke.Z[o])),c.createElement("button",{autoFocus:e.autoFocus},n)},kc=e=>c.createElement("button",{autoFocus:e.autoFocus},e.intl.formatMessage(ke.Z[`${e.type}Annotation`])),Oc=e=>{const t=xc[e.type]||`${e.type}Annotation`;return c.createElement("button",{autoFocus:e.autoFocus},e.intl.formatMessage(ke.Z[t]))},Ac=e=>c.createElement("button",{autoFocus:e.autoFocus},e.annotation.formFieldName),Tc={text:Cc,callout:Cc,ink:Dc,highlighter:Dc,note:e=>{let t=(0,I.aF)(e.annotation.text.value||"");return 0===t.length&&(t=e.intl.formatMessage(ke.Z.noteAnnotation)),c.createElement("button",{autoFocus:e.autoFocus},t)},highlight:kc,underline:kc,strikeOut:kc,squiggle:kc,link:e=>{var t;return c.createElement("button",{autoFocus:e.autoFocus},(null===(t=e.annotation.action)||void 0===t?void 0:t.uri)||e.intl.formatMessage(ke.Z.linkAnnotation))},rectangle:Oc,"cloudy-rectangle":Oc,"dashed-rectangle":Oc,ellipse:Oc,"cloudy-ellipse":Oc,"dashed-ellipse":Oc,polygon:Oc,"cloudy-polygon":Oc,"dashed-polygon":Oc,polyline:Oc,line:Oc,arrow:Oc,image:e=>{const{formatMessage:t}=e.intl,{fileName:n}=e.annotation,o=(0,I.aF)(e.annotation.description||"");return c.createElement(c.Fragment,null,c.createElement("button",{autoFocus:e.autoFocus},t(ke.Z[`${e.type}Annotation`])),n&&!o&&c.createElement("div",{title:t(ke.Z.filePath)+`: ${n}`},n),o&&c.createElement("div",null,o))},stamp:e=>{const{formatMessage:t}=e.intl,{fileName:n}=e.annotation,o=(0,I.aF)((0,ac.vW)({annotation:e.annotation,intl:e.intl})||"");return c.createElement(c.Fragment,null,c.createElement("button",{autoFocus:e.autoFocus},t(ke.Z[`${e.type}Annotation`])),n&&!o&&c.createElement("div",{title:`${t(ke.Z.stampText)}: ${t(ke.Z[e.annotation.stampType])}`},`${t(ke.Z.stampText)}: ${t(ke.Z[e.annotation.stampType])}`),o&&c.createElement("div",null,o))},"form-text":Ac,"form-checkbox":Ac,"form-button":Ac,"form-signature":Ac,redaction:e=>c.createElement("button",{autoFocus:e.autoFocus},e.intl.formatMessage(ke.Z[`${e.type}Annotation`])),media:e=>{const{formatMessage:t}=e.intl,{fileName:n}=e.annotation,o=(0,I.aF)(e.annotation.description||"");return c.createElement(c.Fragment,null,c.createElement("button",{autoFocus:e.autoFocus},t(ke.Z[`${e.type}Annotation`])),n&&!o&&c.createElement("div",{title:t(ke.Z.filePath)+`: ${n}`},n),o&&c.createElement("div",null,o))},perimeter:Oc,distance:Oc,"ellipse-area":Oc,"rectangle-area":Oc,"polygon-area":Oc};class Ic extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"_itemRef",(e=>{var t,n;e&&(this._el=e,null===(t=(n=this.props).onRenderItemCallback)||void 0===t||t.call(n,e,this.props.annotation))})),(0,o.Z)(this,"onPress",(()=>{const{annotation:e,dispatch:t,onPress:n}=this.props;if(!this.props.navigationDisabled){if(t((0,mc.kN)(e.pageIndex,e.boundingBox)),this.props.isAnnotationReadOnly(e)||!(this.props.annotation instanceof de.x_)&&(this.props.annotation.readOnly||this.props.annotation.lockedContents||this.props.annotation.locked)){var o;if(this.props.focusedAnnotationIds&&this.props.focusedAnnotationIds.size>0)t((0,De.Oc)(null===(o=this.props.focusedAnnotationIds)||void 0===o?void 0:o.first()));return setTimeout((()=>{t((0,De.Q2)(e.id))}),100)}e instanceof de.x_?t((0,De.fz)()):Ke.Ni&&e instanceof de.Qi?t((0,De.VR)(e.id)):t((0,De.Df)((0,i.l4)([e.id]),null)),n&&n()}})),(0,o.Z)(this,"onDelete",(()=>{const{annotation:e,dispatch:t,navigationDisabled:n}=this.props;n||t((0,mc.kN)(e.pageIndex,e.boundingBox)),t((0,bt.d8)((0,i.l4)([e.id])))})),(0,o.Z)(this,"preventDeselect",(e=>e.stopPropagation()))}componentDidUpdate(e){var t,n;this._el&&e.onRenderItemCallback!==this.props.onRenderItemCallback&&(null===(t=(n=this.props).onRenderItemCallback)||void 0===t||t.call(n,this._el,this.props.annotation))}render(){const{annotation:e,intl:t,isSelectedAnnotation:n,annotationType:o,isAnnotationReadOnly:r,autoFocus:i,canDeleteAnnotationCP:a,dateTimeStringCallback:s}=this.props,{formatDate:l}=t,u=e.creatorName;let p=null;e.updatedAt.getTime()&&(s&&(p=s({dateTime:e.updatedAt,element:wc.Y.ANNOTATIONS_SIDEBAR,object:e})),null==p&&(p=l(e.updatedAt)));const f=Tc[o],h=d()("PSPDFKit-Sidebar-Annotations-Annotation",`PSPDFKit-Sidebar-Annotations-Annotation-${(0,hn.in)(o)}`,{"PSPDFKit-Sidebar-Annotations-Annotation-Selected":n}),m=!(e instanceof de.x_)&&!(e instanceof de.Hu)&&!e.locked&&!r(e)&&!Ke.Ni&&a(e),g=(0,Oe.Z)({type:o.toLowerCase(),className:d()(Pc().icon,"PSPDFKit-Sidebar-Annotations-Icon")});return c.createElement(Ec,{itemRef:this._itemRef,layoutClassName:h,isSelectedItem:n,navigationDisabled:this.props.navigationDisabled,onPress:this.onPress,onDelete:this.onDelete,isDeletable:m,itemWrapperProps:{"data-annotation-id":e.id},icon:g,showFooter:!(e instanceof de.x_),author:u,formattedDate:p,date:e.updatedAt,isReadOnly:e.readOnly,isLocked:e.locked,hasLockedContents:e.lockedContents},c.createElement(f,{intl:t,annotation:e,type:o,autoFocus:i}))}}const Fc=(0,Se.XN)(Ic);var Mc=n(59780),_c=n(35860);const Nc=(0,Se.vU)({commentOptions:{id:"commentOptions",defaultMessage:"Comment Options",description:"Comment Options"},editContent:{id:"editContent",defaultMessage:"Edit Content",description:"Edit Content"},deleteCommentConfirmMessage:{id:"deleteCommentConfirmMessage",defaultMessage:"Are you sure you want to delete this comment?",description:'Message displayed in the "Delete Comment" confirm dialog'},deleteCommentConfirmAccessibilityLabel:{id:"deleteCommentConfirmAccessibilityLabel",defaultMessage:"Confirm comment deletion",description:'Accessibility label (title) for the "Delete Comment" confirm dialog'},deleteCommentConfirmAccessibilityDescription:{id:"deleteCommentConfirmAccessibilityDescription",defaultMessage:"Dialog allowing the user to confirm or cancel deleting the comment",description:'Accessibility description for the "Delete Comment" confirm dialog'},moreComments:{id:"moreComments",defaultMessage:"More comments",description:"More comments indicator in comments popover"}});const Rc=function(e){var t;const n=c.useRef(),{rootComment:o,commentsCount:r,onRenderItemCallback:s,annotation:l,onPress:u,navigationDisabled:p,isCommentReadOnly:f,dateTimeStringCallback:h,isSelectedAnnotation:m,canDeleteCommentCP:g}=e,v=(0,a.I0)(),{formatMessage:y,formatDate:b}=(0,Se.YB)(),[w,S]=c.useState(!1),P=c.useCallback((e=>{e&&(n.current=e,null==s||s(e,l))}),[l,s]),E=(0,_r.R9)((()=>{if(!p){if(v((0,mc.kN)(l.pageIndex,l.boundingBox)),f(o))return setTimeout((()=>{v((0,De.Q2)(l.id))}),100);v((0,De.Df)((0,i.l4)([l.id]),null)),u&&u()}})),x=(0,_r.R9)((()=>{p||v((0,mc.kN)(l.pageIndex,l.boundingBox)),S(!0)})),D=c.useCallback((()=>{v((0,zr.UM)(o)),S(!1)}),[o,v]),C=o.isAnonymous?y(ke.Z.anonymous):null!==(t=o.creatorName)&&void 0!==t?t:y(ke.Z.anonymous);let k=null;o.createdAt.getTime()&&(h&&(k=h({dateTime:o.createdAt,element:wc.Y.ANNOTATIONS_SIDEBAR,object:o})),null==k&&(k=b(o.createdAt,l.isCommentThreadRoot&&o?{hour12:!0,hour:"numeric",minute:"numeric",month:"numeric",day:"numeric",year:"numeric"}:void 0)));let O=null;r&&r>1&&(O=y(ke.Z.nMoreComments,{arg0:r-1}));const A=d()("PSPDFKit-Sidebar-Annotations-Comment",{"PSPDFKit-Sidebar-Annotations-Comment-Selected":m}),T=!f(o)&&!Ke.Ni&&g(o),F=(0,Oe.Z)({type:"comment",className:d()(Pc().icon,"PSPDFKit-Sidebar-Annotations-Icon")});return c.createElement(c.Fragment,null,c.createElement(Ec,{itemRef:P,layoutClassName:A,isSelectedItem:m,navigationDisabled:p,onPress:E,onDelete:x,isDeletable:T,itemWrapperProps:{"data-annotation-id":l.id},icon:F,showFooter:!0,author:C,formattedDate:k,date:l.updatedAt,additionalFooter:l.isCommentThreadRoot&&O?c.createElement("span",null,O):null,isReadOnly:l.readOnly,isLocked:l.locked,hasLockedContents:l.lockedContents},c.createElement("button",{autoFocus:e.autoFocus},(0,I.aF)((0,hn.KY)((null==o?void 0:o.text.value)||"")))),w&&c.createElement(_c.Z,{onConfirm:D,onCancel:()=>{S(!1)},accessibilityLabel:y(Nc.deleteCommentConfirmAccessibilityLabel),accessibilityDescription:y(Nc.deleteCommentConfirmAccessibilityDescription)},c.createElement("p",null,y(Nc.deleteCommentConfirmMessage))))},Lc=c.memo((function(e){let{closeOnPress:t=!1,navigationDisabled:n,annotations:o,comments:r,commentThreads:s,formFields:l,pages:u,isAnnotationReadOnly:p,isCommentReadOnly:f,selectedAnnotationIds:h,canDeleteAnnotationCP:m,canDeleteCommentCP:g,sidebarOptions:v,focusedAnnotationIds:y}=e;const[b,S]=c.useState(null),{includeContent:P}=v;c.useEffect((()=>{null==b||b.focus()}),[b]);const{formatMessage:E}=(0,Se.YB)(),x=(0,a.I0)(),D=(0,a.v9)((e=>e.dateTimeString)),C=(0,_r.R9)((()=>{n||t&&x((0,Kt.mu)())})),k=P.some((e=>e===w.sv)),O=d()(Pc().container,"PSPDFKit-Sidebar-Annotations"),A=c.useMemo((()=>o.filter((e=>null!==e.pageIndex&&(k&&e.isCommentThreadRoot||!e.isCommentThreadRoot&&null!==Bc(e,l)&&P.some((t=>e instanceof t)))))),[o,l,P,k]),T=c.useMemo((()=>u.reduce(((e,t)=>{const n=function(e){let t=e.filter((e=>e.isCommentThreadRoot)).sortBy((e=>e.boundingBox.top));return e.map((e=>{if(!e.isCommentThreadRoot)return e;const n=t.first();return t=t.shift(),n}))}((0,_.xp)(A,t));return 0===n.size?e:e.push(n)}),(0,i.aV)())),[u,A]),I=(0,_r.Bo)(b,T),F=(null==T?void 0:T.reduce(((e,t)=>e+t.size),0))||0,M=(0,_r.mP)(I,(e=>e.id),(e=>A.get(e)));return c.createElement("div",{className:O,role:"region","aria-label":E(ke.Z.annotations),ref:S},c.createElement("div",{className:"PSPDFKit-Sidebar-Header"},F>0?c.createElement("div",{className:d()(Pc().annotationCounter,"PSPDFKit-Sidebar-Annotations-Annotation-Counter")},E(ke.Z.annotationsCount,{arg0:F})):null),F>0&&T?c.createElement(c.Fragment,null,T.map(((e,t)=>{const o=e.first().pageIndex,i=u.get(o);(0,Pe.k)(i);const a=i.get("pageLabel");return c.createElement("section",{key:`Annotations-Sidebar-Page-${o}`},c.createElement("h1",{className:d()(Pc().pageNumber,"PSPDFKit-Sidebar-Annotations-Page-Number")},E(ke.Z.pageX,{arg0:a||o+1})),c.createElement("div",{className:d()(Pc().content,Pc().annotations,"PSPDFKit-Sidebar-Annotations-Container")},e.map(((e,o)=>{if(e.isCommentThreadRoot&&k){const i=s.get(e.id),a=null==i?void 0:i.first(),l=null==i?void 0:i.last();if(i&&l&&a){const s=r.get(l);if(s){const l=!(0,ol.kT)(s)&&(null==s?void 0:s.text.value).length>0?null==i?void 0:i.size:(null==i?void 0:i.size)-1,u=r.get(a);return c.createElement(Rc,{annotation:e,rootComment:u,commentsCount:l,onPress:C,isCommentReadOnly:f,isSelectedAnnotation:h.has(e.id),navigationDisabled:n,autoFocus:0===o&&0===t,canDeleteCommentCP:g,key:`Annotation-Info-${e.id}`,onRenderItemCallback:M,dateTimeStringCallback:D})}}}const i=Bc(e,l);return null!=i?c.createElement(Fc,{dispatch:x,annotation:e,annotationType:i,onPress:C,isAnnotationReadOnly:p,isSelectedAnnotation:h.has(e.id),navigationDisabled:n,autoFocus:0===o&&0===t,canDeleteAnnotationCP:m,key:`Annotation-Info-${e.id}`,onRenderItemCallback:M,dateTimeStringCallback:D,focusedAnnotationIds:y}):null}))))}))):c.createElement("div",{className:d()(Pc().container,Pc().empty,"PSPDFKit-Sidebar-Empty"),role:"region","aria-label":E(ke.Z.annotations)},E(jc.noAnnotations)))}));function Bc(e,t){var n;let o;const r=Number(e.cloudyBorderIntensity)>0,i=null===(n=e.strokeDashArray)||void 0===n?void 0:n.length;return e instanceof de.Zc?function(e){return"normal"===e.blendMode?0===e.opacity||e.lineWidth/e.opacity>40?"highlighter":"ink":e.lineWidth>15?"highlighter":"ink"}(e):e instanceof de.gd?e.callout?"callout":"text":e instanceof de.Qi?"note":e instanceof de.sK?"image":e instanceof de.GI?"stamp":e instanceof de.FV?"highlight":e instanceof de.xu?"underline":e instanceof de.R9?"strikeOut":e instanceof de.hL?"squiggle":e instanceof de.R1?"link":e instanceof de.b3?e.isMeasurement()?"rectangle-area":r?"cloudy-rectangle":i?"dashed-rectangle":"rectangle":e instanceof de.Xs?e.isMeasurement()?"ellipse-area":r?"cloudy-ellipse":i?"dashed-ellipse":"ellipse":e instanceof de.Hi?e.isMeasurement()?"polygon-area":r?"cloudy-polygon":i?"dashed-polygon":"polygon":e instanceof de.om?e.isMeasurement()?"perimeter":"polyline":e instanceof de.o9?function(e){if(e.isMeasurement())return"distance";if(!e.lineCaps)return"line";const t="openArrow"===e.lineCaps.start||"closedArrow"===e.lineCaps.start||"reverseOpenArrow"===e.lineCaps.start||"reverseClosedArrow"===e.lineCaps.start,n="openArrow"===e.lineCaps.end||"closedArrow"===e.lineCaps.end||"reverseOpenArrow"===e.lineCaps.end||"reverseClosedArrow"===e.lineCaps.end;return t||n?"arrow":"line"}(e):e instanceof de.x_?((0,Pe.k)(t),o=t.get(e.formFieldName),o instanceof Mc.$o||o instanceof Mc.Vi||o instanceof Mc.fB?"form-text":o instanceof Mc.rF?"form-checkbox":o instanceof Mc.XQ||o instanceof Mc.R0?"form-button":o instanceof Mc.Yo?"form-signature":null):e instanceof $.Z?"redaction":e instanceof de.Hu?"media":null}const jc=(0,Se.vU)({noAnnotations:{id:"noAnnotations",defaultMessage:"No Annotations",description:"Message shown when there is no annotations"}});var zc,Kc=n(24871),Zc=n(81619),Uc=n(5462),Vc=n(27435),Gc=n.n(Vc),Wc=n(44364),qc=n.n(Wc),Hc=n(93628),$c=n.n(Hc);function Xc(e){return tu[e]||ke.Z[e]}function Yc(e){let{item:t,isEnd:n,formatMessage:o}=e;return c.createElement(c.Fragment,null,c.createElement(q.TX,{tag:"div"},o(Xc(t))),c.createElement("svg",{viewBox:"0 0 8 4",style:{height:16,width:32}},c.createElement("g",{transform:n?"rotate(180 4,2)":void 0},Ot.O[t].startElement({fill:"transparent"}),zc||(zc=c.createElement("line",{x1:"3.5",y1:"2",x2:"8",y2:"2"})))))}function Jc(e){let{item:t,formatMessage:n}=e;const o=Zc.x.find((e=>e.id===t));return c.createElement(c.Fragment,null,c.createElement(q.TX,{tag:"div"},n(Xc(t))),c.createElement("svg",{viewBox:"0 0 16 4",style:{width:54,height:16}},c.createElement("line",{x1:"0",y1:"2",x2:"16",y2:"2",strokeDasharray:o?o.dashArray:void 0,fill:"transparent"})))}class Qc extends c.PureComponent{constructor(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];super(...n),e=this,(0,o.Z)(this,"calculateBoundingBox",(0,io.Z)((0,L.sS)(this.props.annotation.constructor))),(0,o.Z)(this,"_onChangeStartLineCap",(e=>{const{annotation:t}=this.props,n={};return"none"!==e&&(n.start=e),"lineCaps"in t&&t.lineCaps&&null!=t.lineCaps.end&&(n.end=t.lineCaps.end),this.props.updateAnnotation({lineCaps:n,boundingBox:this.calculateBoundingBox(t.set("lineCaps",n))})})),(0,o.Z)(this,"_onChangeDashArray",(e=>{const t=Zc.x.find((t=>t.id===e));return this.props.updateAnnotation({strokeDashArray:void 0!==t?t.dashArray:null})})),(0,o.Z)(this,"_onChangeEndLineCap",(e=>{const{annotation:t}=this.props,n={};return"lineCaps"in t&&t.lineCaps&&null!=t.lineCaps.start&&(n.start=t.lineCaps.start),"none"!==e&&(n.end=e),this.props.updateAnnotation({lineCaps:n,boundingBox:this.calculateBoundingBox(t.set("lineCaps",n))})})),(0,o.Z)(this,"LineCapSelectButton",(function(t,n){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;return i=>{var a;let{btnComponentProps:s,selectedItem:l}=i;return c.createElement(we.Z,(0,ue.Z)({is:"div"},s,{className:d()("PSPDFKit-Input-Dropdown-Button",$c().selectBox,e.props.styles.startLineCapSelect),name:"clickableBox",ref:e=>{s.ref(e),"function"==typeof r?r(e):r&&(r.current=e)}}),c.createElement(Yc,{item:null!==(a=null==l?void 0:l.label)&&void 0!==a?a:"",isEnd:o,formatMessage:t}),c.createElement("div",null,(0,Oe.Z)({type:"caret-"+n,style:{width:12,height:12,flexBasis:12,marginLeft:3,strokeWidth:0},className:d()($c().dropdownIcon)})))}})),(0,o.Z)(this,"LineCapItem",(function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n=>{var o;let{item:r,state:i,itemComponentProps:a,ref:s}=n;return c.createElement(we.Z,(0,ue.Z)({is:"div",className:d()(qc().root,Gc().root,(null==i?void 0:i.includes("selected"))&&$c().isSelected,(null==i?void 0:i.includes("focused"))&&$c().isSelected)},a,{ref:s}),c.createElement(Yc,{item:null!==(o=null==r?void 0:r.label)&&void 0!==o?o:"",isEnd:t,formatMessage:e}))}})),(0,o.Z)(this,"DashArrayButton",((e,t)=>n=>{var o;let{btnComponentProps:r,selectedItem:i}=n;return c.createElement(we.Z,(0,ue.Z)({is:"div"},r,{ref:r.ref,className:d()("PSPDFKit-Input-Dropdown-Button",$c().selectBox,this.props.styles.strokeDashArraySelect),name:"clickableBox"}),c.createElement(Jc,{item:null!==(o=null==i?void 0:i.label)&&void 0!==o?o:"",formatMessage:e}),c.createElement("div",null,(0,Oe.Z)({type:"caret-"+t,style:{width:12,height:12,flexBasis:12,marginLeft:3,strokeWidth:0},className:d()($c().dropdownIcon)})))})),(0,o.Z)(this,"DashArrayItem",(e=>t=>{var n;let{item:o,state:r,itemComponentProps:i,ref:a}=t;return c.createElement(we.Z,(0,ue.Z)({is:"div",className:d()(qc().root,Gc().root,(null==r?void 0:r.includes("selected"))&&$c().isSelected,(null==r?void 0:r.includes("focused"))&&$c().isSelected),ref:a},i),c.createElement(Jc,{item:null!==(n=null==o?void 0:o.label)&&void 0!==n?n:"",formatMessage:e}))})),(0,o.Z)(this,"_startButton",this.LineCapSelectButton(this.props.intl.formatMessage,this.props.caretDirection,!1,this.props.innerRef)),(0,o.Z)(this,"_endButton",this.LineCapSelectButton(this.props.intl.formatMessage,this.props.caretDirection,!0)),(0,o.Z)(this,"_startItem",this.LineCapItem(this.props.intl.formatMessage)),(0,o.Z)(this,"_endItem",this.LineCapItem(this.props.intl.formatMessage,!0)),(0,o.Z)(this,"_dashArrayButton",this.DashArrayButton(this.props.intl.formatMessage,this.props.caretDirection)),(0,o.Z)(this,"_dashArrayItem",this.DashArrayItem(this.props.intl.formatMessage))}render(){const{intl:{formatMessage:e},styles:t,annotation:n,caretDirection:o}=this.props,{strokeDashArray:r}=n,i=rt.Options.LINE_CAP_PRESETS,a={start:"none",end:"none"};"lineCaps"in n&&n.lineCaps&&(Kc.a.includes(n.lineCaps.start)&&(a.start=n.lineCaps.start),Kc.a.includes(n.lineCaps.end)&&(a.end=n.lineCaps.end)),i.includes(a.start)||(a.start="N/A"),i.includes(a.end)||(a.end="N/A");const s=i.map((e=>({value:e,label:e}))),l=r instanceof Array&&2===r.length?Zc.x.find((e=>2===e.dashArray.length&&e.dashArray[0]===r[0]&&e.dashArray[1]===r[1])):Zc.x[0],u=Zc.x.map((e=>({value:e.id,label:e.id})));return c.createElement("div",{className:t.controlWrapper},c.createElement("div",{className:t.control},c.createElement(Uc.Z,{items:s,value:{value:a.start,label:a.start},discreteDropdown:!1,isActive:!1,caretDirection:o,accessibilityLabel:e(ke.Z.startLineCap),className:d()("PSPDFKit-Annotation-Toolbar-StartLineCap",t.startLineCapSelect,"PSPDFKit-Toolbar-DropdownGroup","PSPDFKit-Toolbar-DropdownGroup-Toolbar"),menuClassName:d()(t.dropdownMenu,t.lineCapsDashArrayMenu),maxCols:5,itemWidth:54,ButtonComponent:this._startButton,ItemComponent:this._startItem,onSelect:(e,t)=>{t.value&&this._onChangeStartLineCap(t.value)},frameWindow:this.props.frameWindow}),c.createElement(Uc.Z,{items:u,value:l?{label:l.id,value:l.id}:{label:"solid",value:"solid"},discreteDropdown:!1,isActive:!1,caretDirection:o,accessibilityLabel:e(ke.Z.strokeDashArray),className:d()("PSPDFKit-Annotation-Toolbar-DashArray",t.strokeDashArraySelect,"PSPDFKit-Toolbar-DropdownGroup","PSPDFKit-Toolbar-DropdownGroup-Toolbar"),menuClassName:d()(t.dropdownMenu,t.lineCapsDashArrayMenu),itemWidth:76,ButtonComponent:this._dashArrayButton,ItemComponent:this._dashArrayItem,onSelect:(e,t)=>{t.value&&this._onChangeDashArray(t.value)},frameWindow:this.props.frameWindow}),c.createElement(Uc.Z,{items:s,value:{label:a.end,value:a.end},discreteDropdown:!1,isActive:!1,caretDirection:o,accessibilityLabel:e(ke.Z.endLineCap),className:d()("PSPDFKit-Annotation-Toolbar-EndLineCap",t.endLineCapSelect,"PSPDFKit-Toolbar-DropdownGroup","PSPDFKit-Toolbar-DropdownGroup-Toolbar"),menuClassName:d()(t.dropdownMenu,t.lineCapsDashArrayMenu),maxCols:5,itemWidth:54,ButtonComponent:this._endButton,ItemComponent:this._endItem,onSelect:(e,t)=>{t.value&&this._onChangeEndLineCap(t.value)},frameWindow:this.props.frameWindow})))}}const eu=Qc,tu=(0,Se.vU)({square:{id:"square",defaultMessage:"Square",description:"Square line cap"},circle:{id:"circle",defaultMessage:"Circle",description:"Circle line cap"},diamond:{id:"diamond",defaultMessage:"Diamond",description:"Diamond line cap"},openArrow:{id:"openArrow",defaultMessage:"Open Arrow",description:"Open arrow line cap"},closedArrow:{id:"closedArrow",defaultMessage:"Closed Arrow",description:"Closed arrow line cap"},butt:{id:"butt",defaultMessage:"Butt",description:"Butt line cap"},reverseOpenArrow:{id:"reverseOpenArrow",defaultMessage:"Reverse Open Arrow",description:"Reverse open arrow line cap"},reverseClosedArrow:{id:"reverseClosedArrow",defaultMessage:"Reverse Closed Arrow",description:"Reverse closed arrow line cap"},slash:{id:"slash",defaultMessage:"Slash",description:"Slash line cap"},solid:{id:"solid",defaultMessage:"Solid",description:"Solid line"},narrowDots:{id:"narrowDots",defaultMessage:"Narrow Dots",description:"Narrow dotted line"},wideDots:{id:"wideDots",defaultMessage:"Wide Dots",description:"Wide dotted line"},narrowDashes:{id:"narrowDashes",defaultMessage:"Narrow Dashes",description:"Narrow dashed line"},wideDashes:{id:"wideDashes",defaultMessage:"Wide Dashes",description:"Wide dashed line"}});var nu;const ou=74,ru={width:54,height:13.5,fill:"transparent"};const iu=Be.i1*Be.St;function au(e){let{item:t,lineStyleOptions:n,formatMessage:o}=e;const r=n.get(t);return c.createElement(c.Fragment,null,c.createElement(q.TX,{tag:"div"},o(cu[t])),r)}class su extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"state",{calculateShapeBoundingBox:(0,L.sS)(this.props.annotation.constructor)}),(0,o.Z)(this,"DashArrayButton",(e=>{var t;let{btnComponentProps:n,selectedItem:o}=e;return c.createElement(we.Z,(0,ue.Z)({is:"div"},n,{className:d()("PSPDFKit-Input-Dropdown-Button",$c().selectBox,this.props.styles.strokeDashArraySelect),name:"clickableBox",ref:e=>{n.ref(e),"function"==typeof this.props.innerRef?this.props.innerRef(e):this.props.innerRef&&(this.props.innerRef.current=e)}}),c.createElement(au,{item:null!==(t=null==o?void 0:o.label)&&void 0!==t?t:"solid",lineStyleOptions:this._lineStyleOptions,formatMessage:this.props.intl.formatMessage}),c.createElement("div",null,(0,Oe.Z)({type:"caret-"+this.props.caretDirection,style:{width:12,height:12,flexBasis:12,marginLeft:3,strokeWidth:0},className:d()($c().dropdownIcon)})))})),(0,o.Z)(this,"DashArrayItem",(e=>{var t;let{item:n,state:o,itemComponentProps:r,ref:i}=e;return c.createElement(we.Z,(0,ue.Z)({is:"div",className:d()(qc().root,Gc().root,(null==o?void 0:o.includes("selected"))&&$c().isSelected,(null==o?void 0:o.includes("focused"))&&$c().isSelected)},r,{ref:i}),c.createElement(au,{item:null!==(t=null==n?void 0:n.label)&&void 0!==t?t:"solid",lineStyleOptions:this._lineStyleOptions,formatMessage:this.props.intl.formatMessage}))})),(0,o.Z)(this,"_onChange",((e,t)=>{const{value:n}=t,{annotation:o}=this.props,r="cloudy"===n?Be.i1:0,i=Zc.x.find((e=>e.id===n)),a=((e,t,n)=>{if(e.constructor===de.Xs||e.constructor===de.b3){if(t>0&&!e.cloudyBorderIntensity)return e.boundingBox.grow(iu+e.strokeWidth/2);if(!t&&e.cloudyBorderIntensity>0)return e.boundingBox.grow(-(iu+e.strokeWidth/2))}return e.constructor===de.Hi?n(e.set("cloudyBorderIntensity",t)):n(e)})(o,r,this.state.calculateShapeBoundingBox);return this.props.updateAnnotation({strokeDashArray:void 0!==i&&Array.isArray(i.dashArray)&&2===i.dashArray.length?i.dashArray:null,cloudyBorderIntensity:r,cloudyBorderInset:r?w.eB.fromValue(iu+o.strokeWidth/2):o.cloudyBorderInset,boundingBox:a})})),(0,o.Z)(this,"_lineStyleOptions",function(){const e=new Map;return Zc.x.forEach((t=>{e.set(t.id,c.createElement("svg",{viewBox:"0 0 16 4",style:ru,key:t.id},c.createElement("line",{x1:"0",y1:"2",x2:"16",y2:"2",strokeDasharray:t.dashArray})))})),e.set("cloudy",nu||(nu=c.createElement("svg",{viewBox:"0 0 16 4",style:ru,key:"cloudy"},c.createElement("path",{d:"M 1 2.23 A 2.125 2.125 0 0 1 4.67 1.68 A 2.125 2.125 0 0 0 4.35 2.23 A 2.125 2.125 0 0 1 8 1.68 A 2.125 2.125 0 0 0 7.68 2.23 A 2.125 2.125 0 0 1 11.33 1.68 A 2.125 2.125 0 0 0 11.02 2.23 A 2.125 2.125 0 1 1 14.14 4.80 A 2.125 2.125 0 0 0 13.55 4.54"})))),e}(this.props.intl.formatMessage))}static getDerivedStateFromProps(e){return{calculateShapeBoundingBox:(0,L.sS)(e.annotation.constructor)}}render(){const{intl:{formatMessage:e},styles:t,annotation:n,frameWindow:o}=this.props,{strokeDashArray:r,cloudyBorderIntensity:i}=n,a=Array.isArray(r)&&2===r.length&&Zc.x.find((e=>2===e.dashArray.length&&e.dashArray[0]===r[0]&&e.dashArray[1]===r[1])),s=i>0?a||i!==Be.i1?"":"cloudy":a?a.id:r?"":"solid",l=Array.from(this._lineStyleOptions.keys()).map((e=>({label:e,value:e})));return c.createElement("div",{className:t.controlWrapper},c.createElement("div",{className:t.control},c.createElement(Uc.Z,{items:l,value:{label:s||"solid",value:s||"solid"},discreteDropdown:!1,isActive:!1,caretDirection:this.props.caretDirection,accessibilityLabel:e(ke.Z.strokeDashArray),className:d()("PSPDFKit-Annotation-Toolbar-LineStyle",t.strokeDashArraySelect,"PSPDFKit-Toolbar-DropdownGroup","PSPDFKit-Toolbar-DropdownGroup-Toolbar"),menuClassName:d()(t.dropdownMenu,t.strokeDashArrayMenu),maxCols:1,itemWidth:ou,ButtonComponent:this.DashArrayButton,ItemComponent:this.DashArrayItem,onSelect:this._onChange,frameWindow:o})))}}const lu=su,cu=(0,Se.vU)({solid:{id:"solid",defaultMessage:"Solid",description:"Solid line"},narrowDots:{id:"narrowDots",defaultMessage:"Narrow Dots",description:"Narrow dotted line"},wideDots:{id:"wideDots",defaultMessage:"Wide Dots",description:"Wide dotted line"},narrowDashes:{id:"narrowDashes",defaultMessage:"Narrow Dashes",description:"Narrow dashed line"},wideDashes:{id:"wideDashes",defaultMessage:"Wide Dashes",description:"Wide dashed line"},cloudy:{id:"cloudy",defaultMessage:"Cloudy border",description:"Cloudy border effect"}});var uu=n(2726);function du(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}const pu=c.forwardRef(((e,t)=>{let n=[],r=!1;Array.isArray(rt.Options.LINE_WIDTH_PRESETS)&&(n=rt.Options.LINE_WIDTH_PRESETS,r=!0);let i=!1,a=!1;e.annotation instanceof w.Zc&&(i=!0),e.annotation instanceof w.R1&&(a=!0);const{intl:{formatMessage:s},styles:l,annotation:u,type:p,caretDirection:f}=e,h=p?`PSPDFKit-${p}-Annotation-Toolbar-StrokeWidth`:"",m=d()("PSPDFKit-Annotation-Toolbar-StrokeWidth",p&&h);let g=1,v=40,y=i?u.lineWidth:a?u.borderWidth:u.strokeWidth;return r&&(g=0,v=n.length-1,y=n.indexOf(y)),c.createElement("div",{className:l.controlWrapper},c.createElement("div",{className:l.control},c.createElement(uu.Z,{name:"lineWidth",accessibilityLabel:e.accessibilityLabel||s(ke.Z.size),className:m,value:y,valueLabel:t=>{let o=t;if(r){if(-1===t)return"N/A";o=n[t]}return e.intl.formatMessage(ke.Z.numberInPt,{arg0:o.toFixed(0)})},min:g,max:v,step:1,onChange:t=>{let s=t;if(r&&(s=n[t]),i)return e.updateAnnotation({lineWidth:s});if(a)return e.updateAnnotation({borderWidth:s});if(e.annotation instanceof w.b3||e.annotation instanceof w.Xs){const t=s/2-e.annotation.strokeWidth/2,n=e.annotation.cloudyBorderInset?new w.eB({left:e.annotation.cloudyBorderInset.left+t,top:e.annotation.cloudyBorderInset.top+t,right:e.annotation.cloudyBorderInset.right+t,bottom:e.annotation.cloudyBorderInset.bottom+t}):null;return e.updateAnnotation(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?du(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):du(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({strokeWidth:s,boundingBox:(0,L.sS)(e.annotation.constructor)(e.annotation.set("strokeWidth",s))},n?{cloudyBorderInset:n}:null))}return e.updateAnnotation({strokeWidth:s,boundingBox:(0,L.sS)(e.annotation.constructor)(e.annotation.set("strokeWidth",s))})},caretDirection:f,innerRef:t})))})),fu=pu;class hu extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"updateAnnotation",(e=>this.props.updateAnnotation({opacity:e/100}))),(0,o.Z)(this,"valueLabel",(e=>`${Math.round(e)}%`))}render(){const{intl:{formatMessage:e},styles:t,annotation:n,type:o,caretDirection:r}=this.props,i=o?`PSPDFKit-${o}-Annotation-Toolbar-Opacity`:"",a=d()("PSPDFKit-Annotation-Toolbar-Opacity",o&&i);return c.createElement("div",{className:t.controlWrapper},c.createElement("div",{className:t.control},c.createElement(uu.Z,{name:"opacity",accessibilityLabel:e(ke.Z.opacity),className:a,value:100*n.opacity,valueLabel:this.valueLabel,min:10,max:100,step:1,onChange:this.updateAnnotation,caretDirection:r,innerRef:this.props.innerRef})))}}const mu={LineCapsDashArrayComponent:eu,LineStyleComponent:lu,StrokeWidthComponent:fu,OpacityComponent:hu};var gu=n(11010),vu=n(66003),yu=n(16593),bu=n.n(yu);let wu=0;const Su=c.forwardRef((function(e,t){const n=c.useRef(wu++),{label:o,accessibilityLabel:r,onUpdate:i,onBlur:a,onFocus:s,onKeyDown:l,textStyles:u,disabled:p=!1,autoFocus:f=!0,name:h="name"}=e,m=c.useCallback((e=>{i&&i(e.target.value)}),[i]);return c.createElement("div",{className:e.styles.controlWrapper},c.createElement("div",{className:e.styles.control},c.createElement("div",{className:`PSPDFKit-Text-Input ${e.className||""} ${bu().root}`},e.label?c.createElement("label",{htmlFor:`${bu().root}-${n.current}`,className:bu().label},o):r?c.createElement(q.TX,{tag:"label",htmlFor:`${bu().root}-${n.current}`},r):null,c.createElement(q.oi,{className:d()(bu().input,e.styles.input),value:e.value,onChange:m,onBlur:a,onFocus:s,onKeyDown:l,autoFocus:f,selectTextOnFocus:!0,name:h,placeholder:e.placeholder,autoComplete:"off",id:`${bu().root}-${n.current}`,ref:t,style:u,disabled:p}))))}));var Pu=n(9437),Eu=n.n(Pu);const xu=c.forwardRef((function(e,t){const{intl:n,isEditing:o,showAnnotationNotes:r,isAnnotationNoteActive:i,hasAnnotationNote:a,onAnnotationNotePress:s,disabled:l}=e,{formatMessage:u}=n;return c.createElement(c.Fragment,null,r&&!o?c.createElement(gu.Z,{type:a||i?"note":"note-add",title:u(ke.Z.noteAnnotation),className:d()(Eu().button,Eu().annotationNoteButton,{[Eu().disableEditing]:l}),onPress:l?void 0:s,selected:i,ref:t}):null)}));var Du=n(24852),Cu=n(11378),ku=n(44706);function Ou(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Au(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ou(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ou(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tu(e){return"custom"===e.type}function Iu(e){return Tu(e)?`custom-${e.id}`:e.group}const Fu=e=>{let{annotationToolbarItems:t,builtInItems:n,btnFocusRefIfFocusedItem:o,onGroupExpansion:r,builtInToolbarProps:i={},expandedGroup:a,hasDesktopLayout:s,onGroupTransitionEnded:l,position:u,typeMap:p}=e;const f=(0,c.useMemo)((()=>t.every((e=>{if(Tu(e))return!1;if("spacer"===e.type)return!0;{const t=n.find((t=>t.type===e.type));return!(null==t||!t.hidden)}}))),[n,t]),h=a?n.find((e=>Iu(e)===a))||t.filter(Tu).find((e=>Iu(e)===a)):void 0,m=(0,c.useMemo)((()=>((e,t,n)=>{if(n)return e.map((e=>{const n=!Tu(e)&&t.find((t=>t.type===e.type));return Au(Au({},e),n&&{group:n.group,node:n.node,title:e.title||n.title,onPress:(t,o)=>{var r,i;null===(r=n.onPress)||void 0===r||r.call(n,t.nativeEvent,e.id),null===(i=e.onPress)||void 0===i||i.call(e,t.nativeEvent,o)},disabled:n.disabled&&e.disabled,className:d()(n.className,e.className)})})).find((e=>n===Iu(e)))})(t,n,a)),[t,a,n]);if(m)return c.createElement("div",{className:Eu().right},c.createElement(ku.Z,{onClose:()=>r(null),isPrimary:!1,position:u,onEntered:l,accessibilityLabel:m?m.title:void 0,className:Eu().expanded},m.node instanceof HTMLElement?c.createElement(Cu.Z,{node:m.node,className:m.className,onPress:m.onPress,title:m.title,disabled:m.disabled}):c.createElement("div",{className:m.className,onClick:e=>{var t;return null===(t=m.onPress)||void 0===t?void 0:t.call(m,e.nativeEvent,m.id)},title:m.title},m.node)));if(f)return null;const g=t.find((e=>{var t;return"spacer"!==e.type&&!(null!==(t=n.find((t=>t.type===e.type)))&&void 0!==t&&t.hidden)}));return c.createElement("form",{className:Eu().form,onSubmit:ar.PF},t.map(((e,t)=>{if("spacer"===e.type)return c.createElement("div",{key:e.type,className:d()("PSPDFKit-Annotation-Toolbar-Spacer",e.className),style:{display:"flex",flex:1},onClick:t=>{var n;return null===(n=e.onPress)||void 0===n?void 0:n.call(e,t.nativeEvent,e.id)}});const l=n.find((t=>t.type===e.type)),u=(null==g?void 0:g.id)===e.id&&(null==g?void 0:g.type)===e.type;if(Tu(e)){const n="node"in e&&!!e.node&&c.createElement("div",{role:"button",ref:o(Iu(e),h,0===t&&!a),key:e.id},c.createElement(Cu.Z,{node:e.node,className:e.className,onPress:t=>{var n;return null===(n=e.onPress)||void 0===n?void 0:n.call(e,t,e.id)},title:e.title,disabled:e.disabled,variant:"annotationToolbar"})),i="icon"in e&&!!e.icon&&c.createElement("div",{role:"button",key:e.id,className:d()(Eu().button,Gc().root,qc().root,`${e.className}-Icon`),onClick:t=>{var n;"custom"===e.type&&e.node&&r(`custom-${e.id}`),null===(n=e.onPress)||void 0===n||n.call(e,t,e.id)},ref:o(Iu(e),h,u&&!a),title:e.title},(e=>"icon"in e?"string"==typeof e.icon?/<svg/i.test(e.icon)?c.createElement(Re.Z,{className:Eu().customIconSvg,src:e.icon,role:"presentation"}):c.createElement("img",{alt:e.title,src:e.icon,role:"presentation"}):e.icon instanceof Node?c.createElement(Cu.Z,{key:e.id,node:e.icon,className:e.iconClassName,onPress:t=>{var n;return null===(n=e.onIconPress)||void 0===n?void 0:n.call(e,t,e.id)},title:e.title,disabled:e.disabled}):void 0:null)(e));return s?n||i:i||n}if(!l||l.hidden)return null;const f=(null==p?void 0:p[e.type])||e.type,m="function"==typeof i?i(l):i;return l.group?c.createElement(c.Fragment,{key:l.type},c.createElement("div",{className:d()(l.className,{[Eu().disableEditing]:l.disabled})},c.createElement(gu.Z,(0,ue.Z)({type:f,icon:e.icon,title:e.title||l.title,onPress:t=>{var n,o;(r(l.group||null),s)?null===(n=e.onPress)||void 0===n||n.call(e,t,e.id):null===(o=e.onIconPress)||void 0===o||o.call(e,t,e.id)}},m,{className:d()(m.className,e.className),ref:o(Iu(l),h,u&&!a)})),l.node),!l.hideSeparator&&c.createElement("div",{className:Eu().separator})):c.createElement("div",{className:d()(l.className,{[Eu().disableEditing]:l.disabled},e.className),key:l.type,onClick:t=>{var n;null===(n=e.onPress)||void 0===n||n.call(e,t.nativeEvent,e.id)},title:e.title||l.title},l.node)})))};var Mu=n(77528);function _u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Nu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_u(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ru=c.memo((function(e){const{annotation:t,isEditing:n,dispatch:o,canEditAnnotationCP:r,canDeleteSelectedAnnotationCP:i,expandedGroup:a,btnFocusRefIfFocusedGroup:s,btnFocusRefIfFocusedItem:l,lastToolbarActionUsedKeyboard:u,annotationToolbarItems:p,keepSelectedTool:f}=e,h=(0,_r.R9)((i=>{r&&(t.rects.size>0&&n?(o((0,bt.gX)(i)),o((0,Kt.aw)()),o((0,De.vR)())):e.updateAnnotation(i,"redaction"))})),m=(0,_r.R9)((()=>(o((0,Kt.fq)()),new Promise(((e,t)=>(o((0,Du.g)((()=>{o((0,Kt.Di)()),e()}),(e=>{o((0,Kt.Di)()),t(e)}))),e)))))),{position:g,intl:v}=e,{formatMessage:y}=v,b={updateAnnotation:h,annotation:t,styles:Eu(),intl:v,caretDirection:"bottom"===g?"up":"down"},w=[{node:c.createElement(vu.Z,(0,ue.Z)({},b,{record:t,colorProperty:"fillColor",onChange:h,className:"PSPDFKit-Redaction-Annotation-Toolbar-Fill-Color",accessibilityLabel:y(ke.Z.fillColor),removeTransparent:!0,keepOpacity:!0,frameWindow:e.frameWindow,innerRef:s("fillColor",!a),lastToolbarActionUsedKeyboard:u,annotationToolbarColorPresets:e.annotationToolbarColorPresets})),title:y(ke.Z.fillColor),type:"fill-color",className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-Fill-Color"),group:"fillColor",disabled:!r,hideSeparator:!0},{node:c.createElement("div",{style:{display:"flex"}},c.createElement(Su,{accessibilityLabel:y(ke.Z.overlayText),placeholder:y(ke.Z.insertOverlayText),className:Eu().overlayTextInput,value:t.overlayText||"",onUpdate:e=>{h({overlayText:e})},styles:Nu(Nu({},Eu()),{},{controlWrapper:Eu().controlWrapperAutoWidth,input:Eu().overlayInput}),ref:s("overlayText")}),c.createElement(vu.Z,(0,ue.Z)({},b,{record:t,colorProperty:"color",onChange:h,className:"PSPDFKit-Redaction-Annotation-Toolbar-Color",removeTransparent:!0,accessibilityLabel:y(ke.Z.color),keepOpacity:!0,styles:Nu(Nu({},Eu()),{},{controlWrapper:Eu().controlWrapperAutoWidth}),frameWindow:e.frameWindow,annotationToolbarColorPresets:e.annotationToolbarColorPresets})),c.createElement(q.bK,{label:y(ke.Z.repeatText),value:Boolean(t.repeatOverlayText),onUpdate:e=>{h({repeatOverlayText:e})},styles:Nu(Nu({},Eu()),{},{controlWrapper:Eu().controlWrapperAutoWidth})})),title:y(ke.Z.overlayText),group:"overlayText",className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-Overlay-Text",Eu().overlayTextMargin),disabled:!e.canEditAnnotationCP,type:"overlay-text"},{node:c.createElement(vu.Z,(0,ue.Z)({},b,{record:t,colorProperty:"outlineColor",onChange:h,className:"PSPDFKit-Redaction-Annotation-Toolbar-Outline-Color",accessibilityLabel:y(ke.Z.outlineColor),frameWindow:e.frameWindow,innerRef:s("outlineColor"),annotationToolbarColorPresets:e.annotationToolbarColorPresets})),title:y(ke.Z.outlineColor),group:"outlineColor",className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-Outline-Color"),disabled:!e.canEditAnnotationCP,type:"outline-color"},{node:c.createElement(mu.OpacityComponent,(0,ue.Z)({},b,{innerRef:s("opacity")})),title:y(ke.Z.opacity),group:"opacity",className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-Opacity"),disabled:!e.canEditAnnotationCP,type:"opacity"},{node:c.createElement(gu.Z,{type:"delete",icon:(0,Mu.KT)(p),title:y(ke.Z.delete),className:d()("PSPDFKit-Redaction-Annotation-Toolbar-Button-Delete",Eu().button,Eu().deleteButton,{[Eu().disabledButton]:!i}),onPress:i?()=>e.deleteAnnotation():()=>{}}),type:"delete",hidden:null===t.pageIndex||!!a||f},{node:c.createElement("div",{className:d()(Eu().applyRedactionsWrapper)},c.createElement(gu.Z,{type:"applyRedaction",title:y(ke.Z.applyRedactions),className:d()("PSPDFKit-Redaction-Annotation-Toolbar-Button-Apply-Redactions",Eu().button,Eu().buttonNoBorder,Eu().applyRedactionsButton),onPress:m})),type:"apply-redactions",hidden:null===t.pageIndex||!!a||f},{node:c.createElement(xu,{intl:v,isEditing:e.isEditing,showAnnotationNotes:e.showAnnotationNotes,hasAnnotationNote:e.hasAnnotationNote,isAnnotationNoteActive:e.isAnnotationNoteActive,onAnnotationNotePress:e.onAnnotationNotePress,disabled:!e.canEditAnnotationCP}),disabled:!e.canEditAnnotationCP,hidden:!e.showAnnotationNotes||n,type:"annotation-note"}],S={"overlay-text":t.repeatOverlayText?"redaction-text-repeating":"redaction-text-single","outline-color":"border-color"},P={presentational:e.viewportWidth>Be.GI,disabled:Boolean(a),className:d()(Eu().button,Eu().buttonNoBorder)};return c.createElement("div",{className:d()("PSPDFKit-Redaction-Annotation-Toolbar",Eu().content)},c.createElement(Fu,{annotationToolbarItems:p,builtInItems:w,btnFocusRefIfFocusedItem:l,onGroupExpansion:e.onGroupExpansion,builtInToolbarProps:P,hasDesktopLayout:e.hasDesktopLayout,expandedGroup:a,onGroupTransitionEnded:e.onGroupTransitionEnded,position:g,typeMap:S}))}));const Lu=Ru,Bu=c.memo((function(e){const{annotation:t,intl:n,position:o,expandedGroup:r,btnFocusRefIfFocusedGroup:i,btnFocusRefIfFocusedItem:a,canDeleteSelectedAnnotationCP:s,annotationToolbarItems:l}=e,u=(0,_r.R9)((t=>e.updateAnnotation(t,"stamp"))),{formatMessage:p}=n,f=[{node:c.createElement(mu.OpacityComponent,{intl:n,type:"Image",styles:Eu(),annotation:t,updateAnnotation:u,caretDirection:"bottom"===o?"up":"down",innerRef:i("opacity",!r)}),title:p(ke.Z.opacity),type:"opacity",disabled:!e.canEditAnnotationCP,group:"opacity",className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-Opacity")},{node:c.createElement(gu.Z,{type:"delete",icon:(0,Mu.KT)(l),title:p(ke.Z.delete),className:d()("PSPDFKit-Stamp-Annotation-Toolbar-Button-Delete",Eu().button,Eu().deleteButton,{[Eu().disabledButton]:!s}),onPress:s?()=>e.deleteAnnotation():()=>{}}),type:"delete",disabled:null===e.annotation.pageIndex},{node:c.createElement(xu,{intl:e.intl,showAnnotationNotes:e.showAnnotationNotes,hasAnnotationNote:e.hasAnnotationNote,isAnnotationNoteActive:e.isAnnotationNoteActive,onAnnotationNotePress:e.onAnnotationNotePress,disabled:!e.canEditAnnotationCP}),type:"annotation-note",disabled:!e.showAnnotationNotes}];return c.createElement("div",{className:d()("PSPDFKit-Stamp-Annotation-Toolbar",Eu().content)},c.createElement(Fu,{annotationToolbarItems:l,builtInItems:f,btnFocusRefIfFocusedItem:a,onGroupExpansion:e.onGroupExpansion,builtInToolbarProps:{className:Eu().button},hasDesktopLayout:e.hasDesktopLayout,expandedGroup:r,onGroupTransitionEnded:e.onGroupTransitionEnded,position:o}))}));const ju=Bu,zu=c.memo((function(e){const{annotation:t,intl:n,position:o,expandedGroup:r,btnFocusRefIfFocusedGroup:i,btnFocusRefIfFocusedItem:a,canDeleteSelectedAnnotationCP:s,annotationToolbarItems:l}=e,u=(0,_r.R9)((t=>e.updateAnnotation(t,"image"))),{formatMessage:p}=n,f=[{node:c.createElement(mu.OpacityComponent,{intl:n,type:"Image",styles:Eu(),annotation:t,updateAnnotation:u,caretDirection:"bottom"===o?"up":"down",innerRef:i("opacity",!r)}),title:p(ke.Z.opacity),type:"opacity",group:"opacity",disabled:!e.canEditAnnotationCP,hidden:e.areOnlyElectronicSignaturesEnabled,className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-Opacity")},{node:c.createElement(gu.Z,{type:"counterclockwise",title:p(ke.Z.rotateCounterclockwise),className:`PSPDFKit-Image-Annotation-Toolbar-Button-Rotate PSPDFKit-Image-Annotation-Toolbar-Button-Rotate-Counterclockwise ${Eu().button} ${Eu().rotateButton}`,onPress:()=>{e.selectedAnnotationPageSize&&e.updateAnnotation((0,_.eJ)(e.annotation,e.selectedAnnotationPageSize,_.z1.COUNTERCLOCKWISE))}}),type:"counterclockwise-rotation",disabled:!e.canEditAnnotationCP,hidden:e.areOnlyElectronicSignaturesEnabled},{node:c.createElement(gu.Z,{type:"clockwise",title:p(ke.Z.rotateClockwise),className:`PSPDFKit-Image-Annotation-Toolbar-Button-Rotate PSPDFKit-Image-Annotation-Toolbar-Button-Rotate-Clockwise ${Eu().button} ${Eu().rotateButton}`,onPress:()=>{e.selectedAnnotationPageSize&&e.updateAnnotation((0,_.eJ)(e.annotation,e.selectedAnnotationPageSize,_.z1.CLOCKWISE))}}),type:"clockwise-rotation",disabled:!e.canEditAnnotationCP,hidden:e.areOnlyElectronicSignaturesEnabled},{node:c.createElement(gu.Z,{type:"delete",icon:(0,Mu.KT)(l),title:p(ke.Z.delete),className:d()("PSPDFKit-Image-Annotation-Toolbar-Button-Delete",Eu().button,Eu().deleteButton,{[Eu().disabledButton]:!s}),onPress:s?()=>e.deleteAnnotation():()=>{}}),type:"delete",hidden:null===e.annotation.pageIndex||!!r},{node:c.createElement(xu,{intl:e.intl,showAnnotationNotes:e.showAnnotationNotes,hasAnnotationNote:e.hasAnnotationNote,isAnnotationNoteActive:e.isAnnotationNoteActive,onAnnotationNotePress:e.onAnnotationNotePress,disabled:!e.canEditAnnotationCP}),type:"annotation-note",hidden:!e.showAnnotationNotes||e.areOnlyElectronicSignaturesEnabled}];return c.createElement("div",{className:d()("PSPDFKit-Image-Annotation-Toolbar",Eu().content)},c.createElement(Fu,{annotationToolbarItems:l,builtInItems:f,btnFocusRefIfFocusedItem:a,onGroupExpansion:e.onGroupExpansion,builtInToolbarProps:{className:Eu().button},hasDesktopLayout:e.hasDesktopLayout,expandedGroup:r,onGroupTransitionEnded:e.onGroupTransitionEnded,position:o}))}));const Ku=zu;var Zu=n(927),Uu=n.n(Zu);const Vu=["Tab","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"];class Gu extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"state",{keyboardFocus:!!this.props.lastToolbarActionUsedKeyboard}),(0,o.Z)(this,"_handleKeyUp",(e=>{Vu.includes(e.key)&&this.setState({keyboardFocus:!0})})),(0,o.Z)(this,"_handlePointerUp",(()=>{this.setState({keyboardFocus:!1})})),(0,o.Z)(this,"shouldComponentUpdate",Ce.O)}componentDidMount(){var e;const t=null===(e=this.props.innerRef)||void 0===e||null===(e=e.current)||void 0===e?void 0:e.parentNode;t&&t.focus()}render(){const{colorPresets:e,activeColor:t,innerRef:n}=this.props,{formatMessage:o}=this.props.intl;return this.props.colorPresets.length<2?null:c.createElement("div",{className:d()("PSPDFKit-Input-ColorPicker",this.props.className,Uu().root),role:"radiogroup","aria-label":this.props.accessibilityLabel,onKeyUp:this._handleKeyUp,onPointerUp:this._handlePointerUp,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||this.setState({keyboardFocus:!1})}},e.map(((e,r)=>{const i=e.color===t||e.color&&t&&e.color.equals(t),a=d()({[Uu().input]:!0,[Uu().inputIsActive]:i,"PSPDFKit-Input-ColorPicker-Label":!0,"PSPDFKit-Input-ColorPicker-Label-active":i,[Uu().focusRing]:this.state.keyboardFocus&&i}),s=d()({[Uu().swatch]:!0,[Uu().swatchIsTransparent]:!e.color,[Uu().swatchIsWhite]:!e.color||e.color.equals(w.Il.WHITE),"PSPDFKit-Input-ColorPicker-Swatch":!0}),l=e.color?e.color.toCSSValue():null;let u=e.localization.defaultMessage;null!=l&&(e.localization.id?u=o(e.localization):null!=ke.Z[l]&&(u=o(ke.Z[l])));const p=e.color&&e.color.toCSSValue();return c.createElement("label",{className:a,key:r,title:u,"aria-label":u},c.createElement("span",{className:s,style:{backgroundColor:p||"transparent"}}),c.createElement(q.TX,null," ",u," "),c.createElement(q.TX,{tag:"input",type:"radio",name:Uu().root,value:r,checked:!!i,onChange:t=>{t.target.checked&&this.props.onClick(e.color)},ref:i&&n?n:void 0}))})))}}(0,o.Z)(Gu,"defaultProps",{className:""});const Wu=(0,Se.XN)(Gu);var qu=n(86617);const Hu=c.forwardRef((function(e,t){let{value:n="normal",onChange:o,className:r,caretDirection:i,frameWindow:a}=e;const{formatMessage:s}=(0,Se.YB)(),l=Object.keys(qu.b).map((e=>({value:e,label:e}))),u=c.useCallback($u(s,i),[s,i]),p=c.useCallback(Xu(s),[s]);return c.createElement(c.Fragment,null,c.createElement(Uc.Z,{items:l,value:{label:n,value:n},discreteDropdown:!1,isActive:!1,caretDirection:i,accessibilityLabel:s(ke.Z.blendMode),className:d()(Eu().blendModeSelect,r,"PSPDFKit-Toolbar-DropdownGroup","PSPDFKit-Toolbar-DropdownGroup-Toolbar"),menuClassName:Eu().dropdownMenu,ButtonComponent:u,ItemComponent:p,onSelect:(e,t)=>{if(t.value){const e=qu.b[t.value];o(e)}},frameWindow:a,ref:t}),c.createElement("div",{className:d()(Eu().fontSizeNativeFlexbox)},c.createElement("div",{className:Eu().nativeDropdown},c.createElement("select",{"aria-label":s(ke.Z.blendMode),className:"PSPDFKit-Input-Dropdown-Select",value:n,onChange:e=>{if(void 0!==e.target.value){const t=qu.b[e.target.value];o(t)}},ref:t},l.map((e=>c.createElement("option",{key:e.value,value:e.value,disabled:e.disabled},s(Yu[e.label]))))))))})),$u=(e,t)=>n=>{let{btnComponentProps:o,selectedItem:r}=n;return c.createElement(we.Z,(0,ue.Z)({is:"div"},o,{ref:o.ref,className:d()("PSPDFKit-Input-Dropdown-Button ",$c().selectBox,Eu().selectBox),style:{minWidth:"100px"}}),c.createElement("span",null,null!=r&&r.label?e(Yu[r.label]):null),c.createElement("div",null,(0,Oe.Z)({type:"caret-"+t,style:{width:12,height:12,flexBasis:12},className:d()($c().dropdownIcon)})))},Xu=e=>t=>{let{item:n,state:o,itemComponentProps:r,ref:i}=t;return c.createElement(we.Z,(0,ue.Z)({is:"div",ref:i,className:d()($c().item,{[$c().isSelected]:(null==o?void 0:o.includes("selected"))||(null==o?void 0:o.includes("focused"))}),name:null==n?void 0:n.label},r),null!=n&&n.label?e(Yu[n.label]):null)},Yu=(0,Se.vU)({normal:{id:"normal",defaultMessage:"Normal",description:"Blend Mode Normal"},multiply:{id:"multiply",defaultMessage:"Multiply",description:"Blend Mode Multiply"},screen:{id:"screenBlend",defaultMessage:"Screen",description:"Blend Mode Screen"},overlay:{id:"overlay",defaultMessage:"Overlay",description:"Blend Mode Overlay"},darken:{id:"darken",defaultMessage:"Darken",description:"Blend Mode Darken"},lighten:{id:"lighten",defaultMessage:"Lighten",description:"Blend Mode Lighten"},colorDodge:{id:"colorDodge",defaultMessage:"Color Dodge",description:"Blend Mode Color Dodge"},colorBurn:{id:"colorBurn",defaultMessage:"Color Burn",description:"Blend Mode Color Burn"},hardLight:{id:"hardLight",defaultMessage:"Hard Light",description:"Blend Mode Hard Light"},softLight:{id:"softLight",defaultMessage:"Soft Light",description:"Blend Mode Soft Light"},difference:{id:"difference",defaultMessage:"Difference",description:"Blend Mode Difference"},exclusion:{id:"exclusion",defaultMessage:"Exclusion",description:"Blend Mode Exclusion"},hue:{id:"hue",defaultMessage:"Hue",description:"Blend Mode Hue"},saturation:{id:"saturation",defaultMessage:"Saturation",description:"Blend Mode Saturation"},color:{id:"color",defaultMessage:"Color",description:"Blend Mode Color"},luminosity:{id:"luminosity",defaultMessage:"Luminosity",description:"Blend Mode Luminosity"}}),Ju=c.memo((function(e){const t=(0,_r.R9)((t=>{const{annotation:n,isEditing:o,dispatch:r,variantAnnotationPresetID:i,canEditAnnotationCP:a}=e;if(a)if(n.rects.size>0&&o)r((0,bt.gX)(t)),r((0,Kt.d5)()),r((0,De.vR)());else{const o=i||X.hD.get(n.constructor);e.updateAnnotation(t,o)}})),{position:n,annotation:o,expandedGroup:r,btnFocusRefIfFocusedGroup:i,btnFocusRefIfFocusedItem:a,canDeleteSelectedAnnotationCP:s,lastToolbarActionUsedKeyboard:l,annotationToolbarItems:u}=e,{formatMessage:p}=e.intl,f=rt.Options.TEXT_MARKUP_COLOR_PRESETS,h=rt.Options.HIGHLIGHT_COLOR_PRESETS,m=o instanceof w.FV?h:f,g=[{node:c.createElement("div",{className:Eu().controlWrapper},c.createElement("div",{className:Eu().control},c.createElement(Wu,{className:"PSPDFKit-Text-Markup-Annotation-Toolbar-Color",accessibilityLabel:p(ke.Z.color),colorPresets:m,activeColor:o.color,onClick:e=>t({color:e}),innerRef:i("color",!r),lastToolbarActionUsedKeyboard:l}))),title:p(ke.Z.color),group:"color",type:"color",disabled:!e.canEditAnnotationCP,className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-Color")},{node:c.createElement(mu.OpacityComponent,{intl:e.intl,type:"Text-Markup",styles:Eu(),annotation:o,updateAnnotation:e=>t(e),caretDirection:"bottom"===n?"up":"down",innerRef:i("opacity")}),title:p(ke.Z.opacity),group:"opacity",type:"opacity",disabled:!e.canEditAnnotationCP,className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-Opacity")},{node:c.createElement("div",{className:Eu().controlWrapper},c.createElement("div",{className:Eu().control},c.createElement(Hu,{value:o.blendMode,className:"PSPDFKit-Text-Markup-Annotation-Toolbar-Blend-Mode",onChange:e=>t({blendMode:e}),caretDirection:"bottom"===n?"up":"down",frameWindow:e.frameWindow,ref:i("blendMode")}))),title:p(ke.Z.blendMode),group:"blendMode",type:"blend-mode",disabled:!e.canEditAnnotationCP,className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-BlendMode")},{node:c.createElement(gu.Z,{type:"delete",icon:(0,Mu.KT)(u),title:p(ke.Z.delete),className:d()("PSPDFKit-Text-Markup-Annotation-Toolbar-Button-Delete",Eu().button,Eu().deleteButton,{[Eu().disabledButton]:!s}),onPress:s?()=>e.deleteAnnotation():()=>{}}),type:"delete",hidden:null===e.annotation.pageIndex||!!r||e.isEditing},{node:c.createElement(xu,{intl:e.intl,isEditing:e.isEditing,showAnnotationNotes:e.showAnnotationNotes,hasAnnotationNote:e.hasAnnotationNote,isAnnotationNoteActive:e.isAnnotationNoteActive,onAnnotationNotePress:e.onAnnotationNotePress,disabled:!e.canEditAnnotationCP}),type:"annotation-note",hidden:!e.showAnnotationNotes||e.isEditing}],v={className:Eu().button,presentational:e.viewportWidth>=Be.GI,disabled:!!r};return c.createElement("div",{className:d()("PSPDFKit-Text-Markup-Annotation-Toolbar",Eu().content)},c.createElement(Fu,{annotationToolbarItems:u,builtInItems:g,btnFocusRefIfFocusedItem:a,onGroupExpansion:e.onGroupExpansion,builtInToolbarProps:v,hasDesktopLayout:e.hasDesktopLayout,expandedGroup:r,onGroupTransitionEnded:e.onGroupTransitionEnded,position:n,typeMap:{color:"border-color"}}))}));const Qu=Ju;var ed=n(38623),td=n(47751),nd=n(61252),od=n.n(nd),rd=n(70190),id=n.n(rd);const ad=e=>{let{item:t,state:n,itemComponentProps:o,ref:r}=e;return c.createElement(sd,{item:t,state:n,fontFamily:void 0,itemComponentProps:o,ref:r})},sd=c.forwardRef(((e,t)=>{var n;let{item:o,state:r,fontFamily:i,itemComponentProps:a,width:s}=e;return c.createElement(we.Z,(0,ue.Z)({is:"div",className:d()($c().item,od().item,{[$c().isSelected]:(null==r?void 0:r.includes("selected"))||(null==r?void 0:r.includes("focused"))}),name:null!==(n=null==o?void 0:o.value)&&void 0!==n?n:null==o?void 0:o.label,style:{fontFamily:i,width:s},ref:t},a),null!=r&&r.includes("selected")?c.createElement(Re.Z,{src:id(),className:od().icon}):c.createElement("span",{className:od().icon}),null==o?void 0:o.label)})),ld=e=>function(t){var n;let{btnComponentProps:o,selectedItem:r,caretDirection:i,disabled:a,isOpen:s}=t;const l=c.useRef(),{formatMessage:u}=(0,Se.YB)();c.useLayoutEffect((()=>{l.current&&(l.current.value=(null==r?void 0:r.label)||"")}),[r]);const p=c.useCallback((()=>{var t;const n=null===(t=l.current)||void 0===t?void 0:t.value;if(n&&l.current&&n!==(null==r?void 0:r.label)){const t=parseFloat(n);var o,i,a;if(Number.isNaN(t))l.current.value=null!==(o=null==r?void 0:r.label)&&void 0!==o?o:"";else e({selectedItem:{label:null!==(i=t.toString())&&void 0!==i?i:"",value:null!==(a=t.toString())&&void 0!==a?a:""},preventFocusShift:!1})}}),[null==r?void 0:r.label]);return c.createElement("div",{className:d()(od().wrapper)},c.createElement(Su,{accessibilityLabel:u(ke.Z.fontSize),className:od().textInput,onBlur:p,onKeyDown:t=>{var n,o;const r=null!==(n=null===(o=l.current)||void 0===o?void 0:o.value)&&void 0!==n?n:"0";if("ArrowUp"===t.key){var i,a;const t=parseFloat(r)+1;e({selectedItem:{label:null!==(i=t.toString())&&void 0!==i?i:"",value:null!==(a=t.toString())&&void 0!==a?a:""},preventFocusShift:!0})}else if("ArrowDown"===t.key){var s,c;const t=Math.max(0,parseFloat(r)-1);e({selectedItem:{label:null!==(s=t.toString())&&void 0!==s?s:"",value:null!==(c=t.toString())&&void 0!==c?c:""},preventFocusShift:!0})}else"Enter"===t.key&&(t.preventDefault(),p())},onFocus:()=>{Ke.G6&&setTimeout((()=>{l.current&&l.current.setSelectionRange(0,l.current.value.length)}),100)},name:"fontSize",styles:{input:d()({[od().inputDisabled]:a},od().textInputField)},disabled:a,ref:l,autoFocus:!1}),c.createElement("button",(0,ue.Z)({},o,{ref:o.ref,key:null!==(n=null==r?void 0:r.value)&&void 0!==n?n:null==r?void 0:r.label,className:d()("PSPDFKit-Input-Dropdown-Button",$c().selectBox,od().arrowDropdownBtn,od().fontSizeDropdownBtn,{[od().inputDisabled]:a,[$c().disabled]:a}),disabled:a}),c.createElement(q.TX,null,u(ke.Z.fontSize)),c.createElement("div",null,(0,Oe.Z)({type:`caret-${i}`,style:{width:12,height:12,flexBasis:12},className:d()($c().dropdownIcon,{[$c().isOpen]:s})}))))},cd=function(e){const{disabled:t=!1}=e;return c.createElement(Uc.Z,{frameWindow:e.frameWindow,items:e.items,value:e.value,className:e.className,maxCols:1,isActive:!1,caretDirection:e.caretDirection,disabled:t,menuClassName:d()(e.menuClass,od().dropdownMenu),ButtonComponent:ld(e.onSelect),ItemComponent:ad,onSelect:(t,n)=>{e.onSelect({selectedItem:n,preventFocusShift:!1})},menuPositionOffsets:{top:-1}})},ud=c.forwardRef((function(e,t){var o,r;const{caretDirection:i,onChange:a,frameWindow:s,intl:l,styles:u,fontSizes:p,fontFamilyItems:f,isBold:h=!1,isItalic:m=!1,isUnderline:g=!1,currentFontFamily:v,currentFontSize:y,currentHorizontalAlign:b,currentVerticalAlign:w,showAlignmentOptions:S,showFontStyleOptions:P,disabled:E=!1,showUnderline:x=!1}=e,{formatMessage:D}=l,C=c.useCallback(fd(150,i,u,E,u.fontFamily),[i,u,E]),k=p.map((e=>({label:e.toString(),value:e.toString(),disabled:!1}))),O=f.map((e=>{var t,n;return c.createElement("option",{key:null!==(t=e.value)&&void 0!==t?t:e.label,value:null!==(n=e.value)&&void 0!==n?n:e.label,disabled:e.disabled},e.label)}));return c.createElement("div",{className:u.controlWrapper},c.createElement("div",{className:d()(u.control,u.textFormatControls)},c.createElement("div",{className:d()(u.fontFamilyNativeFlexbox)},c.createElement("div",{className:u.nativeDropdown},c.createElement("select",{"aria-label":D(ke.Z.font),className:"PSPDFKit-Input-Dropdown-Select",value:null!=v?v:"",onChange:e=>{void 0!==e.target.value&&a({modification:{font:e.target.value}})},ref:t,disabled:E},O,f.some((e=>e.value===v))?null:c.createElement("option",{style:{display:"none"}},v)))),c.createElement(Uc.Z,{items:f,value:v?{label:v,value:v}:null,accessibilityLabel:D(ke.Z.font),discreteDropdown:!1,isActive:!1,caretDirection:i,className:d()(e.fontFamilyClasses,u.fontFamilySelect),menuClassName:d()(u.dropdownMenu,e.fontFamilyMenuClasses),ButtonComponent:C,ItemComponent:pd,onSelect:(e,t)=>{null!=t.value&&a({modification:{font:t.value}})},frameWindow:s,disabled:E}),c.createElement(cd,{items:k,value:{label:y?y.toString():"",value:(null!=y?y:"").toString()||""},frameWindow:s,className:d()(u.fontSizeSelect,e.fontSizeClasses),menuClass:d()(e.fontSizeMenuClasses),caretDirection:i,disabled:E,onSelect:e=>{let{selectedItem:t,preventFocusShift:n}=e;null!=t.value&&a({modification:{fontSize:Number(t.value)},preventFocusShift:n})}}),P?c.createElement(c.Fragment,null,c.createElement(q.zx,{className:d()(u.fontStyleBtn,u.fontStyleBtnBorderless,{[u.activeFontStyleBtn]:h}),style:{marginRight:8},title:D(ke.Z.bold),onClick:()=>{a({modification:{bold:!h}})},disabled:E,"aria-pressed":h},c.createElement(Re.Z,{src:n(99604)}),c.createElement(q.TX,null,D(ke.Z.bold))),c.createElement(q.zx,{className:d()(u.fontStyleBtn,u.fontStyleBtnBorderless,{[u.activeFontStyleBtn]:m}),onClick:()=>{a({modification:{italic:!m}})},disabled:E,title:D(ke.Z.italic),"aria-pressed":m},c.createElement(Re.Z,{src:n(99082)}),c.createElement(q.TX,null,D(ke.Z.italic))),x&&c.createElement(q.zx,{className:d()(u.fontStyleBtn,u.fontStyleBtnBorderless,{[u.activeFontStyleBtn]:g}),style:{marginLeft:8},onClick:()=>{a({modification:{underline:!g}})},disabled:E,title:D(ke.Z.underline),"aria-pressed":g},c.createElement(Re.Z,{src:n(80394)}),c.createElement(q.TX,null,D(ke.Z.underline)))):null,S?c.createElement(c.Fragment,null,c.createElement("span",{className:u.radioGroupWrapper},c.createElement(q.Ee,{inputName:"horizontalAlign",label:D(ke.Z.horizontalAlignment),selectedOption:null!=b?b:"",labelClassNamePrefix:null!==(o=e.horizontalAlignClasses)&&void 0!==o?o:"",options:["left","center","right"].map((e=>({value:e,label:D(ke.Z[`alignment${(0,hn.kC)(e)}`]),iconPath:n(58758)(`./text-align-horizontal-${e}.svg`)}))),onChange:e=>a({modification:{horizontalAlign:e}}),disabled:E})),c.createElement(q.Ee,{inputName:"verticalAlign",label:D(ke.Z.verticalAlignment),selectedOption:null!=w?w:"",labelClassNamePrefix:null!==(r=e.verticalAlignClasses)&&void 0!==r?r:"",options:["top","center","bottom"].map((e=>({value:e,label:D(ke.Z["center"===e?"alignmentCenter":e]),iconPath:n(29712)(`./text-align-vertical-${e}.svg`)}))),onChange:e=>a({modification:{verticalAlign:e}}),disabled:E})):null))})),dd=c.forwardRef(((e,t)=>{var n;let{item:o,state:r,fontFamily:i,itemComponentProps:a,width:s}=e;return c.createElement(we.Z,(0,ue.Z)({is:"div",className:d()($c().item,{[$c().isSelected]:(null==r?void 0:r.includes("selected"))||(null==r?void 0:r.includes("focused"))}),name:null!==(n=null==o?void 0:o.value)&&void 0!==n?n:null==o?void 0:o.label,style:{fontFamily:i,width:s},ref:t},a),null==o?void 0:o.label)})),pd=e=>{let{item:t,state:n,itemComponentProps:o}=e;return c.createElement(dd,{item:t,state:n,fontFamily:null==t?void 0:t.label,itemComponentProps:o})},fd=(e,t,n,o,r)=>i=>{var a;let{btnComponentProps:s,selectedItem:l}=i;return c.createElement("button",(0,ue.Z)({},s,{ref:s.ref,key:null!==(a=null==l?void 0:l.value)&&void 0!==a?a:null==l?void 0:l.label,className:d()("PSPDFKit-Input-Dropdown-Button",$c().selectBox,n.selectBox,{[Gc().isDisabled]:o,[n.controlIsDisabled]:o,[$c().disabled]:o}),style:{width:e},disabled:o}),c.createElement("span",{className:r},null==l?void 0:l.label),c.createElement("div",null,(0,Oe.Z)({type:`caret-${t}`,style:{width:12,height:12,flexBasis:12},className:d()($c().dropdownIcon)})))};var hd=n(56939),md=n.n(hd);function gd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function vd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gd(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const yd=c.forwardRef((function(e,t){const{annotation:n,caretDirection:o,onChange:r,frameWindow:i,intl:a,styles:s,showInlineFontStyles:l=!0,customFontsReadableNames:u}=e,{formatMessage:d}=a,{fontSizePresets:p}=td.default,f=Math.round(n.fontSize),h=-1===p.indexOf(f)?p.concat(f).sort(((e,t)=>e-t)):p,m=ed.vt.toArray().map((e=>({label:e,value:e}))),g=m.concat(u.toArray().map((e=>({label:e,value:e}))).filter((e=>!m.some((t=>t.value===e.value)))));if(!ed.vt.has(n.font)&&!u.has(n.font)&&""!==n.font.trim()){const e=d(ke.Z.fontFamilyUnsupported,{arg0:n.font});g.push({label:e,value:e,disabled:!0})}return c.createElement(ud,{onChange:e=>{let{modification:t}=e;return r(t)},caretDirection:o,frameWindow:i,ref:t,intl:a,styles:vd(vd({},s),{},{fontStyleBtn:md().fontStyleBtn,fontStyleBtnBorderless:md().fontStyleBtnBorderless,activeFontStyleBtn:md().activeFontStyleBtn}),fontSizes:h,fontFamilyItems:g,showAlignmentOptions:!0,showFontStyleOptions:l,showUnderline:l,isBold:e.selectedIsBold,isItalic:e.selectedIsItalic,isUnderline:e.selectedIsUnderline,currentFontFamily:n.font,currentFontSize:f,currentHorizontalAlign:n.horizontalAlign,currentVerticalAlign:n.verticalAlign,fontFamilyClasses:"PSPDFKit-Text-Annotation-Toolbar-Font-Family",fontSizeClasses:"PSPDFKit-Text-Annotation-Toolbar-Font-Size",horizontalAlignClasses:"PSPDFKit-Text-Annotation-Toolbar-Alignment",verticalAlignClasses:"PSPDFKit-Text-Annotation-Toolbar-Vertical-Alignment",inlineStyleClasses:"PSPDFKit-Text-Annotation-Toolbar-Inline-Style"})}));function bd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function wd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bd(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Sd=new w.Il({r:.5,g:.5,b:.5});function Pd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Ed(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pd(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const xd=c.memo((function(e){var t;const n=c.useRef(null),o="xhtml"===e.annotation.text.format,r=(0,_r.R9)((t=>{if(!e.canEditAnnotationCP)return;let n=e.annotation.merge(t);if((0,_.Vc)(n))e.updateAnnotation(t);else if(e.selectedAnnotationPageSize&&(t.fontSize||t.font||t.text&&"xhtml"===t.text.format)){const{rotation:o}=n;let r=(0,Ue.h4)(n);const i=r.boundingBox.getCenter();r=(0,un.Zv)(r.set("rotation",0),e.selectedAnnotationPageSize,e.zoomLevel),r=(0,un.XA)(r,e.zoomLevel);const a=new w.E9({x:r.boundingBox.getCenter().x-i.x,y:r.boundingBox.getCenter().y-i.y}),s=a.rotate(o),l=new w.E9({x:s.x-a.x,y:s.y-a.y});r=r.update("boundingBox",(e=>null==e?void 0:e.translate(l))),n=(0,Ue.az)(r.set("rotation",o)),e.updateAnnotation(Ed(Ed({},t),{},{isFitting:n.isFitting,boundingBox:n.boundingBox}))}else{const{isFitting:o}=(0,un.XA)((0,Ue.h4)(n).set("rotation",0),e.zoomLevel);e.updateAnnotation(Ed(Ed({},t),{},{isFitting:o}))}})),{activeTextStyle:i,updateAnnotationOrEditorText:a,selectedIsUnderline:s,selectedIsBold:l,selectedIsItalic:u}=function(e){let{editor:t,frameWindow:n,updateAnnotation:o,text:r,isRichText:i}=e;const[a,s]=(0,c.useState)(null),[l,u]=(0,c.useState)(!1),[d,p]=(0,c.useState)(!1),[f,h]=(0,c.useState)(!1),m=(0,c.useCallback)((()=>{t&&(u(q.ri.isMarkActive(t,"bold")),p(q.ri.isMarkActive(t,"italic")),h(q.ri.isMarkActive(t,"underline")))}),[t]),g=(0,c.useCallback)((()=>{if(!t||!i)return;const e=(0,hn.BK)(q.ri.getSelectedNodesColor(t,"fontColor")),n=(0,hn.BK)(q.ri.getSelectedNodesColor(t,"backgroundColor"));s({fontColor:e?w.Il.fromHex(e):Sd,backgroundColor:n?w.Il.fromHex(n):null}),m()}),[t,m,i]);t&&(t.onSelectionChange=g,t.onValueChange=()=>{m(),g()}),(0,c.useEffect)((()=>{var e;if(i&&t)return null===(e=n.document)||void 0===e||e.addEventListener("keydown",o),()=>{var e;null===(e=n.document)||void 0===e||e.removeEventListener("keydown",o)};function o(e){t&&(!e.ctrlKey&&!e.metaKey||"u"!==e.key&&"i"!==e.key&&"b"!==e.key||m())}}),[t,n,i,m]);const v=(0,c.useCallback)((e=>{const i=new Map(Object.entries(e)),a=i.has("fontColor")||i.has("backgroundColor"),l=i.has("bold")||i.has("italic")||i.has("underline");if(a){const i=e.fontColor?"fontColor":"backgroundColor";var c,d;if(q.ri.isRangeSelected(t))q.ri.applyStyle(t,i,!e[i]||null!==(c=e[i])&&void 0!==c&&c.equals(w.Il.TRANSPARENT)?null:e[i].toHex()),o({text:{format:"xhtml",value:q.ri.serialize(null==t?void 0:t.children[0])}}),s((t=>wd(wd({},t),{},{[i]:e[i]}))),null===(d=n.getSelection())||void 0===d||d.removeAllRanges();else if("fontColor"===i){const t=q.ri.setStyleOrToggleFormat(r,i,e[i].toHex());o({text:{format:"xhtml",value:t},fontColor:e.fontColor,borderColor:e.fontColor})}else s({backgroundColor:e.backgroundColor}),o(e)}else if(l){const n=Object.keys(e)[0];if(t&&q.ri.isRangeSelected(t)){switch(q.ri.toggleMark(t,n),n){case"bold":u(e.bold);break;case"italic":p(e.italic);break;case"underline":h(e.underline)}o({text:{format:"xhtml",value:q.ri.serialize(null==t?void 0:t.children[0])}})}else{const e=q.ri.setStyleOrToggleFormat(r,n);o({text:{format:"xhtml",value:e}})}}else o(e)}),[o,r,t,n]);if(i){if(t)return{activeTextStyle:a,updateAnnotationOrEditorText:v,selectedIsBold:l,selectedIsItalic:d,selectedIsUnderline:f};{const{fontColor:e,isUnderlined:t,isItalic:n,isBold:o}=q.ri.getComputedStyleAll(r);return{activeTextStyle:{fontColor:e?w.Il.fromHex(e):void 0,backgroundColor:null==a?void 0:a.backgroundColor},updateAnnotationOrEditorText:v,selectedIsBold:o,selectedIsItalic:n,selectedIsUnderline:t}}}return{updateAnnotationOrEditorText:o}}({editor:e.richTextEditorRef,frameWindow:e.frameWindow,updateAnnotation:r,text:(null===(t=e.annotation.text)||void 0===t?void 0:t.value)||"",isRichText:o}),{annotation:p,position:f,intl:h,expandedGroup:m,btnFocusRefIfFocusedGroup:g,canDeleteSelectedAnnotationCP:v,keepSelectedTool:y,interactionMode:b,annotationToolbarColorPresets:S}=e,{formatMessage:P}=h,E="bottom"===f?"up":"down",x={onChange:a,annotation:p,styles:Eu(),intl:h,caretDirection:E},D=y&&b===N.A.TEXT,C=[{node:c.createElement("div",{className:Eu().controlWrapper},c.createElement("div",{className:Eu().control},c.createElement(vu.Z,(0,ue.Z)({},x,{record:o?Ed(Ed({},i),{},{opacity:p.opacity}):p,colorProperty:"fontColor",className:"PSPDFKit-Text-Annotation-Toolbar-Font-Color",removeTransparent:!0,frameWindow:e.frameWindow,accessibilityLabel:P(ke.Z.color),innerRef:g("color"),annotationToolbarColorPresets:S})))),title:P(ke.Z.color),type:"color",group:"color",disabled:!e.canEditAnnotationCP,className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-TextColor")},{node:c.createElement("div",{className:Eu().controlWrapper},c.createElement("div",{className:Eu().control},c.createElement(vu.Z,(0,ue.Z)({},x,{record:o?Ed(Ed({},i),{},{opacity:p.opacity},!e.richTextEditorRef&&{backgroundColor:p.backgroundColor}):p,colorProperty:"backgroundColor",className:"PSPDFKit-Text-Annotation-Toolbar-Background-Color",frameWindow:e.frameWindow,accessibilityLabel:P(ke.Z.fillColor),innerRef:g("backgroundColor"),annotationToolbarColorPresets:S})))),title:P(ke.Z.fillColor),type:"background-color",group:"backgroundColor",disabled:!e.canEditAnnotationCP,className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-FillColor")},{node:c.createElement(mu.OpacityComponent,{intl:e.intl,type:"Text",styles:Eu(),annotation:p,updateAnnotation:r,caretDirection:E,innerRef:g("opacity")}),title:P(ke.Z.opacity),type:"opacity",group:"opacity",disabled:!e.canEditAnnotationCP,className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-Opacity")},{node:c.createElement(yd,(0,ue.Z)({},x,{frameWindow:e.frameWindow,ref:g("font"),selectedIsBold:l,selectedIsItalic:u,selectedIsUnderline:s,showInlineFontStyles:o,customFontsReadableNames:e.customFontsReadableNames})),title:P(ke.Z.font),type:"font",group:"font",disabled:!e.canEditAnnotationCP,className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-Font")},{node:c.createElement(gu.Z,{type:"delete",icon:(0,Mu.KT)(e.annotationToolbarItems),title:P(ke.Z.delete),className:d()("PSPDFKit-Text-Annotation-Toolbar-Button-Delete",Eu().button,Eu().deleteButton,{[Eu().disabledButton]:!v}),onPress:v?()=>e.deleteAnnotation():()=>{}}),type:"delete",hidden:D||null===e.annotation.pageIndex||!!m,disabled:!e.canDeleteSelectedAnnotationCP}],k={className:Eu().button,presentational:e.viewportWidth>Be.GI,disabled:!!m};return c.createElement("div",{ref:n,className:d()("PSPDFKit-Text-Annotation-Toolbar",Eu().content)},c.createElement(Fu,{annotationToolbarItems:e.annotationToolbarItems,builtInItems:C,btnFocusRefIfFocusedItem:e.btnFocusRefIfFocusedItem,onGroupExpansion:e.onGroupExpansion,hasDesktopLayout:e.hasDesktopLayout,expandedGroup:e.expandedGroup,builtInToolbarProps:k,onGroupTransitionEnded:e.onGroupTransitionEnded,position:e.position,typeMap:{color:"text-color","background-color":"fill-color"}}))}));const Dd=xd,Cd=c.forwardRef((function(e,t){const{annotation:n,updateAnnotation:o,intl:r}=e,{formatMessage:i}=r,[a,s]=c.useState(!1),l=c.useCallback((e=>{"Tab"===e.key&&s(!0)}),[s]),u=c.useCallback((()=>{s(!1)}),[s]);return c.createElement("div",{className:Eu().controlWrapper},c.createElement("div",{className:`${Eu().control} PSPDFKit-Note-Annotation-Toolbar-Icons`,role:"radiogroup","aria-label":i(ke.Z.icon),onKeyUp:l,onPointerUp:u,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||s(!1)}},Object.keys(wt.Zi).map(((e,r)=>{const s=wt.Y4[e],l=(0,I.Oe)(s),u=n.icon===e,p=d()(qc().root,Eu().noteIconLabel,Eu().button,Eu().icon,"PSPDFKit-Tool-Button",u&&"PSPDFKit-Tool-Button-active",`PSPDFKit-Note-Annotation-Icon-${l}`,{[Eu().isActive]:u,[Eu().focusRing]:u&&a});return c.createElement("label",{"aria-label":i(kd[`icon${(0,hn.kC)(s)}`]),className:p,key:`NoteAnnotationToolbarIcon-${e}`},c.createElement(Oe.Z,{type:`note/toolbar/${s}`}),c.createElement(q.TX,{tag:"input",type:"radio",name:Eu().radioInput,value:r,checked:u,onChange:t=>{t.target.checked&&o({icon:e})},ref:u&&t?t:void 0}))}))))})),kd=(0,Se.vU)({iconRightPointer:{id:"iconRightPointer",defaultMessage:"Right Pointer",description:"Icon Right Pointer"},iconRightArrow:{id:"iconRightArrow",defaultMessage:"Right Arrow",description:"Icon Right Arrow"},iconCheck:{id:"iconCheck",defaultMessage:"Checkmark",description:"Icon Checkmark"},iconCircle:{id:"iconCircle",defaultMessage:"Circle",description:"Icon Circle"},iconCross:{id:"iconCross",defaultMessage:"Cross",description:"Icon Cross"},iconInsert:{id:"iconInsert",defaultMessage:"Insert Text",description:"Icon Insert Text"},iconNewParagraph:{id:"iconNewParagraph",defaultMessage:"New Paragraph",description:"Icon New Paragraph"},iconNote:{id:"iconNote",defaultMessage:"Text Note",description:"Icon Text Note"},iconComment:{id:"iconComment",defaultMessage:"Comment",description:"Icon Comment"},iconParagraph:{id:"iconParagraph",defaultMessage:"Paragraph",description:"Icon Paragraph"},iconHelp:{id:"iconHelp",defaultMessage:"Help",description:"Icon Help"},iconStar:{id:"iconStar",defaultMessage:"Star",description:"Icon Star"},iconKey:{id:"iconKey",defaultMessage:"Key",description:"Icon Key"}}),Od=c.memo((function(e){let{annotation:t,intl:n,updateAnnotation:o,isAnnotationReadOnly:r,deleteAnnotation:i,position:a,viewportWidth:s,expandedGroup:l,btnFocusRefIfFocusedGroup:u,btnFocusRefIfFocusedItem:p,canEditAnnotationCP:f,canDeleteSelectedAnnotationCP:h,keepSelectedTool:m,interactionMode:g,annotationToolbarItems:v,onGroupExpansion:y,hasDesktopLayout:b,onGroupTransitionEnded:w}=e;const{formatMessage:S}=n,P=rt.Options.NOTE_COLOR_PRESETS,E=r(t)||t.locked,x=E||t instanceof Ar.FN,D=null!==t.pageIndex&&!E,C=m&&g===N.A.NOTE,k=[{node:c.createElement("div",{className:Eu().controlWrapper},c.createElement("div",{className:Eu().control},c.createElement(Wu,{className:"PSPDFKit-Note-Annotation-Toolbar-Color",accessibilityLabel:S(ke.Z.color),colorPresets:P,activeColor:t.color,onClick:e=>o({color:e}),innerRef:u("color")}))),title:S(ke.Z.color),className:`${Eu().formGroup} PSPDFKit-Toolbox PSPDFKit-Toolbox-FillColor`,hidden:x,disabled:!f,onPress:()=>{},type:"color",group:"color",hideSeparator:!0},{node:c.createElement(Cd,{annotation:t,updateAnnotation:o,intl:n,ref:u("note")}),title:S(ke.Z.icon),hidden:x,onPress:()=>{},disabled:!f,className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-NoteIcon"),type:"note-icon",group:"note"},{node:c.createElement(gu.Z,{type:"delete",icon:(0,Mu.KT)(v),title:S(ke.Z.delete),className:d()("PSPDFKit-Note-Annotation-Toolbar-Button-Delete",Eu().button,Eu().deleteButton,{[Eu().disabledButton]:!h}),onPress:h?()=>i():()=>{}}),disabled:!h,hidden:C||!(D&&"note"!==l&&"color"!==l),type:"delete",onPress:()=>{},className:""}];return c.createElement("div",{className:d()("PSPDFKit-Note-Annotation-Toolbar",Eu().content)},c.createElement(Fu,{annotationToolbarItems:v,builtInItems:k,btnFocusRefIfFocusedItem:p,onGroupExpansion:y,builtInToolbarProps:e=>({className:d()(Eu().button,{[Eu().iconOnlyMobile]:"note-icon"===e.type}),presentational:s>Be.GI,disabled:!!l}),hasDesktopLayout:b,expandedGroup:l,onGroupTransitionEnded:w,position:a,typeMap:{"note-icon":"note",color:"fill-color"}}))}));const Ad=Od,Td=["boundingBox"],Id=c.memo((function(e){const t=(0,_r.R9)((t=>{const{annotation:n,isEditing:o,dispatch:r,canEditAnnotationCP:i}=e;if(i)if(n.lines.size>0&&o){const{boundingBox:e}=t,n=(0,ne.Z)(t,Td);r((0,bt.gX)(n)),r((0,Kt.P4)())}else t.lineWidth&&n.lines.size>0&&(t.boundingBox=n.boundingBox.grow((t.lineWidth-n.lineWidth)/2)),e.updateAnnotation(t)})),{annotation:n,intl:o,position:r,isEditing:i,expandedGroup:a,canDeleteSelectedAnnotationCP:s,btnFocusRefIfFocusedGroup:l,lastToolbarActionUsedKeyboard:u,annotationToolbarItems:p,btnFocusRefIfFocusedItem:f}=e,{formatMessage:h}=o,m={onChange:t,record:n,styles:Eu(),intl:o,caretDirection:"bottom"===r?"up":"down",frameWindow:e.frameWindow},g=e.areOnlyElectronicSignaturesEnabled&&e.annotation.isSignature,v=[{node:c.createElement("div",{className:Eu().controlWrapper},c.createElement("div",{className:Eu().control},c.createElement(vu.Z,(0,ue.Z)({},m,{className:"PSPDFKit-Ink-Annotation-Toolbar-Stroke-Color",colorProperty:"strokeColor",removeTransparent:!0,accessibilityLabel:h(ke.Z.color),innerRef:l("color",!a),lastToolbarActionUsedKeyboard:u,annotationToolbarColorPresets:e.annotationToolbarColorPresets})))),title:h(ke.Z.color),className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-StrokeColor"),hidden:g,disabled:!e.canEditAnnotationCP,type:"stroke-color",group:"color"},{node:c.createElement("div",{className:Eu().controlWrapper},c.createElement("div",{className:Eu().control},c.createElement(vu.Z,(0,ue.Z)({},m,{accessibilityLabel:h(ke.Z.fillColor),className:"PSPDFKit-Ink-Annotation-Toolbar-Background-Color",colorProperty:"backgroundColor",innerRef:l("backgroundColor"),annotationToolbarColorPresets:e.annotationToolbarColorPresets})))),title:h(ke.Z.fillColor),className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-FillColor"),hidden:g,disabled:!e.canEditAnnotationCP,type:"fill-color",group:"backgroundColor"},{node:c.createElement(mu.OpacityComponent,{intl:e.intl,type:"Ink",styles:Eu(),annotation:n,updateAnnotation:t,caretDirection:"bottom"===r?"up":"down",innerRef:l("opacity")}),title:h(ke.Z.opacity),className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-Opacity"),hidden:g,disabled:!e.canEditAnnotationCP,type:"opacity",group:"opacity"},{node:c.createElement(mu.StrokeWidthComponent,{intl:e.intl,type:"Ink",styles:Eu(),annotation:n,updateAnnotation:t,caretDirection:"bottom"===r?"up":"down",accessibilityLabel:h(ke.Z.thickness),ref:l("lineWidth")}),title:h(ke.Z.thickness),className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-LineWidth"),hidden:g,disabled:!e.canEditAnnotationCP,type:"line-width",group:"lineWidth"},{node:c.createElement("div",{className:Eu().controlWrapper},c.createElement("div",{className:Eu().control},c.createElement(Hu,{value:n.blendMode,className:"PSPDFKit-Ink-Annotation-Toolbar-Blend-Mode",onChange:e=>t({blendMode:e}),caretDirection:"bottom"===r?"up":"down",frameWindow:e.frameWindow,ref:l("blendMode")}))),title:h(ke.Z.blendMode),className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-BlendMode"),hidden:g,disabled:!e.canEditAnnotationCP,type:"blend-mode",group:"blendMode"},{node:c.createElement(gu.Z,{type:"delete",icon:(0,Mu.KT)(p),title:h(ke.Z.delete),className:d()("PSPDFKit-Ink-Annotation-Toolbar-Button-Delete",Eu().button,Eu().deleteButton,{[Eu().disabledButton]:!s}),onPress:s?()=>e.deleteAnnotation():()=>{}}),disabled:!s,hidden:!(null!=e.annotation.pageIndex&&!i),type:"delete"},{node:c.createElement(xu,{intl:o,isEditing:i,showAnnotationNotes:e.showAnnotationNotes,hasAnnotationNote:e.hasAnnotationNote,isAnnotationNoteActive:e.isAnnotationNoteActive,onAnnotationNotePress:e.onAnnotationNotePress,disabled:!e.canEditAnnotationCP}),hidden:e.areOnlyElectronicSignaturesEnabled||!e.showAnnotationNotes||i,disabled:!e.canEditAnnotationCP,type:"annotation-note"}],y={className:Eu().button,presentational:e.viewportWidth>Be.GI,disabled:!!a};return c.createElement("div",{className:d()("PSPDFKit-Ink-Annotation-Toolbar",Eu().content)},c.createElement(Fu,{annotationToolbarItems:p,builtInItems:v,btnFocusRefIfFocusedItem:f,onGroupExpansion:e.onGroupExpansion,builtInToolbarProps:y,hasDesktopLayout:e.hasDesktopLayout,expandedGroup:a,onGroupTransitionEnded:e.onGroupTransitionEnded,position:r}))}));const Fd=Id;var Md=n(93092),_d=n(34855),Nd=n(63564);const Rd=function(e){const{intl:t,position:n,annotation:o,expandedGroup:r,btnFocusRefIfFocusedItem:i,annotationToolbarItems:a,hasDesktopLayout:s,btnFocusRefIfFocusedGroup:l,lastToolbarActionUsedKeyboard:u,name:p,canDeleteSelectedAnnotationCP:f}=e,h=(0,_r.R9)((t=>{const{annotation:n,canEditAnnotationCP:o}=e;o&&(t.strokeWidth&&(t.boundingBox=n.boundingBox.grow((t.strokeWidth-n.strokeWidth)/2)),e.updateAnnotation(t))})),m=o instanceof w.b3||o instanceof w.Xs?e.updateAnnotation:h,g=o instanceof w.o9||o instanceof w.om,{formatMessage:v}=t,y={updateAnnotation:m,annotation:o,styles:Eu(),intl:t,caretDirection:"bottom"===n?"up":"down"},b=[{node:c.createElement(vu.Z,(0,ue.Z)({},y,{record:e.annotation,colorProperty:"strokeColor",onChange:e.updateAnnotation,className:`PSPDFKit-${p}-Annotation-Toolbar-Stroke-Color`,removeTransparent:!0,frameWindow:e.frameWindow,accessibilityLabel:v(ke.Z.color),innerRef:l("color",!r),lastToolbarActionUsedKeyboard:u,annotationToolbarColorPresets:e.annotationToolbarColorPresets})),title:v(ke.Z.color),group:"color",type:"stroke-color",disabled:!e.canEditAnnotationCP,className:d()(Eu().formGroup,"PSPDFKit-Toolbox",{"PSPDFKit-Toolbox-BorderColor":!g,"PSPDFKit-Toolbox-StrokeColor":g})},{node:c.createElement(vu.Z,(0,ue.Z)({},y,{record:o,colorProperty:"fillColor",onChange:e.updateAnnotation,className:`PSPDFKit-${p}-Annotation-Toolbar-Fill-Color`,frameWindow:e.frameWindow,accessibilityLabel:v(ke.Z.fillColor),innerRef:l("fillColor"),annotationToolbarColorPresets:e.annotationToolbarColorPresets})),title:v(ke.Z.fillColor),group:"fillColor",type:"fill-color",disabled:!e.canEditAnnotationCP,className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-FillColor")},{node:c.createElement(mu.OpacityComponent,(0,ue.Z)({},y,{type:p,innerRef:l("opacity")})),title:v(ke.Z.opacity),group:"opacity",type:"opacity",disabled:!e.canEditAnnotationCP,className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-Opacity")},{node:c.createElement(mu.StrokeWidthComponent,(0,ue.Z)({},y,{type:p,accessibilityLabel:v(ke.Z.thickness),ref:l("line-width")})),title:v(ke.Z.thickness),group:"line-width",type:"line-width",disabled:!e.canEditAnnotationCP,className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-LineWidth")},...o instanceof w.o9||o instanceof w.om?[{node:c.createElement(mu.LineCapsDashArrayComponent,(0,ue.Z)({},y,{frameWindow:e.frameWindow,innerRef:l("linecaps-dasharray")})),title:v(ke.Z["linecaps-dasharray"]),group:"linecaps-dasharray",type:"linecaps-dasharray",disabled:!e.canEditAnnotationCP,className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-LineCaps-DashArray")}]:[{node:c.createElement(mu.LineStyleComponent,(0,ue.Z)({},y,{frameWindow:e.frameWindow,innerRef:l("linestyle")})),title:v(ke.Z.linestyle),group:"linestyle",type:"line-style",disabled:!e.canEditAnnotationCP,className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-LineStyle")}],{node:c.createElement(gu.Z,{type:"delete",icon:(0,Mu.KT)(a),title:v(ke.Z.delete),className:d()(`PSPDFKit-${p}-Annotation-Toolbar-Button-Delete`,Eu().button,Eu().deleteButton,{[Eu().disabledButton]:!f}),onPress:f?()=>e.deleteAnnotation():()=>{}}),type:"delete",hidden:null===e.annotation.pageIndex||!!r},{node:c.createElement(xu,{intl:e.intl,isEditing:e.isEditing,showAnnotationNotes:e.showAnnotationNotes,hasAnnotationNote:e.hasAnnotationNote,isAnnotationNoteActive:e.isAnnotationNoteActive,onAnnotationNotePress:e.onAnnotationNotePress,disabled:!e.canEditAnnotationCP}),type:"annotation-note",hidden:!e.showAnnotationNotes||e.isEditing}],S={className:Eu().button,presentational:e.viewportWidth>Be.GI,disabled:!!r},P={"line-style":"linestyle"};return o instanceof w.o9||o instanceof w.om||(P["stroke-color"]="border-color"),c.createElement("div",{className:d()(`PSPDFKit-${p}-Annotation-Toolbar`,Eu().content)},c.createElement(Fu,{annotationToolbarItems:a,builtInItems:b,btnFocusRefIfFocusedItem:i,onGroupExpansion:e.onGroupExpansion,builtInToolbarProps:S,hasDesktopLayout:s,expandedGroup:r,onGroupTransitionEnded:e.onGroupTransitionEnded,position:n,typeMap:P}))},Ld=c.memo((function(e){const{formatMessage:t}=e.intl,n=[{node:c.createElement(gu.Z,{type:"widget_ccw",title:t(ke.Z.rotateCounterclockwise),className:`PSPDFKit-Widget-Annotation-Toolbar-Button-Rotate PSPDFKit-Widget-Annotation-Toolbar-Button-Rotate-Counterclockwise ${Eu().button} ${Eu().rotateButton}`,onPress:()=>{e.selectedAnnotationPageSize&&e.updateAnnotation((0,_.eJ)(e.annotation,e.selectedAnnotationPageSize,_.z1.COUNTERCLOCKWISE))}}),type:"counterclockwise-rotation",disabled:!e.canEditAnnotationCP},{node:c.createElement(gu.Z,{type:"widget_cw",title:t(ke.Z.rotateClockwise),className:`PSPDFKit-Widget-Annotation-Toolbar-Button-Rotate PSPDFKit-Widget-Toolbar-Button-Rotate-Clockwise ${Eu().button} ${Eu().rotateButton}`,onPress:()=>{e.selectedAnnotationPageSize&&e.updateAnnotation((0,_.eJ)(e.annotation,e.selectedAnnotationPageSize,_.z1.CLOCKWISE))}}),type:"clockwise-rotation",disabled:!e.canEditAnnotationCP},{node:c.createElement(gu.Z,{type:"delete",icon:(0,Mu.KT)(e.annotationToolbarItems),title:t(ke.Z.delete),className:d()("PSPDFKit-Widget-Annotation-Toolbar-Button-Delete",Eu().button,Eu().deleteButton,{[Eu().disabledButton]:!e.canDeleteSelectedAnnotationCP}),onPress:e.canDeleteSelectedAnnotationCP?()=>e.deleteAnnotation():()=>{}}),type:"delete",hidden:null===e.annotation.pageIndex}];return c.createElement("div",{className:`PSPDFKit-Widget-Annotation-Toolbar ${Eu().content}`},c.createElement(Fu,{annotationToolbarItems:e.annotationToolbarItems,builtInItems:n,btnFocusRefIfFocusedItem:e.btnFocusRefIfFocusedItem,onGroupExpansion:e.onGroupExpansion,hasDesktopLayout:e.hasDesktopLayout,expandedGroup:e.expandedGroup,onGroupTransitionEnded:e.onGroupTransitionEnded,position:e.position}))}));const Bd=c.memo((function(e){const t=(0,Se.YB)(),n=(0,_r.R9)((t=>{const{canEditAnnotationCP:n}=e;n&&e.updateAnnotation(t)})),{annotation:o,position:r,expandedGroup:i,canDeleteSelectedAnnotationCP:a,btnFocusRefIfFocusedGroup:s,annotationToolbarItems:l,btnFocusRefIfFocusedItem:u,lastToolbarActionUsedKeyboard:p}=e,f={onChange:n,record:o,styles:Eu(),intl:t,caretDirection:"bottom"===r?"up":"down",frameWindow:e.frameWindow},h=e.annotation.isSignature,m=[{node:c.createElement("div",{className:Eu().controlWrapper},c.createElement("div",{className:Eu().control},c.createElement(vu.Z,(0,ue.Z)({},f,{className:"PSPDFKit-Link-Annotation-Toolbar-Border-Color",colorProperty:"borderColor",accessibilityLabel:t.formatMessage(ke.Z.color),innerRef:s("color",!i),lastToolbarActionUsedKeyboard:p,annotationToolbarColorPresets:e.annotationToolbarColorPresets})))),title:t.formatMessage(ke.Z.borderColor),className:d()(Eu().formGroup,"PSPDFKit-Toolbox","PSPDFKit-Toolbox-BorderColor"),hidden:h,disabled:!e.canEditAnnotationCP,type:"stroke-color",group:"color"},{node:c.createElement(mu.OpacityComponent,{intl:e.intl,type:"Link",styles:Eu(),annotation:o,updateAnnotation:n,caretDirection:"bottom"===r?"up":"down",innerRef:s("opacity")}),title:t.formatMessage(ke.Z.opacity),className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-Opacity"),hidden:h,disabled:!e.canEditAnnotationCP,type:"opacity",group:"opacity"},{node:c.createElement(mu.StrokeWidthComponent,{intl:e.intl,type:"Link",styles:Eu(),annotation:o,updateAnnotation:n,caretDirection:"bottom"===r?"up":"down",accessibilityLabel:t.formatMessage(ke.Z.thickness),ref:s("lineWidth")}),title:t.formatMessage(ke.Z.thickness),className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-LineWidth"),hidden:h,disabled:!e.canEditAnnotationCP,type:"line-width",group:"lineWidth"},{node:c.createElement(gu.Z,{type:"delete",icon:(0,Mu.KT)(l),title:t.formatMessage(ke.Z.delete),className:d()("PSPDFKit-Link-Annotation-Toolbar-Button-Delete",Eu().button,Eu().deleteButton,{[Eu().disabledButton]:!a}),onPress:a?()=>e.deleteAnnotation():()=>{}}),disabled:!a,hidden:null===e.annotation.pageIndex||!!i,type:"delete"}],g={className:Eu().button,presentational:e.viewportWidth>Be.GI,disabled:!!i};return c.createElement("div",{className:d()("PSPDFKit-Link-Annotation-Toolbar",Eu().content)},c.createElement(Fu,{annotationToolbarItems:l,builtInItems:m,btnFocusRefIfFocusedItem:u,onGroupExpansion:e.onGroupExpansion,builtInToolbarProps:g,hasDesktopLayout:e.hasDesktopLayout,expandedGroup:i,onGroupTransitionEnded:e.onGroupTransitionEnded,position:r}))}));const jd=Bd;var zd=n(82405),Kd=n(9599),Zd=n(68073),Ud=n.n(Zd),Vd=n(94505);const Gd=function(e){const{intl:t,position:n,annotation:o,expandedGroup:r,btnFocusRefIfFocusedItem:i,annotationToolbarItems:s,hasDesktopLayout:l,btnFocusRefIfFocusedGroup:u,lastToolbarActionUsedKeyboard:p,canDeleteSelectedAnnotationCP:f,selectedAnnotations:h}=e,m=(0,a.I0)(),g=(0,a.v9)((e=>e.secondaryMeasurementUnit)),v=c.useMemo((()=>e.selectedAnnotations&&e.selectedAnnotations.size>1),[e.selectedAnnotations]),y=c.useMemo((()=>!!h&&(0,k.xA)(h)),[h]),b=c.useMemo((()=>(0,k.bs)(o)),[o]),S=(0,_r.R9)((t=>{const{annotation:n,canEditAnnotationCP:o}=e;if(o){if(t.strokeWidth){if(v&&h){const o=[];return h.forEach((e=>{o.push({boundingBox:e.boundingBox.grow((t.strokeWidth-n.strokeWidth)/2),strokeWidth:t.strokeWidth})})),void e.updateAnnotation(o)}t.boundingBox=n.boundingBox.grow((t.strokeWidth-n.strokeWidth)/2)}e.updateAnnotation(t)}})),P=o instanceof w.b3||o instanceof w.Xs?e.updateAnnotation:S,E=o instanceof w.o9||o instanceof w.om,{formatMessage:x}=t,D={updateAnnotation:P,annotation:o,styles:Eu(),intl:t,caretDirection:"bottom"===n?"up":"down"},C=k.Di.find((e=>e.title===b)),O=c.useMemo((()=>(0,k.Rw)(o,g)),[o,g]),A=[{node:c.createElement(gu.Z,{type:"back",title:x(ke.Z.back),className:d()(`PSPDFKit-${b}-Annotation-Toolbar-Button-Back`,Eu().button,Eu().measurementBackButton),onPress:()=>{(0,a.dC)((()=>{m((0,De.fz)()),m((0,bt.Ds)("measurement")),m((0,Kt.BR)())}))}}),type:"back"},{node:y?c.createElement(Vd.Z,{key:x(ke.Z.mixedMeasurements),type:"measure",title:x(ke.Z.mixedMeasurements),className:d()(C.className,Ud().measurementValue,Eu().measurementToolbarButton,"PSPDFKit-Annotation-Toolbar-Measurement")},o&&null!=o&&o.note?c.createElement(c.Fragment,null,x(ke.Z.mixedMeasurements)):null):c.createElement(Vd.Z,{key:C.interactionMode,type:C.icon,title:x(ke.Z[C.localeKey]),className:d()(C.className,Ud().measurementValue,Eu().measurementToolbarButton,"PSPDFKit-Annotation-Toolbar-Measurement")},o&&null!=o&&o.note?v?c.createElement(c.Fragment,null,C.title):c.createElement(c.Fragment,null,C.title,":"," ",c.createElement("b",null,o.note,O?` (${O.label})`:"")):null),title:x(ke.Z[C.localeKey]),type:"measurementType",className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-MeasurementType")},{node:c.createElement(c.Fragment,null,c.createElement(Vd.Z,{key:"scale",type:"scale",title:x(fc.sY.measurementScale),className:d()(Eu().measurementToolbarButton)}),c.createElement(Kd.ZP,{frameWindow:e.frameWindow,selectedAnnotation:o,onAnnotationScaleUpdate:e.updateAnnotation,selectedAnnotations:e.selectedAnnotations})),title:x(fc.sY.measurementScale),type:"measurementScale",className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-MeasurementScale")},{node:c.createElement(vu.Z,(0,ue.Z)({},D,{record:e.annotation,colorProperty:"strokeColor",onChange:e.updateAnnotation,className:`PSPDFKit-${b}-Annotation-Toolbar-Stroke-Color`,frameWindow:e.frameWindow,accessibilityLabel:x(ke.Z.color),innerRef:u("color",!r),lastToolbarActionUsedKeyboard:p,annotationToolbarColorPresets:e.annotationToolbarColorPresets})),title:x(ke.Z.color),group:"color",type:"stroke-color",disabled:!e.canEditAnnotationCP,className:d()(Eu().formGroup,"PSPDFKit-Toolbox",{"PSPDFKit-Toolbox-BorderColor":!E,"PSPDFKit-Toolbox-StrokeColor":E})},{node:c.createElement(mu.OpacityComponent,(0,ue.Z)({},D,{type:b,innerRef:u("opacity")})),title:x(ke.Z.opacity),group:"opacity",type:"opacity",disabled:!e.canEditAnnotationCP,className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-Opacity")},{node:c.createElement(mu.StrokeWidthComponent,(0,ue.Z)({},D,{type:b,accessibilityLabel:x(ke.Z.thickness),ref:u("line-width")})),title:x(ke.Z.thickness),group:"line-width",type:"line-width",disabled:!e.canEditAnnotationCP,className:d()(Eu().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-LineWidth")},{node:c.createElement(gu.Z,{type:"delete",icon:(0,Mu.KT)(s),title:x(ke.Z.delete),className:d()(`PSPDFKit-${b}-Annotation-Toolbar-Button-Delete`,Eu().button,Eu().deleteButton,{[Eu().disabledButton]:!f}),onPress:f?()=>e.deleteAnnotation():()=>{}}),type:"delete",hidden:null===e.annotation.pageIndex||!!r},{node:c.createElement(xu,{intl:e.intl,isEditing:e.isEditing,showAnnotationNotes:e.showAnnotationNotes,hasAnnotationNote:e.hasAnnotationNote,isAnnotationNoteActive:e.isAnnotationNoteActive,onAnnotationNotePress:e.onAnnotationNotePress,disabled:!e.canEditAnnotationCP||v}),type:"annotation-note",hidden:!e.showAnnotationNotes||e.isEditing}],T={className:Eu().button,presentational:e.viewportWidth>Be.GI,disabled:!!r},I={"line-style":"linestyle"};return o instanceof w.o9||o instanceof w.om||(I["stroke-color"]="border-color"),c.createElement("div",{className:d()(`PSPDFKit-${b}-Annotation-Toolbar`,Eu().content,Eu().measurementToolbar)},c.createElement(Fu,{annotationToolbarItems:s,builtInItems:A,btnFocusRefIfFocusedItem:i,onGroupExpansion:e.onGroupExpansion,builtInToolbarProps:T,hasDesktopLayout:l,expandedGroup:r,onGroupTransitionEnded:e.onGroupTransitionEnded,position:n,typeMap:I}))},Wd=["text"];class qd extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"state",{showConfirmDelete:!1,expandedGroup:null,transitionFinished:!1,prevActiveGroup:null}),(0,o.Z)(this,"focusRef",c.createRef()),(0,o.Z)(this,"deleteAnnotation",(()=>{var e;const t=this.props.annotation,n=this.props.selectedAnnotations&&(null===(e=this.props.selectedAnnotations)||void 0===e?void 0:e.size)>1;t&&!n?this.props.dispatch((0,bt.d8)((0,i.l4)([t.id]))):n&&this.props.selectedAnnotations&&this.props.dispatch((0,bt.d8)(this.props.selectedAnnotations.map((e=>e.id))))})),(0,o.Z)(this,"handleEntered",(()=>{this.setState({transitionFinished:!0})})),(0,o.Z)(this,"handleGroupExpansion",(e=>{e?this.setState({prevActiveGroup:e,expandedGroup:e}):this.setState({expandedGroup:e,transitionFinished:!1})})),(0,o.Z)(this,"_handleKeyPress",(e=>{e.keyCode===Zo.zz&&this.state.expandedGroup&&this.handleGroupExpansion()})),(0,o.Z)(this,"updateAnnotation",((e,t,n)=>{if(!e||!this.props.canEditAnnotationCP)return;e=e.merge(t);const o={annotations:(0,i.aV)([e]),reason:Q.f.PROPERTY_CHANGE};this.props.eventEmitter.emit("annotations.willChange",o),n&&this.props.dispatch((0,bt.Ds)(n));const{text:r}=t,a=(0,ne.Z)(t,Wd);this.props.dispatch((0,bt.gX)(a)),this.props.dispatch((0,bt.FG)(e))})),(0,o.Z)(this,"updateSingleAnnotation",((e,t)=>{const n=this.props.annotation;this.updateAnnotation(n,e,t)})),(0,o.Z)(this,"updateAnnotations",((e,t)=>{const{selectedAnnotations:n}=this.props;n&&(null==n?void 0:n.size)>1&&(0,a.dC)((()=>{var n;null===(n=this.props.selectedAnnotations)||void 0===n||n.toList().forEach(((n,o)=>{Array.isArray(e)?this.updateAnnotation(n,e[o],t):this.updateAnnotation(n,e,t)}))}))})),(0,o.Z)(this,"onAnnotationNotePress",(()=>{const e=this.props.annotation;if(this.isActiveAnnotationNote())this.closeAnnotationNote();else if(e){const t=(0,Ar.Yu)(e);this.props.dispatch((0,De.mv)(t))}})),(0,o.Z)(this,"deleteAnnotationNote",(()=>{const e=this.props.annotation;e&&(this.props.dispatch((0,bt.FG)(e.delete("note"))),this.closeAnnotationNote())})),(0,o.Z)(this,"closeAnnotationNote",(()=>{this.props.dispatch((0,De.mv)(null))})),(0,o.Z)(this,"_handleResize",(e=>{this.props.dispatch((0,Md.LT)(e.height))}))}isActiveAnnotationNote(){var e;const{activeAnnotationNote:t,annotation:n}=this.props;return Boolean(t&&n&&(null===(e=t.parentAnnotation)||void 0===e?void 0:e.id)===n.id)}defaultToolbarItems(){var e;const{annotation:t,annotationToolbarItems:n,viewportWidth:o}=this.props;if((0,s.kG)(t),!Nd.qH.get($d(t)))return(0,i.aV)();const r=o>Be.GI,a=null===(e=Nd.qH.get($d(t)))||void 0===e||null===(e=e.get(r?"desktop":"mobile"))||void 0===e?void 0:e.map((e=>({type:e})));if((0,s.kG)(a,`No default toolbar items found for annotation type: ${$d(t)}`),n){const e=n(t,{hasDesktopLayout:r,defaultAnnotationToolbarItems:a.toJS()});if(e)return e.forEach((e=>{(0,Nd.gb)(e,$d(t))})),(0,i.aV)(e)}return a}renderContent(){var e,t=this;const{annotation:n,variantAnnotationPresetID:o,position:r,viewportWidth:i,frameWindow:a,intl:l,showAnnotationNotes:u,canEditAnnotationCP:d,canDeleteSelectedAnnotationCP:p,lastToolbarActionUsedKeyboard:f,interactionMode:h,keepSelectedTool:m,annotationToolbarColorPresets:g,richTextEditorRef:v,customFontsReadableNames:y,isCalibratingScale:b}=this.props;if(!n)return null;const S={deleteAnnotation:this.deleteAnnotation,updateAnnotation:this.props.selectedAnnotations&&(null===(e=this.props.selectedAnnotations)||void 0===e?void 0:e.size)>1?this.updateAnnotations:this.updateSingleAnnotation,intl:l,position:r,viewportWidth:i,onGroupTransitionEnded:this.handleEntered,onGroupExpansion:this.handleGroupExpansion,expandedGroup:this.state.expandedGroup,btnFocusRefIfFocusedGroup:function(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,Mu.CN)(e,t.state.expandedGroup)||n&&null!==h&&i>Be.GI?t.focusRef:void 0},btnFocusRefIfFocusedItem:function(e,n){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,Mu.Kt)(e,n,t.state.prevActiveGroup)||o&&null!==h&&i<Be.GI?t.focusRef:void 0},frameWindow:a,canEditAnnotationCP:d,canDeleteSelectedAnnotationCP:p,annotation:n,lastToolbarActionUsedKeyboard:f,annotationToolbarColorPresets:g,annotationToolbarItems:this.defaultToolbarItems(),hasDesktopLayout:i>Be.GI,customFontsReadableNames:this.props.customFontsReadableNames},P={onAnnotationNotePress:this.onAnnotationNotePress,showAnnotationNotes:u&&!n.isCommentThreadRoot,hasAnnotationNote:Boolean(n.note),isAnnotationNoteActive:this.isActiveAnnotationNote()};return n instanceof $.Z?c.createElement(Lu,(0,ue.Z)({},S,P,{annotation:n,isEditing:this.props.selectedAnnotationMode===R.o.EDITING,dispatch:this.props.dispatch,keepSelectedTool:m})):n instanceof w.R1?c.createElement(jd,(0,ue.Z)({},S,P,{annotation:n})):n instanceof w.On?c.createElement(Qu,(0,ue.Z)({},S,P,{annotation:n,isEditing:this.props.selectedAnnotationMode===R.o.EDITING,dispatch:this.props.dispatch,variantAnnotationPresetID:o})):n instanceof w.Zc?c.createElement(Fd,(0,ue.Z)({},S,P,{annotation:n,isEditing:this.props.selectedAnnotationMode===R.o.EDITING,dispatch:this.props.dispatch,areOnlyElectronicSignaturesEnabled:this.props.areOnlyElectronicSignaturesEnabled})):n instanceof zd.Z&&n.isMeasurement()?b?null:c.createElement(Gd,(0,ue.Z)({},S,P,{annotation:n,dispatch:this.props.dispatch,isEditing:this.props.selectedAnnotationMode===R.o.EDITING,selectedAnnotations:this.props.selectedAnnotations})):n instanceof w.o9?c.createElement(Rd,(0,ue.Z)({},S,P,{annotation:n,isEditing:this.props.selectedAnnotationMode===R.o.EDITING,name:"Line"})):n instanceof w.b3?c.createElement(Rd,(0,ue.Z)({},S,P,{annotation:n,isEditing:this.props.selectedAnnotationMode===R.o.EDITING,name:"Rectangle"})):n instanceof w.Xs?c.createElement(Rd,(0,ue.Z)({},S,P,{annotation:n,isEditing:this.props.selectedAnnotationMode===R.o.EDITING,name:"Ellipse"})):n instanceof w.Hi?c.createElement(Rd,(0,ue.Z)({},S,P,{annotation:n,isEditing:this.props.selectedAnnotationMode===R.o.EDITING,name:"Polygon"})):n instanceof w.om?c.createElement(Rd,(0,ue.Z)({},S,P,{annotation:n,isEditing:this.props.selectedAnnotationMode===R.o.EDITING,name:"Polyline"})):n instanceof w.gd?c.createElement(Dd,(0,ue.Z)({},S,{annotation:n,richTextEditorRef:v,selectedAnnotationPageSize:this.props.selectedAnnotationPageSize,zoomLevel:this.props.zoomLevel||1,keepSelectedTool:m,interactionMode:h,customFontsReadableNames:y})):n instanceof w.Qi?c.createElement(Ad,(0,ue.Z)({},S,{annotation:n,dispatch:this.props.dispatch,isAnnotationReadOnly:this.props.isAnnotationReadOnly,keepSelectedTool:m,interactionMode:h})):n instanceof w.sK?c.createElement(Ku,(0,ue.Z)({},S,P,{annotation:n,areOnlyElectronicSignaturesEnabled:this.props.areOnlyElectronicSignaturesEnabled,selectedAnnotationPageSize:this.props.selectedAnnotationPageSize})):n instanceof w.GI?c.createElement(ju,(0,ue.Z)({},S,P,{annotation:n})):n instanceof w.x_?c.createElement(Ld,(0,ue.Z)({},S,{annotation:n,selectedAnnotationPageSize:this.props.selectedAnnotationPageSize})):n instanceof w.Jn?null:void(0,s.kG)(!1,"Annotation type not handled")}componentDidUpdate(e,t){const n=this.state.expandedGroup&&this.state.transitionFinished&&!t.transitionFinished,o=!this.state.expandedGroup&&t.expandedGroup&&this.state.prevActiveGroup;(n||o)&&this.focusRef.current&&this.focusRef.current.focus()}render(){return c.createElement("div",{className:d()("PSPDFKit-Annotation-Toolbar",Eu().root,{[Eu().stickToBottom]:"bottom"===this.props.position}),onKeyDown:this._handleKeyPress},c.createElement(_d.Z,{onResize:this._handleResize}),this.renderContent())}}const Hd=(0,Se.XN)(qd);function $d(e){var t;return"isMeasurement"in e&&null!==(t=e.isMeasurement)&&void 0!==t&&t.call(e)?"Measurement":Nd.qH.get(e.constructor.readableName)?e.constructor.readableName:e instanceof w.On?w.On.readableName:e instanceof w.x_?w.x_.readableName:void new s.p2("AnnotationToolbarComponent: getReadableName: Annotation type not handled")}function Xd(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}const Yd=c.memo((function(e){let{intl:t,dispatch:n,inkEraserCursorWidth:o,position:r,viewportWidth:i}=e;const{handleGroupExpansion:a,handleEntered:s,expandedGroup:l,prevActiveGroup:u,btnFocusRef:p}=(0,_r.Tp)(),[f,h]=c.useState(o);c.useEffect((()=>{n((0,bt.GT)(f))}),[f,n]),c.useEffect((()=>{h(o)}),[o]);const m=c.useCallback((e=>{n((0,bt.gX)({inkEraserWidth:e})),h(e)}),[n]),g=c.useCallback((e=>{e.keyCode===Zo.zz&&l&&a()}),[l,a]),{formatMessage:v}=t,y={lineWidth:{node:c.createElement("div",{className:Eu().controlWrapper},c.createElement("div",{className:Eu().control},c.createElement(uu.Z,{name:"lineWidth",accessibilityLabel:v(ke.Z.size),className:"PSPDFKit-Ink-Eraser-Toolbar-Line-Width",value:f,valueLabel:e=>v(ke.Z.numberInPt,{arg0:e.toFixed(0)}),min:1,max:40,step:1,onChange:m,caretDirection:"bottom"===r?"up":"down",innerRef:(0,Mu.CN)("lineWidth",l)?p:void 0}))),title:v(ke.Z.thickness)}};return c.createElement("div",{className:d()("PSPDFKit-Annotation-Toolbar",Eu().root,{[Eu().stickToBottom]:"bottom"===r}),onMouseUp:Xd,onTouchEnd:Xd,onPointerUp:Xd,onKeyDown:g},c.createElement("div",{className:`\n PSPDFKit-Ink-Eraser-Toolbar\n ${Eu().content}\n\n `},c.createElement("div",{className:Eu().left},c.createElement("form",{className:Eu().form,onSubmit:ar.PF},c.createElement("div",{className:`${Eu().formGroup} PSPDFKit-Toolbox PSPDFKit-Toolbox-LineWidth`},c.createElement(gu.Z,{type:"line-width",title:y.lineWidth.title,className:Eu().button,onPress:()=>a("lineWidth"),disabled:Boolean(l),presentational:i>Be.GI,ref:(0,Mu.Kt)("lineWidth",l,u)?p:void 0}),y.lineWidth.node))),c.createElement("div",{className:Eu().right},c.createElement(ku.Z,{position:r,onClose:()=>a(null),isPrimary:!1,onEntered:s,accessibilityLabel:l?y[l].title:void 0},l?y[l].node:void 0))))})),Jd=(0,Se.XN)(Yd);var Qd=n(50653),ep=n.n(Qd);const tp=(0,a.$j)((e=>({connectionFailureReason:e.connectionFailureReason})),(()=>({})))((e=>c.createElement("div",{className:`PSPDFKit-Error ${ep().root}`},c.createElement("div",{className:`PSPDFKit-Error-Box ${ep().box}`},c.createElement("div",{className:ep().error},c.createElement(Re.Z,{src:n(58054),className:ep().icon})),c.createElement("div",{className:`PSPDFKit-Error-Message ${ep().errorMessage}`},c.createElement("p",null,null!=e.connectionFailureReason?e.connectionFailureReason:c.createElement(c.Fragment,null,"An error occurred while loading the document. Try"," ",c.createElement("a",{href:"#",onClick:()=>window.location.reload()},"reloading the page"),".")))))));var np,op=n(28890),rp=n(55733),ip=n.n(rp);const ap={timeout:300,classNames:{enter:ip().unlockEnter,enterActive:ip().unlockEnterActive,exit:ip().unlockExit,exitActive:ip().unlockExitActive}};class sp extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"_modalRef",c.createRef()),(0,o.Z)(this,"_inputRef",c.createRef()),(0,o.Z)(this,"state",{value:"",isIncorrectPassword:!1,inputShowError:!1}),(0,o.Z)(this,"_onConfirm",(()=>{this.props.resolvePassword&&this.props.resolvePassword(this.state.value)})),(0,o.Z)(this,"_onChange",(e=>{const{value:t}=e.currentTarget;this.setState({value:t,inputShowError:!1})}))}componentDidUpdate(e){e.resolvePassword===this.props.resolvePassword||this.props.unlocked||(this._modalRef.current&&this._modalRef.current.shake(),this._inputRef.current&&this._inputRef.current.focus(),this.setState({isIncorrectPassword:!0,inputShowError:!0}))}render(){const{unlocked:e}=this.props,{isIncorrectPassword:t,inputShowError:o}=this.state,{formatMessage:r}=this.props.intl;return c.createElement(op.Z,{role:"dialog",onEnter:this._onConfirm,background:"rgba(0,0,0,.1)",className:d()("PSPDFKit-Password-Dialog",ip().container),accessibilityLabel:r(lp.password),accessibilityDescription:r(lp.passwordAccessibilityDescription),innerRef:this._modalRef},c.createElement("div",{className:"PSPDFKit-Password-Dialog-Content"},c.createElement(op.Z.Section,null,c.createElement(q.M5,null,c.createElement("div",{className:ip().iconBox},c.createElement(pc.Z,null,e?c.createElement(dc.Z,(0,ue.Z)({},ap,{key:"unlock"}),c.createElement(Re.Z,{src:n(96242),className:d()(ip().icon,ip()["icon-success"])})):c.createElement(dc.Z,(0,ue.Z)({},ap,{key:"lock"}),c.createElement(Re.Z,{src:n(65883),className:d()({[ip().icon]:!0,[ip()["icon-regular"]]:!t,[ip()["icon-error"]]:t})})))))),c.createElement(q.z,null,r(lp.passwordRequired)),c.createElement(op.Z.Section,null,c.createElement(q.xv,null,r(lp.unlockDocumentDescription))),c.createElement(q.oi,{name:"password",value:this.state.value,onChange:this._onChange,"aria-label":r(lp.password),autoFocus:!0,selectTextOnFocus:!0,disabled:e,secureTextEntry:!0,error:o,success:e,ref:this._inputRef})),t&&!e?c.createElement(op.Z.Section,{className:ip().alert,spaced:!0},r(lp.incorrectPassword)):np||(np=c.createElement(op.Z.Divider,null)),c.createElement("div",{className:d()("PSPDFKit-Password-Dialog-Buttons",ip().dialogButtons)},c.createElement(q.hE,{className:"PSPDFKit-Confirm-Dialog-Buttons"},c.createElement(q.zx,{onClick:this._onConfirm,primary:!0,className:"PSPDFKit-Confirm-Dialog-Button PSPDFKit-Confirm-Dialog-Button-Confirm"},r(lp.unlock)))))}}const lp=(0,Se.vU)({password:{id:"password",defaultMessage:"Password",description:"Text on a label"},passwordAccessibilityDescription:{id:"passwordAccessibilityDescription",defaultMessage:"Dialog prompting for a password to unlock the document",description:"Accessibility description for password modal"},passwordRequired:{id:"passwordRequired",defaultMessage:"Password Required",description:"Title of the modal to indicate a password is required"},unlockDocumentDescription:{id:"unlockDocumentDescription",defaultMessage:"You have to unlock this document to view it. Please enter the password in the field below.",description:"Label of the password prompt"},incorrectPassword:{id:"incorrectPassword",defaultMessage:"The password you entered isn't correct. Please try again.",description:"Error message when an incorrect password was entered"},unlock:{id:"unlock",defaultMessage:"Unlock",description:"Button to unlock a password protected PDF"}}),cp=(0,Se.XN)(sp);var up,dp=n(61470),pp=n.n(dp);class fp extends c.Component{render(){const{resolvePassword:e,children:t,intl:n}=this.props,{formatMessage:o}=n,{name:r,progress:i,reason:a}=this.props.connectionState;switch(r){case rs.F.CONNECTING:{var s;const e=a?null!==(s=hp[a])&&void 0!==s?s:a:null,t=e?o(e):"";return c.createElement("div",{className:pp().loader},c.createElement(q.Ex,{message:t,progress:null!=i?i:0}))}case rs.F.CONNECTION_FAILED:return up||(up=c.createElement(tp,null));case rs.F.PASSWORD_REQUIRED:return c.createElement(cp,{resolvePassword:e,unlocked:this.props.isUnlockedViaModal});default:return void 0===t?null:t}}}const hp=(0,Se.vU)({loading:{id:"loading",defaultMessage:"Loading...",description:"Shown while the document is being fetched"}}),mp=(0,Se.XN)(fp);var gp=n(38858);const vp=(0,io.Z)(((e,t)=>(0,_.xp)(e,t).sort(Pp)));const yp=(0,Zn.x)((function(e,t){let{page:n}=t;const o=!!e.reuseState,r=vp(e.annotations,n);let a=(0,i.aV)(),l=null;switch(e.selectedAnnotationMode){case R.o.SELECTED:a=r.filter((t=>e.selectedAnnotationIds.has(t.id)));break;case R.o.EDITING:l=e.selectedAnnotationIds.map((t=>{const n=e.annotations.get(t);return(0,s.kG)(n),n})).first(),(l instanceof w.Qi||l instanceof w.Jn)&&l.pageIndex===n.pageIndex&&(a=(0,i.aV)([l]))}return{backend:e.backend,hoverAnnotationIds:e.hoverAnnotationIds,interactionMode:e.interactionMode,isAnnotationReadOnly:t=>(0,Kn.lV)(t,e),selectedAnnotationIds:e.selectedAnnotationIds,activeAnnotationNote:e.activeAnnotationNote,selectedTextOnEdit:e.selectedTextOnEdit,showAnnotations:e.showAnnotations,window:e.frameWindow,zoomLevel:e.viewportState.zoomLevel,rotation:e.viewportState.pagesRotation,onFocusAnnotation:wp(e.eventEmitter),onBlurAnnotation:Sp(e.eventEmitter),formDesignMode:e.formDesignMode,annotations:r,isReloadingDocument:o,attachments:e.attachments,selectedAnnotations:a,editingAnnotation:l,showComments:(0,ol.Y7)(e),showAnnotationNotes:e.showAnnotationNotes,eventEmitter:e.eventEmitter,isAPStreamRendered:e.isAPStreamRendered,pageInvalidAPStreams:e.invalidAPStreams.get(n.pageIndex),canEditAnnotationCP:t=>(0,xr.CM)(t,e),canDeleteAnnotationCP:t=>(0,xr.Kd)(t,e),keepSelectedTool:e.keepSelectedTool,scrollElement:e.scrollElement,focusedAnnotationIds:e.focusedAnnotationIds,inkEraserMode:e.inkEraserMode,viewportState:e.viewportState,page:n,enableRichText:e.enableRichText,multiAnnotationsUsingShortcut:e.multiAnnotationsUsingShortcut,isMultiSelectionEnabled:e.isMultiSelectionEnabled}}))((function(e){const{annotations:t,isReloadingDocument:n,showAnnotations:o,zoomLevel:r,rotation:a,attachments:l,backend:u,dispatch:d,hoverAnnotationIds:p,page:f,isAnnotationReadOnly:h,canEditAnnotationCP:m,canDeleteAnnotationCP:g,getScrollElement:v,onFocusAnnotation:y,onBlurAnnotation:b,formDesignMode:S,selectedTextOnEdit:P,selectedAnnotationIds:E,selectedAnnotations:x,activeAnnotationNote:D,interactionMode:C,editingAnnotation:k,window:O,children:A,showComments:T,showAnnotationNotes:I,eventEmitter:F,isAPStreamRendered:M,pageInvalidAPStreams:R=(0,i.l4)(),keepSelectedTool:B,focusedAnnotationIds:j,inkEraserMode:z,enableRichText:K,multiAnnotationsUsingShortcut:Z,setGlobalCursor:U,isMultiSelectionEnabled:V}=e;(0,s.kG)(R);const{pageSize:G,pageIndex:W}=f,q=c.useCallback((e=>!(e instanceof w.Jn||e instanceof w.On&&e.isCommentThreadRoot)||T),[T]),[H,X]=c.useState(null),[Y,J]=c.useState(void 0),[Q,ee]=c.useState(!1),[te,ne]=c.useState(Array()),oe=c.useCallback((function(e){"number"==typeof e.clientX&&"number"==typeof e.clientY&&X(new w.E9({x:e.clientX,y:e.clientY}))}),[]),re=E.size>0,ie=t.filter((e=>e instanceof w.On&&(e.isCommentThreadRoot||!h(e)))),ae=c.useMemo((()=>t.filter((e=>e instanceof w.R1))),[t]),se=c.useMemo((()=>t.filter((e=>e instanceof w.Zc))),[t]),ce=(0,_r.R9)((e=>e instanceof w.Zc&&(0,_.Fp)(e)&&!h(e)&&m(e)&&g(e))),ue=c.useMemo((()=>se.filter(ce)),[se,ce]);function de(e){const t=E.has(e.id);return e instanceof $.Z?t&&C!==N.A.REDACT_TEXT_HIGHLIGHTER:t}function pe(e){ne(e?[...te,e]:[])}const fe=k instanceof w.Zc?k:null,he=k instanceof w.UX?k:null,me=k instanceof w.gd&&null===k.pageIndex?k:null,ge=k instanceof w.gd&&k.pageIndex===W?k:null,ve=k instanceof w.Qi&&null===k.pageIndex?k:null,ye=k instanceof w.Jn&&null===k.pageIndex?k:null,be=k instanceof $.Z&&null===k.pageIndex?k:null,we=k instanceof w.R1&&null===k.pageIndex?k:null,[Se,Pe]=c.useState(!1),Ee=c.useRef(!1),xe=e=>Se&&(0,_.eD)(e)&&!(null!=R&&R.has(e.id))&&(0,_.U7)(e.boundingBox)&&M(e),De=c.useRef(r),Ce=c.useRef(W),ke=(0,_r.tm)();c.useEffect((()=>{if(n)return void(Ee.current=!1);(r>De.current||Ce.current!==W)&&(Ee.current=!1,Ce.current=W),De.current=r;const e=t.filter((e=>!(null!=R&&R.has(e.id))&&(0,_.eD)(e)&&(0,_.U7)(e.boundingBox)&&M(e)));e.size>0&&!Ee.current&&(Ee.current=!0,u.renderPageAnnotations(W,e,r*(0,$r.L)()).then((()=>{ke()&&Pe(!0)})))}),[W,r,M,u,R,t,Pe,Se,n,ke]),c.useEffect((()=>{Se&&u.clearPageAPStreams(W,R)}),[Se,u,W,R]),c.useEffect((()=>{if(Se)return()=>{u.clearAllPageAPStreams(W)}}),[u,W,Se]);const Oe=(0,_r.jC)({zoomLevel:r}),Ae=!(null==Oe||!Oe.zoomLevel)&&Oe.zoomLevel<r;c.useEffect((()=>{Ae&&u.clearAllPageAPStreams(W)}));const Te=z===da.b.POINT?ai:ci,Ie=x.filter((e=>q(e)&&(0,_.Fp)(e)&&(0,_.yU)(e)&&(!h(e)||e instanceof w.Qi)&&(!(e instanceof w.Jn)||null==k))),Fe=Ie.size>1;return c.createElement(le.Provider,null,c.createElement(Hr,{dispatch:d,selectableTextMarkupAnnotations:ie,selectableLinkAnnotations:ae,hoverAnnotationIds:p,zoomLevel:r,window:O,pageIndex:W,selectedAnnotations:x,keepSelectedTool:B,interactionMode:C,setMultiAnnsInitialEvent:J,isMultiSelectionEnabled:V,isHitCaptureDeferred:Q,hitCaptureDeferredRect:te},A,o?c.createElement("div",null,t.filter((e=>q(e)&&(0,_.Fp)(e)&&function(e){return!(C===N.A.INK_ERASER&&ce(e))}(e)&&(!de(e)||!(0,_.yU)(e)||h(e)||e instanceof w.Jn&&k&&k.equals(e))&&!function(e){return e instanceof w.x_&&de(e)&&S}(e))).map((e=>c.createElement(Rr,{key:e.id,annotation:(0,Ue.h4)(e),globalAnnotation:e,attachments:l,backend:u,dispatch:d,isAnnotationReadOnly:h,isDisabled:re&&!de(e),isHover:p.has(e.id),isSelected:de(e),activeAnnotationNote:D,showAnnotationNotes:I,onBlur:b,onFocus:y,pageSize:G,zoomLevel:r,rotation:a,pageRotation:f.rotation,shouldRenderAPStream:xe(e),isFocused:j.has(e.id),isMultiAnnotationsSelected:Fe,isComboBoxOpen:ee,handleComboBoxRect:pe}))),Fe&&c.createElement(c.Fragment,{key:"multi-annotations-selection"},c.createElement(sa,{dispatch:d,pageIndex:W,pageSize:G,window:O,getScrollElement:v,selectedAnnotations:Ie.map((e=>(0,Ue.h4)(e))),selectedGlobalAnnotations:Ie},Ie.map((e=>c.createElement(Rr,{key:e.id,annotation:(0,Ue.h4)(e),globalAnnotation:e,attachments:l,backend:u,dispatch:d,isAnnotationReadOnly:h,isDisabled:!1,isHover:p.has(e.id),isSelected:!0,activeAnnotationNote:D,showAnnotationNotes:I,onBlur:b,onFocus:y,pageSize:G,zoomLevel:r,rotation:a,pageRotation:f.rotation,onClick:e instanceof w.gd?oe:void 0,shouldRenderAPStream:xe(e),isFocused:!1,isComboBoxOpen:ee,handleComboBoxRect:pe}))))),!Fe&&Ie.map((t=>c.createElement(c.Fragment,{key:t.id},c.createElement(ta,{pageIndex:W,pageSize:G,annotation:(0,Ue.h4)(t),globalAnnotation:t,window:O,getScrollElement:v,onFocus:y,onBlur:b,isResizable:(0,_.IO)(t),isModifiable:(0,_.Km)(t),isRotatable:(0,_.a$)(t),setGlobalCursor:U,backend:u,disablePointSnapping:e.viewportState.disablePointSnapping,isAnnotationLocked:t.locked},c.createElement(Rr,{annotation:(0,Ue.h4)(t),globalAnnotation:t,attachments:l,backend:u,dispatch:d,isAnnotationReadOnly:h,isDisabled:!1,isHover:p.has(t.id),isSelected:!0,isFocused:!1,activeAnnotationNote:D,showAnnotationNotes:I,onBlur:b,onFocus:y,pageSize:G,zoomLevel:r,rotation:a,pageRotation:f.rotation,onClick:t instanceof w.gd?oe:void 0,shouldRenderAPStream:xe(t),isComboBoxOpen:ee,handleComboBoxRect:pe})),I&&(0,_.YV)(t)&&c.createElement(Ir,{dispatch:d,annotation:t,zoomLevel:r,isAnnotationSelected:!0,activeAnnotationNote:D,visible:!1}))))):null),C===N.A.INK&&null!==fe&&(0,_.Fp)(fe)?c.createElement(ei,{dispatch:d,pageSize:G,pageIndex:W,inkAnnotation:fe.pageIndex===W?fe:fe.delete("lines").delete("boundingBox"),scrollElement:e.scrollElement}):null,C===N.A.INK_ERASER&&se.size>0?c.createElement(Te,{inkAnnotations:ue,canvasSize:G,pageIndex:W}):null,he&&[...$a,...Xa].includes(C)&&(0,_.Fp)(he)?c.createElement(Yt,{dispatch:d,pageSize:G,pageIndex:W,shapeAnnotation:he.pageIndex===W?he:(0,L.Hx)(he),isAnnotationMeasurement:[...Xa].includes(C),backend:u,disablePointSnapping:e.viewportState.disablePointSnapping}):null,C!==N.A.TEXT&&C!==N.A.CALLOUT||!me?null:c.createElement(Ni,{annotation:me,interactionMode:C,dispatch:d,pageSize:G,pageIndex:W,autoSelect:P,eventEmitter:F}),ge&&(0,_.Fp)(ge)?c.createElement(Fi,{dispatch:d,annotation:ge,pageIndex:W,pageSize:G,autoSelect:P,lastMousePoint:null===H?void 0:H,eventEmitter:F,keepSelectedTool:B,enableRichText:K}):null,(ve||ye)&&c.createElement(Vr,{dispatch:d,annotation:ve||ye,pageSize:G,pageIndex:W,zoomLevel:r}),be&&C===N.A.REDACT_SHAPE_RECTANGLE&&(0,_.Fp)(be)?c.createElement(ua,{dispatch:d,pageSize:G,pageIndex:W,redactionAnnotation:be.pageIndex===W?be:be.delete("boundingBox"),keepSelectedTool:B}):null,C===N.A.LINK&&we?c.createElement(Va,{dispatch:d,linkAnnotation:we,viewportState:e.viewportState,page:e.page,window:e.window,pageIndex:W,keepSelectedTool:B}):null,C===N.A.MULTI_ANNOTATIONS_SELECTION?c.createElement(Ha,{viewportState:e.viewportState,window:e.window,pageIndex:W,initialDraggingEvent:Y,multiAnnotationsUsingShortcut:Z}):null)})),bp=yp,wp=(0,io.Z)((e=>(t,n)=>{e.emit("annotations.focus",{annotation:t,nativeEvent:void 0!==n.nativeEvent?n.nativeEvent:n})})),Sp=(0,io.Z)((e=>(t,n)=>{e.emit("annotations.blur",{annotation:t,nativeEvent:void 0!==n.nativeEvent?n.nativeEvent:n})}));function Pp(e,t){const n=Ep(e),o=Ep(t);return n>o?1:n<o?-1:0}function Ep(e){return e.isSignature?4:e instanceof w.x_?3:e instanceof w.FV||e instanceof w.R9||e instanceof w.xu||e instanceof w.hL?2:e instanceof w.R1?1:0}var xp=n(90523),Dp=n.n(xp);const Cp=["keyup","selectionchange","touchend","mouseup","pointerup"];class kp extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"_hostElement",c.createRef()),(0,o.Z)(this,"_onAppearInvoked",!1),(0,o.Z)(this,"_preventTextSelection",(e=>{const t=this._hostElement.current;if(!t)return;const n=t.ownerDocument.defaultView.getSelection()||{},{anchorNode:o,extentNode:r,focusNode:i,isCollapsed:a}=n;if(o&&t.contains(o)||r&&t.contains(r)||i&&t.contains(i)){if(a)return;e.stopPropagation(),e.stopImmediatePropagation()}}))}_appendNode(){const e=this._hostElement.current;if(!e)return;const{node:t,onAppear:n}=this.props.item;e.innerHTML="",e.appendChild(t),"function"!=typeof n||this._onAppearInvoked||(this._onAppearInvoked=!0,n())}componentDidMount(){const e=this._hostElement.current;if(e){const t=e.ownerDocument;Cp.forEach((e=>{t.addEventListener(e,this._preventTextSelection,!0)}))}this._appendNode()}componentDidUpdate(e){this.props.item.node!==e.item.node&&this._appendNode()}componentWillUnmount(){const e=this._hostElement.current;if(!e)return;const t=e.ownerDocument;Cp.forEach((e=>{t.removeEventListener(e,this._preventTextSelection,!0)})),this._onAppearInvoked=!1;const{onDisappear:n}=this.props.item;"function"==typeof n&&n()}render(){return c.createElement(xe,{applyZoom:!this.props.item.disableAutoZoom,position:this.props.item.position,noRotate:this.props.item.noRotate,currentPagesRotation:this.props.rotation,zoomLevel:this.props.zoomLevel},c.createElement("div",{className:Dp().selectable,ref:this._hostElement}))}}var Op=n(72800);class Ap extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"_handlePointerUp",(e=>{const{transformClientToPage:t,onEmit:n,pageIndex:o}=this.props;n(e,t(new b.E9({x:e.clientX,y:e.clientY}),o))}))}render(){return c.createElement(Je.Z,{onPointerUp:this._handlePointerUp},c.createElement(this.props.element,{},this.props.children))}}const Tp=jr(Ap);var Ip=n(99398),Fp=n.n(Ip);function Mp(e){let{focused:t,searchResult:n,zoomLevel:o}=e;const r=d()({[Fp().highlight]:!0,[Fp().focused]:t,"PSPDFKit-Search-Highlight":!0,"PSPDFKit-Search-Highlight-focused":t});return c.createElement("div",{"data-testid":"SearchHighlight","aria-live":"polite"},t?c.createElement(q.TX,{announce:"polite"},"Search Result: ",n.previewText):null,n.rectsOnPage.map(((e,t)=>c.createElement("div",{key:t,style:{top:Math.floor(e.top*o),left:Math.floor(e.left*o),width:Math.ceil(e.width*o),height:Math.ceil(e.height*o)},className:r}))).toArray())}const _p=(0,a.$j)((function(e,t){const{searchState:n}=e;return{searchResults:n.results.filter((e=>e.pageIndex===t.pageIndex)),focusedResult:n.results.get(n.focusedResultIndex)}}))((function(e){let{searchResults:t,focusedResult:n,zoomLevel:o}=e;return c.createElement("div",{className:Fp().layer,"data-testid":"SearchHighlightLayer"},t.map(((e,t)=>c.createElement(Mp,{focused:e===n,key:t,searchResult:e,zoomLevel:o}))))})),Np={P:"p",TH:"th",TD:"td",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",Figure:"figure",Link:"a"};function Rp(e){var t,n;const{textLine:o,content:r,isPanModeEnabled:i,enableTextSelection:a,vertical:s,scaling:l,pageIndex:u}=e,p=null===(t=o.contentTreeElementMetadata)||void 0===t?void 0:t.pdfua_type;let f="span";p&&p in Np&&(f=Np[p]);const h=d()({[Ms().line]:!0,[Ms().lineTextCursor]:!i,[Ms().debug]:!1,[Ms().enableTextSelection]:a,"PSPDFKit-Text":!0,[Ms().vertical]:!!s}),m={top:o.boundingBox.top,left:o.boundingBox.left,transform:l&&l.scaleX>0&&l.scaleY>0?`scale(${l.scaleX}, ${l.scaleY})`:""};return c.createElement(f,{className:h,style:m,key:o.id||void 0,alt:(null===(n=o.contentTreeElementMetadata)||void 0===n?void 0:n.alt)||void 0},c.createElement("span",{"data-textline-id":o.id,"data-page-index":u,className:Ms().selectableText},r))}class Lp extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"_handleOnPressEmit",((e,t)=>{const{textLine:n,eventEmitter:o}=this.props,r={textLine:n,point:t,nativeEvent:e.nativeEvent};o.emit("textLine.press",r)})),(0,o.Z)(this,"_handleDeselectText",(()=>{this.props.dispatch((0,De.vR)())}))}render(){const{textLine:e,isTextCopyingAllowed:t}=this.props,n={top:e.boundingBox.top,left:e.boundingBox.left-20,transform:"none"},o=(0,ks.LD)(t,e);return c.createElement(Tp,{pageIndex:this.props.pageIndex,onEmit:this._handleOnPressEmit,element:"div"},!Ke.vU&&c.createElement("span",{className:d()({[Ms().linePadding]:!0,[Ms().preventUserSelect]:Ke.G6||Ke.b5}),style:n,onClick:Ke.G6||Ke.b5?this._handleDeselectText:void 0}),c.createElement(Rp,(0,ue.Z)({content:o},this.props)))}}var Bp;class jp extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"layerRef",c.createRef()),(0,o.Z)(this,"state",{needsTextSelectionOverlay:"gecko"===Ke.SR,overlayHeight:0}),(0,o.Z)(this,"handleMouseDown",(e=>{if(this.state.needsTextSelectionOverlay&&this.layerRef.current){const t=this.layerRef.current.getBoundingClientRect();if(e.clientY){const n=Math.max(0,e.clientY-t.top);this.setState({overlayHeight:n/this.props.zoomLevel})}}})),(0,o.Z)(this,"handleMouseUp",(()=>{this.state.needsTextSelectionOverlay&&this.setState({overlayHeight:0})}))}getChildren(){return this.layerRef.current&&(0,i.aV)(this.layerRef.current.getElementsByClassName(Ms().line))}getLayer(){return this.layerRef.current}render(){const{enableTextSelection:e,zoomLevel:t,rotation:n,eventEmitter:o,textLines:r,pageIndex:i,textLineScales:a}=this.props;return c.createElement("div",{className:Ms().layer,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,style:{transform:`scale(${t})`,transformOrigin:"0 0"},ref:this.layerRef,role:"webkit"===Ke.SR?"text":void 0},Bp||(Bp=c.createElement("div",null)),null==r?void 0:r.map((t=>c.createElement(Lp,{dispatch:this.props.dispatch,enableTextSelection:e,key:t.id,pageIndex:i,scaling:a&&a.get(t.id),textLine:t,vertical:90===n||270===n,eventEmitter:o,isTextCopyingAllowed:this.props.isTextCopyingAllowed,isPanModeEnabled:this.props.isPanModeEnabled}))),this.state.needsTextSelectionOverlay&&this.state.overlayHeight>0?c.createElement("div",{className:Ms().overlay,style:{top:this.state.overlayHeight}}):null)}}var zp=n(51869),Kp=n.n(zp);function Zp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Up(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zp(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Vp={rect:null,startingPoint:null};const Gp=(0,a.$j)((function(e,t){let{pageIndex:n}=t;return{clientToPageTransformation:(0,H.zi)(e,n),zoomLevel:e.viewportState.zoomLevel,interactionMode:e.interactionMode}}))((function(e){const{dispatch:t,pageSize:n,clientToPageTransformation:o,pageIndex:r,zoomLevel:i}=e,[a,s]=c.useState(Vp),l=c.useCallback((e=>e.apply(o)),[o]);c.useEffect((function(){return t((0,Kt.X2)()),function(){t((0,Kt.Zg)())}}),[t]);const{rect:u}=a;return c.createElement("div",{className:Kp().canvas},null!==u?c.createElement("svg",{className:Kp().svg,style:{left:u.left*i,top:u.top*i,width:u.width*i,height:u.height*i},focusable:!1},c.createElement("rect",{className:Kp().rect,height:u.height*i,width:u.width*i,x:0,y:0}),c.createElement("rect",{className:Kp().rectStrokeBetween,height:u.height*i,width:u.width*i,x:0,y:0})):null,c.createElement(zt.Z,{size:n,onDrawStart:function(e){s((t=>Up(Up({},t),{},{startingPoint:e})))},onDrawCoalesced:function(e){const{startingPoint:t}=a;(0,Pe.k)(t);const n=e[e.length-1];s((e=>Up(Up({},e),{},{rect:Wp(t,n)})))},onDrawEnd:function(){const{rect:e}=a,n=5/i;null===e||e.width<n&&e.height<n||t((0,mc.vP)(r,e)),s(Vp)},transformPoint:l,interactionMode:e.interactionMode,scrollElement:e.scrollElement}))}));function Wp(e,t){const n=Math.min(e.x,t.x),o=Math.min(e.y,t.y),r=Math.max(e.x,t.x),i=Math.max(e.y,t.y);return new w.UL({left:n,top:o,width:r-n,height:i-o})}var qp=n(92164),Hp=n.n(qp);function $p(e){let{frameWindow:t,pageRef:o,interactionMode:r,onCreate:i,pageIndex:a,intl:l}=e;const[u,p]=(0,c.useState)([0,0]),[f,h]=(0,c.useState)((0,Ke.b1)());return(0,c.useEffect)((()=>{if(!(0,Ke.b1)())return t.addEventListener("mousemove",e),()=>{(0,Ke.b1)()||t.removeEventListener("mousemove",e)};function e(e){const{pageX:t,pageY:n}=e,r=e.target.closest(".PSPDFKit-Page");if(!r)return void h(!1);const i=r.getAttribute("data-page-index");if((0,s.kG)("string"==typeof i,"Page number is not a string"),+i===a){h(!0),(0,s.kG)(o.current);const{left:e,top:r}=o.current.getBoundingClientRect();p([t-e,n-r])}else h(!1)}}),[o,t,a]),f?c.createElement("div",{className:d()({[Hp().wrapper]:(0,Ke.b1)()},"PSPDFKit-Form-Creator-Guides"),onPointerUp:i,role:"application"},!(0,Ke.b1)()&&c.createElement(c.Fragment,null,c.createElement("div",{className:Hp().hGuide,style:{transform:`translate(0, ${u[1]}px)`}}),c.createElement("div",{className:Hp().vGuide,style:{transform:`translate(${u[0]}px,0)`}}),c.createElement("div",{className:d()({[Hp().buttonWidget]:r===N.A.BUTTON_WIDGET,[Hp().textWidget]:r===N.A.TEXT_WIDGET,[Hp().radioWidget]:r===N.A.RADIO_BUTTON_WIDGET,[Hp().checkboxWidget]:r===N.A.CHECKBOX_WIDGET,[Hp().signWidget]:r===N.A.SIGNATURE_WIDGET,[Hp().listBoxWidget]:r===N.A.LIST_BOX_WIDGET,[Hp().comboBoxWidget]:r===N.A.COMBO_BOX_WIDGET,[Hp().dateWidget]:r===N.A.DATE_WIDGET}),style:{transform:`translate(${u[0]}px,${u[1]}px)`}},c.createElement("div",null,l.formatMessage(ke.Z.sign)),c.createElement(Re.Z,{src:n(58021)})))):null}var Xp=n(12671);function Yp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Jp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yp(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Qp=e=>{const{page:t,textBlockId:n,anchor:o,zoomLevel:r,textBlockState:i,backend:a,isActive:s}=e,l=c.useRef(null),u=c.useRef({offset:{x:0,y:0},size:{x:-1,y:-1}}),d=c.useCallback((0,Jl.k)(((e,t)=>a.contentEditorRenderTextBlock(n,e,t)),20),[]),p=i.layout,f=i.globalEffects,h=i.modificationsCharacterStyle;c.useEffect((()=>{!async function(){const e=(0,Xp.T8)(p,h),n=(0,$r.L)(),i=await d({pixelAnchor:{x:o.x*r*n,y:o.y*r*n},globalEffects:(0,Xp.uE)(f),pixelPageSize:{x:t.pageSize.width*r*n,y:t.pageSize.height*r*n},pixelViewport:{offset:{x:0,y:0},size:{x:t.pageSize.width*r*n,y:t.pageSize.height*r*n}},cursor:null,selection:s?{color:"#b5d7ff"}:null},e),a=i.displayRect,c=l.current;if(!c)return;const m=u.current;m.offset.x!=a.offset.x&&(c.style.left=a.offset.x/n+"px"),m.offset.y!=a.offset.y&&(c.style.top=a.offset.y/n+"px"),m.size.x!=a.size.x&&(c.style.width=a.size.x/(Ke.G6?1:n)+"px",c.width=a.size.x),m.size.y!=a.size.y&&(c.style.height=a.size.y/(Ke.G6?1:n)+"px",c.height=a.size.y);const g=c.getContext("2d");if(g){if(g.clearRect(0,0,a.size.x,a.size.y),a.size.x&&a.size.y){const e=new ImageData(new Uint8ClampedArray(i.imageBuffer),a.size.x,a.size.y);g.putImageData(e,0,0)}u.current=a}}()}));const m=Ke.G6?{transformOrigin:"top left",transform:`scale(${1/devicePixelRatio})`}:{};return c.createElement("canvas",{ref:l,style:Jp({position:"absolute",left:0,top:0},m)})},ef=c.memo(Qp);var tf=n(38151);const nf={on(e,t){document.addEventListener(e,(e=>t(e.detail)))},dispatch(e,t){document.dispatchEvent(new CustomEvent(e,{detail:t}))},remove(e,t){document.removeEventListener(e,t)}};var of=n(20423),rf=n.n(of),af=n(94385);const sf=(0,Se.vU)({fontMismatch:{id:"ceFontMismatch",defaultMessage:"The {arg0} font isnt available or cant be used to edit content in this document. Added or changed content will revert to a default font.",description:"Message to show when there is a mismatch"},toggleFontMismatchTooltip:{id:"ceToggleFontMismatchTooltip",defaultMessage:"Toggle font mismatch tooltip",description:"Message to show for the button that displays the font mismatch tooltip"},deleteTextBlockConfirmMessage:{id:"deleteTextBlockConfirmMessage",defaultMessage:"Are you sure you want to delete this text box?",description:"Message for the delete text block confirm dialog"},deleteTextBlockConfirmAccessibilityLabel:{id:"deleteTextBlockConfirmAccessibilityLabel",defaultMessage:"Confirm text box deletion",description:"Accessibility label for the delete text block confirm dialog"},deleteTextBlockConfirmAccessibilityDescription:{id:"deleteTextBlockConfirmAccessibilityDescription",defaultMessage:"Dialog allowing the user to confirm or cancel deleting the text box",description:"Accessibility description for the delete annotation confirm dialog"}});function lf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function cf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lf(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function uf(e){let{faceMismatch:t,relativePixelContentRect:o,textBlockState:r,zoomLevel:i,anchor:s,geometricStyleAttributes:l,positionAttributes:u}=e;const{formatMessage:d}=(0,Se.YB)(),p=(0,a.I0)(),{contentRect:f,globalEffects:h,layout:m}=r,g=c.useMemo((()=>{const e=b.sl.IDENTITY.rotateRad(h.rotation).scale(1,h.flipY?-1:1),t=o.offset.x+l.width,n=new w.E9({x:t+5*i,y:o.offset.y}).apply(e),r=n.x+s.x*i+(h.rotation<0?o.offset.x:0),a=n.y+s.y*i+(h.rotation<0?o.offset.y:0);return new w.E9({x:r,y:a})}),[l.width,i,h.flipY,h.rotation,s.x,s.y,o.offset.x,o.offset.y]),v=cf(cf({},u),{},{position:"fixed",left:g.x,top:g.y,width:Math.max(12,Math.round(16*i)),height:Math.max(12,Math.round(16*i)),zIndex:3});return c.createElement("button",{style:v,className:rf().tooltipButton,onClick:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),e.preventDefault()},onPointerDown:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),e.preventDefault()},onPointerOver:()=>{var e;const n=o.offset.x+f.size.x,r=o.offset.y,a=new w.E9({x:n,y:r}),l=b.sl.IDENTITY.rotateRad(h.rotation).scale(1,h.flipY?-1:1),c=a.apply(l);p((0,tf.lx)(new w.UL({left:s.x+(null!==(e=m.maxWidth)&&void 0!==e?e:c.x),top:g.y/i,width:16,height:16}),t))},onPointerLeave:()=>{if(!Ke.Ni){const e=new AbortController;p((0,tf.Hv)(e)),p((0,tf.uy)(e.signal))}}},c.createElement(Re.Z,{src:n(46113),className:rf().tooltipSVG}),c.createElement(q.TX,null,d(sf.toggleFontMismatchTooltip)))}function df(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function pf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?df(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):df(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ff=e=>{var t,n;const{page:{pageSize:o,pageIndex:r},textBlockId:i,anchor:s,zoomLevel:l,textBlockState:u,isActive:p,frameWindow:f}=e,h=(0,a.I0)(),m=u.contentRect,g=u.globalEffects,v=u.detectedStyle,y=u.cursor,b=c.useRef(!1),[S,P]=c.useState(!1),E=c.useRef(!1),x=(0,a.v9)((e=>(0,ml.G_)(r,i)(e))),D=(0,a.v9)((e=>(0,ml.QC)(r,i)(e)));c.useEffect((()=>{if(!p){const e=new AbortController;h((0,tf.Hv)(e)),h((0,tf.uy)(e.signal))}}),[p,h]);const C=c.useRef(null),k=c.useMemo((()=>{var e,t,n;return p?null!=(null===(e=v.selectionStyleInfo)||void 0===e?void 0:e.faceMismatch)?v.selectionStyleInfo.faceMismatch.unavailableFaceName:null!==(t=null===(n=v.modificationsCharacterStyleFaceMismatch)||void 0===n?void 0:n.unavailableFaceName)&&void 0!==t?t:null:null}),[null===(t=v.selectionStyleInfo)||void 0===t?void 0:t.faceMismatch,null===(n=v.modificationsCharacterStyleFaceMismatch)||void 0===n?void 0:n.unavailableFaceName,p]),O=c.useRef(null),A=c.useRef(null),T=e=>{var t,n;(0,Pe.k)(e.currentTarget);return new w.E9({x:(null!==(t=e.nativeEvent.offsetX)&&void 0!==t?t:0)/l+m.offset.x,y:(null!==(n=e.nativeEvent.offsetY)&&void 0!==n?n:0)/l+m.offset.y})},I=()=>(0,Xp.T8)(u.layout,u.modificationsCharacterStyle),F=function(e){let{textAreaRef:t,textBlockId:n,pageIndex:o,makeExternalState:r}=e;const i=c.useRef(!1),s=(0,a.I0)(),l=e=>{t.current&&null!=e&&e.length&&s((0,tf.qt)(o,n,null,e,r()))},u=Ke.Dt||Ke.TL;return{onChange:e=>{i.current||l("insertLineBreak"===e.nativeEvent.inputType?"\n":e.nativeEvent.data)},onCompositionStart:()=>{u||(i.current=!0)},onCompositionEnd:e=>{u||(i.current=!1,l(e.data))}}}({textAreaRef:C,textBlockId:i,pageIndex:r,makeExternalState:I}),M=function(e){let{textBlockState:t,textBlockId:n,pageIndex:o,makeExternalState:r}=e;const i=(0,a.I0)();return{onCopy:e=>{e.preventDefault(),t.selection&&e.clipboardData.setData("text/plain",t.selection.text)},onCut:e=>{e.preventDefault(),t.selection&&(e.clipboardData.setData("text/plain",t.selection.text),i((0,tf.qt)(o,n,null,"",r())))},onPaste:e=>{e.preventDefault();const t=e.clipboardData.getData("text/plain");i((0,tf.qt)(o,n,null,t,r()))}}}({textBlockId:i,pageIndex:r,textBlockState:u,makeExternalState:I}),_=function(e){let{textBlockId:t,makeExternalState:n,textBlockState:o,pageSize:r,pageIndex:i,isSelected:s,isActive:l}=e;const c=(0,a.I0)();return e=>{const a=Ke.V5&&e.altKey||!Ke.V5&&e.ctrlKey;if(l)switch(e.key){case"ArrowRight":c((0,tf.FD)(i,t,a?"forwardWord":"forward",e.shiftKey,n()));break;case"ArrowLeft":c((0,tf.FD)(i,t,a?"backwardWord":"backward",e.shiftKey,n()));break;case"ArrowDown":c((0,tf.FD)(i,t,"nextLine",e.shiftKey,n()));break;case"ArrowUp":c((0,tf.FD)(i,t,"previousLine",e.shiftKey,n()));break;case"Home":c((0,tf.FD)(i,t,"first",e.shiftKey,n()));break;case"End":c((0,tf.FD)(i,t,"last",e.shiftKey,n()));break;case"Backspace":c((0,tf.RL)(i,t,"backward",n()));break;case"Delete":c((0,tf.RL)(i,t,"forward",n()));break;case"a":case"A":if(!(Ke.V5&&e.metaKey||!Ke.V5&&e.ctrlKey))break;c((0,tf.Ow)(i,t,"everything",n()));break;case"z":case"Z":if(!(Ke.V5&&e.metaKey||!Ke.V5&&e.ctrlKey))break;e.shiftKey?c((0,tf.yy)(i,t,n())):c((0,tf.Zv)(i,t,n()));break;case"y":case"Y":if(!(Ke.V5&&e.metaKey||!Ke.V5&&e.ctrlKey))break;c((0,tf.yy)(i,t,n()));break;case"Escape":c(tf.Pq),e.preventDefault()}else if(s){let n=1;switch(e.shiftKey&&(n=10),e.key){case"ArrowRight":{e.preventDefault();const t=new w.E9({x:o.anchor.x+n,y:o.anchor.y});if(t.x+o.contentRect.offset.x+o.contentRect.size.x>=r.width)break;c((0,tf.$t)({anchor:t,isKeyboardMove:!0}));break}case"ArrowLeft":{e.preventDefault();const t=new w.E9({x:o.anchor.x-n,y:o.anchor.y});if(t.x+o.contentRect.offset.x<=0)break;c((0,tf.$t)({anchor:t,isKeyboardMove:!0}));break}case"ArrowDown":{e.preventDefault();const t=new w.E9({x:o.anchor.x,y:o.anchor.y+n});if(t.y+o.contentRect.offset.y+o.contentRect.size.y>=r.height)break;c((0,tf.$t)({anchor:t,isKeyboardMove:!0}));break}case"ArrowUp":{e.preventDefault();const t=new w.E9({x:o.anchor.x,y:o.anchor.y-n});if(t.y+o.contentRect.offset.y<=0)break;c((0,tf.$t)({anchor:t,isKeyboardMove:!0}));break}case"Enter":c((0,tf.SF)(i,t)),e.preventDefault();break;case"Escape":c(tf.Pq),e.preventDefault();break;case"Backspace":case"Delete":case"Del":c((0,tf.u)(ml.wR.Delete)),e.preventDefault(),e.stopPropagation();break;default:e.preventDefault()}}else switch(e.key){case"Enter":c((0,tf.C0)(i,t)),e.preventDefault();break;case"Escape":c(tf.Pq),e.preventDefault()}}}({textBlockId:i,textBlockState:u,makeExternalState:I,pageSize:o,pageIndex:r,isActive:p,isSelected:x});function N(e){var t;const n=T(e),o={x:n.x,y:n.y};null===(t=C.current)||void 0===t||t.focus(),h((0,tf.v2)(r,i,o,e.shiftKey,I())),O.current={mode:"characters",begin:o}}function R(e){e.stopPropagation(),e.stopImmediatePropagation();const t={x:e.clientX,y:e.clientY};if(!A.current)return[null,null];const n=new w.UL({width:o.width,height:o.height});let r=new w.E9(t);const i=A.current;if(r=r.apply(i.transformation),!n.isPointInside(r))return[null,null];return[(t.x-i.start.x)*i.scale/i.zoomLevel,(t.y-i.start.y)*i.scale/i.zoomLevel]}c.useEffect((()=>{E.current&&x&&(E.current=!1)}),[x]);const L=c.useCallback((0,af.Z)((e=>{const[t,n]=R(e);if(null===t||null===n||!A.current)return;const o=new w.E9({x:A.current.anchor.x+t,y:A.current.anchor.y+n});A.current.changed=!0,h((0,tf.$t)({anchor:o,pageIndex:r,textBlockId:i}))}),20),[]),B=c.useCallback((()=>{var e;f.document.removeEventListener("pointermove",L),f.document.removeEventListener("pointerup",B),h((0,mc.ac)(!1)),null!==(e=A.current)&&void 0!==e&&e.changed&&(A.current.previousInteractionState===ml.FP.Selected?h((0,tf.C0)(r,i)):h(tf.Pq)),A.current=null}),[]);c.useEffect((()=>{var e;p&&u.justCreated&&(null===(e=C.current)||void 0===e||e.focus())}),[p,u.justCreated]);const j=()=>{var e;return p&&(null===(e=C.current)||void 0===e?void 0:e.focus())};c.useEffect((()=>(nf.on("content-editing:re-focus",j),()=>nf.remove("content-editing:re-focus",j))));const z=u.layout;(0,Pe.k)(null!==z.maxWidth);const K={offset:{x:(0,Il._v)(z.alignment,Il.Im,z.maxWidth),y:m.offset.y},size:{x:z.maxWidth,y:m.size.y}},Z=(0,Il.sz)(vl(K),l),U=(0,Il.yK)(Z,s,l),V={position:"absolute",left:U.offset.x,top:U.offset.y},G=pf(pf({},V),{},{width:U.size.x,height:U.size.y,transformOrigin:`${-Z.offset.x}px ${-Z.offset.y}px`,transform:`rotate(${g.rotation}rad) scaleY(${g.flipY?-1:1})`});u.justCreated&&(G.width=Math.max(m.size.x,10)*l);const W=(0,a.v9)((e=>(0,H.zi)(e,r))),q=(e,t)=>n=>{n.stopPropagation(),n.isPrimary&&0===n.button&&(n.nativeEvent.stopImmediatePropagation(),n.preventDefault(),f.document.addEventListener("pointermove",$,{passive:!0}),f.document.addEventListener("pointerup",X,{passive:!0}),h((0,mc.ac)(!0)),x||p||h((0,tf.SF)(r,i)),(0,Pe.k)(null!==z.maxWidth),A.current={fixpoint:e,scale:t,zoomLevel:l,start:{x:n.clientX,y:n.clientY},anchor:u.anchor,maxWidth:z.maxWidth,transformation:W,previousInteractionState:x?ml.FP.Selected:ml.FP.None})},$=c.useCallback((0,af.Z)((e=>{const[t]=R(e);null!==t&&A.current&&h((0,tf.PZ)({fixpointValue:A.current.fixpoint,newWidth:A.current.maxWidth+t}))}),20),[]),X=c.useCallback((()=>{A.current=null,f.document.removeEventListener("pointermove",$),f.document.removeEventListener("pointerup",X),h((0,mc.ac)(!1))}),[]);return c.createElement(c.Fragment,null,k?c.createElement(uf,{faceMismatch:k,relativePixelContentRect:Z,textBlockState:u,zoomLevel:l,anchor:s,geometricStyleAttributes:G,positionAttributes:V}):null,c.createElement("div",{style:pf(pf({},G),{},{position:"fixed",zIndex:2}),className:d()(rf().textBlock,{[rf().selectedTextBlock]:x,[rf().movingTextBlock]:D,[rf().activeTextBlock]:p,[rf().focusIn]:S}),onFocus:()=>{b.current=!0},onBlur:()=>{b.current=!1,P(!1)},onKeyUp:e=>{const t=e.target.ownerDocument.defaultView&&e.target instanceof e.target.ownerDocument.defaultView.HTMLTextAreaElement;b.current&&"Tab"===e.key&&t&&(P(!0),h((0,tf.FD)(r,i,"first",!1,I())))}},c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:`${m.offset.x*l} ${Z.offset.y} ${Z.size.x} ${Z.size.y}`,style:pf(pf({},G),{},{width:U.size.x,position:"absolute",left:0,top:0,transform:void 0,transformOrigin:void 0,display:p?"block":"none"}),className:rf().blinkingCaret},c.createElement("line",{stroke:"currentColor",x1:y.offset.x*l,y1:(y.offset.y+y.lineSpacing.bottom)*l,x2:y.offset.x*l,y2:(y.offset.y-y.lineSpacing.top)*l})),c.createElement("textarea",(0,ue.Z)({ref:C,onPointerDown:e=>{e.stopPropagation(),p?N(e):(e.preventDefault(),e.isPrimary&&(f.document.addEventListener("pointermove",L,{passive:!0}),f.document.addEventListener("pointerup",B,{passive:!0}),h((0,mc.ac)(!0)),(0,Pe.k)(null!==z.maxWidth),A.current={fixpoint:0,scale:1,zoomLevel:l,start:{x:e.clientX,y:e.clientY},anchor:u.anchor,maxWidth:z.maxWidth,transformation:W,previousInteractionState:x?ml.FP.Selected:ml.FP.None}))},onPointerMove:e=>{if(A.current)return;if(e.preventDefault(),!(p&&1&e.buttons))return;e.stopPropagation();const t=T(e),n={x:t.x,y:t.y},o=O.current;(0,Pe.k)(o),h((0,tf.sC)(r,i,o.begin,n,o.mode,I()))},onPointerUp:e=>{var t;null!==(t=A.current)&&void 0!==t&&t.changed||(e.preventDefault(),e.stopPropagation(),x||p?p||(h((0,tf.SF)(r,i)),N(e)):(h((0,tf.C0)(r,i)),E.current=!0))},onMouseUp:e=>{if(e.detail>=2){e.preventDefault(),e.stopPropagation();const t=T(e),n={x:t.x,y:t.y};O.current={mode:"words",begin:n},h((0,tf.sC)(r,i,n,n,"words",I())),e.detail>=3&&h((0,tf.Ow)(r,i,"everything",I()))}},onClick:e=>{e.preventDefault(),e.stopPropagation()},onKeyDown:_},F,M,{onContextMenu:ar.PF,style:pf(pf({},G),{},{resize:"none",opacity:0,touchAction:"none",left:0,top:0,transform:void 0,transformOrigin:void 0}),defaultValue:u.layoutView.lines.map((e=>(0,Il.z8)(e.elements))).join(" ")})),x?c.createElement(c.Fragment,null,c.createElement("div",{draggable:!0,onPointerDown:q(Il.Tl,-1),className:d()(rf().resizeHandle,rf().resizeHandleLeft)},c.createElement("div",{className:rf().resizeHandleCircle})),c.createElement("div",{draggable:!0,onPointerDown:q(Il.Im,1),className:d()(rf().resizeHandle,rf().resizeHandleRight)},c.createElement("div",{className:rf().resizeHandleCircle}))):null))},hf=c.memo(ff),mf=e=>{const{page:t,textBlockId:n,zoomLevel:o,backend:r,frameWindow:i}=e,s=(0,a.v9)((e=>{const o=(0,ml.aT)(t.pageIndex,n)(e);return(0,Pe.k)(o),o.anchor})),l=(0,a.v9)((e=>(0,ml.aT)(t.pageIndex,n)(e)));(0,Pe.k)(l);const u=(0,a.v9)((e=>(0,ml.Dn)(t.pageIndex,n)(e)));return c.createElement("div",{className:"PSPDFKit-Content-Editing-Text-Block"},c.createElement(ef,{page:t,textBlockId:n,anchor:s,zoomLevel:o,textBlockState:l,isActive:u,backend:r}),c.createElement(hf,{page:t,textBlockId:n,anchor:s,zoomLevel:o,isActive:u,textBlockState:l,frameWindow:i}))},gf=c.memo(mf);function vf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function yf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vf(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const bf=e=>{const t=(0,a.I0)(),{formatMessage:n}=(0,Se.YB)(),{page:o,zoomLevel:r,backend:i,frameWindow:s}=e;c.useEffect((()=>{var e;t((e=o.pageIndex,async(t,n)=>{if((0,ml.Cd)(e)(n())!=ml.R1.Uninitialized)return;t({type:B.l$y,pageIndex:e});const o=await n().backend.contentEditorDetectParagraphs(e);t({type:B.kD6,pageIndex:e,initialTextBlocks:o})}))}),[t,o.pageIndex]);const l=o.pageSize.height*r,u=o.pageSize.width*r,d=(0,a.v9)((0,ml.jI)(o.pageIndex),a.wU),p=(0,a.v9)((e=>e.contentEditorSession.mode)),f=p===ml.wR.Create,h=p===ml.wR.Delete,m=(0,a.v9)((e=>(0,H.zi)(e,o.pageIndex))),g=(0,a.v9)((e=>e.contentEditorSession.textBlockInteractionState.state)),v=g===ml.FP.Active,y=g===ml.FP.Moving;return c.createElement("div",{tabIndex:0,onPointerDown:e=>{if(f){const n=new w.E9({x:e.clientX,y:e.clientY}).apply(m),r=new ml.Sg({x:n.x,y:n.y});t((0,tf.rO)(o.pageIndex,r))}else h||(v&&(e.preventDefault(),e.stopPropagation()),t(tf.Pq))},className:"content-editing-overlay",style:yf({position:"absolute",top:0,left:0,touchAction:y?"none":"auto",height:l,width:u,zIndex:1},f?{cursor:"text"}:{})},h&&c.createElement(_c.Z,{onConfirm:()=>t(tf.um),onCancel:()=>t((0,tf.u)(ml.wR.Edit)),accessibilityLabel:n(sf.deleteTextBlockConfirmAccessibilityLabel),accessibilityDescription:n(sf.deleteTextBlockConfirmAccessibilityDescription),"aria-atomic":!0,restoreOnClose:!1},c.createElement("p",null,n(sf.deleteTextBlockConfirmMessage))),d.map((e=>c.createElement(gf,{key:e,backend:i,textBlockId:e,page:o,zoomLevel:r,frameWindow:s}))))},wf=c.memo(bf);function Sf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Pf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sf(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ef={[N.A.BUTTON_WIDGET]:[120,40],[N.A.CHECKBOX_WIDGET]:[32,32],[N.A.COMBO_BOX_WIDGET]:[220,40],[N.A.LIST_BOX_WIDGET]:[220,150],[N.A.RADIO_BUTTON_WIDGET]:[32,32],[N.A.SIGNATURE_WIDGET]:[220,150],[N.A.TEXT_WIDGET]:[220,40],[N.A.DATE_WIDGET]:[220,40]};let xf=0;var Df=n(35088),Cf=n.n(Df),kf=n(36898),Of=n.n(kf);const Af=e=>{let{pageSize:t}=e;const n=(0,a.v9)((e=>e.hintLines));return n?c.createElement("svg",{id:"hint-lines",viewBox:`0 0 ${t.width} ${t.height}`,className:Of().hintLineSvg},n.lines.map(((e,t)=>c.createElement("line",{key:t,x1:e.start.x,y1:e.start.y,x2:e.end.x,y2:e.end.y,className:Of().line})))):null};class Tf extends c.Component{constructor(e){super(e),(0,o.Z)(this,"pageRef",c.createRef()),(0,o.Z)(this,"_handleOverviewRenderFinished",(()=>{this.setState({isOverviewRendered:!0}),this.props.onInitialOverviewRenderFinished&&this.props.onInitialOverviewRenderFinished(this.props.page.pageIndex)})),(0,o.Z)(this,"_handleScroll",(e=>{this.pageRef.current&&(this.pageRef.current.scrollTop=0,this.pageRef.current.scrollLeft=0),e.stopPropagation(),e.preventDefault()})),(0,o.Z)(this,"_handleOnPressEmit",((e,t)=>{const n={pageIndex:this.props.page.pageIndex,point:t,nativeEvent:e.nativeEvent};this.props.eventEmitter.emit("page.press",n)})),(0,o.Z)(this,"onCropAreaChangeComplete",(e=>{const t=(0,vr.kI)(e,this.props.page.pageSize,this.props.viewportState.pagesRotation),n={cropBox:t,pageIndex:this.props.page.pageIndex};this.props.eventEmitter.emit("cropArea.changeStop",n),this.props.onCropChange(t,this.props.page.pageIndex)})),(0,o.Z)(this,"onCropAreaChangeStart",(e=>{const t=(0,vr.kI)(e,this.props.page.pageSize,this.props.viewportState.pagesRotation),n={cropBox:t,pageIndex:this.props.page.pageIndex};this.props.eventEmitter.emit("cropArea.changeStart",n),this.props.onCropChange(t,this.props.page.pageIndex)})),(0,o.Z)(this,"createWidgetAnnotation",(e=>{var t,n,o;e.stopPropagation(),this.props.dispatch((t=this.props.page.pageIndex,n=[e.pageX,e.pageY],o=this.props.intl,async(e,r)=>{const{interactionMode:a,viewportState:l,onWidgetAnnotationCreationStart:c,changeManager:u}=r();xf++;const d=(0,H.Ek)(l,t),p=(0,_.xc)();(0,s.kG)(a,"interactionMode is not defined");const f=Ef[a],h=new Date;let m,g=new w.x_(Pf(Pf({id:p,formFieldName:`${a}_${(0,Ya.C)()}`,boundingBox:new w.UL({left:n[0],top:n[1],width:f[0],height:f[1]}).apply(d),pageIndex:t,createdAt:h,updatedAt:h,fontSize:12},a===N.A.BUTTON_WIDGET?{backgroundColor:w.Il.BLUE,fontColor:w.Il.WHITE}:{}),a===N.A.DATE_WIDGET?{additionalActions:{onFormat:new w.bp({script:'AFDate_FormatEx("yyyy-mm-dd")'})}}:{}));switch(a){case N.A.BUTTON_WIDGET:m=new w.R0({annotationIds:(0,i.aV)([g.id]),name:g.formFieldName,buttonLabel:"Button"});break;case N.A.TEXT_WIDGET:case N.A.DATE_WIDGET:m=new w.$o({annotationIds:(0,i.aV)([g.id]),name:g.formFieldName});break;case N.A.RADIO_BUTTON_WIDGET:m=new w.XQ({annotationIds:(0,i.aV)([g.id]),name:g.formFieldName,options:(0,i.aV)([new w.mv({label:o.formatMessage(Ff.labelX,{arg0:1}),value:`Value ${xf}`})])});break;case N.A.CHECKBOX_WIDGET:m=new w.rF({annotationIds:(0,i.aV)([g.id]),name:g.formFieldName,options:(0,i.aV)([new w.mv({label:o.formatMessage(Ff.labelX,{arg0:1}),value:`Value ${xf}`})])});break;case N.A.SIGNATURE_WIDGET:m=new w.Yo({annotationIds:(0,i.aV)([g.id]),name:g.formFieldName});break;case N.A.LIST_BOX_WIDGET:m=new w.Vi({annotationIds:(0,i.aV)([g.id]),name:g.formFieldName,options:(0,i.aV)([new w.mv({label:"Option 1",value:`Value ${xf}`})])});break;case N.A.COMBO_BOX_WIDGET:m=new w.fB({annotationIds:(0,i.aV)([g.id]),name:g.formFieldName,options:(0,i.aV)([new w.mv({label:"Option 1",value:"Option 1"}),new w.mv({label:"Option 2",value:"Option 2"})])});break;default:throw new Error(`Unknown interaction mode: ${a}`)}if(m=m.set("id",(0,Ya.C)()),c){const e=c(g,m);g=e.annotation||g,m=e.formField||m,(0,s.kG)(g instanceof w.x_,"widgetAnnotation must be an instance of WidgetAnnotation"),(0,s.kG)(m instanceof w.Wi,"formField must be an instance of FormField"),(0,s.kG)(g.formFieldName===m.name,"widgetAnnotation.formFieldName must be equal to formField.name"),(0,s.kG)(t===g.pageIndex,"You are not allowed to change the pageIndex")}e({type:B.vgx,annotationId:g.id}),null==u||u.create([g,m]),e((0,Qn.el)()),e((0,De.J4)((0,i.l4)([g.id]),R.o.SELECTED))}))})),this._textLinesPromise=null,this._cancelTextPromise=null,this.state={hasBeenInViewport:e.inViewport,isOverviewRendered:!e.renderPagePreview}}shouldComponentUpdate(e,t){return!!e.page&&(this.props.isReused!==e.isReused||(this.props.page.pageIndex!==e.page.pageIndex||(!(!e.inViewport||this.props.inViewport)||(!(e.inViewport||!this.props.inViewport)||(e.shouldPrerender!==this.props.shouldPrerender||(e.inViewport?Ce.O.call(this,e,t):this.props.interactionMode===N.A.CONTENT_EDITOR&&e.interactionMode!==N.A.CONTENT_EDITOR||this.props.viewportState.zoomLevel!==e.viewportState.zoomLevel))))))}UNSAFE_componentWillReceiveProps(e){e.inViewport&&!this.state.hasBeenInViewport&&this.setState({hasBeenInViewport:!0})}UNSAFE_componentWillMount(){(this.props.inViewport||this.props.shouldPrerender)&&this.componentWillEnterViewport(this.props),this.props.inViewport&&this.setState({hasBeenInViewport:!0})}UNSAFE_componentWillUpdate(e){this.props.isReused?(this._resetTextLines(),this._fetchPageContent(e)):!this.props.inViewport&&e.inViewport||e.shouldPrerender?this.componentWillEnterViewport(e):this.props.inViewport&&!e.inViewport&&this.componentWillExitViewport()}componentDidUpdate(e){this.state.isOverviewRendered&&this.props.onInitialOverviewRenderFinished&&this.props.parent!==e.parent&&this.props.onInitialOverviewRenderFinished(this.props.page.pageIndex)}componentWillEnterViewport(e){this._fetchPageContent(e)}_fetchPageContent(e){e.annotationManager.loadAnnotationsForPageIndex(e.page.pageIndex),null==e.page.textLines&&null==this._textLinesPromise&&this.fetchTextLinesForProps(e)}componentWillExitViewport(){this._resetTextLines()}_resetTextLines(){this._textLinesPromise&&this._cancelTextPromise&&(this._cancelTextPromise(),this._textLinesPromise=null)}async fetchTextLinesForProps(e){if(!this.props.enableTextLoading||this.props.interactionMode===N.A.CONTENT_EDITOR)return void e.dispatch((0,gp.Lv)(e.page.pageIndex,(0,i.aV)()));const{promise:t,cancel:n}=e.backend.getTextContentTreeForPageIndex(e.page.pageIndex);this._textLinesPromise=t,this._cancelTextPromise=n;try{const t=await this._textLinesPromise;e.dispatch((0,gp.Lv)(e.page.pageIndex,t))}catch(e){if(e&&!e.aborted)throw e}}isWithinRange(){const{page:{pageIndex:e},viewportState:{currentPageIndex:t}}=this.props;return e>=Math.min(0,t-2)&&e<=t+2}render(){const{props:e}=this,{page:t,intl:n,innerRef:o,viewportState:r,frameWindow:i,cropInfo:a}=e,{formatMessage:s}=n,l={width:t.pageSize.width*r.zoomLevel,height:t.pageSize.height*r.zoomLevel};let u={height:l.height,width:l.width,transform:b.sl.IDENTITY.rotate(-r.pagesRotation).toCssValue()};if(90===r.pagesRotation||270===r.pagesRotation){const e=(l.height-l.width)/2;u={height:l.width,width:l.height,transform:b.sl.IDENTITY.rotate(r.pagesRotation).translate({x:-e,y:e}).toCssValue()}}const p=d()({"PSPDFKit-Page":!0,[`PSPDFKit-Page-Rotation-${r.pagesRotation}-degree`]:!0,[Cf().root]:!0,[Cf()["deg-"+r.pagesRotation]]:!0,[Cf().textHighlighterMode]:e.interactionMode===N.A.TEXT_HIGHLIGHTER||e.interactionMode===N.A.REDACT_TEXT_HIGHLIGHTER,[Cf().hideCursor]:(0,Ze.o6)(e.interactionMode)});return t?c.createElement("section",{className:p,style:l,ref:this.pageRef,"data-page-index":t.pageIndex,"data-page-is-loaded":null!==t.textLines,onScroll:this._handleScroll,key:t.pageKey,"aria-label":s(Ff.pageX,{arg0:t.pageLabel||t.pageIndex+1})},c.createElement("div",{tabIndex:e.documentHasActiveAnnotation?-1:0,className:Cf().focusPage,ref:o}),this.state.hasBeenInViewport&&this.state.isOverviewRendered&&t.textLines?null:c.createElement(q.TX,null,s(ke.Z.loading)),c.createElement(Tp,{pageIndex:t.pageIndex,onEmit:this._handleOnPressEmit,element:"div"},(this.state.hasBeenInViewport||this.state.isOverviewRendered||e.shouldPrerender)&&c.createElement(Op.Z,{inViewport:e.inViewport,shouldPrerender:!e.inViewport&&e.shouldPrerender,page:t,backend:e.backend,zoomLevel:r.zoomLevel,rotation:r.pagesRotation,renderPageCallback:e.renderPageCallback,onInitialOverviewRenderFinished:this._handleOverviewRenderFinished,allowedTileScales:e.allowedTileScales,viewportRect:r.viewportRect,forceDetailView:!1,renderPagePreview:e.renderPagePreview,isPageSizeReal:e.isPageSizeReal,inContentEditorMode:e.interactionMode===N.A.CONTENT_EDITOR}),e.interactionMode===N.A.CONTENT_EDITOR&&e.inViewport&&c.createElement(wf,{backend:e.backend,zoomLevel:r.zoomLevel,page:t,frameWindow:i}),this.props.hintLinesPageIndex===t.pageIndex?c.createElement(Af,{pageSize:t.pageSize}):null,this.state.hasBeenInViewport&&this.state.isOverviewRendered&&c.createElement(c.Fragment,null,c.createElement(_p,{pageIndex:t.pageIndex,zoomLevel:r.zoomLevel}),c.createElement(hc.Consumer,null,(n=>c.createElement(bp,{page:t,getScrollElement:n,setGlobalCursor:this.props.setGlobalCursor},t.textLines?c.createElement(jp,{dispatch:e.dispatch,enableTextSelection:e.enableTextSelection,zoomLevel:r.zoomLevel,rotation:r.pagesRotation,eventEmitter:e.eventEmitter,isTextCopyingAllowed:e.isTextCopyingAllowed,isPanModeEnabled:e.isPanModeEnabled,pageIndex:t.pageIndex,textLines:t.textLines,textLineScales:t.textLineScales}):null))),e.interactionMode===N.A.MARQUEE_ZOOM?c.createElement(Gp,{pageIndex:t.pageIndex,pageSize:t.pageSize,scrollElement:e.scrollElement}):null,e.customOverlayItems.size>0&&c.createElement("div",null,e.customOverlayItems.map((e=>c.createElement(kp,{key:e.id,item:e,rotation:r.pagesRotation,zoomLevel:r.zoomLevel})))))),e.interactionMode===N.A.DOCUMENT_CROP&&(null===a&&this.isWithinRange()||(null==a?void 0:a.pageIndex)===t.pageIndex)&&c.createElement("div",{style:u},c.createElement(Ua,{viewportState:r,page:this.props.page,onAreaChangeComplete:this.onCropAreaChangeComplete,frameWindow:i,onAreaChangeStart:this.onCropAreaChangeStart})),(0,Ze.o6)(e.interactionMode)&&c.createElement("div",{style:u},c.createElement($p,{frameWindow:i,pageRef:this.pageRef,interactionMode:e.interactionMode,pageIndex:t.pageIndex,onCreate:this.createWidgetAnnotation,intl:e.intl}))):null}}const If=(0,Se.XN)(Tf),Ff=(0,Se.vU)({pageX:{id:"pageX",defaultMessage:"Page {arg0}",description:"Current page"},labelX:{id:"labelX",defaultMessage:"Label {arg0}",description:"Label"}});const Mf=(0,Zn.x)((function(e,t){var n;const o=e.pages.get(t.pageIndex),r=(null==o?void 0:o.customOverlayItemIds.map((t=>e.customOverlayItems.get(t))).toList())||null;return{frameWindow:e.frameWindow,enableTextLoading:(0,Kn.$Q)(e),enableTextSelection:e.interactionMode!==N.A.PAN,annotationManager:e.annotationManager,backend:e.backend,customOverlayItems:r,eventEmitter:e.eventEmitter,page:o,isTextCopyingAllowed:(0,Kn.HI)(e),renderPageCallback:e.renderPageCallback,interactionMode:e.interactionMode,documentHasActiveAnnotation:e.selectedAnnotationIds.size>0,allowedTileScales:e.allowedTileScales,isPanModeEnabled:e.interactionMode===N.A.PAN&&!Ke.Ni,viewportState:e.viewportState,scrollElement:e.scrollElement,isReused:!!e.reuseState,renderPagePreview:e.renderPagePreview,isPageSizeReal:e.firstCurrentPageIndex===t.pageIndex||e.arePageSizesLoaded,hintLinesPageIndex:null===(n=e.hintLines)||void 0===n?void 0:n.pageIndex}}))(If);class _f extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"spreadRef",c.createRef()),(0,o.Z)(this,"shouldComponentUpdate",Ce.O),(0,o.Z)(this,"pageIndexesWaitingForRender",(0,ys.P1)(this.props.viewportState,this.props.spreadIndex)),(0,o.Z)(this,"_handleOverviewRenderFinished",(e=>{if(this.props.onOverviewRenderFinished){const t=this.pageIndexesWaitingForRender.indexOf(e);t>-1&&this.pageIndexesWaitingForRender.splice(t,1),0===this.pageIndexesWaitingForRender.length&&this.props.onOverviewRenderFinished&&this.props.onOverviewRenderFinished(this.props.spreadIndex)}}))}render(){const{spreadIndex:e,viewportState:t,inViewport:n,shouldPrerender:o,onCropChange:r,cropInfo:i}=this.props,a=(0,ys.Xk)(t,e);return c.createElement("div",{style:{width:a.width*t.zoomLevel,height:a.height*t.zoomLevel},hidden:this.props.hidden},(0,ys.P1)(t,e).map((a=>{const s=(0,H.DB)(b.sl.IDENTITY,t,a,e,t.zoomLevel),l=this.props.pageKeys.get(a);return c.createElement("div",{key:l,style:{transform:s.toCssValue(!0),transformOrigin:"0 0",position:"absolute"}},c.createElement(ce.Reparent,{id:`page-${l}`},c.createElement(Mf,{pageIndex:a,inViewport:n,shouldPrerender:o,viewportRect:t.viewportRect,onInitialOverviewRenderFinished:this._handleOverviewRenderFinished,innerRef:this.props.innerRef,parent:this.spreadRef,onCropChange:r,cropInfo:i,setGlobalCursor:this.props.setGlobalCursor})))})))}}var Nf=n(40045),Rf=n(77973);const Lf=c.memo((function(e){const{viewportState:t}=e,{lastScrollUsingKeyboard:n}=t,o=c.useRef(null),r=(0,ys.dF)(t,t.currentPageIndex),[i,a]=(0,ys.wU)(t,r);return c.useEffect((()=>{r-Be.J8>0&&o.current&&n&&o.current.focus({preventScroll:!0})}),[r,n]),0===t.viewportRect.width||0===t.viewportRect.height?null:c.createElement(Nf.Z,{dispatch:e.dispatch,viewportState:t},c.createElement("div",null,function(){const{viewportState:t,viewportState:{viewportRect:n,scrollPosition:s,zoomLevel:l},onCropChange:u,cropInfo:d}=e,p=(0,ys.kd)(t),f=s.y,h=s.y+n.height/l,m=(0,ys.Ad)(t);let g=0,v=0;const y=[];for(let n=0;n<p;n++){const s=(0,ys.Xk)(t,n);v=g+s.height;const p=g<h&&v>f,w=(m-s.width)/2,S=new b.UL({left:w,top:g,width:s.width,height:s.height}).scale(l),P={left:S.left,top:S.top,width:S.width,height:S.height,position:"absolute"};if(v+=t.spreadSpacing,g=v,(0,ys.wX)(n,r)){const s=n===r,l=(0,ys.nw)(t)===Rf.X.DOUBLE?n.toString():e.pageKeys.get(n);y.push(c.createElement("div",{key:l,className:"PSPDFKit-Spread",style:P,"data-spread-index":n},c.createElement(_f,{spreadIndex:n,viewportState:t,inViewport:p,shouldPrerender:!s&&"number"==typeof i&&r===i,onOverviewRenderFinished:a,innerRef:s?o:void 0,onCropChange:u,cropInfo:d,pageKeys:e.pageKeys,setGlobalCursor:e.setGlobalCursor})))}}return y}()))}));var Bf=n(87222),jf=n(74305);function zf(){return zf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},zf.apply(this,arguments)}var Kf=n(53912),Zf=n(47257),Uf=n(20026),Vf=n(84178);function Gf(){return Gf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Gf.apply(this,arguments)}const Wf="horizontal",qf=["horizontal","vertical"],Hf=(0,c.forwardRef)(((e,t)=>{const{decorative:n,orientation:o=Wf,...r}=e,i=$f(o)?o:Wf,a=n?{role:"none"}:{"aria-orientation":"vertical"===i?i:void 0,role:"separator"};return(0,c.createElement)(Vf.WV.div,Gf({"data-orientation":i},a,r,{ref:t}))}));function $f(e){return qf.includes(e)}Hf.propTypes={orientation(e,t,n){const o=e[t],r=String(o);return o&&!$f(o)?new Error(function(e,t){return`Invalid prop \`orientation\` of value \`${e}\` supplied to \`${t}\`, expected one of:\n - horizontal\n - vertical\n\nDefaulting to \`${Wf}\`.`}(r,n)):null}};const Xf=Hf;function Yf(){return Yf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Yf.apply(this,arguments)}function Jf(){return Jf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Jf.apply(this,arguments)}var Qf=n(16180);const eh=(0,c.forwardRef)(((e,t)=>{const{pressed:n,defaultPressed:o=!1,onPressedChange:r,...i}=e,[a=!1,s]=(0,Qf.T)({prop:n,onChange:r,defaultProp:o});return(0,c.createElement)(Vf.WV.button,Jf({type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0},i,{ref:t,onClick:(0,Kf.M)(e.onClick,(()=>{e.disabled||s(!a)}))}))}));var th=n(69409);const nh="ToggleGroup",[oh,rh]=(0,Zf.b)(nh,[Uf.Pc]),ih=(0,Uf.Pc)(),ah=c.forwardRef(((e,t)=>{const{type:n,...o}=e;if("single"===n){const e=o;return c.createElement(ch,Yf({},e,{ref:t}))}if("multiple"===n){const e=o;return c.createElement(uh,Yf({},e,{ref:t}))}throw new Error("Missing prop `type` expected on `ToggleGroup`")})),[sh,lh]=oh(nh),ch=c.forwardRef(((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=(()=>{}),...i}=e,[a,s]=(0,Qf.T)({prop:n,defaultProp:o,onChange:r});return c.createElement(sh,{scope:e.__scopeToggleGroup,type:"single",value:a?[a]:[],onItemActivate:s,onItemDeactivate:c.useCallback((()=>s("")),[s])},c.createElement(fh,Yf({},i,{ref:t})))})),uh=c.forwardRef(((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=(()=>{}),...i}=e,[a=[],s]=(0,Qf.T)({prop:n,defaultProp:o,onChange:r}),l=c.useCallback((e=>s(((t=[])=>[...t,e]))),[s]),u=c.useCallback((e=>s(((t=[])=>t.filter((t=>t!==e))))),[s]);return c.createElement(sh,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:l,onItemDeactivate:u},c.createElement(fh,Yf({},i,{ref:t})))})),[dh,ph]=oh(nh),fh=c.forwardRef(((e,t)=>{const{__scopeToggleGroup:n,disabled:o=!1,rovingFocus:r=!0,orientation:i,dir:a,loop:s=!0,...l}=e,u=ih(n),d=(0,th.gm)(a),p={role:"group",dir:d,...l};return c.createElement(dh,{scope:n,rovingFocus:r,disabled:o},r?c.createElement(Uf.fC,Yf({asChild:!0},u,{orientation:i,dir:d,loop:s}),c.createElement(Vf.WV.div,Yf({},p,{ref:t}))):c.createElement(Vf.WV.div,Yf({},p,{ref:t})))})),hh="ToggleGroupItem",mh=c.forwardRef(((e,t)=>{const n=lh(hh,e.__scopeToggleGroup),o=ph(hh,e.__scopeToggleGroup),r=ih(e.__scopeToggleGroup),i=n.value.includes(e.value),a=o.disabled||e.disabled,s={...e,pressed:i,disabled:a},l=c.useRef(null);return o.rovingFocus?c.createElement(Uf.ck,Yf({asChild:!0},r,{focusable:!a,active:i,ref:l}),c.createElement(gh,Yf({},s,{ref:t}))):c.createElement(gh,Yf({},s,{ref:t}))})),gh=c.forwardRef(((e,t)=>{const{__scopeToggleGroup:n,value:o,...r}=e,i=lh(hh,n),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s="single"===i.type?a:void 0;return c.createElement(eh,Yf({},s,r,{ref:t,onPressedChange:e=>{e?i.onItemActivate(o):i.onItemDeactivate(o)}}))})),vh=ah,yh=mh,bh="Toolbar",[wh,Sh]=(0,Zf.b)(bh,[Uf.Pc,rh]),Ph=(0,Uf.Pc)(),Eh=rh(),[xh,Dh]=wh(bh),Ch=(0,c.forwardRef)(((e,t)=>{const{__scopeToolbar:n,orientation:o="horizontal",dir:r,loop:i=!0,...a}=e,s=Ph(n),l=(0,th.gm)(r);return(0,c.createElement)(xh,{scope:n,orientation:o,dir:l},(0,c.createElement)(Uf.fC,zf({asChild:!0},s,{orientation:o,dir:l,loop:i}),(0,c.createElement)(Vf.WV.div,zf({role:"toolbar","aria-orientation":o,dir:l},a,{ref:t}))))})),kh="ToolbarSeparator",Oh=(0,c.forwardRef)(((e,t)=>{const{__scopeToolbar:n,...o}=e,r=Dh(kh,n);return(0,c.createElement)(Xf,zf({orientation:"horizontal"===r.orientation?"vertical":"horizontal"},o,{ref:t}))})),Ah=(0,c.forwardRef)(((e,t)=>{const{__scopeToolbar:n,...o}=e,r=Ph(n);return(0,c.createElement)(Uf.ck,zf({asChild:!0},r,{focusable:!e.disabled}),(0,c.createElement)(Vf.WV.button,zf({type:"button"},o,{ref:t})))})),Th="ToolbarToggleGroup",Ih=(0,c.forwardRef)(((e,t)=>{const{__scopeToolbar:n,...o}=e,r=Dh(Th,n),i=Eh(n);return(0,c.createElement)(vh,zf({"data-orientation":r.orientation,dir:r.dir},i,o,{ref:t,rovingFocus:!1}))})),Fh=(0,c.forwardRef)(((e,t)=>{const{__scopeToolbar:n,...o}=e,r=Eh(n),i={__scopeToolbar:e.__scopeToolbar};return(0,c.createElement)(Ah,zf({asChild:!0},i),(0,c.createElement)(yh,zf({},r,o,{ref:t})))})),Mh=Ch,_h=Oh,Nh=Ah,Rh=Ih,Lh=Fh;var Bh,jh=n(12921),zh=n(54941);const Kh=e=>{let{rect:t,onInteractOutside:n,onEscapeKeyDown:o,children:r,onOpenAutoFocus:i,contentClassName:a}=e;return c.createElement(zh.fC,{open:!!t},c.createElement(zh.ee,{style:{position:"absolute",left:null==t?void 0:t.left,top:null==t?void 0:t.top,width:null==t?void 0:t.width,height:null==t?void 0:t.height,visibility:"hidden"}},Bh||(Bh=c.createElement("div",null,"Demo"))),c.createElement(zh.VY,{sideOffset:10,onInteractOutside:n,onOpenAutoFocus:i,onEscapeKeyDown:o,className:a},r))};var Zh=n(14526),Uh=n.n(Zh),Vh=n(42308),Gh=n(66489),Wh=n.n(Gh),qh=n(23756),Hh=n.n(qh);const $h=["label","errorMessage","inputClassName","className","disablePadding"];function Xh(e){let{label:t,errorMessage:n,inputClassName:o,className:r,disablePadding:i}=e,a=(0,ne.Z)(e,$h);return c.createElement("div",{className:d()(!i&&Hh().wrapper,r)},c.createElement("label",{className:Hh().label},t,a.required&&"*",c.createElement(q.oi,(0,ue.Z)({},a,{className:d()(Hh().input,{[Hh().inputError]:!!n},o)}))),n&&c.createElement("span",{className:Hh().errorLabel},n))}var Yh=n(51205);const Jh={uri:"uri",page:"page"},Qh="edit",em="hover",tm="open";function nm(e){if(!e.action)return null;const t=e.action;return t instanceof w.lm?t.uri:t.pageIndex+1}function om(e){return c.createElement("div",{className:d()(Wh().container)},c.createElement("div",{className:Wh().innerContainer},c.createElement("div",{className:Wh().content},c.createElement(rm,e))))}function rm(e){var t,o;let{pages:r,dispatch:i,annotation:a}=e;const s=(0,Se.YB)(),l=a.action instanceof w.Di,u=a.action instanceof w.lm;let d;l&&(d=a.action),u&&(d=a.action);const p=(0,c.useMemo)((()=>!u&&!l||u?Jh.uri:Jh.page),[l,u]),[f,h]=(0,c.useState)(p),[m,g]=(0,c.useState)((null===(t=d)||void 0===t?void 0:t.uri)||""),[v,y]=(0,c.useState)((null===(o=d)||void 0===o?void 0:o.pageIndex)+1||""),[b,S]=(0,c.useState)(""),P=f===Jh.uri,E=(0,c.useCallback)((e=>r.get(e-1)),[r]),x=(0,c.useCallback)((()=>{const e=Number(v);if(e)if(E(e)){const t=new w.Di({pageIndex:e-1}),n=a.set("action",t);i((0,bt.FG)(n))}else S(s.formatMessage(am.invalidPageNumber));else S(s.formatMessage(am.invalidPageNumber))}),[a,i,v,E]),D=(0,c.useCallback)((()=>{if(!m)return void S(s.formatMessage(am.invalidPageLink));const e=new w.lm({uri:m}),t=a.set("action",e);i((0,bt.FG)(t))}),[a,i,m]),C=(0,c.useCallback)((()=>{if(P)return c.createElement(Xh,{label:s.formatMessage(ke.Z.linkAnnotation),value:m,onChange:e=>{g(e.target.value),S("")},onBlur:D,errorMessage:b,placeholder:"www.example.com",disablePadding:!0})}),[b,s,P,m,D]),k=(0,c.useCallback)((()=>{if(!P)return c.createElement(Xh,{disablePadding:!0,label:s.formatMessage(am.targetPageLink),value:v,onChange:e=>{y(e.target.value),b&&S("")},onBlur:x,placeholder:"1",errorMessage:b})}),[b,s,P,v,x]);return c.createElement(c.Fragment,null,c.createElement("label",{className:Wh().label},s.formatMessage(am.linkTo),c.createElement(q.Ee,{inputName:"LinkTo",label:s.formatMessage(ke.Z.horizontalAlignment),selectedOption:f,labelClassNamePrefix:"PSPDFKit-Link-Popover-Editor-LinkTo",wrapperClasses:Wh().radioGroupWrapper,options:Object.keys(Jh).map((e=>({value:e,label:s.formatMessage(am[`${e}Link`]),iconPath:n(11379)}))),onChange:e=>{h(Jh[e]),b&&S("")},isButton:!0,showLabel:!0})),C(),k())}function im(e){const{viewportState:t,isHidden:n,annotation:o,isHover:r,dispatch:i}=e,a=(0,Se.YB)(),[s,l]=(0,c.useState)(!1),u=(0,c.useMemo)((()=>(0,bi.q)((0,_.Wj)(o,t.pagesRotation,t.viewportRect.getSize()).apply((0,H.cr)(t,t.currentPageIndex).translate(t.scrollPosition.scale(t.zoomLevel))),t.viewportRect.getSize())),[o,t]),p=(0,c.useMemo)((()=>o&&r?em:o&&!o.action||s?Qh:tm),[o,r,s]),f=(null==o?void 0:o.action)instanceof w.lm,h=(0,c.useMemo)((()=>p===Qh?a.formatMessage(am.linkSettingsPopoverTitle):f?nm(o):`${a.formatMessage(am.linkToPage,{arg0:nm(o)})}: ${nm(o)}`),[o,p,a]),m=(0,c.useCallback)((t=>{if(t){const e=o.action instanceof w.lm;return c.createElement("div",{className:d()(Wh().container)},c.createElement("div",{className:Wh().contentRow},c.createElement(q.zx,{className:d()("PSPDFKit-Link-Popover-Editor-Edit-Button"),onClick:()=>l(!0)},a.formatMessage(ke.Z.edit)),c.createElement(q.zx,{className:d()("PSPDFKit-Link-Popover-Editor-Open-Button"),onClick:()=>{i((0,De.fz)()),i((0,gr.oo)(o))},primary:!0},a.formatMessage(e?am.openLink:am.goToPageLink))))}return c.createElement(om,e)}),[o,i,a,e]),g=(0,c.useCallback)((()=>{switch(p){case Qh:return m();case tm:return m(!0);default:return null}}),[p,m]);return c.createElement(Yh.Z,{referenceRect:u,viewportState:t,isHidden:n,className:"PSPDFKit-Link-Editor-Popover",wrapperClassName:"PSPDFKit-Link-Editor",title:h,centeredTitle:p!==Qh},g())}const am=(0,Se.vU)({linkSettingsPopoverTitle:{id:"linkSettingsPopoverTitle",defaultMessage:"Link Settings",description:"Link settings popover title"},linkTo:{id:"linkTo",defaultMessage:"Link To",description:"Link to popover option"},linkToPage:{id:"linkToPage",defaultMessage:"Link to Page",description:"Link to page action"},targetPageLink:{id:"targetPageLink",defaultMessage:"Page Number",description:"Link settings popover target link"},linkSettings:{id:"linkSettings",defaultMessage:"Link Settings",description:"Link Settings"},uriLink:{id:"uriLink",defaultMessage:"Website",description:"Link to uri"},pageLink:{id:"pageLink",defaultMessage:"Page",description:"Link to a page"},openLink:{id:"openLink",defaultMessage:"Open Link",description:"Open link to a page"},goToPageLink:{id:"goToPageLink",defaultMessage:"Go to Page",description:"Go to a page link"},invalidPageNumber:{id:"invalidPageNumber",defaultMessage:"Enter a valid page number.",description:"Invalid page number"},invalidPageLink:{id:"invalidPageLink",defaultMessage:"Enter a valid page link.",description:"Invalid page link"}}),sm=e=>{var t,o;let{editor:r,closeInlineToolbar:i,container:a}=e;const l=(0,c.useCallback)((e=>{const[t]=Vh.ML.nodes(e,{match:e=>!Vh.ML.isEditor(e)&&Vh.W_.isElement(e)&&"link"===e.type});return t}),[]),u=(0,c.useRef)(r&&(null===(t=l(r))||void 0===t||null===(t=t[0])||void 0===t?void 0:t.url)),[p,f]=c.useState(r?null===(o=l(r))||void 0===o||null===(o=o[0])||void 0===o?void 0:o.url:""),[h,m]=c.useState(!1),[g,v]=c.useState(!1),{formatMessage:y}=(0,Se.YB)(),b=c.useCallback((e=>{f(e.target.value)}),[f]),w=(0,c.useCallback)((e=>{Vh.YR.unwrapNodes(e,{match:e=>!Vh.ML.isEditor(e)&&Vh.W_.isElement(e)&&"link"===e.type})}),[]),S=(0,c.useCallback)((e=>{if(!r)return;l(r)&&q.ri.unwrapNode(r,"link");const{selection:t}=r,n=t&&Vh.e6.isCollapsed(t);q.ri.wrapNode(r,{type:"link",url:e,children:n?[{text:e,type:"text"}]:[]})}),[r,l]),P=c.useCallback((()=>{(0,s.kG)(r),p?S(p):w(r),i()}),[r,p,i,w,S]),E=c.useCallback((()=>{(0,s.kG)(r),w(r),i()}),[r,w,i]),x=c.useCallback((()=>!u.current||g?c.createElement("div",null,c.createElement("label",{htmlFor:"linkUrl"},y(ke.Z.linkAnnotation)),c.createElement("input",{id:"linkUrl",placeholder:"https://yourdomain.com",value:p,type:"url",onChange:b,onKeyPress:e=>{"Enter"===e.key&&P()}})):c.createElement("div",{className:d()(Uh().linkEditorMenu)},c.createElement("div",{className:d()(Uh().linkEditorRow,Uh().linkEditorCenteredRow)},c.createElement(q.zx,{className:d()("PSPDFKit-Link-Popover-Editor-Edit-Button",Uh().linkEditorFullWidthButton),onClick:()=>v(!0)},y(ke.Z.edit)),c.createElement(q.zx,{className:d()("PSPDFKit-Link-Popover-Editor-Open-Button",Uh().linkEditorFullWidthButton),onClick:E,primary:!0},y(lm.removeLink))))),[y,b,g,p,E]),D=c.useCallback((()=>u.current&&!g?null:g?c.createElement("div",{className:d()(Uh().linkSaveContainer,Uh().linkEditorMenu)},c.createElement("div",{className:d()(Uh().linkEditorRow,Uh().linkEditorEndAlignedRow)},c.createElement(q.zx,{className:d()("PSPDFKit-Link-Popover-Editor-Edit-Button",Uh().linkEditorFooterButton),onClick:()=>v(!1)},y(ke.Z.cancel)),c.createElement(q.zx,{className:d()("PSPDFKit-Link-Popover-Editor-Open-Button",Uh().linkEditorFooterButton),onClick:P,primary:!0},y(ke.Z.save)))):c.createElement("button",{className:Uh().removeLink,disabled:!p&&!u.current||u.current&&u.current===p&&!p,onClick:P},u.current?p&&u.current!==p?y(lm.editLink):y(lm.removeLink):y(lm.addLink))),[y,P,g,p]);return r?c.createElement(jh.fC,{open:h,modal:!1},c.createElement(jh.xz,{asChild:!0},c.createElement(Nh,{onKeyDown:e=>{"Enter"!==e.key&&"Spacebar"!==e.key&&" "!==e.key||(e.nativeEvent.stopImmediatePropagation(),m(!h))},onClick:()=>m(!h),className:d()(Uh().inlineToolbarButton,{[Uh().linkActive]:!!l(r)}),title:y(lm.addLink),"aria-label":y(lm.addLink)},c.createElement(Re.Z,{src:n(55676)}))),c.createElement(jh.Uv,{container:a},c.createElement(jh.VY,{onPointerDownOutside:()=>m(!1),className:d()(Uh().linkEditor,"PSPDFKit-Rich-Link-Editor-Dropdown")},c.createElement("h4",{className:d()(Uh().linkEditorHeader,{[Uh().centeredLinkEditorHeader]:!(g||!u.current)})},g||!u.current?y(am.linkSettings):u.current),x(),D(),c.createElement(jh.Eh,{className:Uh().linkEditorArrow})))):null},lm=(0,Se.vU)({addLink:{id:"addLink",defaultMessage:"Add Link",description:"Add Link"},removeLink:{id:"removeLink",defaultMessage:"Remove Link",description:"Remove Link"},editLink:{id:"editLink",defaultMessage:"Edit Link",description:"Edit Link"}});var cm;function um(e){"Enter"!==e.key&&"Spacebar"!==e.key&&" "!==e.key||e.nativeEvent.stopImmediatePropagation()}const dm=(0,Se.vU)({commentEditorLabel:{id:"commentEditorLabel",defaultMessage:"Add your comment…",description:"Label for comment area textarea"},reply:{id:"reply",defaultMessage:"Reply",description:"Button text for adding a comment reply"}}),pm=e=>{let{name:t,avatarUrl:o,description:r}=e;return c.createElement("div",{className:d()(Uh().mentionDropdownList,{[Uh().mentionDropdownListWithoutDescription]:!r})},o?c.createElement("img",{className:Uh().mentionImg,src:o,alt:t}):c.createElement(Re.Z,{className:Uh().mentionImg,src:n(32443)}),c.createElement("span",{className:Uh().mentionName},t),!!r&&c.createElement("span",{className:Uh().mentionDescription},r))},fm=e=>{let{color:t,onValueChange:n,children:o,includeTransparent:r,label:i,frameWindow:a}=e;const l=rt.Options.COLOR_PRESETS,{formatMessage:u}=(0,Se.YB)(),[p,f]=c.useState(!1);return c.createElement(jh.fC,{open:p,modal:!1},c.createElement(jh.xz,{asChild:!0},c.createElement(Nh,{"aria-label":i,title:i,onKeyDown:e=>{"Enter"!==e.key&&"Spacebar"!==e.key&&" "!==e.key||(e.nativeEvent.stopImmediatePropagation(),f(!p))},onClick:()=>f(!p),className:Uh().inlineToolbarButton},o)),c.createElement(jh.Uv,{container:a.document.body},c.createElement(jh.VY,{align:"start",className:d()(Uh().colorPickerContent,"PSPDFKit-Color-Picker-Dropdown"),asChild:!0,onPointerDownOutside:()=>f(!1),defaultValue:null!=t?t:"transparent"},c.createElement(jh.Ee,{value:null!=t?t:"transparent",onValueChange:n},l.filter((e=>!!e.color&&!e.color.equals(w.Il.TRANSPARENT))).map((e=>{(0,s.kG)(e.color);const t=e.color.toHex();return c.createElement(jh.Rk,{className:Uh().colorPickerItem,value:t,key:t,"aria-label":u(e.localization),title:u(e.localization),asChild:!0},c.createElement("div",{style:{backgroundColor:t}}))})),r&&c.createElement(jh.Rk,{className:Uh().colorPickerItem,value:"transparent",asChild:!0},c.createElement("div",{className:Uh().colorPickerCheckered},cm||(cm=c.createElement("div",null))))))))},hm=e=>{let{comment:t,dispatch:o,isFirstComment:r,keepSelectedTool:a,onEditorInit:l,frameWindow:u,anonymousComments:p,isEditing:f,onChangeDone:h,className:m,mentionableUsers:g,maxMentionSuggestions:v}=e;const y=(0,c.useRef)(t),{formatMessage:b}=(0,Se.YB)(),[w,S]=c.useState(t.text.value&&q.ri.getText(t.text.value).length>0),[P,E]=c.useState(t.text.value||""),x=c.useRef(null),[D,C]=c.useState(null),k=c.useRef(null),[O,A]=c.useState(!1),[T,I]=(0,c.useState)(null),F=(0,c.useRef)(null),M=c.useCallback((()=>{if(f)return;if(P===t.text.value)return;const e=t.set("text",{format:"xhtml",value:P.trim()});o((0,zr.gk)((0,i.aV)([e])))}),[o,t,P,f]),_=c.useCallback((()=>{if(!w)return;let e=t;f&&(e=e.set("text",{format:"xhtml",value:P.trim()})),o((0,zr.BY)(e,y.current));const n=e.rootId;(0,s.kG)(n),f||o((0,zr.mh)(n)),r&&o((0,De.Df)((0,i.l4)([n]),null)),a&&o((0,Kt.k6)()),null==h||h()}),[o,t,r,w,f,P,a,h]),N=c.useCallback((()=>{const e=t.set("isAnonymous",!t.isAnonymous);o((0,zr.gk)((0,i.aV)([e])))}),[t,o]),R=c.useCallback((e=>{O&&!e||((0,s.kG)(x.current),C(null),I(null),x.current.selection=null,jf.F3.focus(x.current))}),[x.current,O]),L=(0,c.useCallback)((()=>{const e=x.current,t=u.getSelection();if(null==e||!e.selection||!k.current||!k.current.contains(null==t?void 0:t.anchorNode))return;if(!q.ri.isRangeSelected(e))return C(null),void I(null);const n=jf.F3.toDOMRange(e,e.selection).getBoundingClientRect(),o=k.current.getBoundingClientRect();I({fontColor:(0,hn.BK)(q.ri.getSelectedNodesColor(e,"fontColor")),backgroundColor:(0,hn.BK)(q.ri.getSelectedNodesColor(e,"backgroundColor")),inlineFormat:["bold","italic","underline"].map((t=>"underline"===t?q.ri.isSelectionUnderlined(e):q.ri.isMarkActive(e,t)?t:null)).filter(Boolean)}),C({height:n.height,width:n.width,top:n.top-o.top,left:n.left-o.left})}),[u]);(0,c.useEffect)((()=>{var e,t,n;const o=x.current;if(!o)return;function r(e){"Escape"===e.key?(R(!0),q.ri.isRangeSelected(o)&&(e.preventDefault(),e.stopPropagation())):"Tab"===e.key&&(e.preventDefault(),e.stopPropagation())}function i(e){"keyup"===e.type&&A(!0)}const a=(0,Jl.Z)(L,50);return u.document.addEventListener("selectionchange",i),u.document.addEventListener("keyup",r,{capture:!0}),null===(e=k.current)||void 0===e||e.addEventListener("pointerup",L),null===(t=k.current)||void 0===t||t.addEventListener("keyup",a),null===(n=k.current)||void 0===n||n.addEventListener("dblclick",a),()=>{var e,t,n;u.document.removeEventListener("selectionchange",i),u.document.removeEventListener("keyup",r,{capture:!0}),null===(e=k.current)||void 0===e||e.removeEventListener("pointerup",L),null===(t=k.current)||void 0===t||t.removeEventListener("keyup",a),null===(n=k.current)||void 0===n||n.removeEventListener("dblclick",a)}}),[R,u.document,L]);const B=c.useCallback((e=>{null==l||l(e),x.current=e}),[l]),j=e=>{const t=x.current;(0,s.kG)(t),q.ri.toggleMark(t,e),R()},z=c.useCallback((e=>{E(e),S(q.ri.getText(e).length>0)}),[E,S]);return c.createElement("div",{className:d()(Uh().commentWrapper,m,"PSPDFKit-Comment-Editor")},c.createElement("div",{ref:k,style:{position:"relative"},onBlur:M},c.createElement(q.Hp,{title:b(dm.commentEditorLabel),users:g,autoFocus:!!r,text:t.text.value||"",onMentionSuggestionsOpenChange:M,onEditorInit:B,onValueChange:z,placeholder:b(dm.commentEditorLabel),className:d()(Uh().commentEditorInput,"PSPDFKit-Comment-Editor-Input"),autoOpenKeyboard:!Ke.TL&&!Ke.Dt,mentionListRenderer:pm,mentionDropdownClassName:Uh().mentionDropdown,mentionListClassName:Uh().mentionDropdownListWrapper,ref:F,maxMentionSuggestions:v}),c.createElement(Kh,{rect:D,onInteractOutside:R,container:u.document.body,onOpenAutoFocus:e=>e.preventDefault(),contentClassName:"PSPDFKit-Comment-Editor-Inline-Toolbar"},c.createElement(Mh,{className:Uh().inlineToolbar},c.createElement(fm,{color:null==T?void 0:T.fontColor,onValueChange:e=>{q.ri.applyStyle(x.current,"fontColor",e),R()},frameWindow:u,label:b(ke.Z.color)},c.createElement("div",{role:"button",className:Uh().inlineToolbarButton},c.createElement(Re.Z,{src:n(19587)}),c.createElement(Re.Z,{className:Uh().caret,src:n(64762)}))),c.createElement(_h,{className:Uh().inlineToolbarSeparator}),c.createElement(fm,{color:null==T?void 0:T.backgroundColor,onValueChange:e=>{q.ri.applyStyle(x.current,"backgroundColor",e),R()},includeTransparent:!0,label:b(ke.Z.fillColor),frameWindow:u},c.createElement("div",{role:"button",className:Uh().inlineToolbarButton},c.createElement(Re.Z,{src:n(59601)}),c.createElement(Re.Z,{className:Uh().caret,src:n(64762)}))),c.createElement(_h,{className:Uh().inlineToolbarSeparator}),c.createElement(Rh,{type:"multiple",value:null==T?void 0:T.inlineFormat,className:Uh().inlineToolbarGroup},c.createElement(Lh,{onClick:()=>{j("bold")},value:"bold",className:Uh().inlineToolbarButton,"aria-label":b(ke.Z.bold),title:b(ke.Z.bold)},c.createElement(Re.Z,{role:"presentation",src:n(99604)})),c.createElement(Lh,{onClick:()=>j("italic"),value:"italic",className:Uh().inlineToolbarButton,"aria-label":b(ke.Z.italic),title:b(ke.Z.italic)},c.createElement(Re.Z,{role:"presentation",src:n(99082)})),c.createElement(Lh,{onClick:()=>j("underline"),value:"underline",className:Uh().inlineToolbarButton,"aria-label":b(ke.Z.underline),title:b(ke.Z.underline)},c.createElement(Re.Z,{role:"presentation",src:n(80394)}))),c.createElement(_h,{className:Uh().inlineToolbarSeparator}),c.createElement(sm,{container:u.document.body,editor:x.current,closeInlineToolbar:R})))),c.createElement("div",{className:Uh().commentEditorActions},c.createElement("div",{className:Uh().commentActionsFooter},!!g.length&&c.createElement("button",{className:Uh().commentEditorAction,onClick:()=>{var e;null===(e=F.current)||void 0===e||e.startMention()},title:b(ke.Z.anonymous),"aria-label":b(ke.Z.anonymous)},c.createElement(Re.Z,{role:"presentation",src:n(35122)})),!!p&&c.createElement("button",{className:d()(Uh().commentEditorAction,{[Uh().commentEditorAnonymityActive]:t.isAnonymous}),onClick:N,"aria-checked":!!t.isAnonymous,role:"checkbox",title:b(ke.Z.anonymous),"aria-label":b(ke.Z.anonymous)},c.createElement(Re.Z,{role:"presentation",src:n(15445)}))),c.createElement("div",{className:Uh().editingCommentText},f?c.createElement(c.Fragment,null,c.createElement("button",{type:"button",title:b(ke.Z.discard),"aria-label":b(ke.Z.discard),onClick:h,className:d()(Uh().editingCommentActionButton,Uh().editingCommentActionCancel)},c.createElement(Re.Z,{src:n(4587)})),c.createElement("button",{title:b(ke.Z.edit),"aria-label":b(ke.Z.edit),type:"submit",className:d()(Uh().editingCommentActionButton,Uh().editingCommentActionSave),onClick:_},c.createElement(Re.Z,{src:n(33862)}))):c.createElement("button",{title:b(r?ke.Z.commentAction:dm.reply),"aria-label":b(r?ke.Z.commentAction:dm.reply),className:d()(Uh().editingCommentActionButton,Uh().editingCommentActionSaveNew,"PSPDFKit-Comment-Editor-Save-Button"),disabled:!w,"aria-disabled":!w,onKeyDown:um,onClick:_},c.createElement(Re.Z,{src:n(96447)})))))};var mm,gm,vm=n(37676);const ym=e=>e.children;const bm=(0,a.$j)((function(e,t){return{isReadOnly:(0,Kn.Ez)(t.comment,e),canDeleteCommentCP:!!(0,xr.Ss)(t.comment,e),canEditCommentCP:!!(0,xr.kR)(t.comment,e),dateTimeStringCallback:e.dateTimeString,frameWindow:e.frameWindow,anonymousComments:e.anonymousComments,mentionableUsers:e.mentionableUsers}}))((function(e){const{comment:t,onToggleContent:n,dispatch:o,isGrouped:r,isExpanded:i,isReadOnly:a,canDeleteCommentCP:s,canEditCommentCP:l,dateTimeStringCallback:u,frameWindow:p,anonymousComments:f,mentionableUsers:h,maxMentionSuggestions:m,rootAnnotationIsReadOnly:g,rootAnnotationHasLockedContents:v,rootAnnotationIsLocked:y}=e,{text:b,isAnonymous:w}=t,S=i&&!a&&s,P=i&&!a&&l,[E,x]=c.useState(!1),[D,C]=c.useState(!1);c.useEffect((()=>{!i&&D&&C(!1)}),[i,D]);const k=(0,hn.KY)(b.value||"").length>120,[O,A]=c.useState(!k),T=`Comment-${t.id}`,I=c.useCallback((e=>{k&&(e.stopPropagation(),A(!O),n&&n(!O))}),[O,k,A,n]),F=c.useCallback((()=>{o((0,zr.UM)(t))}),[t,o]),{formatDate:M,formatMessage:_}=(0,Se.YB)();let N="?";null==t.creatorName||t.isAnonymous||(N=t.creatorName.split(" ").map((e=>e[0])).join(" "));const R=_(O?ke.Z.showLess:ke.Z.showMore);let L=null;u&&(L=u({dateTime:t.createdAt,element:wc.Y.COMMENT_THREAD,object:t})),null==L&&(L=M(t.createdAt,{hour12:!0,hour:"numeric",minute:"numeric",month:"short",day:"numeric"}));const B=c.useCallback((e=>{const n=t.set("isAnonymous",!!e);o((0,zr.DO)(n)),C(!1)}),[t,o]),j=c.useMemo((()=>{const e=[];return P&&e.push({content:_(Nc.editContent),onClick:()=>{C(!0)}}),S&&e.push({content:_(ke.Z.delete),onClick:()=>{x(!0)}}),P&&f&&e.push(mm||(mm=c.createElement(q.nB,null)),c.createElement(q.ub,{checked:!!w,onCheckedChange:B},_(ke.Z.anonymous))),e}),[w,S,_,P,B]),z=(0,Oe.Z)({type:"lock",style:{width:12,height:12,flexBasis:12,marginRight:5},className:Uh().icon});return c.createElement("div",{className:d()(Uh().comment,"PSPDFKit-Comment")},c.createElement("div",{className:d()(Uh().header,"PSPDFKit-Comment-Header")},c.createElement("div",{className:Uh().wrapper},!r&&c.createElement("div",{className:d()(Uh().avatar,"PSPDFKit-Comment-Avatar")},c.createElement(ve,{key:t.creatorName,renderer:"CommentAvatar"},c.createElement(ym,{comment:t},c.createElement("span",{title:t.isAnonymous?_(ke.Z.anonymous):t.creatorName||void 0},N)))),c.createElement("div",{className:Uh().nameAndDate},!r&&c.createElement("div",{className:d()(Uh().creatorName,"PSPDFKit-Comment-CreatorName")},w?_(ke.Z.anonymous):t.creatorName||_(ke.Z.anonymous)),c.createElement("time",{dateTime:t.createdAt.toISOString(),className:d()(Uh().commentDate,"PSPDFKit-Comment-CommentDate")},L)),(g||y||v)&&c.createElement("div",{className:Uh().flagWrapper},z,c.createElement("div",{className:Uh().label,"aria-label":_(ke.Z.locked)},_(ke.Z.locked))),!!j.length&&c.createElement(q.N9,{container:null==p?void 0:p.document.body,label:_(Nc.commentOptions),items:j,alignContent:"end",className:Uh().dropdownWrapper}))),D?c.createElement(hm,{maxMentionSuggestions:m,mentionableUsers:h,className:Uh().editingCommentWrapper,comment:t,isEditing:!0,frameWindow:p,anonymousComments:f,dispatch:o,keepSelectedTool:!1,onChangeDone:()=>C(!1)}):c.createElement("div",{className:d()(Uh().commentText,"PSPDFKit-Comment-Text")},c.createElement("div",{onClick:e=>{"A"===e.target.nodeName&&((0,vm.l)(e.target.href,!0),e.stopPropagation(),e.preventDefault())},className:O?void 0:Uh().notExpanded,id:T,dangerouslySetInnerHTML:{__html:b.value||""}})),(S||k)&&c.createElement("div",{className:d()(Uh().commentActions,"PSPDFKit-Comment-Actions")},k?c.createElement(q.w6,{ariaControls:T,onPress:k?I:void 0,expanded:O,className:d()(Uh().commentToggle,"PSPDFKit-Comment-Toggle")},c.createElement("span",{className:Uh().showMore,title:R},R)):gm||(gm=c.createElement("div",null)),S&&E&&c.createElement(_c.Z,{onConfirm:F,onCancel:()=>{x(!1)},accessibilityLabel:_(Nc.deleteCommentConfirmAccessibilityLabel),accessibilityDescription:_(Nc.deleteCommentConfirmAccessibilityDescription)},c.createElement("p",null,_(Nc.deleteCommentConfirmMessage)))))})),wm=bm,Sm=c.forwardRef((function(e,t){const{comments:n,rootId:o,isExpanded:r,dispatch:i,commentThread:a,onUpdate:l,isSelected:u,keepSelectedTool:p,frameWindow:f,anonymousComments:h,mentionableUsers:m,maxMentionSuggestions:g,annotations:v}=e,{formatMessage:y}=(0,Se.YB)(),b=c.useRef(null),w=null==v?void 0:v.get(o),S=c.useRef(u);c.useEffect((()=>{const e=S.current,t=setTimeout((()=>{e&&u&&b.current&&jf.F3.focus(b.current)}),150);return S.current=!1,()=>{t&&clearTimeout(t)}}),[u]);const P=c.useCallback((e=>{null!=l&&l(o,r,e)}),[r,l,o]);return c.createElement("div",{className:d()("PSPDFKit-Comment-Thread",Uh().commentThread,{"PSPDFKit-Comment-Thread-Selected":u,"PSPDFKit-Comment-Thread-Expanded":r}),ref:t},n.map(((t,o)=>{(0,s.kG)(null!==t,"Comment must not be null");const l=0===o;if((0,ol.kT)(t))return c.createElement("div",{className:d()(Uh().commentFooter,Uh().commentFooterEditor),key:`draft-${t.id}`,onFocus:()=>{S.current=!0}},c.createElement(hm,{maxMentionSuggestions:g,mentionableUsers:m,isFirstComment:l,comment:t,dispatch:e.dispatch,onEditorInit:e=>b.current=e,keepSelectedTool:p,frameWindow:f,anonymousComments:h}));const u=o>0&&n.get(o-1),v=!!u&&(u.creatorName!==t.creatorName||t.isAnonymous||u.isAnonymous);return c.createElement(c.Fragment,{key:t.id||void 0},r&&a.size>1&&o>0?c.createElement("div",{className:v?Uh().separatorDifferentAuthor:Uh().separatorSameAuthor}):null,c.createElement(wm,{maxMentionSuggestions:g,isExpanded:r,comment:t,onToggleContent:()=>P(l),isGrouped:0!==o&&!v,dispatch:i,rootAnnotationIsReadOnly:null==w?void 0:w.readOnly,rootAnnotationIsLocked:null==w?void 0:w.locked,rootAnnotationHasLockedContents:null==w?void 0:w.lockedContents}))})),a.size>1&&!r&&c.createElement("div",{className:d()(Uh().commentFooter,Uh().moreComments)},c.createElement("div",null,y(ke.Z.nMoreComments,{arg0:a.size-1})),c.createElement(we.Z,{className:Uh().showMore},y(ke.Z.showMore))))}));var Pm=n(49200);function Em(e){let{selectedAnnotation:t,viewportState:o,keepSelectedTool:r,anonymousComments:l,frameWindow:u,commentThread:p,comments:f,maxMentionSuggestions:h,mentionableUsers:m}=e;const{formatMessage:g}=(0,Se.YB)(),v=(0,a.I0)(),[y,b]=(0,_r.U5)({threshold:.2}),w=c.useRef(null);let S,P;S=t instanceof Pm.Z?(0,bi.q)((0,_.Wj)(t,o.pagesRotation,o.viewportRect.getSize()).apply((0,H.cr)(o,t.pageIndex).translate(o.scrollPosition.scale(o.zoomLevel))),o.viewportRect.getSize()):t.boundingBox.apply((0,H.cr)(o,t.pageIndex).translate(o.scrollPosition.scale(o.zoomLevel)));const E=p.reduce(((e,t)=>{const n=f.get(t);return(0,s.kG)(n),(0,ol.kT)(n)?P=n:e=e.push(n),e}),(0,i.aV)());return c.createElement(Yh.Z,{referenceRect:S,viewportState:o,className:"PSPDFKit-Comment-Thread-Popover",wrapperClassName:d()(Uh().commentThreadPopover,"PSPDFKit-Comment-Thread"),footerClassName:d()(Uh().commentThreadPopoverFooter,{[Uh().commentThreadPopoverFooterEmpty]:0===E.size}),innerWrapperClassName:Uh().innerWrapper,title:g(ke.Z.comment),footer:c.createElement("div",{className:d()(Uh().commentFooter,Uh().commentFooterEditor),key:P.id},c.createElement(hm,{isFirstComment:0===E.size,comment:P,dispatch:v,keepSelectedTool:r,frameWindow:u,anonymousComments:l,maxMentionSuggestions:h,mentionableUsers:m}))},c.createElement("div",{className:Uh().commentThread},E.map(((e,t)=>{const n=t>0&&E.get(t-1),o=!!n&&(n.creatorName!==e.creatorName||e.isAnonymous||n.isAnonymous);return c.createElement(c.Fragment,{key:e.id||void 0},p.size>1&&t>0?c.createElement("div",{ref:t===E.size-1?y:null,className:o?Uh().separatorDifferentAuthor:Uh().separatorSameAuthor}):null,c.createElement("div",{ref:E.size-1===t?e=>{w.current=e,y(e)}:null},c.createElement(wm,{isExpanded:!0,comment:e,isGrouped:0!==t&&!o,dispatch:v,maxMentionSuggestions:h})))})),!1===b.isIntersecting&&c.createElement("div",{className:Uh().moreCommentsContainer},c.createElement("div",{className:Uh().moreCommentsContent,role:"button",onClick:()=>{w.current&&w.current.scrollIntoView({block:"nearest",inline:"nearest"})}},c.createElement(Re.Z,{className:Uh().moreCommentsIcon,src:n(96447)}),g(Nc.moreComments)))))}const xm=c.memo((function(e){let{annotations:t,selectedAnnotation:n,comments:o,commentThreads:r,viewportState:a,dispatch:l,keepSelectedTool:u,frameWindow:d,anonymousComments:p,mentionableUsers:f,maxMentionSuggestions:h}=e;const m=c.useCallback(((e,t)=>{Am(e),n&&n.id===t.id||(l((0,zr.Dm)()),l((0,De.Df)((0,i.l4)([t.id]),null)))}),[l,n]);if(a.commentMode===Bf._.PANE){(0,s.kG)(n);const e=r.get(n.id);return e?c.createElement(Cm,{maxMentionSuggestions:h,mentionableUsers:f,comments:o,commentThread:e,id:n.id,viewportState:a,onThreadClick:Am,dispatch:l,keepSelectedTool:u,frameWindow:d,anonymousComments:p}):null}if(a.zoomMode===Ss.c.FIT_TO_WIDTH){if(!n)return null;const e=r.get(n.id);return e?c.createElement(Em,{selectedAnnotation:n,comments:o,commentThread:e,anonymousComments:p,viewportState:a,keepSelectedTool:u,frameWindow:d,mentionableUsers:f,maxMentionSuggestions:h}):null}return c.createElement(Dm,{maxMentionSuggestions:h,mentionableUsers:f,annotations:t,selectedAnnotation:n,comments:o,commentThreads:r,viewportState:a,onThreadClick:m,dispatch:l,keepSelectedTool:u,frameWindow:d,anonymousComments:p})})),Dm=c.memo((function(e){let{annotations:t,selectedAnnotation:n,comments:o,commentThreads:r,viewportState:i,onThreadClick:a,dispatch:l,keepSelectedTool:u,frameWindow:p,anonymousComments:f,mentionableUsers:h,maxMentionSuggestions:m}=e;const g=function(e,t,n){const{scrollMode:o,layoutMode:r,currentPageIndex:i}=n,a=o===Cs.G.PER_SPREAD||o===Cs.G.DISABLED?i:null,s=c.useMemo((()=>n),[r,o,a]),l=c.useMemo((()=>{if(s.scrollMode===Cs.G.PER_SPREAD||s.scrollMode===Cs.G.DISABLED){const n=(0,ys.P1)(s,(0,ys.dF)(s,s.currentPageIndex));return t.filter(((t,o)=>{const r=e.get(o);return r&&n.includes(r.pageIndex)}))}return t}),[s,e,t]);return c.useMemo((()=>l.sortBy(((t,n)=>{const o=e.get(n);if(!o)return[0,0];return[(0,ys.dF)(s,o.pageIndex),o.boundingBox.top]}),Ce.b)),[s,l,e])}(t,r,i),{selectedOffset:v,threadElements:y,totalHeight:b}=function(e,t,n,o,r,i,a,l,u,p,f,h){const{currentPageIndex:m,viewportRect:g,layoutMode:v}=r,y=g.height,b=v===Rf.X.SINGLE?4:8,w=c.useCallback(((e,t,n)=>{n&&delete km[Om(e,!1)],delete km[Om(e,t)],E({})}),[]),S=c.useMemo((()=>o.map(((t,n)=>{const o=e.get(n);return o&&"number"==typeof o.pageIndex?(0,ol.nN)(o,r):-1}))),[e,o,r]),[P,E]=c.useState({}),{formatMessage:x}=(0,Se.YB)();return c.useMemo((()=>{let r=0,g=0,v=null,P=null,D=0;const C=o.map(((o,C,k)=>{var O,A;const T=e.get(C);if(!T||"number"!=typeof T.pageIndex)return null;let I=!1;if((0,ol._P)(o,n)){const e=o.last();(0,s.kG)(null!=e);const t=n.get(e);(0,s.kG)(null!=t),I=t.text.value.length>0}const F=Boolean(t&&t.id===T.id),M=Boolean(F||I);let _=km[Om(C,M)];if(null!=_){const e=!M&&_.threadCommentIds.first()!==o.first(),t=!M&&(o.size>=2&&_.threadCommentIds.size<=1||o.size<=1&&_.threadCommentIds.size>=2),n=M&&!o.equals(_.threadCommentIds);(e||t||n)&&(delete km[Om(C,M)],_=null)}const N=_&&_.height||(M?.4*y:80);let R=S.get(C),L="number"==typeof R&&-1!==R?R:N;R=L,L<r?(L=r,r+=N,L+=10,r+=10):r+=L+N-r;const{pageIndex:B}=T;if((!t||B!==t.pageIndex)&&(B<m-b||B>m+b))return null;const j=!_;let z;j&&(D++,z=function(e){e&&(km[Om(C,M)]={height:e.offsetHeight,threadCommentIds:o},D--,0===D&&E({}))}),F&&(g=L-R,v=L,P=k);const K=(M?o:o.take(1)).map((e=>{const t=n.get(e);return(0,s.kG)(null!=t),t})).toList(),Z=M?x(Tm.commentThread):x(Tm.commentDialogClosed,{arg0:null===(O=K.first())||void 0===O?void 0:O.creatorName,arg1:null===(A=K.first())||void 0===A?void 0:A.text.value});return c.createElement(Je.Z,{key:C,onPointerUp:Am},c.createElement("div",{onClick:Am,style:{transform:`translate(${F&&!j?-40:0}px, ${L}px)`,visibility:j?"hidden":void 0,width:Be.h8,height:j?"auto":N},className:d()(Uh().commentThreadWrapper,"PSPDFKit-Comment-Thread-Wrapper",{"PSPDFKit-Comment-Thread-Wrapper-Expanded":M,"PSPDFKit-Comment-Thread-Wrapper-Selected":F,[Uh().commentThreadWrapperExpanded]:M})},c.createElement(we.Z,{is:"div",disabled:F,onClick:e=>i(e.nativeEvent,T),role:F?"dialog":"button","aria-label":Z,"aria-disabled":void 0},c.createElement(Sm,{maxMentionSuggestions:f,mentionableUsers:p,comments:K,commentThread:o,rootId:T.id,dispatch:a,onUpdate:w,ref:z,isExpanded:M,isSelected:F,keepSelectedTool:l,frameWindow:u,anonymousComments:h,annotations:e}))))})).valueSeq();return{selectedIndex:P,selectedOffset:g,selectedTop:v,threadElements:C,totalHeight:r}}),[n,o,e,S,t,m,y,b,i,a,P])}(t,n,o,g,i,a,l,u,p,h,m,f),{formatMessage:w}=(0,Se.YB)(),S=c.useMemo((()=>{const e=(0,H.G4)(i);return Math.ceil(e.left)+e.width+i.viewportPadding.x}),[i]);return c.createElement("aside",{style:{height:b+2*i.viewportPadding.y,flex:`0 0 ${Be.h8}px`,transform:`translate(${S}px, -${v}px)`,width:Be.h8},className:d()(Uh().commentThreads,"PSPDFKit-Comment-Threads"),"aria-label":w(ke.Z.comments)},y)})),Cm=c.memo((function(e){let{id:t,comments:n,commentThread:o,dispatch:i,viewportState:a,onThreadClick:l,keepSelectedTool:u,frameWindow:p,anonymousComments:f,mentionableUsers:h,maxMentionSuggestions:m}=e;const{formatMessage:g}=(0,Se.YB)(),v=c.useMemo((()=>o.map((e=>{const t=n.get(e);return(0,s.kG)(t),t})).toList()),[o,n]);return c.createElement(r.m,null,c.createElement(Je.Z,{onPointerUp:l},c.createElement("aside",{style:{height:a.viewportRect.height/2},className:d()(Uh().commentThreads,Uh().commentThreadsSmall,"PSPDFKit-Comment-Threads"),"aria-label":g(ke.Z.comments)},c.createElement("div",{className:"PSPDFKit-Comment-Thread PSPDFKit-Comment-Thread-Expanded"},c.createElement(Sm,{maxMentionSuggestions:m,mentionableUsers:h,comments:v,commentThread:o,rootId:t,dispatch:i,isExpanded:!0,isSelected:!0,keepSelectedTool:u,frameWindow:p,anonymousComments:f})))))}));const km={};function Om(e,t){return`${e}-${t?"expanded":"collapsed"}`}function Am(e){e.stopPropagation()}const Tm=(0,Se.vU)({commentDialogClosed:{id:"commentDialogClosed",defaultMessage:"Open comment thread started by {arg0}: “{arg1}”",description:"With the dialog closed, show the author of the comment and the number of replies."},commentThread:{id:"commentThread",defaultMessage:"Comment Thread",description:"Comment thread."}});var Im,Fm,Mm=n(93162),_m=n.n(Mm),Nm=n(6969),Rm=n.n(Nm);class Lm extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"rootRef",c.createRef()),(0,o.Z)(this,"shouldComponentUpdate",Ce.O),(0,o.Z)(this,"_handleOnClose",(()=>{this.props.dispatch((0,Kt.Sn)())})),(0,o.Z)(this,"_download",(()=>{_m().saveAs(this._getBlob(),`PSPDFKit-for-Web-Debug-Output-${Date.now()}.txt`)}))}_getDebugOutput(){const e=document.documentElement;if((0,s.kG)(e,"externalDocumentElement must not be null"),this.rootRef.current){const t=this.rootRef.current.ownerDocument.documentElement;return(0,s.kG)(t,"internalDocumentElement must not be null"),`-----BEGIN VERSION-----\n PSPDFKit for Web Version: 2023.5.2 (79422c91d1)\n PSPDFKit Server Version: 2023.5.2\n -----END VERSION-----\n\n -----BEGIN CLIENT INFO-----\n User Agent: ${navigator.userAgent}\n Language: ${navigator.language}\n Engine: ${Ke.SR}\n System: ${Ke.By}\n Pixel ratio: ${(0,$r.L)()}\n -----END CLIENT INFO-----\n\n -----BEGIN EXTERNAL HTML-----\n ${e.innerHTML}\n -----END EXTERNAL HTML-----\n\n -----BEGIN INTERNAL HTML-----\n ${t.innerHTML}\n -----END INTERNAL HTML-----\n `}}_getBlob(){return new Blob([this._getDebugOutput()],{type:"text/plain;charset=utf-8"})}render(){return c.createElement(op.Z,{onDismiss:this._handleOnClose},c.createElement("div",{className:Rm().root,ref:this.rootRef},c.createElement("div",{className:Rm().header},Im||(Im=c.createElement("h2",null,"Debug Output")),Fm||(Fm=c.createElement("p",null,"When reporting an issue to support, please provide the debug output. The output contains the PSPDFKit for Web version, information about your device, a snapshot of the current DOM. Please submit new support requests via our"," ",c.createElement("a",{target:"_blank",href:"https://pspdfkit.com/support/request"},"support form"),".")),c.createElement(q.zx,{onClick:this._download},"Download Debug Output"))))}}class Bm extends c.Component{constructor(){var e;super(...arguments),e=this,(0,o.Z)(this,"onConfirm",(()=>{if(this.props.setA11yStatusMessage){const{formatMessage:e}=this.props.intl;this.props.setA11yStatusMessage(e(zm.annotationDeleted))}const e={annotations:(0,i.aV)(this.props.annotations),reason:Q.f.DELETE_END};this.props.eventEmitter.emit("annotations.willChange",e),this.props.annotations.forEach((e=>{this.props.dispatch((0,bt.hQ)(e))})),this.onCancel(!1),this.props.dispatch((0,De.fz)())})),(0,o.Z)(this,"onCancel",(function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(e.props.dispatch((0,bt.d8)(null)),t){const t={annotations:(0,i.aV)(),reason:Q.f.DELETE_END};e.props.eventEmitter.emit("annotations.willChange",t)}}))}render(){const{formatMessage:e}=this.props.intl;return c.createElement(_c.Z,{onConfirm:this.onConfirm,onCancel:this.onCancel,accessibilityLabel:e(zm.deleteAnnotationConfirmAccessibilityLabel),accessibilityDescription:e(zm.deleteAnnotationConfirmAccessibilityDescription),"aria-atomic":!0,restoreOnClose:!1},c.createElement("p",null,e(zm.deleteAnnotationConfirmMessage)))}}const jm=(0,Se.XN)(Bm),zm=(0,Se.vU)({deleteAnnotationConfirmMessage:{id:"deleteAnnotationConfirmMessage",defaultMessage:"Are you sure you want to delete this annotation?",description:'Message displayed in the "Delete Annotation" confirm dialog'},deleteAnnotationConfirmAccessibilityLabel:{id:"deleteAnnotationConfirmAccessibilityLabel",defaultMessage:"Confirm annotation deletion",description:'Accessibility label (title) for the "Delete Annotation" confirm dialog'},deleteAnnotationConfirmAccessibilityDescription:{id:"deleteAnnotationConfirmAccessibilityDescription",defaultMessage:"Dialog allowing the user to confirm or cancel deleting the annotation",description:'Accessibility description for the "Delete Annotation" confirm dialog'},annotationDeleted:{id:"annotationDeleted",defaultMessage:"Annotation deleted.",description:"An annotation has been deleted."}});function Km(e){let{locale:t}=e;const n=(0,c.useRef)(null);return(0,c.useEffect)((function(){const e=n.current;if(!e)return;const o=e.ownerDocument.documentElement;o&&(o.lang=t)}),[t]),c.createElement("div",{ref:n})}var Zm=n(32170),Um=n(94358),Vm=n.n(Um);function Gm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Wm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gm(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class qm extends c.PureComponent{render(){const{outlineElements:e,expanded:t,navigationDisabled:n,onRenderItemCallback:o}=this.props;return e.map(((e,r)=>{const{isBold:i,isItalic:a,children:s,action:l,color:u}=e,p=`${this.props.parentLevel}-${r}`;let f=t.get(p);"boolean"!=typeof f&&(f=e.isExpanded);const h=s.size>0,m=c.createElement("span",{className:d()(Vm().controlContainer,{[Vm().controlContainerNoIcon]:!h,[Vm().controlContainerNavigationDisabled]:!h&&n})},h&&c.createElement("span",{onClick:e=>{e.stopPropagation(),this.props.onPress(p,null,h)}},c.createElement(Oe.Z,{type:"caret",className:d()(Vm().icon,f&&Vm().iconExpanded),style:{width:24,height:24}})),c.createElement("span",{className:Vm().control,style:Wm({fontWeight:i?"bold":void 0,fontStyle:a?"italic":void 0},u?{color:u.toCSSValue()}:null)},e.title)),g=()=>{this.props.onPress(p,l,h)},v=o?t=>o(t,e):void 0;if(!h||!f)return c.createElement(q.w6,{key:p,onPress:g,expanded:!1,autoFocus:0===r&&"0"===this.props.parentLevel,headingRef:v},m);const y=`outline-control-${p}`;return c.createElement("div",{key:p,ref:v},c.createElement(q.w6,{onPress:g,expanded:f,ariaControls:y,autoFocus:0===r&&"0"===this.props.parentLevel},m),c.createElement(q.F0,{expanded:f,id:y},c.createElement("div",{className:Vm().content},c.createElement(qm,{parentLevel:p,onPress:this.props.onPress,outlineElements:s,expanded:t,navigationDisabled:n,onRenderItemCallback:o}))))}))}}(0,o.Z)(qm,"defaultProps",{parentLevel:"0"});var Hm,$m=n(42952),Xm=n.n($m),Ym=n(60493),Jm=n.n(Ym);const Qm=c.memo((function(e){const{outlineElements:t,expanded:n,backend:o,documentHandle:r,navigationDisabled:i,closeOnPress:l=!1}=e,[u,p]=c.useState(null);c.useEffect((()=>{null==u||u.focus()}),[u]);const f=(0,a.I0)();c.useEffect((()=>{t||((0,s.kG)(o),o.getDocumentOutline().then((e=>{f((0,Zm.o)(e))})))}),[]);const h=(0,_r.jC)(e);c.useEffect((()=>{r===(null==h?void 0:h.documentHandle)||t||((0,s.kG)(o),o.getDocumentOutline().then((e=>{f((0,Zm.o)(e))})))}));const m=(0,_r.R9)(((e,t,n)=>{n&&f((0,Zm.Q)(e)),i||(setTimeout((()=>{t&&f((0,gr.aG)(t))})),l&&!n&&f((0,Kt.mu)()))})),g=t||null,v=(0,_r.Bo)(u,g),y=(0,_r.mP)(v,(e=>e.title),(e=>null==g?void 0:g.find((t=>t.title===e)))),b=d()(Vm().container,!t&&Vm().empty+" PSPDFKit-Sidebar-Loading",t&&0===t.size&&Vm().empty+" PSPDFKit-Sidebar-Empty","PSPDFKit-Sidebar-Document-Outline"),{formatMessage:w}=(0,Se.YB)();return g?0===g.size?c.createElement("div",{className:b,ref:p},w(eg.noOutline)):c.createElement("div",{className:b,role:"region","aria-label":w(eg.outline),ref:p},c.createElement("div",{className:Jm().sidebarHeader},c.createElement("h2",{"aria-hidden":"true",className:d()(Xm().heading,"PSPDFKit-Sidebar-Document-Outline-Heading")},c.createElement("span",null,w(eg.outline)))),c.createElement(qm,{outlineElements:g,expanded:n,onPress:m,navigationDisabled:i,onRenderItemCallback:y})):c.createElement("div",{className:b,ref:p},Hm||(Hm=c.createElement(Le.Z,null)))})),eg=(0,Se.vU)({noOutline:{id:"noOutline",defaultMessage:"No Outline",description:"Message shown when there is no document outline / table of contents"},outline:{id:"outline",defaultMessage:"Outline",description:"Outline"}});class tg extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"shouldComponentUpdate",Ce.O),(0,o.Z)(this,"_handleKeydown",(e=>{const t=this.props.document.activeElement;this.props.hasSelectedAnnotations||t&&"BODY"!==t.tagName&&(0,ar.Qu)(t)||e.shiftKey||e.metaKey||e.ctrlKey||e.alt||(e.keyCode===Zo.P9&&this._handleKeyLeft(),e.keyCode===Zo.gs&&this._handleKeyRight())})),(0,o.Z)(this,"_handleKeyRight",(()=>{const e=(0,bs.TW)(this.props.viewportState);Math.ceil(this.props.viewportState.scrollPosition.x)>=Math.floor(e.x)&&this.props.dispatch((0,mc.fz)())})),(0,o.Z)(this,"_handleKeyLeft",(()=>{Math.floor(this.props.viewportState.scrollPosition.x)<=0&&this.props.dispatch((0,mc.IT)())}))}componentDidMount(){this.props.document.addEventListener("keydown",this._handleKeydown)}componentWillUnmount(){this.props.document.removeEventListener("keydown",this._handleKeydown)}render(){const{children:e}=this.props;return void 0===e?null:e}}var ng=n(59271),og=n(25644),rg=n(92234),ig=n(29165);function ag(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function sg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ag(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ag(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function lg(e,t){let{annotation:n,previousAction:o,attachmentBlobPromise:r,offset:a,formField:l}=e;return async(e,c)=>{const{viewportState:{currentPageIndex:u},formFields:d}=c();if(n instanceof w.x_){const r=d.get(n.formFieldName)||l;(0,s.kG)(r,`Form field with name "${n.formFieldName}" not found`);const c=(0,_.xc)(),p="cut"===o?n.formFieldName:`${null==r?void 0:r.name} copy`;let f=n.set("id",c).set("formFieldName",p).set("boundingBox",a?n.boundingBox.translate(a):n.boundingBox).delete("group").delete("pdfObjectId");o&&(f=f.set("pageIndex",u));let h=r.set("name",p).set("annotationIds",r.annotationIds.map((e=>e===n.id?c:e))).set("id",(0,Ya.C)()).delete("group").delete("pdfObjectId");r.options&&"cut"!==o&&(h=h.set("options",(0,i.aV)([r.options.get(0).set("value",`${r.options.get(0).value}_1`)])).set("annotationIds",(0,i.aV)([c]))),e((0,bt.$d)(f)),e((0,Qn.kW)(h)),t(sg({annotation:f,formField:h,originalAnnotation:n,originalFormField:r},o&&{previousAction:o.toUpperCase()}))}else{let i=n.set("id",(0,_.xc)()).delete("pdfObjectId");if(a&&(i=(0,Ri.n)(i,a)),o&&(i=i.set("pageIndex",u)),"imageAttachmentId"in n&&n.imageAttachmentId&&r){let t;try{t=await r}catch(e){throw new s.p2(`Could not retrieve attachment data: ${e.message}`)}(0,s.kG)(t,"Attachment not found");const{hash:n}=await(0,_e.uq)(t),o=new w.Pg({data:t});e((0,ig.O)(n,o)),i=i.set("imageAttachmentId",n)}e((0,bt.$d)(i)),t(sg({annotation:i,originalAnnotation:n},o&&{previousAction:o.toUpperCase()}))}}}function cg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ug(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cg(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class dg extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"state",{copiedOrCutAnnotations:null}),(0,o.Z)(this,"getSelectedAnnotations",(()=>{const{annotations:e,selectedAnnotationsIds:t,backend:n}=this.props,o=null==e?void 0:e.filter((e=>null==t?void 0:t.has(e.id))).valueSeq().toArray();return null==o?void 0:o.map((e=>{let t;return e instanceof w.sK&&e.imageAttachmentId&&(t=null==n?void 0:n.getAttachment(e.imageAttachmentId)),{annotation:e,attachmentBlobPromise:t}}))})),(0,o.Z)(this,"handleKeyDown",(async e=>{const{dispatch:t,selectedAnnotationsIds:n,commentThreads:o,isPrinting:r,printingEnabled:l,canDeleteSelectedAnnotationCP:c,selectedAnnotation:u,eventEmitter:d,backend:p,formFields:f,areClipboardActionsEnabled:h,modalClosurePreventionError:m,setModalClosurePreventionError:g,annotations:v,frameWindow:y,isMultiSelectionEnabled:b,contentEditorSession:S,interactionMode:P}=this.props;if((0,s.kG)(p,"backend is required"),e.metaKey&&e.ctrlKey)return;if(this.props.canUndo&&(e.metaKey||e.ctrlKey)&&!e.shiftKey&&e.keyCode===Zo.gx&&!(0,ar.eR)(e.target))return t((0,rg.Yw)()),void e.preventDefault();if(this.props.canRedo&&!(0,ar.eR)(e.target)&&(e.metaKey||e.ctrlKey)&&e.shiftKey&&e.keyCode===Zo.gx)return t((0,rg.KX)()),void e.preventDefault();if(h&&(e.metaKey||e.ctrlKey)&&e.keyCode===Zo.b8&&e.shiftKey&&n&&n.size>0&&(e.preventDefault(),this.props.selectedGroupId?t((0,Kt.UZ)(this.props.selectedGroupId)):(0,a.dC)((()=>{n.forEach((e=>{var n;const o=null===(n=this.props.annotationsGroups)||void 0===n?void 0:n.find((t=>{let{annotationsIds:n}=t;return n.has(e)}));o&&t((0,Kt.of)(e,o.groupKey))}))}))),e.shiftKey)return;h&&(e.metaKey||e.ctrlKey)&&e.keyCode===Zo.b8&&n&&n.size>0&&(e.preventDefault(),t((0,Kt._R)(n))),(e.ctrlKey&&e.keyCode===Zo.j4||e.metaKey&&e.keyCode===Zo.j4)&&(t((0,De.fz)()),t((0,Yl.Xe)()),e.preventDefault()),(e.metaKey||e.ctrlKey)&&e.keyCode===Zo.iT&&(!r&&l&&t((0,og.S0)()),e.preventDefault(),e.stopImmediatePropagation()),(e.metaKey||e.ctrlKey)&&e.keyCode===Zo.AV&&(t((0,mc.kr)()),e.preventDefault()),(e.metaKey||e.ctrlKey)&&e.keyCode===Zo.d2&&(t((0,mc.vG)()),e.preventDefault()),(e.metaKey||e.ctrlKey)&&e.keyCode===Zo.Cp&&(t((0,mc._R)()),e.preventDefault());const{copiedOrCutAnnotations:E}=this.state;var x,D,C;if(h&&(e.ctrlKey||e.metaKey)&&E&&"v"===e.key&&(e.preventDefault(),e.stopPropagation(),t((x=E,(e,t)=>{const{eventEmitter:n,viewportState:{currentPageIndex:o}}=t();x.forEach((t=>{const r="copy"===t.previousAction&&t.annotation.pageIndex===o;e(lg(sg(sg({},t),r&&{offset:new w.E9({x:20,y:20})}),(e=>{n.emit("annotations.paste",e)})))}))})),this.setState({copiedOrCutAnnotations:null})),h&&b&&(e.ctrlKey||e.metaKey)&&"a"===e.key){var k;const n=null==y?void 0:y.document.activeElement,o=n&&(0,ar.eR)(n),r=null===(k=window.top)||void 0===k?void 0:k.document.activeElement,i=r&&(0,ar.eR)(r);if(o||i)return;e.preventDefault(),e.stopPropagation();const s=null==v?void 0:v.filter((e=>e.pageIndex===this.props.currentPageIndex)).map((e=>e.id));s&&(0,a.dC)((()=>{t((0,De.fz)()),t((0,De.Df)(s.toSet(),null))}))}if(S.active&&S.textBlockInteractionState.state===ml.FP.Selected&&["Del","Delete","Backspace"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),t((0,tf.u)(ml.wR.Delete))),n&&n.size>0&&!(0,ar.eR)(e.target))if(!["Del","Delete","Backspace"].includes(e.key)||o&&n.some((e=>o.has(e)))||!c){if(h&&(e.ctrlKey||e.metaKey)&&u&&"c"===e.key){var O;e.preventDefault(),e.stopPropagation();const t=null===(O=this.getSelectedAnnotations())||void 0===O?void 0:O.map((e=>ug(ug({},e),{},{previousAction:"copy"})));this.setState({copiedOrCutAnnotations:t}),d.emit("annotations.copy",{annotation:u})}else if(h&&(e.ctrlKey||e.metaKey)&&u&&"x"===e.key){var A;if(!t((C=u,(e,t)=>(0,xr.Kd)(C,t()))))return;e.preventDefault(),e.stopPropagation();const n=null===(A=this.getSelectedAnnotations())||void 0===A?void 0:A.map((e=>{const t=e.annotation;return ug(ug({},e),{},{formField:t instanceof w.x_?null==f?void 0:f.get(t.formFieldName):void 0,previousAction:"cut"})}));this.setState({copiedOrCutAnnotations:n}),d.emit("annotations.cut",{annotation:u}),(0,a.dC)((()=>{n.forEach((e=>{t((0,bt.hQ)(e.annotation))}))}))}else if(h&&(e.ctrlKey||e.metaKey)&&u&&"d"===e.key){e.preventDefault(),e.stopPropagation();const n=this.getSelectedAnnotations();t((D=n,(e,t)=>{const{eventEmitter:n}=t();D.map((e=>lg({annotation:e.annotation,offset:new w.E9({x:20,y:20}),attachmentBlobPromise:e.attachmentBlobPromise},(e=>{n.emit("annotations.duplicate",e)})))).forEach((t=>{e(t)})),e((0,De.J4)((0,i.l4)(D.map((e=>e.annotation.id))),R.o.SELECTED))})),this.setState({copiedOrCutAnnotations:null})}else if(!("Esc"!==e.key&&"Escape"!==e.key||(0,ar.N1)(e.target)||(0,ar.fp)(e.target)||m&&m.annotationId===(null==u?void 0:u.id))){e.preventDefault(),e.stopPropagation(),t((0,De.fz)());const o=n.first(),r=this.props.getScrollElement();if(r&&o){const e=r.querySelector(`[data-annotation-id="${o}"]`);e&&(0,ar._s)(r,e)}}}else(null==m?void 0:m.annotationId)===(null==u?void 0:u.id)&&g(null),e.preventDefault(),e.stopPropagation(),t((0,bt.d8)(n));"Esc"!==e.key&&"Escape"!==e.key||P!==N.A.MEASUREMENT||(0,a.dC)((()=>{t((0,bt.Ds)(null)),t((0,Kt.hS)())})),e.keyCode!==Zo.bs||(0,ar.eR)(e.target)||(e.preventDefault(),e.stopPropagation())})),(0,o.Z)(this,"_handleRef",(e=>{e&&(this._document=e.ownerDocument)}))}componentDidMount(){this._document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleKeyDown),this.props.isTextCopyingAllowed||this._document.addEventListener("copy",pg)}componentWillUnmount(){this._document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keydown",this.handleKeyDown),this.props.isTextCopyingAllowed||this._document.removeEventListener("copy",pg)}render(){return c.createElement("div",{ref:this._handleRef})}}function pg(e){const{target:t}=e;(0,ng.c)(t)||e.preventDefault()}const fg=["highlight","strikeout","underline","squiggle","redact-text-highlighter","comment"],hg=(0,T.Z)("InlineTextSelectionToolbarItem ");var mg=n(51025),gg=n.n(mg);function vg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function yg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vg(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const bg=new Map([["highlight",w.FV],["strikeout",w.R9],["underline",w.xu],["squiggle",w.hL],["redact-text-highlighter",$.Z],["comment",w.Jn]]);function wg(e){return e.node?c.createElement(Cu.Z,{node:e.node,title:e.title,className:e.className,icon:e.icon,onPress:e.onPress,selected:e.selected,disabled:e.disabled}):c.createElement(gu.Z,{type:e.type,title:e.title,className:e.className,icon:e.icon,onPress:e.onPress,selected:e.selected,disabled:e.disabled})}function Sg(e){const t=(0,Se.YB)(),{dispatch:n,isAnnotationTypeReadOnly:o,showComments:r,showRedactions:i,hasMobileLayout:a,inlineTextSelectionToolbarItems:l,currentTextSelection:u}=e,p=t.formatMessage,f=c.useCallback(((e,t)=>{n((0,bt.VX)(e,t)),n((0,De.fz)())}),[n]),h=c.useCallback((()=>{n((0,zr.cQ)())}),[n]),m=d()({[gg().button]:!a},{[Eu().button]:a}),g=c.useMemo((()=>{const e=[{type:"highlight",title:p(ke.Z.highlightAnnotation),className:d()("PSPDFKit-Text-Markup-Inline-Toolbar-Highlight",m),onPress:()=>{f(w.FV,"highlight")}},{type:"strikeout",title:p(ke.Z.strikeOutAnnotation),className:d()("PSPDFKit-Text-Markup-Inline-Toolbar-Strike-Out",m),onPress:()=>{f(w.R9,"strikeout")}},{type:"underline",title:p(ke.Z.underlineAnnotation),className:d()("PSPDFKit-Text-Markup-Inline-Toolbar-Underline",m),onPress:()=>{f(w.xu,"underline")}},{type:"squiggle",title:p(ke.Z.squiggleAnnotation),className:d()("PSPDFKit-Text-Markup-Inline-Toolbar-Squiggle",m),onPress:()=>{f(w.hL,"squiggle")}}];return r&&e.push({type:"comment",title:p(ke.Z.comment),className:d()("PSPDFKit-Text-Markup-Inline-Toolbar-Comment",m),onPress:()=>{h()}}),i&&e.push({type:"redact-text-highlighter",title:p(ke.Z.redactionAnnotation),className:d()("PSPDFKit-Text-Markup-Inline-Toolbar-Redaction",m),onPress:()=>{f($.Z,"redaction")}}),e}),[f,m,p,h,r,i]),v=c.useMemo((()=>{if(l){if(!u)return[];const e=l({defaultItems:g,hasDesktopLayout:!a},u);e.forEach((e=>{!function(e){hg((0,s.PO)(e)&&!!e,"Expected item to be an object");const{type:t,id:n,title:o,icon:r,className:i,onPress:a,disabled:l}=e;hg("type"in e&&(0,I.HD)(t)&&[...fg,"custom"].includes(t),`Expected item.type to be one of ${[...fg,"custom"].join(", ")}`),o&&hg((0,I.HD)(o),"Expected `title` to be a string"),r&&hg((0,I.HD)(r),"Expected `icon` to be a string"),n&&hg((0,I.HD)(n),"Expected `id` to be a string"),i&&hg((0,I.HD)(i),"Expected `className` to be a string"),a&&hg("function"==typeof a,"`onPress` must be a `function`"),"disabled"in e&&hg("boolean"==typeof l,"`disabled` must be a `boolean`"),e.node&&hg(oc.a.includes(e.node.nodeType),"`node.nodeType` is invalid. Expected one of "+oc.a.join(", "))}(e)}));return e.map((e=>"custom"===e.type&&null!==e.onPress?yg(yg({},e),{},{onPress:()=>{e.onPress(),n((0,De.fz)())}}):e)).map((e=>({node:wg(e),type:e.type})))}return g.map((e=>({node:wg(e),type:e.type})))}),[g,u,a,l,wg,n]),y=d()({[Eu().content]:a,[Eu().mobileTextMarkup]:a,[gg().inner]:!a});return c.createElement("div",{className:d()("PSPDFKit-Text-Markup-Inline-Toolbar",{[gg().root]:!a}),role:"dialog","aria-label":p(ke.Z.markupToolbar)},c.createElement("div",{className:y},v.map(((e,t)=>"custom"!==e.type&&o(bg.get(e.type))?null:"custom"===e.type?c.createElement("div",{key:`custom-${t}`},e.node):c.createElement("div",{key:e.type},e.node)))))}class Pg extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"shouldComponentUpdate",Ce.O)}render(){const{position:e,dispatch:t,showComments:n,showRedactions:o,currentTextSelection:r,isAnnotationTypeReadOnly:i,inlineTextSelectionToolbarItems:a}=this.props;return c.createElement("div",{className:d()("PSPDFKit-Annotation-Toolbar",Eu().root,{[Eu().stickToBottom]:"bottom"===e})},c.createElement(Sg,{dispatch:t,isAnnotationTypeReadOnly:i,showComments:n,showRedactions:o,hasMobileLayout:!0,inlineTextSelectionToolbarItems:a,currentTextSelection:r}))}}var Eg=n(54543),xg=n(65627),Dg=n(3999),Cg=n(97066),kg=n.n(Cg);const Og=c.memo((function(e){const t=e.items.map(((t,n)=>{const{className:o,disabled:r,selected:i,icon:a,title:s,onPress:l}=t;return t.node?c.createElement(Dg.Z,{node:t.node,className:d()("PSPDFKit-Annotation-Tool-Node",e.itemClassName,o,kg().node),onPress:l,title:s,disabled:r,selected:i,key:`AnnotationTools-tool-${n}`}):c.createElement(Vd.Z,{type:"custom",className:d()("PSPDFKit-Annotation-Tool-Button",e.itemClassName,o,kg().button),disabled:r,selected:i,icon:a,title:s,onPress:l,key:`AnnotationTools-tool-${n}`})}));return c.createElement("div",{role:"toolbar",className:d()(kg().root,e.rootClassName)},t)})),Ag=["children","fullScreen","hover","tools","intl","closeNote","clearNote","isLocked","isReadOnly","hasLockedContents"];function Tg(e){e.stopPropagation()}const Ig=(0,Se.XN)((e=>{const{children:t,fullScreen:n,hover:o,tools:r,intl:i,closeNote:a,clearNote:s,isLocked:l,isReadOnly:u,hasLockedContents:p}=e,f=(0,ne.Z)(e,Ag),{formatMessage:h}=i,m=c.useRef(null);c.useEffect((function(){const e=m.current;if(e)return e.addEventListener("wheel",Tg,!0),()=>e.removeEventListener("wheel",Tg,!0)}),[]);const g=(0,Oe.Z)({type:"close"}),v=(0,Oe.Z)({type:"delete"}),y=(0,Oe.Z)({type:"lock",style:{width:12,height:12,flexBasis:12},className:Pt().icon}),b=[u?h(ke.Z.readOnlyAnnotationFlag):"",l?h(ke.Z.locked):"",p?h(ke.Z.lockedContents):""].filter((e=>""!==e)).join(", ");return c.createElement("div",(0,ue.Z)({className:`PSPDFKit-Note-Annotation-Content ${Pt().wrapper}${n?" "+Pt().fullScreen:""}`},f,{ref:m}),c.createElement("div",{className:Pt().header},c.createElement("h3",{className:Pt().title},h(ke.Z.noteAnnotation)),c.createElement("button",{className:d()(Pt().button,o?Pt().hidden:null),title:h(ke.Z.close),"aria-label":h(ke.Z.close),onClick:a||void 0,role:"button",type:"button"},g)),c.createElement("div",{className:Pt().content},t),s&&c.createElement("button",{className:d()(Pt().button,o?Pt().hidden:null),title:h(ke.Z.clear),"aria-label":h(ke.Z.clear),onClick:s,role:"button",type:"button"},v),r&&!n&&c.createElement("div",{className:Pt().tools},c.createElement(Og,{items:r,rootClassName:Pt().tools,itemClassName:Pt().tool})),c.createElement("div",{className:Pt().footer},(l||u||p)&&c.createElement(c.Fragment,null,y,c.createElement("div",{className:Pt().label,"aria-label":b},b))))}));function Fg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Mg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fg(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const _g={left:0,top:0,maxWidth:"100%",maxHeight:"auto",minWidth:"100%",minHeight:"100%"};class Ng extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"_didUpdate",!1),(0,o.Z)(this,"_didEditorFocus",!1),(0,o.Z)(this,"shouldComponentUpdate",Ce.O),(0,o.Z)(this,"state",{value:this.props.annotation.text.value}),(0,o.Z)(this,"focus",(()=>{this._isFocused||(this._isFocused=!0,this._editor&&this._editor.focus())})),(0,o.Z)(this,"clearText",(()=>{this._editor&&this._editor.clearText()})),(0,o.Z)(this,"_isFocused",!1),(0,o.Z)(this,"_lastSavedAnnotation",this.props.annotation),(0,o.Z)(this,"_onRef",(e=>{this._editor=e})),(0,o.Z)(this,"_valueDidUpdate",(()=>{this._didUpdate=!0})),(0,o.Z)(this,"_updateAnnotation",(()=>{if(this._didUpdate){var e;const n=this.props.annotation.set("text",{format:"plain",value:null===(e=this._editor)||void 0===e?void 0:e.getPlainText()});if(this._lastSavedAnnotation.text.value!==n.text.value||this._lastSavedAnnotation.text.format!==n.text.format)if(this._lastSavedAnnotation=n,n instanceof Ar.FN){var t;const e=null===(t=n.parentAnnotation)||void 0===t?void 0:t.set("note",n.text.value);(0,s.kG)(e),this.props.dispatch((0,bt.FG)(e))}else this.props.dispatch((0,bt.FG)(n)),this.props.keepSelectedTool&&this.props.dispatch((0,Kt.i9)())}else this.props.keepSelectedTool&&this.props.dispatch((0,Kt.i9)())})),(0,o.Z)(this,"_onBlur",(()=>{this._updateAnnotation()})),(0,o.Z)(this,"_onStopEditing",(()=>{this._updateAnnotation(),this.props.dispatch((0,bt.i0)(!0))})),(0,o.Z)(this,"_onEscape",(()=>{this.props.dispatch((0,De.fz)()),this._updateAnnotation()})),(0,o.Z)(this,"_handleEditorFocus",(()=>{if(!this._didEditorFocus){const e={annotations:(0,i.aV)([this.props.annotation]),reason:Q.f.TEXT_EDIT_START};this.props.eventEmitter.emit("annotations.willChange",e)}this._didEditorFocus=!0}))}UNSAFE_componentWillReceiveProps(e){e.annotation.equals(this.props.annotation)||this.setState({value:e.annotation.text.value})}componentWillUnmount(){if(this._didEditorFocus){const e={annotations:(0,i.aV)([this.props.annotation]),reason:Q.f.TEXT_EDIT_END};this.props.eventEmitter.emit("annotations.willChange",e)}this._updateAnnotation()}render(){return c.createElement(ui,{autoFocus:!1,autoSelect:this.props.autoSelect,onBlur:this._onBlur,onStopEditing:this._onStopEditing,onEscape:this._onEscape,ref:this._onRef,maxLength:Be.RI,defaultValue:this.state.value,lastMousePoint:this.props.lastMousePoint,style:Mg(Mg({},_g),{},{cursor:this.props.uneditableContentCursor||"inherit"}),valueDidUpdate:this._valueDidUpdate,onFocus:this._handleEditorFocus,key:this.state.value})}}(0,o.Z)(Ng,"defaultProps",{autoSelect:!1});var Rg=n(48311);class Lg extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"state",{}),(0,o.Z)(this,"shouldComponentUpdate",Ce.O),(0,o.Z)(this,"_closeNote",(()=>{this.props.noteAnnotation instanceof Ar.FN?this.props.dispatch((0,De.mv)(null)):this.props.dispatch((0,De.fz)())})),(0,o.Z)(this,"_clearNote",(()=>{this._editor&&this._editor.clearText()})),(0,o.Z)(this,"_preventDeselect",(e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()})),(0,o.Z)(this,"_makeHandleMouseUpAndTouchEnd",(e=>(0,Eg.S)((t=>{this.setState({lastMousePoint:new w.E9({x:t.clientX,y:t.clientY})},(()=>{this.props.dispatch((0,De.VR)(e))}))})))),(0,o.Z)(this,"_onRef",(e=>{this._editor=e,this.props.isFullscreen&&this._editor&&this._editor.focus()})),(0,o.Z)(this,"_getGradient",(0,io.Z)((e=>{let t=e.lighter(30);const n=Math.min(t.r,t.g,t.b);for(let e=0;e<10&&t.contrastRatio(w.Il.BLACK)<4.5;e++)t=t.lighter((255-n)/25.5);return{top:t.lighter(30),bottom:t}}))),(0,o.Z)(this,"isPopoverPositioned",!1),(0,o.Z)(this,"onPopoverPositioned",(()=>{!this.isPopoverPositioned&&this._editor&&(this.isPopoverPositioned=!0,this._editor.focus())}))}render(){const{dispatch:e,noteAnnotation:t,noteAnnotationToModify:n,viewportState:o,isFullscreen:r,collapseSelectedNoteContent:i}=this.props;if(null==t.pageIndex||i)return null;const a=n&&t.id===n.id,l=t instanceof Ar.FN,{color:u}=t,d=jg[u.toCSSValue()]||this._getGradient(u.saturate(60)),p=this.props.isAnnotationReadOnly(t),f=p||t.lockedContents;if(r){if(!a&&!p)return null;const n=u.toCSSValue(),r=`linear-gradient(to bottom, ${d.top.toCSSValue()} 0%, ${d.bottom.toCSSValue()} 100%)`,i=o.viewportRect.height-(this.props.annotationToolbarHeight<o.viewportRect.height?this.props.annotationToolbarHeight:0),s=(0,_.B7)(t);return c.createElement(Ig,{fullScreen:!0,hover:this.props.isHover,key:`NoteAnnotationContent-${t.id}`,style:{backgroundColor:n,backgroundImage:r,width:"100%",height:i,top:i<o.viewportRect.height?this.props.annotationToolbarHeight:"auto"},onMouseUp:this._preventDeselect,onPointerUp:this._preventDeselect,onTouchEnd:this._preventDeselect,closeNote:this._closeNote,clearNote:a&&!f&&l?this._clearNote:void 0,id:`NoteAnnotationContent-${t.id}`,isLocked:t.locked,isReadOnly:t.readOnly,hasLockedContents:t.lockedContents},f?t.text.value:c.createElement(Ng,{annotation:t,dispatch:e,ref:this._onRef,autoSelect:this.props.autoSelect,eventEmitter:this.props.eventEmitter,keepSelectedTool:this.props.keepSelectedTool,uneditableContentCursor:s}))}let h,m;a||f||(h=m=this._makeHandleMouseUpAndTouchEnd(t.id));const g=(0,H.cr)(o,t.pageIndex).translate(o.scrollPosition.scale(o.zoomLevel)),v=t.update("boundingBox",(e=>((0,s.kG)(e),e.merge({left:e.left+(e.width-e.width/o.zoomLevel)/2,top:e.top+(e.height-e.height/o.zoomLevel)/2,width:e.width/o.zoomLevel,height:e.height/o.zoomLevel})))),y=(0,_.B7)(t,{isExpandedNote:!0});return c.createElement(Rg.Z,{referenceRect:(0,_.SY)(v,o.pagesRotation).apply(g),viewportState:o,onPositionInfoChange:this.onPopoverPositioned,baseColor:u,color:[d.top,d.bottom],className:"PSPDFKit-Popover-Note-Annotation",customZIndex:1001},c.createElement(Ig,{onMouseUp:h,onTouchEnd:m,tools:this.props.tools,closeNote:this._closeNote,clearNote:a&&!f&&l?this._clearNote:void 0,hover:this.props.isHover,id:`NoteAnnotationContent-${t.id}`,style:{cursor:y},isLocked:t.locked,isReadOnly:t.readOnly,hasLockedContents:t.lockedContents},f?t.text.value:c.createElement(Ng,{annotation:t,dispatch:e,ref:a?this._onRef:void 0,lastMousePoint:this.state.lastMousePoint,autoSelect:this.props.autoSelect,eventEmitter:this.props.eventEmitter,keepSelectedTool:this.props.keepSelectedTool,uneditableContentCursor:y})))}}(0,o.Z)(Lg,"defaultProps",{autoSelect:!1});const Bg={yellow:{top:new w.Il({r:245,g:240,b:158}),bottom:new w.Il({r:250,g:247,b:106})},orange:{top:new w.Il({r:250,g:213,b:161}),bottom:new w.Il({r:255,g:184,b:112})},red:{top:new w.Il({r:255,g:181,b:178}),bottom:new w.Il({r:255,g:134,b:126})},fuchsia:{top:new w.Il({r:255,g:186,b:255}),bottom:new w.Il({r:240,g:139,b:233})},blue:{top:new w.Il({r:164,g:211,b:255}),bottom:new w.Il({r:113,g:166,b:244})},green:{top:new w.Il({r:190,g:255,b:161}),bottom:new w.Il({r:130,g:227,b:111})}},jg={};for(const e of xg.W)null!=e.color&&null!=e.localization.id&&(jg[e.color.toCSSValue()]=Bg[e.localization.id]);var zg=n(49242),Kg=n(5912),Zg=n.n(Kg);class Ug extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"elementRef",c.createRef()),(0,o.Z)(this,"state",{isPanning:!1}),(0,o.Z)(this,"initialPosition",null),(0,o.Z)(this,"previousPosition",null),(0,o.Z)(this,"_handleDragStart",(e=>{this.props.enabled&&(0,zg.I)(e)&&(this.initialPosition=this.previousPosition=new b.E9({x:e.clientX,y:e.clientY}),this.setState({isPanning:!0}),this._addEventListeners())})),(0,o.Z)(this,"_handleDragMove",(e=>{if(!(0,zg.W)(e))return void this._handleDragEnd(e);if(!this.props.enabled||!this.previousPosition)return;const t=new b.E9({x:e.clientX,y:e.clientY}),n=this.previousPosition.translate(t.scale(-1)),o=this._getScrollElement(),{scrollLeft:r,scrollTop:i}=o;o.scrollLeft=r+n.x,o.scrollTop=i+n.y,this.previousPosition=t,e.stopPropagation()})),(0,o.Z)(this,"_handleDragEnd",(e=>{this.initialPosition&&this.previousPosition&&(Zt(this.initialPosition,this.previousPosition)&&(e.stopPropagation(),e.stopImmediatePropagation()),this.previousPosition=null,this.setState({isPanning:!1}),this._removeEventListeners())}))}componentDidMount(){this.elementRef.current&&this.elementRef.current.addEventListener("mousedown",this._handleDragStart)}componentWillUnmount(){this.elementRef.current&&this.elementRef.current.removeEventListener("mousedown",this._handleDragStart),this._removeEventListeners()}render(){const{enabled:e}=this.props,{isPanning:t}=this.state,n=d()({[Zg().layer]:e,[Zg().isPanning]:t});return c.createElement("div",{className:n,ref:this.elementRef},this.props.children)}_addEventListeners(){const{defaultView:e}=this._getScrollElement().ownerDocument;null==e||e.addEventListener("mouseup",this._handleDragEnd,!0),null==e||e.addEventListener("mousemove",this._handleDragMove)}_removeEventListeners(){const e=this._getScrollElement();if(!e)return;const{defaultView:t}=e.ownerDocument;t&&(t.removeEventListener("mouseup",this._handleDragEnd,!0),t.removeEventListener("mousemove",this._handleDragMove))}_getScrollElement(){return this.context()}}(0,o.Z)(Ug,"contextType",hc);const Vg=c.memo((function(e){const{dispatch:t,viewportState:n,interactionMode:o,spreadIndex:r,onCropChange:i,cropInfo:a}=e,s=c.useRef(null);c.useEffect((()=>{null!==s.current&&s.current!==r&&(o===N.A.SEARCH?t((0,De.vR)()):t((0,De.fz)())),s.current=r}),[t,r,o]);const[l,u]=(0,ys.wU)(n,r);if(0===n.viewportRect.width||0===n.viewportRect.height)return null;function d(t,o,r){const s={transform:(0,H.vs)(b.sl.IDENTITY,n,t).toCssValue(),transformOrigin:"0 0"},l=(0,ys.nw)(n)===Rf.X.DOUBLE?t.toString():e.pageKeys.get(t);return c.createElement("div",{key:l,className:"PSPDFKit-Spread",style:s,"data-spread-index":t},c.createElement(_f,{key:l,spreadIndex:t,viewportState:n,inViewport:o,shouldPrerender:r,hidden:!o,onOverviewRenderFinished:u,onCropChange:i,cropInfo:a,pageKeys:e.pageKeys,setGlobalCursor:e.setGlobalCursor}))}return c.createElement(Nf.Z,{dispatch:e.dispatch,viewportState:n},c.createElement("div",null,function(e){const t=[];if(t.push(d(e,!0,!1)),n.scrollMode===Cs.G.DISABLED)return t;const o=(0,ys.kd)(n),r=Math.max(e-Be.J8,0),i=Math.min(e+Be.J8,o-1);for(let n=r;n<=i;n++)n!==e&&t.push(d(n,!1,"number"==typeof l&&e===l));return t}(r)))}));var Gg=n(71231),Wg=n(45590),qg=n.n(Wg);const Hg=!(!Gg.Gn||"edge"==Ke.SR)&&{passive:!0};class $g extends c.Component{constructor(){super(),(0,o.Z)(this,"_elementRef",c.createRef()),(0,o.Z)(this,"_handleWheel",(e=>{const{viewportState:t,scrollElement:n}=this.props,o=t.zoomLevel<=(0,ws.Mq)(t);let r=!0;if(n){const{clientHeight:e,scrollHeight:o}=n;r=t.commentMode!==Bf._.SIDEBAR||t.scrollMode!==Cs.G.PER_SPREAD||t.scrollPosition.y+e>=o}if(!(o&&r))return;const i=(0,H.G4)(t);e.clientX>Math.ceil(i.left)+i.width+t.viewportPadding.x||(e.deltaY<0?this.props.dispatch((0,mc.IT)()):e.deltaY>0&&this.props.dispatch((0,mc.fz)()))})),(0,o.Z)(this,"_handleSwipeLeft",(()=>{const e=(0,bs.TW)(this.props.viewportState);Math.ceil(this.props.viewportState.scrollPosition.x)>=Math.floor(e.x)&&this.props.dispatch((0,mc.fz)())})),(0,o.Z)(this,"_handleSwipeRight",(()=>{Math.floor(this.props.viewportState.scrollPosition.x)<=0&&this.props.dispatch((0,mc.IT)())})),(0,o.Z)(this,"_handleTouchStart",(e=>{const t=this._elementRef.current;t&&null===this._touchStart&&(0,ql.sX)(e)&&(this._touchStart=Jg(e),t.ownerDocument.addEventListener("touchend",this._handleTouchEnd,!0))})),(0,o.Z)(this,"_handleTouchEnd",(e=>{const t=this._elementRef.current;if(!t)return;const n=this._touchStart;if(!n)return;const o=Jg(e),r=o.x-n.x,i=o.y-n.y,a=function(e,t,n){const o=t/e||0,r=n/e||0;return Math.abs(o)>Math.abs(r)?o:r}(o.timestamp-n.timestamp,r,i),s=function(e,t){const n=t.x-e.x,o=t.y-e.y;return Math.sqrt(n*n+o*o)}(n,o),l=function(e,t){if(e===t)return 0;if(Math.abs(e)>=Math.abs(t))return e<0?Xg:Yg;return t<0?3:4}(r,i);if(s>10&&Math.abs(a)>.3&&!this.props.interactionsDisabled)switch(l){case Xg:this._handleSwipeLeft();break;case Yg:this._handleSwipeRight()}t.ownerDocument.removeEventListener("touchend",this._handleTouchEnd,!0),this._touchStart=null})),(0,o.Z)(this,"_handleClick",(e=>{const t=this._elementRef.current;if(!t||this.props.hasSelection||t.ownerDocument.defaultView&&e.target instanceof t.ownerDocument.defaultView.HTMLElement&&(0,ng.c)(e.target))return;const n=t.getBoundingClientRect(),o=(e.clientX-n.left)/n.width;o<.3?this._handleSwipeRight():o>.7&&this._handleSwipeLeft()})),this._handleWheel=(0,af.Z)(this._handleWheel,250),this._touchStart=null}componentDidMount(){const e=this._elementRef.current;e&&(e.addEventListener("touchstart",this._handleTouchStart),e.addEventListener("wheel",this._handleWheel,Hg))}componentWillUnmount(){const e=this._elementRef.current;e&&(e.removeEventListener("touchstart",this._handleTouchStart),e.removeEventListener("wheel",this._handleWheel,Hg),e.ownerDocument.removeEventListener("touchend",this._handleTouchEnd,!0))}render(){return c.createElement("div",{className:qg().root,onClick:this._handleClick,ref:this._elementRef},this.props.children)}}const Xg=1,Yg=2;function Jg(e){const t=e.touches[0]||e.changedTouches[0];return{x:t.clientX,y:t.clientY,timestamp:Date.now()}}var Qg=n(58005),ev=n.n(Qg);const tv=function(e){let{progress:t,totalPages:n}=e;const{formatMessage:o}=(0,Se.YB)(),r=(0,a.I0)(),i=c.useCallback((()=>{(0,a.dC)((()=>{r((0,Kt.Zg)()),r((0,og.WQ)())}))}),[r]);return c.createElement(op.Z,{onEscape:i,accessibilityLabel:o(nv.printProgressModal),accessibilityDescription:o(nv.printProgressModalDesc)},c.createElement("div",{className:ev().root},c.createElement("div",null,o(nv.printPrepare)),"number"==typeof t&&c.createElement(c.Fragment,null,c.createElement("div",{className:ev().progressWrapper},c.createElement("div",{className:ev().progress,"aria-label":`${t}% complete`,role:"progressbar","aria-valuenow":t},c.createElement("div",{className:ev().progressBar,style:{width:`${Math.floor(100*t/n)}%`}})),c.createElement("div",{className:ev().progressText},o(nv.pageXofY,{arg0:t,arg1:n}))),c.createElement(q.zx,{title:o(ke.Z.cancel),onClick:i},o(ke.Z.cancel)))))},nv=(0,Se.vU)({pageXofY:{id:"pageXofY",defaultMessage:"Page {arg0} of {arg1}",description:"Printing processing progress"},printPrepare:{id:"printPrepare",defaultMessage:"Preparing document for printing…",description:"Shown while the printing process is preparing the pages for printing"},printProgressModal:{id:"printProgressModal",defaultMessage:"Printing in progress",description:"Printing in progress modal"},printProgressModalDesc:{id:"printProgressModalDesc",defaultMessage:"Indicates that a document is being prepared for printing",description:"Description for the Printing in progress modal"}});var ov,rv=n(93621),iv=n.n(rv);const av=function(){const{formatMessage:e}=(0,Se.YB)();return c.createElement(op.Z,{accessibilityLabel:e(sv.signingModal),accessibilityDescription:e(sv.signingModalDescription)},c.createElement("div",{className:iv().root},c.createElement(Re.Z,{src:n(17285),className:iv().icon,role:"presentation"}),c.createElement("div",{className:iv().message},e(sv.signing),ov||(ov=c.createElement(Le.Z,null)))))},sv=(0,Se.vU)({signing:{id:"signing",defaultMessage:"Signing...",description:"Shown while the digital signature flow is in progress"},signingModal:{id:"signingInProgress",defaultMessage:"Signing in progress",description:"Signing in progress modal"},signingModalDescription:{id:"signingModalDesc",defaultMessage:"Indicates that the current document is being signed",description:"Description of the Signing in progress modal"}});var lv,cv=n(76134),uv=n.n(cv);function dv(){const{formatMessage:e}=(0,Se.YB)();return c.createElement(op.Z,{accessibilityLabel:e(pv.redactionsModal),accessibilityDescription:e(pv.redactionModalDescription)},c.createElement("div",{className:uv().root},c.createElement(Re.Z,{src:n(1088),className:uv().icon,role:"presentation"}),c.createElement("div",{className:uv().message},e(pv.applyingRedactions),lv||(lv=c.createElement(Le.Z,null)))))}const pv=(0,Se.vU)({applyingRedactions:{id:"applyingRedactions",defaultMessage:"Applying redactions...",description:"Shown while the redactions flow is in progress"},redactionsModal:{id:"redactionInProgress",defaultMessage:"Redaction in progress",description:"Redaction in progress modal"},redactionModalDescription:{id:"redactionModalDesc",defaultMessage:"Indicates that the current document is being redacted",description:"Description of the Redacted in progress modal"}});var fv=n(93242),hv=n.n(fv);function mv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function gv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mv(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const vv={WebkitOverflowScrolling:"touch",overflow:"auto"},yv=[Zo.cS,Zo.rw,Zo.wG,Zo.MS];class bv extends c.PureComponent{constructor(e){super(e),(0,o.Z)(this,"usingNavigationKeys",!1),(0,o.Z)(this,"handleScroll",(0,af.Z)(this.handleScroll.bind(this),100,!0)),(0,o.Z)(this,"handleKeyDown",(e=>{yv.indexOf(e.keyCode)>=0&&!this.usingNavigationKeys&&(this.usingNavigationKeys=!0)})),(0,o.Z)(this,"handleKeyUp",(e=>{yv.indexOf(e.keyCode)>=0&&this.usingNavigationKeys&&(this.usingNavigationKeys=!1)})),(0,o.Z)(this,"_handleRef",(e=>{e&&(this.element=e,this.props.onScrollElementChange(e))})),this.previousKnownScrollPosition=new w.E9,this.previousKnownZoomLevel=1}updateScrollbarOffset(e){const t=this.element.offsetWidth-this.element.clientWidth,n="hidden"!==this.element.style.overflow;"number"==typeof t&&e!=t&&n&&this.props.dispatch((0,Kt.IU)(t))}componentDidUpdate(e){requestAnimationFrame((()=>this.updateScrollbarOffset(e.scrollbarOffset))),this.updateScrollPosition()}componentDidMount(){this.updateScrollbarOffset(),this.updateScrollPosition(),this.props.dispatch((0,Kt.K_)(this.element)),this.element.ownerDocument.addEventListener("keydown",this.handleKeyDown),this.element.ownerDocument.addEventListener("keyup",this.handleKeyUp)}componentWillUnmount(){this.props.dispatch((0,Kt.K_)(null)),this.element.ownerDocument.removeEventListener("keydown",this.handleKeyDown),this.element.ownerDocument.removeEventListener("keyup",this.handleKeyUp)}updateScrollPosition(){const{viewportState:e}=this.props;if(0===e.viewportRect.width)return;if(this.previousKnownScrollPosition.equals(e.scrollPosition)&&this.previousKnownZoomLevel===e.zoomLevel)return;const t=this.element,n=Math.round(e.scrollPosition.x*e.zoomLevel),o=Math.round(e.scrollPosition.y*e.zoomLevel);t.scrollTop!==o&&(t.scrollTop=o),t.scrollLeft!==n&&(t.scrollLeft=n),this.previousKnownScrollPosition=e.scrollPosition,this.previousKnownZoomLevel=e.zoomLevel}handleScroll(){const{dispatch:e,viewportState:t}=this.props,{scrollPosition:n,zoomLevel:o}=t;if(0===t.viewportRect.width)return;const r=this.element;if(void 0===r.scrollTop||void 0===r.scrollLeft)return;const i=new w.E9({x:r.scrollLeft/o,y:r.scrollTop/o}),a=function(e,t,n){const o=1/n;return Math.abs(e.x-t.x)>o||Math.abs(e.y-t.y)>o}(n,i,o);a&&(this.previousKnownScrollPosition=i,this.previousKnownZoomLevel=o,e((0,mc.lt)(i,this.usingNavigationKeys)))}render(){const{children:e,scrollDisabled:t}=this.props;return c.createElement("div",{ref:this._handleRef,className:`PSPDFKit-Scroll ${hv().root}`,style:gv(gv({},vv),{},{overflow:t?"hidden":"auto"}),onScroll:this.handleScroll},e)}}var wv,Sv=n(98973),Pv=n.n(Sv);const Ev=(0,Se.XN)((function(e){const{formatMessage:t}=e.intl,n=t(xv.searchResultOf,{arg0:e.searchResultsSize>0?e.focusedResultIndex+1:0,arg1:e.searchResultsSize}),o=c.createElement("div",{role:"status",className:Pv().searchPosition,"aria-live":"polite","aria-label":Ke.vU?n:void 0},n);return c.createElement(c.Fragment,null,e.isLoading&&c.createElement("div",{className:Pv().loader},wv||(wv=c.createElement(Le.Z,null))),o)})),xv=(0,Se.vU)({searchResultOf:{id:"searchResultOf",defaultMessage:"{arg0} of {arg1}",description:"Shows the current search result number. E.g. 1 of 10"}});var Dv=n(50397),Cv=n.n(Dv);const kv=(0,Se.vU)({searchPreviousMatch:{id:"searchPreviousMatch",defaultMessage:"Previous",description:"Go to the previous search result"},searchNextMatch:{id:"searchNextMatch",defaultMessage:"Next",description:"Go to the next search result"}}),Ov=(0,Se.XN)((e=>{const t=c.useRef(null);c.useEffect((()=>{(()=>{const n=t.current;(0,Pe.k)(null!=n),n.ownerDocument.activeElement!==n&&e.isFocused?n.focus():n.ownerDocument.activeElement!==n||e.isFocused||n.blur()})()}));const{formatMessage:o}=e.intl,r=d()({[Cv().previous]:!0,"PSPDFKit-Search-Control-Prev":!0,"PSPDFKit-Search-Control-Prev-disabled":e.searchResultsSize<=0}),i=d()({[Cv().next]:!0,"PSPDFKit-Search-Control-Next":!0,"PSPDFKit-Search-Control-Next-disabled":e.searchResultsSize<=0}),a=0===e.term.length,s=d()({[Cv().results]:!0,[Cv().resultsDisabled]:a,"PSPDFKit-Search-Form-Result":!0}),l=o(ke.Z.searchDocument);return c.createElement("div",{className:d()("PSPDFKit-Search",Cv().root,{[Cv().noToolbar]:!e.showToolbar||e.toolbarPlacement!==bc.p.TOP}),"data-testid":"pspdfkit-search-form-component-root"},c.createElement("div",{className:`PSPDFKit-Search-Form ${Cv().searchBox}`},c.createElement("input",{type:"text",name:"search",ref:t,autoComplete:"off",placeholder:l,"aria-label":l,value:e.term,onChange:()=>{const n=t.current;(0,Pe.k)(null!=n);const o=n.value;let r=!1;e.eventEmitter.emit("search.termChange",{term:o,preventDefault:()=>{r=!0}}),r||(e.searchForTerm(n.value),e.searchProvider.searchTerm(n.value))},onKeyDown:t=>{t.shiftKey&&(t.keyCode===Zo.E$||t.metaKey&&t.keyCode===Zo.b8)?(t.preventDefault(),e.focusPreviousSearchHighlight()):t.keyCode===Zo.E$||t.metaKey&&t.keyCode===Zo.b8?(t.preventDefault(),e.focusNextSearchHighlight()):t.keyCode===Zo.zz&&(t.preventDefault(),e.hideSearch())},onFocus:()=>{e.focusSearch()},onBlur:()=>{e.blurSearch()},className:`PSPDFKit-Search-Form-Input ${Cv().input}`}),c.createElement("div",{className:s},!a&&c.createElement(Ev,{isLoading:e.isLoading,searchResultsSize:e.searchResultsSize,focusedResultIndex:e.focusedResultIndex})),c.createElement("div",{className:`PSPDFKit-Search-Control ${Cv().control}`},c.createElement("button",{className:r,title:o(kv.searchPreviousMatch),disabled:e.searchResultsSize<=1,onClick:e.focusPreviousSearchHighlight},c.createElement(Re.Z,{src:n(28069),className:`${Cv().icon} ${Cv().iconLeft}`})),c.createElement("button",{className:i,title:o(kv.searchNextMatch),disabled:e.searchResultsSize<=1,onClick:e.focusNextSearchHighlight},c.createElement(Re.Z,{src:n(14341),className:`${Cv().icon} ${Cv().iconRight}`})))),c.createElement("button",{className:`PSPDFKit-Search-Button-Close ${Cv().button}`,onClick:e.hideSearch},o(ke.Z.close)))}));const Av=(0,a.$j)((function(e){return{isFocused:e.searchState.isFocused,isLoading:e.searchState.isLoading,term:e.searchState.term,searchResultsSize:e.searchState.results.size,focusedResultIndex:e.searchState.focusedResultIndex,searchProvider:e.searchProvider,eventEmitter:e.eventEmitter,locale:e.locale,showToolbar:e.showToolbar,toolbarPlacement:e.toolbarPlacement}}),(function(e){return(0,E.DE)({searchForTerm:Yl._8,focusNextSearchHighlight:Yl.jL,focusPreviousSearchHighlight:Yl.dZ,hideSearch:Yl.ct,focusSearch:Yl.tB,blurSearch:Yl.nJ},e)}))(Ov);class Tv{constructor(e,t,n){var o;const r=e.getRangeAt(0);let i=new w.SV;if(this.selection=e,this.className=n,this.rootElement=t,this.window=t.ownerDocument.defaultView,this.commonAncestorContainer=r.commonAncestorContainer,e.rangeCount>1){const t=e.getRangeAt(e.rangeCount-1);r.setEnd(t.endContainer,t.endOffset)}const a=!(null!=t&&t.contains(r.startContainer)),l=!(null!=t&&t.contains(r.endContainer)),c=!(null!==(o=this.commonAncestorContainer)&&void 0!==o&&o.contains(t));if(a&&l&&c)this.textRange=null;else{if(r.startContainer instanceof this.window.Text&&null!=t&&t.contains(r.startContainer)&&this._parentsMatchClass(r.startContainer))i=i.set("startNode",r.startContainer).set("startOffset",r.startOffset);else if(r.startContainer instanceof this.window.Element||r.startContainer instanceof this.window.Text){let e;if(e=r.startContainer.hasChildNodes()?this._nextTextNode(r.startContainer.childNodes[r.startOffset]):this._nextTextNode(r.startContainer),null==e)return void(this.textRange=null);i=i.set("startNode",e).set("startOffset",0)}else(0,s.kG)(!1,"Selected start container is neither DOM Element nor Text");if(r.endContainer instanceof this.window.Text&&null!=t&&t.contains(r.endContainer)&&this._parentsMatchClass(r.endContainer))i=i.set("endNode",r.endContainer).set("endOffset",r.endOffset);else if(r.endContainer instanceof this.window.Element||r.endContainer instanceof this.window.Text){let e;if(r.endContainer.hasChildNodes())if(r.endOffset>=r.endContainer.childNodes.length){let t=this._nextCrossSibling(r.endContainer);t||(t=r.endContainer.childNodes[r.endContainer.childNodes.length-1]),e=this._previousTextNode(t)}else e=this._previousTextNode(r.endContainer.childNodes[r.endOffset]);else e=this._previousTextNode(r.endContainer);if(null==e)return void(this.textRange=null);i=i.set("endNode",e).set("endOffset",e.length)}else(0,s.kG)(!1,"Selected start container is neither DOM Element nor Text");if(i.startNode==i.endNode&&i.startOffset>=i.endOffset)return void(this.textRange=null);if(!this._isBeforeOrSame(i.startNode,i.endNode))return void(this.textRange=null);this.textRange=i}}getTextRange(){return this.textRange}_nextTextNode(e){let t=this._findNextSpanNodeInTree(e);if(e===this.commonAncestorContainer)return null;let n=e;for(;!t;){if(n=this._nextCrossSibling(n),null==n)return null;t=this._findNextSpanNodeInTree(n)}return t.firstChild}_previousTextNode(e){let t=null;if(e===this.commonAncestorContainer)return null;let n=e;for(;!t;){if(n=this._previousCrossSibling(n),null==n)return null;t=this._findLastSpanNodeInTree(n)}return t.firstChild}_nextCrossSibling(e){if(!e)return null;if(null!=e.nextSibling)return e.nextSibling;const t=e.parentNode;return null==t||t===this.commonAncestorContainer?null:null!=t.nextSibling?t.nextSibling:this._nextCrossSibling(t)}_previousCrossSibling(e){if(null!==e.previousSibling)return e.previousSibling;const t=e.parentNode;return null==t||t===this.commonAncestorContainer?null:null!==t.previousSibling?t.previousSibling:this._previousCrossSibling(t)}_findNextSpanNodeInTree(e){if(e instanceof this.window.HTMLElement&&e.classList.contains(this.className))return e;if(e instanceof this.window.HTMLElement)for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t],o=this._findNextSpanNodeInTree(n);if(null!==o)return o}return null}_findLastSpanNodeInTree(e){if(e instanceof this.window.HTMLElement&&e.classList.contains(this.className))return e;if(e instanceof this.window.HTMLElement)for(let t=e.childNodes.length-1;t>=0;t--){const n=e.childNodes[t],o=this._findLastSpanNodeInTree(n);if(null!==o)return o}return null}_parentsMatchClass(e){let t=e.parentNode;for(;t&&t instanceof this.window.HTMLElement&&t!==this.rootElement;){if(t.classList.contains(this.className))return!0;t=t.parentNode}return!1}_isBeforeOrSame(e,t){const n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=0==e.compareDocumentPosition(t);return n||o}_getSelectedTextWithNL(){if(!this.textRange)return this.selection.toString();const{startNode:e,endNode:t,startOffset:n,endOffset:o}=this.textRange;if(!e||!t)return this.selection.toString();if(e===t)return e.textContent?e.textContent.substring(n,o):"";let r=e,i=r.textContent?r.textContent.substring(n)+"\n":"";for(;r&&r!==t;)r=this._nextTextNode(r),r&&r.textContent&&(i+=r!==t?r.textContent+"\n":r.textContent.substring(0,o));return i}}var Iv=n(22181),Fv=n.n(Iv);let Mv=null,_v=null;const Nv=(e,t)=>e.container===t.container&&e.offset===t.offset,Rv={Left:!0,ArrowLeft:!0,Top:!0,ArrowTop:!0,Right:!0,ArrowRight:!0,Bottom:!0,ArrowBottom:!0,Home:!0,End:!0,PageDown:!0,PageUp:!0,Esc:!0,Escape:!0};class Lv extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"isMouseSelection",!1),(0,o.Z)(this,"pointerMadeSelection",!1),(0,o.Z)(this,"isShiftPressed",!1),(0,o.Z)(this,"isPrimaryPointerGesture",!1),(0,o.Z)(this,"_handleSelectStart",(()=>{this.props.interactionMode!==N.A.TEXT_HIGHLIGHTER&&this.props.interactionMode!==N.A.REDACT_TEXT_HIGHLIGHTER||(this.isShiftPressed?this._processTextSelection(Ke.Ni?"touch":"mouse"):this.props.dispatch((0,De.d5)((0,i.l4)(),this.props.interactionMode===N.A.TEXT_HIGHLIGHTER?w.FV:$.Z)))})),(0,o.Z)(this,"_handleSelectionChange",(()=>{const{rootElement:e,interactionMode:t}=this.props,{defaultView:n}=e.ownerDocument,o=null==n?void 0:n.getSelection();!this.pointerMadeSelection&&(e=>{if(e.rangeCount<=0)return!1;if(e.rangeCount>1){const t=e.getRangeAt(e.rangeCount-1);t.setEnd(t.endContainer,t.endOffset)}const t=e.getRangeAt(0),{startContainer:n,endContainer:o,startOffset:r,endOffset:i}=t,a={container:n,offset:r},s={container:o,offset:i};let l;return l=null===Mv||null===_v||!(Nv(Mv,a)||Nv(_v,s)||Nv(Mv,s)||Nv(_v,a)),Mv=a,_v=s,l})(o)&&(this._handleSelectStart(),this.pointerMadeSelection=!0),this.isMouseSelection&&t!==N.A.TEXT_HIGHLIGHTER&&t!==N.A.REDACT_TEXT_HIGHLIGHTER||o&&!o.isCollapsed&&this._processTextSelection(Ke.Ni?"touch":"mouse")})),(0,o.Z)(this,"_handlePointerUp",(e=>{let{pointerType:t,shiftKey:n}=e;this.isPrimaryPointerGesture&&("mouse"===t&&(this.isMouseSelection=!1),this.pointerMadeSelection=!1,this.isShiftPressed=n,n||window.setTimeout((()=>{this._checkForTextSelection(t)}),0))})),(0,o.Z)(this,"_handlePointerDown",(e=>{let{pointerType:t,shiftKey:n,isPrimary:o}=e;this.isPrimaryPointerGesture=o,"mouse"===t&&(this.isMouseSelection=!0,this.isShiftPressed=n)})),(0,o.Z)(this,"_handleKeyUp",(e=>{const{rootElement:t}=this.props;if(t){const n=t.ownerDocument.defaultView;this.isShiftPressed=e.shiftKey;const o=e.target;if(!Rv.hasOwnProperty(e.key)||n&&o instanceof n.HTMLElement&&((0,ar.eR)(o,n)||(0,ar.N1)(o)||(0,ar.gC)(o)))return;window.setTimeout((()=>{e.defaultPrevented||this._checkForTextSelection("mouse")}),0)}}))}componentDidMount(){const{rootElement:e}=this.props;e&&(e.ownerDocument.addEventListener("keyup",this._handleKeyUp),e.ownerDocument.addEventListener("selectionchange",this._handleSelectionChange))}componentWillUnmount(){const{rootElement:e}=this.props;e&&(e.ownerDocument.removeEventListener("keyup",this._handleKeyUp),e.ownerDocument.removeEventListener("selectionchange",this._handleSelectionChange)),Mv=null,_v=null}_checkForTextSelection(e){const{dispatch:t,currentTextSelection:n,selectedAnnotationIds:o,activeAnnotationNote:r,rootElement:i,interactionMode:a}=this.props,{defaultView:s}=i.ownerDocument;if(this.props.modalClosurePreventionError&&o.includes(this.props.modalClosurePreventionError.annotationId)){const e=i.ownerDocument.querySelector(".PSPDFKit-Form-Creator-Popover > .PSPDFKit-Popover");return null==e||e.classList.add(Fv().shakeEffect),void setTimeout((()=>{null==e||e.classList.remove(Fv().shakeEffect)}),200)}if(!s)return;const l=s.getSelection();l&&(l.isCollapsed?(n||o.size>0||r)&&(a===N.A.TEXT_HIGHLIGHTER||a===N.A.REDACT_TEXT_HIGHLIGHTER||a===N.A.CONTENT_EDITOR?(this.isShiftPressed&&t((0,De.td)(a===N.A.TEXT_HIGHLIGHTER?w.FV:$.Z)),t((0,De.vR)())):t((0,De.fz)())):this._processTextSelection(e))}_processTextSelection(e){const{dispatch:t,rootElement:n,interactionMode:o}=this.props,{defaultView:r}=n.ownerDocument;if(!r)return;const i=r.getSelection();if(!i)return;const s=i.rangeCount>0?((e,t,n)=>new Tv(e,t,n).getTextRange())(i,n,Ms().selectableText):null;null!=s&&(0,a.dC)((()=>{t((0,De.FP)(s,"mouse"===e&&o!==N.A.TEXT_HIGHLIGHTER&&o!==N.A.REDACT_TEXT_HIGHLIGHTER)),o===N.A.TEXT_HIGHLIGHTER?t((0,De.BO)(w.FV)):o===N.A.REDACT_TEXT_HIGHLIGHTER&&t((0,De.BO)($.Z))}))}render(){return c.createElement(Je.Z,{onPointerUp:this._handlePointerUp,onPointerDown:this._handlePointerDown},c.createElement("div",null,this.props.children))}}var Bv=n(47859);function jv(e,t){return e>t?t/1.5:e}class zv extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"sidebarRef",c.createRef()),(0,o.Z)(this,"state",{size:Math.min(this.props.initialSize,this.props.maxWidth),prevSize:Math.min(this.props.initialSize,this.props.maxWidth)}),(0,o.Z)(this,"onResize",(e=>{const{size:t}=this.state,{onResize:n}=this.props,o=this.sidebarRef.current&&this.sidebarRef.current.getBoundingClientRect();o&&(null==n||n({sidebarRect:o,isDragging:e,size:t}))})),(0,o.Z)(this,"onResizeFinish",(e=>{e!==this.props.initialSize&&this.props.dispatch((0,mc.Pt)(e))})),(0,o.Z)(this,"onDrag",((e,t)=>{const{minWidth:n,maxWidth:o}=this.props;this.setState((t=>{let{size:r}=t;return e<n?{size:n,prevSize:n}:e>o||o-e<10?{size:o,prevSize:r}:{size:e,prevSize:r}}),(()=>{this.onResize(t)}))})),(0,o.Z)(this,"onDoubleClick",(()=>{const{maxWidth:e}=this.props;this.setState((t=>{let{size:n,prevSize:o}=t;return n===e?{size:jv(o,e)}:{size:e,prevSize:n}}),(()=>this.onResize(!1)))}))}componentDidMount(){this.onResize(!1)}componentDidUpdate(e){const{size:t,prevSize:n}=this.state,{maxWidth:o}=this.props;o!==e.maxWidth&&(t===e.maxWidth||t>o)?this.setState({size:o,prevSize:jv(n,o)}):this.props.initialSize!==e.initialSize&&this.setState({size:this.props.initialSize})}componentWillUnmount(){this.onResize(!1)}render(){const{size:e}=this.state,{draggerSize:t,isRTL:n,maxWidth:o,minWidth:r}=this.props;return c.createElement("div",{ref:this.sidebarRef},c.createElement(Kv,{size:e,onDrag:this.onDrag,onDoubleClick:this.onDoubleClick,onResizeFinish:this.onResizeFinish,draggerSize:t,isRTL:n,currentValue:Math.round((e-r)/(o-r)*100)},c.createElement(Bv.ZP,null,this.props.children(e-t,t))))}}class Kv extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"state",{isDragging:!1,previousPosition:null}),(0,o.Z)(this,"_handlePointerDown",(e=>{const{isPrimary:t}=e;if(!t)return;const n=new b.E9({x:e.clientX,y:e.clientY});this.setState({isDragging:!0,previousPosition:n})})),(0,o.Z)(this,"_handlePointerMove",(e=>{if(!this.state.isDragging)return;const t=new b.E9({x:e.clientX,y:e.clientY});this._handleDrag(t)})),(0,o.Z)(this,"_handlePointerUp",(e=>{if(!this.state.isDragging)return;this.setState({isDragging:!1});const{previousPosition:t}=this.state;if(!t)return;const n=new b.E9({x:e.clientX,y:e.clientY}),o=this.props.size+(this.props.isRTL?t.x-n.x:n.x-t.x);this.props.onResizeFinish(o)})),(0,o.Z)(this,"_handleDoubleClick",(()=>{this.props.onDoubleClick()})),(0,o.Z)(this,"_handleKeyDown",(e=>{const{size:t,isRTL:n,onDrag:o,onDoubleClick:r}=this.props;"ArrowRight"===e.key?o(n?t-2:t+2,!1):"ArrowLeft"===e.key?o(n?t+2:t-2,!1):"Enter"===e.key&&r()})),(0,o.Z)(this,"_handleDrag",(e=>{const{previousPosition:t}=this.state;if(!t)return;const n=this.props.size+(this.props.isRTL?t.x-e.x:e.x-t.x);this.props.onDrag(n,!1),this.setState({previousPosition:e})}))}render(){const{isRTL:e,draggerSize:t,currentValue:n}=this.props;return c.createElement("div",{className:`${Jm().sidebar} PSPDFKit-Sidebar`,style:{width:this.props.size,position:"relative",overflow:"hidden",[e?"paddingLeft":"paddingRight"]:t}},this.props.children,c.createElement("div",{onDoubleClick:this._handleDoubleClick},c.createElement(Je.Z,{onPointerDown:this._handlePointerDown,onRootPointerMoveCapture:this._handlePointerMove,onRootPointerUpCapture:this._handlePointerUp},c.createElement("div",{style:{[e?"left":"right"]:0,width:t},className:`${Jm().dragger} PSPDFKit-Sidebar-Dragger`},c.createElement("div",{tabIndex:0,role:"separator","aria-label":"Resizer handle","aria-orientation":"vertical","aria-valuenow":n,onKeyDown:this._handleKeyDown,style:{[e?"right":"left"]:this.props.size-t},className:`${Jm().draggerHandle} PSPDFKit-Sidebar-DraggerHandle`})))))}}class Zv extends c.PureComponent{render(){const{formatMessage:e}=this.props.intl;return c.createElement(op.Z,{role:"dialog",onEscape:this.props.onEscape,background:"rgba(0,0,0,.1)",className:Ho().modal,accessibilityLabel:e(Uv.signatureDialog),accessibilityDescription:e(Uv.signatureDialogDescription)},this.props.children)}}const Uv={signatureDialog:{id:"signatureDialog",defaultMessage:"Signature",description:"Signature Dialog"},signatureDialogDescription:{id:"signatureDialogDesc",defaultMessage:"This dialog lets you select an ink signature to insert into the document. If you do not have stored signatures, you can create one using the canvas view.",description:"Signature Dialog description"}},Vv=(0,Se.XN)(Zv);var Gv=n(83634),Wv=n(86071),qv=n(73039);function Hv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function $v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hv(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Xv=Wv.Z.filter((e=>[Gv.Z.BLACK,Gv.Z.BLUE,Gv.Z.RED].includes(e.color)));class Yv extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"shouldComponentUpdate",Ce.O),(0,o.Z)(this,"state",{annotation:new qv.Z($v($v({},this.props.preset),{},{isSignature:!0})),zoomLevel:1}),(0,o.Z)(this,"_onAnnotationColorChange",(e=>{const t=this.state.annotation.withMutations((t=>{t.set("strokeColor",e)}));this._onChange(t)})),(0,o.Z)(this,"_clear",(()=>{this.setState({annotation:new qv.Z($v($v({},this.props.preset),{},{isSignature:!0}))},this._callOnChange)})),(0,o.Z)(this,"_onChange",(e=>{this.setState({annotation:e},this._callOnChange)})),(0,o.Z)(this,"_callOnChange",(()=>{const{onChange:e}=this.props;if(!e)return;e((0,Ri.c)(this.state.annotation,this.state.annotation.boundingBox.getLocation().scale(-1),this.props.canvasSize,new b.E9))})),(0,o.Z)(this,"_onResize",(e=>{this.setState({zoomLevel:e.width/this.props.canvasSize.width})}))}render(){const{annotation:e}=this.state,{canvasSize:t}=this.props,{formatMessage:n}=this.props.intl,o=e.lines.isEmpty();return c.createElement(c.Fragment,null,c.createElement("div",{className:Ho().header},c.createElement(Wu,{colorPresets:Xv,activeColor:e.strokeColor,onClick:this._onAnnotationColorChange,className:d()(Ho().colorPicker,"PSPDFKit-Signature-Dialog-Color-Picker")}),c.createElement(q.zx,{onClick:this._clear,inverted:!0,disabled:o,className:d()(Ho().button,"PSPDFKit-Signature-Dialog-Clear-Signature-Button")},n(ke.Z.clearSignature))),c.createElement("div",{className:Ho().editorCanvasContainer},c.createElement("div",{className:d()(Ho().editorCanvas,"PSPDFKit-Signature-Dialog-Canvas","PSPDFKit-Signature-Canvas","interactions-disabled")},c.createElement(_d.Z,{onResize:this._onResize}),c.createElement("div",{className:d()(Ho().signHere,"PSPDFKit-Signature-Dialog-Sign-Here-Label",{[Ho().signHereHidden]:!e.lines.isEmpty()})},n(Jv.pleaseSignHere)),c.createElement(Xr,{annotation:e,canvasSize:t,onDrawStart:this._onChange,onDraw:this._onChange,onDrawEnd:this._onChange,zoomLevel:this.state.zoomLevel,cursor:"crosshair"}))))}}(0,o.Z)(Yv,"defaultProps",{canvasSize:new b.$u({width:600,height:260}),preset:{}});const Jv=(0,Se.vU)({pleaseSignHere:{id:"pleaseSignHere",defaultMessage:"Please sign here",description:"Message on the signature canvas"}}),Qv=(0,Se.XN)(Yv);var ey,ty=n(41067),ny=n.n(ty);function oy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ry(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oy(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class iy extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"imageFetcherRef",c.createRef()),(0,o.Z)(this,"loadingIndicatorTimeout",null),(0,o.Z)(this,"unmounted",!1),(0,o.Z)(this,"state",{loadingState:"LOADING",showLoadingIndicator:!1}),(0,o.Z)(this,"_fetchImage",(()=>{const{backend:e,attachment:t,templateWidth:n}=this.props;let o=this.props.annotation.update("boundingBox",(e=>null==e?void 0:e.set("left",0).set("top",0))),{boundingBox:r}=o;const i=Math.max(r.width,r.height);return i<n&&(r=r.scale(n/i),o=o.set("boundingBox",r)),(0,_e.an)({backend:e,blob:null==t?void 0:t.data,annotation:o,isDetachedAnnotation:!0,zoomLevel:1})})),(0,o.Z)(this,"_renderFinished",(e=>{this.unmounted||(this.setState({loadingState:"LOADED"}),this.props.onRenderFinished&&this.props.onRenderFinished(e))})),(0,o.Z)(this,"_showError",(()=>{this.setState({loadingState:"ERROR"})})),(0,o.Z)(this,"_showLoadingIndicator",(()=>{this.setState((e=>({showLoadingIndicator:"LOADING"===e.loadingState})))}))}componentDidUpdate(e){if(!(0,i.is)((0,_.ip)(this.props.annotation),(0,_.ip)(e.annotation))||e.annotation.imageAttachmentId!==this.props.annotation.imageAttachmentId||e.templateWidth<this.props.templateWidth){if(!this.imageFetcherRef.current)return;this.imageFetcherRef.current.refresh()}}componentDidMount(){this.loadingIndicatorTimeout=setTimeout(this._showLoadingIndicator,Be.rB)}componentWillUnmount(){this.unmounted=!0,window.clearTimeout(this.loadingIndicatorTimeout)}render(){const{annotation:e,templateWidth:t,label:n,contain:o}=this.props,{opacity:r}=e,{width:i,height:a}=e.boundingBox,s=i>0&&a>0?i/a:1,l=s>1?ny().wideImg:ny().highImg,u=d()(e instanceof w.sK?ny().imageAnnotation:ny().stampAnnotation,o?ny().containedImg:ny().notContainedImg,l),p=d()(ny().wrapper,{[ny()["imageAnnotation-loading"]]:"LOADING"===this.state.loadingState&&this.state.showLoadingIndicator,[ny()["imageAnnotation-error"]]:"ERROR"===this.state.loadingState}),f={opacity:r,position:"relative",width:o?0===t||s>=1?"100%":t:"auto"},h=ry(ry({},f),{},{height:0===t?"100%":s>1?t:t*s});return c.createElement("div",{style:f,className:p},c.createElement(Ne.Z,{className:u,fetchImage:this._fetchImage,label:n,visible:!0,onRenderFinished:this._renderFinished,onError:this._showError,rectStyle:h,ref:this.imageFetcherRef}),"LOADING"===this.state.loadingState&&this.state.showLoadingIndicator?c.createElement("div",{className:ny().placeHolder},ey||(ey=c.createElement(Le.Z,null))):"ERROR"===this.state.loadingState?c.createElement("div",{className:ny().placeHolder},c.createElement(Re.Z,{src:ze(),className:ny().errorIcon})):null)}}class ay extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"shouldComponentUpdate",Ce.O)}render(){const{formatMessage:e}=this.props.intl,t=null==this.props.showDeleteBtn||this.props.showDeleteBtn;return c.createElement("ul",{className:d()(Ho().signaturePickerList,"PSPDFKit-Signature-Dialog-Picker","PSPDFKit-Signature-Picker")},this.props.signatures.map(((o,r)=>c.createElement("li",{key:r,className:d()(Ho().signaturePickerListItem,"PSPDFKit-Signature-Dialog-Picker-Item"),"data-signature":r},c.createElement(q.zx,{className:d()(Ho().selectSignatureButton,"PSPDFKit-Signature-Dialog-Picker-Item-Button",{[Ho().imageAnnotation]:o instanceof w.sK}),onClick:()=>{this.props.onSelect(o)},autoFocus:0===r},o instanceof w.Zc?c.createElement(dt,{isSelectable:!1,annotation:o,viewBox:o.boundingBox}):c.createElement(iy,{annotation:o,backend:this.props.backend,label:o.description||e(ke.Z.imageAnnotation),attachment:o.imageAttachmentId?this.props.attachments.get(o.imageAttachmentId):null,templateWidth:153.5})),t?c.createElement("button",{className:d()(Ho().deleteSignatureButton,"PSPDFKit-Signature-Dialog-Picker-Item-Delete-Button"),onClick:()=>{this.props.onDelete(o)},"aria-label":e(ke.Z.delete)},c.createElement(Re.Z,{src:n(61019)})):null))))}}const sy=(0,Se.XN)(ay);var ly;function cy(e){let{children:t,hasDivider:n}=e;return n?c.createElement(c.Fragment,null,ly||(ly=c.createElement(q.u_.Divider,{spaced:!1})),c.createElement(q.u_.Section,null,t)):c.createElement("div",{className:Ho().footer},t)}class uy extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"state",{annotation:null,hideSignaturePicker:!1,storeSignature:!!this.props.canStoreSignature}),(0,o.Z)(this,"_hideSignaturePicker",(()=>{this.setState({hideSignaturePicker:!0,annotation:null})})),(0,o.Z)(this,"_onSignatureChange",(e=>{this.setState({annotation:e})})),(0,o.Z)(this,"_onDone",(()=>{const{onCreate:e,onCancel:t}=this.props,{annotation:n,storeSignature:o}=this.state;n?null==e||e(n,o,!0):null==t||t()})),(0,o.Z)(this,"_toggleStoreSignature",(()=>{this.setState((e=>({storeSignature:!e.storeSignature})))}))}render(){const{onCreate:e,onDelete:t,storedSignatures:n,preset:o}=this.props,r=!!this.props.canStoreSignature,a=!this.state.hideSignaturePicker&&r&&Boolean(n&&n.size>0),{formatMessage:s}=this.props.intl,{annotation:l,storeSignature:u}=this.state,p=null!==l&&l.lines instanceof i.aV&&!l.lines.isEmpty(),{SIGNATURE_SAVE_MODE:f}=rt.Options,h=f===yc.f.USING_UI;return c.createElement("div",{className:d()(Ho().viewRoot,"PSPDFKit-Signature-Dialog",{[Ho().viewSignaturePicker]:a})},a&&n?c.createElement(c.Fragment,null,c.createElement("div",{className:Ho().header},c.createElement("div",{className:d()(Ho().title,"PSPDFKit-Signature-Dialog-Signature-Heading"),role:"heading","aria-level":"1"},s(ke.Z.signatures)),c.createElement(q.zx,{className:"PSPDFKit-Signature-Dialog-Add-Signature-Button",onClick:this._hideSignaturePicker,inverted:!0},s(ke.Z.addSignature))),c.createElement("div",{className:Ho().signaturePickerContainer},c.createElement(sy,{signatures:n,onSelect:t=>{e(t,!1,!0)},onDelete:e=>{t(e,!0)},backend:this.props.backend,attachments:this.props.attachments,viewportWidth:this.props.viewportWidth}))):c.createElement(Qv,{onChange:this._onSignatureChange,preset:o}),c.createElement(cy,{hasDivider:a&&r},!a&&r&&h&&c.createElement("label",{className:d()(Ho().checkbox,"PSPDFKit-Signature-Dialog-Store-Signature-Checkbox")},c.createElement("input",{type:"checkbox",name:"store",checked:u,onChange:this._toggleStoreSignature}),c.createElement("span",{className:Ho().checkboxLabel},s(ke.Z.storeSignature))),c.createElement(q.hE,{className:Ho().group,align:"end"},c.createElement(q.zx,{onClick:this.props.onCancel,className:d()(Ho().button,"PSPDFKit-Signature-Dialog-Cancel-Button"),autoFocus:!a},s(ke.Z.cancel)),!a&&c.createElement(q.zx,{primary:!0,disabled:!p,onClick:p?this._onDone:null,className:d()(Ho().button,"PSPDFKit-Signature-Dialog-Done-Button")},s(ke.Z.done)))))}}(0,o.Z)(uy,"defaultProps",{canStoreSignature:!0});const dy=(0,Se.XN)(uy);var py=n(44182),fy=n.n(py),hy=n(41775);const my=e=>{const{formatMessage:t}=(0,Se.YB)();return c.createElement(op.Z,{backdropFixed:!0,role:"dialog",onEscape:e.onEscape,background:"rgba(0, 0, 0, 0.1)",className:e.showPicker?fy().modal:fy().editorModal,accessibilityLabel:t(hy.Z.stampAnnotationTemplatesDialog),accessibilityDescription:t(hy.Z.stampAnnotationTemplatesDialogDescription)},e.children)};var gy=n(33754);class vy extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"_onSelect",(e=>{this.props.onSelect(e)})),(0,o.Z)(this,"_initializeTemplateValues",(e=>(e instanceof de.GI&&(null==e.title&&(e=e.set("title",(0,ac.vW)({annotation:e,intl:this.props.intl}))),e.subtitle&&"Custom"===e.stampType||(e=e.set("subtitle",(0,ac.Cq)(gy.pY[e.stampType],new Date,this.props.intl))),void 0!==gy.a$[e.stampType]&&(e=e.set("stampType",gy.a$[e.stampType]))),e)))}componentDidMount(){const{stampAnnotationTemplates:e,attachments:t}=this.props;let n=!1;e.forEach((e=>{e.imageAttachmentId&&!t.has(e.imageAttachmentId)&&(n=!0,(0,s.ZK)("No attachment found for stamp template with imageAttachmentId set: "+e.toJS()))})),n&&(0,s.ZK)("When the document is reloaded due to having performed operations on the document you need to regenerate any attachments that are not present in the document. Check the corresponding KB article: https://pspdfkit.com/guides/web/current/knowledge-base/image-attachments-lost-stamp-annotation-templates/")}render(){const{intl:{formatMessage:e},viewportWidth:t}=this.props,n=t<Be.GI?2:3,o=2===n?t:640,r=2===n?.4625*o*.8333:.3*o*.8333;return c.createElement(c.Fragment,null,c.createElement("div",{className:fy().stampPickerContainer},c.createElement("ul",{className:d()(fy().stampPickerList,"PSPDFKit-Stamp-Picker")},this.props.stampAnnotationTemplates.map(this._initializeTemplateValues).map(((t,n)=>{const o=(0,ac.vW)({annotation:t,intl:this.props.intl});return c.createElement("li",{key:n,className:fy().stampPickerListItem},c.createElement(q.zx,{className:fy().selectStampButton,onClick:()=>{this._onSelect(t)},autoFocus:0===n,"aria-label":o,title:o},c.createElement("div",{className:fy().templateImageContainer},c.createElement(iy,{annotation:t,backend:this.props.backend,label:t instanceof de.sK?e(ke.Z.imageAnnotation):t.title||e(hy.Z[(0,I.LE)((0,gy.k1)(t.stampType))]),attachment:t.imageAttachmentId?this.props.attachments.get(t.imageAttachmentId):null,templateWidth:r,contain:!0}))))})))),c.createElement(Oy,{raised:"top"},c.createElement(q.hE,{className:fy().group,align:"start"},c.createElement(q.zx,{onClick:this.props.onCancel,className:fy().button},e(ke.Z.cancel)))))}}const yy=(0,Se.XN)(vy),by={textTransform:"uppercase"},wy=ac.s3.find((e=>"blue"===e.localization.id));(0,Pe.k)(null!=wy),(0,Pe.k)(wy.color instanceof Gv.Z);const Sy=wy.color;class Py extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"_stampWidth",Be.$P),(0,o.Z)(this,"currentDate",new Date),(0,o.Z)(this,"state",{includeDate:!0,includeTime:!0,title:"",color:Sy}),(0,o.Z)(this,"_setWidth",(e=>{this._stampWidth=e})),(0,o.Z)(this,"_onAnnotationColorChange",(e=>{this.setState({color:e})})),(0,o.Z)(this,"_toggleIncludeDate",(()=>{this.setState({includeDate:!this.state.includeDate})})),(0,o.Z)(this,"_toggleIncludeTime",(()=>{this.setState({includeTime:!this.state.includeTime})})),(0,o.Z)(this,"_updateText",(e=>{this.setState({title:e.currentTarget.value.toUpperCase()})})),(0,o.Z)(this,"_onCreate",(()=>{const{includeDate:e,includeTime:t}=this.state;this.props.onCreate(new w.GI({stampType:"Custom",title:this.state.title,subtitle:(0,ac.Cq)({includeDate:e,includeTime:t},this.currentDate,this.props.intl),color:this.state.color,boundingBox:new w.UL({left:0,top:0,width:this._stampWidth,height:Be.mM})}))}))}render(){const{formatMessage:e}=this.props.intl,{includeDate:t,includeTime:n,title:o,color:r}=this.state,i=(0,ac.Cq)({includeDate:t,includeTime:n},this.currentDate,this.props.intl);return c.createElement(c.Fragment,null,c.createElement("div",{className:fy().previewContainerBlock},c.createElement("div",{className:d()(fy().previewContainer,"PSPDFKit-Stamp-Editor")},c.createElement(Ey,{title:o,subtitle:i,color:r,setWidth:this._setWidth})),c.createElement("div",{className:fy().modalSubHeader},e(ke.Z.stampText)),c.createElement(q.oi,{"aria-label":e(ke.Z.stampText),autoFocus:!0,onChange:this._updateText,value:o,style:by}),c.createElement("div",{className:fy().dateTimeLabels},c.createElement("label",{className:fy().checkbox},c.createElement("input",{type:"checkbox",name:"store",checked:t,onChange:this._toggleIncludeDate}),c.createElement("span",{style:{width:"0.5em"}}),c.createElement("span",null,e(ke.Z.date))),c.createElement("label",{className:fy().checkbox},c.createElement("input",{type:"checkbox",name:"store",checked:n,onChange:this._toggleIncludeTime}),c.createElement("span",{style:{width:"0.5em"}}),c.createElement("span",null,e(ke.Z.time)))),c.createElement("div",{className:fy().modalSubHeader},e(ke.Z.chooseColor)),c.createElement(Wu,{colorPresets:ac.s3,activeColor:r||Sy,onClick:this._onAnnotationColorChange,className:fy().colorPicker,accessibilityLabel:e(ke.Z.color)})),c.createElement(Oy,null,c.createElement(q.hE,{className:d()(fy().group,fy().spaceBetween)},c.createElement(q.zx,{onClick:this.props.onCancel,className:fy().button},e(ke.Z.cancel)),c.createElement(q.zx,{className:fy().button,primary:!0,onClick:this._onCreate},e(xy.createStamp)))))}}class Ey extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"_canvasEl",null),(0,o.Z)(this,"_canvasRef",(e=>{this._canvasEl=e,this.props.setWidth(this._drawCustomStamp())})),(0,o.Z)(this,"_drawCustomStamp",(()=>(0,ac.HL)({canvas:this._canvasEl,title:this.props.title,subtitle:this.props.subtitle,color:this.props.color,defaultStampWidth:Be.$P,stampHeight:Be.mM,container:this._canvasEl&&this._canvasEl.parentElement&&this._canvasEl.parentElement.parentElement})))}render(){const e=this._drawCustomStamp();return this.props.setWidth(e),c.createElement("div",{className:fy().customStampPreviewContainer,style:{width:e,height:Be.mM}},c.createElement("canvas",{ref:this._canvasRef,style:{width:e,height:Be.mM}}))}}const xy=(0,Se.vU)({createStamp:{id:"createStamp",defaultMessage:"Create Stamp",description:"Create Stamp from edited template."}}),Dy=(0,Se.XN)(Py);class Cy extends c.PureComponent{constructor(){super(...arguments),(0,o.Z)(this,"_toggleStampsPicker",(()=>{this.props.dispatch(this.props.showPicker?(0,Kt._z)():(0,Kt.C4)())}))}render(){const{onCreate:e,onCancel:t,stampAnnotationTemplates:n,backend:o,dispatch:r,attachments:i,viewportWidth:a,intl:{formatMessage:s}}=this.props;return c.createElement("div",{className:d()(fy().viewRoot,this.props.showPicker&&fy().viewStampsPicker)},this.props.showPicker?c.createElement(c.Fragment,null,c.createElement(Oy,{raised:"bottom",className:fy().header,useDivider:!1},c.createElement(c.Fragment,null,c.createElement("div",{className:fy().title,role:"heading","aria-level":"1"},s(ke.Z.useAnExistingStampDesign)),c.createElement(q.zx,{onClick:this._toggleStampsPicker,inverted:!0,className:`PSPDFKit-Stamp-Dialog-Custom-Stamp-Button ${fy().group}`},s(ke.Z.customStamp)))),c.createElement(yy,{stampAnnotationTemplates:n,onSelect:e,onCancel:t,backend:o,dispatch:r,attachments:i,viewportWidth:a})):c.createElement(c.Fragment,null,c.createElement(Oy,{className:fy().header},c.createElement(c.Fragment,null,c.createElement("div",{className:fy().title,role:"heading","aria-level":"1"},s(ke.Z.customStamp)),c.createElement(q.zx,{onClick:this._toggleStampsPicker,inverted:!0,className:`.PSPDFKit-Stamp-Dialog-Existing-Stamp-Button ${fy().group}`},s(ke.Z.useAnExistingStampDesign)))),c.createElement(Dy,{onCreate:e,onCancel:t,dispatch:r})))}}const ky={top:"0 -2px",left:"-2px 0",right:"2px 0",bottom:"0 2px"},Oy=e=>{let{children:t,raised:n,className:o,useDivider:r=!0}=e;const i=n?{boxShadow:`${ky[n]} 5px rgba(0,0,0, 0.1)`,position:"relative",[`border${n.charAt(0).toUpperCase()}${n.substr(1)}Width`]:1}:{};return c.createElement(c.Fragment,null,r&&c.createElement(op.Z.Divider,{spaced:!1,className:fy().modalDivider}),c.createElement(op.Z.Section,{className:d()(fy().stampModalSection,o),style:i},t))},Ay=((0,Se.vU)({customStamp:{id:"customStamp",defaultMessage:"Custom Stamp",description:"Edit custom stamp template."}}),(0,Se.XN)(Cy));var Ty=n(6437),Iy=n(98785),Fy=n(19419);const My=(0,Se.vU)({thumbnails:{id:"thumbnails",defaultMessage:"Thumbnails",description:"Thumbnails"}});const _y=(0,Zn.x)((function(e){const{pages:t,backend:n,viewportState:{viewportRect:o},annotations:r,attachments:a,showAnnotations:s,formFields:l,renderPageCallback:c}=e,u=(0,Ze.Qg)(l);return{annotations:s?r:(0,i.D5)(),attachments:a,backend:n,formFields:l,formFieldValues:u,height:o.height,pages:t,renderPageCallback:c}}))((function(e){const{pages:t,closeOnPress:n,selectedPageIndex:o,navigationDisabled:r}=e,[s,l]=c.useState(null);c.useEffect((()=>{null==s||s.focus()}),[s]);const u=c.useMemo((()=>t.map(Fy.J)),[t]),{formatMessage:d}=(0,Se.YB)(),p=(0,_r.Bo)(s,u),f=(0,_r.mP)(p,(e=>String(e.index)),(e=>null==u?void 0:u.find((t=>String(t.index)===String(e))))),h=(0,a.I0)(),m=c.useCallback((function(e){r||(n?(h((0,mc.YA)(e)),h((0,Kt.mu)())):e!==o&&h((0,mc.YA)(e)))}),[n,h,o,r]),g=c.useCallback((function(e,n,o){const r=t.find((t=>t.pageIndex===e));if(!r)return{item:null,label:e+1+""};const i=f?e=>{f(e,(0,Fy.J)(r))}:void 0;return{item:c.createElement(Iy.Z,{key:r.pageKey,page:r,size:n,maxSize:o,pageRef:i}),label:r.pageLabel||e+1+""}}),[t,f]),v=c.useCallback((function(e){const n=t.find((t=>t.pageIndex===e));return(null==n?void 0:n.pageKey)||`${e}`}),[t]);return c.createElement("div",{role:"region","aria-label":d(My.thumbnails),tabIndex:-1,ref:l,className:"PSPDFKit-Sidebar-Thumbnails"},u?c.createElement(Ty.Z,{width:e.width,height:e.height,totalItems:u.size,renderItemCallback:g,itemKeyCallback:v,itemScale:e.scale,onItemPress:m,selectedItemIndexes:(0,i.l4)([o]),cssPrefix:"PSPDFKit-Sidebar",clickDisabled:r}):null)}));var Ny=n(46983),Ry=n.n(Ny);function Ly(e){let{position:t,children:n}=e;return c.createElement("div",null,c.createElement("div",{className:d()("PSPDFKit-Toolbars",Ry().root,{[Ry().stickToBottom]:"bottom"===t})},n))}var By=n(76367),jy=n(70742),zy=n.n(jy);function Ky(e){const[t,o]=c.useState(!1),[r,i]=c.useState(!1),a=c.useRef(e.digitalSignatures);c.useEffect((()=>{e.digitalSignatures!==a.current&&o(!1),a.current=e.digitalSignatures}),[e.digitalSignatures]),c.useEffect((()=>{!async function(){const t=(0,er.jI)(e.digitalSignatures,e.showSignatureValidationStatus);i(t)}()}),[e.showSignatureValidationStatus,e.digitalSignatures]);const{formatMessage:s}=(0,Se.YB)(),{status:l,messageId:u,iconPath:p}=e.digitalSignatures?function(e){let{documentModifiedSinceSignature:t,status:n}=e;if(n===By._.valid)return t?{status:"warning",messageId:"digitalSignaturesDocModified",iconPath:"warning-2.svg"}:{status:"valid",messageId:"digitalSignaturesAllValid",iconPath:"digital-signatures/signature-valid.svg"};if(n===By._.warning)return{status:"warning",messageId:t?"digitalSignaturesSignatureWarningDocModified":"digitalSignaturesSignatureWarning",iconPath:"warning-2.svg"};if(n===By._.error)return{status:"error",messageId:t?"digitalSignaturesSignatureErrorDocModified":"digitalSignaturesSignatureError",iconPath:"digital-signatures/signature-error.svg"};return{status:null,messageId:null,iconPath:null}}(e.digitalSignatures):{status:null,messageId:null,iconPath:null};if(null==l||null==u||t)return null;const f=d()(zy().root,zy()[`status-${l}`],"PSPDFKit-Digital-Signatures-Status",`PSPDFKit-Digital-Signatures-Status-${(0,hn.kC)(l)}`),h=d()(zy().signatureValidationStatusIcon,zy()[`status-${l}-icon`],"PSPDFKit-Digital-Signatures-Status-Icon");return r?c.createElement("div",{className:f},c.createElement("div",{className:zy().signatureInfoContainer},c.createElement("div",{className:zy().signatureValidationStatusIconContainer},c.createElement(Re.Z,{className:h,src:n(79230)(`./${p}`)})),c.createElement("span",{className:d()(zy().signatureValidationStatusText,"PSPDFKit-Digital-Signatures-Status-Text")},s(Zy[u]))),c.createElement(q.zx,{className:d()(zy().signatureValidationCloseButton,"PSPDFKit-Digital-Signatures-Status-Close-Button"),onClick:()=>{o(!0)},"aria-label":"Close digital signatures status bar"},c.createElement(Re.Z,{className:zy().signatureValidationCloseIcon,src:n(15708)}))):null}const Zy=(0,Se.vU)({digitalSignaturesDocModified:{id:"digitalSignaturesDocModified",defaultMessage:"The document has been digitally signed, but it has been modified since it was signed.",description:"Message when document is valid but has been modified since it was signed."},digitalSignaturesAllValid:{id:"digitalSignaturesAllValid",defaultMessage:"The document has been digitally signed and all signatures are valid.",description:"Message when document is valid."},digitalSignaturesSignatureWarningDocModified:{id:"digitalSignaturesSignatureWarningDocModified",defaultMessage:"The document has been digitally signed, but it has been modified since it was signed and at least one signature has problems.",description:'Message when the document is in a "warning" status and the document has been modified since signing.'},digitalSignaturesSignatureWarning:{id:"digitalSignaturesSignatureWarning",defaultMessage:"The document has been digitally signed, but at least one signature has problems.",description:'Message when the document is in a "warning" status.'},digitalSignaturesSignatureErrorDocModified:{id:"digitalSignaturesSignatureErrorDocModified",defaultMessage:"The document has been digitally signed, but it has been modified since it was signed and at least one signature is invalid.",description:'Message when the document is in a "error" status and the document has been modified since signing.'},digitalSignaturesSignatureError:{id:"digitalSignaturesSignatureError",defaultMessage:"The document has been digitally signed, but at least one signature is invalid.",description:'Message when the document is in a "error" status.'}});var Uy=n(90133),Vy=n.n(Uy);const Gy=c.memo((function(e){return c.createElement(Og,{itemClassName:Vy().item,rootClassName:d()("PSPDFKit-Annotation-Tooltip",Vy().root),items:e.items})}));var Wy=n(73396),qy=n.n(Wy);function Hy(e){let{viewportState:{viewportRect:t,commentMode:n},children:o,scrollbarOffset:r}=e;const i={width:t.width+r,height:n===Bf._.PANE?t.height/2:t.height};return c.createElement("div",{className:`PSPDFKit-Viewport ${qy().root}`,style:i},o)}var $y=n(73535),Xy=n.n($y);const Yy=(0,Se.XN)((function(e){const{formatMessage:t}=e.intl;return c.createElement(op.Z,{role:"alertdialog",onEscape:e.onCancel,background:"rgba(0,0,0,.1)",className:"PSPDFKit-Confirm-Dialog PSPDFKit-Reload-Document-Confirm-Dialog",accessibilityLabel:t(Jy.reloadDocumentDialog),accessibilityDescription:t(Jy.reloadDocumentDialogDesc)},c.createElement(op.Z.Section,{style:{paddingBottom:0}},c.createElement("div",{className:`${Xy().content} PSPDFKit-Confirm-Dialog-Content`},c.createElement("div",null,t(Jy.instantModifiedWarning)))),c.createElement(op.Z.Section,null,c.createElement(q.hE,{className:"PSPDFKit-Confirm-Dialog-Buttons",align:"end"},c.createElement(q.zx,{autoFocus:!0,onClick:e.onCancel,className:"PSPDFKit-Confirm-Dialog-Button PSPDFKit-Confirm-Dialog-Button-Cancel"},t(ke.Z.cancel)),c.createElement(q.zx,{onClick:e.onConfirm,primary:!0,className:"PSPDFKit-Confirm-Dialog-Button PSPDFKit-Confirm-Dialog-Button-Confirm"},t(Jy.reloadDocument)))))})),Jy=(0,Se.vU)({instantModifiedWarning:{id:"instantModifiedWarning",defaultMessage:"Reload document confirm dialog message",description:"The document was modified and is now in read-only mode. Reload the page to fix this."},reloadDocument:{id:"reloadDocument",defaultMessage:"Reload document",description:"Reload"},reloadDocumentDialog:{id:"reloadDocumentDialog",defaultMessage:"Confirm document reload",description:"Reload Document Confirm Dialog"},reloadDocumentDialogDesc:{id:"reloadDocumentDialogDesc",defaultMessage:"Dialog prompting the user to confirm reloading the document.",description:"Description for the Reload Document Dialog"}});var Qy=n(41194),eb=n(64494),tb=n(83251),nb=n.n(tb);function ob(e){const{formatMessage:t}=(0,Se.YB)();return c.createElement(op.Z,{role:"dialog",onEscape:e.onEscape,className:nb().modal,accessibilityLabel:t(rb.signatureDialog),accessibilityDescription:t(rb.signatureDialogDescription)},e.children)}const rb={signatureDialog:{id:"signatureDialog",defaultMessage:"Signature",description:"Signature Dialog"},signatureDialogDescription:{id:"signatureDialogDesc",defaultMessage:"This dialog lets you select a signature to insert into the document. If you do not have stored signatures, you can create one by drawing, typing or selecting an existing image.",description:"Signature Dialog description"}};function ib(e){return function(t){return!!t.type&&t.type.tabsRole===e}}var ab=ib("Tab"),sb=ib("TabList"),lb=ib("TabPanel");function cb(){return cb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},cb.apply(this,arguments)}function ub(e,t){return c.Children.map(e,(function(e){return null===e?null:function(e){return ab(e)||sb(e)||lb(e)}(e)?t(e):e.props&&e.props.children&&"object"==typeof e.props.children?(0,c.cloneElement)(e,cb({},e.props,{children:ub(e.props.children,t)})):e}))}function db(e,t){return c.Children.forEach(e,(function(e){null!==e&&(ab(e)||lb(e)?t(e):e.props&&e.props.children&&"object"==typeof e.props.children&&(sb(e)&&t(e),db(e.props.children,t)))}))}function pb(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=pb(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function fb(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=pb(e))&&(o&&(o+=" "),o+=t);return o}var hb,mb=0;function gb(){return"react-tabs-"+mb++}function vb(e){var t=0;return db(e,(function(e){ab(e)&&t++})),t}function yb(){return yb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},yb.apply(this,arguments)}function bb(e,t){return bb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},bb(e,t)}function wb(e){return e&&"getAttribute"in e}function Sb(e){return wb(e)&&"tab"===e.getAttribute("role")}function Pb(e){return wb(e)&&"true"===e.getAttribute("aria-disabled")}var Eb=function(e){var t,n;function o(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=e.call.apply(e,[this].concat(o))||this).tabNodes=[],t.handleKeyDown=function(e){var n=t.props,o=n.direction,r=n.disableUpDownKeys;if(t.isTabFromContainer(e.target)){var i=t.props.selectedIndex,a=!1,s=!1;32!==e.keyCode&&13!==e.keyCode||(a=!0,s=!1,t.handleClick(e)),37===e.keyCode||!r&&38===e.keyCode?(i="rtl"===o?t.getNextTab(i):t.getPrevTab(i),a=!0,s=!0):39===e.keyCode||!r&&40===e.keyCode?(i="rtl"===o?t.getPrevTab(i):t.getNextTab(i),a=!0,s=!0):35===e.keyCode?(i=t.getLastTab(),a=!0,s=!0):36===e.keyCode&&(i=t.getFirstTab(),a=!0,s=!0),a&&e.preventDefault(),s&&t.setSelected(i,e)}},t.handleClick=function(e){var n=e.target;do{if(t.isTabFromContainer(n)){if(Pb(n))return;var o=[].slice.call(n.parentNode.children).filter(Sb).indexOf(n);return void t.setSelected(o,e)}}while(null!=(n=n.parentNode))},t}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,bb(t,n);var r=o.prototype;return r.setSelected=function(e,t){if(!(e<0||e>=this.getTabsCount())){var n=this.props;(0,n.onSelect)(e,n.selectedIndex,t)}},r.getNextTab=function(e){for(var t=this.getTabsCount(),n=e+1;n<t;n++)if(!Pb(this.getTab(n)))return n;for(var o=0;o<e;o++)if(!Pb(this.getTab(o)))return o;return e},r.getPrevTab=function(e){for(var t=e;t--;)if(!Pb(this.getTab(t)))return t;for(t=this.getTabsCount();t-- >e;)if(!Pb(this.getTab(t)))return t;return e},r.getFirstTab=function(){for(var e=this.getTabsCount(),t=0;t<e;t++)if(!Pb(this.getTab(t)))return t;return null},r.getLastTab=function(){for(var e=this.getTabsCount();e--;)if(!Pb(this.getTab(e)))return e;return null},r.getTabsCount=function(){return vb(this.props.children)},r.getPanelsCount=function(){return function(e){var t=0;return db(e,(function(e){lb(e)&&t++})),t}(this.props.children)},r.getTab=function(e){return this.tabNodes["tabs-"+e]},r.getChildren=function(){var e=this,t=0,n=this.props,o=n.children,r=n.disabledTabClassName,i=n.focus,a=n.forceRenderTabPanel,s=n.selectedIndex,l=n.selectedTabClassName,u=n.selectedTabPanelClassName,d=n.environment;this.tabIds=this.tabIds||[],this.panelIds=this.panelIds||[];for(var p=this.tabIds.length-this.getTabsCount();p++<0;)this.tabIds.push(gb()),this.panelIds.push(gb());return ub(o,(function(n){var o=n;if(sb(n)){var p=0,f=!1;null==hb&&function(e){var t=e||("undefined"!=typeof window?window:void 0);try{hb=!(void 0===t||!t.document||!t.document.activeElement)}catch(e){hb=!1}}(d),hb&&(f=c.Children.toArray(n.props.children).filter(ab).some((function(t,n){var o=d||("undefined"!=typeof window?window:void 0);return o&&o.document.activeElement===e.getTab(n)}))),o=(0,c.cloneElement)(n,{children:ub(n.props.children,(function(t){var n="tabs-"+p,o=s===p,a={tabRef:function(t){e.tabNodes[n]=t},id:e.tabIds[p],panelId:e.panelIds[p],selected:o,focus:o&&(i||f)};return l&&(a.selectedClassName=l),r&&(a.disabledClassName=r),p++,(0,c.cloneElement)(t,a)}))})}else if(lb(n)){var h={id:e.panelIds[t],tabId:e.tabIds[t],selected:s===t};a&&(h.forceRender=a),u&&(h.selectedClassName=u),t++,o=(0,c.cloneElement)(n,h)}return o}))},r.isTabFromContainer=function(e){if(!Sb(e))return!1;var t=e.parentElement;do{if(t===this.node)return!0;if(t.getAttribute("data-tabs"))break;t=t.parentElement}while(t);return!1},r.render=function(){var e=this,t=this.props,n=(t.children,t.className),o=(t.disabledTabClassName,t.domRef),r=(t.focus,t.forceRenderTabPanel,t.onSelect,t.selectedIndex,t.selectedTabClassName,t.selectedTabPanelClassName,t.environment,t.disableUpDownKeys,function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(t,["children","className","disabledTabClassName","domRef","focus","forceRenderTabPanel","onSelect","selectedIndex","selectedTabClassName","selectedTabPanelClassName","environment","disableUpDownKeys"]));return c.createElement("div",yb({},r,{className:fb(n),onClick:this.handleClick,onKeyDown:this.handleKeyDown,ref:function(t){e.node=t,o&&o(t)},"data-tabs":!0}),this.getChildren())},o}(c.Component);function xb(e,t){return xb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},xb(e,t)}Eb.defaultProps={className:"react-tabs",focus:!1},Eb.propTypes={};var Db=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this).handleSelected=function(e,t,o){var r=n.props.onSelect,i=n.state.mode;if("function"!=typeof r||!1!==r(e,t,o)){var a={focus:"keydown"===o.type};1===i&&(a.selectedIndex=e),n.setState(a)}},n.state=o.copyPropsToState(n.props,{},t.defaultFocus),n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,xb(t,n),o.getDerivedStateFromProps=function(e,t){return o.copyPropsToState(e,t)},o.getModeFromProps=function(e){return null===e.selectedIndex?1:0},o.copyPropsToState=function(e,t,n){void 0===n&&(n=!1);var r={focus:n,mode:o.getModeFromProps(e)};if(1===r.mode){var i=Math.max(0,vb(e.children)-1),a=null;a=null!=t.selectedIndex?Math.min(t.selectedIndex,i):e.defaultIndex||0,r.selectedIndex=a}return r},o.prototype.render=function(){var e=this.props,t=e.children,n=(e.defaultIndex,e.defaultFocus,function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,["children","defaultIndex","defaultFocus"])),o=this.state,r=o.focus,i=o.selectedIndex;return n.focus=r,n.onSelect=this.handleSelected,null!=i&&(n.selectedIndex=i),c.createElement(Eb,n,t)},o}(c.Component);function Cb(){return Cb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Cb.apply(this,arguments)}function kb(e,t){return kb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},kb(e,t)}Db.defaultProps={defaultFocus:!1,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1},Db.propTypes={},Db.tabsRole="Tabs";var Ob=function(e){var t,n;function o(){return e.apply(this,arguments)||this}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,kb(t,n),o.prototype.render=function(){var e=this.props,t=e.children,n=e.className,o=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,["children","className"]);return c.createElement("ul",Cb({},o,{className:fb(n),role:"tablist"}),t)},o}(c.Component);function Ab(){return Ab=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ab.apply(this,arguments)}function Tb(e,t){return Tb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Tb(e,t)}Ob.defaultProps={className:"react-tabs__tab-list"},Ob.propTypes={},Ob.tabsRole="TabList";var Ib="react-tabs__tab",Fb=function(e){var t,n;function o(){return e.apply(this,arguments)||this}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,Tb(t,n);var r=o.prototype;return r.componentDidMount=function(){this.checkFocus()},r.componentDidUpdate=function(){this.checkFocus()},r.checkFocus=function(){var e=this.props,t=e.selected,n=e.focus;t&&n&&this.node.focus()},r.render=function(){var e,t=this,n=this.props,o=n.children,r=n.className,i=n.disabled,a=n.disabledClassName,s=(n.focus,n.id),l=n.panelId,u=n.selected,d=n.selectedClassName,p=n.tabIndex,f=n.tabRef,h=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(n,["children","className","disabled","disabledClassName","focus","id","panelId","selected","selectedClassName","tabIndex","tabRef"]);return c.createElement("li",Ab({},h,{className:fb(r,(e={},e[d]=u,e[a]=i,e)),ref:function(e){t.node=e,f&&f(e)},role:"tab",id:s,"aria-selected":u?"true":"false","aria-disabled":i?"true":"false","aria-controls":l,tabIndex:p||(u?"0":null)}),o)},o}(c.Component);function Mb(){return Mb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Mb.apply(this,arguments)}function _b(e,t){return _b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_b(e,t)}Fb.defaultProps={className:Ib,disabledClassName:Ib+"--disabled",focus:!1,id:null,panelId:null,selected:!1,selectedClassName:Ib+"--selected"},Fb.propTypes={},Fb.tabsRole="Tab";var Nb="react-tabs__tab-panel",Rb=function(e){var t,n;function o(){return e.apply(this,arguments)||this}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,_b(t,n),o.prototype.render=function(){var e,t=this.props,n=t.children,o=t.className,r=t.forceRender,i=t.id,a=t.selected,s=t.selectedClassName,l=t.tabId,u=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(t,["children","className","forceRender","id","selected","selectedClassName","tabId"]);return c.createElement("div",Mb({},u,{className:fb(o,(e={},e[s]=a,e)),role:"tabpanel",id:i,"aria-labelledby":l}),r||a?n:null)},o}(c.Component);Rb.defaultProps={className:Nb,forceRender:!1,selectedClassName:"react-tabs__tab-panel--selected"},Rb.propTypes={},Rb.tabsRole="TabPanel";var Lb=n(52940),Bb=n.n(Lb),jb=n(70768),zb=n.n(jb);function Kb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Zb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kb(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ub(e){const{formatMessage:t}=(0,Se.YB)(),{onChange:n,preset:o,canvasSize:r,colors:i,signature:a}=e,[s,l]=c.useState(1),u=a.lines.isEmpty(),p=c.useCallback((()=>{const e=new qv.Z(Zb(Zb({},o),{},{isSignature:!0,strokeColor:a.strokeColor}));n(e)}),[o,n,a]),f=c.useCallback((e=>{const t=a.set("strokeColor",e);n(t)}),[n,a]),h=c.useCallback((e=>{l(e.width/r.width)}),[r.width]),m=c.useCallback((e=>{n(e)}),[n]);return c.createElement("div",{className:zb().wrapper},c.createElement("div",{className:zb().colorPickerContainer},c.createElement(Wu,{colorPresets:i,activeColor:a.strokeColor,accessibilityLabel:t(ke.Z.color),onClick:f,className:d()(Ho().colorPicker,"PSPDFKit-Electronic-Signatures-Color-Picker")})),c.createElement("div",{className:d()(Ho().editorCanvasContainer,zb().editorCanvasContainer)},c.createElement("div",{className:d()(Ho().editorCanvas,zb().canvas,"PSPDFKit-Electronic-Signatures-Canvas","interactions-disabled"),tabIndex:0},c.createElement(_d.Z,{onResize:h}),c.createElement(Xr,{annotation:a,canvasSize:r,onDrawStart:m,onDraw:m,onDrawEnd:m,zoomLevel:s,cursor:"crosshair"}))),c.createElement("div",{className:zb().actionContainer},a.lines.isEmpty()?c.createElement("div",{className:d()(Ho().signHere,zb().signHere,"PSPDFKit-Electronic-Signatures-Sign-Here-Label",{[Ho().signHereHidden]:!a.lines.isEmpty()})},t(Vb.signHere)):c.createElement(q.zx,{onClick:p,inverted:!0,disabled:u,className:d()(Ho().button,zb().deleteSignature,"PSPDFKit-Electronic-Signatures-Clear-Signature-Button")},t(ke.Z.clearSignature))))}const Vb=(0,Se.vU)({signHere:{id:"signHere",defaultMessage:"Sign here",description:"Message on the signature canvas"}});var Gb=n(27074),Wb=n.n(Gb),qb=n(10713),Hb=n.n(qb);function $b(e){const{formatMessage:t}=(0,Se.YB)(),{image:n,onImageSelected:o,onRenderFinished:r}=e,[i,a]=c.useState(!1),[s,l]=c.useState(!1),[u,p]=c.useState(null),f=c.useRef(null),h=c.useRef(null),m=c.useCallback((e=>{const t=e.target.files[0];if(!t)return;const n=e.target.files[0].type;"image/jpeg"!==n&&"image/png"!==n||(o(t),e.target.value="")}),[o]),g=c.useCallback((e=>{e.stopPropagation(),f.current&&f.current.click()}),[]);return c.useEffect((function(){n&&n!==h.current&&(u&&URL.revokeObjectURL(u),p(URL.createObjectURL(n)),r(),h.current=n)}),[n,u,p,r]),c.createElement("div",{className:Wb().wrapper},c.createElement("div",{className:d()(Wb().dragZone,{[Wb().draggingOver]:i,[Wb().hoveringOver]:s,[Wb().dragZoneNoSelection]:!n,[Wb().dragZoneNoLegacyEdge]:!0},"PSPDFKit-Electronic-Signatures-Image-Dropzone"),onDrag:e=>{e.preventDefault(),e.stopPropagation()},onDragStart:e=>{e.preventDefault(),e.stopPropagation()},onDragEnd:e=>{e.preventDefault(),e.stopPropagation(),a(!1)},onDragOver:e=>{e.preventDefault(),e.stopPropagation(),a(!0)},onDragEnter:e=>{e.preventDefault(),e.stopPropagation(),a(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),a(!1)},onDrop:e=>{if(e.preventDefault(),e.stopPropagation(),a(!1),e.dataTransfer.files&&e.dataTransfer.files[0]){const t=e.dataTransfer.files[0];if("image/jpeg"!==t.type&&"image/png"!==t.type)return;o(t)}},onClickCapture:g,onPointerOver:()=>{l(!0)},onPointerOut:()=>{l(!1)}},c.createElement("input",{type:"file",id:"image-picker",className:Wb().filePicker,accept:"image/png, image/jpeg",onChange:m,ref:f,tabIndex:-1}),n?c.createElement("img",{src:u||void 0,className:Wb().imagePreview}):c.createElement("div",{className:Wb().dragZoneContent},c.createElement("button",{tabIndex:0,className:d()(Wb().addButton,"PSPDFKit-Electronic-Signatures-Add-Image-Button"),onClick:g},c.createElement(q.TX,null,t(Xb.selectDragImage)),c.createElement(Re.Z,{src:Hb(),className:Wb().addIcon,"aria-hidden":"true"})),c.createElement("p",{className:Wb().legend,"aria-hidden":!0},t(Xb.selectDragImage)))),n&&c.createElement("button",{className:d()(Wb().fileLabel,Wb().buttonLink,"PSPDFKit-Electronic-Signatures-Replace-Image-Button"),onClick:g},t(Xb.replaceImage)))}const Xb=(0,Se.vU)({selectDragImage:{id:"selectDragImage",defaultMessage:"Select or Drag Image",description:"Indicate that the space is reserved to select or drag an image"},replaceImage:{id:"replaceImage",defaultMessage:"Replace Image",description:"Click to replace the image currently visible"}});var Yb=n(52247),Jb=n(49814),Qb=n.n(Jb);function ew(e){var t,n,o;const r=(0,Se.YB)().formatMessage,{signingFonts:i,onChange:a,colors:l,signature:u}=e,p=e.frameWindow.innerWidth,f=i.map((e=>e.name));let h,m;f.size<=1&&(h={paddingTop:"5%",height:"100%"},p>Be.Fg&&(m=48));const g=c.useCallback((e=>{if(!e)return;const t=u.set("fontColor",e);a(t)}),[u,a]),v=c.useCallback((e=>{const t=u.set("font",e);a(t)}),[u,a]),y=c.useCallback((e=>{const t=u.set("text",{format:"plain",value:e});a(t)}),[u,a]),b=c.useCallback((()=>{const e=u.set("text",{format:"plain",value:""});a(e)}),[u,a]),w=d()(Qb().fontFamilyWrapper,"PSPDFKit-Electronic-Signatures-Font-Family-Wrapper"),S=l.find((e=>e.color&&e.color.equals(u.fontColor)));return c.createElement("div",{className:Qb().wrapper},c.createElement("div",{className:Qb().typingUiContainer,style:h},c.createElement("div",{className:Qb().colorPickerContainer},c.createElement(Wu,{colorPresets:l,activeColor:u.fontColor,onClick:g,className:d()(Ho().colorPicker,"PSPDFKit-Electronic-Signatures-Color-Picker")})),c.createElement("style",null,`\n .PSPDFKit-Electronic-Signatures-Text-Input::placeholder {\n color: rgb(${null==S||null===(t=S.color)||void 0===t?void 0:t.r}, ${null==S||null===(n=S.color)||void 0===n?void 0:n.g}, ${null==S||null===(o=S.color)||void 0===o?void 0:o.b});\n }\n `),c.createElement("div",{className:Qb().inputContainer},c.createElement(Su,{accessibilityLabel:r(tw.ElectronicSignatures_SignHereTypeHint),placeholder:r(tw.signature),autoFocus:!0,value:u.text.value,onUpdate:y,styles:{input:d()(Qb().input,"PSPDFKit-Electronic-Signatures-Text-Input",{[Qb().opaque]:!u.text})},textStyles:{color:u.fontColor.toCSSValue(),fontFamily:(0,un.hm)(u.font),fontSize:m}}),c.createElement("div",{className:Qb().actionContainer},u.text?c.createElement(q.zx,{onClick:b,inverted:!0,className:d()(Ho().button,Qb().deleteSignature,"PSPDFKit-Electronic-Signatures-Clear-Signature-Button")},r(ke.Z.clearSignature)):c.createElement("div",{className:d()(Ho().signHere,Qb().signHere,"PSPDFKit-Electronic-Signatures-Sign-Here-Label")},r(tw.ElectronicSignatures_SignHereTypeHint))))),f.size>1?c.createElement("div",{className:d()(Qb().fontFamiliesPickerContainer,"PSPDFKit-Electronic-Signatures-Font-Families-Container")},f.map(((e,t)=>{const n=e===u.font;return(0,s.kG)((0,I.HD)(e)&&(0,I.HD)(t)),c.createElement("div",{onClick:()=>{v(e)},className:w,key:e},c.createElement("input",{type:"radio",checked:n,value:t,id:e,name:e,onChange:t=>{t.target.checked&&v(e)},className:d()(Qb().fontFamilyRadio,"PSPDFKit-Electronic-Signatures-Font-Family-Radio-Input")}),c.createElement("label",{"aria-label":e,htmlFor:e,style:{color:u.fontColor.toCSSValue(),fontFamily:`${(0,un.hm)(e)}, cursive`},className:d()(Qb().fontLabel,"PSPDFKit-Electronic-Signatures-Font-Family-Label")},u.text.value||r(tw.signature)))}))):null)}const tw=(0,Se.vU)({signature:{id:"signature",defaultMessage:"Signature",description:"Placeholder for the signature"},ElectronicSignatures_SignHereTypeHint:{id:"ElectronicSignatures_SignHereTypeHint",defaultMessage:"Type Your Signature Above",description:"Indicates where the signature will be"}});function nw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ow(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nw(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const rw={canvasSize:new b.$u({width:640,height:260})};function iw(e){const{formatMessage:t}=(0,Se.YB)(),{preset:n,onCreate:o,signingFonts:r,creationModes:i,frameWindow:s,dispatch:l}=e,{canvasSize:u}=rw,p=r.map((e=>e.name)),[f,h]=c.useState(0),[m,g]=c.useState(null),[v,y]=c.useState(!0),[w,S]=c.useState(null),[P,E]=c.useState(!1),x=(0,a.v9)((e=>{var t;return(null===(t=e.electronicSignatureDefaultTextCallback)||void 0===t?void 0:t.call(e))||""})),[D,C]=c.useState(new de.gd(ow(ow({},n),{},{font:p.first(),fontSize:16,text:{format:"plain",value:x},fontColor:e.colorPresets[0].color}))),[k,O]=c.useState(new qv.Z(ow(ow({},n),{},{isSignature:!0,strokeColor:e.colorPresets[0].color}))),A=c.useRef(null),T=c.useCallback((e=>{C(e)}),[C]),I=c.useCallback((e=>{O(e)}),[O]),F=c.useCallback((async function(){if(_===Yb.M.DRAW&&k){const e=(0,Ri.c)(k,k.boundingBox.getLocation().scale(-1),u,new b.E9);o(e,v,!1)}else if(_===Yb.M.IMAGE&&w)o(w,v,!1);else if(_===Yb.M.TYPE&&D&&D.fontColor){const e=await(0,_e.Y)(D.text.value,D,s);l((0,bt.gX)({fontColor:D.fontColor,font:D.font})),o(e,v,!1)}}),[f,w,k,D,o,v,s,u,l]);let M=!0;const _=i.toArray()[f];_!==Yb.M.DRAW||k.lines.isEmpty()?(_===Yb.M.IMAGE&&w&&P||_===Yb.M.TYPE&&D.text.value)&&(M=!1):M=!1;const N=i.map((o=>{switch(o){case Yb.M.DRAW:return{tab:c.createElement(Fb,{className:d()(Bb().tab,"PSPDFKit-Electronic-Signatures-Tab PSPDFKit-Electronic-Signatures-Tab-Draw"),key:"draw"},t(aw.draw)),tabPanel:c.createElement(Rb,{key:"draw",className:"PSPDFKit-Electronic-Signatures-Tab-Panel PSPDFKit-Electronic-Signatures-Tab-Panel-Draw"},c.createElement(Ub,{preset:n,colors:e.colorPresets,onChange:I,signature:k,canvasSize:u}))};case Yb.M.IMAGE:return{tab:c.createElement(Fb,{className:d()(Bb().tab,"PSPDFKit-Electronic-Signatures-Tab PSPDFKit-Electronic-Signatures-Tab-Image"),key:"image"},t(aw.image)),tabPanel:c.createElement(Rb,{key:"image",className:"PSPDFKit-Electronic-Signatures-Tab-Panel PSPDFKit-Electronic-Signatures-Tab-Panel-Image"},c.createElement($b,{image:w,onImageSelected:S,onRenderFinished:()=>E(!0)}))};case Yb.M.TYPE:return{tab:c.createElement(Fb,{className:d()(Bb().tab,"PSPDFKit-Electronic-Signatures-Tab PSPDFKit-Electronic-Signatures-Tab-Type"),key:"type"},t(aw.type)),tabPanel:c.createElement(Rb,{key:"type",className:"PSPDFKit-Electronic-Signatures-Tab-Panel PSPDFKit-Electronic-Signatures-Tab-Panel-Type"},c.createElement(ew,{signingFonts:r,onChange:T,frameWindow:e.frameWindow,colors:e.colorPresets,signature:D,preset:n}))};default:return}}));return c.useLayoutEffect((()=>{if(A.current){const e=A.current.querySelectorAll('li[role="tab"]');g(Array.from(e).map((e=>e.getBoundingClientRect().width)))}}),[g]),c.createElement(Db,{onSelect:e=>{h(e)},className:d()(Bb().tabsContainer,"PSPDFKit-Electronic-Signatures-Tabs-Container"),defaultFocus:!0,environment:e.frameWindow,domRef:e=>A.current=e},c.createElement(Ob,{className:d()(Bb().tabsList,{[Bb().singleTab]:1===N.size},"PSPDFKit-Electronic-Signatures-Tabs-List")},c.createElement("div",{className:Bb().activeTabIndicator,style:{left:(m?m.filter(((e,t)=>t<f)).reduce(((e,t)=>e+t+13),0):0)+32,width:m?m[f]:0}}),N.map((e=>e&&e.tab))),c.createElement("div",{className:Bb().contentArea},N.map((e=>e&&e.tabPanel))),c.createElement("div",{className:Bb().footer},e.hasSignaturesCreationListener&&c.createElement("label",{className:d()(Bb().checkbox,"PSPDFKit-Electronic-Signatures-Store-Signature-Checkbox")},c.createElement("input",{type:"checkbox",name:"store",checked:v,onChange:e=>{y(e.target.checked)}}),c.createElement("span",{className:Bb().checkboxLabel},t(aw.saveSignature))),c.createElement(q.hE,{className:Bb().group,align:"end",style:e.hasSignaturesCreationListener?void 0:{width:"100%"}},c.createElement(q.zx,{onClick:e.onCancel,className:d()(Bb().button,"PSPDFKit-Electronic-Signatures-Cancel-Button")},t(ke.Z.cancel)),c.createElement(q.zx,{primary:!0,disabled:M,onClick:F,className:d()(Bb().button,"PSPDFKit-Electronic-Signatures-Done-Button")},t(ke.Z.done)))))}const aw=(0,Se.vU)({saveSignature:{id:"saveSignature",defaultMessage:"Save Signature",description:"Save the signature that is in creation"},draw:{id:"draw",defaultMessage:"Draw",description:"Draw tab"},image:{id:"image",defaultMessage:"Image",description:"Image tab"},type:{id:"type",defaultMessage:"Type",description:"Type tab"}});var sw=n(44295),lw=n.n(sw);function cw(e){const{formatMessage:t}=(0,Se.YB)(),{storedSignatures:n,onCreate:o,onDelete:r,dispatch:i}=e,[a,s]=c.useState(!1),l=!a&&Boolean(n&&n.size>0);return c.useEffect((()=>{e.frameWindow.document.fonts&&(0,ed.GE)(e.signingFonts,e.frameWindow.document.fonts)}),[e.signingFonts,e.frameWindow.document.fonts]),l&&n?c.createElement(c.Fragment,null,c.createElement("div",{className:lw().header},c.createElement("div",{className:d()(lw().legend,"PSPDFKit-Electronic-Signatures-Signature-Heading"),role:"heading","aria-level":"1"},t(ke.Z.signatures)),c.createElement(q.zx,{className:d()(lw().addButton,"PSPDFKit-Electronic-Signatures-Add-Signature-Button"),onClick:()=>{s(!0)},inverted:!0},t(ke.Z.addSignature))),c.createElement("div",{className:lw().signaturePickerContainer},c.createElement(sy,{signatures:n,onSelect:e=>{o(e,!1,!1)},onDelete:e=>{r(e,!1)},backend:e.backend,attachments:e.attachments,viewportWidth:e.viewportWidth,showDeleteBtn:e.hasSignaturesDeletionListener})),c.createElement("div",{className:lw().footer},c.createElement(q.hE,{className:lw().group,align:"end"},c.createElement(q.zx,{onClick:e.onCancel,className:d()(lw().button,"PSPDFKit-Signature-Dialog-Cancel-Button")},t(ke.Z.cancel))))):c.createElement(c.Fragment,null,c.createElement("p",{className:lw().legend},t(ke.Z.addSignature)),c.createElement(iw,{preset:e.preset,frameWindow:e.frameWindow,colorPresets:e.colorPresets,onCreate:e.onCreate,onCancel:e.onCancel,hasSignaturesCreationListener:e.hasSignaturesCreationListener,signingFonts:e.signingFonts,creationModes:e.creationModes,dispatch:i}))}var uw=n(72952),dw=n.n(uw),pw=n(84747),fw=n(23477),hw=n(6733),mw=n.n(hw);function gw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function vw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gw(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const yw={components:{ToolbarDropdownGroupComponent:pw.Z,ToolbarButtonComponent:gu.Z},styles:vw(vw({},dw()),{},{toolbar:fw})},bw=c.lazy((()=>n.e(5747).then(n.bind(n,12711)))),ww=c.createElement("div",{className:mw().fallback,"data-testid":"fallback"},c.createElement("div",{className:mw().fallbackToolbar}),c.createElement("div",{className:mw().fallbackPagesView},c.createElement(Le.Z,{scale:2})),c.createElement("div",{className:mw().fallbackToolbar})),Sw={documentEditor:{id:"documentEditor",defaultMessage:"Document Editor",description:"Document Editor"},documentEditorDesc:{id:"documentEditorDesc",defaultMessage:"Make changes to the current document",description:"Description of the Document Editor modal"}},Pw=e=>{const{formatMessage:t}=(0,Se.YB)(),[n,o]=c.useState(!0),r=c.useCallback((e=>{o(!e)}),[]),i=c.useCallback((()=>{n&&e.onCancel()}),[n,e]);return c.createElement(op.Z,{onEscape:i,useBorderRadius:!1,className:mw().modal,accessibilityLabel:t(Sw.documentEditor),accessibilityDescription:t(Sw.documentEditorDesc)},c.createElement(c.Suspense,{fallback:ww},c.createElement(bw,{onCancel:e.onCancel,scale:e.scale,CSS_HACK:yw,onDialog:r})))};function Ew(){const[e,t]=c.useState(null);c.useEffect((()=>{null==e||e.focus()}),[e]),(0,_r.Bo)(e,null);const n=d()(Jm().container,"PSPDFKit-Sidebar-Custom");return c.createElement("div",{role:"region",tabIndex:-1,ref:t,className:n})}var xw,Dw=n(74792),Cw=n(47825);function kw(e){const{formatMessage:t}=(0,Se.YB)();return c.createElement("form",{onSubmit:e.onSave,className:d()(Xm().editor,"PSPDFKit-Sidebar-Bookmarks-Editor"),onKeyUp:t=>{t.which===Zo.zz&&e.onCancel()}},e.title&&c.createElement("h2",{className:d()(Xm().heading,"PSPDFKit-Sidebar-Bookmarks-Heading")},e.title),c.createElement("label",null,c.createElement(q.oi,{value:e.value,onChange:e.onChange,autoFocus:!0,selectTextOnFocus:!0,name:"name",placeholder:t(ke.Z.name),autoComplete:"off",style:{fontSize:"inherit",fontWeight:"normal",padding:"calc(0.8125em/ 2) 0.8125em"}})),c.createElement("div",{className:d()(Xm().buttonContainer,"PSPDFKit-Sidebar-Bookmarks-Button-Container")},e.onDelete&&c.createElement(q.zx,{onClick:e.onDelete,inverted:!0,danger:!0,className:d()("PSPDFKit-Sidebar-Bookmarks-Button-Delete",Xm().bookmarkDeleteButton)},t(ke.Z.delete)),c.createElement("div",{className:Xm().bookmarkSaveCancelButtonsContainer},c.createElement(q.zx,{onClick:e.onCancel,className:"PSPDFKit-Sidebar-Bookmarks-Button-Cancel"},t(ke.Z.cancel)),c.createElement(q.zx,{primary:!0,type:"submit",className:"PSPDFKit-Sidebar-Bookmarks-Button-Save"},t(ke.Z.save)))))}function Ow(e){var t;const{bookmarks:o,pages:r,currentPageIndex:s,bookmarkManager:l}=e,[u,p]=c.useState(null);c.useEffect((()=>{null==u||u.focus()}),[u]);const[f,h]=c.useState(null),[m,g]=c.useState(null),[v,y]=c.useState(!1),[b,S]=c.useState(null),P=(0,a.I0)(),E=c.useRef(),x=c.useRef(null),D=c.useRef(!1),[C,k]=c.useState(new Set),{formatMessage:O}=(0,Se.YB)(),A=(0,_r.R9)((()=>{h(null),g(null),y(!1)})),T=(0,_r.R9)((e=>{g(e.currentTarget.value)})),I=(0,_r.R9)((()=>{f&&f.id&&(D.current=!0),A(),S(O(Iw.cancelledEditingBookmark))})),F=(0,_r.R9)((e=>{if(e.persist(),e.preventDefault(),f&&m!==f.name){let e=f.set("name",m).setIn(["action","pageIndex"],s);e.id?l.updateObject(e):(e=e.set("id",(0,Cw.A)()),x.current=e.id,l.createObject(e)),l.autoSave(),S(O(Iw.bookmarkEdited))}else S(O(Iw.bookmarkCreated));A()})),M=(0,_r.R9)((()=>{f&&(l.deleteObject(f),l.autoSave()),A(),S(O(Iw.bookmarkDeleted))})),_=(0,_r.R9)((()=>{y(!1)})),N=(0,_r.R9)((()=>{y(!0)})),R=(0,_r.R9)((e=>{h(e),g(e.name||"")})),L=(0,_r.R9)((()=>{h(new w.rp({action:new w.Di({pageIndex:e.currentPageIndex})})),g("")}));c.useEffect((()=>{null!=u&&u.hasAttribute("aria-label")&&u.focus()}),[u]);const B=(0,_r.jC)(e);c.useEffect((()=>{if(E.current&&null!=B&&B.bookmarks&&o&&(B.bookmarks!==o||D.current)){var e;const t=null!==(e=Tw(o).findIndex((e=>e.id===x.current)))&&void 0!==e?e:-1;t>-1&&E.current.setActiveItem(t),D.current=!1}}));const j=o?(0,i.aV)(Tw(o)):o,z=(0,_r.Bo)(u,j),K={className:d()(Xm().container,!j&&Xm().loading+" PSPDFKit-Sidebar-Loading",j&&0===j.size&&" PSPDFKit-Sidebar-Empty","PSPDFKit-Sidebar-Bookmarks"),ref:p,style:{width:e.width},role:"region","aria-label":O(ke.Z.bookmarks)},Z=(0,_r.mP)(z,(e=>e.id),(e=>null==j?void 0:j.find((t=>t.id===e))));if(!j)return c.createElement("div",(0,ue.Z)({},K,{tabIndex:0}),c.createElement(q.TX,{"aria-live":"polite"},O(Iw.loadingBookmarks)),xw||(xw=c.createElement(Le.Z,null)));const U=r.get(s),V=U&&U.get("pageLabel");return c.createElement("div",K,c.createElement(q.TX,{"aria-live":"polite"},O(ke.Z.bookmarks)),f&&!f.id?c.createElement(kw,{onChange:T,onSave:F,onCancel:I,value:m,title:O(ke.Z.pageX,{arg0:V||e.currentPageIndex+1})+": "+O(Iw.newBookmark)}):c.createElement("div",{style:{width:"100%"}},c.createElement("div",{className:Jm().sidebarHeader},c.createElement("h2",{"aria-hidden":"true",className:d()(Xm().heading,"PSPDFKit-Sidebar-Bookmarks-Heading")}," ",c.createElement("span",null,O(ke.Z.bookmarks))),c.createElement(q.zx,{primary:!0,onClick:L,className:d()("PSPDFKit-Sidebar-Bookmarks-Button-Add"),autoFocus:!0},O(Iw.newBookmark)))),j&&j.size>0&&c.createElement(q.HJ,{onActiveItemIndexChange:e=>{const t=j.get(e);t&&t.id&&(x.current=t.id)},ref:E,items:j.toArray().map(((o,i)=>{const a=o.action,l=a.pageIndex===s,u=d()({[Xm().layout]:!0,[Xm().layoutWidth]:!0,[Xm().layoutEditing]:o===f,[Xm().layoutNarrow]:e.closeOnPress,[Xm().selected]:l,"PSPDFKit-Sidebar-Bookmarks-Bookmark":!0,"PSPDFKit-Sidebar-Bookmarks-Bookmark-Selected":l,"PSPDFKit-Sidebar-Bookmarks-Bookmark-Editing":o===f}),p=d()([Xm().name],{[Xm().nameEllipsis]:!C.has(i)},"PSPDFKit-Sidebar-Bookmarks-Name"),h=r.get(a.pageIndex),g=h&&h.pageLabel,v=o.action instanceof w.Di?O(ke.Z.pageX,{arg0:g||a.pageIndex+1}):null,y=o.action instanceof w.Di?g||a.pageIndex+1:null,b=v||O(ke.Z.bookmark),S=c.createElement(c.Fragment,null,c.createElement("div",{onClick:()=>(e=>{k((t=>(t.has(e)?t.delete(e):t.add(e),new Set(t))))})(i),className:p},o.name||O(ke.Z.bookmark)),!!y&&c.createElement("span",{className:d()(Xm().pageNumber)},y));o.name;const E=Z?e=>{Z(e,o)}:void 0;return c.createElement("div",{key:"bookmark-item-"+o.id,ref:E,className:d()(Xm().wrapper,Xm().container)},o===f?t||(t=c.createElement(kw,{onChange:T,onSave:F,onCancel:I,onDelete:N,value:m})):c.createElement("div",{className:d()(Xm().wrapper,Xm().fullWidth)},c.createElement("div",{className:u,"aria-label":b,onClick:t=>{t.preventDefault(),P((0,gr.aG)(o.action)),e.closeOnPress&&P((0,Kt.mu)())}},c.createElement("button",{type:"button",className:Xm().layoutSmallWidth,"aria-label":o.action instanceof w.Di?O(ke.Z.gotoPageX,{arg0:g||o.action.pageIndex+1}):o.name||void 0},c.createElement("span",{className:Xm().wrapper},S)),c.createElement("button",{title:b+": "+O(ke.Z.edit),className:d()(Xm().edit,e.closeOnPress&&Xm().editVisible,"PSPDFKit-Sidebar-Bookmarks-Button-Edit"),onClick:e=>{e.stopPropagation(),R(o)}},c.createElement(Re.Z,{src:n(56735),role:"presentation"})))))}))}),c.createElement(q.TX,{announce:"polite"},b),j&&j.size>0&&v&&c.createElement(_c.Z,{onCancel:_,onConfirm:M,accessibilityLabel:O(Iw.deleteBookmarkConfirmAccessibilityLabel),accessibilityDescription:O(Iw.deleteBookmarkConfirmAccessibilityDescription)},O(Iw.deleteBookmarkConfirmMessage)))}const Aw=(0,Dw.createSubscription)({getCurrentValue:()=>{},subscribe:(e,t)=>{let n=function(){};const o=()=>{const n=e.getBookmarks();return n.then(t),n};return o().then((()=>{e.eventEmitter.on("change",o),n=()=>{e.eventEmitter.off("change",o)}})),()=>n()}}),Tw=(0,io.Z)((e=>e.valueSeq().toArray().sort(((e,t)=>{const n=e.action.pageIndex,o=t.action.pageIndex,r=!isNaN(n),i=!isNaN(o);return r&&i?n===o?0:n<o?-1:1:r?-1:i?1:e.name&&t.name?e.name<t.name?-1:1:0})))),Iw=(0,Se.vU)({bookmarkCreated:{id:"bookmarkCreated",defaultMessage:"Created Bookmark",description:"A11Y announces when a bookmark is created"},bookmarkEdited:{id:"bookmarkEdited",defaultMessage:"Edited Bookmark",description:"A11Y announces when a bookmark is edited"},bookmarkDeleted:{id:"bookmarkDeleted",defaultMessage:"Deleted Bookmark",description:"A11Y announces when a bookmark is deleted"},cancelledEditingBookmark:{id:"cancelledEditingBookmark",defaultMessage:"Cancelled Editing Bookmark",description:"A11Y announces when editing of a bookmark is cancelled"},newBookmark:{id:"newBookmark",defaultMessage:"New Bookmark",description:"Button to create a bookmark"},removeBookmark:{id:"removeBookmark",defaultMessage:"Remove Bookmark",description:"Button to remove a bookmark"},noBookmarks:{id:"noBookmarsk",defaultMessage:"No Bookmarks",description:"When there are not bookmarks"},loadingBookmarks:{id:"loadingBookmarks",defaultMessage:"Loading Bookmarks",description:"When bookmarks are loading"},deleteBookmarkConfirmMessage:{id:"deleteBookmarkConfirmMessage",defaultMessage:"Are you sure you want to delete this bookmark?",description:'Message displayed in the "Delete Bookmark" confirm dialog'},deleteBookmarkConfirmAccessibilityLabel:{id:"deleteBookmarkConfirmAccessibilityLabel",defaultMessage:"Confirm bookmark deletion",description:'Accessibility label (title) for the "Delete Bookmark" confirm dialog'},deleteBookmarkConfirmAccessibilityDescription:{id:"deleteBookmarkConfirmAccessibilityDescription",defaultMessage:"Dialog allowing the user to confirm or cancel deleting the bookmark",description:'Accessibility description for the "Delete Bookmark" confirm dialog'}});var Fw=n(20234),Mw=n(52042),_w=n(78869),Nw=n.n(_w);const Rw=(0,Se.XN)((e=>{let{position:t,onCropApply:o,onCropCancel:r,isCropAreaSelected:i,frameWindow:a,intl:{formatMessage:s}}=e;return c.useEffect((()=>{function e(e){"Enter"===e.key?i&&o(!1):"Escape"===e.key&&r()}return a.document.addEventListener("keydown",e),()=>{a.document.removeEventListener("keydown",e)}}),[i]),c.createElement("div",{className:d()("PSPDFKit-Annotation-Toolbar","PSPDFKit-Document-Crop-Toolbar",Eu().root,Nw().container,{[Eu().stickToBottom]:"bottom"===t}),onMouseUp:Lw,onTouchEnd:Lw,onPointerUp:Lw},c.createElement("div",{className:Nw().buttonContainer},c.createElement("div",{role:"button",className:d()(Nw().cropButton,{[Nw().cropButtonDisabled]:!i}),onClick:i?()=>o(!1):void 0,title:s(ke.Z.cropCurrentPage),"aria-disabled":!i},c.createElement(Re.Z,{src:n(8571)})," ",c.createElement("span",{className:Nw().desktopButtonText},s(ke.Z.cropCurrentPage)),c.createElement("span",{className:Nw().mobileButtonText},s(ke.Z.cropCurrent))),c.createElement("div",{role:"button",className:d()(Nw().cropButton,{[Nw().cropButtonDisabled]:!i}),onClick:i?()=>o(!0):void 0,title:s(ke.Z.cropAllPages),"aria-disabled":!i},c.createElement(Re.Z,{src:n(80525)}),c.createElement("span",{className:Nw().desktopButtonText},s(ke.Z.cropAllPages)),c.createElement("span",{className:Nw().mobileButtonText},s(ke.Z.cropAll)))),c.createElement("div",{role:"button",className:`${Nw().cancelButton} ${Nw().cancelDesktop}`,onClick:()=>r(),title:s(ke.Z.cancel)},c.createElement("span",null,s(ke.Z.cancel))),c.createElement("div",{role:"button",className:`${Nw().cropButton} ${Nw().cancelMobile}`,onClick:()=>r(),title:s(ke.Z.cancel)},c.createElement(Re.Z,{src:n(58054)})))}));function Lw(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}var Bw=n(32801);const jw=Il.AK,zw=e=>{var t,o,r,i;const s=(0,Se.YB)(),{formatMessage:l}=s,u=(0,a.I0)(),{frameWindow:p,position:f,viewportWidth:h,creationMode:m}=e,g=(0,a.v9)(ml.YG),{handleGroupExpansion:v,handleEntered:y,expandedGroup:b,prevActiveGroup:S,btnFocusRef:P}=(0,_r.Tp)(),E=(0,a.v9)(ml.lK),x=(0,a.v9)((e=>e.contentEditorSession.textBlockInteractionState.state)),D=(0,a.v9)((e=>e.contentEditorSession.dirty)),C=null===E||x!==ml.FP.Active;c.useEffect((()=>{g.faceList||g.loading||u(tf.O2)}),[g.faceList,g.loading,u]);const k=[...(g.faceList||[new ml.I5({family:""})]).map((e=>({label:e.family,value:e.family})))],O=c.useCallback((e=>{let{modification:t,preventFocusShift:n=!1}=e;const[[o,r]]=Object.entries(t);switch(o){case"fontSize":u((0,tf.Mq)({size:r})),n||nf.dispatch("content-editing:re-focus",null);break;case"font":u((0,tf.Mq)({family:r})),n||nf.dispatch("content-editing:re-focus",null);break;case"bold":u((0,tf.Mq)({bold:r})),n||nf.dispatch("content-editing:re-focus",null);break;case"italic":u((0,tf.Mq)({italic:r})),n||nf.dispatch("content-editing:re-focus",null)}}),[u]),A=c.useCallback((()=>u((0,tf.u)(m?ml.wR.Edit:ml.wR.Create))),[u,m]),T=c.useCallback((()=>{u((0,tf.u)(ml.wR.Delete))}),[u]),I=E?(e=>{if(e.detectedStyle.selectionStyleInfo){const{family:t,bold:n,italic:o,color:r,size:i}=e.detectedStyle.selectionStyleInfo;return{family:t,bold:n,italic:o,color:r?w.Il.fromHex(r):null,size:i}}const{family:t,variant:{bold:n,italic:o}}=e.modificationsCharacterStyle.fontRef.faceRef,{color:r,fontRef:{size:i}}=e.modificationsCharacterStyle;return{family:t,bold:n,italic:o,color:w.Il.fromHex(r),size:i}})(E):null,F=null!==(t=null==I?void 0:I.family)&&void 0!==t?t:void 0,M=null!==(o=null==I?void 0:I.size)&&void 0!==o?o:void 0,_=null==I?void 0:I.bold,N=null==I?void 0:I.italic;let R=null;if(null!=(null==I?void 0:I.color)){var L;const e=I.color;R=null!==(L=rt.Options.COLOR_PRESETS.find((t=>{var n;return null===(n=t.color)||void 0===n?void 0:n.equals(e)})))&&void 0!==L?L:{color:e,localization:ke.Z.color}}const B=Boolean((null==E?void 0:E.detectedStyle.selectionStyleInfo)&&null==R),j={"text-color":{node:c.createElement(Bw.Z,{onChange:e=>{var t;e&&u((0,tf.Mq)({color:null===(t=e.color)||void 0===t?void 0:t.toHex()}));nf.dispatch("content-editing:re-focus",null)},styles:md(),value:null!==(r=R)&&void 0!==r?r:B?null:null!==(i=rt.Options.COLOR_PRESETS.find((e=>e.color===w.Il.BLACK)))&&void 0!==i?i:null,caretDirection:"down",className:"PSPDFKit-Content-Editing-Toolbar-Font-Color",menuClassName:"PSPDFKit-Content-Editing-Toolbar-Font-Color-Menu",removeTransparent:!0,frameWindow:p,colors:rt.Options.COLOR_PRESETS,innerRef:(0,Mu.CN)("text-color",b)?P:void 0,unavailableItemFallback:B?{type:"label",label:""}:{type:"swatch"},disabled:C,accessibilityLabel:l(ke.Z.color)}),title:l(ke.Z.color)},font:{node:c.createElement(ud,{onChange:O,caretDirection:"down",frameWindow:p,intl:s,styles:md(),fontSizes:jw,fontFamilyItems:k,showAlignmentOptions:!1,showFontStyleOptions:!0,currentFontFamily:F,currentFontSize:M,isBold:_,isItalic:N,fontFamilyClasses:"PSPDFKit-Content-Editing-Toolbar-Font-Family",fontFamilyMenuClasses:"PSPDFKit-Content-Editing-Toolbar-Font-Family-Menu",fontSizeClasses:"PSPDFKit-Content-Editing-Toolbar-Font-Size",fontSizeMenuClasses:"PSPDFKit-Content-Editing-Toolbar-Font-Size-Menu",horizontalAlignClasses:"PSPDFKit-Content-Editing-Toolbar-Alignment",verticalAlignClasses:"PSPDFKit-Content-Editing-Toolbar-Vertical-Alignment",disabled:C,ref:(0,Mu.CN)("font",b)?P:void 0}),title:l(ke.Z.font)}};return c.createElement("div",{className:d()("PSPDFKit-Content-Editing-Toolbar",md().root,{[md().stickToBottom]:"bottom"===f})},c.createElement("div",{className:md().content},b?c.createElement("div",{className:md().right},c.createElement(ku.B,{position:f,onClose:()=>v(null),isPrimary:!1,onEntered:y,intl:s,className:md().expanded},b?j[b].node:void 0)):c.createElement("form",{className:md().form,onSubmit:ar.PF},c.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},c.createElement("div",{className:d()(md().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-Add-Text")},c.createElement(gu.Z,{type:"add-text-box",icon:n(92982),title:l(Kw.addTextBox),className:d()("PSPDFKit-Content-Editing-Toolbar-Add-Text-Box",md().iconButton,{[md().iconButtonActive]:m}),onPress:A,selected:m})),c.createElement("div",{className:d()(md().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-TextColor")},c.createElement(gu.Z,{type:"text-color",title:j["text-color"].title,className:md().button,onPress:()=>v("text-color"),disabled:Boolean(b)||C,presentational:h>Be.GI,ref:(0,Mu.Kt)("text-color",b,S)?P:void 0}),j["text-color"].node),c.createElement("div",{className:d()(md().formGroup,"PSPDFKit-Toolbox PSPDFKit-Toolbox-Font")},c.createElement(gu.Z,{type:"font",title:j.font.title,className:md().button,onPress:()=>v("font"),disabled:C,presentational:h>Be.GI,ref:(0,Mu.Kt)("font",b,S)?P:void 0}),j.font.node)),c.createElement("div",{className:"PSPDFKit-Toolbar-Spacer",style:{display:"flex",flex:1}}),h>=Be.GI?c.createElement("div",{className:md().buttonContainer},c.createElement(gu.Z,{type:"delete",title:s.formatMessage(ke.Z.delete),className:d()("PSPDFKit-Content-Editor-Toolbar-Button-Delete",md().iconButton),onPress:T,disabled:!E}),c.createElement("button",{className:md().contentEditorButton,type:"button",onClick:()=>u(tf.u8),title:s.formatMessage(ke.Z.cancel)},c.createElement("span",null,s.formatMessage(ke.Z.cancel))),c.createElement("button",{className:d()(md().contentEditorButton,md().saveButton,{[md().disabledButton]:!D}),type:"button",onClick:()=>u(tf.Ij),title:s.formatMessage(ke.Z.saveAndClose),disabled:!D},c.createElement("span",null,s.formatMessage(ke.Z.saveAndClose)))):c.createElement(c.Fragment,null,c.createElement(gu.Z,{type:"delete",title:s.formatMessage(ke.Z.delete),className:d()("PSPDFKit-Content-Editor-Toolbar-Button-Delete",md().iconButton),onPress:T,disabled:!E}),c.createElement(gu.Z,{type:"close",title:s.formatMessage(ke.Z.close),className:md().button,onPress:()=>{u(D?(0,tf.Yg)(!0):tf.u8)}})))))},Kw=(0,Se.vU)({addTextBox:{id:"addTextBox",defaultMessage:"Add Text Box",description:"Label for the add text box button"}});var Zw,Uw,Vw,Gw=n(51559),Ww=n(2270),qw=n(99728),Hw=n(55024),$w=n(4888),Xw=n.n($w);function Yw(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}const Jw={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Qw=(0,Ke.b1)(),eS=c.memo((function(e){let{position:t}=e;const{formatMessage:n}=(0,Se.YB)(),[o,r]=(0,_r.$)(),[i,a]=(0,_r.nG)(),s=(0,_r.R9)((()=>{(0,l.unstable_batchedUpdates)((()=>{a([]),f===Hw.Q.result&&h(Hw.Q.documentA)}))})),[u,p]=(0,_r.jw)(),f=(0,Gw.SH)(u),h=(0,_r.R9)((e=>{e!==f&&p(e||Hw.Q.result)})),m=()=>{(0,l.unstable_batchedUpdates)((()=>{a([]),r(!1),h(Hw.Q.documentA)}))},[,g]=(0,_r.dX)(),v=(0,_r.R9)((()=>{s(),h(Hw.Q.documentA),g(!1)}));return c.createElement("div",{className:d()(Xw().root,{"PSPDFKit-DocumentComparison-Toolbar":!0,[Xw().stickToBottom]:"bottom"===t}),onMouseUp:Yw,onTouchEnd:Yw,onPointerUp:Yw},c.createElement("div",{className:Xw().content},c.createElement("div",{className:Xw().left},c.createElement("form",{className:Xw().form,onSubmit:ar.PF},c.createElement("div",{className:Xw().tabsContainer},c.createElement("div",{className:d()(Xw().documentTab,{[Xw().documentTabActive]:f===Hw.Q.documentA,[Xw().autoCompareTab]:o,[Xw().mobileTab]:Qw}),onPointerUp:()=>h(Hw.Q.documentA),onTouchEnd:()=>h(Hw.Q.documentA)},c.createElement("span",{className:d()(Xw().documentText,{[Xw().mobileText]:!!Qw,[Xw().documentTabActiveText]:f===Hw.Q.documentA})},n(Qw?qw.messages.Comparison_documentOldTouch:qw.messages.Comparison_documentOld)),!o&&i.length<3&&c.createElement(tS,{referencePoints:i,startIndex:0,styles:Xw(),touchDevice:Qw}),!o&&i.length>=3&&c.createElement("span",{className:d()([Xw().toolbarReferencePoints,Xw().toolbarReferencePointsSet])},c.createElement("div",{className:Xw().toolbarReferencePoint},c.createElement("svg",(0,ue.Z)({},Jw,{className:Xw().documentCheckMark}),Zw||(Zw=c.createElement("circle",{cx:"10",cy:"10",r:"10"})),oS)))),c.createElement("div",{className:d()(Xw().documentTab,{[Xw().documentTabActive]:f===Hw.Q.documentB,[Xw().autoCompareTab]:o,[Xw().mobileTab]:Qw}),onPointerUp:()=>h(Hw.Q.documentB),onTouchEnd:()=>h(Hw.Q.documentB)},c.createElement("span",{className:d()(Xw().documentText,{[Xw().mobileText]:!!Qw,[Xw().documentTabActiveText]:f===Hw.Q.documentB})},n(Qw?qw.messages.Comparison_documentNewTouch:qw.messages.Comparison_documentNew)),!o&&i.length<6&&c.createElement(tS,{referencePoints:i,startIndex:3,styles:Xw(),touchDevice:Qw}),!o&&6===i.length&&c.createElement("span",{className:d()([Xw().toolbarReferencePoints,Xw().toolbarReferencePointsSet])},c.createElement("div",{className:Xw().toolbarReferencePoint},c.createElement("svg",(0,ue.Z)({},Jw,{className:Xw().documentCheckMark}),Uw||(Uw=c.createElement("circle",{cx:"10",cy:"10",r:"10"})),oS)))),(o||6===i.length)&&c.createElement("div",{className:d()(Xw().documentTab,Xw().resultTab,{[Xw().documentTabActive]:f===Hw.Q.result,[Xw().autoCompareTab]:o}),onPointerUp:()=>h(null),onTouchEnd:()=>h(null)},c.createElement("span",{className:d()(Xw().documentText,{[Xw().mobileText]:!!Qw,[Xw().documentTabActiveText]:f===Hw.Q.result})},n(qw.messages.Comparison_result)))),c.createElement("div",{className:Xw().controlButtonContainer},!o&&i.length>0&&c.createElement("div",{className:d()(Xw().buttonReset,Xw().buttonResetActive,{[Xw().mobileButton]:Qw}),onPointerUp:v,onTouchEnd:v},n(qw.messages.Comparison_resetButton)),o&&c.createElement("div",{className:d()({[Xw().buttonAlignDocuments]:!0,[Xw().mobileButton]:Qw}),onPointerUp:m,onTouchEnd:m},n(Qw?qw.messages.Comparison_alignButtonTouch:qw.messages.Comparison_alignButton)))))))}));const tS=e=>{const{styles:t,referencePoints:n,startIndex:o,touchDevice:r}=e,i=n.slice(o,o+3),a=Array.from({length:3-i.length});return c.createElement("span",{className:d()(t.toolbarReferencePoints,{[t.toolbarReferencePointMobile]:!!r,[t.second]:3===o})},i.concat(a).map(((e,r,i)=>{const a=e?"set":0===r&&n.length===o||i[r-1]?"current":"empty";return c.createElement("div",{className:d()(t.referencePointParent,"PSPDFKit-DocumentComparison-ReferencePoint-State",`PSPDFKit-DocumentComparison-ReferencePoint-State-${(0,hn.kC)(a)}`),key:`point_${r+o}`},r>0?c.createElement("div",{className:t.separator}):null,c.createElement("div",{className:t.toolbarReferencePoint},c.createElement("svg",(0,ue.Z)({},Jw,{className:t[nS[a]]}),Vw||(Vw=c.createElement("circle",{cx:"10",cy:"10",r:"10"})),e?oS:c.createElement(rS,null,r+1))))})))},nS={set:"checkMark",current:"referencePointSet",empty:"referencePoint"},oS=c.createElement("path",{d:"M5.45508 10.1125L8.53758 12.94L14.5451 6.25",strokeWidth:"1.875",strokeMiterlimit:"10",strokeLinecap:"round"}),rS=e=>{let{children:t}=e;return c.createElement("text",{x:"10",y:"11",textAnchor:"middle",dominantBaseline:"middle",dy:""},t)};var iS=n(36401),aS=n.n(iS),sS=n(11521),lS=n.n(sS),cS=n(58568);const uS=[{interactionMode:N.A.BUTTON_WIDGET,icon:"fd-button",title:"Create Button Widget",className:"PSPDFKit-Form-Creator-Toolbar-ButtonWidget"},{interactionMode:N.A.TEXT_WIDGET,icon:"fd-text",title:"Create Text Widget",className:"PSPDFKit-Form-Creator-Toolbar-TextWidget"},{interactionMode:N.A.RADIO_BUTTON_WIDGET,icon:"fd-radio",title:"Create Radio Widget",className:"PSPDFKit-Form-Creator-Toolbar-RadioWidget"},{interactionMode:N.A.CHECKBOX_WIDGET,icon:"fd-checkbox",title:"Create Checkbox Widget",className:"PSPDFKit-Form-Creator-Toolbar-CheckboxWidget"},{interactionMode:N.A.COMBO_BOX_WIDGET,icon:"fd-combobox",title:"Create Combobox widget",className:"PSPDFKit-Form-Creator-Toolbar-ComboboxWidget"},{interactionMode:N.A.LIST_BOX_WIDGET,icon:"fd-listbox",title:"Create List Box Widget",className:"PSPDFKit-Form-Creator-Toolbar-ListBoxWidget"},{interactionMode:N.A.SIGNATURE_WIDGET,icon:"fd-signature",title:"Create Signature Widget",className:"PSPDFKit-Form-Creator-Toolbar-SignatureWidget"},{interactionMode:N.A.DATE_WIDGET,icon:"fd-date",title:"Create Date Widget",className:"PSPDFKit-Form-Creator-Toolbar-DateWidget"}];var dS=n(56966);const pS=e=>{let{position:t,dispatch:n,interactionMode:o,frameWindow:r,modalClosurePreventionError:i,selectedAnnotation:a}=e;return c.useEffect((()=>{function e(e){"Escape"!==e.key||i&&(null==i?void 0:i.error)===dS.x.FORM_DESIGNER_ERROR||a||n((0,Kt.XX)())}return r.document.addEventListener("keydown",e),()=>{r.document.removeEventListener("keydown",e)}}),[n,i,a]),c.createElement("div",{className:d()("PSPDFKit-Form-Creator-Toolbar",Eu().root,Ud().formDesignerContainer,{[Eu().stickToBottom]:"bottom"===t}),onMouseUp:Lw,onTouchEnd:Lw,onPointerUp:Lw},c.createElement("div",null,uS.map((e=>c.createElement(Vd.Z,{key:e.interactionMode,type:e.icon,title:e.title,className:d()(Ud().formDesignerButton,{[Ud().formDesignerButtonActive]:o===e.interactionMode},e.className),onPress:()=>{o===e.interactionMode?n((0,Qn.el)()):(n((0,Qn.h4)()),n((0,Kt.UF)(e.interactionMode)))},selected:o===e.interactionMode})))),c.createElement("div",{className:Ud().spacer}))};var fS=n(40853),hS=n(28910),mS=n(22458),gS=n.n(mS);function vS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function yS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vS(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bS(e){let{btnComponentProps:t,selectedItem:n}=e;return c.createElement(we.Z,(0,ue.Z)({is:"div"},t,{className:d()("PSPDFKit-Input-Dropdown-Button ",$c().selectBox,gS().selectBox),style:{minWidth:"100px"}}),c.createElement("span",null,null==n?void 0:n.label),c.createElement("div",null,(0,Oe.Z)({type:"caret-down",style:{width:12,height:12,flexBasis:12},className:d()($c().dropdownIcon)})))}function wS(e){let{item:t,state:n,itemComponentProps:o}=e;return c.createElement(we.Z,(0,ue.Z)({is:"div",className:d()($c().item,{[$c().isSelected]:(null==n?void 0:n.includes("selected"))||(null==n?void 0:n.includes("focused"))}),name:null==t?void 0:t.value},o),null==t?void 0:t.label)}function SS(e,t){return e.horizontalAlign?e.horizontalAlign:t instanceof w.R0?"center":"left"}function PS(e,t){return e.verticalAlign?e.verticalAlign:t instanceof w.R0?"center":t instanceof w.$o&&t.multiLine?"top":"center"}const ES=(0,Se.vU)({textStyle:{id:"textStyle",defaultMessage:"Text style",description:"Form designer popover text section title"},fontSize:{id:"fontSize",defaultMessage:"Font size",description:"Form designer popover text section font size label"},fontColor:{id:"fontColor",defaultMessage:"Font color",description:"Form designer popover text section font color label"}}),xS=function(e){var t,o,r,i,a;let{annotation:s,updateAnnotation:l,intl:u,frameWindow:d,formField:p,customFontsReadableNames:f}=e;const h=ed.vt.toArray().map((e=>({label:e,value:e}))),m=h.concat(f.toArray().map((e=>({label:e,value:e}))).filter((e=>!h.some((t=>t.value===e.value)))));if(s.font&&!ed.vt.has(s.font||"")&&!f.some((e=>e===s.font))&&""!==s.font.trim()){const e=u.formatMessage(ke.Z.fontFamilyUnsupported,{arg0:s.font});m.push({label:e,value:e,disabled:!0})}const g=["auto",4,6,8,10,12,14,18,24,36,48,64,72,96,144,192,200].map((e=>({value:e,label:e.toString()}))),v=c.useCallback((e=>l({horizontalAlign:e})),[l]),y=c.useCallback((e=>l({verticalAlign:e})),[l]);return c.createElement(hS.U,{title:u.formatMessage(ES.textStyle)},c.createElement("div",{className:gS().item},c.createElement(Re.Z,{src:n(20626),className:gS().itemIcon,role:"presentation"}),c.createElement("div",{className:gS().itemLabel},u.formatMessage(ke.Z.font)),c.createElement("div",{className:gS().nativeDropdown},c.createElement("select",{"aria-label":u.formatMessage(ke.Z.font),className:"PSPDFKit-Input-Dropdown-Select",value:s.font||"",onChange:e=>{void 0!==e.target.value&&l({font:e.target.value})}},m.map((e=>c.createElement("option",{key:e.value,value:e.value,disabled:e.disabled},e.label))))),c.createElement(Uc.Z,{items:m,value:{label:null!==(t=s.font)&&void 0!==t?t:m[0].label,value:null!==(o=s.font)&&void 0!==o?o:m[0].value},accessibilityLabel:u.formatMessage(ke.Z.font),discreteDropdown:!1,isActive:!1,caretDirection:"down",className:gS().dropdownGroupComponent,menuClassName:gS().dropdownGroupMenu,ButtonComponent:bS,ItemComponent:wS,onSelect:(e,t)=>{void 0!==t.value&&l({font:t.value})},frameWindow:d})),c.createElement("div",{className:gS().item},c.createElement(Re.Z,{src:n(89882),className:gS().itemIcon,role:"presentation"}),c.createElement("div",{className:gS().itemLabel},u.formatMessage(ES.fontSize)),c.createElement("div",{className:gS().nativeDropdown},c.createElement("select",{"aria-label":u.formatMessage(ES.fontSize),className:"PSPDFKit-Input-Dropdown-Select",value:s.fontSize||"",onChange:e=>{l({fontSize:"auto"===e.target.value?"auto":parseFloat(e.target.value)})}},g.map((e=>c.createElement("option",{key:e.value,value:e.value,disabled:e.disabled},e.label))))),c.createElement(Uc.Z,{items:g,value:(null!==(r=g.find((e=>e.value===Math.round(s.fontSize||0))))&&void 0!==r?r:null!=s.fontSize)?{value:s.fontSize,label:null!==(i=null===(a=s.fontSize)||void 0===a?void 0:a.toString())&&void 0!==i?i:""}:null,accessibilityLabel:u.formatMessage(ES.fontSize),discreteDropdown:!1,isActive:!1,caretDirection:"down",className:gS().dropdownGroupComponent,menuClassName:gS().dropdownGroupMenu,ButtonComponent:bS,ItemComponent:wS,onSelect:(e,t)=>{null==t.value||"auto"!==t.value&&isNaN(t.value)||l({fontSize:t.value})},frameWindow:d})),c.createElement("div",{className:gS().item},c.createElement(Re.Z,{src:n(59601),className:gS().itemIcon,role:"presentation"}),c.createElement("div",{className:gS().itemLabel},u.formatMessage(ke.Z.color)),c.createElement(vu.Z,{record:s,onChange:l,styles:yS(yS({},Eu()),{},{colorSvg:gS().colorSvg,colorItem:gS().colorItem,dropdownMenu:gS().colorDropdownMenu,controlWrapper:yS(yS({},Eu().controlWrapper),{},{width:"auto"})}),accessibilityLabel:u.formatMessage(ke.Z.fillColor),caretDirection:"down",colorProperty:"fontColor",frameWindow:d,className:gS().colorDropdown})),c.createElement("div",{className:gS().item},c.createElement(Re.Z,{src:n(65908),className:gS().itemIcon,role:"presentation"}),c.createElement("div",{className:gS().itemLabel},u.formatMessage(ke.Z.horizontalAlignment)),c.createElement(q.Ee,{inputName:"horizontalAlign",label:u.formatMessage(ke.Z.horizontalAlignment),selectedOption:SS(s,p),labelClassNamePrefix:"PSPDFKit-Form-Creator-Editor-Horizontal-Alignment",options:["left","center","right"].map((e=>({value:e,label:u.formatMessage(ke.Z[`alignment${(0,hn.kC)(e)}`]),iconPath:n(58758)(`./text-align-horizontal-${e}.svg`)}))),onChange:v})),!(p instanceof w.Vi)&&c.createElement("div",{className:gS().item},c.createElement(Re.Z,{src:n(1792),className:gS().itemIcon,role:"presentation"}),c.createElement("div",{className:gS().itemLabel},u.formatMessage(ke.Z.verticalAlignment)),c.createElement(q.Ee,{inputName:"verticalAlign",label:u.formatMessage(ke.Z.verticalAlignment),selectedOption:PS(s,p),labelClassNamePrefix:"PSPDFKit-Form-Creator-Editor-Vertical-Alignment",options:["top","center","bottom"].map((e=>({value:e,label:u.formatMessage(ke.Z["center"===e?"alignmentCenter":e]),iconPath:n(29712)(`./text-align-vertical-${e}.svg`)}))),onChange:y})))};var DS=n(84537);const CS=(0,Se.vU)({advanced:{id:"advanced",defaultMessage:"Advanced",description:"Form designer popover advanced section title"},creatorName:{id:"creatorName",defaultMessage:"Creator Name",description:"Form designer popover advanced section creator name label"},note:{id:"note",defaultMessage:"Note",description:"Form designer popover advanced section note label"},customData:{id:"customData",defaultMessage:"Custom data",description:"Form designer popover advanced section custom data label"},required:{id:"required",defaultMessage:"Required",description:"Form designer popover advanced section required label"},readOnly:{id:"readOnly",defaultMessage:"Read Only",description:"Form designer popover advanced section read only label"},multiSelect:{id:"multiSelect",defaultMessage:"Multi Select",description:"Form designer popover advanced section multi select label"},createdAt:{id:"createdAt",defaultMessage:"Created at",description:"Form designer popover advanced section created at label"},updatedAt:{id:"updatedAt",defaultMessage:"Updated at",description:"Form designer popover advanced section updated at label"},customDataErrorMessage:{id:"customDataErrorMessage",defaultMessage:"Must be a plain JSON-serializable object",description:"Form designer popover advanced section custom data error"},multiLine:{id:"multiLine",defaultMessage:"Multi Line",description:"Form designer popover multiline input label"}}),kS=function(e){let{intl:t,annotation:n,updateAnnotation:o,formField:r,updateFormField:i,locale:a,onCustomDataError:s}=e;const[l,u]=c.useState({value:JSON.stringify(n.customData),error:""}),d=c.useCallback((e=>o({creatorName:e.target.value})),[o]),p=c.useCallback((e=>o({note:e.target.value})),[o]),f=c.useCallback((e=>{let n="";try{JSON.parse(e.target.value),s(!1)}catch(e){n=t.formatMessage(CS.customDataErrorMessage),s(!0)}u({value:e.target.value,error:n})}),[t,s]),h=c.useCallback((()=>{if(!l.error)try{const e=JSON.parse(l.value);o({customData:e})}catch(e){}}),[o,l]),m=c.useCallback((e=>i({required:e})),[i]),g=c.useCallback((e=>i({readOnly:e})),[i]),v=c.useCallback((e=>i({multiSelect:e})),[i]),y=c.useCallback((e=>i({multiLine:e})),[i]);return c.createElement(hS.U,{title:t.formatMessage(CS.advanced)},c.createElement(Xh,{label:t.formatMessage(CS.creatorName),value:n.creatorName||"",onChange:d}),c.createElement(Xh,{label:t.formatMessage(CS.note),value:n.note||"",onChange:p}),c.createElement(Xh,{label:t.formatMessage(CS.customData),value:l.value,onChange:f,onBlur:h,errorMessage:l.error,className:gS().lastInputField}),c.createElement("div",{className:gS().advancedItem},c.createElement("div",{className:gS().advancedItemLabel},t.formatMessage(CS.required)),c.createElement(DS.n,{value:!(null==r||!r.required),onUpdate:m,accessibilityLabel:t.formatMessage(CS.required)})),c.createElement("div",{className:gS().advancedItem},c.createElement("div",{className:gS().advancedItemLabel},t.formatMessage(CS.readOnly)),c.createElement(DS.n,{value:!(null==r||!r.readOnly),onUpdate:g,accessibilityLabel:t.formatMessage(CS.readOnly)})),r instanceof w.Dz&&c.createElement("div",{className:gS().advancedItem},c.createElement("div",{className:gS().advancedItemLabel},t.formatMessage(CS.multiSelect)),c.createElement(DS.n,{value:!(null==r||!r.multiSelect),onUpdate:v,accessibilityLabel:t.formatMessage(CS.multiSelect)})),r instanceof w.$o&&c.createElement("div",{className:gS().advancedItem},c.createElement("div",{className:gS().advancedItemLabel},t.formatMessage(CS.multiLine)),c.createElement(DS.n,{value:!(null==r||!r.multiLine),onUpdate:y,accessibilityLabel:t.formatMessage(CS.multiLine)})),c.createElement("div",{className:gS().advancedItem},c.createElement("div",{className:gS().advancedItemLabel},"ID"),c.createElement("div",{className:gS().advancedItemValue},n.id)),c.createElement("div",{className:gS().advancedItem},c.createElement("div",{className:gS().advancedItemLabel},t.formatMessage(CS.createdAt)),c.createElement("div",{className:gS().advancedItemValue},n.createdAt.toLocaleDateString(a))),c.createElement("div",{className:gS().advancedItem},c.createElement("div",{className:gS().advancedItemLabel},t.formatMessage(CS.updatedAt)),c.createElement("div",{className:gS().advancedItemValue},n.updatedAt.toLocaleDateString(a))))};var OS=n(79153),AS=n(71634),TS=n(47860),IS=n.n(TS),FS=function(){var e,t,n=(0,OS.f$)((function(e){return{currentOffset:e.getSourceClientOffset(),isDragging:e.isDragging(),itemType:e.getItemType(),item:e.getItem()}}));return n.isDragging&&null!==n.currentOffset?{display:!0,itemType:n.itemType,item:n.item,style:(e=n.currentOffset,t="translate(".concat(e.x,"px, ").concat(e.y,"px)"),{pointerEvents:"none",position:"fixed",top:0,left:0,transform:t,WebkitTransform:t})}:{display:!1}};so().func,so().oneOfType([so().node,so().func]);function MS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MS(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const NS=e=>{let{id:t,index:o,moveCard:r,option:i,onDelete:a}=e;const s=(0,c.useRef)(null),l=(0,c.useRef)(null),[{handlerId:u},p]=(0,OS.LW)({accept:"CARD",collect:e=>({handlerId:e.getHandlerId()}),hover(e,t){var n;if(!l.current)return;const i=e.index,a=o;if(i===a)return;const s=null===(n=l.current)||void 0===n?void 0:n.getBoundingClientRect(),c=(s.bottom-s.top)/2,u=t.getClientOffset().y-s.top;i<a&&u<c||i>a&&u>c||(r(i,a),e.index=a)}}),{display:f,style:h}=FS(),[{isDragging:m,id:g},v]=(0,OS.c0)({type:"CARD",item:()=>({id:t,index:o}),collect:e=>{var t;return{isDragging:e.isDragging(),id:null===(t=e.getItem())||void 0===t?void 0:t.id}}}),y=m?.5:1;v(p(s));const b=e=>c.createElement("div",{style:e?_S(_S({},h),{width:332}):{opacity:y},className:d()(IS().option,{[IS().preview]:e}),ref:e?void 0:l},c.createElement("button",(0,ue.Z)({type:"button",className:IS().hamburger},e?void 0:{ref:s,"data-handler-id":u}),c.createElement(Re.Z,{src:n(50618),role:"presentation"})),c.createElement("div",{className:IS().optionContent},i.label),c.createElement("button",{className:d()(IS().button,IS().deleteButton),type:"button",onClick:()=>a(o)},c.createElement(Re.Z,{src:n(33374),className:d()(IS().icon,IS().deleteIcon),role:"presentation"})));return c.createElement(c.Fragment,null,b(!1),f&&g===t&&b(!0))};const RS=(0,Se.vU)({options:{id:"options",defaultMessage:"Options",description:"Options control label"},enterDescriptionHere:{id:"enterDescriptionHere",defaultMessage:"Enter description here",description:"New option input placeholder"},addOption:{id:"addOption",defaultMessage:"Add option",description:"New option button text"},emptyInput:{id:"emptyInput",defaultMessage:"Please fill in this field",description:"New option empty input label"}}),LS=(0,Se.XN)((function(e){let{intl:t,options:n,onChange:o,ownerDocument:r}=e;const{formatMessage:i}=t,[a,l]=c.useState(!0);return c.createElement(OS.WG,{backend:AS.TouchBackend,options:{enableMouseEvents:!0,delayTouchStart:500,touchSlop:10,ignoreContextMenu:!0,ownerDocument:r}},c.createElement("form",{className:IS().wrapper,onSubmit:e=>{e.preventDefault();const t=e.target,{value:r}=t.newOption;r?(t.reset(),o(n.push(new w.mv({value:r,label:r})))):l(!1)}},c.createElement("div",{className:IS().title},i(RS.options)),c.createElement("div",null,n.map(((e,t)=>c.createElement(NS,{key:e.value,index:t,moveCard:(e,t)=>{const r=n.get(t);(0,s.kG)(r,"Item not found"),o(n.delete(t).insert(e,r))},option:e,id:e.value,onDelete:e=>o(n.delete(e))}))),c.createElement("div",{className:d()(IS().option,IS().addOptionInputWrapper,{[IS().addOptionInputWrapperInvalid]:!a})},c.createElement("input",{autoFocus:!0,className:d()(IS().optionContent,IS().addOptionInput),name:"newOption",type:"text",placeholder:i(RS.enterDescriptionHere),onBlur:()=>l(!0),onChange:e=>{!a&&e.target.value.trim()&&l(!0)}}))),!a&&c.createElement("div",{className:IS().invalidOptionInput},t.formatMessage(RS.emptyInput)),c.createElement("button",{className:d()(IS().button,IS().addOptionButton),type:"submit"},i(RS.addOption))))}));var BS,jS,zS,KS,ZS;function US(e,t){return t?ke.Z.dateField:e instanceof w.R0?ke.Z.button:e instanceof w.$o?ke.Z.textField:e instanceof w.XQ?ke.Z.radioField:e instanceof w.rF?ke.Z.checkboxField:e instanceof w.fB?ke.Z.comboBoxField:e instanceof w.Vi?ke.Z.listBoxField:ke.Z.signatureField}const VS=(0,Se.vU)({formDesignerPopoverTitle:{id:"formDesignerPopoverTitle",defaultMessage:"{formFieldType} properties",description:"Form designer popover title"},styleSectionLabel:{id:"styleSectionLabel",defaultMessage:"{formFieldType} style",description:"Form designer style section"},formFieldName:{id:"formFieldName",defaultMessage:"Form field name",description:"Form designer popover form field name input label"},format:{id:"format",defaultMessage:"Format",description:"Format"},buttonText:{id:"buttonText",defaultMessage:"Button Text",description:"Form designer popover button text input label"},defaultValue:{id:"defaultValue",defaultMessage:"Default Value",description:"Form designer popover default value input label"},multiline:{id:"multiline",defaultMessage:"Multiline",description:"Form designer popover multiline input label"},radioButtonFormFieldNameWarning:{id:"radioButtonFormFieldNameWarning",defaultMessage:"To group the radio buttons, make sure they have the same form field names.",description:"Form designer popover radio button form field name warning message"},formFieldNameExists:{id:"formFieldNameExists",defaultMessage:"A form field named {formFieldName} already exists. Please choose a different name.",description:"Change form field name if it already exists."},formFieldNameNotEmpty:{id:"formFieldNameNotEmpty",defaultMessage:"Form Field Name cannot be left empty.",description:"Form Field Name cannot be left empty."},label:{id:"label",defaultMessage:"Label",description:"Label"},value:{id:"value",defaultMessage:"Value",description:"Value"}}),GS=(0,Se.XN)((function(e){var t;let{referenceRect:o,viewportState:r,isHidden:a,intl:l,formFields:u,dispatch:p,annotation:f,frameWindow:h,eventEmitter:m,locale:g,isUnsavedAnnotation:v,setModalClosurePreventionError:y,modalClosurePreventionError:b,pageSize:S,customFontsReadableNames:P}=e;const E=(0,c.useMemo)((()=>{const e=u.get(f.formFieldName);return(0,s.kG)(e,"Form field not found"),e}),[f,u]),x=(0,c.useMemo)((()=>{if(E instanceof w.XQ||E instanceof w.rF)return E.annotationIds.findIndex((0,_.oF)(f))}),[E,f]),[D,C]=(0,c.useState)(E.name),[k,O]=(0,c.useState)(),[A,T]=c.useState(!1),I=c.useCallback((e=>{let t=f;if(!t)return;t=t.merge(e);const n={annotations:(0,i.aV)([t]),reason:Q.f.PROPERTY_CHANGE};m.emit("annotations.willChange",n),p((0,bt.FG)(t))}),[m,p,f]),F=c.useCallback((e=>{let t=E;t&&(t=t.merge(e),p((0,Qn.vK)(t)))}),[E,p]);(0,fn.useGranularEffect)((()=>{C(E.name),O(void 0)}),[f.id],[E.name]);const M=c.useCallback((e=>{const t=e.target.value;C(t),null!=t&&t.trim()?!u.has(t)||f.formFieldName===t||E instanceof w.XQ?(O(void 0),A||y(null)):(O(l.formatMessage(VS.formFieldNameExists,{formFieldName:t})),y({annotationId:f.id,error:dS.x.FORM_DESIGNER_ERROR})):(O(l.formatMessage(VS.formFieldNameNotEmpty)),y({annotationId:f.id,error:dS.x.FORM_DESIGNER_ERROR}))}),[l,f,E,u,y,A]),N=c.useCallback((e=>F({buttonLabel:e.target.value})),[F]),R=c.useCallback((e=>F({options:e})),[F]),L=(0,c.useCallback)((e=>{const t=e.target.value;(0,s.kG)(void 0!==x);const n=E.options.get(x),o=E.options.set(x,n.set("label",t));F({options:o})}),[F,E,x]),B=c.useCallback((e=>{T(e),e?y({annotationId:f.id,error:dS.x.FORM_DESIGNER_ERROR}):b&&!k&&y(null)}),[y,b,k,f]),j=(0,c.useCallback)((e=>{const t=e.target.value;(0,s.kG)(void 0!==x);const n=E.options.get(x),o=E.options.set(x,n.set("value",t));F({options:o})}),[F,E,x]),z=c.useMemo((()=>{return E instanceof w.R0?c.createElement(Xh,{label:l.formatMessage(VS.buttonText),value:(null==E?void 0:E.buttonLabel)||"",onChange:N,className:gS().lastInputField}):E instanceof w.XQ?((0,s.kG)(void 0!==x),c.createElement(c.Fragment,null,c.createElement("div",{className:gS().radioButtonWarning},c.createElement(Re.Z,{src:n(14896),role:"presentation",className:gS().radioButtonWarningIcon}),c.createElement("span",{className:gS().radioButtonWarningLabel},l.formatMessage(VS.radioButtonFormFieldNameWarning))),c.createElement(Xh,{label:l.formatMessage(VS.label),value:(null==E||null===(e=E.options.get(x))||void 0===e?void 0:e.label)||"",onChange:L,required:!0}),c.createElement(Xh,{label:l.formatMessage(VS.value),value:(null==E||null===(t=E.options.get(x))||void 0===t?void 0:t.value)||"",onChange:j,required:!0,className:gS().lastInputField}))):E instanceof w.rF?((0,s.kG)(void 0!==x),c.createElement(c.Fragment,null,c.createElement(Xh,{label:l.formatMessage(VS.label),value:(null==E||null===(o=E.options.get(x))||void 0===o?void 0:o.label)||"",onChange:L,required:!0}),c.createElement(Xh,{label:l.formatMessage(VS.value),value:(null==E||null===(r=E.options.get(x))||void 0===r?void 0:r.value)||"",onChange:j,required:!0,className:gS().lastInputField}))):E instanceof w.Vi||E instanceof w.fB?c.createElement(LS,{options:E.options,onChange:R,ownerDocument:h.document}):null;var e,t,o,r}),[h.document,E,l,N,R,L,j,x]),K=E instanceof w.$o&&!(null===(t=f.additionalActions)||void 0===t||!t.onFormat);return c.createElement(Yh.Z,{referenceRect:o,viewportState:r,isHidden:a||!E,className:"PSPDFKit-Form-Creator-Popover",wrapperClassName:"PSPDFKit-Form-Creator-Editor",title:l.formatMessage(VS.formDesignerPopoverTitle,{formFieldType:E?l.formatMessage(US(E,K)):""}),footer:c.createElement(c.Fragment,null,c.createElement(Yh.j,{className:d()(gS().footerButton,gS().deleteButton,"PSPDFKit-Form-Creator-Editor-Delete"),onClick:()=>{y(null),p((0,bt.d8)((0,i.l4)([f.id])))}},l.formatMessage(ke.Z.delete)),c.createElement(Yh.j,{className:d()(gS().footerButton,gS().doneButton,"PSPDFKit-Form-Creator-Editor-Done"),onClick:()=>{b||p((0,De.fz)())}},l.formatMessage(ke.Z.done)))},c.createElement(c.Fragment,null,c.createElement("div",{className:v?void 0:gS().formFieldNameReadOnly},c.createElement("div",null,c.createElement(Xh,{label:l.formatMessage(VS.formFieldName),value:D,onChange:M,onKeyDown:e=>e.stopPropagation(),required:!0,errorMessage:k,className:d()({[gS().lastInputField]:!z&&!K}),inputClassName:"PSPDFKit-Form-Creator-Editor-Form-Field-Name",onBlur:()=>{k||F({name:D})}})),z),K&&c.createElement("div",{className:d()(Hh().wrapper,gS().lastInputField)},c.createElement("label",{className:Hh().label,htmlFor:"dateTimeFormat"},"Format",c.createElement("div",{className:Hh().formatSelectWrapper,role:"button"},c.createElement("select",{className:Hh().dateSelect,name:"dateTimeFormat",id:"dateTimeFormat",onChange:e=>{const t=e.target.value;I({additionalActions:{onFormat:new w.bp({script:`AFDate_FormatEx("${t}")`})}})}},BS||(BS=c.createElement("option",{value:"yyyy-mm-dd"},"yyyy-mm-dd")),jS||(jS=c.createElement("option",{value:"mm/dd/yyyy"},"mm/dd/yyyy")),zS||(zS=c.createElement("option",{value:"dd/mm/yyyy"},"dd/mm/yyyy")),KS||(KS=c.createElement("option",{value:"m/d/yyyy HH:MM"},"m/d/yyyy HH:MM")),ZS||(ZS=c.createElement("option",{value:"d/m/yyyy HH:MM"},"d/m/yyyy HH:MM")))))),c.createElement(fS.ZP,{intl:l,annotation:f,label:l.formatMessage(VS.styleSectionLabel,{formFieldType:E?l.formatMessage(US(E,K)):""}),updateAnnotation:I,frameWindow:h,pageSize:S}),!(E instanceof w.Yo)&&!(E instanceof w.XQ)&&!(E instanceof w.rF)&&c.createElement(xS,{intl:l,annotation:f,updateAnnotation:I,frameWindow:h,formField:E,customFontsReadableNames:P}),c.createElement(kS,{intl:l,annotation:f,updateAnnotation:I,formField:E,updateFormField:F,locale:g,onCustomDataError:B})))}));var WS,qS,HS=n(31060),$S=n.n(HS);const XS=Ke.Ni?()=>{const e=(0,a.I0)();return c.createElement(q.QO,{wrapperClass:d()($S().mobileWrapper,"PSPDFKit-ContentEditor-Exit-Dialog"),formClass:$S().formWrapper,onDismiss:()=>{e((0,tf.Yg)(!1))}},qS||(qS=c.createElement(YS,null)))}:()=>{const{formatMessage:e}=(0,Se.YB)(),t=(0,a.I0)();return c.createElement(op.Z,{role:"alertdialog",background:"rgba(0,0,0,.1)",className:d()($S().modalRoot,"PSPDFKit-ContentEditor-Exit-Dialog"),accessibilityLabel:e(JS.contentEditorSavePromptAccessibilityLabel),accessibilityDescription:e(JS.contentEditorSavePromptAccessibilityDescription),restoreOnClose:!0,onEscape:()=>{t((0,tf.Yg)(!1))}},WS||(WS=c.createElement(YS,null)))},YS=()=>{const{formatMessage:e}=(0,Se.YB)(),t=(0,a.I0)();return c.createElement(c.Fragment,null,c.createElement(op.Z.Section,{className:d()($S().dropdownSection,$S().mainSection)},c.createElement(q.zx,{className:d()($S().closeButton,"PSPDFKit-ContentEditor-Exit-Dialog-Close-Button"),onClick:()=>{t((0,tf.Yg)(!1))},"aria-label":e(ke.Z.close)},c.createElement(Re.Z,{className:$S().closeIcon,src:n(15708)})),c.createElement("div",{className:d()($S().container,"PSPDFKit-ContentEditor-Exit-Dialog-Content")},c.createElement(Re.Z,{className:$S().warningIcon,src:n(73986)}),c.createElement("h2",{className:$S().heading},e(JS.contentEditorSavePromptHeading)),c.createElement("p",{className:$S().description},e(JS.contentEditorSavePromptMessage)))),c.createElement(op.Z.Section,{className:d()($S().buttonsGroupSection,$S().dropdownSection)},c.createElement(q.hE,{className:d()($S().buttonsGroup,"PSPDFKit-ContentEditor-Exit-Dialog-Buttons"),align:"end"},c.createElement(q.zx,{autoFocus:!0,onClick:()=>{t(tf.u8)},className:d()("PSPDFKit-ContentEditor-Exit-Dialog-Button","PSPDFKit-ContentEditor-Exit-Dialog-Button-Discard-Changes",$S().button)},"Don't Save"),c.createElement(q.zx,{onClick:()=>{t(tf.Ij)},primary:!0,className:d()("PSPDFKit-ContentEditor-Exit-Dialog-Button","PSPDFKit-ContentEditor-Exit-Dialog-Button-Save-Changes",$S().button)},"Save"))))},JS=(0,Se.vU)({contentEditorSavePromptHeading:{id:"contentEditorSavePromptHeading",defaultMessage:"Save changes before exiting?",description:'Heading displayed in the "Exit Content Editing Mode" confirm dialog'},contentEditorSavePromptMessage:{id:"contentEditorSavePromptMessage",defaultMessage:"If you dont save your changes to the document, your changes will be lost.",description:'Message displayed in the "Exit Content Editing Mode" confirm dialog'},contentEditorSavePromptAccessibilityLabel:{id:"contentEditorSavePromptAccessibilityLabel",defaultMessage:"Confirm content editing exit dialog",description:'Accessibility description for the "Delete Annotation" confirm dialog'},contentEditorSavePromptAccessibilityDescription:{id:"contentEditorSavePromptAccessibilityDescription",defaultMessage:"A content editing session is about to be dismissed and data could be loss. This dialog serves as a confirmation to whether continue with this action or not.",description:'Accessibility description for the "Exit Content Editing Mode" confirm dialog'}});var QS=n(20500),eP=n(14149),tP=n.n(eP);const nP=function(e){const{referenceRect:t,viewportState:n,activeTextBlock:o,fontFace:r}=e,i=(0,a.I0)(),{formatMessage:s}=(0,Se.YB)(),l=(0,a.v9)((e=>{var t,n;return null!==(t=null===(n=e.contentEditorSession.fontMismatchTooltip)||void 0===n?void 0:n.dismissAbortController)&&void 0!==t?t:null}));return c.createElement(Rg.Z,{referenceRect:t.apply((0,H.cr)(n,o.pageIndex)).translate(n.scrollPosition.scale(n.zoomLevel)),viewportState:n,className:d()(tP().container,"PSPDFKit-Font-Mismatch-Notification-Container"),color:[new w.Il({r:255,g:199,b:143})],arrowSize:0,arrowClassName:tP().arrow},c.createElement("div",{className:d()(tP().wrapper,"PSPDFKit-Font-Mismatch-Notification"),onPointerOver:()=>{l&&l.abort()},onPointerLeave:()=>{const e=new AbortController;i((0,tf.Hv)(e)),i((0,tf.uy)(e.signal))}},c.createElement("span",{className:tP().tooltipFont},s(sf.fontMismatch,{arg0:r}))))},oP=c.memo((function(e){const t=(0,Se.YB)(),n=(0,a.I0)(),o=(0,a.v9)((e=>e.selectedGroupId)),{selectedAnnotationIds:r}=e;return c.createElement("div",{className:d()("PSPDFKit-Multi-Annotations-Selection-Toolbar",Eu().root,Eu().content,Eu().reverseRow)},c.createElement(gu.Z,{type:"delete",title:t.formatMessage(ke.Z.delete),className:Eu().button,onPress:()=>{n((0,bt.d8)(r))}}),o?null:c.createElement(gu.Z,{type:"group",title:t.formatMessage(ke.Z.group),className:Eu().button,onPress:()=>{n((0,Kt._R)(r))}}),o?c.createElement(gu.Z,{type:"ungroup",title:t.formatMessage(ke.Z.ungroup),className:Eu().button,onPress:()=>{n((0,Kt.UZ)(o))}}):null)}));const rP=oP,iP=e=>{const t=(0,a.I0)(),{formatMessage:n}=(0,Se.YB)(),{interactionMode:o,currentItemPreset:r,frameWindow:i,backend:s}=e;function l(e,n,i){t((0,De.fz)()),o===n&&i===r?(0,a.dC)((()=>{t((0,bt.Ds)(null)),t((0,Kt.Ce)())})):(0,a.dC)((()=>{t((0,bt.Ds)(i)),t((0,Kt.yg)(e,n))}))}return c.createElement("div",{className:d()("PSPDFKit-Measurement-Toolbar",Eu().root,Eu().content,Eu().measurementToolbar),onMouseUp:Lw,onTouchEnd:Lw,onPointerUp:Lw},k.Di.map((e=>c.createElement(Vd.Z,{key:e.interactionMode,type:e.icon,title:n(ke.Z[e.localeKey]),className:d()(Ud().formDesignerButton,{[Ud().formDesignerButtonActive]:o===e.interactionMode},e.className),onPress:()=>{l(e.class,e.interactionMode,e.preset)},selected:o===e.interactionMode}))),c.createElement("div",{className:Ud().spacer}),c.createElement("div",{className:Eu().right},c.createElement(Kd.ZP,{frameWindow:i}),c.createElement(Vd.Z,{key:"scale",type:"scale",title:n(fc.sY.measurementScale),className:d()(Eu().measurementToolbarButton)}),c.createElement(Vd.Z,{key:"calibrate",type:"calibrate",title:n(fc.sY.calibrate),className:d()(Ud().formDesignerButton,"PSPDFKit-Scale-Calibration"),onPress:()=>{const e=k.Di.find((e=>e.interactionMode===N.A.DISTANCE));e&&(t((0,Ut.Xh)(!0)),l(e.class,e.interactionMode,e.preset))}}),"STANDALONE"===(null==s?void 0:s.type)&&c.createElement("button",{className:d()(Eu().pointSnappingToggleButtonWrapper,"PSPDFKit-Measurement-Snapping-Toggle")},c.createElement("div",{className:d()(Eu().pointSnappingToggleButton)},c.createElement("label",{className:d()(Eu().checkbox)},c.createElement("input",{type:"checkbox",name:"toggle-point-snapping",checked:!e.disablePointSnapping,onChange:()=>{t((0,Kt.VF)(!e.disablePointSnapping))}}),c.createElement("span",{className:Eu().checkboxLabel},n(ke.Z.Snapping)))))))};var aP=n(90012),sP=n(80649),lP=n.n(sP);const cP=function(e){const{referenceRect:t,viewportState:n,isReadOnly:o,isLocked:r,hasLockedContents:i}=e,{formatMessage:a}=(0,Se.YB)(),s=[o?a(ke.Z.readOnlyAnnotationFlag):"",r?a(ke.Z.locked):"",i?a(ke.Z.lockedContents):""].filter((e=>""!==e)).join(", "),l=t.grow(10);return c.createElement(Rg.Z,{referenceRect:l,viewportState:n,className:"PSPDFKit-Annotation-Flags-Popover",arrowClassName:lP().arrow},c.createElement("span",{className:lP().tooltip,"aria-label":s},s))},uP=(e,t)=>{const n=[{type:"highlight"},{type:"strikeout"},{type:"underline"},{type:"squiggle"}];return e&&n.push({type:"comment"}),t&&n.push({type:"redact-text-highlighter"}),n};var dP,pP,fP,hP,mP;function gP(e){return rt.Options.DISABLE_KEYBOARD_SHORTCUTS||e.viewportState.scrollMode===Cs.G.DISABLED?e.children:c.createElement(tg,e)}class vP extends c.Component{constructor(){super(...arguments),(0,o.Z)(this,"state",{isResizingSidebar:!1,scrollElement:null,silenceOutdatedDocumentPromptForHandle:null,filteredItems:(0,Mu.I4)(this.props.state),isAnnotationTypeReadOnlyMemoized:(0,io.Z)(((e,t)=>(0,Kn.j$)(e,this.props.state,t))),crop:null,modalClosurePreventionError:null}),(0,o.Z)(this,"_memoizedMapPagesToPageKeys",(0,io.Z)((e=>e.map((e=>e.pageKey))))),(0,o.Z)(this,"handleScrollElementChange",(e=>{this.setState({scrollElement:e})})),(0,o.Z)(this,"getScrollElement",(()=>{const{scrollElement:e}=this.state;return(0,s.kG)(e),e})),(0,o.Z)(this,"setGlobalCursor",(e=>{this.getScrollElement().style.cursor=e})),(0,o.Z)(this,"getThumbnailScale",(()=>this.props.state.containerRect.width<=Be.Fg?.55:1)),(0,o.Z)(this,"isAnnotationReadOnly",(e=>(0,Kn.lV)(e,this.props.state)||!(0,xr.CM)(e,this.props.state))),(0,o.Z)(this,"isCommentReadOnly",(e=>(0,Kn.Ez)(e,this.props.state)||!(0,xr.kR)(e,this.props.state))),(0,o.Z)(this,"reloadDocument",(()=>{const e=this.props.state.documentHandle;this.props.dispatch((0,Fw.NV)((()=>this.closeReloadDocumentModal(e)),(e=>{throw e})))})),(0,o.Z)(this,"closeReloadDocumentModal",(e=>{this.setState({silenceOutdatedDocumentPromptForHandle:e})})),(0,o.Z)(this,"_canDeleteAnnotationCP",(e=>(0,xr.Kd)(e,this.props.state))),(0,o.Z)(this,"_canDeleteCommentCP",(e=>(0,xr.Ss)(e,this.props.state))),(0,o.Z)(this,"renderSidebar",((e,t)=>{const n=this.props.state,o=this.props.state.containerRect.width-e<=t,r=n.viewportState.scrollMode===Cs.G.DISABLED;if(e<=0)return null;switch(n.sidebarMode){case gc.f.THUMBNAILS:return c.createElement(_y,{scale:this.getThumbnailScale(),width:e,selectedPageIndex:n.viewportState.currentPageIndex,closeOnPress:o,navigationDisabled:r});case gc.f.DOCUMENT_OUTLINE:return c.createElement(Qm,{outlineElements:n.documentOutlineState.elements,expanded:n.documentOutlineState.expanded,closeOnPress:o,backend:n.backend,documentHandle:n.documentHandle,navigationDisabled:r});case gc.f.ANNOTATIONS:return c.createElement(Lc,{pages:n.pages,annotations:n.annotations,comments:n.comments,commentThreads:n.commentThreads,formFields:n.formFields,isAnnotationReadOnly:this.isAnnotationReadOnly,isCommentReadOnly:this.isCommentReadOnly,selectedAnnotationIds:n.selectedAnnotationIds,sidebarOptions:n.sidebarOptions.ANNOTATIONS,closeOnPress:o,navigationDisabled:r,canDeleteAnnotationCP:this._canDeleteAnnotationCP,canDeleteCommentCP:this._canDeleteCommentCP,focusedAnnotationIds:n.focusedAnnotationIds});case gc.f.BOOKMARKS:return c.createElement(Aw,{source:n.bookmarkManager},(t=>c.createElement(Ow,{bookmarks:t,bookmarkManager:n.bookmarkManager,currentPageIndex:n.viewportState.currentPageIndex,pages:n.pages,width:e,closeOnPress:o})));case gc.f.CUSTOM:return dP||(dP=c.createElement(Ew,null));default:return null}})),(0,o.Z)(this,"_viewportEl",null),(0,o.Z)(this,"_viewportRef",(e=>{"gecko"===Ke.SR&&(e?(this._viewportEl=e,this._viewportEl.addEventListener("copy",this._copyEventHandler)):this._viewportEl&&(this._viewportEl.removeEventListener("copy",this._copyEventHandler),this._viewportEl=null))})),(0,o.Z)(this,"_copyEventHandler",(e=>{var t;if(!this._viewportEl)return;if(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;const n=(o=this._viewportEl,new Tv(null===(r=o.ownerDocument.defaultView)||void 0===r?void 0:r.getSelection(),o,Ms().selectableText)._getSelectedTextWithNL());var o,r;null===(t=e.clipboardData)||void 0===t||t.setData("text/plain",n),e.preventDefault()})),(0,o.Z)(this,"renderViewport",(e=>{var t,n;const{selectedAnnotation:o,state:r,dispatch:i}=this.props,{viewportState:a}=r,s=o&&null!==o.pageIndex&&"function"==typeof r.annotationTooltipCallback&&!r.interactionsDisabled?r.annotationTooltipCallback(o):[];return c.createElement(Lv,{dispatch:this.props.dispatch,currentTextSelection:this.props.state.currentTextSelection,selectedAnnotationIds:this.props.state.selectedAnnotationIds,activeAnnotationNote:this.props.state.activeAnnotationNote,rootElement:null===(t=this.props.state.frameWindow)||void 0===t?void 0:t.document.documentElement,interactionMode:this.props.state.interactionMode,modalClosurePreventionError:this.state.modalClosurePreventionError},c.createElement("div",{style:{position:"relative",height:"100%"}},c.createElement(Hy,{viewportState:a,scrollbarOffset:r.scrollbarOffset},c.createElement(gP,{dispatch:i,viewportState:a,hasSelectedAnnotations:this.props.state.selectedAnnotationIds.size>0,document:null===(n=r.frameWindow)||void 0===n?void 0:n.document},c.createElement(ce.Provider,null,a.scrollMode===Cs.G.PER_SPREAD?c.createElement($g,{dispatch:i,viewportState:a,hasSelection:this.props.state.selectedAnnotationIds.size>0||null!==this.props.state.currentTextSelection,scrollElement:this.state.scrollElement,interactionsDisabled:r.interactionsDisabled},this.renderViewportContent(s,e)):this.renderViewportContent(s,e))),this._isFullscreen&&this.renderExpandendNoteAnnotations(s))))})),(0,o.Z)(this,"_handleDocumentEditorCancel",(()=>{this.props.dispatch((0,Kt.sJ)())})),(0,o.Z)(this,"_closeSignatureModal",(()=>{const e={annotations:(0,i.aV)(),reason:Q.f.SELECT_END};this.props.state.eventEmitter.emit("annotations.willChange",e),this.props.dispatch((0,Kt.MV)())})),(0,o.Z)(this,"_createSignatureFromAnnotation",((e,t,n)=>{e instanceof de.Zc&&this.props.dispatch((0,bt.gX)({strokeColor:e.strokeColor}));const{signatureRect:o,signaturePageIndex:r}=this.props.state.signatureState,{attachments:i}=this.props.state;let a;if("imageAttachmentId"in e&&e.imageAttachmentId&&i.has(e.imageAttachmentId)){const t=i.get(e.imageAttachmentId);(0,s.kG)(t),a={hash:e.imageAttachmentId,attachment:t}}this.props.dispatch((0,Mw.Th)(e,{signatureRect:o,signaturePageIndex:r},a)),t&&this.props.dispatch((0,Mw.T6)(e,n)),this.props.dispatch((0,Kt.MV)())})),(0,o.Z)(this,"_createSignatureFromFile",(async(e,t,n)=>{const{signatureRect:o,signaturePageIndex:r}=this.props.state.signatureState;this.props.dispatch((0,Kt.MV)());const{hash:i,dimensions:a,attachment:s}=await(0,bt.Iv)(e);this.props.dispatch((0,Mw.l5)({hash:i,dimensions:a,attachment:s,file:e},t,n,{signatureRect:o,signaturePageIndex:r}))})),(0,o.Z)(this,"_createSignature",((e,t,n)=>{e instanceof de.q6?this._createSignatureFromAnnotation(e,t,n):this._createSignatureFromFile(e,t,n)})),(0,o.Z)(this,"_deleteStoredSignature",((e,t)=>{this.props.dispatch((0,Mw.Bm)(e,t))})),(0,o.Z)(this,"_closeStampModal",(()=>{const e={annotations:(0,i.aV)(),reason:Q.f.SELECT_END};this.props.state.eventEmitter.emit("annotations.willChange",e),this.props.dispatch((0,Kt.pM)())})),(0,o.Z)(this,"_createAnnotationFromTemplate",(e=>{this.props.dispatch((0,Kt.pM)()),this.props.dispatch((0,bt.ip)(e))})),(0,o.Z)(this,"_getAttachments",(()=>this.props.state.attachments)),(0,o.Z)(this,"_fetchDigitalSignaturesInfo",(()=>{var e;null===(e=this.props.state.backend)||void 0===e||e.getSignaturesInfo().then((e=>{this.props.dispatch((0,Qy.Y)(e))})).catch(s.vU)})),(0,o.Z)(this,"_setA11yStatusMessage",(e=>{this.props.dispatch((0,Kt.iJ)("")),window.setTimeout((()=>{this.props.dispatch((0,Kt.iJ)(e))}),200)})),(0,o.Z)(this,"isDocumentComparisonAvailable",(()=>(0,Gw.RG)(this.props.state))),(0,o.Z)(this,"handleCrop",(e=>{(0,s.kG)(this.state.crop),this.props.dispatch((0,Fw.b_)([{type:"cropPages",cropBox:this.state.crop.area,pageIndexes:e?void 0:[this.state.crop.pageIndex]}],(()=>{}),(()=>{}))),this.props.dispatch((0,Kt.Cn)())})),(0,o.Z)(this,"setCropDetails",((e,t)=>{this.setState({crop:{area:e,pageIndex:t}})})),(0,o.Z)(this,"onCropCancel",(()=>{const{dispatch:e}=this.props;e((0,Kt.Cn)())})),(0,o.Z)(this,"getToolbarComponent",(()=>{const{selectedAnnotation:e,activeAnnotationNote:t,state:n,currentTextSelection:o}=this.props,{viewportState:r,selectedAnnotationIds:i}=n,a=n.toolbarPlacement===bc.p.TOP?"top":"bottom",s=n.selectedAnnotationIds.every((e=>{const t=n.annotations.get(e);return!!t&&("isMeasurement"in t&&t.isMeasurement())}));if(n.selectedAnnotationIds.size>1&&!s)return c.createElement(rP,{selectedAnnotationIds:i});if(e&&!(0,Ze.fF)(n.interactionMode)||t){const o=e?n.pages.get(e.pageIndex):null,a=o&&o.pageSize,s=e&&n.annotationPresetIds.get(e.id),l=!(!e||!(0,xr.CM)(e,n)),u=(0,Kn.aE)(this.props.state),d=!(!e||!(0,xr.Kd)(e,n)),p=i.map((e=>n.annotations.get(e)));return c.createElement(Hd,{dispatch:this.props.dispatch,annotation:e,selectedAnnotationPageSize:a,isAnnotationReadOnly:this.isAnnotationReadOnly,variantAnnotationPresetID:s,selectedAnnotationMode:this.props.state.selectedAnnotationMode,zoomLevel:r.zoomLevel,position:n.toolbarPlacement===bc.p.TOP?"top":"bottom",eventEmitter:n.eventEmitter,frameWindow:n.frameWindow,viewportWidth:n.containerRect.width,activeAnnotationNote:t,showAnnotationNotes:this.props.state.showAnnotationNotes,canEditAnnotationCP:l,canDeleteSelectedAnnotationCP:d,areOnlyElectronicSignaturesEnabled:u,lastToolbarActionUsedKeyboard:n.lastToolbarActionUsedKeyboard,interactionMode:n.interactionMode,keepSelectedTool:this.props.state.keepSelectedTool,annotationToolbarColorPresets:n.annotationToolbarColorPresets,annotationToolbarItems:n.annotationToolbarItems,richTextEditorRef:n.richTextEditorRef,customFontsReadableNames:n.customFontsReadableNames,isCalibratingScale:n.isCalibratingScale,selectedAnnotations:p})}var l,u;return n.interactionMode===N.A.INK_ERASER?c.createElement(Jd,{dispatch:this.props.dispatch,inkEraserCursorWidth:null!==(l=null===(u=n.annotationPresets.get("ink"))||void 0===u?void 0:u.inkEraserWidth)&&void 0!==l?l:rt.Options.DEFAULT_INK_ERASER_CURSOR_WIDTH,position:a,viewportWidth:n.containerRect.width}):n.interactionMode===N.A.DOCUMENT_CROP?c.createElement(Rw,{onCropApply:this.handleCrop,onCropCancel:this.onCropCancel,position:a,isCropAreaSelected:!!this.state.crop,frameWindow:n.frameWindow}):(0,Ze.fF)(n.interactionMode)?c.createElement(pS,{position:a,interactionMode:n.interactionMode,dispatch:this.props.dispatch,frameWindow:n.frameWindow,modalClosurePreventionError:this.state.modalClosurePreventionError,selectedAnnotation:!!n.selectedAnnotationIds.size}):n.interactionMode===N.A.CONTENT_EDITOR?c.createElement(zw,{position:a,viewportWidth:n.containerRect.width,frameWindow:n.frameWindow,creationMode:n.contentEditorSession.mode===ml.wR.Create}):n.interactionMode===N.A.MEASUREMENT?c.createElement(iP,{position:a,interactionMode:n.interactionMode,viewportWidth:n.containerRect.width,frameWindow:n.frameWindow,disablePointSnapping:n.viewportState.disablePointSnapping,backend:n.backend}):c.createElement(Pg,{dispatch:this.props.dispatch,isAnnotationTypeReadOnly:this.state.isAnnotationTypeReadOnlyMemoized,position:n.toolbarPlacement===bc.p.TOP?"top":"bottom",showComments:(0,ol.oK)(n),showRedactions:this.props.state.features.includes(ee.q.REDACTIONS),inlineTextSelectionToolbarItems:n.inlineTextSelectionToolbarItems,currentTextSelection:o})})),(0,o.Z)(this,"handleSidebarResize",(e=>{let{sidebarRect:t,isDragging:n,size:o}=e;const r=(0,cS.p)(this.props.state,t,o);this.props.dispatch((0,mc.dx)(r,!1)),this.setState({isResizingSidebar:n})})),(0,o.Z)(this,"handleResizeHelperResize",((e,t)=>{const n=this.props.state,o=e.width,r=n.containerRect.width===n.sidebarWidth,i=!r&&o-n.sidebarWidth<200;let a;n.sidebarMode&&!i?r?(a=e.set("width",o).set("left",0),this.props.dispatch((0,mc.Pt)(o))):a=e.set("width",o-n.sidebarWidth).set("left",n.sidebarPlacement===vc.d.START?n.sidebarWidth:0):(a=e,n.sidebarMode&&i&&this.props.dispatch((0,Kt.mu)())),this.props.dispatch((0,mc.dx)(a,t))}))}renderViewportContent(e,t){const{selectedAnnotation:n,state:o,dispatch:r,currentTextSelection:a}=this.props,{viewportState:s,interactionsDisabled:l,interactionMode:u,formFields:d,frameWindow:p,eventEmitter:f,locale:h,scrollElement:m,measurementToolState:g,contentEditorSession:{fontMismatchTooltip:v,textBlockInteractionState:y},selectedAnnotationIds:b}=o;let S=null;if(o.interactionMode!==N.A.TEXT_HIGHLIGHTER&&!o.interactionsDisabled&&a&&!t(de.On)&&o.inlineTextMarkupToolbar){const e=(0,ol.oK)(this.props.state),n=this.props.state.features.includes(ee.q.REDACTIONS);S=(this.props.state.inlineTextSelectionToolbarItems?this.props.state.inlineTextSelectionToolbarItems({defaultItems:uP(e,n),hasDesktopLayout:!1},a):uP(e,n)).length>0?c.createElement(Rg.Z,{referenceRect:(0,ji.U2)(o,a.textRange),viewportState:s,className:"PSPDFKit-Popover-Text-Markup-Toolbar"},c.createElement(Sg,{dispatch:r,isAnnotationTypeReadOnly:t,showComments:e,showRedactions:n,inlineTextSelectionToolbarItems:this.props.state.inlineTextSelectionToolbarItems,currentTextSelection:a})):null}let P=null;const E=o.annotations.filter((e=>e.readOnly||e.locked||e.lockedContents)),x=o.hoverAnnotationIds.find((e=>E.has(e))),D=o.focusedAnnotationIds.find((e=>E.has(e))),C=x?E.get(x):void 0,k=D?E.get(D):void 0;let O=(0,i.aV)();const A=!!C&&(C instanceof w.Qi||(C instanceof de.Jn||C instanceof de.FV)&&C.isCommentThreadRoot);let T,F;if(C&&!A&&(O=O.push(C)),k&&(O=O.push(k)),O.size>0&&O.map((e=>{const t=(0,_.SY)(e,s.pagesRotation).apply((0,H.cr)(s,e.pageIndex).translate(s.scrollPosition.scale(s.zoomLevel)));return P=c.createElement(cP,{referenceRect:t,viewportState:s,isReadOnly:e.readOnly,isLocked:e.locked,hasLockedContents:e.lockedContents})})),T=o.viewportState.documentComparisonMode&&o.backend?c.createElement(Ww.ZP,{renderPageCallback:o.renderPageCallback,backend:o.backend,allowedTileScales:o.allowedTileScales,viewportState:o.viewportState,interactionMode:o.interactionMode,scrollElement:o.scrollElement,dispatch:r,configuration:o.viewportState.documentComparisonMode,viewportWidth:o.containerRect.width,renderPagePreview:o.renderPagePreview}):s.scrollMode===Cs.G.PER_SPREAD||s.scrollMode===Cs.G.DISABLED?c.createElement(Vg,{onCropChange:this.setCropDetails,dispatch:r,spreadIndex:(0,ys.dF)(s,s.currentPageIndex),viewportState:s,interactionMode:o.interactionMode,cropInfo:this.state.crop,pageKeys:this._memoizedMapPagesToPageKeys(o.pages),setGlobalCursor:this.setGlobalCursor}):c.createElement(Lf,{onCropChange:this.setCropDetails,dispatch:r,viewportState:s,cropInfo:this.state.crop,pageKeys:this._memoizedMapPagesToPageKeys(o.pages),setGlobalCursor:this.setGlobalCursor}),g&&o.backend&&(0,I.hj)(g.drawnAnnotationPageIndex)){var M;const e={inViewport:!0,page:o.pages.get(g.drawnAnnotationPageIndex),backend:o.backend,shouldPrerender:!0,zoomLevel:s.zoomLevel,rotation:s.pagesRotation,renderPageCallback:o.renderPageCallback,allowedTileScales:"all",documentHandle:o.documentHandle,viewportRect:s.viewportRect,forceDetailView:!1,renderPagePreview:o.renderPagePreview,isPageSizeReal:!!o.arePageSizesLoaded,inContentEditorMode:!1};let t=g.magnifierCursorPosition;const n=(0,ys.Ad)(s),r=(0,ys.dF)(s,g.drawnAnnotationPageIndex),i=(0,ys.Xk)(s,r);let a=(n-i.width)/2*s.zoomLevel;o.sidebarMode&&(a+=o.sidebarWidth);let l=0;if((0,ys.nw)(s)===Rf.X.DOUBLE){const e=(0,ys.hK)(s,g.drawnAnnotationPageIndex);if(i.height!==e.height&&(l=(i.height-e.height)/2*s.zoomLevel),g.drawnAnnotationPageIndex%2!=0){a+=(0,ys.hK)(s,g.drawnAnnotationPageIndex-1).width*s.zoomLevel}}t=null===(M=g.magnifierCursorPosition)||void 0===M?void 0:M.merge({x:g.magnifierCursorPosition.x-a,y:g.magnifierCursorPosition.y-l}),F=c.createElement(QS.B,{pageRendererComponentProps:e,viewportState:s,scrollElement:m,currentMainToolbarHeight:As.k3,className:"PSPDFKit-Measurement-Magnifier",label:g.magnifierLabel,pageIndex:g.drawnAnnotationPageIndex,cursorPosition:t,isMobile:o.containerRect.width<=Be.Fg})}const R=n?o.pages.get(n.pageIndex):null,L=R&&R.pageSize;return c.createElement(bv,{dispatch:r,viewportState:s,scrollbarOffset:o.scrollbarOffset,onScrollElementChange:this.handleScrollElementChange,scrollDisabled:o.scrollDisabled},c.createElement(Ug,{enabled:o.interactionMode===N.A.PAN&&!Ke.Ni&&!o.interactionsDisabled&&!!o.scrollElement},c.createElement("div",{className:aS().viewportContent,ref:this._viewportRef,"data-testid":"viewport"},T,(0,ol.Y7)(o)&&s.commentMode&&c.createElement(xm,{maxMentionSuggestions:o.maxMentionSuggestions,mentionableUsers:o.mentionableUsers,annotations:this.props.state.annotations,viewportState:s,selectedAnnotation:this.props.selectedAnnotation,comments:this.props.state.comments,commentThreads:this.props.state.commentThreads,dispatch:r,keepSelectedTool:this.props.state.keepSelectedTool,frameWindow:this.props.state.frameWindow,anonymousComments:this.props.state.anonymousComments})),S,P,n&&!(n instanceof w.Qi)&&e.length>0&&!this.props.noteAnnotationToModify&&c.createElement(Rg.Z,{referenceRect:(0,bi.q)((0,_.Wj)(n,s.pagesRotation,s.viewportRect.getSize()).apply((0,H.cr)(s,n.pageIndex).translate(s.scrollPosition.scale(s.zoomLevel))),s.viewportRect.getSize()),viewportState:s,className:"PSPDFKit-Popover-Annotation-Tooltip"},c.createElement(Gy,{items:e})),n&&null!==n.pageIndex&&n instanceof w.UX&&n.isMeasurement()&&o.isCalibratingScale&&c.createElement(fc.ZP,{annotation:n,isHidden:l,referenceRect:(0,bi.q)((0,_.Wj)(n,s.pagesRotation,s.viewportRect.getSize()).apply((0,H.cr)(s,n.pageIndex).translate(s.scrollPosition.scale(s.zoomLevel))),s.viewportRect.getSize()),viewportState:s,eventEmitter:f,modalClosurePreventionError:this.state.modalClosurePreventionError,setModalClosurePreventionError:e=>this.setState({modalClosurePreventionError:e}),frameWindow:p,locale:h}),n&&1===b.size&&(0,Ze.fF)(u)&&n instanceof w.x_&&c.createElement(GS,{modalClosurePreventionError:this.state.modalClosurePreventionError,setModalClosurePreventionError:e=>this.setState({modalClosurePreventionError:e}),annotation:n,isHidden:l,referenceRect:(0,bi.q)((0,_.Wj)(n,s.pagesRotation,s.viewportRect.getSize()).apply((0,H.cr)(s,n.pageIndex).translate(s.scrollPosition.scale(s.zoomLevel))),s.viewportRect.getSize()),viewportState:s,formFields:d,dispatch:r,frameWindow:p,eventEmitter:f,locale:h,isUnsavedAnnotation:n.id===this.props.state.formDesignerUnsavedWidgetAnnotation,pageSize:L,customFontsReadableNames:this.props.state.customFontsReadableNames||(0,i.l4)()}),this.renderLinkAnnotationPopover(),F,this.renderAnimatedExpandendNoteAnnotations(e),null!=v&&v.fontFace&&(null==y?void 0:y.state)===ml.FP.Active&&null!=v&&v.rect?c.createElement(nP,{referenceRect:v.rect,fontFace:v.fontFace,viewportState:s,activeTextBlock:y}):null))}getSnapshotBeforeUpdate(e){const t=e.selectedNoteAnnotations&&this.props.selectedNoteAnnotations&&0!==e.selectedNoteAnnotations.size&&e.selectedNoteAnnotations.size===this.props.selectedNoteAnnotations.size;return this._animateNoteAnnotation=!window["PSPDFKit-disable-animations"]&&!t,null}renderAnimatedExpandendNoteAnnotations(e){const t=this._isFullscreen?null:this.renderExpandendNoteAnnotations(e);return this._animateNoteAnnotation&&null!==t?c.createElement(pc.Z,null,t.map((e=>c.createElement(dc.Z,{key:`NoteAnnotationPopopver-${e.props.noteAnnotation.id}`,timeout:{enter:window["PSPDFKit-disable-animations"]?0:100,exit:window["PSPDFKit-disable-animations"]?0:150},classNames:{enter:lS().fadeEnter,enterActive:lS().fadeEnterActive,exit:lS().fadeExit,exitActive:lS().fadeExitActive}},e)))):c.createElement("div",null,t)}renderExpandendNoteAnnotations(e){var t,n,o,r;if(!this.props.state.showAnnotations||this.props.state.interactionsDisabled&&!this._isFullscreen||this.props.state.selectedAnnotationIds.size>1)return(0,i.l4)();const a=[];if(this.props.activeAnnotationNote&&(0,_.YV)(null===(t=this.props.activeAnnotationNote)||void 0===t?void 0:t.parentAnnotation)){const e=this.props.activeAnnotationNote;a.push(c.createElement(Lg,{key:`NoteAnnotationPopopver-${e.id}`,noteAnnotation:e,noteAnnotationToModify:e,viewportState:this.props.state.viewportState,dispatch:this.props.dispatch,isFullscreen:this._isFullscreen,collapseSelectedNoteContent:!1,annotationToolbarHeight:this.props.state.annotationToolbarHeight,isAnnotationReadOnly:this.isAnnotationReadOnly,autoSelect:this.props.state.selectedTextOnEdit,eventEmitter:this.props.state.eventEmitter,keepSelectedTool:this.props.state.keepSelectedTool}))}if(this.props.hoverAnnotationNote&&(0,_.YV)(null===(n=this.props.hoverAnnotationNote)||void 0===n?void 0:n.parentAnnotation)&&(!this.props.activeAnnotationNote||(null===(o=this.props.hoverAnnotationNote)||void 0===o||null===(o=o.parentAnnotation)||void 0===o?void 0:o.id)!==(null===(r=this.props.activeAnnotationNote)||void 0===r||null===(r=r.parentAnnotation)||void 0===r?void 0:r.id))){const e=this.props.hoverAnnotationNote;a.push(c.createElement(Lg,{key:`NoteAnnotationPopopver-${e.id}`,noteAnnotation:e,noteAnnotationToModify:null,viewportState:this.props.state.viewportState,dispatch:this.props.dispatch,isFullscreen:this._isFullscreen,isHover:!0,collapseSelectedNoteContent:!1,annotationToolbarHeight:this.props.state.annotationToolbarHeight,isAnnotationReadOnly:this.isAnnotationReadOnly,autoSelect:this.props.state.selectedTextOnEdit,eventEmitter:this.props.state.eventEmitter,keepSelectedTool:this.props.state.keepSelectedTool}))}return this.props.selectedNoteAnnotations&&0!==this.props.selectedNoteAnnotations.size?this.props.selectedNoteAnnotations.filter((e=>null!==e.pageIndex)).map((t=>{const n=!!this.props.selectedAnnotation&&t.id===this.props.selectedAnnotation.id;return c.createElement(Lg,{key:`NoteAnnotationPopopver-${t.id}`,noteAnnotation:t,noteAnnotationToModify:this.props.noteAnnotationToModify,viewportState:this.props.state.viewportState,dispatch:this.props.dispatch,isFullscreen:this._isFullscreen,isHover:!n,annotationToolbarHeight:this.props.state.annotationToolbarHeight,isAnnotationReadOnly:this.isAnnotationReadOnly,tools:n?e:[],collapseSelectedNoteContent:this.props.state.collapseSelectedNoteContent,autoSelect:this.props.state.selectedTextOnEdit,eventEmitter:this.props.state.eventEmitter,keepSelectedTool:this.props.state.keepSelectedTool})})).concat(a):(0,i.l4)(a)}renderLinkAnnotationPopover(){const{selectedAnnotation:e,state:t,dispatch:n,hoveredLinkAnnotation:o}=this.props,{viewportState:r,frameWindow:i,locale:a,pages:s,linkAnnotationMode:l,viewportState:{currentPageIndex:u}}=t,d=e&&e instanceof de.R1&&!l,p=!(null==o||!o.action||d),f=e?(null==e?void 0:e.pageIndex)===u:(null==o?void 0:o.pageIndex)===u;if(!p&&!d)return null;if(!f)return o&&this.props.dispatch((0,De.IP)(o.id)),null;const h=p?o:e;return c.createElement(im,{annotation:h,viewportState:r,dispatch:n,frameWindow:i,locale:a,pages:s,isHover:p})}componentDidUpdate(e){this.props.state.interactionMode!==N.A.DOCUMENT_CROP&&e.state.interactionMode===N.A.DOCUMENT_CROP&&this.setState({crop:null}),(0,Ze.fF)(e.state.interactionMode)&&!(0,Ze.fF)(this.props.state.interactionMode)&&this.props.dispatch((0,Kt.LE)(!1)),this.props.state.interactionMode!==N.A.INK_SIGNATURE&&this.props.state.interactionMode!==N.A.SIGNATURE||this.props.state.signatureState.storedSignatures||this.props.dispatch((0,Mw.de)());!(this.props.state.features.includes(ee.q.DIGITAL_SIGNATURES)&&!this.props.state.digitalSignatures&&this.props.state.connectionState.name===rs.F.CONNECTED)&&(e.state.documentHandle===this.props.state.documentHandle&&this.props.state.digitalSignatures||this.props.state.connectionState.name!==rs.F.CONNECTED)||this._fetchDigitalSignaturesInfo(),e.state.features.equals(this.props.state.features)&&e.state.backend===this.props.state.backend&&e.state.backendPermissions.equals(this.props.state.backendPermissions)&&e.state.documentPermissions.equals(this.props.state.documentPermissions)&&e.state.readOnlyEnabled===this.props.state.readOnlyEnabled&&e.state.editableAnnotationTypes.equals(this.props.state.editableAnnotationTypes)&&e.state.toolbarItems.equals(this.props.state.toolbarItems)&&e.state.showComments===this.props.state.showComments||this.setState({isAnnotationTypeReadOnlyMemoized:(0,io.Z)((e=>(0,Kn.j$)(e,this.props.state))),filteredItems:(0,Mu.I4)(this.props.state)}),this.props.selectedAnnotation&&this.props.dispatch((0,De.IP)(this.props.selectedAnnotation.id))}render(){const{selectedAnnotation:e,activeAnnotationNote:t,state:n}=this.props,{viewportState:o,isDocumentHandleOutdated:r}=n;this._isFullscreen=o.viewportRect.width<=Be.j1;const i=n.containerRect.width<=Be.Fg?n.containerRect.width:200,a=e instanceof w.Qi&&this.isAnnotationReadOnly(e)&&!this._isFullscreen,s=n.currentItemPreset&&n.annotationPresets.get(n.currentItemPreset)||{},{SIGNATURE_SAVE_MODE:l,DISABLE_KEYBOARD_SHORTCUTS:u}=rt.Options,p=n.sidebarMode&&c.createElement(zv,{initialSize:n.sidebarWidth,minWidth:i,maxWidth:n.containerRect.width,draggerSize:n.containerRect.width<=Be.Fg?0:6,onResize:this.handleSidebarResize,isRTL:n.sidebarPlacement===vc.d.END,dispatch:this.props.dispatch},this.renderSidebar),f=(e||t)&&!a||!n.interactionsDisabled&&(n.currentTextSelection||n.interactionMode===N.A.TEXT_HIGHLIGHTER)&&!n.inlineTextMarkupToolbar||n.interactionMode===N.A.INK_ERASER||n.interactionMode===N.A.DOCUMENT_CROP||n.interactionMode===N.A.CONTENT_EDITOR||n.interactionMode===N.A.MEASUREMENT||(0,Ze.fF)(n.interactionMode),h=!(!e||!(0,xr.Kd)(e,n)),m=o.documentComparisonMode&&c.createElement(eS,{position:n.toolbarPlacement===bc.p.TOP?"top":"bottom"}),g=!m&&n.enableAnnotationToolbar&&!(e&&this.props.state.commentThreads.has(e.id))&&c.createElement(pc.Z,null,f?c.createElement(dc.Z,{timeout:{exit:window["PSPDFKit-disable-animations"]?0:120,enter:window["PSPDFKit-disable-animations"]?0:100},classNames:n.toolbarPlacement===bc.p.TOP?{enter:lS().slideDownEnter,enterActive:lS().slideDownEnterActive,exit:lS().slideDownExit,exitActive:lS().slideDownExitActive}:{enter:lS().slideUpEnter,enterActive:lS().slideUpEnterActive,exit:lS().slideUpExit,exitActive:lS().slideUpExitActive}},this.getToolbarComponent()):null),v=n.digitalSignatures&&n.showSignatureValidationStatus!==eb.W.NEVER?c.createElement(dc.Z,{in:!!f,timeout:{exit:window["PSPDFKit-disable-animations"]?0:120,enter:window["PSPDFKit-disable-animations"]?0:100},classNames:n.toolbarPlacement===bc.p.TOP?{enter:lS().moveDownSignatureBarEnter,enterActive:lS().moveDownSignatureBarEnterActive,exit:lS().moveDownExit,exitActive:lS().moveDownSignatureBarExitActive}:{enter:lS().moveUpSignatureBarEnter,enterActive:lS().moveUpSignatureBarEnterActive,exit:lS().moveUpSignatureBarExit,exitActive:lS().moveUpSignatureBarExitActive}},c.createElement(Ky,{digitalSignatures:n.digitalSignatures,showSignatureValidationStatus:n.showSignatureValidationStatus})):null,y=n.signatureFeatureAvailability,b=(0,Kn.bp)(n),S=c.createElement(c.Fragment,null,n.showToolbar&&c.createElement(As.ZP,{sidebarMode:n.sidebarMode,currentPageIndex:o.currentPageIndex,debugMode:n.debugMode,dispatch:this.props.dispatch,eventEmitter:this.props.state.eventEmitter,frameWindow:n.frameWindow,interactionMode:n.interactionMode,items:this.state.filteredItems,layoutMode:o.layoutMode,maxZoomReached:o.zoomLevel>=(0,ws.Sm)(o),minZoomReached:o.zoomLevel<=(0,ws.Yo)(o),printingEnabled:(0,Kn.VT)(n),exportEnabled:(0,Kn.RZ)(n),isDocumentReadOnly:b,isAnnotationTypeReadOnly:this.state.isAnnotationTypeReadOnlyMemoized,isDocumentComparisonAvailable:this.isDocumentComparisonAvailable(),signatureFeatureAvailability:y,scrollMode:o.scrollMode,pages:n.pages,totalPages:n.totalPages,zoomMode:o.zoomMode,currentItemPreset:n.currentItemPreset,toolbarPlacement:n.toolbarPlacement,documentEditorEnabled:(0,Kn.Xr)(n),canUndo:n.isHistoryEnabled&&n.undoActions.size>0,canRedo:n.isHistoryEnabled&&n.redoActions.size>0,currentDocumentComparisonMode:o.documentComparisonMode,isContentEditorSessionDirty:n.contentEditorSession.dirty,isMultiSelectionEnabled:n.isMultiSelectionEnabled}),c.createElement(Ly,{position:n.toolbarPlacement===bc.p.TOP?"top":"bottom"},n.toolbarPlacement===bc.p.TOP?c.createElement(c.Fragment,null,m||g,v):c.createElement(c.Fragment,null,v,m||g)));return c.createElement(hc.Provider,{value:this.getScrollElement},c.createElement("div",{className:`PSPDFKit-Container PSPDFKit-browser-engine-${Ke.SR} PSPDFKit-browser-system-${Ke.By} ${Ke.Ni?"PSPDFKit-mobile-os":""} PSPDFKit-${(0,ys.s)(n.containerRect)} ${aS().root} ${n.interactionsDisabled?"interactions-disabled":""} ${null!=n.backend?"PSPDFKit-backend-"+("STANDALONE"===n.backend.type?"standalone":"server"):""} ${n.disablePullToRefresh?"overscrollDisabled":""}`},n.isDebugConsoleVisible&&c.createElement(Lm,{dispatch:this.props.dispatch}),(n.interactionMode===N.A.STAMP_PICKER||n.interactionMode===N.A.STAMP_CUSTOM)&&c.createElement(my,{onEscape:this._closeStampModal,showPicker:n.interactionMode===N.A.STAMP_PICKER},c.createElement(Ay,{onCreate:this._createAnnotationFromTemplate,backend:n.backend,onCancel:this._closeStampModal,stampAnnotationTemplates:n.stampAnnotationTemplates,dispatch:this.props.dispatch,showPicker:n.interactionMode===N.A.STAMP_PICKER,attachments:n.attachments,viewportWidth:n.containerRect.width})),(n.interactionMode===N.A.INK_SIGNATURE||n.interactionMode===N.A.SIGNATURE)&&n.signatureState.storedSignatures&&y===$o.H.LEGACY_SIGNATURES&&c.createElement(Vv,{onEscape:this._closeSignatureModal},c.createElement(dy,{onCancel:this._closeSignatureModal,onCreate:this._createSignatureFromAnnotation,onDelete:this._deleteStoredSignature,storedSignatures:n.signatureState.storedSignatures,preset:s,canStoreSignature:(null==n.signatureState.formFieldName||!n.signatureState.formFieldsNotSavingSignatures.includes(n.signatureState.formFieldName))&&l!==yc.f.NEVER,backend:n.backend,attachments:n.attachments,viewportWidth:n.containerRect.width})),(n.interactionMode===N.A.INK_SIGNATURE||n.interactionMode===N.A.SIGNATURE)&&n.signatureState.storedSignatures&&y===$o.H.ELECTRONIC_SIGNATURES&&c.createElement(ob,{onEscape:this._closeSignatureModal},c.createElement(cw,{preset:s,colorPresets:this.props.state.electronicSignatureColorPresets,frameWindow:n.frameWindow,onCreate:this._createSignature,onDelete:this._deleteStoredSignature,onCancel:this._closeSignatureModal,storedSignatures:n.signatureState.storedSignatures,hasSignaturesCreationListener:Object.keys(n.eventEmitter.listeners).includes("storedSignatures.create")||Object.keys(n.eventEmitter.listeners).includes("inkSignatures.create"),hasSignaturesDeletionListener:Object.keys(n.eventEmitter.listeners).includes("storedSignatures.delete")||Object.keys(n.eventEmitter.listeners).includes("inkSignatures.delete"),backend:n.backend,attachments:n.attachments,viewportWidth:n.containerRect.width,creationModes:n.electronicSignatureCreationModes,signingFonts:n.signingFonts,dispatch:this.props.dispatch})),n.interactionMode===N.A.MEASUREMENT_SETTINGS&&c.createElement(aP.Z,{frameWindow:n.frameWindow}),n.interactionMode===N.A.DOCUMENT_EDITOR&&c.createElement(Pw,{onCancel:this._handleDocumentEditorCancel,scale:this.getThumbnailScale()}),n.isPrinting&&c.createElement(tv,{progress:n.printLoadingIndicatorProgress,totalPages:n.totalPages}),n.isSigning&&(pP||(pP=c.createElement(av,null))),n.isApplyingRedactions&&(fP||(fP=c.createElement(dv,null))),c.createElement(mp,{connectionState:n.connectionState,resolvePassword:n.resolvePassword,isUnlockedViaModal:n.isUnlockedViaModal},n.toolbarPlacement===bc.p.TOP&&S,n.interactionMode===N.A.SEARCH&&(hP||(hP=c.createElement(Av,null))),c.createElement("div",{className:aS().main},!p&&c.createElement(_d.Z,{onResize:this.handleResizeHelperResize}),n.sidebarPlacement===vc.d.START&&p,c.createElement("div",{className:d()(aS().mainContent,this.state.isResizingSidebar&&aS().mainContentResizing)},this.renderViewport(this.state.isAnnotationTypeReadOnlyMemoized)),n.sidebarPlacement===vc.d.END&&p,p&&c.createElement(_d.Z,{onResize:this.handleResizeHelperResize})),n.toolbarPlacement===bc.p.BOTTOM&&S,n.annotationsIdsToDelete&&c.createElement(jm,{dispatch:this.props.dispatch,annotations:n.annotationsIdsToDelete.map((e=>n.annotations.get(e))).filter(Boolean),eventEmitter:n.eventEmitter,setA11yStatusMessage:this._setA11yStatusMessage}),n.showExitContentEditorDialog&&(mP||(mP=c.createElement(XS,null))),!u&&c.createElement(dg,{dispatch:this.props.dispatch,printingEnabled:(0,Kn.VT)(n),isPrinting:n.isPrinting,isTextCopyingAllowed:(0,Kn.HI)(n),selectedAnnotationsIds:this.props.editableSelectedAnnotationIds,commentThreads:this.props.state.commentThreads,getScrollElement:this.getScrollElement,canDeleteSelectedAnnotationCP:h,canUndo:n.isHistoryEnabled&&n.undoActions.size>0,canRedo:n.isHistoryEnabled&&n.redoActions.size>0,selectedAnnotation:this.props.selectedAnnotation,currentPageIndex:o.currentPageIndex,eventEmitter:n.eventEmitter,backend:n.backend,formFields:n.formFields,areClipboardActionsEnabled:n.areClipboardActionsEnabled,modalClosurePreventionError:this.state.modalClosurePreventionError,setModalClosurePreventionError:e=>{this.setState({modalClosurePreventionError:e})},annotations:n.annotations,selectedGroupId:n.selectedGroupId,annotationsGroups:n.annotationsGroups,frameWindow:n.frameWindow,isMultiSelectionEnabled:n.isMultiSelectionEnabled,contentEditorSession:n.contentEditorSession,interactionMode:n.interactionMode}),r&&this.state.silenceOutdatedDocumentPromptForHandle!==n.documentHandle&&c.createElement(Yy,{onConfirm:this.reloadDocument,onCancel:()=>this.closeReloadDocumentModal(n.documentHandle)})),c.createElement(Km,{locale:n.locale}),c.createElement(yP,{message:n.a11yStatusMessage})))}}const yP=c.memo((e=>c.createElement(q.TX,{announce:"polite",role:"status",tag:"div"},c.createElement("div",null,e.message)))),bP=(0,a.$j)((e=>{const{annotations:t,hoverAnnotationIds:n,hoverAnnotationNote:o,activeAnnotationNote:r,selectedAnnotationIds:i}=e,a=i.concat(n).map((e=>t.get(e))).filter((e=>e&&e instanceof w.Qi)),s=n.concat(n).map((e=>t.get(e))).filter((e=>e&&e instanceof w.R1)).first(),l=a.first(),c=l&&e.selectedAnnotationMode===R.o.EDITING?l:null,u=e.selectedAnnotationIds.size>0?e.annotations.get(e.selectedAnnotationIds.first()):null;return{state:e,selectedNoteAnnotations:a,noteAnnotationToModify:c,selectedAnnotation:u,activeAnnotationNote:r,hoverAnnotationNote:o,editableSelectedAnnotationIds:i.filter((t=>{const n=e.annotations.get(t);return n&&!(0,Kn.lV)(n,e)})),currentTextSelection:e.currentTextSelection,hoveredLinkAnnotation:s}}))(vP);var wP=n(64125),SP=n(84760),PP=n(92457),EP=n(84674),xP=n(31835),DP=n(75189),CP=n(57742);const kP=(0,a.$j)((function(e){return{locale:e.locale,messages:CP.ZP[e.locale]}}))(Se.Pj),OP=["Annotation","CommentAvatar"];var AP,TP=n(79329),IP=n(68138),FP=n(13394),MP=n(24382),_P=n(53678),NP=n(151),RP=n(98158),LP=n(64845),BP=n(55909),jP=n(60619),zP=(n(37940),n(37024),n(11863)),KP=n(5038),ZP=n(63632),UP=n(28028);function VP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function GP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VP(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const WP={current:(0,i.D5)()},qP={current:(0,i.D5)()},HP=new Promise((function(){})),$P="pspdfkit-lib/pspdfkit-2023.5.2.css",XP=`<style data-pspdfkit="true">\nbody, html, .${Be.re} {\n margin: 0;\n padding: 0;\n overflow: hidden;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n}\n</style>`,YP=["baseUrl","baseCoreUrl","licenseKey","disableWebAssemblyStreaming","enableAutomaticLinkExtraction","overrideMemoryLimit","customFonts","isSharePoint","isSalesforce","productId","processorEngine"];let JP,QP=null,eE=null,tE=null;function nE(){return JP}function oE(e){JP=e}function rE(e){n.p=e}function iE(e){var t;return e.baseUrl?e.baseUrl:"authPayload"in e&&"object"==typeof e.authPayload&&"string"==typeof(null===(t=e.authPayload)||void 0===t?void 0:t.accessToken)?"https://cdn.cloud.pspdfkit.com/pspdfkit-web@2023.5.2/":(0,Vl.SV)(window.document)}function aE(e){return e.baseCoreUrl?e.baseCoreUrl:iE(e)}async function sE(e){if((0,s.kG)((null==e.document||"string"==typeof e.document||e.document instanceof ArrayBuffer)&&null==e.documentId,"Preloading is only supported for Standalone mode using WASM"),QP instanceof Promise)try{return void await QP}catch(t){if(eE&&0===(0,s.$O)(e,eE).length)throw t;eE=null}eE=e,"string"==typeof e.baseUrl&&(0,_P.Pn)(e.baseUrl);rE(iE(e));const t=e.appName||e.electronAppName||(0,g.UK)()||window.location.origin,o=aE(e);e.processorEngine&&(JP=mE({baseUrl:o,mainThreadOrigin:t,licenseKey:e.licenseKey,processorEngine:e.processorEngine,customFonts:e.customFonts,dynamicFonts:e.dynamicFonts,fontSubstitutions:e.fontSubstitutions})),QP=async function(e){const t=iE(e),o=aE(e),r=GP(GP({},e),{},{baseUrl:t,baseCoreUrl:o});rE(t),tE||(tE=await Promise.all([n.e(1620),n.e(3610)]).then(n.bind(n,49136)));const{corePool:i,validateStandaloneConfiguration:a,normalizeCoreOptions:s,loadModule:l}=tE;a(r);const c=s(r),{object:u,checkIn:d}=i.checkOut();await l(u,c),d()}(e),await Promise.all([QP,JP])}async function lE(e){Ke.fq&&new s.p2("Starting 2022.5.0, we no longer support Internet Explorer 11."),Ke.rO&&new s.p2("Starting 2023.2.0, we no longer support Microsoft Edge 18."),"disableWebAssembly"in e&&e.disableWebAssembly&&(0,s.a1)("The 'disableWebAssembly' option is deprecated. It will be removed in a future release as we are removing support for ASM.js.");const t={current:!0};let o=null;if(!0!==e.headless){o=dE(e),(0,s.kG)(!WP.current.has(o),"Configuration#container is already used to mount a PSPDFKit for Web instance. \n\nEither use PSPDFKit.unload(container) before loading again or use a different container.");const n=o;WP.current=WP.current.set(o,(function(){t.current=!1,WP.current=WP.current.delete(n)}))}try{var u,h,E,x,D;if(QP instanceof Promise)try{await QP}catch(t){if(eE&&0===(0,s.$O)(e,eE).length)throw t;eE=null}else QP=Promise.resolve();let o;const A=iE(e);if(rE(A),!t.current)return HP;if("document"in e&&e.document){var C;if(!e.processorEngine&&null!==(C=eE)&&void 0!==C&&C.processorEngine&&(e.processorEngine=Hl.l.fasterProcessing),null!=eE){const t=(0,s.$O)(eE,e,{keys:YP});(0,s.kG)(0===t.length,"The configuration object passed to PSPDFKit is different from the one given previously\n"+(0,s.GB)(t))}eE=e;{var O;tE||(tE=await Promise.all([n.e(1620),n.e(3610)]).then(n.bind(n,49136)));const t=null===(O=tE)||void 0===O?void 0:O.default;o=new t(GP(GP({},e),{},{baseCoreUrl:aE(e)}))}e.autoSaveMode||(e.autoSaveMode=S.u.IMMEDIATE),(e.appName&&(0,g.d)()||e.electronAppName)&&(e.electronAppName&&((0,s.ZK)("The `Configuration.electronAppName` option is deprecated and will be removed in a future version. Please use `appName` instead."),(0,s.kG)((0,g.d)(),"`electronAppName` should only be set when using Electron.")),(0,UP.t0)(e.appName||e.electronAppName,e.productId))}if("documentId"in e&&e.documentId||"authPayload"in e&&"object"==typeof e.authPayload&&"string"==typeof(null===(u=e.authPayload)||void 0===u?void 0:u.accessToken)){const t=(await Promise.all([n.e(1620),n.e(6377)]).then(n.bind(n,16288))).default;o=new t(e),e.autoSaveMode||(e.autoSaveMode=e.instant?S.u.IMMEDIATE:S.u.INTELLIGENT)}if(!t.current)return o&&o.destroy(),HP;if(!o)throw new s.p2("Backend could not be inferred. Please add one of the following properties to the configuration:\n - `document` to load document and render the document client-side.\n - `documentId` to connect to PSPDFKit Server and render the document server-side.\n");if(e.autoSaveMode&&e.autoSaveMode!==S.u.INTELLIGENT&&e.autoSaveMode!==S.u.IMMEDIATE&&e.autoSaveMode!==S.u.DISABLED)throw new s.p2("The supplied autoSaveMode is not valid.\nValid `autoSaveMode`s are: PSPDFKit.AutoSaveMode.INTELLIGENT, PSPDFKit.AutoSaveMode.IMMEDIATE or PSPDFKit.AutoSaveMode.DISABLED");if(e.printOptions||(e.printOptions={}),e.printOptions&&e.printOptions.mode&&!Object.prototype.hasOwnProperty.call($l.X,e.printOptions.mode))throw new s.p2("The supplied mode in printOptions is not valid.\nValid `printMode`s are: PSPDFKit.PrintMode.DOM, PSPDFKit.PrintMode.EXPORT_PDF");if(e.printOptions&&e.printOptions.quality&&!Object.prototype.hasOwnProperty.call(Xl.g,e.printOptions.quality))throw new s.p2("The supplied quality in printOptions is not valid.\nValid `printOptions.quality`s are: PSPDFKit.PrintQuality.LOW, PSPDFKit.PrintQuality.MEDIUM, PSPDFKit.PrintQuality.HIGH");if(e.printMode&&(0,s.ZK)("Configuration.printMode has been deprecated and will be removed in the next major version. Please refer to the migration guide in order to keep the desired behavior."),e.printMode&&!e.printOptions.mode){if(!Object.prototype.hasOwnProperty.call($l.X,e.printMode))throw new s.p2("The supplied printMode is not valid.\nValid `printMode`s are: PSPDFKit.PrintMode.DOM, PSPDFKit.PrintMode.EXPORT_PDF");e.printOptions.mode=e.printMode}"disableHighQualityPrinting"in e&&((0,s.ZK)("Configuration.disableHighQualityPrinting has been deprecated and will be removed in the next major version. Please refer to the migration guide in order to keep the desired behavior."),cE(e,"disableHighQualityPrinting"),e.disableHighQualityPrinting&&"boolean"==typeof e.disableHighQualityPrinting&&!e.printOptions.quality&&("STANDALONE"!==o.type||"ios"!==Ke.By&&"android"!==Ke.By?e.printOptions.quality=e.disableHighQualityPrinting?Xl.g.MEDIUM:Xl.g.HIGH:e.printOptions.quality=Xl.g.MEDIUM));let T,I=null;if(e.electronicSignatures){if(e.electronicSignatures.creationModes){if(!Array.isArray(e.electronicSignatures.creationModes)||!e.electronicSignatures.creationModes.length)throw new s.p2("PSPDFKit.Configuration.electronicSignatures#creationModes must be a non-empty array if specified.");if(e.electronicSignatures.creationModes.some((e=>!Object.keys(Yb.M).includes(e))))throw new s.p2("PSPDFKit.Configuration.electronicSignatures#creationModes only accepts PSPDFKit.ElectronicSignatureCreationMode values.")}if(e.electronicSignatures.fonts){if(!Array.isArray(e.electronicSignatures.fonts)||!e.electronicSignatures.fonts.length)throw new s.p2("PSPDFKit.Configuration.electronicSignatures#fonts must be a non-empty array if specified.");if(e.electronicSignatures.fonts.some((e=>!(e instanceof uc.Z))))throw new s.p2("PSPDFKit.Configuration.electronicSignatures#fonts only accepts PSPDFKit.Font values.")}if(e.electronicSignatures.forceLegacySignaturesFeature&&"boolean"!=typeof e.electronicSignatures.forceLegacySignaturesFeature)throw new s.p2("PSPDFKit.Configuration.electronicSignatures#forceLegacySignaturesFeature only accepts boolean values.");if(void 0!==e.electronicSignatures.setDefaultTypeText)if("function"==typeof e.electronicSignatures.setDefaultTypeText)I=e.electronicSignatures.setDefaultTypeText;else{if("string"!=typeof e.electronicSignatures.setDefaultTypeText)throw new s.p2("PSPDFKit.Configuration.electronicSignatures#setDefaultTypeText must be a function or a string if provided.");{const t=e.electronicSignatures.setDefaultTypeText;I=()=>t}}}cE(e,"disableForms"),uE(e,"annotationTooltipCallback"),cE(e,"disableTextSelection"),cE(e,"preventTextCopy"),uE(e,"renderPageCallback"),function(e,t){if(e[t]){if(!Array.isArray(e[t]))throw new s.p2(`${t} must be an array of annotation types.`);if(!e[t].every((e=>e&&e.prototype&&(e.prototype instanceof cc.Z||e==cc.Z))))throw new s.p2(`${t} must be an array of annotation types.`)}}(e,"editableAnnotationTypes"),uE(e,"isEditableAnnotation"),uE(e,"isEditableComment"),uE(e,"dateTimeString"),uE(e,"annotationToolbarColorPresets"),uE(e,"annotationToolbarItems"),uE(e,"onWidgetAnnotationCreationStart"),uE(e,"inlineTextSelectionToolbarItems"),uE(e,"onCommentCreationStart"),uE(e,"measurementValueConfiguration"),"mentionableUsers"in e&&((0,s.kG)(Array.isArray(e.mentionableUsers),"mentionableUsers must be an array"),e.mentionableUsers.forEach(zP.vQ)),(0,s.um)(`PSPDFKit for ${(0,g.d)()?"Electron":"Web"} 2023.5.2 (https://pspdfkit.com/web)`);try{T=(0,Gl.z5)(e.locale||navigator.language)}catch(e){T="en"}if(e.populateInkSignatures&&"function"!=typeof e.populateInkSignatures)throw new s.p2("populateInkSignatures must be a function.");if(e.populateStoredSignatures&&"function"!=typeof e.populateStoredSignatures)throw new s.p2("populateStoredSignatures must be a function.");if(null!=e.maxPasswordRetries&&"number"!=typeof e.maxPasswordRetries)throw new s.p2("maxPasswordRetries must be a number.");if(e.formFieldsNotSavingSignatures&&(!Array.isArray(e.formFieldsNotSavingSignatures)||e.formFieldsNotSavingSignatures.some((e=>"string"!=typeof e))))throw new s.p2("formFieldsNotSavingSignatures must be an array of strings.");let F,M,_,R=new y.Z;e.disableOpenParameters||(R=(0,lc.s)(R)),e.initialViewState&&(R=e.initialViewState,R=(0,sc.F3)(R,null)),e.customRenderers&&(F=function(e){for(const t in e)e.hasOwnProperty(t)&&((0,s.kG)(OP.includes(t),`'${t}' is not a custom renderable entity. Custom renderable entities are: ${OP.join(", ")}`),(0,s.kG)("function"==typeof e[t],`'${t}' custom renderer must be a function.`));return e}(e.customRenderers)),e.customUI&&(M=(0,TP.a)(e.customUI)),(0,s.kG)("number"==typeof rt.Options.DEFAULT_INK_ERASER_CURSOR_WIDTH&&rt.Options.DEFAULT_INK_ERASER_CURSOR_WIDTH>=0,"PSPDFKit.Options.DEFAULT_INK_ERASER_CURSOR_WIDTH must be set to a positive number."),(0,s.kG)(!e.isAPStreamRendered||"function"==typeof e.isAPStreamRendered,"When provided, `configuration.isAPStreamRendered` must be a function."),(0,s.kG)(!e.enableRichText||"function"==typeof e.enableRichText,"When provided, `configuration.enableRichText` must be a function."),(0,s.kG)("boolean"==typeof e.enableHistory||void 0===e.enableHistory,"When provided, `configuration.enableHistory` must be a boolean value."),(0,s.kG)("boolean"==typeof e.enableClipboardActions||void 0===e.enableClipboardActions,"When provided, `configuration.enableClipboardOperations` must be a boolean value."),e.unstable_inkEraserMode&&((0,s.kG)(Object.keys(da.b).includes(e.unstable_inkEraserMode),"`unstable_inkEraserMode` must be one of: `PSPDFKit.unstable_InkEraserMode.POINT` or `PSPDFKit.unstable_InkEraserMode.STROKE`"),_=e.unstable_inkEraserMode),(0,s.kG)("boolean"==typeof e.measurementSnapping||void 0===e.measurementSnapping,"When provided, `configuration.measurementSnapping` must be a boolean value."),(0,s.kG)("string"==typeof e.measurementPrecision||void 0===e.measurementPrecision,"When provided, `configuration.measurementPrecision` must be a string."),(0,s.kG)(e.measurementScale instanceof Ja.Z||void 0===e.measurementScale,"When provided, `configuration.measurementScale` must be an instance of `MeasurementScale`."),(0,s.kG)("boolean"==typeof e.anonymousComments||void 0===e.anonymousComments||!0===e.anonymousComments&&"STANDALONE"!==o.type,"When provided, `configuration.anonymousComments` must be used only with PSPDFKit Server and be a boolean value."),(0,s.kG)("boolean"==typeof e.disableMultiSelection||void 0===e.disableMultiSelection,"When provided, `configuration.disableMultiSelection` must be a boolean value."),(0,s.kG)("number"==typeof e.autoCloseThreshold||void 0===e.autoCloseThreshold,"When provided, `configuration.autoCloseThreshold` must be a number.");const L=GP(GP({backend:o,autoSaveMode:e.autoSaveMode,printMode:null===(h=e.printOptions)||void 0===h?void 0:h.mode,printQuality:null===(E=e.printOptions)||void 0===E?void 0:E.quality,showComments:!!R.showComments,showAnnotationNotes:!!R.showAnnotationNotes,printingEnabled:R.allowPrinting,exportEnabled:R.allowExport,readOnlyEnabled:R.readOnly?te.J.VIA_VIEW_STATE:te.J.NO,formsEnabled:!e.disableForms,formDesignMode:!e.disableForms&&R.formDesignMode,showAnnotations:R.showAnnotations,eventEmitter:new xP.Z,locale:T,clientPermissions:new w.uh({extract:!e.disableTextSelection,preventTextCopy:!!e.preventTextCopy,printHighQuality:(null===(x=e.printOptions)||void 0===x?void 0:x.quality)===Xl.g.HIGH}),signatureState:new w.dp({populateStoredSignatures:e.populateStoredSignatures||e.populateInkSignatures,formFieldsNotSavingSignatures:(0,i.l4)(e.formFieldsNotSavingSignatures||[])}),renderPageCallback:e.renderPageCallback,annotationTooltipCallback:e.annotationTooltipCallback?t=>{var n;const o=null===(n=e.annotationTooltipCallback)||void 0===n?void 0:n.call(e,t);return null==o||o.forEach((e=>{(0,oc.G)(e)})),o}:null,sidebarMode:R.sidebarMode,sidebarOptions:R.sidebarOptions,sidebarPlacement:R.sidebarPlacement,isEditableAnnotation:e.isEditableAnnotation,isEditableComment:e.isEditableComment,customRenderers:F},M?{customUIStore:new p.Z(M)}:null),{},{toolbarPlacement:e.toolbarPlacement,showSignatureValidationStatus:R.showSignatureValidationStatus||eb.W.NEVER,previewRedactionMode:R.previewRedactionMode,keepSelectedTool:R.keepSelectedTool,isAPStreamRendered:e.isAPStreamRendered,restrictAnnotationToPageBounds:e.restrictAnnotationToPageBounds,electronicSignatureCreationModes:(0,i.hU)(e.electronicSignatures&&e.electronicSignatures.creationModes||NP.Z),signingFonts:(0,i.hU)(e.electronicSignatures&&e.electronicSignatures.fonts||SP.Z),isHistoryEnabled:!!e.enableHistory,areClipboardActionsEnabled:!!e.enableClipboardActions,onOpenURI:e.onOpenURI,onAnnotationResizeStart:e.onAnnotationResizeStart,canScrollWhileDrawing:R.canScrollWhileDrawing,dateTimeString:e.dateTimeString,annotationToolbarColorPresets:e.annotationToolbarColorPresets,annotationToolbarItems:e.annotationToolbarItems,onWidgetAnnotationCreationStart:e.onWidgetAnnotationCreationStart,inkEraserMode:_,firstCurrentPageIndex:R.currentPageIndex,arePageSizesLoaded:"STANDALONE"!==o.type||!1,inlineTextSelectionToolbarItems:e.inlineTextSelectionToolbarItems,measurementSnapping:e.measurementSnapping,measurementPrecision:e.measurementPrecision,measurementScale:e.measurementScale,measurementValueConfiguration:e.measurementValueConfiguration,anonymousComments:e.anonymousComments,enableRichText:e.enableRichText,maxMentionSuggestions:"maxMentionSuggestions"in e&&e.maxMentionSuggestions||void 0,mentionableUsers:"mentionableUsers"in e&&e.mentionableUsers||[],isMultiSelectionEnabled:!e.disableMultiSelection,defaultAutoCloseThreshold:e.autoCloseThreshold,onCommentCreationStart:e.onCommentCreationStart,electronicSignatureDefaultTextCallback:I});let j,z,K=Promise.resolve();if(!0===e.headless)j=jl(GP(GP({},L),{},{frameWindow:window}));else if([j,K,z]=await async function(e,t,n,o,u){var p;const h=dE(o);if(h.childNodes.length>0)throw new s.p2('`Configuration#container` is expected to be an empty element but instead it contains child nodes.\nTo fix this, please make sure that the container is empty (e.g. by using an empty div `<div id="PSPDFKit"><div>`');if(o.styleSheets&&!(o.styleSheets instanceof Array))throw new s.p2("styleSheets must either be an Array of strings");let g=[];const v=window.getComputedStyle(h).getPropertyValue("width"),y=window.getComputedStyle(h).getPropertyValue("height");if(!v||v&&"0px"===v)throw new s.p2("The mounting container has no width.\n PSPDFKit for Web adapts to the dimensions of this element and will require this to be set. You can set it to 100% to adopt to the dimensions of the parent node.");if(!y||y&&"0px"===y)throw new s.p2("The mounting container has no height.\n PSPDFKit for Web adapts to the dimensions of this element and will require this to be set. You can set it to 100% to adopt to the dimensions of the parent node.");if(o.theme){if("string"!=typeof o.theme||!IP.Q[o.theme])throw new s.p2("Invalid theme. Configuration#theme must be a valid PSPDFKit.Theme");(o.theme===IP.Q.DARK||o.theme===IP.Q.AUTO&&window.matchMedia("(prefers-color-scheme: dark)").matches)&&g.push(`${t}pspdfkit-lib/dark-${m()}.css`)}o.styleSheets&&(g=g.concat(o.styleSheets));let S=Be.cY;null!=o.minDefaultZoomLevel&&((0,s.kG)("number"==typeof o.minDefaultZoomLevel&&o.minDefaultZoomLevel>0,"minDefaultZoomLevel must be a number greater than 0"),S=o.minDefaultZoomLevel);let E=Be.QS;null!=o.maxDefaultZoomLevel&&((0,s.kG)("number"==typeof o.maxDefaultZoomLevel&&o.maxDefaultZoomLevel>0,"maxDefaultZoomLevel must be a number greater than 0"),E=o.maxDefaultZoomLevel);(0,s.kG)(E>=S,`maxDefaultZoomLevel (${E}) must be greater than or equal to minDefaultZoomLevel (${S}). If you didn't set one of those values, then the default value was used.`);const x=b.UL.fromClientRect(h.getBoundingClientRect()).setLocation(new b.E9),D=new w.Vk({currentPageIndex:u.currentPageIndex,disablePointSnapping:u.disablePointSnapping,zoomLevel:"number"==typeof u.zoom?u.zoom:1,zoomMode:"number"==typeof u.zoom?Ss.c.CUSTOM:u.zoom,pagesRotation:(0,vr.n5)(u.pagesRotation),layoutMode:u.layoutMode,scrollMode:u.scrollMode,pageSpacing:u.pageSpacing,spreadSpacing:u.spreadSpacing,keepFirstSpreadAsSinglePage:u.keepFirstSpreadAsSinglePage,viewportPadding:new b.E9({x:u.viewportPadding.horizontal,y:u.viewportPadding.vertical}),minDefaultZoomLevel:S,maxDefaultZoomLevel:E});let C=PP.ZP.toJS();o.toolbarItems&&(C=o.toolbarItems,C=C.map((e=>"ink-signature"===e.type?((0,s.a1)("The 'ink-signature' toolbar item type has been renamed to 'signature'. The 'ink-signature' identifier will be removed on a future release of PSPDFKit for Web."),GP(GP({},e),{},{type:"signature"})):e)).filter((e=>{var t;return"content-editor"!==e.type||"SERVER"!==(null===(t=n.backend)||void 0===t?void 0:t.type)||((0,s.ZK)("The 'content-editor' toolbar item type is not supported in the Server backend: Content Editing is only available in Standalone."),!1)})),C.forEach(nc.G));let k=EP.Z.toJS();o.documentEditorFooterItems&&(k=o.documentEditorFooterItems,k.forEach(rc.G));let O=RP.Z.toJS();o.documentEditorToolbarItems&&(O=o.documentEditorToolbarItems,O.forEach(ic.G));let A=X.ZP.toObject();A.ink.inkEraserWidth=rt.Options.DEFAULT_INK_ERASER_CURSOR_WIDTH,o.annotationPresets&&(A=o.annotationPresets,Object.values(A).forEach(tc.G));let T=wP.ZP;o.stampAnnotationTemplates&&Array.isArray(o.stampAnnotationTemplates)&&(T=o.stampAnnotationTemplates,T.forEach(ac.wB));"mentionableUsers"in o&&((0,s.kG)(Array.isArray(o.mentionableUsers),"mentionableUsers must be an array"),o.mentionableUsers.forEach(zP.vQ));"maxMentionSuggestions"in o&&(0,s.kG)("number"==typeof o.maxMentionSuggestions&&o.maxMentionSuggestions>0,"maxMentionSuggestions must be a number greater than 0");Object.isFrozen(rt.Options)||(rt.W!==rt.Options.COLOR_PRESETS&&(0,f.XV)("Options.COLOR_PRESETS","PSPDFKit#Customisation.AnnotationToolbarColorPresets",!0),(0,rt.n)(rt.Options),Object.freeze(rt.Options));const I=function(){const e=document.createElement("div");return e.className="PSPDFKit-Container",e.style.width="100%",e.style.height="100%",e}();let F,M;if(h.appendChild(I),pE(h,(function(){const{parentNode:e}=I;e&&e.removeChild(I)})),[F,M]=await async function(e,t,n,o){let r,i;const a=new Promise((function(e,t){r=e,i=t}));let s;if(o){let e;try{e=await(0,P.jK)([t+$P].concat(n).map((e=>{const n=n=>{const o=n instanceof Error;return{filename:e,css:o?null:n,isCustom:e!==t+$P}};return fetch(e,{credentials:"same-origin"}).then((e=>{if(200!==e.status)throw Error(`${e.status} ${e.statusText}`);return e.text()})).then(n).catch(n)})))}catch(t){e=t}e=e.filter((e=>null!==e.css)),s=XP+e.map((e=>{let{css:t,isCustom:n,filename:o}=e;return`<style${n?` data-source="${o}"`:""}>${t}</style>`})).join("")}else s=`<link rel="stylesheet" href="${t+$P}" data-pspdfkit="true">\n${n.map((e=>`<link rel="stylesheet" href="${e}">`)).join("\n")}\n${XP}\n`;return new Promise((t=>{const n=document.createElement("iframe");n.setAttribute("allowfullscreen","true"),n.setAttribute("title","PSPDFKit"),n.style.width="100%",n.style.height="100%",n.style.border="0",n.style.display="block",e.appendChild(n);const o=n.contentDocument;if(o){o.open(),o.write(`<!DOCTYPE html><html><head><meta charset="utf-8"><title>PSPDFKit</title></head><body><div class="${Be.re}"></div></body></html>`),o.close(),o.addEventListener("touchstart",(()=>{document.body&&(document.body.style.overscrollBehavior="none")})),o.addEventListener("touchcancel",(()=>{document.body&&(document.body.style.overscrollBehavior="inherit")})),o.addEventListener("touchend",(()=>{document.body&&(document.body.style.overscrollBehavior="inherit")}));const e=o.createRange().createContextualFragment(s);o.head.appendChild(e),fE(r,i,o),t([o,a])}}))}(I,t,g,o.enableServiceWorkerSupport||!1),!e.current)return HP;Wl(F);const _=(0,ql.bl)(F);"function"==typeof _&&pE(h,(function(){_()}));const N=(null===(p=o.electronicSignatures)||void 0===p?void 0:p.unstable_colorPresets)||LP.Z;if(0===N.length)throw new s.p2("PSPDFKit.Configuration.electronicSignatures#unstable_colorPresets should have at least one preset.");let R=null;if("customFonts"in o&&o.customFonts){const e=n.backend.getCustomFontsPromise();e.current||(e.current=(0,ed.x6)(o.customFonts)),R=await e.current}const L=jl(GP(GP({},n),{},{rootElement:h,containerRect:x,showToolbar:u.showToolbar,disablePointSnapping:u.disablePointSnapping,enableAnnotationToolbar:u.enableAnnotationToolbar,toolbarItems:(0,i.d0)(C),electronicSignatureColorPresets:N,annotationPresets:(0,i.D5)(A),stampAnnotationTemplates:Object.freeze(T),currentItemPreset:null,viewportState:D,interactionMode:null,documentEditorFooterItems:(0,i.d0)(k),documentEditorToolbarItems:(0,i.d0)(O),frameWindow:F.defaultView,sidebarWidth:x.width<=Be.Fg?x.width:rt.Options.INITIAL_DESKTOP_SIDEBAR_WIDTH,renderPagePreview:"boolean"!=typeof o.renderPagePreview||o.renderPagePreview}));if(await(0,Gl.sS)(L.getState().locale),!e.current)return HP;L.dispatch((0,Yl.t2)(new ec(L.getState,L.dispatch))),L.dispatch((0,Kt.z5)((0,H.YV)(L.getState)));const B=F.querySelector(`.${Be.re}`);return(0,s.kG)(B,"Internal PSPDFKit Error: Mount Target could not be found in contentDocument. Please contact support@pspdfkit.com"),(0,l.render)(c.createElement(a.zt,{store:L},c.createElement(kP,{onError:e=>(e.code,e)},c.createElement("div",{className:d()(Dp().withLayers,(!("CSS"in window)||!window.CSS.supports("isolation: isolate"))&&Dp().withLayersFallback)},c.createElement(r.P,null,AP||(AP=c.createElement(bP,null)))))),B),pE(h,(function(){(0,l.unmountComponentAtNode)(B)})),[L,M,R]}(t,A,L,e,R),!t.current)return HP;const Z=j.getState(),{eventEmitter:U,rootElement:V}=Z;V&&pE(V,(function(){o&&o.destroy()})),w.UX.prototype.getMeasurementDetails=function(){return Z.features.includes(ee.q.MEASUREMENT_TOOLS)||new s.p2(jP.oD),(0,k.t9)(this)};const G=new DP.Z({store:j,backend:o,eventEmitter:U});if(await Ul({dispatch:j.dispatch,backend:o,getState:j.getState,password:e.password,maxPasswordRetries:!0===e.headless?0:"number"==typeof e.maxPasswordRetries?e.maxPasswordRetries:Number.POSITIVE_INFINITY,stylesheetPromise:K,formFieldValuesJSON:"STANDALONE"===o.type?"instantJSON"in e&&e.instantJSON&&e.instantJSON.formFieldValues:null,customFonts:z}),!t.current)return o&&o.destroy(),HP;let W=function(){G._destroy(),!0===e.headless&&o&&o.destroy(),qP.current=qP.current.delete(G)};V&&(W=pE(V,W)),qP.current=qP.current.set(G,W);const{features:q,formDesignMode:$,previewRedactionMode:J,documentPermissions:Q,frameWindow:ne}=j.getState();if(e.fontSubstitutions&&((0,s.kG)(v(e.fontSubstitutions),"Invalid fontSubstitutions"),o.setFontSubstitutions(e.fontSubstitutions)),Q.fillForms||Q.annotationsAndForms||rt.Options.IGNORE_DOCUMENT_PERMISSIONS?j.dispatch((0,Kt.we)(e.editableAnnotationTypes?(0,i.l4)(e.editableAnnotationTypes):(0,i.l4)(Y.Z),e.isEditableAnnotation)):j.dispatch((0,Kt.ZV)((0,i.l4)([]))),q.includes(ee.q.ELECTRONIC_SIGNATURES)&&function(e,t){const n=e.document.createRange(),o=ed.eE.map((e=>`@font-face {\n font-family: '${e.name}';\n font-style: normal;\n font-weight: ${e.weight};\n font-display: swap;\n src: url(${t}pspdfkit-lib/${e.file}.woff2) format('woff2'),\n url(${t}pspdfkit-lib/${e.file}.woff) format('woff');\n }`)).join("\n"),r=n.createContextualFragment(`<style data-pspdfkit="true">\n${o}\n </style>`);e.document.head.appendChild(r)}(ne,A),$&&!(0,Kn.ix)(j.getState()))throw j.dispatch((0,Kt.LE)(!1)),Q.annotationsAndForms||Q.fillForms?new s.p2("Widget annotation selection (`configuration.viewState.formDesignMode = true`) can only be enabled if the license includes the Form Designer component and on standalone mode or with PSPDFKit Instant."):new s.p2('Widget annotation selection (`configuration.viewState.formDesignMode = true`) can only be enabled if the current document has either the "Editing Annotations and Forms" or the "Filling Forms" permissions granted. you can override this behavior by setting the PSPDFKit.Options.IGNORE_DOCUMENT_PERMISSIONS option before initializing PSPDFKit. Please make also sure the license includes the Form Designer component and a backend that supports it.');if(J&&!q.includes(ee.q.REDACTIONS))throw j.dispatch((0,Kt.P_)(!1)),new s.p2("`configuration.viewState.previewRedactionMode = true` can only be enabled if the license includes the Redactions component.");if(e.initialViewState&&e.initialViewState.interactionMode===N.A.DOCUMENT_EDITOR&&!q.includes(ee.q.DOCUMENT_EDITING))throw j.dispatch((0,Kt.sJ)()),new s.p2(FP.I);if(e.initialViewState&&e.initialViewState.interactionMode===N.A.CONTENT_EDITOR&&!q.includes(ee.q.CONTENT_EDITING))throw j.dispatch({type:B.Qm9}),new s.p2(Il.Aq);if((0,Ze.fF)(null===(D=e.initialViewState)||void 0===D?void 0:D.interactionMode)&&!q.includes(ee.q.FORM_DESIGNER))throw j.dispatch((0,Kt.XX)()),new s.p2(BP.RB);if(e.initialViewState&&e.initialViewState.showSignatureValidationStatus!==eb.W.NEVER&&!q.includes(ee.q.DIGITAL_SIGNATURES))throw new s.p2(MP.C);if((e.documentEditorFooterItems||e.documentEditorToolbarItems)&&!q.includes(ee.q.DOCUMENT_EDITING))throw new s.p2(FP.I);if(!0!==e.headless&&!q.includes(ee.q.UI))throw j.dispatch((0,zl.sr)("Your license does not cover the configured functionality.")),new s.p2("The web UI feature is not enabled for your license key. Please contact support or sales to purchase the UI module for PSPDFKit for Web.");if(!0!==e.headless&&R.interactionMode){const e=(0,sc.eV)(R.interactionMode,Z);j.dispatch(e.onEnterAction())}return j.dispatch((0,Kt._$)(G)),G}catch(e){const{type:t,request:n}=e;throw"error"===t&&n&&/\/pspdfkit-lib\//.test(n)&&e("Failed to load pspdfkit-lib.\nMake sure you are serving all PSPDFKit library files as described in https://pspdfkit.com/guides/web/current/standalone/adding-to-your-project/#copy-the-pspdfkit-for-web-assets."),e}}function cE(e,t){if(e[t]&&"boolean"!=typeof e[t])throw new s.p2(`The type for ${t} is not valid. Must be \`true\` or \`false\`.`)}function uE(e,t){if(e[t]&&"function"!=typeof e[t])throw new s.p2(`The type for ${t} is not valid. Must be \`function\`.`)}function dE(e){const t="string"==typeof e.container?document.querySelector(e.container):e.container;if(!(t instanceof HTMLElement))throw new s.p2("`Configuration#container` must either be a valid element or a CSS selector");return t}function pE(e,t){const n=WP.current.get(e);function o(){t(),null==n||n()}return(0,s.kG)(n),WP.current=WP.current.set(e,o),o}function fE(e,t,n){const o=Array.prototype.slice.call(n.querySelectorAll('link[rel="stylesheet"]')).filter((e=>!e.dataset.loaded)).map((function(e){let t,n;e.dataset.loaded="true";const o=new Promise((function(e,o){t=e,n=o}));return e.onload=function(){t()},e.onerror=function(){const o=e.href+" could not be loaded. Make sure that the file is accessible from your webserver.";e.dataset.pspdfkit?n(new s.p2(o)):((0,s.vU)(o),t())},o}));Promise.all(o).then(e,t)}async function hE(e,t){const{licenseKey:n,electronAppName:o,productId:r,appName:i}=e;vE(e);const a=iE(e);(0,s.kG)(r!==KP.x.Salesforce,"Document conversion is not currently supported in Salesforce."),t&&(0,s.kG)(t&&Object.values(ZP.w).includes(t),"The supplied PDF/A Conformance type is not valid. Valid Conformance should be one of the following options PSPDFKit.Conformance."+Object.keys(ZP.w).join(", PSPDFKit.Conformance."));const l=await(0,Zl.D4)(a,e.document,r),c=i||o||(0,g.UK)()||window.location.origin,u=aE(e);JP||(JP=mE({baseUrl:u,mainThreadOrigin:c,customFonts:e.customFonts,dynamicFonts:e.dynamicFonts,fontSubstitutions:e.fontSubstitutions,licenseKey:n,processorEngine:e.processorEngine}));const d=await JP;return(0,s.kG)(d),await d.toPdf(l,t)}async function mE(e){let{baseUrl:t,mainThreadOrigin:o,customFonts:r,dynamicFonts:i,fontSubstitutions:a,licenseKey:s,processorEngine:l}=e;const c=await n.e(9859).then(n.bind(n,49859));try{const e=Ke.vU?c.GdPictureClientNative:c.GdPictureWorker,n=!l||l===Hl.l.fasterProcessing;return new e(GP(GP(GP({baseUrl:t,aot:n,mainThreadOrigin:o,licenseKey:s,workerSpawner:await c.getBrowserSpawner()},r?{customFonts:await(0,ed.x6)(r)}:null),i?{dynamicFonts:i}:null),a?{fontSubstitutions:v(a)?a:null}:null))}catch(e){throw e}}async function gE(e,t){const{licenseKey:n,electronAppName:o,productId:r,appName:i}=e;vE(e),(0,s.kG)(r!==KP.x.Salesforce,"Document template populate is not currently supported in Salesforce.");const a=iE(e),l=await(0,Zl.D4)(a,e.document,r),c=i||o||(0,g.UK)()||window.location.origin,u=aE(e);let d;try{return JP||(JP=mE({baseUrl:u,mainThreadOrigin:c,customFonts:e.customFonts,dynamicFonts:e.dynamicFonts,fontSubstitutions:e.fontSubstitutions,licenseKey:n,processorEngine:e.processorEngine})),d=await JP,(0,s.kG)(d),await d.populateDocumentTemplate(l,t,e.licenseKey)}catch(e){throw e}finally{var p;null===(p=d)||void 0===p||p.destroy(),oE(null)}}function vE(e){const{licenseKey:t,electronAppName:n,productId:o,appName:r}=e;"string"==typeof e.baseUrl&&(0,_P.Pn)(e.baseUrl);rE(iE(e)),(0,s.kG)(null==t||"string"==typeof t,"licenseKey must be a string value if provided. Please obtain yours from https://customers.pspdfkit.com."),"string"==typeof t&&(0,s.kG)(!t.startsWith("TRIAL-"),"You're using the npm key instead of the license key. This key is used to download the PSPDFKit for Web package via the node package manager.\n\nLeave out the license key to activate as a trial."),(r&&(0,g.d)()||n)&&((0,s.kG)(n,"The `electronAppName` option is deprecated and will be removed in a future version. Please use `appName` instead."),(0,UP.t0)(r||n,o))}},13393:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});const o=(0,n(80857).Z)("AnnotationPreset"),r=e=>{o("object"==typeof e,"`annotationPreset` is not an `object`")}},63564:(e,t,n)=>{"use strict";n.d(t,{gb:()=>y,qH:()=>g});var o=n(84121),r=n(17375),i=n(47347),a=n(35369),s=n(15973),l=n(72584),c=n(30679),u=n(80857),d=n(18146);const p=["icon"];function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e){return{desktop:["stroke-color","fill-color","opacity","line-width",e?"linecaps-dasharray":"line-style","spacer","annotation-note","delete"],mobile:["delete","annotation-note","spacer","stroke-color","fill-color","opacity","line-width",e?"linecaps-dasharray":"line-style"]}}const g=a.d0({[s.Zc.readableName]:{desktop:["stroke-color","fill-color","opacity","line-width","blend-mode","spacer","annotation-note","delete"],mobile:["delete","annotation-note","spacer","stroke-color","fill-color","opacity","line-width","blend-mode"]},[s.b3.readableName]:m(!1),[s.Xs.readableName]:m(!1),[s.o9.readableName]:m(!0),[s.om.readableName]:m(!0),[s.Hi.readableName]:m(!1),[s.On.readableName]:{desktop:["color","opacity","blend-mode","spacer","annotation-note","delete"],mobile:["delete","annotation-note","spacer","color","opacity","blend-mode"]},[s.sK.readableName]:{desktop:["opacity","counterclockwise-rotation","clockwise-rotation","spacer","annotation-note","delete"],mobile:["delete","annotation-note","spacer","opacity","counterclockwise-rotation","clockwise-rotation"]},[s.GI.readableName]:{desktop:["opacity","spacer","annotation-note","delete"],mobile:["delete","annotation-note","spacer","opacity"]},[s.x_.readableName]:{desktop:["opacity","counterclockwise-rotation","clockwise-rotation","spacer","annotation-note","delete"],mobile:["delete","counterclockwise-rotation","clockwise-rotation","annotation-note","spacer","opacity"]},[s.gd.readableName]:{desktop:["color","background-color","opacity","font","spacer","delete"],mobile:["delete","spacer","color","background-color","opacity","font"]},[d.Z.readableName]:{desktop:["fill-color","overlay-text","outline-color","opacity","spacer","annotation-note","delete","apply-redactions"],mobile:["delete","apply-redactions","annotation-note","spacer","fill-color","overlay-text","outline-color","opacity"]},[s.Qi.readableName]:{desktop:["color","note-icon","spacer","delete"],mobile:["delete","spacer","color","note-icon"]},[s.R1.readableName]:{desktop:["stroke-color","opacity","line-width","spacer","annotation-note","delete","line-style"],mobile:["delete","annotation-note","spacer","stroke-color","opacity","line-width","line-style"]},Measurement:{desktop:["back","measurementType","measurementScale","stroke-color","opacity","line-width","snapping","spacer","annotation-note","delete"],mobile:["back","measurementType","measurementScale","delete","annotation-note","spacer","stroke-color","opacity","line-width","snapping"]}}),v=(0,u.Z)("AnnotationToolbarItem");function y(e,t){var n,o,a,s;const u=g.get(t);v(u,"There are no built-in annotation toolbar items for this annotation type");const d=new Set([...null!==(n=null===(o=u.get("mobile"))||void 0===o?void 0:o.toJS())&&void 0!==n?n:[],...null!==(a=null===(s=u.get("desktop"))||void 0===s?void 0:s.toJS())&&void 0!==a?a:[]]);v((0,i.PO)(e)&&!!e,"Expected item to be an object"),e.icon&&"custom"!==e.type?v((0,l.HD)(e.icon),"Expected icon to be a string"):e.icon&&v((0,l.HD)(e.icon)||e.icon instanceof Node,"Expected icon to be a string or a Node");const{icon:f}=e,m=(0,r.Z)(e,p);(0,c.G)(h(h({},m),{},{type:"custom"})),v("type"in e&&(0,l.HD)(e.type)&&[...d,"spacer","custom"].includes(e.type),`Expected item.type to one of ${[...d,"spacer","custom"].join(", ")}`),"custom"===e.type&&(v("id"in e&&(0,l.HD)(e.id),"Expected item.id to be a string"),v("node"in e||"icon"in e,"Expected item to have either a `node` or `icon` property for custom element"))}},89835:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(35369);class r extends((0,o.WV)({readOnly:!1,downloadingAllowed:!0})){}},1053:(e,t,n)=>{"use strict";n.d(t,{G:()=>d,Z:()=>u});var o=n(84121),r=n(35369),i=n(80857),a=n(86920),s=n(44048);const l=(0,i.Z)("Bookmark"),c={id:null,pdfBookmarkId:null,name:null,sortKey:null,action:null};class u extends(r.WV(c)){}(0,o.Z)(u,"toSerializableObject",s.a),(0,o.Z)(u,"fromSerializableObject",(e=>(0,s.i)(null,e)));const d=e=>{const{name:t,sortKey:n,action:o}=e;null!=t&&l("string"==typeof t,"`name` must be a string"),null!=n&&l("number"==typeof n,"`sortKey` must be a number"),l(o instanceof a.aU,"`action` must be an instance of PSPDFKit.Actions.Action")}},98663:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(35369);class r extends((0,o.WV)({printHighQuality:!0,extract:!0,preventTextCopy:!1})){}},83634:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var o,r=n(84121),i=n(35369),a=n(47347);class s extends((0,i.WV)({r:0,g:0,b:0,transparent:!1})){constructor(e){!0!==e.transparent?super(e):super({transparent:!0})}lighter(e){(0,a.kG)("number"==typeof e&&e>=0&&e<=100,"Invalid `percent` value. Must be 0-100.");const t=255*e/100;let n=parseInt(this.r+t),o=parseInt(this.g+t),r=parseInt(this.b+t);return n=n<255?n:255,o=o<255?o:255,r=r<255?r:255,new s({r:n,g:o,b:r})}darker(e){(0,a.kG)("number"==typeof e&&e>=0&&e<=100,"Invalid `percent` value. Must be 0-100.");const t=255*e/100;let n=parseInt(this.r-t),o=parseInt(this.g-t),r=parseInt(this.b-t);return n=n>0?n:0,o=o>0?o:0,r=r>0?r:0,new s({r:n,g:o,b:r})}equals(e){return(0,a.kG)(e instanceof s||"object"==typeof e,"Invalid `color` provided. It must be an instance of Color or an RGB object."),(0,a.kG)("number"==typeof e.r&&e.r>=0&&e.r<=255,"Invalid `r` value provided. It must be an integer between 0 and 255."),(0,a.kG)("number"==typeof e.g&&e.g>=0&&e.g<=255,"Invalid `g` value provided. It must be an integer between 0 and 255."),(0,a.kG)("number"==typeof e.b&&e.b>=0&&e.b<=255,"Invalid `b` value provided. It must be an integer between 0 and 255."),!this.transparent&&!e.transparent&&this.r===e.r&&this.g===e.g&&this.b===e.b||this.transparent&&e.transparent}saturate(e){(0,a.kG)("number"==typeof e&&e>=0&&e<=100,"Invalid `percent` value. Must be 0-100.");const t=e/100,n=.3086*this.r+.6094*this.g+.082*this.b;return new s({r:Math.round(this.r*t+n*(1-t)),g:Math.round(this.g*t+n*(1-t)),b:Math.round(this.b*t+n*(1-t))})}sRGBToRGBComponent(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}relativeLuminance(){const{r:e,g:t,b:n}={r:this.r/255,g:this.g/255,b:this.b/255},{R:o,G:r,B:i}={R:this.sRGBToRGBComponent(e),G:this.sRGBToRGBComponent(t),B:this.sRGBToRGBComponent(n)};return.2126*o+.7152*r+.0722*i}contrastRatio(e){return(this.relativeLuminance()+.05)/(e.relativeLuminance()+.05)}toCSSValue(){return this.transparent?"transparent":`rgb(${this.r}, ${this.g}, ${this.b})`}toHex(){if(this.transparent)return"#00000000";let e=this.r.toString(16),t=this.g.toString(16),n=this.b.toString(16);return 1==e.length&&(e="0"+e),1==t.length&&(t="0"+t),1==n.length&&(n="0"+n),"#"+e+t+n}}o=s,(0,r.Z)(s,"BLACK",new o({r:0,g:0,b:0})),(0,r.Z)(s,"GREY",new o({r:128,g:128,b:128})),(0,r.Z)(s,"WHITE",new o({r:255,g:255,b:255})),(0,r.Z)(s,"DARK_BLUE",new o({r:36,g:131,b:199})),(0,r.Z)(s,"RED",new o({r:248,g:36,b:0})),(0,r.Z)(s,"PURPLE",new o({r:255,g:0,b:255})),(0,r.Z)(s,"PINK",new o({r:255,g:114,b:147})),(0,r.Z)(s,"GREEN",new o({r:110,g:176,b:0})),(0,r.Z)(s,"ORANGE",new o({r:243,g:149,b:0})),(0,r.Z)(s,"YELLOW",new o({r:255,g:255,b:0})),(0,r.Z)(s,"LIGHT_BLUE",new o({r:141,g:184,b:255})),(0,r.Z)(s,"LIGHT_RED",new o({r:247,g:141,b:138})),(0,r.Z)(s,"LIGHT_GREEN",new o({r:162,g:250,b:123})),(0,r.Z)(s,"LIGHT_YELLOW",new o({r:252,g:238,b:124})),(0,r.Z)(s,"BLUE",new o({r:34,g:147,b:251})),(0,r.Z)(s,"LIGHT_ORANGE",new o({r:255,g:139,b:94})),(0,r.Z)(s,"LIGHT_GREY",new o({r:192,g:192,b:192})),(0,r.Z)(s,"DARK_GREY",new o({r:64,g:64,b:64})),(0,r.Z)(s,"MAUVE",new o({r:245,g:135,b:255})),(0,r.Z)(s,"TRANSPARENT",new o({transparent:!0})),(0,r.Z)(s,"fromHex",(e=>e.length>=8&&(e.endsWith("00")||e.endsWith("00"))?o.TRANSPARENT:new o({r:parseInt(e.substr(1,2),16),g:parseInt(e.substr(3,2),16),b:parseInt(e.substr(5,2),16)})))},86071:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(83634);const r=[{color:o.Z.RED,localization:{id:"red",defaultMessage:"Red",description:"Red color"}},{color:o.Z.ORANGE,localization:{id:"orange",defaultMessage:"Orange",description:"Orange color"}},{color:o.Z.YELLOW,localization:{id:"yellow",defaultMessage:"Yellow",description:"Yellow color"}},{color:o.Z.GREEN,localization:{id:"green",defaultMessage:"Green",description:"Green color"}},{color:o.Z.DARK_BLUE,localization:{id:"darkBlue",defaultMessage:"Dark blue",description:"Dark blue color"}},{color:o.Z.BLUE,localization:{id:"blue",defaultMessage:"Blue",description:"Blue color"}},{color:o.Z.PURPLE,localization:{id:"purple",defaultMessage:"Purple",description:"Purple color"}},{color:o.Z.PINK,localization:{id:"pink",defaultMessage:"Pink",description:"Pink color"}},{color:o.Z.LIGHT_ORANGE,localization:{id:"lightOrange",defaultMessage:"Light Orange",description:"Light Orange color"}},{color:o.Z.LIGHT_YELLOW,localization:{id:"lightYellow",defaultMessage:"Light Yellow",description:"Light Yellow color"}},{color:o.Z.LIGHT_GREEN,localization:{id:"lightGreen",defaultMessage:"Light Green",description:"Light Green color"}},{color:o.Z.LIGHT_BLUE,localization:{id:"lightBlue",defaultMessage:"Light Blue",description:"Light Blue color"}},{color:o.Z.MAUVE,localization:{id:"mauve",defaultMessage:"Mauve",description:"Mauve color"}},{color:o.Z.TRANSPARENT,localization:{id:"transparent",defaultMessage:"Transparent",description:"Transparent"}},{color:o.Z.WHITE,localization:{id:"white",defaultMessage:"White",description:"White color"}},{color:o.Z.LIGHT_GREY,localization:{id:"lightGrey",defaultMessage:"Light Grey",description:"Light Grey color"}},{color:o.Z.GREY,localization:{id:"grey",defaultMessage:"Grey",description:"Grey color"}},{color:o.Z.DARK_GREY,localization:{id:"darkGrey",defaultMessage:"Dark Grey",description:"Dark Grey color"}},{color:o.Z.BLACK,localization:{id:"black",defaultMessage:"Black",description:"Black color"}}]},11721:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});class o{constructor(e){this.name=e.name,this.reason=e.reason,this.progress=e.progress}}},68218:(e,t,n)=>{"use strict";n.d(t,{Ar:()=>v,CF:()=>b,Cd:()=>_,DN:()=>u,Dn:()=>B,FP:()=>a,FQ:()=>P,G_:()=>z,I5:()=>T,IA:()=>m,JR:()=>S,Q7:()=>k,QC:()=>K,R1:()=>i,Sg:()=>l,Ts:()=>x,UL:()=>c,W4:()=>p,Y1:()=>w,YG:()=>j,_h:()=>A,a2:()=>y,aN:()=>M,aT:()=>R,jI:()=>N,lK:()=>L,mZ:()=>d,nv:()=>O,t9:()=>I,tW:()=>E,tk:()=>C,vz:()=>g,wR:()=>s,xb:()=>F,yJ:()=>D,yO:()=>h});var o=n(47347),r=n(35369);let i=function(e){return e[e.Uninitialized=0]="Uninitialized",e[e.Loading=1]="Loading",e[e.Loaded=2]="Loaded",e}({}),a=function(e){return e[e.None=0]="None",e[e.Selected=1]="Selected",e[e.Active=2]="Active",e[e.Moving=3]="Moving",e}({}),s=function(e){return e[e.Edit=0]="Edit",e[e.Create=1]="Create",e[e.Delete=2]="Delete",e}({});class l extends((0,r.WV)({x:0,y:0})){}class c extends((0,r.WV)({offset:new l,size:new l})){}class u extends((0,r.WV)({rotation:0,flipY:!1})){}class d extends((0,r.WV)({xScale:1,skew:0})){}class p extends((0,r.WV)({bold:!1,italic:!1})){}const f={regular:new p,bold:new p({bold:!0}),italic:new p({italic:!0}),boldItalic:new p({bold:!0,italic:!0})};class h extends((0,r.WV)({family:"",variant:f.regular})){}class m extends((0,r.WV)({faceRef:new h,size:0})){}class g extends((0,r.WV)({fontRef:new m,color:"#000000",effects:new d})){}class v extends((0,r.WV)({maxWidth:null,alignment:"begin",lineSpacingFactor:1})){}class y extends((0,r.WV)({top:0,bottom:0})){}class b extends((0,r.WV)({offset:new l,lineSpacing:new y})){}class w extends((0,r.WV)({begin:0,end:0,text:""})){}class S extends((0,r.WV)({unavailableFaceName:null})){}class P extends((0,r.WV)({cluster:0,offset:new l,advance:new l,text:"",control:null,lastOfSegment:!1,beginOfWord:!1,endOfWord:!1})){}class E extends((0,r.WV)({offset:new l,lineSpacing:new y,elements:(0,r.aV)()})){}class x extends((0,r.WV)({lines:(0,r.aV)()})){}class D extends((0,r.WV)({family:null,faceMismatch:null,bold:null,italic:null,size:null,xScale:null,skew:null,color:null})){}class C extends((0,r.WV)({selectionStyleInfo:null,modificationsCharacterStyle:null,modificationsCharacterStyleFaceMismatch:null})){}class k extends((0,r.WV)({id:"",initialAnchor:new l,initialGlobalEffects:new u,initialLayout:new v,anchor:new l,globalEffects:new u,layout:new v,justCreated:!1,modificationsCharacterStyle:new g,version:0,contentRect:new c,cursor:new b,selection:null,detectedStyle:new C,layoutView:new x})){}class O extends((0,r.WV)({initialTextBlocks:(0,r.aV)(),textBlocks:(0,r.aV)(),loading:!0})){}class A extends((0,r.WV)({pageIndex:0,textBlockId:"",state:a.None})){}class T extends((0,r.WV)({family:"",variants:(0,r.l4)()})){}class I extends((0,r.WV)({faceList:null,loading:!1})){}class F extends((0,r.WV)({fontFace:null,rect:null,dismissAbortController:null})){}class M extends((0,r.WV)({pageStates:(0,r.D5)(),availableFaces:new I,textBlockInteractionState:new A,sessionId:0,active:!1,dirty:!1,saving:!1,mode:s.Edit,fontMismatchTooltip:null})){}const _=e=>t=>{const n=t.contentEditorSession.pageStates.get(e);return n?n.loading?i.Loading:i.Loaded:i.Uninitialized},N=e=>t=>{const n=t.contentEditorSession.pageStates.get(e);return n?[...n.textBlocks.map((e=>e.id))]:[]},R=(e,t)=>n=>{const r=n.contentEditorSession.pageStates.get(e);(0,o.kG)(r);for(const e of r.textBlocks)if(e.id==t)return e;return null},L=e=>{const{textBlockInteractionState:t}=e.contentEditorSession;return!t||t.state!==a.Active&&t.state!==a.Selected?null:R(t.pageIndex,t.textBlockId)(e)},B=(e,t)=>n=>{const{textBlockInteractionState:o}=n.contentEditorSession;return o&&o.state===a.Active&&o.pageIndex===e&&o.textBlockId===t},j=e=>e.contentEditorSession.availableFaces,z=(e,t)=>n=>{const{textBlockInteractionState:o}=n.contentEditorSession;return o&&o.state===a.Selected&&o.pageIndex===e&&o.textBlockId===t},K=(e,t)=>n=>{const{textBlockInteractionState:o}=n.contentEditorSession;return o&&o.state===a.Moving&&o.pageIndex===e&&o.textBlockId===t}},74985:(e,t,n)=>{"use strict";n.d(t,{G:()=>l,Z:()=>a});var o=n(35369),r=n(88804);const i=(0,n(80857).Z)("CustomOverlayItem");class a extends((0,o.WV)({disableAutoZoom:!1,id:null,node:null,noRotate:!1,pageIndex:0,position:new r.E9,onAppear:null,onDisappear:null})){constructor(e){super(e)}}const s=[Node.ELEMENT_NODE,Node.TEXT_NODE,Node.COMMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE],l=e=>{const{disableAutoZoom:t,id:n,node:o,noRotate:a,pageIndex:l,position:c,onAppear:u,onDisappear:d}=e;i("boolean"==typeof t,"`disableAutoZoom` must be a `boolean`"),i("string"==typeof n,"`id` must be a `string`"),i(o instanceof Node,"`node` must be an instance of `Node`"),i(s.includes(o.nodeType),"`node.nodeType` is invalid. Expected one of "+s.join(", ")),i("boolean"==typeof a,"`noRotate` must be a `boolean`"),i("number"==typeof l,"`pageIndex` must be a `number`"),i(c instanceof r.E9,"`position` must be an instance of `PSPDFKit.Geometry.Point`"),u&&i("function"==typeof u,"`onAppear` must be a `function`"),d&&i("function"==typeof d,"`onDisappear` must be a `function`")}},81619:(e,t,n)=>{"use strict";n.d(t,{x:()=>o});const o=Object.freeze([{id:"solid",dashArray:[]},{id:"narrowDots",dashArray:[1,1]},{id:"wideDots",dashArray:[1,3]},{id:"narrowDashes",dashArray:[3,3]},{id:"wideDashes",dashArray:[6,6]}])},62e3:(e,t,n)=>{"use strict";n.d(t,{G:()=>l});var o=n(30679),r=n(80857),i=n(84674);const a=(0,r.Z)("DocumentEditorFooterItem"),s=[...i.l.map((e=>e.type)),"custom"],l=e=>{const{type:t,id:n,className:r,onPress:i,node:l}=e;a("string"==typeof t,"Mandatory `type` is either missing or not a `string`"),a(s.indexOf(t)>=0,`Invalid built-in type \`${t}\`. Choose one from ${s.join(", ")}`),"custom"===t&&(a(l,"`node` is mandatory for `custom` footer items."),a(l&&o.a.includes(l.nodeType),"`node.nodeType` is invalid. Expected one of "+o.a.join(", ")),n&&a("string"==typeof n,"`id` must be a `string`"),r&&a("string"==typeof r,"`className` must be a `string`"),i&&a("function"==typeof i,"`onPress` must be a `function`")),n&&a("string"==typeof n,"`id` must be a `string`")}},97358:(e,t,n)=>{"use strict";n.d(t,{G:()=>d});var o=n(84121),r=n(80857),i=n(98158),a=n(30679);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const c=(0,r.Z)("DocumentEditorToolbarItem"),u=[...i.L.map((e=>e.type)),"custom"],d=e=>{const{type:t}=e;c("string"==typeof t,"Mandatory `type` is either missing or not a `string`"),(0,a.G)(l(l({},e),{},{type:"custom"}),c),c(u.indexOf(t)>=0,`Invalid built-in type \`${t}\`. Choose one from ${u.join(", ")}`)}},92947:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var o=n(35369);const r={elements:null,expanded:(0,o.D5)()};class i extends((0,o.WV)(r)){}},19568:(e,t,n)=>{"use strict";n.d(t,{A:()=>c,Z:()=>l});var o=n(84121),r=n(35369);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const s={annotationsAndForms:!0,assemble:!0,extract:!0,extractAccessibility:!0,fillForms:!0,modification:!0,printHighQuality:!0,printing:!0};class l extends((0,r.WV)(s)){}const c=Object.keys(s).reduce(((e,t)=>a(a({},e),{},{[t]:t})),{})},39745:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(35369);(0,n(80857).Z)("Font");class r extends((0,o.WV)({name:null,callback:null})){constructor(e){super(e)}}},19209:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(35369);class r extends((0,o.WV)({label:"",value:""})){}},18509:(e,t,n)=>{"use strict";n.d(t,{B:()=>l,Z:()=>s});var o=n(84121);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const a={enumerable:!0,configurable:!1,writable:!1};class s{}function l(e){const t=new s;return Object.defineProperty(t,"clientId",i(i({},a),{},{value:e.clientId})),Object.defineProperty(t,"userId",i(i({},a),{},{value:e.userId})),t}},33320:(e,t,n)=>{"use strict";n.d(t,{C:()=>r});var o=n(34997);function r(){return(0,o.SK)()}},27646:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(35369);class r extends((0,o.WV)({children:(0,o.aV)(),title:"",color:null,isBold:!1,isItalic:!1,isExpanded:!1,action:null})){}},80399:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var o=n(35369),r=n(88804);const i={pageSize:new r.$u,pageIndex:0,pageLabel:"",rotation:0,inViewport:!1,textLines:null,textLineScales:null,annotationIds:(0,o.hU)(),customOverlayItemIds:(0,o.l4)(),pageKey:"",untransformedRect:new r.UL,transformedRect:new r.UL,matrix:r.sl.IDENTITY,reverseMatrix:r.sl.IDENTITY,rawPdfBoxes:{bleedBox:null,cropBox:null,mediaBox:null,trimBox:null}};class a extends((0,o.WV)(i)){}},19419:(e,t,n)=>{"use strict";n.d(t,{J:()=>l,Z:()=>s});var o=n(84121);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const a={enumerable:!0,configurable:!1,writable:!1};class s{}function l(e){const t=new s;return Object.defineProperty(t,"index",i(i({},a),{},{value:e.pageIndex})),Object.defineProperty(t,"rotation",i(i({},a),{},{value:90*e.rotation})),Object.defineProperty(t,"label",i(i({},a),{},{value:e.pageLabel})),Object.defineProperty(t,"width",i(i({},a),{},{value:e.pageSize.width})),Object.defineProperty(t,"height",i(i({},a),{},{value:e.pageSize.height})),Object.defineProperty(t,"rawPdfBoxes",i(i({},a),{},{value:i({},e.rawPdfBoxes)})),t}},73324:(e,t,n)=>{"use strict";n.d(t,{T:()=>r});var o=n(54097);const r={[n(19702).f.ANNOTATIONS]:{includeContent:[...o.J]}}},57960:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(35369);class r extends((0,o.WV)({storedSignatures:null,signatureRect:null,signaturePageIndex:null,populateStoredSignatures:()=>Promise.resolve((0,o.aV)()),formFieldsNotSavingSignatures:(0,o.l4)(),formFieldName:null})){}},49027:(e,t,n)=>{"use strict";n.d(t,{Z:()=>L,w:()=>R});var o=n(35369),r=n(88804),i=n(11721),a=n(89849),s=n(57960),l=n(56169),c=n(47852),u=n(89835),d=n(98663),p=n(19568),f=n(65872),h=n(89e3),m=n(64494),g=n(79941),v=n(151),y=n(92947),b=n(76192),w=n(39511),S=n(80440),P=n(31835),E=n(84760),x=n(67699),D=n(52842),C=n(72131),k=n(73324),O=n(68218),A=n(4132),T=n(71603),I=n(36489),F=n(79827),M=n(91859);const _={reuseState:null,backend:null,pages:(0,o.aV)(),totalPages:0,debugMode:!1,isDebugConsoleVisible:!1,rootElement:null,scrollElement:null,frameWindow:null,containerRect:new r.UL,connectionFailureReason:null,connectionState:new i.Z({name:a.F.CONNECTING}),scrollbarOffset:0,currentTextSelection:null,inlineTextMarkupToolbar:!0,annotations:(0,o.D5)(),attachments:(0,o.D5)(),formFields:(0,o.D5)(),formattedFormFieldValues:(0,o.D5)(),editingFormFieldValues:(0,o.D5)(),readOnlyEnabled:C.J.NO,formsEnabled:!0,formDesignMode:!1,showAnnotations:!0,showComments:!0,showAnnotationNotes:!0,printingEnabled:!0,exportEnabled:!0,selectedAnnotationIds:(0,o.l4)(),selectedAnnotationShouldDrag:null,selectedAnnotationMode:null,selectedTextOnEdit:!1,interactionMode:null,interactionsDisabled:!1,showToolbar:!0,enableAnnotationToolbar:!0,disablePointSnapping:!1,sidebarMode:null,sidebarOptions:k.T,sidebarPlacement:f.d.START,showSignatureValidationStatus:m.W.NEVER,hoverAnnotationIds:(0,o.l4)(),hoverAnnotationNote:null,activeAnnotationNote:null,clientsChangeCallback:()=>{},searchState:new l.Z,clientPermissions:new d.Z,backendPermissions:new u.Z,documentPermissions:new p.Z,inkEraserCursorWidth:0,isPrinting:!1,printLoadingIndicatorProgress:null,toolbarItems:(0,o.aV)(),electronicSignatureColorPresets:[],electronicSignatureDefaultTextCallback:null,annotationToolbarHeight:0,annotationPresets:(0,o.D5)(),annotationPresetIds:(0,o.D5)(),currentItemPreset:null,stampAnnotationTemplates:[],viewportState:new c.Z,annotationManager:null,bookmarkManager:null,formFieldManager:null,formFieldValueManager:null,commentManager:null,changeManager:null,searchProvider:null,autoSaveMode:b.u.IMMEDIATE,eventEmitter:new P.Z,printMode:w.X.DOM,printQuality:S.g.LOW,features:(0,o.aV)(),signatureFeatureAvailability:null,customOverlayItems:(0,o.D5)(),locale:"en",annotationCreatorName:null,signatureState:new s.Z,annotationCreatorNameReadOnly:!1,hasPassword:!1,resolvePassword:null,isUnlockedViaModal:!1,transformClientToPage:e=>e,documentOutlineState:new y.Z,annotationsIdsToDelete:null,renderPageCallback:null,annotationTooltipCallback:null,isEditableAnnotation:null,isEditableComment:null,editableAnnotationTypes:(0,o.l4)(g.Z),customRenderers:null,customUIStore:null,documentHandle:null,allowedTileScales:"all",isDocumentHandleOutdated:!1,toolbarPlacement:h.p.TOP,comments:(0,o.D5)(),commentThreads:(0,o.D5)(),isSigning:!1,isApplyingRedactions:!1,digitalSignatures:null,previewRedactionMode:!1,canScrollWhileDrawing:!1,isAPStreamRendered:()=>!0,invalidAPStreams:(0,o.D5)(),collapseSelectedNoteContent:!1,restrictAnnotationToPageBounds:!0,hasFetchedInitialRecordsFromInstant:!1,group:void 0,documentEditorFooterItems:(0,o.aV)(),electronicSignatureCreationModes:(0,o.hU)(v.Z),signingFonts:(0,o.hU)(E.Z),documentEditorToolbarItems:(0,o.aV)(),isHistoryEnabled:!1,areClipboardActionsEnabled:!1,historyChangeContext:x.j.DEFAULT,undoActions:(0,o.aV)(),redoActions:(0,o.aV)(),historyIdsMap:(0,o.D5)(),a11yStatusMessage:"",lastToolbarActionUsedKeyboard:!1,onOpenURI:null,onAnnotationResizeStart:void 0,documentComparisonState:null,keepSelectedTool:!1,instance:null,dateTimeString:null,sidebarWidth:0,annotationToolbarItems:null,focusedAnnotationIds:(0,o.l4)(),annotationToolbarColorPresets:null,renderPagePreview:!0,onWidgetAnnotationCreationStart:null,formDesignerUnsavedWidgetAnnotation:null,inkEraserMode:D.b.POINT,firstCurrentPageIndex:0,arePageSizesLoaded:null,inlineTextSelectionToolbarItems:null,measurementSnapping:!0,measurementPrecision:A.L.TWO,measurementScale:new T.Z({unitFrom:I.s.INCHES,unitTo:F.K.INCHES,fromValue:1,toValue:1}),measurementToolState:null,measurementValueConfiguration:null,measurementScales:null,APStreamVariantsRollover:(0,o.l4)(),APStreamVariantsDown:(0,o.l4)(),contentEditorSession:new O.aN,showExitContentEditorDialog:!1,linkAnnotationMode:!1,anonymousComments:!1,annotationsGroups:(0,o.D5)(),selectedGroupId:null,enableRichText:()=>!1,richTextEditorRef:null,multiAnnotationsUsingShortcut:null,disablePullToRefresh:!1,mentionableUsers:[],maxMentionSuggestions:5,isMultiSelectionEnabled:!0,widgetAnnotationToFocus:null,onCommentCreationStart:null,defaultAutoCloseThreshold:M.W3,hintLines:null,scrollDisabled:!1,customFontsReadableNames:(0,o.l4)(),secondaryMeasurementUnit:null,activeMeasurementScale:null,isCalibratingScale:!1,dynamicFonts:null},N={pages:(0,o.aV)(),annotations:(0,o.D5)(),attachments:(0,o.D5)(),formFields:(0,o.D5)(),comments:(0,o.D5)(),commentThreads:(0,o.D5)()};class R extends((0,o.WV)(N)){}class L extends((0,o.WV)(_)){}},65338:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var o=n(35369),r=n(88804);class i extends((0,o.WV)({id:null,pageIndex:null,boundingBox:new r.UL,contents:"",contentTreeElementMetadata:null})){}},30679:(e,t,n)=>{"use strict";n.d(t,{G:()=>i,a:()=>r});const o=(0,n(80857).Z)("ToolItem"),r=[Node.ELEMENT_NODE,Node.TEXT_NODE,Node.DOCUMENT_FRAGMENT_NODE],i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;const{type:n,id:i,title:a,className:s,icon:l,onPress:c,disabled:u,selected:d,node:p}=e;t("custom"===n,"Mandatory `type` is either missing or not `custom`"),p&&(t("custom"===n,"`node` is only supported for `custom` tool items."),t(r.includes(p.nodeType),"`node.nodeType` is invalid. Expected one of "+r.join(", "))),i&&t("string"==typeof i,"`id` must be a `string`"),a&&t("string"==typeof a,"`title` must be a `string`"),s&&t("string"==typeof s,"`className` must be a `string`"),l&&t("string"==typeof l,"`icon` must be a `string`"),c&&t("function"==typeof c,"`onPress` must be a `function`"),"disabled"in e&&t("boolean"==typeof u,"`disabled` must be a `boolean`"),"selected"in e&&t("boolean"==typeof d,"`selected` must be a `boolean`")}},17500:(e,t,n)=>{"use strict";n.d(t,{G:()=>u});var o=n(84121),r=n(92457),i=n(80857),a=n(30679);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const c=(0,i.Z)("ToolbarItem"),u=e=>{const{type:t,mediaQueries:n,preset:o}=e;c("string"==typeof t,"Mandatory `type` is either missing or not a `string`"),(0,a.G)(l(l({},e),{},{type:"custom"}),c),c(r._o.includes(t),`Invalid built-in type \`${t}\`. Choose one from ${r._o.join(", ")}`),n&&(c(Array.isArray(n),"`mediaQueries` must be an `array`"),c(n.length>0,"`mediaQueries` must not be an empty `array`"),n.forEach((e=>{c("string"==typeof e,`Invalid media query: \`${e}\``);const t=e.split("(").length,n=e.split(")").length;0===t&&0===n||c(t===n,`Detected unbalanced parenthesis in the media query: ${e}`)}))),"preset"in e&&c("string"==typeof o,"`preset` must be a `string`")}},34426:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var o=n(47347),r=n(35369),i=n(91859),a=n(40725),s=n(77973),l=n(47710),c=n(65872),u=n(28098),d=n(64494),p=n(73324);const f="You tried to call a function on ViewState that requires a PSPDFKit.Instance.\nThis is possible, when you use a ViewState that is obtained via Instance#viewState, Instance.setViewState or by setting the instance value of a ViewState explicitly.";class h extends((0,r.WV)({currentPageIndex:0,zoom:u.c.AUTO,zoomStep:i.V4,pagesRotation:0,layoutMode:s.X.SINGLE,scrollMode:l.G.CONTINUOUS,showToolbar:!0,enableAnnotationToolbar:!0,allowPrinting:!0,allowExport:!0,interactionMode:null,readOnly:!1,showAnnotations:!0,showComments:!0,showAnnotationNotes:!0,sidebarMode:null,sidebarOptions:p.T,sidebarPlacement:c.d.START,spreadSpacing:i.YJ,pageSpacing:i.Sk,keepFirstSpreadAsSinglePage:!1,viewportPadding:new a.Z,instance:null,formDesignMode:!1,showSignatureValidationStatus:d.W.NEVER,previewRedactionMode:!1,canScrollWhileDrawing:!1,keepSelectedTool:!1,resolvedLayoutMode:s.X.SINGLE,sidebarWidth:0,disablePointSnapping:!1})){zoomIn(){if(!this.instance)throw new o.p2(f);this.instance.zoomStep||(this.instance.zoomStep=i.V4);const{maximumZoomLevel:e}=this.instance;let t=this.instance.currentZoomLevel*this.instance.zoomStep;return t>e&&(t=e),this.set("zoom",t)}zoomOut(){if(!this.instance)throw new o.p2(f);this.instance.zoomStep||(this.instance.zoomStep=i.V4);const{minimumZoomLevel:e}=this.instance;let t=this.instance.currentZoomLevel/this.instance.zoomStep;return t<e&&(t=e),this.set("zoom",t)}rotateLeft(){return this.update("pagesRotation",(e=>(e+270)%360))}rotateRight(){return this.update("pagesRotation",(e=>(e+90)%360))}goToNextPage(){if(!this.instance)throw new o.p2(f);let e=this.currentPageIndex+1;return e>this.instance.totalPageCount-1&&(e=this.instance.totalPageCount-1),this.set("currentPageIndex",e)}goToPreviousPage(){let e=this.currentPageIndex-1;return e<0&&(e=0),this.set("currentPageIndex",e)}}},40725:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var o=n(35369),r=n(91859);class i extends((0,o.WV)({horizontal:r.Kk,vertical:r.Kk})){}},47852:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var o=n(35369),r=n(91859),i=n(77973),a=n(47710),s=n(28098),l=n(88804);const c={zoomLevel:1,zoomMode:s.c.AUTO,layoutMode:i.X.SINGLE,scrollMode:a.G.CONTINUOUS,scrollPosition:new l.E9,currentPageIndex:0,viewportRect:new l.UL,pageSizes:(0,o.aV)(),commentMode:null,pagesRotation:0,viewportPadding:new l.E9({x:r.Kk,y:r.Kk}),spreadSpacing:r.YJ,pageSpacing:r.Sk,keepFirstSpreadAsSinglePage:!1,minDefaultZoomLevel:r.cY,maxDefaultZoomLevel:r.QS,zoomStep:r.V4,lastScrollUsingKeyboard:!1,documentComparisonMode:null,disablePointSnapping:!1};class u extends(o.WV(c)){}},86920:(e,t,n)=>{"use strict";n.d(t,{D2:()=>u,Q:()=>d,aU:()=>a,co:()=>c,uV:()=>s,zR:()=>l});var o=n(84121),r=n(47347),i=n(60797);class a extends i.D{constructor(e){if(super(e),(0,o.Z)(this,"subActions",null),this.subActions=null==e?void 0:e.subActions,this.constructor===a)throw new r.p2("PSPDFKit.Actions.Action is an abstract base class and can not be instantiated")}}(0,i.V)(a);const s=1,l=1,c=2,u=3,d=4},22571:(e,t,n)=>{"use strict";n.d(t,{b:()=>a});var o=n(84121),r=n(60797),i=n(86920);class a extends i.aU{constructor(e){super(e)}}(0,o.Z)(a,"defaultValues",{script:""}),(0,r.V)(a)},89335:(e,t,n)=>{"use strict";n.d(t,{aU:()=>o.aU,Di:()=>a,Qr:()=>s,_6:()=>l,ZD:()=>u,bp:()=>d.b,b:()=>p,oH:()=>f,BO:()=>h,pl:()=>m,lm:()=>g});var o=n(86920),r=n(84121),i=n(60797);class a extends o.aU{constructor(e){super(e)}}(0,r.Z)(a,"defaultValues",{pageIndex:null}),(0,i.V)(a);class s extends o.aU{constructor(e){super(e)}}(0,r.Z)(s,"defaultValues",{newWindow:!1,relativePath:"",targetType:"parent"}),(0,i.V)(s);class l extends o.aU{constructor(e){super(e)}}(0,r.Z)(l,"defaultValues",{relativePath:"",namedDestination:""}),(0,i.V)(l);var c=n(35369);class u extends o.aU{constructor(e){super(e)}}(0,r.Z)(u,"defaultValues",{hide:!0,annotationReferences:(0,c.aV)()}),(0,i.V)(u);var d=n(22571);class p extends o.aU{constructor(e){super(e)}}(0,r.Z)(p,"defaultValues",{filePath:null}),(0,i.V)(p);class f extends o.aU{constructor(e){super(e)}}(0,r.Z)(f,"defaultValues",{action:null}),(0,i.V)(f);class h extends o.aU{constructor(e){super(e)}}(0,r.Z)(h,"defaultValues",{fields:null,includeExclude:!1}),(0,i.V)(h);class m extends o.aU{constructor(e){super(e)}}(0,r.Z)(m,"defaultValues",{uri:null,fields:null,includeExclude:!1,includeNoValueFields:!0,exportFormat:!0,getMethod:!1,submitCoordinated:!1,xfdf:!1,includeAppendSaves:!1,includeAnnotations:!1,submitPDF:!1,canonicalFormat:!1,excludeNonUserAnnotations:!1,excludeFKey:!1,embedForm:!1}),(0,i.V)(m);class g extends o.aU{constructor(e){super(e)}}(0,r.Z)(g,"defaultValues",{uri:null}),(0,i.V)(g)},32125:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var o=n(84121),r=n(47347),i=n(88804),a=n(60797);class s extends a.D{constructor(e){if(super(e),this.constructor===s)throw new r.p2("PSPDFKit.Annotations.Annotation is an abstract base class and can not be instantiated")}}(0,o.Z)(s,"defaultValues",{id:null,name:null,subject:null,pdfObjectId:null,pageIndex:null,boundingBox:new i.UL,opacity:1,action:null,note:null,creatorName:null,createdAt:new Date(0),updatedAt:new Date(0),customData:null,noPrint:!1,noZoom:!1,noRotate:!1,noView:!1,locked:!1,lockedContents:!1,readOnly:!1,hidden:!1,blendMode:"normal",additionalActions:null,isCommentThreadRoot:!1,isAnonymous:!1,group:void 0,isEditable:void 0,isDeletable:void 0,canSetGroup:void 0,canReply:void 0,APStreamCache:void 0,rotation:0}),(0,a.V)(s);const l=s},70094:(e,t,n)=>{"use strict";n.d(t,{FN:()=>u,Yu:()=>d,p1:()=>c});var o=n(84121),r=n(34997),i=n(15973),a=n(88804),s=n(88713),l=n(60797);const c=32;class u extends i.Qi{}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c;if(e){var o;const i=p(e,t,n);return new u({id:(0,r.SK)(),pageIndex:e.pageIndex,boundingBox:new a.UL({left:i.x,top:i.y,width:t,height:n}),text:{format:"plain",value:null!==(o=e.note)&&void 0!==o?o:""},parentAnnotation:e,position:i})}return new u({id:(0,r.SK)(),notePosition:new a.E9})}function p(e,t,n){let o=null;var r,l;if(e instanceof i.Zc)e.lines.isEmpty()||null!==(r=e.lines.get(0))&&void 0!==r&&r.isEmpty()||(o=null===(l=e.lines.get(0))||void 0===l?void 0:l.get(0));else if(e instanceof s.Z||e instanceof i.om){if(e.points&&e.points.size>=2){const t=e.points.get(0),n=e.points.get(1);o=new a.E9({x:(t.x+n.x)/2,y:(t.y+n.y)/2})}}else if(e instanceof i.o9){const t=e.startPoint,n=e.endPoint;o=new a.E9({x:(t.x+n.x)/2,y:(t.y+n.y)/2})}else if(e instanceof i.On)return new a.E9({x:e.boundingBox.right+4,y:e.boundingBox.getCenter().y-n/2});return o||(o=new a.E9({x:e.boundingBox.getCenter().x,y:e.boundingBox.top})),o.set("x",o.x-t/2).set("y",o.y-n/2)}(0,o.Z)(u,"defaultValues",{parentAnnotation:null,position:new a.E9,notePosition:new a.E9}),(0,l.V)(u)},73039:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var o=n(84121),r=n(35369),i=n(32125),a=n(83634),s=n(60797);class l extends i.Z{}(0,o.Z)(l,"defaultValues",{lines:(0,r.aV)(),lineWidth:5,strokeColor:a.Z.BLUE,backgroundColor:null,isDrawnNaturally:!1,isSignature:!1}),(0,o.Z)(l,"readableName","Ink"),(0,s.V)(l);const c=l},74973:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var o=n(84121),r=n(32125),i=n(60797);class a extends r.Z{}(0,o.Z)(a,"defaultValues",{description:null,fileName:null,contentType:null,mediaAttachmentId:null}),(0,o.Z)(a,"readableName","Media"),(0,i.V)(a)},65627:(e,t,n)=>{"use strict";n.d(t,{W:()=>c,Z:()=>d});var o,r=n(84121),i=n(32125),a=n(83634),s=n(18025),l=n(60797);const c=[{color:new a.Z({r:255,g:216,b:63}),localization:{id:"yellow",defaultMessage:"Yellow",description:"Yellow color"}},{color:new a.Z({r:255,g:127,b:0}),localization:{id:"orange",defaultMessage:"Orange",description:"Orange, the color"}},{color:new a.Z({r:255,g:51,b:0}),localization:{id:"red",defaultMessage:"Red",description:"Red, the color"}},{color:new a.Z({r:229,g:51,b:255}),localization:{id:"fuchsia",defaultMessage:"Fuchsia",description:"Fuchsia, the color"}},{color:new a.Z({r:0,g:153,b:255}),localization:{id:"blue",defaultMessage:"Blue",description:"Blue, the color"}},{color:new a.Z({r:114,g:255,b:0}),localization:{id:"green",defaultMessage:"Green",description:"Green, the color"}}];class u extends i.Z{}(0,r.Z)(u,"isEditable",!0),(0,r.Z)(u,"readableName","Note"),(0,r.Z)(u,"defaultValues",{text:{format:"plain",value:""},icon:s.Zi.COMMENT,color:null===(o=c.find((e=>"yellow"===e.localization.id)))||void 0===o?void 0:o.color}),(0,l.V)(u);const d=u},18146:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var o=n(84121),r=n(49200),i=n(83634),a=n(60797);class s extends r.Z{}(0,o.Z)(s,"readableName","Redaction"),(0,o.Z)(s,"defaultValues",{color:i.Z.RED,fillColor:i.Z.BLACK,outlineColor:i.Z.RED,overlayText:null,repeatOverlayText:null,rotation:0}),(0,a.V)(s)},82405:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var o=n(84121),r=n(32125),i=n(83634),a=n(60797);class s extends r.Z{isMeasurement(){return null!==this.measurementScale}}(0,o.Z)(s,"readableName","Shape"),(0,o.Z)(s,"defaultValues",{strokeWidth:5,strokeColor:i.Z.BLUE,fillColor:null,strokeDashArray:null,measurementPrecision:null,measurementScale:null}),(0,a.V)(s);const l=s},33754:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>u,a$:()=>s,k1:()=>l,pY:()=>a});var o=n(84121),r=n(32125),i=n(60797);const a={Approved:{},NotApproved:{},Draft:{},Final:{},Completed:{},Confidential:{},ForPublicRelease:{},NotForPublicRelease:{},ForComment:{},Void:{},PreliminaryResults:{},InformationOnly:{},Rejected:{},Accepted:{},InitialHere:{},SignHere:{},Witness:{},AsIs:{},Departmental:{},Experimental:{},Expired:{},Sold:{},TopSecret:{},Revised:{includeDate:!0,includeTime:!0},RejectedWithText:{includeDate:!0,includeTime:!0},Custom:{}},s={RejectedWithText:"Rejected"},l=e=>s[e]||e;class c extends r.Z{}(0,o.Z)(c,"defaultValues",{stampType:"Custom",title:null,subtitle:null,color:null,xfdfAppearanceStream:null,xfdfAppearanceStreamOriginalPageRotation:null}),(0,o.Z)(c,"readableName","Stamp"),(0,i.V)(c);const u=c},47751:(e,t,n)=>{"use strict";n.d(t,{default:()=>c});var o=n(84121),r=n(38623),i=n(32125),a=n(83634),s=n(60797);class l extends i.Z{}(0,o.Z)(l,"defaultValues",{text:{format:"plain",value:""},fontColor:a.Z.BLACK,backgroundColor:null,font:r.vt.first()||"sans-serif",fontSize:18,isBold:!1,isItalic:!1,horizontalAlign:"left",verticalAlign:"top",callout:null,borderStyle:null,borderWidth:null,borderColor:null,isFitting:!1,lineHeightFactor:null}),(0,o.Z)(l,"isEditable",!0),(0,o.Z)(l,"readableName","Text"),(0,o.Z)(l,"fontSizePresets",Object.freeze([4,6,8,10,12,14,18,24,36,48,64,72,96,144,192,200])),(0,s.V)(l);const c=l},49200:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var o=n(84121),r=n(35369),i=n(32125),a=n(83634),s=n(60797);class l extends i.Z{}(0,o.Z)(l,"defaultValues",{rects:(0,r.aV)(),color:a.Z.BLACK,blendMode:"normal"}),(0,o.Z)(l,"readableName","Text-Markup"),(0,s.V)(l);const c=l},29346:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var o=n(84121),r=n(32125),i=n(60797);class a extends r.Z{}(0,o.Z)(a,"defaultValues",{formFieldName:null,borderColor:null,borderStyle:null,borderDashArray:null,borderWidth:null,backgroundColor:null,fontSize:null,font:null,isBold:!1,isItalic:!1,fontColor:null,horizontalAlign:null,verticalAlign:null,additionalActions:null,lineHeightFactor:null}),(0,o.Z)(a,"readableName","Widget"),(0,i.V)(a);const s=a},15973:(e,t,n)=>{"use strict";n.d(t,{q6:()=>o.Z,Jn:()=>A,Xs:()=>m.Z,FV:()=>l,sK:()=>u,Zc:()=>d.Z,o9:()=>f.Z,R1:()=>b,Hu:()=>I.Z,Qi:()=>w.Z,Hi:()=>g.Z,om:()=>v.Z,b3:()=>h.Z,Wk:()=>T.Z,UX:()=>p.Z,hL:()=>S,GI:()=>P.ZP,R9:()=>E,gd:()=>x.default,On:()=>i.Z,xu:()=>D,Ih:()=>k,x_:()=>O.Z});var o=n(32125),r=n(84121),i=n(49200),a=n(83634),s=n(60797);class l extends i.Z{}(0,r.Z)(l,"className","highlight"),(0,r.Z)(l,"readableName","Highlight"),(0,r.Z)(l,"defaultValues",{blendMode:"multiply",color:a.Z.LIGHT_YELLOW}),(0,s.V)(l);class c extends o.Z{}(0,r.Z)(c,"defaultValues",{description:null,fileName:null,contentType:null,imageAttachmentId:null,isSignature:!1,xfdfAppearanceStream:null,xfdfAppearanceStreamOriginalPageRotation:null}),(0,r.Z)(c,"readableName","Image"),(0,s.V)(c);const u=c;var d=n(73039),p=n(82405),f=n(20683),h=n(87043),m=n(70076),g=n(88713),v=n(50690);class y extends o.Z{}(0,r.Z)(y,"readableName","Link"),(0,r.Z)(y,"defaultValues",{borderWidth:0,borderColor:null,opacity:1}),(0,s.V)(y);const b=y;var w=n(65627);class S extends i.Z{}(0,r.Z)(S,"className","squiggle"),(0,r.Z)(S,"readableName","Squiggle"),(0,r.Z)(S,"defaultValues",{color:a.Z.RED}),(0,s.V)(S);var P=n(33754);class E extends i.Z{}(0,r.Z)(E,"className","strikeout"),(0,r.Z)(E,"readableName","Strike Out"),(0,r.Z)(E,"defaultValues",{color:a.Z.RED}),(0,s.V)(E);var x=n(47751);class D extends i.Z{}(0,r.Z)(D,"className","underline"),(0,r.Z)(D,"readableName","Underline"),(0,r.Z)(D,"defaultValues",{color:a.Z.BLACK}),(0,s.V)(D);class C extends o.Z{}(0,s.V)(C);const k=C;var O=n(29346);class A extends o.Z{}(0,r.Z)(A,"readableName","Comment-Marker"),(0,s.V)(A);var T=n(18146),I=n(74973)},70076:(e,t,n)=>{"use strict";n.d(t,{F:()=>u,Z:()=>d});var o=n(84121),r=n(82405),i=n(88804),a=n(91859),s=n(60797);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}class c extends r.Z{constructor(e){super(u(e))}}function u(e){if(!e)return;const t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);if(Number(e.cloudyBorderIntensity)>0&&!e.cloudyBorderInset){const n=Number(e.cloudyBorderIntensity)*a.St+(e.strokeWidth||r.Z.defaultValues.strokeWidth)/2;return t.cloudyBorderInset=i.eB.fromValue(n),t}return t}(0,o.Z)(c,"defaultValues",{cloudyBorderIntensity:null,cloudyBorderInset:null,measurementBBox:null}),(0,o.Z)(c,"readableName","Ellipse"),(0,s.V)(c);const d=c},20683:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var o=n(84121),r=n(82405),i=n(88804),a=n(60797);class s extends r.Z{}(0,o.Z)(s,"defaultValues",{startPoint:new i.E9,endPoint:new i.E9,lineCaps:null}),(0,o.Z)(s,"readableName","Line"),(0,a.V)(s);const l=s},88713:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var o=n(84121),r=n(35369),i=n(82405),a=n(60797);class s extends i.Z{}(0,o.Z)(s,"defaultValues",{points:(0,r.aV)(),cloudyBorderIntensity:null}),(0,o.Z)(s,"readableName","Polygon"),(0,a.V)(s);const l=s},50690:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var o=n(84121),r=n(35369),i=n(82405),a=n(60797);class s extends i.Z{}(0,o.Z)(s,"defaultValues",{points:(0,r.aV)(),lineCaps:null}),(0,o.Z)(s,"readableName","Polyline"),(0,a.V)(s);const l=s},87043:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var o=n(84121),r=n(82405),i=n(70076),a=n(60797);class s extends r.Z{constructor(e){super((0,i.F)(e))}}(0,o.Z)(s,"defaultValues",{cloudyBorderIntensity:null,cloudyBorderInset:null,measurementBBox:null}),(0,o.Z)(s,"readableName","Rectangle"),(0,a.V)(s);const l=s},11863:(e,t,n)=>{"use strict";n.d(t,{Gu:()=>c,ZP:()=>l,vQ:()=>u});var o=n(84121),r=n(47347),i=n(35369),a=n(56460);const s={id:null,rootId:null,pageIndex:null,pdfObjectId:null,creatorName:null,createdAt:new Date(0),updatedAt:new Date(0),text:{format:"xhtml",value:null},customData:null,group:void 0,isEditable:void 0,isDeletable:void 0,canSetGroup:void 0,isAnonymous:void 0};class l extends(i.WV(s)){getMentionedUserIds(){const e=this.text.value;(0,r.kG)("string"==typeof e,"`text.value` must be of type `string`");const t=(new DOMParser).parseFromString(e,"text/html").body.querySelectorAll("span[data-user-id]"),n=Array.from(t).map((e=>e.getAttribute("data-user-id"))).filter(r.lH);return i.l4(n)}}(0,o.Z)(l,"toSerializableObject",(e=>(0,a.o)(e,e.rootId))),(0,o.Z)(l,"fromSerializableObject",(e=>(0,a.z)(e.id||null,e)));const c=e=>{(0,r.kG)("string"==typeof e.id,"`id` must be of type `string`"),(0,r.kG)("string"==typeof e.rootId,"`rootId` must be of type `string`"),(0,r.kG)("number"==typeof e.pageIndex,"`pageIndex` must be of type `number`"),(0,r.kG)(null==e.pdfObjectId||"number"==typeof e.pdfObjectId,"`pdfObjectId` must be of type `number`"),(0,r.kG)(null==e.creatorName||"string"==typeof e.creatorName,"`creatorName` must be of type `string`"),(0,r.kG)(e.createdAt instanceof Date,"`createdAt` must be a Date"),(0,r.kG)(e.updatedAt instanceof Date,"`updatedAt` must be a Date"),(0,r.kG)("object"==typeof e.text,"`text` must be of type `object`"),(0,r.kG)("string"==typeof e.text.value,"`text` must be of type `string`"),(0,r.kG)("xhtml"===e.text.format||"plain"===e.text.format,"`text.format` must be either `xhtml` or `plain`"),(0,r.kG)(null==e.customData||(0,r.PO)(e.customData),"`customData` must be a JSON-serializable object"),(0,r.kG)(void 0===e.isAnonymous||"boolean"==typeof e.isAnonymous||null==e.isAnonymous,"`isAnonymous` must be of type `boolean`")};function u(e){return(0,r.kG)("string"==typeof e.id,"`id` must be of type `string`"),(0,r.kG)("string"==typeof e.name,"`name` must be of type `string`"),e.avatarUrl&&(0,r.kG)("string"==typeof e.avatarUrl,"`avatarUrl` must be of type `string`"),e.description&&(0,r.kG)("string"==typeof e.description,"`description` must be of type `string`"),(0,r.kG)("string"==typeof e.displayName,"`displayName` must be of type `string`"),e}},26248:(e,t,n)=>{"use strict";n.d(t,{BG:()=>a,FR:()=>c,QA:()=>o,Xl:()=>l,hz:()=>s,qA:()=>i,wk:()=>r});const o={ok:"ok",tampered_document:"tampered_document",failed_to_retrieve_signature_contents:"failed_to_retrieve_signature_contents",failed_to_retrieve_byterange:"failed_to_retrieve_byterange",failed_to_compute_digest:"failed_to_compute_digest",failed_retrieve_signing_certificate:"failed_retrieve_signing_certificate",failed_retrieve_public_key:"failed_retrieve_public_key",failed_encryption_padding:"failed_encryption_padding",tampered_or_invalid_timestamp:"tampered_or_invalid_timestamp",general_failure:"general_failure"},r={ok:"ok",ok_but_self_signed:"ok_but_self_signed",untrusted:"untrusted",expired:"expired",not_yet_valid:"not_yet_valid",invalid:"invalid",revoked:"revoked",failed_to_retrieve_signature_contents:"failed_to_retrieve_signature_contents",general_validation_problem:"general_validation_problem"},i={valid:"valid",warning:"warning",error:"error"},a={CMS:"CMS",CAdES:"CAdES"},s={b_b:"b-b",b_t:"b-t",b_lt:"b-lt"},l={cms:"cms",cades:"cades",documentTimestamp:"documentTimestamp"},c={raw:"raw",pkcs7:"pkcs7"}},76367:(e,t,n)=>{"use strict";n.d(t,{_:()=>o});const o={valid:"valid",warning:"warning",error:"error",not_signed:"not_signed"}},3845:(e,t,n)=>{"use strict";n.d(t,{f:()=>o});let o=function(e){return e.DRAW_START="DRAW_START",e.DRAW_END="DRAW_END",e.TEXT_EDIT_START="TEXT_EDIT_START",e.TEXT_EDIT_END="TEXT_EDIT_END",e.SELECT_START="SELECT_START",e.SELECT_END="SELECT_END",e.MOVE_START="MOVE_START",e.MOVE_END="MOVE_END",e.RESIZE_START="RESIZE_START",e.RESIZE_END="RESIZE_END",e.ROTATE_START="ROTATE_START",e.ROTATE_END="ROTATE_END",e.DELETE_START="DELETE_START",e.DELETE_END="DELETE_END",e.PROPERTY_CHANGE="PROPERTY_CHANGE",e}({})},3534:(e,t,n)=>{"use strict";n.d(t,{Gu:()=>u,Mr:()=>s,ZP:()=>c});var o=n(84121),r=n(35369),i=n(47347),a=n(60797);const s=["readOnly","required","noExport"];class l extends a.D{constructor(e){if(super(e),this.constructor===l)throw new i.p2("PSPDFKit.FormFields.FormField is an abstract base class and can not be instantiated")}}(0,o.Z)(l,"defaultValues",{id:null,pdfObjectId:null,annotationIds:(0,r.aV)(),name:null,label:"",readOnly:!1,required:!1,noExport:!1,additionalActions:null,group:void 0,isEditable:void 0,isFillable:void 0,isDeletable:void 0,canSetGroup:void 0}),(0,a.V)(l);const c=l;function u(e){return e.has("name")}},11032:(e,t,n)=>{"use strict";n.d(t,{X:()=>s,Z:()=>a});var o=n(84121),r=n(60797);class i extends r.D{constructor(e){super(e),void 0!==(null==e?void 0:e.optionIndexes)&&(this.optionIndexes=e.optionIndexes),void 0!==(null==e?void 0:e.isFitting)&&(this.isFitting=e.isFitting)}}(0,o.Z)(i,"defaultValues",{name:null,value:null}),(0,r.V)(i);const a=i;function s(e){return`form-field-value/${e.name}`}},59780:(e,t,n)=>{"use strict";n.d(t,{R0:()=>s,rF:()=>u,Dz:()=>p,fB:()=>h,Wi:()=>r.ZP,KD:()=>m.Z,Vi:()=>v,XQ:()=>b,Yo:()=>E,$o:()=>S});var o=n(84121),r=n(3534),i=n(60797);class a extends r.ZP{}(0,o.Z)(a,"defaultValues",{buttonLabel:null}),(0,i.V)(a);const s=a;var l=n(35369);class c extends r.ZP{}(0,o.Z)(c,"defaultValues",{values:(0,l.aV)(),defaultValues:(0,l.aV)(),options:(0,l.aV)(),optionIndexes:void 0}),(0,i.V)(c);const u=c;class d extends r.ZP{}(0,o.Z)(d,"defaultValues",{options:(0,l.aV)(),values:(0,l.aV)(),defaultValues:(0,l.aV)(),multiSelect:!1,commitOnChange:!1,additionalActions:null}),(0,i.V)(d);const p=d;class f extends p{}(0,o.Z)(f,"defaultValues",{edit:!1,doNotSpellCheck:!1}),(0,i.V)(f);const h=f;var m=n(11032);class g extends p{}(0,i.V)(g);const v=g;class y extends r.ZP{}(0,o.Z)(y,"defaultValues",{options:(0,l.aV)(),noToggleToOff:!1,radiosInUnison:!0,value:"",defaultValue:"",optionIndexes:void 0}),(0,i.V)(y);const b=y;class w extends r.ZP{}(0,o.Z)(w,"defaultValues",{password:!1,maxLength:null,doNotSpellCheck:!1,doNotScroll:!1,multiLine:!1,comb:!1,value:"",defaultValue:"",additionalActions:null}),(0,i.V)(w);const S=w;class P extends r.ZP{}const E=P},17746:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var o=n(84121),r=n(52871),i=n(60797);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class l extends r.Z{constructor(e){super(e)}}(0,o.Z)(l,"defaultValues",s(s({},r.Z.defaultValues),{},{intensity:.5})),(0,i.V)(l);const c=l},52871:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var o=n(84121),r=n(60797);class i extends r.D{constructor(e){super(e)}scale(e,t){return this.withMutations((n=>{t||(t=e),n.set("x",this.x*e).set("y",this.y*t)}))}translate(e){let{x:t,y:n}=e;return this.withMutations((e=>{e.set("x",this.x+t).set("y",this.y+n)}))}translateX(e){return this.translate(new i({x:e,y:0}))}translateY(e){return this.translate(new i({x:0,y:e}))}distance(e){return Math.sqrt((e.x-this.x)**2+(e.y-this.y)**2)}rotate(e){e%=360;const{x:t,y:n}=this;switch(e){case 0:return this;case 90:return this.set("x",n).set("y",-t);case 180:return this.set("x",-t).set("y",-n);case 270:return this.set("x",-n).set("y",t);default:{const o=e*Math.PI/180;return this.set("x",Math.cos(o)*t+Math.sin(o)*n).set("y",Math.cos(o)*n-Math.sin(o)*t)}}}apply(e){const[t,n]=e.applyToPoint([this.x,this.y]);return this.withMutations((e=>{e.set("x",t).set("y",n)}))}}(0,o.Z)(i,"defaultValues",{x:0,y:0}),(0,r.V)(i);const a=i},55237:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var o=n(84121),r=n(47347),i=n(60797),a=n(52871),s=n(20449);class l extends i.D{constructor(e){super(e)}get right(){return this.left+this.width}get bottom(){return this.top+this.height}static fromClientRect(e){let{top:t,left:n,width:o,height:r}=e;return new l({top:t,left:n,width:o,height:r})}static union(e){const t=e.map((e=>e.top)).min(),n=e.map((e=>e.bottom)).max()-t,o=e.map((e=>e.left)).min(),r=e.map((e=>e.right)).max()-o;return new l({left:o,top:t,width:r,height:n})}static getCenteredRect(e,t){return new l({left:(t.width-e.width)/2,top:(t.height-e.height)/2,width:e.width,height:e.height})}static fromInset(e){return new l({left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top})}static fromPoints(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];(0,r.kG)(4===t.length,"Rect.fromPoints requires 4 points");const o=Math.min(...t.map((e=>e.x))),i=Math.min(...t.map((e=>e.y))),a=Math.max(...t.map((e=>e.x))),s=Math.max(...t.map((e=>e.y)));return new l({left:o,top:i,width:a-o,height:s-i})}expandToIncludePoints(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const o=Math.min(this.left,...t.map((e=>e.x))),r=Math.min(this.top,...t.map((e=>e.y))),i=Math.max(this.left+this.width,...t.map((e=>e.x))),a=Math.max(this.top+this.height,...t.map((e=>e.y)));return new l({left:o,top:r,width:i-o,height:a-r})}static areRectsCloserThan(e,t,n){return Math.abs(e.left-t.left)<=n&&Math.abs(e.top-t.top)<=n&&Math.abs(e.left+e.width-(t.left+t.width))<=n&&Math.abs(e.top+e.height-(t.top+t.height))<=n}translate(e){let{x:t,y:n}=e;return this.withMutations((e=>{e.set("left",this.left+t).set("top",this.top+n)}))}translateX(e){return this.set("left",this.left+e)}translateY(e){return this.set("top",this.top+e)}scale(e,t){return this.withMutations((n=>{t||(t=e),n.set("left",this.left*e).set("top",this.top*t).set("width",this.width*e).set("height",this.height*t)}))}grow(e){return this.withMutations((t=>{t.set("left",this.left-e).set("top",this.top-e).set("width",this.width+2*e).set("height",this.height+2*e)}))}getLocation(){return new a.Z({x:this.left,y:this.top})}getSize(){return new s.Z({width:this.width,height:this.height})}getCenter(){return new a.Z({x:this.left+this.width/2,y:this.top+this.height/2})}setLocation(e){return this.withMutations((t=>{t.set("left",e.x).set("top",e.y)}))}roundOverlap(){return this.withMutations((e=>{e.set("left",Math.floor(this.left)).set("top",Math.floor(this.top)).set("width",Math.ceil(this.width)).set("height",Math.ceil(this.height))}))}round(){return this.withMutations((e=>{e.set("left",Math.round(this.left)).set("top",Math.round(this.top)).set("width",Math.round(this.width)).set("height",Math.round(this.height))}))}isPointInside(e){return e.x>=this.left&&e.x<=this.right&&e.y>=this.top&&e.y<=this.bottom}isRectInside(e){return this.isPointInside(e.getLocation())&&this.isPointInside(e.getLocation().translate(new a.Z({x:e.width,y:e.height})))}isRectOverlapping(e){return e.left<this.right&&e.right>this.left&&e.top<this.bottom&&e.bottom>this.top}normalize(){return this.withMutations((e=>e.set("left",this.width<0?this.left+this.width:this.left).set("top",this.height<0?this.top+this.height:this.top).set("width",Math.abs(this.width)).set("height",Math.abs(this.height))))}apply(e){const[t,n]=e.applyToPoint([this.left,this.top]),[o,r]=e.applyToVector([this.width,this.height]);return this.withMutations((e=>e.set("left",t).set("top",n).set("width",o).set("height",r))).normalize()}}(0,o.Z)(l,"defaultValues",{left:0,top:0,width:0,height:0}),(0,i.V)(l);const c=l},20449:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(35369);class r extends((0,o.WV)({width:0,height:0})){scale(e){return this.withMutations((t=>{t.set("width",this.width*e).set("height",this.height*e)}))}ceil(){return this.withMutations((e=>{e.set("width",Math.ceil(this.width)).set("height",Math.ceil(this.height))}))}floor(){return this.withMutations((e=>{e.set("width",Math.floor(this.width)).set("height",Math.floor(this.height))}))}swapDimensions(){return this.withMutations((e=>{e.set("width",this.height).set("height",this.width)}))}apply(e){const[t,n]=e.applyToVector([this.width,this.height]);return this.withMutations((e=>{e.set("width",Math.abs(t)).set("height",Math.abs(n))}))}}},88804:(e,t,n)=>{"use strict";n.d(t,{Wm:()=>i.Z,eB:()=>h,E9:()=>r.Z,UL:()=>a.Z,$u:()=>s.Z,sl:()=>p});var o,r=n(52871),i=n(17746),a=n(55237),s=n(20449),l=n(84121),c=n(47347),u=n(60797);class d extends u.D{translate(e){let{x:t,y:n}=e;return this.transform(1,0,0,1,t,n)}translateX(e){return this.translate({x:e,y:0})}translateY(e){return this.translate({x:0,y:e})}scale(e,t){return t||(t=e),this.transform(e,0,0,t,0,0)}transform(e,t,n,o,r,i){const{a,b:s,c:l,d:c,e:u,f:d}=this;return this.withMutations((p=>p.set("a",e*a+n*s).set("b",t*a+o*s).set("c",e*l+n*c).set("d",t*l+o*c).set("e",e*u+n*d+r).set("f",t*u+o*d+i)))}rotate(e){(0,c.kG)(e%90==0,"Only multiples of 90° allowed.");const t=(360-e)*Math.PI/180,n=Math.cos(t),o=Math.sin(t);return this.transform(n,o,-o,n,0,0)}rotateRad(e){const t=Math.cos(e),n=Math.sin(e);return this.transform(t,n,-n,t,0,0)}inverse(){const{a:e,b:t,c:n,d:o,e:r,f:i}=this,a=e*o-t*n;return this.withMutations((s=>s.set("a",o/a).set("b",t/-a).set("c",n/-a).set("d",e/a).set("e",(n*i-o*r)/a).set("f",(e*i-t*r)/-a)))}toCssValue(){const{a:e,b:t,c:n,d:o,e:r,f:i}=this;return`matrix(${e.toFixed(2)}, ${t.toFixed(2)}, ${n.toFixed(2)}, ${o.toFixed(2)}, ${r.toFixed(2)}, ${i.toFixed(2)})`}applyToPoint(e){let[t,n]=e;const{a:o,b:r,c:i,d:a,e:s,f:l}=this;return[o*t+i*n+s,r*t+a*n+l]}applyToVector(e){let[t,n]=e;const{a:o,b:r,c:i,d:a}=this;return[o*t+i*n,r*t+a*n]}}o=d,(0,l.Z)(d,"defaultValues",{a:1,b:0,c:0,d:1,e:0,f:0}),(0,l.Z)(d,"IDENTITY",new o),(0,u.V)(d);const p=d;var f=n(35369);class h extends((0,f.WV)({left:0,top:0,right:0,bottom:0})){static applyToRect(e,t){if(!(e instanceof h))throw new c.p2("`inset` must be an instance of `PSPDFKit.Geometry.Inset`");if(!(t instanceof a.Z))throw new c.p2("`rect` must be an instance of `PSPDFKit.Geometry.Rect`");return new a.Z({top:t.top+e.top,left:t.left+e.left,width:t.width-(e.left+e.right),height:t.height-(e.top+e.bottom)})}static fromRect(e){return new h({left:e.left,top:e.top,right:e.left+e.width,bottom:e.top+e.height})}static fromValue(e){if("number"!=typeof e)throw new c.p2("The provided value must be a number");return new h({top:e,left:e,right:e,bottom:e})}apply(e){const t=e.applyToPoint([this.left,this.top]),n=e.applyToPoint([this.left,this.bottom]),o=e.applyToPoint([this.right,this.top]),r=e.applyToPoint([this.right,this.bottom]),i=Math.min(t[0],n[0],o[0],r[0]),a=Math.max(t[0],n[0],o[0],r[0]),s=Math.min(t[1],n[1],o[1],r[1]),l=Math.max(t[1],n[1],o[1],r[1]);return new h({left:i,right:a,top:s,bottom:l})}setScale(e){return new h({left:this.left*e,right:this.right*e,top:this.top*e,bottom:this.bottom*e})}}},66687:(e,t,n)=>{"use strict";n.d(t,{q6:()=>i.q6,Pg:()=>l,rp:()=>c.Z,R0:()=>a.R0,UW:()=>f,rF:()=>a.rF,Dz:()=>a.Dz,uh:()=>y.Z,Il:()=>h.Z,fB:()=>a.fB,sv:()=>T.ZP,Jn:()=>i.Jn,Bd:()=>L,em:()=>m.Z,ZS:()=>K,S:()=>x.Z,Wm:()=>r.Wm,Xs:()=>i.Xs,Wi:()=>a.Wi,KD:()=>a.KD,mv:()=>g.Z,Di:()=>o.Di,FV:()=>i.FV,sK:()=>i.sK,Zc:()=>i.Zc,eB:()=>r.eB,bp:()=>o.bp,o9:()=>i.o9,R1:()=>i.R1,Vi:()=>a.Vi,Qi:()=>i.Qi,sT:()=>C.Z,T3:()=>v.Z,E9:()=>r.E9,Hi:()=>i.Hi,om:()=>i.om,XQ:()=>a.XQ,UL:()=>r.UL,b3:()=>i.b3,UX:()=>i.UX,Yo:()=>a.Yo,dp:()=>D.Z,$u:()=>r.$u,hL:()=>i.hL,GI:()=>i.GI,ZM:()=>b.Z,R9:()=>i.R9,gd:()=>i.gd,$o:()=>a.$o,bi:()=>w.Z,On:()=>i.On,SV:()=>P,Bs:()=>E,lm:()=>o.lm,xu:()=>i.xu,Ih:()=>i.Ih,f7:()=>A.Z,gx:()=>O.Z,Vk:()=>k.Z,x_:()=>i.x_});var o=n(89335),r=n(88804),i=n(15973),a=n(59780),s=n(35369);class l extends((0,s.WV)({data:null})){}var c=n(1053),u=n(84121),d=n(60797);class p extends d.D{}(0,u.Z)(p,"defaultValues",{start:null,knee:null,end:null,cap:null,innerRectInset:null}),(0,d.V)(p);const f=p;var h=n(83634),m=(n(86071),n(11721)),g=(n(74985),n(81619),n(19209)),v=(n(18509),n(80399)),y=(n(19419),n(98663)),b=(n(89835),n(19568),n(49027)),w=n(65338),S=n(47347);class P extends((0,s.WV)({startNode:null,startOffset:null,endNode:null,endOffset:null})){startAndEndIds(){const e=this.startNode.parentNode,t=this.endNode.parentNode,n=parseInt(e.dataset.textlineId),o=parseInt(t.dataset.textlineId),r=parseInt(e.dataset.pageIndex),i=parseInt(t.dataset.pageIndex);return(0,S.kG)("number"==typeof n,"selection startId is not a number"),(0,S.kG)("number"==typeof o,"selection endId is not a number"),(0,S.kG)("number"==typeof r,"selection start pageIndex is not a number"),(0,S.kG)("number"==typeof i,"selection end pageIndex is not a number"),{startTextLineId:n,endTextLineId:o,startPageIndex:r,endPageIndex:i}}}class E extends((0,s.WV)({textRange:null,startTextLineId:null,endTextLineId:null,startPageIndex:null,endPageIndex:null})){}var x=n(92947),D=n(57960),C=n(27646),k=n(47852),O=n(40725),A=n(34426),T=n(11863),I=n(80857),F=n(94905);function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const N=(0,I.Z)("ComparisonOperation"),R={type:F.b.TEXT,options:{numberOfContextWords:0}};class L extends((0,s.WV)(R)){constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};N(void 0===t.numberOfContextWords||"number"==typeof t.numberOfContextWords,"numberOfContextWords must be a number."),super({type:e,options:_(_({},R.options),t)})}}function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}const j=(0,I.Z)("DocumentDescriptor"),z={filePath:void 0,password:void 0,pageIndexes:[],jwt:void 0};class K extends((0,s.WV)(z)){constructor(e){!function(e){let{filePath:t,pageIndexes:n,password:o,jwt:r}=e;t&&j("string"==typeof t||t instanceof ArrayBuffer,"filePath must be a string or ArrayBuffer.");null!=r&&j("string"==typeof r&&r.length>0,"jwt must be a non-empty string.");null!=o&&j("string"==typeof o&&o.length>0,"password must be a non-empty string.");j(n.length>0,"pageIndexes must be a non-empty array."),j(n.every((e=>"number"==typeof e||Array.isArray(e)&&2===e.length&&e.every((e=>"number"==typeof e)))),"pageIndexes must be an array of numbers or arrays of two numbers.")}(e),super(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e))}}},71603:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var o=n(35369),r=n(36489),i=n(79827);class a extends((0,o.WV)({unitFrom:r.s.INCHES,unitTo:i.K.INCHES,fromValue:1,toValue:1})){}},46791:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(35369);class r extends((0,o.WV)({pageIndex:null,previewText:"",locationInPreview:null,lengthInPreview:null,rectsOnPage:(0,o.aV)(),isAnnotation:null,annotationRect:null})){}},56169:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(35369);class r extends((0,o.WV)({isFocused:!1,isLoading:!1,term:"",focusedResultIndex:-1,results:(0,o.aV)(),minSearchQueryLength:1})){}},79329:(e,t,n)=>{"use strict";n.d(t,{a:()=>a});var o=n(97413),r=n(19702);const i={Sidebar:Object.values(r.f)};function a(e){for(const t in e)if(e.hasOwnProperty(t)){(0,o.k)(void 0!==typeof i[t],`'${t}' is not a customizable UI element. Customizable UI elements are: ${Object.keys(i).join(", ")}`);const n=i[t];(0,o.k)(Object.keys(e[t]).every((e=>n.includes(e))),`The provided custom UI configuration contains one or more invalid keys for "${t}". Valid "${t}" keys are: ${n.join(",")}`),(0,o.k)(Object.values(e[t]).every((e=>"function"==typeof e)),"The custom UI values provided must be callback functions.")}return e}},24382:(e,t,n)=>{"use strict";n.d(t,{C:()=>l,Z:()=>c});var o=n(47347),r=n(63738),i=n(41194),a=n(60132),s=n(91039);const l="The API you're trying to use requires a digital signatures license. Digital Signatures is a component of PSPDFKit for Web and sold separately.";function c(e,t){t.getSignaturesInfo=function(){const{features:t,backend:n}=e.getState();return(0,o.kG)(t.includes(a.q.DIGITAL_SIGNATURES),l),(0,o.kG)(n),n.getSignaturesInfo().then((t=>(e.dispatch((0,i.Y)(t)),t)))},t.signDocument=function(t,n){const{features:c,backend:u}=e.getState();var d;((0,o.kG)(c.includes(a.q.DIGITAL_SIGNATURES),l),t&&(0,s.w2)(t,u),"STANDALONE"===(null==u?void 0:u.type))?null!=t&&t.signingData?(0,o.kG)(void 0===n||void 0===(null==t||null===(d=t.signingData)||void 0===d?void 0:d.privateKey),"On a Standalone deployment, when `signaturePreparationData.signingData.privateKey` is set, `twoStepSignatureCallbackOrSigningServiceData` should not be provided."):(0,o.kG)("function"==typeof n,"On a Standalone deployment, when `signaturePreparationData.signingData` is not provided or does not include a `privateKey`, `twoStepSignatureCallbackOrSigningServiceData` must be a function."):"SERVER"===(null==u?void 0:u.type)&&(0,o.kG)(!n||"object"==typeof n,"On a Server deployment, `twoStepSignatureCallbackOrSigningServiceData` must be a `PSPDFKit.SigningServiceData` object if specified.");return e.dispatch((0,r.d9)()),new Promise(((o,a)=>{e.dispatch((0,i.e)(t,n,(()=>{e.dispatch((0,r.t6)()),o()}),(t=>{e.dispatch((0,r.t6)()),a(t)})))}))}}},13394:(e,t,n)=>{"use strict";n.d(t,{I:()=>l,Z:()=>u});var o=n(47347);function r(e){return(0,o.kG)(Array.isArray(e)&&e.length>0,"Operations must be a non-empty array of operations."),e.forEach((e=>{(0,o.kG)(e.hasOwnProperty("type"),"Invalid operation: no `type` field")})),e}var i=n(20234),a=n(2810),s=n(60132);const l="The API you're trying to use requires a document editing license. Document editing is a component of PSPDFKit for Web and sold separately.",c=["document.change"];function u(e,t){e.getState().eventEmitter.events.push(...c),t.applyOperations=function(t){const{features:n}=e.getState();return(0,o.kG)(n.includes(s.q.DOCUMENT_EDITING),l),r(t),new Promise(((n,o)=>{e.dispatch((0,i.b_)(t,n,o))}))},t.exportPDFWithOperations=async function(t){const{features:n,backend:i}=e.getState();return(0,o.kG)(n.includes(s.q.DOCUMENT_EDITING),l),r(t),(0,o.kG)(i),i.exportPDFWithOperations(t.map(a.kg))}}},25797:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m,q:()=>h});var o=n(84121),r=n(47347),i=n(67366),a=n(24852),s=n(63738),l=n(69939),c=n(96617),u=n(60132),d=n(83253);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const h="The API you're trying to use requires a redactions license. Redactions is a component of PSPDFKit for Web and sold separately.";function m(e,t){t.createRedactionsBySearch=async function(t,n){const o=e.getState(),{features:a,backend:s,annotationPresets:p,eventEmitter:m}=o;if(!a.includes(u.q.REDACTIONS))throw new r.p2(h);(0,r.kG)(t,"You need to pass a search query.");const g=p.get("redaction"),v=f(f(f({},{searchType:c.S.TEXT,searchInAnnotations:!0,caseSensitive:!n||n.searchType!==c.S.TEXT}),n),{},{annotationPreset:f(f({},g),n&&n.annotationPreset)});(0,r.kG)(s);const y=await s.searchAndRedact(t,v,o);if(y.size)if("STANDALONE"===s.type)(0,i.dC)((()=>{y.forEach((t=>{e.dispatch((0,l.$d)(t))}))}));else if("SERVER"===s.type&&!s.isUsingInstantProvider()){var b;const{alreadyLoadedPages:e}=s.provider.state,t=y.filter((t=>e.has(t.pageIndex)));null===(b=o.annotationManager)||void 0===b||b.backendObjectsCreated(y,d.z),m.emit("annotations.create",t)}return y.map((e=>e.id))},t.applyRedactions=function(){const{features:t}=e.getState();if(!t.includes(u.q.REDACTIONS))throw new r.p2(h);return e.dispatch((0,s.fq)()),new Promise(((t,n)=>(e.dispatch((0,a.g)((()=>{e.dispatch((0,s.Di)()),t()}),(t=>{e.dispatch((0,s.Di)()),n(t)}))),t)))}}},66209:(e,t,n)=>{"use strict";n.d(t,{H:()=>s,Z:()=>c});var o=n(35369),r=n(47347),i=n(18803),a=n(49177);class s extends((0,o.WV)({startTextLineId:null,endTextLineId:null,startPageIndex:null,endPageIndex:null,startNode:null,startOffset:null,endNode:null,endOffset:null,getText:null,getSelectedTextLines:null,getBoundingClientRect:null,getSelectedRectsPerPage:null})){}const l=["textSelection.change"];function c(e,t){t.getTextSelection=function(){var t,n,o,l;const c=e.getState(),u=c.currentTextSelection;return u?new s({startTextLineId:u.startTextLineId,endTextLineId:u.endTextLineId,startPageIndex:u.startPageIndex,endPageIndex:u.endPageIndex,startNode:null===(t=u.textRange)||void 0===t?void 0:t.startNode,startOffset:null===(n=u.textRange)||void 0===n?void 0:n.startOffset,endNode:null===(o=u.textRange)||void 0===o?void 0:o.endNode,endOffset:null===(l=u.textRange)||void 0===l?void 0:l.endOffset,getText:async()=>(0,i.Q)(c,u),getSelectedTextLines:async()=>((0,r.kG)(u.textRange),(0,i.ZJ)(c,u.textRange).valueSeq().toList().flatten(!0)),getBoundingClientRect:async()=>((0,r.kG)(u.textRange),(0,i.U2)(c,u.textRange)),getSelectedRectsPerPage:async()=>(0,a.rf)(c)}):null};let n=e.getState();const{eventEmitter:o}=n;return o.events.push(...l),e.subscribe((()=>{const r=e.getState();n.currentTextSelection!==r.currentTextSelection&&o.emit("textSelection.change",t.getTextSelection()),n=r}))}},59739:(e,t,n)=>{"use strict";n.d(t,{F3:()=>j,ZP:()=>L,eV:()=>B});var o=n(67366),r=n(47347),i=n(75920),a=n(91859),s=n(19702),l=n(65872),c=n(64494),u=n(28098),d=n(13394),p=n(62164),f=n(24382),h=n(19815),m=n(55909),g=n(70006),v=n(47710),y=n(5020),b=n(77973),w=n(20792),S=n(34573),P=n(52560),E=n(66687),x=n(38151),D=n(63738),C=n(3219),k=n(99745),O=n(58568),A=n(16126),T=n(96114),I=n(72131),F=n(60132),M=n(97528),_=n(72643);const N=["viewState.change","viewState.currentPageIndex.change","viewState.zoom.change"],R=["cropArea.changeStart","cropArea.changeStop"];function L(e,t){const{eventEmitter:n}=e.getState();let l=!0,c=b();function g(){if(!l)return;const e=b(),t=c;c=e;const o=t.delete("instance"),r=e.delete("instance");o.equals(r)||(t.currentPageIndex!==e.currentPageIndex&&n.emit("viewState.currentPageIndex.change",e.currentPageIndex),t.zoom!==e.zoom&&n.emit("viewState.zoom.change",e.zoom),n.emit("viewState.change",e,t))}n.events.push(...N),n.events.push(...R);const v=e.subscribe(g);function b(){const n=e.getState();return(0,k.w)(n,t)}return Object.defineProperty(t,"viewState",{enumerable:!0,configurable:!1,get:b}),t.setViewState=function(t){let n=t;if("function"==typeof n&&(n=n.call(null,b())),!(n instanceof E.f7)){const e="function"==typeof n?"return value of your update function":"supplied argument";throw new r.p2(`The ${e} is not an instance of PSPDFKit.ViewState.`)}l=!1,n=j(n,e),function(e,t,n){t.zoom!==n.zoom&&(n.zoom===u.c.AUTO?e.dispatch((0,C._R)()):n.zoom===u.c.FIT_TO_VIEWPORT?e.dispatch((0,C.lO)()):n.zoom===u.c.FIT_TO_WIDTH?e.dispatch((0,C.du)()):"number"==typeof n.zoom&&e.dispatch((0,C.Ic)(n.zoom)));if(t.pagesRotation!==n.pagesRotation){const o=(0,y.n5)(n.pagesRotation-t.pagesRotation);e.dispatch((0,C.U1)(o))}t.layoutMode!==n.layoutMode&&e.dispatch((0,D.YA)(n.layoutMode));t.scrollMode!==n.scrollMode&&e.dispatch((0,D._U)(n.scrollMode));t.showToolbar!==n.showToolbar&&(t.showToolbar?e.dispatch((0,D.iu)()):e.dispatch((0,D.bv)()));t.enableAnnotationToolbar!==n.enableAnnotationToolbar&&(t.enableAnnotationToolbar?e.dispatch((0,D.Wv)()):e.dispatch((0,D.m$)()));t.allowPrinting!==n.allowPrinting&&(n.allowPrinting?e.dispatch((0,D.Ol)()):e.dispatch((0,D.m0)()));t.allowExport!==n.allowExport&&(n.allowExport?e.dispatch((0,D.Rx)()):e.dispatch((0,D.YI)()));t.zoomStep!==n.zoomStep&&(!n.zoomStep||n.zoomStep<1?((0,r.ZK)(`The zoomStep value must be greater than 1. The value you provided was ${n.zoomStep}.The zoomStep value will be set to default ${a.V4}`),e.dispatch((0,D.Ql)(a.V4))):e.dispatch((0,D.Ql)(n.zoomStep)));t.disablePointSnapping!==n.disablePointSnapping&&"boolean"==typeof n.disablePointSnapping&&e.dispatch((0,D.VF)(n.disablePointSnapping));const l=e.getState();t.showSignatureValidationStatus!==n.showSignatureValidationStatus&&((0,r.kG)(l.features.includes(F.q.DIGITAL_SIGNATURES),f.C),e.dispatch((0,D.A7)(n.showSignatureValidationStatus)));(!0===n.formDesignMode||(0,A.fF)(n.interactionMode))&&((0,r.kG)(l.features.includes(F.q.FORM_DESIGNER),m.RB),(0,r.kG)(l.backend&&(0,h.k_)(l.backend),m.Bl));!0===n.previewRedactionMode&&(0,r.kG)(l.features.includes(F.q.REDACTIONS),"The API you're trying to use requires a redactions license. Redactions is a component of PSPDFKit for Web and sold separately.");n.interactionMode===w.A.DOCUMENT_EDITOR&&(0,r.kG)(l.features.includes(F.q.DOCUMENT_EDITING),d.I);n.interactionMode===w.A.CONTENT_EDITOR&&(0,r.kG)(l.features.includes(F.q.CONTENT_EDITING),_.Aq);t.formDesignMode!==n.formDesignMode&&e.dispatch((0,D.LE)(n.formDesignMode));if(t.interactionMode!==n.interactionMode){if(null!=n.interactionMode){const r=B(n.interactionMode,l),i=t.interactionMode?B(t.interactionMode,l):null;(n.interactionMode===w.A.DOCUMENT_EDITOR&&(0,h.Xr)({features:l.features,backendPermissions:l.backendPermissions,documentPermissions:l.documentPermissions,readOnlyEnabled:l.readOnlyEnabled})||n.interactionMode===w.A.CONTENT_EDITOR&&(0,h.qs)({features:l.features,backendPermissions:l.backendPermissions,documentPermissions:l.documentPermissions,readOnlyEnabled:l.readOnlyEnabled})||!n.readOnly||r.allowWhenInReadOnlyMode)&&(0,o.dC)((()=>{i&&e.dispatch(i.onLeaveAction()),e.dispatch(r.onEnterAction())}))}else if(null!=t.interactionMode){const n=B(t.interactionMode,l);e.dispatch((0,S.fz)()),e.dispatch(n.onLeaveAction())}n.interactionMode===w.A.INK_SIGNATURE&&(0,i.a1)("PSPDFKit.InteractionMode.INK_SIGNATURE was deprecated and will be removed in future version. Please use PSPDFKit.InteractionMode.SIGNATURE instead.")}t.readOnly!==n.readOnly&&(n.readOnly?e.dispatch((0,D.oX)(I.J.VIA_VIEW_STATE)):e.dispatch((0,D.ek)()));t.showAnnotations!==n.showAnnotations&&(n.showAnnotations?e.dispatch((0,D.cI)()):e.dispatch((0,D.Tu)()));t.showComments!==n.showComments&&((0,r.kG)(l.features.includes(F.q.COMMENTS),p.kx),n.showComments?e.dispatch((0,D.Q8)()):e.dispatch((0,D.u0)()));t.showAnnotationNotes!==n.showAnnotationNotes&&(n.showAnnotationNotes?e.dispatch((0,D.T)()):e.dispatch((0,D.SE)()));const c={[s.f.ANNOTATIONS]:D.ze,[s.f.BOOKMARKS]:D.Hf,[s.f.DOCUMENT_OUTLINE]:D.EJ,[s.f.THUMBNAILS]:D.el,[s.f.CUSTOM]:D.rd};t.sidebarMode!==n.sidebarMode&&(null===n.sidebarMode?e.dispatch((0,D.mu)()):e.dispatch(c[n.sidebarMode]()));t.sidebarPlacement!==n.sidebarPlacement&&e.dispatch((0,D.Ox)(n.sidebarPlacement));t.sidebarOptions!==n.sidebarOptions&&e.dispatch((0,D.vI)(n.sidebarOptions));t.spreadSpacing!==n.spreadSpacing&&e.dispatch((0,D.JN)(n.spreadSpacing));t.pageSpacing!==n.pageSpacing&&e.dispatch((0,D.vY)(n.pageSpacing));t.keepFirstSpreadAsSinglePage!==n.keepFirstSpreadAsSinglePage&&e.dispatch((0,D.EY)(n.keepFirstSpreadAsSinglePage));if(t.viewportPadding.horizontal!==n.viewportPadding.horizontal||t.viewportPadding.vertical!==n.viewportPadding.vertical){const t=new E.E9({x:n.viewportPadding.horizontal,y:n.viewportPadding.vertical});e.dispatch((0,D._P)(t))}t.currentPageIndex!==n.currentPageIndex&&e.dispatch((0,C.YA)(n.currentPageIndex));t.previewRedactionMode!==n.previewRedactionMode&&e.dispatch((0,D.P_)(n.previewRedactionMode));n.canScrollWhileDrawing&&!t.canScrollWhileDrawing&&e.dispatch((0,D.xW)());!n.canScrollWhileDrawing&&t.canScrollWhileDrawing&&e.dispatch((0,D.Ft)());n.keepSelectedTool&&e.dispatch((0,D.HT)());!n.keepSelectedTool&&t.keepSelectedTool&&e.dispatch((0,D.Xv)());if(t.sidebarWidth!==n.sidebarWidth){const t=e.getState(),{containerRect:r}=t,i={width:n.sidebarWidth,height:r.height};(0,o.dC)((()=>{e.dispatch((0,C.Pt)(n.sidebarWidth)),e.dispatch((0,C.dx)((0,O.p)(t,i,n.sidebarWidth),!1))})),t.viewportState.viewportRect.set("height",i.height)}}(e,b(),n),l=!0,g()},v}function B(e,t){return{[w.A.TEXT_HIGHLIGHTER]:{onEnterAction:D.d5,onLeaveAction:D.lC,allowWhenInReadOnlyMode:!1},[w.A.INK]:{onEnterAction:D.P4,onLeaveAction:D.s3,allowWhenInReadOnlyMode:!1},[w.A.INK_ERASER]:{onEnterAction:D.Ug,onLeaveAction:D.VU,allowWhenInReadOnlyMode:!1},[w.A.STAMP_PICKER]:{onEnterAction:D.C4,onLeaveAction:D.pM,allowWhenInReadOnlyMode:!1},[w.A.STAMP_CUSTOM]:{onEnterAction:D._z,onLeaveAction:D.pM,allowWhenInReadOnlyMode:!1},[w.A.INK_SIGNATURE]:{onEnterAction:D.Cc,onLeaveAction:D.MV,allowWhenInReadOnlyMode:!1},[w.A.SIGNATURE]:{onEnterAction:D.Cc,onLeaveAction:D.MV,allowWhenInReadOnlyMode:!1},[w.A.SHAPE_LINE]:{onEnterAction:(0,D.p9)(E.o9,w.A.SHAPE_LINE),onLeaveAction:D.Ce,allowWhenInReadOnlyMode:!1},[w.A.SHAPE_RECTANGLE]:{onEnterAction:(0,D.p9)(E.b3,w.A.SHAPE_RECTANGLE),onLeaveAction:D.Ce,allowWhenInReadOnlyMode:!1},[w.A.SHAPE_ELLIPSE]:{onEnterAction:(0,D.p9)(E.Xs,w.A.SHAPE_ELLIPSE),onLeaveAction:D.Ce,allowWhenInReadOnlyMode:!1},[w.A.SHAPE_POLYGON]:{onEnterAction:(0,D.p9)(E.Hi,w.A.SHAPE_POLYGON),onLeaveAction:D.Ce,allowWhenInReadOnlyMode:!1},[w.A.SHAPE_POLYLINE]:{onEnterAction:(0,D.p9)(E.om,w.A.SHAPE_POLYLINE),onLeaveAction:D.Ce,allowWhenInReadOnlyMode:!1},[w.A.NOTE]:{onEnterAction:D.i9,onLeaveAction:D.dp,allowWhenInReadOnlyMode:!1},[w.A.COMMENT_MARKER]:{onEnterAction:()=>((0,r.kG)(t&&t.features.includes(F.q.COMMENTS),p.kx),(0,D.k6)()),onLeaveAction:()=>((0,r.kG)(t&&t.features.includes(F.q.COMMENTS),p.kx),(0,D.tr)()),allowWhenInReadOnlyMode:!1},[w.A.TEXT]:{onEnterAction:D.DU,onLeaveAction:D.k4,allowWhenInReadOnlyMode:!1},[w.A.CALLOUT]:{onEnterAction:D.Lt,onLeaveAction:D.k4,allowWhenInReadOnlyMode:!1},[w.A.PAN]:{onEnterAction:C.vc,onLeaveAction:C.Yr,allowWhenInReadOnlyMode:!0},[w.A.SEARCH]:{onEnterAction:g.Xe,onLeaveAction:g.ct,allowWhenInReadOnlyMode:!0},[w.A.DOCUMENT_EDITOR]:{onEnterAction:D.lV,onLeaveAction:D.sJ,allowWhenInReadOnlyMode:!1},[w.A.MARQUEE_ZOOM]:{onEnterAction:D.xF,onLeaveAction:D.si,allowWhenInReadOnlyMode:!0},[w.A.REDACT_TEXT_HIGHLIGHTER]:{onEnterAction:D.aw,onLeaveAction:D.TR,allowWhenInReadOnlyMode:!1},[w.A.REDACT_SHAPE_RECTANGLE]:{onEnterAction:D.t,onLeaveAction:D.jP,allowWhenInReadOnlyMode:!1},[w.A.DOCUMENT_CROP]:{onEnterAction:D.rL,onLeaveAction:D.Cn,allowWhenInReadOnlyMode:!1},[w.A.CONTENT_EDITOR]:{onEnterAction:()=>x.gY,onLeaveAction:()=>x.u8,allowWhenInReadOnlyMode:!1},[w.A.FORM_CREATOR]:{onEnterAction:T.el,onLeaveAction:T.h4,allowWhenInReadOnlyMode:!1},[w.A.SIGNATURE_WIDGET]:{onEnterAction:()=>(0,D.UF)(w.A.SIGNATURE_WIDGET),onLeaveAction:D.XX,allowWhenInReadOnlyMode:!1},[w.A.LIST_BOX_WIDGET]:{onEnterAction:()=>(0,D.UF)(w.A.LIST_BOX_WIDGET),onLeaveAction:D.XX,allowWhenInReadOnlyMode:!1},[w.A.COMBO_BOX_WIDGET]:{onEnterAction:()=>(0,D.UF)(w.A.COMBO_BOX_WIDGET),onLeaveAction:D.XX,allowWhenInReadOnlyMode:!1},[w.A.CHECKBOX_WIDGET]:{onEnterAction:()=>(0,D.UF)(w.A.CHECKBOX_WIDGET),onLeaveAction:D.XX,allowWhenInReadOnlyMode:!1},[w.A.RADIO_BUTTON_WIDGET]:{onEnterAction:()=>(0,D.UF)(w.A.RADIO_BUTTON_WIDGET),onLeaveAction:D.XX,allowWhenInReadOnlyMode:!1},[w.A.TEXT_WIDGET]:{onEnterAction:()=>(0,D.UF)(w.A.TEXT_WIDGET),onLeaveAction:D.XX,allowWhenInReadOnlyMode:!1},[w.A.BUTTON_WIDGET]:{onEnterAction:()=>(0,D.UF)(w.A.BUTTON_WIDGET),onLeaveAction:D.XX,allowWhenInReadOnlyMode:!1},[w.A.DATE_WIDGET]:{onEnterAction:()=>(0,D.UF)(w.A.DATE_WIDGET),onLeaveAction:D.XX,allowWhenInReadOnlyMode:!1},[w.A.LINK]:{onEnterAction:D.Jn,onLeaveAction:D.UU,allowWhenInReadOnlyMode:!1},[w.A.DISTANCE]:{onEnterAction:(0,D.p9)(E.o9,w.A.DISTANCE),onLeaveAction:D.Ce,allowWhenInReadOnlyMode:!1},[w.A.PERIMETER]:{onEnterAction:(0,D.p9)(E.om,w.A.PERIMETER),onLeaveAction:D.Ce,allowWhenInReadOnlyMode:!1},[w.A.RECTANGLE_AREA]:{onEnterAction:(0,D.p9)(E.b3,w.A.RECTANGLE_AREA),onLeaveAction:D.Ce,allowWhenInReadOnlyMode:!1},[w.A.ELLIPSE_AREA]:{onEnterAction:(0,D.p9)(E.Xs,w.A.ELLIPSE_AREA),onLeaveAction:D.Ce,allowWhenInReadOnlyMode:!1},[w.A.POLYGON_AREA]:{onEnterAction:(0,D.p9)(E.Hi,w.A.POLYGON_AREA),onLeaveAction:D.Ce,allowWhenInReadOnlyMode:!1},[w.A.MULTI_ANNOTATIONS_SELECTION]:{onEnterAction:D.YF,onLeaveAction:D.FA,allowWhenInReadOnlyMode:!1},[w.A.MEASUREMENT_SETTINGS]:{onEnterAction:(0,D.PR)(),onLeaveAction:(0,D.jJ)(),allowWhenInReadOnlyMode:!1}}[e]}function j(e,t){var n,o;const i=t?t.getState():null;if("number"!=typeof e.currentPageIndex)throw new r.p2("The currentPageIndex set on the new ViewState is not of type `number`.");if(e.disablePointSnapping&&"boolean"!=typeof e.disablePointSnapping)throw new r.p2("The disablePointSnapping set on the new ViewState is not of type `boolean`.");if(i&&(e.currentPageIndex<0||e.currentPageIndex>=i.totalPages))throw new r.p2(`The currentPageIndex set on the new ViewState is out of bounds.\nThe index is expected to be in the range from 0 to ${i.totalPages-1} (inclusive).`);if("number"==typeof e.zoom){if(i){const{viewportState:t}=i,n=(0,P.Yo)(t),o=(0,P.Sm)(t);if(e.zoom<n)throw new r.p2(`The supplied zoom level is smaller than the minimum zoom level for this document (${n})`);if(e.zoom>o)throw new r.p2(`The supplied zoom level is larger than the maximum zoom level for this document (${o})`)}}else if(e.zoom!==u.c.AUTO&&e.zoom!==u.c.FIT_TO_WIDTH&&e.zoom!==u.c.FIT_TO_VIEWPORT)throw new r.p2("The supplied zoom mode is not valid.\nValid zoom modes are: PSPDFKit.ZoomMode.AUTO, PSPDFKit.ZoomMode.FIT_TO_VIEWPORT, or PSPDFKit.ZoomMode.FIT_TO_WIDTH");if(e.pagesRotation%90!=0)throw new r.p2("The supplied pagesRotation must be a multiple of 90°.");if(e.layoutMode!==b.X.SINGLE&&e.layoutMode!==b.X.DOUBLE&&e.layoutMode!==b.X.AUTO)throw new r.p2("The supplied layout mode is not valid.\nValid layout modes are: PSPDFKit.LayoutMode.SINGLE, PSPDFKit.LayoutMode.DOUBLE, or PSPDFKit.LayoutMode.AUTO");if(e.scrollMode!==v.G.CONTINUOUS&&e.scrollMode!==v.G.PER_SPREAD&&e.scrollMode!==v.G.DISABLED)throw new r.p2("The supplied scroll mode is not valid.\nValid scroll modes are: PSPDFKit.ScrollMode.CONTINUOUS, PSPDFKit.ScrollMode.PER_SPREAD, or PSPDFKit.ScrollMode.DISABLED");if(e.showSignatureValidationStatus!==c.W.IF_SIGNED&&e.showSignatureValidationStatus!==c.W.HAS_ERRORS&&e.showSignatureValidationStatus!==c.W.HAS_WARNINGS&&e.showSignatureValidationStatus!==c.W.NEVER)throw new r.p2("The supplied mode for showing the digital signature validation UI is not valid.");if("number"!=typeof e.spreadSpacing||e.spreadSpacing<0)throw new r.p2(`Expected \`spreadSpacing\` to be a positive number but instead got: ${e.spreadSpacing}.`);if("number"!=typeof e.pageSpacing||e.pageSpacing<0)throw new r.p2(`Expected \`pageSpacing\` to be a positive number but instead got: ${e.pageSpacing}.`);if("boolean"!=typeof e.keepFirstSpreadAsSinglePage)throw new r.p2(`Expected \`keepFirstSpreadAsSinglePage\` to be a boolean but instead got: ${e.keepFirstSpreadAsSinglePage}.`);if("number"!=typeof e.viewportPadding.vertical)throw new r.p2("The supplied viewportPadding has a missing property: vertical not found");if("number"!=typeof e.viewportPadding.horizontal)throw new r.p2("The supplied viewportPadding has a missing property: horizontal not found");if(e.viewportPadding.vertical<0||e.viewportPadding.horizontal<0)throw new r.p2("The supplied viewportPadding horizontal or vertical value is not a positive number");if("boolean"!=typeof e.allowPrinting)throw new r.p2("`allowPrinting` must be of type boolean.");if(i&&!0===e.allowPrinting&&!i.backendPermissions.downloadingAllowed)throw new r.p2("To enable printing, you need to authenticate the `download` permission in the JWT (See: https://pspdfkit.com/guides/web/server-backed/client-authentication/)");if("boolean"!=typeof e.allowExport)throw new r.p2("`allowExport` must be of type boolean.");if(i&&!0===e.allowExport&&!i.backendPermissions.downloadingAllowed)throw new r.p2("To enable PDF export, you need to authenticate the `download` permission in the JWT (See: https://pspdfkit.com/guides/web/server-backed/client-authentication/)");if("boolean"!=typeof e.previewRedactionMode)throw new r.p2("`previewRedactionMode` must be of type boolean.");if("boolean"!=typeof e.readOnly)throw new r.p2("`readOnly` must be of type boolean.");if(!i||!1!==e.readOnly||M.Options.IGNORE_DOCUMENT_PERMISSIONS||!i.backendPermissions.readOnly&&(i.documentPermissions.annotationsAndForms||i.documentPermissions.fillForms)||(e=e.set("readOnly",!0),(0,r.ZK)("Its not possible to change PSPDFKit.ViewState#readOnly to false if the current backend or document permissions do not allow it. For document permissions, you can override this behavior by setting the PSPDFKit.Options.IGNORE_DOCUMENT_PERMISSIONS option before initializing PSPDFKit.")),e.interactionMode&&Object.values(w.A).indexOf(e.interactionMode)<0)throw new r.p2(`The supplied interaction mode is not valid.\nValid view modes are: ${Object.keys(w.A).map((e=>`PSPDFKit.InteractionMode.${e}`)).join(", ")}`);if(null!=e.interactionMode){const t=B(e.interactionMode,i);null!=i&&(e.interactionMode===w.A.DOCUMENT_EDITOR&&(0,h.Xr)({features:i.features,backendPermissions:i.backendPermissions,documentPermissions:i.documentPermissions,readOnlyEnabled:i.readOnlyEnabled})||e.interactionMode===w.A.CONTENT_EDITOR&&(0,h.qs)({features:i.features,backendPermissions:i.backendPermissions,documentPermissions:i.documentPermissions,readOnlyEnabled:i.readOnlyEnabled}))||!e.readOnly||t.allowWhenInReadOnlyMode||((0,r.ZK)(`Cant set PSPDFKit.ViewState#interactionMode to ${e.interactionMode} when PSPDFKit.ViewState#readOnly is true.`),e=e.set("interactionMode",null))}if("boolean"!=typeof e.showAnnotations)throw new r.p2("`showAnnotations` must be of type boolean.");if(!1===e.showAnnotations&&!1===e.readOnly)throw new r.p2("In order to hide annotations, you must also enable read only mode.");if("boolean"!=typeof e.showComments)throw new r.p2("`showComments` must be of type boolean.");if("boolean"!=typeof e.showAnnotationNotes)throw new r.p2("`showAnnotationNotes` must be of type boolean.");if(e.sidebarMode&&Object.values(s.f).indexOf(e.sidebarMode)<0)throw new r.p2(`The supplied sidebar mode is not valid.\nValid view modes are: ${Object.keys(s.f).map((e=>`PSPDFKit.SidebarMode.${e}`)).join(", ")} or \`null\`.`);if(Object.values(l.d).indexOf(e.sidebarPlacement)<0)throw new r.p2(`The supplied sidebar placement is not valid.\nValid placements are: ${Object.keys(l.d).map((e=>`PSPDFKit.SidebarPlacement.${e}`)).join(" or ")}.`);if(null===(n=e.sidebarOptions)||void 0===n||!n[s.f.ANNOTATIONS])throw new r.p2("The supplied sidebar options configuration is missing the required `PSPDFKit.SidebarMode.ANNOTATIONS` property.");if(!Array.isArray(null===(o=e.sidebarOptions[s.f.ANNOTATIONS])||void 0===o?void 0:o.includeContent))throw new r.p2("The `includeContent` property is mandatory for the `PSPDFKit.SidebarMode.ANNOTATIONS` sidebar options and it must be an array");if(e.sidebarOptions[s.f.ANNOTATIONS].includeContent.length&&e.sidebarOptions[s.f.ANNOTATIONS].includeContent.some((e=>!(e.prototype instanceof E.q6)&&e!==E.sv)))throw new r.p2("The `includeContent` array can only contain annotations classes or `PSPDFKit.Comment` as possible values");if("boolean"!=typeof e.canScrollWhileDrawing)throw new r.p2("`canScrollWhileDrawing` must be of type boolean.");if("boolean"!=typeof e.keepSelectedTool)throw new r.p2("`keepSelectedTool` must be of type boolean.");if("number"!=typeof e.sidebarWidth)throw new r.p2("`sidebarWidth` must be of type number.");return e}},95651:(e,t,n)=>{"use strict";n.d(t,{A8:()=>ue,AC:()=>oe,B7:()=>be,CU:()=>fe,Dc:()=>U,Dl:()=>D,F3:()=>Z,Fp:()=>T,IO:()=>q,Jy:()=>ge,Km:()=>V,SY:()=>C,TL:()=>re,TW:()=>J,U7:()=>te,Vc:()=>W,Wj:()=>k,X5:()=>j,Xu:()=>Q,YV:()=>ye,_E:()=>E,_R:()=>ne,_k:()=>ve,a$:()=>G,aI:()=>$,bz:()=>A,d:()=>F,dk:()=>ce,eD:()=>ee,eJ:()=>me,fc:()=>L,fk:()=>O,hG:()=>K,ip:()=>R,lx:()=>B,oF:()=>de,om:()=>z,pe:()=>se,sH:()=>S,tM:()=>le,tl:()=>pe,ud:()=>P,vj:()=>Y,vk:()=>M,x2:()=>I,xU:()=>H,xc:()=>_,xp:()=>N,yU:()=>X,z1:()=>he});var o=n(84121),r=n(35369),i=n(47347),a=n(34997),s=n(66687),l=n(18146),c=n(41952),u=n(91859),d=n(97528),p=n(88804),f=n(35129),h=n(83634),m=n(39728),g=n(51731),v=n(20792),y=n(75669);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e){try{const t=localStorage.getItem(`persistedColors${e}`);if(t)try{return JSON.parse(t).map((e=>({color:new h.Z({r:e.color.r,g:e.color.g,b:e.color.b}),localization:e.localization})))}catch(e){return(0,i.ZK)(`Wrong color data stored in localStorage: ${e.message}`),[]}return[]}catch(e){return[]}}function P(e,t){return(0,i.kG)("number"==typeof t.pageIndex,"Annotation has no valid pageIndex"),(0,i.kG)(!e.annotations.has(t.id),`Annotation ID (${t.id}) is already known`),t.pageIndex<0||t.pageIndex>=e.pages.size?((0,i.ZK)(`Tried to add an annotation (ID: ${t.id}) with an out of bounds page index. This annotation was skipped.`),e):(t instanceof s.sK&&(0,i.kG)(Z(t.imageAttachmentId),"imageAttachmentId is not a valid hash or pdfObjectId"),e.withMutations((e=>{var n;t.id||(t=t.set("id",_())),e.setIn(["annotations",t.id],t),null!==(n=e.isAPStreamRendered)&&void 0!==n&&n.call(e,t)&&!ee(t)&&e.updateIn(["invalidAPStreams",t.pageIndex],(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,r.l4)();return e.add(t.id)})),x(e,t),(0,m._d)(e,t)})))}function E(e,t){(0,i.kG)("string"==typeof t.id,"Annotation has no valid id");const n=e.annotations.get(t.id);return(0,i.kG)(n instanceof s.q6,`Annotation with id ${t.id} not found and thus the update was ignored.`),e.withMutations((o=>{var i,a;null!=t.pageIndex&&x(o,t),!0!==t.noView&&!0!==t.hidden||!o.selectedAnnotationIds.has(t.id)||(o.delete("selectedAnnotationMode"),o.set("interactionMode",null),o.update("selectedAnnotationIds",(e=>e.filterNot((e=>e===t.id)))),o.update("hoverAnnotationIds",(e=>e.delete(t.id)))),o.setIn(["annotations",t.id],t);const s=e.activeAnnotationNote;s&&(null===(i=s.parentAnnotation)||void 0===i?void 0:i.id)===t.id&&(t.note?t.note!==s.text.value&&o.set("activeAnnotationNote",s.set("text",{format:"plain",value:t.note})):o.set("activeAnnotationNote",null));const l=e.hoverAnnotationNote;l&&(null===(a=l.parentAnnotation)||void 0===a?void 0:a.id)===t.id&&(t.note?t.note!==l.text.value&&o.set("hoverAnnotationNote",l.set("text",{format:"plain",value:t.note})):o.set("hoverAnnotationNote",null));const c=se((()=>o),t,(()=>{var e;null!==(e=o.isAPStreamRendered)&&void 0!==e&&e.call(o,t)&&oe(n,t)&&T(n)===T(t)&&o.updateIn(["invalidAPStreams",t.pageIndex],(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,r.l4)();return e.add(t.id)}))}));(0,m.GW)(o,n,t,c)}))}function x(e,t){return e.updateIn(["pages",t.pageIndex,"annotationIds"],(e=>e.add(t.id)))}function D(e,t){const n=e.annotations.get(t);return(0,i.kG)(n instanceof s.q6,"Annotation is unknown"),e.withMutations((o=>{var r,i,a;o.selectedAnnotationIds.has(t)&&(o.delete("selectedAnnotationMode"),o.interactionMode!==v.A.FORM_CREATOR&&o.set("interactionMode",null)),o.update("annotations",(e=>e.delete(t))),o.update("selectedAnnotationIds",(e=>e.filterNot((e=>e===t)))),o.update("annotationPresetIds",(e=>e.filterNot((e=>e===t)))),o.update("hoverAnnotationIds",(e=>e.delete(t))),null!==o.annotationsIdsToDelete&&o.update("annotationsIdsToDelete",(e=>null==e?void 0:e.filterNot((e=>e===t))));const s=e.activeAnnotationNote;s&&(null===(r=s.parentAnnotation)||void 0===r?void 0:r.id)===t&&o.set("activeAnnotationNote",null);const l=e.hoverAnnotationNote;if(l&&(null===(i=l.parentAnnotation)||void 0===i?void 0:i.id)===t&&o.set("hoverAnnotationNote",null),null==(null==n?void 0:n.pageIndex))return;o.deleteIn(["pages",n.pageIndex,"annotationIds",t]);const c=e.invalidAPStreams.get(n.pageIndex),u=(!c||!c.has(t))&&(null===(a=e.isAPStreamRendered)||void 0===a?void 0:a.call(e,n));(0,m.WF)(o,n,u),"number"==typeof n.pdfObjectId&&(o.deleteIn(["APStreamVariantsRollover",n.pdfObjectId]),o.deleteIn(["APStreamVariantsDown",n.pdfObjectId]))}))}function C(e,t){const{boundingBox:n}=e;if(e instanceof s.Qi){const e=n.getLocation(),o=(new p.sl).translate(e.scale(-1)).rotate(t).translate(e);return n.apply(o)}return n}function k(e,t,n){return(0,c.q)(C(e,t),n)}function O(e,t,n,o,r){var a;let l=e instanceof s.q6&&("points"in e&&(null===(a=e.points)||void 0===a?void 0:a.toJS())||"startPoint"in e&&e.startPoint&&e.endPoint&&[e.startPoint.toJS(),e.endPoint.toJS()]);if(W(e)){(0,i.kG)(e instanceof s.gd,"Callout annotation is not a TextAnnotation");const{callout:t}=e;(0,i.kG)(t,"Callout annotation has no callout");const{knee:n,start:o}=t;l=[o,n].map((e=>null==e?void 0:e.toJS()))}const u=(0,c.K)(o);return Array.isArray(l)?l.map((e=>({x:r+u+(e.x-t.left)*n,y:r+u+(e.y-t.top)*n}))):[]}function A(e){const t=null!=e.pageIndex;return e instanceof s.gd?t&&null!=e.text.value&&""!==e.text.value:e instanceof s.Hi||e instanceof s.om?t&&null!=e.points&&e.points.size>1:t}function T(e){return!1===e.noView&&!0!==e.hidden}function I(e){return!1===e.noPrint&&!0!==e.hidden}function F(e){return!(e instanceof s.Ih)}function M(e){return e?e.replace(/[A-Z]/g,"-$&").toLowerCase():null}const _=a.SK;function N(e,t){return function(e,t){return t.map((function(t){return e.get(t)})).filter(Boolean).toList()}(e,t.annotationIds)}function R(e){return e.boundingBox.setLocation(new s.E9)}const L=(0,r.D5)([["stroke-color","strokeColor"],["background-color","backgroundColor"],["color","color"],["fill-color","fillColor"],["font-color","fontColor"],["outline-color","outlineColor"]]);function B(e){var t;const n=_(),o=function(e){const t=e.currentItemPreset;return t&&e.annotationPresets.get(t)||{}}(e),r=w(w({},o),{},{id:n,name:n,creatorName:e.annotationCreatorName,createdAt:new Date,updatedAt:new Date});return e.group!==(null===(t=e.backend)||void 0===t?void 0:t.getDefaultGroup())&&(r.group=e.group),o.group&&o.group!==e.group&&(r.group=o.group),e.annotationToolbarColorPresets?L.reduce(((t,n,o)=>{const r=e.annotationToolbarColorPresets({propertyName:o,defaultAnnotationToolbarColorPresets:d.Options.COLOR_PRESETS});if(void 0===r)return t;const i=r.presets,a=S(L.get(o,o));return function(e,t){return e.some((e=>!t&&null===e.color||t&&e.color&&e.color.equals(t)))}([...i,...a],t[n])?t:w(w({},t),{},{[n]:i[0].color})}),r):r}function j(e,t){const n=e.annotations.get(t);return n?n instanceof s.o9?"line":n instanceof s.Xs?"ellipse":n instanceof s.b3?"rectangle":n instanceof s.om?"polyline":n instanceof s.Hi?"polygon":n instanceof s.Zc?"ink":n instanceof s.Qi?"note":n instanceof s.gd?"text":n instanceof s.sK?"image":n instanceof s.GI?"stamp":n instanceof s.x_?"widget":n instanceof s.FV?"highlight":n instanceof s.xu?"underline":n instanceof s.R9?"strikeout":n instanceof s.hL?"squiggle":n instanceof l.Z?"redaction":null:null}function z(e,t,n,o,r){const{width:a,height:l}=t,{currentPageIndex:c,pagesRotation:d}=e.viewportState,p=e.pages.get(c);(0,i.kG)(p,`Cannot find page at index ${c}`);const f=p.pageSize,h=Math.min(f.width*u.Bs/a,f.height*u.Bs/l,1);let m=a*h,g=l*h;return 90!==d&&270!==d||([m,g]=[g,m]),new s.sK(w(w({},B(e)),{},{pageIndex:c,imageAttachmentId:n,contentType:o,rotation:d,fileName:r,boundingBox:new s.UL({left:f.width/2-m/2,top:f.height/2-g/2,width:m,height:g})}))}function K(e,t,n){const{width:o,height:r}=t,{currentPageIndex:a,pagesRotation:l}=e.viewportState,c=e.pages.get(a);(0,i.kG)(c,`Cannot find page at index ${a}`);const d=c.pageSize,p=Math.min(d.width*u.Bs/o,d.height*u.Bs/r,1);let f=o*p,h=r*p;return 90!==l&&270!==l||([f,h]=[h,f]),new s.GI(w(w({},B(e)),{},{pageIndex:a,stampType:n.stampType,title:n.title,subtitle:n.subtitle,color:n.color,opacity:n.opacity,rotation:l,boundingBox:new s.UL({left:d.width/2-f/2,top:d.height/2-h/2,width:f,height:h})}))}function Z(e){return RegExp("^([A-Fa-f0-9]{64}|[0-9]+)$").test(e)}function U(e,t){let n=(0,r.D5)();return(Array.isArray(t)?t:[t]).forEach((t=>{if(t instanceof s.sK&&t.imageAttachmentId){const o=e.attachments.get(t.imageAttachmentId);o&&(n=n.set(t.imageAttachmentId,o))}})),n}function V(e){return e.locked?!e.locked:e instanceof s.om||e instanceof s.Hi||e instanceof s.o9||W(e)}function G(e){if(e.locked)return!e.locked;switch(e.constructor){case s.gd:return!W(e);case s.GI:return!0;default:return!1}}function W(e){var t;return e instanceof s.gd&&!(null===(t=e.callout)||void 0===t||!t.innerRectInset)}function q(e){return e.locked?!e.locked:e instanceof s.om||e instanceof s.Hi||e instanceof s.b3||e instanceof s.sK||e instanceof s.Zc||e instanceof s.Xs||e instanceof s.GI||e instanceof s.gd&&!W(e)||e instanceof s.x_||e instanceof s.R1}function H(e,t){const n=t.onAnnotationResizeStart?t.onAnnotationResizeStart(e):void 0;if(void 0!==n)return(0,i.kG)(!0===n.maintainAspectRatio||!1===n.maintainAspectRatio||null===n.maintainAspectRatio||void 0===n.maintainAspectRatio,"onAnnotationResizeStart should return a valid configuration or undefined"),!!n.maintainAspectRatio&&n.maintainAspectRatio;if(e.isShiftPressed)return!0;const o=e.annotation instanceof s.sK||e.annotation instanceof s.GI,r=[g.V.TOP_LEFT,g.V.TOP_RIGHT,g.V.BOTTOM_LEFT,g.V.BOTTOM_RIGHT];return!!(o&&r.includes(e.resizeAnchor)||"isSignature"in e.annotation&&e.annotation.isSignature)}function $(e,t){const n=t.onAnnotationResizeStart?t.onAnnotationResizeStart(e):void 0;return n&&(n.minHeight&&n.minHeight<0&&((0,i.ZK)("minimum height in the onAnnotationResizeStart API should be greater than 0"),n.minHeight=void 0),n.maxHeight&&n.maxHeight<0&&((0,i.ZK)("maximum height in the onAnnotationResizeStart API should be greater than 0"),n.maxHeight=void 0),n.maxWidth&&n.maxWidth<0&&((0,i.ZK)("maximum width in the onAnnotationResizeStart API should be greater than 0"),n.maxWidth=void 0),n.minWidth&&n.minWidth<0&&((0,i.ZK)("maximum width in the onAnnotationResizeStart API should be greater than 0"),n.minWidth=void 0),n.maxHeight&&n.minHeight&&n.maxHeight<n.minHeight&&((0,i.ZK)("maximum Height parameter should be greater than the minimum Height parameter in onAnnotationResizeStart API"),n.maxHeight=void 0,n.minHeight=void 0),n.maxWidth&&n.minWidth&&n.maxWidth<n.minWidth&&((0,i.ZK)("maximum Width parameter should be greater than the minimum Width parameter in onAnnotationResizeStart API"),n.maxWidth=void 0,n.minWidth=void 0)),{maxHeight:null==n?void 0:n.maxHeight,maxWidth:null==n?void 0:n.maxWidth,minWidth:null==n?void 0:n.minWidth,minHeight:null==n?void 0:n.minHeight}}function X(e){return e instanceof s.om||e instanceof s.Hi||e instanceof s.o9||e instanceof s.b3||e instanceof s.sK||e instanceof s.Zc||e instanceof s.Xs||e instanceof s.GI||e instanceof s.gd||e instanceof s.x_||e instanceof s.Qi||e instanceof s.Jn||e instanceof s.R1}function Y(e){return e instanceof s.om||e instanceof s.Hi||e instanceof s.b3||e instanceof s.sK||e instanceof s.Zc||e instanceof s.Xs||e instanceof s.GI||e instanceof s.gd||e instanceof s.x_||e instanceof l.Z||e instanceof s.R1||e instanceof s.Ih}function J(e,t){let n=!1;return t.emit("annotations.press",w(w({},e),{},{preventDefault:()=>{e.nativeEvent.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),n=!0}})),n}function Q(e){e.selectedAnnotationIds.forEach((t=>{e.deleteIn(["annotationPresetIds"],t)}))}function ee(e){return"number"==typeof e.pdfObjectId}function te(e){return e.width>0&&e.height>0}function ne(e,t){return!(e instanceof s.GI||e instanceof s.Ih||e instanceof s.sK||e instanceof s.x_&&t instanceof s.Yo)}function oe(e,t){return!(0,r.is)(R(e),R(t))||e.opacity!==t.opacity||e.rotation!==t.rotation||T(e)!==T(t)||(t instanceof s.sK&&e instanceof s.sK&&e.imageAttachmentId!==t.imageAttachmentId||(!(!(t instanceof s.UX&&e instanceof s.UX)||e.strokeWidth===t.strokeWidth&&ie(e.strokeColor,t.strokeColor)&&ie(e.fillColor,t.fillColor)&&(!t.strokeDashArray||e.strokeDashArray&&!t.strokeDashArray.some(((t,n)=>void 0===e.strokeDashArray[n]||t!==e.strokeDashArray[n]))))||(!(!(t instanceof s.UX&&e instanceof s.UX&&t.isMeasurement())||e.measurementScale===t.measurementScale&&e.measurementPrecision===t.measurementPrecision)||((t instanceof s.b3||t instanceof s.Xs)&&(e instanceof s.b3||e instanceof s.Xs)&&(t.cloudyBorderInset!==e.cloudyBorderInset||t.cloudyBorderIntensity!==e.cloudyBorderIntensity)||(!!((t instanceof s.o9||t instanceof s.om)&&(e instanceof s.o9||e instanceof s.om)&&t.lineCaps&&(!e.lineCaps||t.lineCaps.start!==e.lineCaps.start||t.lineCaps.end!==e.lineCaps.end)||!t.lineCaps&&e.lineCaps)||(!!(t instanceof s.o9&&ae(e,t))||(!!((t instanceof s.om||t instanceof s.Hi)&&(e instanceof s.om||e instanceof s.Hi)&&ae(e,t))||(t instanceof s.Zc&&e instanceof s.Zc&&(e.lineWidth!==t.lineWidth||!ie(e.strokeColor,t.strokeColor)||!ie(e.backgroundColor,t.backgroundColor)||e.blendMode!==t.blendMode)||(t instanceof s.gd&&e instanceof s.gd&&(e.text.value!==t.text.value||e.fontSize!==t.fontSize||e.font!==t.font||!ie(e.fontColor,t.fontColor)||!ie(e.backgroundColor,t.backgroundColor)||e.isBold!==t.isBold||e.isItalic!==t.isItalic||e.horizontalAlign!==t.horizontalAlign||e.verticalAlign!==t.verticalAlign||e.borderWidth!==t.borderWidth||e.borderStyle!==t.borderStyle)||(t instanceof s.Qi&&e instanceof s.Qi&&(!ie(t.color,e.color)||e.icon!==t.icon)||t instanceof s.On&&e instanceof s.On&&(e.blendMode!==t.blendMode||!ie(e.color,t.color)||e.rects!==t.rects)))))))))))}function re(e,t){return(null==e?void 0:e.readOnly)!==(null==t?void 0:t.readOnly)}function ie(e,t){return e instanceof h.Z&&t instanceof h.Z?e.equals(t):!(e instanceof h.Z||t instanceof h.Z)}function ae(e,t){if(e instanceof s.o9&&t instanceof s.o9){if(t.startPoint!==e.startPoint||t.endPoint!==e.endPoint)return!(t.startPoint.x-e.startPoint.x==t.boundingBox.left-e.boundingBox.left&&t.startPoint.y-e.startPoint.y==t.boundingBox.top-e.boundingBox.top)}else if((e instanceof s.om||e instanceof s.Hi)&&(t instanceof s.om||t instanceof s.Hi))return!(e.points.size===t.points.size&&e.points.every(((n,o)=>{const r=t.points.get(o);return(0,i.kG)(r&&n),r.x-n.x==t.boundingBox.left-e.boundingBox.left&&r.y-n.y==t.boundingBox.top-e.boundingBox.top})));return!1}function se(e,t,n){const{invalidAPStreams:o}=e();let r=!1,i=o.get(t.pageIndex);i&&(r=!!i.get(t.id)),n();const{invalidAPStreams:a,annotations:s}=e(),l=s.get(t.id);if(!l)return!r;let c=!1;return i=a.get(l.pageIndex),i&&(c=!!i.get(l.id)),!r&&c}function le(e,t,n){(0,i.kG)(e.backend);const{invalidAPStreams:o,historyIdsMap:r,isHistoryEnabled:a,backend:s}=e,l=t.get(n.pageIndex),c=o.get(n.pageIndex);return!a||"STANDALONE"!==(null==s?void 0:s.type)||l&&l.has(n.id)||!c||!c.has(n.id)?n:n.set("APStreamCache",{cache:r.get(n.id)||n.id})}function ce(e,t){(0,i.kG)(e.backend);const{historyIdsMap:n,isHistoryEnabled:o,backend:r}=e;return o&&"STANDALONE"===(null==r?void 0:r.type)?t.set("APStreamCache",{cache:n.get(t.id)||t.id}):t}const ue="rgba(70, 54, 227, 0.5) solid 2px";function de(e){const{id:t,pdfObjectId:n}=e;return e=>e===(null==n?void 0:n.toString())||e===t}function pe(e,t){let{backend:n,annotations:o}=e;t.forEach((e=>{const t=o.get(e.id);t&&oe(t,e)&&(null==n||n.clearPageAPStreams(t.pageIndex,(0,r.l4)([t.id])))}))}function fe(e,t,n){let{backend:o,formFields:i}=e;t.forEach((e=>{const t=i.get(e.formFieldName);t&&re(t,n)&&(null==o||o.clearPageAPStreams(e.pageIndex,(0,r.l4)([e.id])))}))}const he=Object.freeze({CLOCKWISE:"CLOCKWISE",COUNTERCLOCKWISE:"COUNTERCLOCKWISE"});function me(e,t,n){const{rotation:o,boundingBox:r}=e,i=r.getCenter();let a=new s.E9({x:Math.max(0,i.x-r.height/2),y:Math.max(0,i.y-r.width/2)});a.x+r.height>t.width&&(a=a.set("x",t.width-r.height)),a.y+r.width>t.height&&(a=a.set("y",t.height-r.width));const l=e.set("boundingBox",r.withMutations((e=>{e.height=r.width,e.width=r.height,e.left=a.x,e.top=a.y})));if(n){const e=n===he.CLOCKWISE;switch(o){case 0:return l.set("rotation",e?270:90);case 90:return l.set("rotation",e?0:180);case 180:return l.set("rotation",e?90:270);case 270:return l.set("rotation",e?180:0)}}return l}function ge(e){return s.UL.union(e.map((e=>(0,y.o0)(e)?(0,y.az)(e).boundingBox:e.boundingBox)))}function ve(e,t){if(e instanceof s.x_)return"widget";if(Object.keys(f.Z).includes(e.constructor.readableName.toLowerCase()+"Annotation")){const n=function(e){if(e instanceof s.Jn)return f.Z.comment.id;const t=e.constructor.readableName.toLowerCase()+"Annotation";return f.Z[t].id}(e);return t(f.Z[n])}return e.constructor.readableName.toLowerCase()}function ye(e){return!(e instanceof s.UX&&e.isMeasurement())}function be(e,t){return null!=t&&t.isAnnotationNote?e.readOnly?"not-allowed":"inherit":e instanceof s.gd?e.readOnly?"not-allowed":e.locked?"text":e.lockedContents?"pointer":(null==t?void 0:t.cursor)||(null!=t&&t.isSelectable?"pointer":"auto"):e instanceof s.GI?e.readOnly||e.locked?"not-allowed":(null==t?void 0:t.cursor)||(null!=t&&t.isSelectable?"pointer":"auto"):e instanceof s.Zc?e.readOnly||e.locked?"not-allowed":e.lockedContents?"pointer":"inherit":e instanceof s.R1?e.locked?"pointer":"inherit":e instanceof s.Qi&&null!=t&&t.isExpandedNote?e.readOnly||e.locked&&e.lockedContents?"not-allowed":e.locked?"text":e.lockedContents?"not-allowed":t.isSelectable?"pointer":"auto":e.readOnly||e.locked&&e.lockedContents||e.locked?"not-allowed":e.lockedContents||null!=t&&t.isSelectable||null!=t&&t.isSelected?"pointer":"auto"}},37015:(e,t,n)=>{"use strict";function o(e){const t=new FileReader;return new Promise(((n,o)=>{t.onerror=e=>{o(new Error(e))},t.onload=e=>{var t;n(new Uint8Array(null===(t=e.target)||void 0===t?void 0:t.result))},t.readAsArrayBuffer(e)}))}n.d(t,{V:()=>o})},47825:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n(34997).SK},36095:(e,t,n)=>{"use strict";function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return e.indexOf("Trident/")>-1?"trident":e.indexOf("Edge/")>-1?"edge":e.indexOf("Chrome/")>-1?"blink":e.indexOf("AppleWebKit/")>-1?"webkit":e.indexOf("Gecko/")>-1?"gecko":"unknown"}function r(e,t){const n=new RegExp(` ${t}/(\\d+)\\.*`);let o;return(o=e.match(n))?Number(o[1]):0}function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:navigator.platform,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:navigator.maxTouchPoints;return t.indexOf("MacIntel")>-1&&n>1?"ios":e.indexOf("Win")>-1?"windows":e.indexOf("iPhone")>-1||e.indexOf("iPad")>-1?"ios":e.indexOf("Mac")>-1?"macos":e.indexOf("Android")>-1?"android":e.indexOf("Linux")>-1?"linux":"unknown"}n.d(t,{By:()=>s,Dt:()=>m,G6:()=>c,Mn:()=>w,Ni:()=>l,SR:()=>a,TL:()=>h,V5:()=>S,b1:()=>b,b5:()=>g,fq:()=>p,i7:()=>d,rO:()=>f,vU:()=>u,yx:()=>v});const a=o(),s=i(),l=(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;switch(o(e)){case"trident":return r(e,"Trident");case"edge":return r(e,"Edge");case"blink":return r(e,"Chrome");case"webkit":return r(e,"Version");case"gecko":return r(e,"Firefox");default:;}}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o();return"ios"===e||"android"===e||v(t)}()),c="webkit"===a,u="gecko"===a,d="blink"===a,p="trident"===a,f="edge"===a,h="ios"===s||v(),m="android"===s,g=d&&m;function v(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o();return("undefined"==typeof window||!window.PSPDFKIT_PLAYWRIGHT_TEST)&&("webkit"===e&&"undefined"!=typeof TouchEvent)}let y;function b(){return void 0===y&&(y="ontouchstart"in window||navigator.maxTouchPoints>0),y}"undefined"!=typeof window&&(window.addEventListener("mousemove",(function e(){y=!1,window.removeEventListener("mousemove",e)})),window.addEventListener("pointermove",(function e(t){"mouse"!==t.pointerType&&"pen"!==t.pointerType||(y=!1),window.removeEventListener("pointermove",e)})));const w=!1,S=/Mac/i.test(navigator.platform)},10284:(e,t,n)=>{"use strict";n.d(t,{CM:()=>i,Kd:()=>a,Ss:()=>l,ev:()=>u,iR:()=>c,kR:()=>s,mi:()=>r,os:()=>d,uW:()=>p});var o=n(47347);function r(e,t){return(0,o.kG)(t.backend),!t.backend.isCollaborationPermissionsEnabled()||null==e.pageIndex||"boolean"!=typeof e.canReply||e.isCommentThreadRoot&&e.canReply}function i(e,t){return(0,o.kG)(t.backend),!t.backend.isCollaborationPermissionsEnabled()||null==e.pageIndex||"boolean"!=typeof e.isEditable||e.isEditable}function a(e,t){return(0,o.kG)(t.backend),!t.backend.isCollaborationPermissionsEnabled()||null==e.pageIndex||"boolean"!=typeof e.isDeletable||e.isDeletable}function s(e,t){return(0,o.kG)(t.backend),!t.backend.isCollaborationPermissionsEnabled()||null==e.pageIndex||"boolean"!=typeof e.isEditable||e.isEditable}function l(e,t){return(0,o.kG)(t.backend),!t.backend.isCollaborationPermissionsEnabled()||null==e.pageIndex||"boolean"!=typeof e.isDeletable||e.isDeletable}function c(e,t){return(0,o.kG)(t.backend),!t.backend.isCollaborationPermissionsEnabled()||"boolean"!=typeof e.isEditable||e.isEditable}function u(e,t){return(0,o.kG)(t.backend),!t.backend.isCollaborationPermissionsEnabled()||"boolean"!=typeof e.isDeletable||e.isDeletable}function d(e,t){return(0,o.kG)(t.backend),!t.backend.isCollaborationPermissionsEnabled()||"boolean"!=typeof e.isFillable||e.isFillable}function p(e,t){return(0,o.kG)(t.backend),!(!t.backend.isCollaborationPermissionsEnabled()||"boolean"!=typeof e.canSetGroup)&&e.canSetGroup}},62164:(e,t,n)=>{"use strict";n.d(t,{Y7:()=>p,_P:()=>v,dq:()=>h,kT:()=>m,kx:()=>d,nN:()=>g,oK:()=>f});var o=n(27515),r=n(71693),i=n(88804),a=n(91859),s=n(47710),l=n(87222),c=n(19815),u=n(97413);const d="The feature you're trying to use requires a comments license. Comments is a component of PSPDFKit for Web and sold separately.";function p(e){let{showComments:t,commentThreads:n,features:o,backend:r}=e;return t&&n.size>0&&(0,c.LC)({features:o,backend:r})}function f(e){let{showComments:t,features:n,backend:o}=e;return t&&(0,c.LC)({features:n,backend:o})}function h(e){if(!p(e))return null;const{viewportState:t}=e;return e.containerRect.width>a.xD?t.scrollMode!==s.G.PER_SPREAD&&t.scrollMode!==s.G.DISABLED||function(e,t){let{viewportState:n,pages:o,commentThreads:i}=e;return(0,r.P1)(n,(0,r.dF)(n,t)).some((e=>{const t=o.get(e);return!!t&&t.annotationIds.some((e=>i.has(e)))}))}(e,e.viewportState.currentPageIndex)?l._.SIDEBAR:null:e.selectedAnnotationIds.size>0&&e.selectedAnnotationIds.some((t=>!!e.commentThreads.get(t)))?l._.PANE:null}const m=e=>null==e.pageIndex;function g(e,t){const n=(0,r.dF)(t,e.pageIndex);let a=i.sl.IDENTITY;if(t.scrollMode===s.G.CONTINUOUS){const e=(0,r.e8)(t,n);a=a.translateY(e)}return a=(0,o._4)(a,t),e.boundingBox.apply(a).top}const v=(e,t)=>{let n=!1;const o=e.last();if(null!=o){const e=t.get(o);(0,u.k)(null!=e),n=m(e)}return n}},72643:(e,t,n)=>{"use strict";n.d(t,{AK:()=>u,Aq:()=>c,Gp:()=>l,Im:()=>h,Tl:()=>m,_v:()=>y,sz:()=>d,uB:()=>b,yK:()=>p,z8:()=>f});var o=n(35369),r=n(68218),i=n(88804),a=n(12671);n(60132);function s(e){return{textBlockId:e.id,anchor:(0,a.X$)(e.anchor),globalEffects:(0,a.uE)(e.globalEffects),externalControlState:(0,a.hH)(e)}}function l(e){const t=[];for(const n of e.pageStates.toList()){const e=new Map(n.textBlocks.map((e=>[e.id,e])));for(const o of n.initialTextBlocks)e.has(o.id)||t.push(s(o));for(const e of n.textBlocks){(!(0,o.is)(e.anchor,e.initialAnchor)||!(0,o.is)(e.globalEffects,e.initialGlobalEffects)||!(0,o.is)(e.layout,e.initialLayout)||e.version)&&t.push(s(e))}}return t}const c="The API you're trying to use requires a content editor license. Content editor is a component of PSPDFKit for Web and sold separately.";const u=[4,6,8,10,12,14,16,18,20,24,32,36,48,64,72,96,144,192,200];function d(e,t){return new r.UL({offset:new r.Sg({x:e.offset.x*t,y:e.offset.y*t}),size:new r.Sg({x:e.size.x*t,y:e.size.y*t})})}function p(e,t,n){return new r.UL({offset:new r.Sg({x:e.offset.x+t.x*n,y:e.offset.y+t.y*n}),size:e.size})}function f(e){let t="";for(const n of e)t+=n.text;return t}const h=0,m=1,g=e=>{switch(e){case"begin":case"justified":return h;case"end":return m;case"center":return.5}},v=(e,t,n)=>{const o=(e=>(new i.sl).rotateRad(e.rotation).scale(1,e.flipY?-1:1))(e),a=o.applyToVector([n*t,0]);return new r.Sg({x:a[0],y:a[1]})},y=(e,t,n)=>(t-g(e))*n,b=(e,t,n,o)=>{const r=g(e)-n;return v(t,r,o)}},80857:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var o=n(47347);const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(t,n){if(!t)throw new o.p2(""===e?n:`${e}: ${n}`)}}},7921:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r,k:()=>i});var o=n(35369);function r(e,t){let n;return function(){for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];const a=this;n&&clearTimeout(n),n=setTimeout((()=>{n=null,e.apply(a,r)}),t)}}function i(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(0,o.aV)();function i(e){const t=r;r=r.clear(),e.then((e=>{t.forEach((t=>{t.resolve(e)}))})).catch((e=>{t.forEach((t=>{t.reject(e)}))}))}return function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];const l=this;return t&&clearTimeout(t),t=setTimeout((()=>{t=null,i(e.apply(l,a))}),n),new Promise(((e,t)=>{r=r.push({resolve:e,reject:t})}))}}},91039:(e,t,n)=>{"use strict";n.d(t,{sM:()=>h,uF:()=>f,Zt:()=>m,jI:()=>p,tK:()=>w,w2:()=>g});var o=n(47347),r=n(19575),i=n(76367),a=n(64494),s=n(66687),l=n(60132),c=n(26248),u=n(37231);const d=["application/pdf","image/png","image/jpeg"];function p(e,t){if(t===a.W.IF_SIGNED&&e.status!==i._.not_signed)return!0;if(t===a.W.HAS_ERRORS&&e.status===i._.error)return!0;const n=e.status===i._.valid&&e.documentModifiedSinceSignature;return!(t!==a.W.HAS_WARNINGS||e.status!==i._.warning&&e.status!==i._.error&&!n)}function f(e){if("string"==typeof e)return r.Base64.encode(e);if(e instanceof ArrayBuffer)return h(e);throw(0,o.Rz)(e)}function h(e){let t="";const n=new Uint8Array(e),o=n.byteLength;for(let e=0;e<o;e++)t+=String.fromCharCode(n[e]);return btoa(t)}function m(e,t){return!!(e.features.includes(l.q.DIGITAL_SIGNATURES)&&t instanceof s.x_&&"number"==typeof t.pdfObjectId&&e.digitalSignatures&&e.digitalSignatures.signatures&&e.digitalSignatures.signatures.some((e=>{let{signatureFormFQN:n}=e;return n===t.formFieldName}))&&e.formFields.has(t.formFieldName))}function g(e,t){e&&t&&"STANDALONE"===t.type&&((0,o.kG)(void 0===e.placeholderSize||"number"==typeof e.placeholderSize,"`placeholderSize` must be a number."),(0,o.kG)(void 0===e.flatten||"boolean"==typeof e.flatten,"`flatten` must be a boolean."),(0,o.kG)(void 0===e.formFieldName||"string"==typeof e.formFieldName,"`formFieldName` must be a string."),(0,o.kG)(void 0===e.formFieldName||void 0===e.position,"`formFieldName` and `position` cannot be used together."),v(e.position),y(e.appearance),b(e.signatureMetadata),function(e){if(!e)return;(0,o.kG)(!e.signatureType||e.signatureType===c.BG.CMS||Array.isArray(e.certificates)&&e.certificates.length>0&&e.certificates.every((e=>Boolean(e instanceof ArrayBuffer&&e.byteLength>0||"string"==typeof e&&e.length>0))),"For signatures of type `PSPDFKit.SignatureType.CAdES` an `Array` of certificates must be provided in `signaturePreparationData.signingData.certificates`."),(0,o.kG)(void 0===e.privateKey||"string"==typeof e.privateKey&&e.privateKey.length>0,"`signingData.privateKey` must be a non-empty string if provided."),(0,o.kG)(Object.values(c.BG).includes(e.signatureType),`\`signingData.signatureType\` must be a valid \`PSPDFKit.SignatureType\` value. \`${e.signatureType}\` was provided instead.`)}(e.signingData))}function v(e){e&&((0,o.kG)("number"==typeof e.pageIndex,"`pageIndex` must be a number."),(0,o.kG)(e.boundingBox instanceof s.UL,"`boundingBox` must be a PSPDFKit.Geometry.Rect instance."))}function y(e){var t;e&&((0,o.kG)(void 0===e.mode||e.mode in u.H,"`mode` must be a valid PSPDFKit.SignatureAppearanceMode value."),(0,o.kG)(void 0===e.showSigner||"boolean"==typeof e.showSigner,"`showSigner` must be a boolean."),(0,o.kG)(void 0===e.showSignDate||"boolean"==typeof e.showSignDate,"`showSignDate` must be a boolean."),(0,o.kG)(void 0===e.showReason||"boolean"==typeof e.showReason,"`showReason` must be a boolean."),(0,o.kG)(void 0===e.showLocation||"boolean"==typeof e.showLocation,"`showLocation` must be a boolean."),(0,o.kG)(void 0===e.showWatermark||"boolean"==typeof e.showWatermark,"`showWatermark` must be a boolean."),(0,o.kG)(void 0===e.watermarkImage||"Blob"===e.watermarkImage.constructor.name||"File"===e.watermarkImage.constructor.name,"`image` must be a Blob or File."),(0,o.kG)(void 0===e.watermarkImage||d.includes(e.watermarkImage.type),`The image type must be one of the supported formats: ${d.join(", ")}, provided: ${null===(t=e.watermarkImage)||void 0===t?void 0:t.type}.`))}function b(e){e&&((0,o.kG)(void 0===e.signerName||"string"==typeof e.signerName,"`signerName` must be a string."),(0,o.kG)(void 0===e.signatureReason||"string"==typeof e.signatureReason,"`signatureReason` must be a string."),(0,o.kG)(void 0===e.signatureLocation||"string"==typeof e.signatureLocation,"`signatureLocation` must be a string."))}function w(e){var t,n,r,i;e&&((0,o.kG)(!("placeholderSize"in e)||"number"==typeof e.placeholderSize&&e.placeholderSize>0,`Invalid \`placeholderSize\` for signature preparation data. Must be of type \`number\` and greater than \`0\` if present. Provided: ${e.placeholderSize}.`),(0,o.kG)(!("flatten"in e)||"boolean"==typeof e.flatten,`Invalid \`flatten\` for signature preparation data. Must be of type \`boolean\` if present. Provided: ${e.flatten}.`),(0,o.kG)(!("signatureMetadata"in e)||"object"==typeof e.signatureMetadata,`Invalid \`signatureMetadata\` for signature preparation data. Must be of type \`object\` if present. Provided: ${e.signatureMetadata}.`),"signatureMetadata"in e&&b(e.signatureMetadata),(0,o.kG)(!("position"in e)||"object"==typeof e.position,`Invalid \`position\` for signature preparation data. Must be of type \`object\` if present. Provided: ${e.position}.`),"position"in e&&v(e.position),(0,o.kG)(!("appearance"in e)||"object"==typeof e.appearance,`Invalid \`appearance\` for signature preparation data. Must be of type \`object\` if present. Provided: ${e.appearance}.`),"appearance"in e&&y(e.appearance),(0,o.kG)(!("formFieldName"in e)||"string"==typeof e.formFieldName&&e.formFieldName.trim().length>0,`Invalid \`formFieldName\` for signature preparation data. Must be a non-empty \`string\` if present. Provided: ${e.formFieldName}.`),(0,o.kG)(!e.signingData||!("signatureContainer"in e.signingData)||(null===(t=e.signingData)||void 0===t?void 0:t.signatureContainer)&&Object.values(c.FR).includes(e.signingData.signatureContainer),`Invalid \`signingData.signatureContainer\`. Must be either \`raw\` or \`pkcs7\` if present. Provided: ${null===(n=e.signingData)||void 0===n?void 0:n.signatureContainer}.`),(0,o.kG)(!e.signingData||!("signatureType"in e.signingData)||(null===(r=e.signingData)||void 0===r?void 0:r.signatureType)&&Object.values(c.BG).includes(e.signingData.signatureType),`Invalid \`signingData.signatureType\`. Must be either \`CMS\` or \`CAdES\` if present. Provided: ${null===(i=e.signingData)||void 0===i?void 0:i.signatureType}.`))}},30761:(e,t,n)=>{"use strict";n.d(t,{D4:()=>xe,jX:()=>Se});var o=n(84121),r=n(30845),i=n(67366),a=n(35369),s=n(47347),l=n(30570),c=n(14012),u=n(96114),d=n(66687),p=n(83253),f=n(29165),h=n(20234),m=n(76192),g=n(95651),v=n(96846),y=n(15973);class b{constructor(e,t){this.annotationProvider=e,this.localAnnotationCallbacks=t}createBackendObject(e,t){return(0,s.kG)(!(e instanceof y.Hu),"Media annotations cannot be created nor updated, only deleted."),!this.annotationProvider.canCreateBackendOrphanWidgets&&e instanceof d.x_?Promise.resolve():this.annotationProvider.createAnnotation(e,(null==t?void 0:t.attachments)||(0,a.D5)())}updateBackendObject(e,t){return(0,s.kG)(!(e instanceof y.Hu),"Media annotations cannot be created nor updated, only deleted."),this.annotationProvider.updateAnnotation(e,(null==t?void 0:t.attachments)||(0,a.D5)())}deleteBackendObject(e){return this.annotationProvider.deleteAnnotation(e)}createStoreObjects(e,t){this.localAnnotationCallbacks.createAnnotations(e,(null==t?void 0:t.attachments)||(0,a.D5)())}updateStoreObjects(e){this.localAnnotationCallbacks.updateAnnotations(e)}deleteStoreObjects(e){this.localAnnotationCallbacks.deleteAnnotations(e)}validateObject(e){return(0,g.bz)(e)}getObjectById(e){return this.localAnnotationCallbacks.getAnnotationById(e)}getObjectId(e){return e.id}refresh(){this.localAnnotationCallbacks.refreshSignaturesInfo()}syncChanges(){return this.annotationProvider.syncChanges()}}class w extends v.a{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m.u.IMMEDIATE,o=arguments.length>3?arguments[3]:void 0;super(new b(e,t),n,o),this.annotationProvider=e}loadAnnotationsForPageIndex(e){return this.annotationProvider.loadAnnotationsForPageIndex(e)}}var S=n(1053);class P{constructor(e,t){(0,o.Z)(this,"localBookmarks",(0,a.D5)()),(0,o.Z)(this,"onCreate",(e=>{this.localBookmarks=this.localBookmarks.set(e.id,e)})),(0,o.Z)(this,"onUpdate",(e=>{this.onCreate(e)})),(0,o.Z)(this,"onDelete",(e=>{this.localBookmarks=this.localBookmarks.delete(e.id)})),this.bookmarkProvider=e,this.localBookmarkCallbacks=t}createBackendObject(e){return this.bookmarkProvider.createBookmark(e)}updateBackendObject(e){return this.bookmarkProvider.updateBookmark(e)}deleteBackendObject(e){return this.bookmarkProvider.deleteBookmark(e.id)}createStoreObjects(e){this.localBookmarks=this.localBookmarks.withMutations((t=>{e.forEach((e=>{t.set(e.id,e)}))}))}updateStoreObjects(e){this.createStoreObjects(e)}deleteStoreObjects(e){this.localBookmarks=this.localBookmarks.withMutations((t=>{e.forEach((e=>{t.delete(e)}))}))}validateObject(e){if(!e.id||"string"!=typeof e.id)return!1;try{return(0,S.G)(e),!0}catch(e){return!1}}getObjectById(e){return this.localBookmarks.get(e)}getObjectId(e){return e.id}refresh(){this.localBookmarkCallbacks.refreshSignaturesInfo()}syncChanges(){return this.bookmarkProvider.syncChanges()}}class E extends v.a{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m.u.IMMEDIATE,r=arguments.length>3?arguments[3]:void 0;super(new P(e,t),n,r),(0,o.Z)(this,"getBookmarks",function(){let e=null;return async function(){return e||(e=this.bookmarkProvider.loadBookmarks()),await e,this.getLocalBookmarks()}}()),this.bookmarkProvider=e}getLocalBookmarks(){return this._callbacks.localBookmarks}}var x=n(8503),D=n(11863);class C{constructor(e,t){(0,o.Z)(this,"localComments",(0,a.D5)()),(0,o.Z)(this,"onCreate",(e=>{(0,s.kG)(e.id),this.localComments=this.localComments.set(e.id,e)})),(0,o.Z)(this,"onUpdate",(e=>{this.onCreate(e)})),(0,o.Z)(this,"onDelete",(e=>{(0,s.kG)(e.id),this.localComments=this.localComments.delete(e.id)})),this.commentProvider=e,this.localCommentCallbacks=t}createBackendObject(e,t){return this.commentProvider.createComment(e,t.comments,t.annotations)}updateBackendObject(e,t){return this.commentProvider.updateComment(e,t.comments,t.annotations)}deleteBackendObject(e,t){return(0,s.kG)(e.id),this.commentProvider.deleteComment(e.id,t.comments,t.annotations)}createStoreObjects(e){this.localComments=this.localComments.withMutations((t=>{e.forEach((e=>{(0,s.kG)(e.id),t.set(e.id,e)}))})),this.localCommentCallbacks.createComments(e)}updateStoreObjects(e){this.localComments=this.localComments.withMutations((t=>{e.forEach((e=>{(0,s.kG)(e.id),t.set(e.id,e)}))})),this.localCommentCallbacks.updateComments(e)}deleteStoreObjects(e){this.localComments=this.localComments.withMutations((t=>{e.forEach((e=>{t.delete(e)}))})),this.localCommentCallbacks.deleteComments(e)}validateObject(e){try{return(0,D.Gu)(e),!0}catch(e){return!1}}getObjectById(e){return this.localComments.get(e)}getObjectId(e){return(0,s.kG)(e.id),e.id}refresh(){this.localCommentCallbacks.refreshSignaturesInfo()}syncChanges(){return this.commentProvider.syncChanges()}}class k extends v.a{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m.u.IMMEDIATE,o=arguments.length>3?arguments[3]:void 0;super(new C(e,t),n,o),this.commentProvider=e}async loadComments(){let e=null;e||(e=this.commentProvider.loadComments?this.commentProvider.loadComments():Promise.resolve()),await e}}var O=n(11032);class A{constructor(e,t){this.formFieldValueProvider=e,this.localFormFieldValueCallbacks=t}createBackendObject(e){return this.formFieldValueProvider.createFormFieldValue(e)}updateBackendObject(e){return this.formFieldValueProvider.setFormFieldValue(e)}deleteBackendObject(e){return this.formFieldValueProvider.deleteFormFieldValue((0,O.X)(e))}createStoreObjects(e){this.localFormFieldValueCallbacks.createFormFieldValues(e)}updateStoreObjects(e){this.localFormFieldValueCallbacks.setFormFieldValues(e)}deleteStoreObjects(e){this.localFormFieldValueCallbacks.deleteFormFieldValues(e)}getObjectById(){return null}getObjectId(e){return e.name}validateObject(){return!0}refresh(){this.localFormFieldValueCallbacks.refreshSignaturesInfo()}syncChanges(){return this.formFieldValueProvider.syncChanges()}}class T extends v.a{_getSupportedEvents(){return[...super._getSupportedEvents(),"willSubmit","didSubmit"]}constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m.u.IMMEDIATE,o=arguments.length>3?arguments[3]:void 0;super(new A(e,t),n===m.u.INTELLIGENT?m.u.IMMEDIATE:n,o)}createObject(e){const t=this.lockSave();try{this._saveModeQueue.createObject(this._createSaveQueueObject(e.name,e)),this._createdObjects=this._createdObjects.set(e.name,e)}finally{t()}}updateObject(e){const t=this.lockSave();try{this._saveModeQueue.updateObject(this._createSaveQueueObject(e.name,e)),this._updatedObjects=this._updatedObjects.set(e.name,e)}finally{t()}}deleteObject(e){const t=this.lockSave();try{this._saveModeQueue.deleteObject(this._createSaveQueueObject(e.name,e)),this._deletedObjects=this._deletedObjects.set(e.name,(0,O.X)(e))}finally{t()}}}var I=n(69939),F=n(41194),M=n(19815),_=n(97528),N=n(51333),R=n(92234),L=n(31835),B=n(97333),j=n(60619),z=n(55909),K=n(80857),Z=n(68250),U=n(10284),V=n(60132);const G=(0,K.Z)("Forms"),W=(0,s.Tr)("Forms");class q extends Z.I{constructor(e,t){super(t().formFieldValueManager),this.dispatch=e,this.getState=t}async create(e){throw W(`Can't create ${e.toString()}. Form field values creation is not supported.`)}async update(e){const{formFields:t,features:n,formsEnabled:o}=this.getState(),r=this.getState();return G(n.includes(V.q.FORMS),z.DR),G(o,z.BZ),G(r.backend),e.map((e=>{const n=t.get(e.name);if(G(n,`Tried to set the form field value for form field \`${e.name}\` which does not exist.`),!(0,U.os)(n,r))throw new s.p2("You don't have permission to update this form field value.");return this.dispatch((0,u.xh)([{name:e.name,value:e.value,optionIndexes:e.optionIndexes}])),e}))}async delete(e){return e.map((e=>{throw W(`Can't delete ${e.toString()}. Form field values deletion is not supported.`)}))}async ensureChangesSaved(e){G("string"==typeof e.name,"The form field value you passed to Instance.ensureChangesSaved() has no name.");const{formFieldValueManager:t}=this.getState();return G(t),await t.ensureObjectSaved(e)}}var H=n(47825),$=n(51269);const X=(0,K.Z)("Bookmarks");class Y extends Z.I{constructor(e,t){super(t().bookmarkManager),this.dispatch=e,this.getState=t}async create(e){const t=this.getState(),{bookmarkManager:n}=t,o=e.map((e=>{const t=e.id;X(n),"string"==typeof t&&n.getLocalBookmarks()&&X(!n.getLocalBookmarks().has(t),`Bookmark with id (${t}) is already used.`);const o="string"==typeof e.id&&e.id.length>0?e:e.set("id",(0,H.A)());return(0,S.G)(o),n.createObject(o),n.autoSave(),o}));return(0,$.s)(o)}async update(e){const{bookmarkManager:t}=this.getState();X(t);const n=e.map((e=>(X("string"==typeof e.id,"The bookmark you passed to Instance.update() has no id.\nPlease use Instance.create() first to assign an id."),(0,S.G)(e),t.updateObject(e),t.autoSave(),e)));return(0,$.s)(n)}async delete(e){const t=this.getState(),{bookmarkManager:n}=t,o=await(null==n?void 0:n.getBookmarks());X(n);const r=e.map((e=>{X("string"==typeof e.id,"The supplied bookmark id is not a valid id.");const t=null==o?void 0:o.get(e.id);return X(t,`No bookmark with id ${e.id} found.`),n.deleteObject(e),n.autoSave(),t}));return(0,$.s)(r)}async getObjectById(e){const{bookmarkManager:t}=this.getState();if(!t)return null;return(await t.getBookmarks()).get(e)}async ensureChangesSaved(e){X("string"==typeof e.id,"The bookmark you passed to Instance.ensureChangesSaved() has no valid id.\nPlease use Instance.create() first to assign an id.");const{bookmarkManager:t}=this.getState();return X(t),await t.ensureObjectSaved(e)}}var J=n(34997),Q=n(62164);const ee=(0,K.Z)("Comments"),te=J.SK;class ne extends Z.I{constructor(e,t){super(t().commentManager),this.dispatch=e,this.getState=t}async create(e,t){const n=this.getState(),o=e.map((e=>{oe(n);const o=e.id;"string"==typeof o&&ee(!n.comments.has(o),`Comment id (${o}) is already used.`),ee(e.rootId,"Comment does not have `rootId`");const r=n.annotations.get(e.rootId)||(t?function(e,t){return e.find((e=>e instanceof y.q6&&e.id===t))}(t,e.rootId):null);if(ee(r,`Comment orphan: The comment can't be created because no comment thread root was found with the id '${e.rootId}'. Please ensure that you create the corresponding annotation together with the comment via instance.create([comment, commentThreadRootAnnotation]).`),ee(r instanceof y.Jn||r instanceof y.On,`The comment can't be created because its root has wrong type. Was '${r.constructor.name}', only 'CommentMarkerAnnotation' and 'TextMarkupAnnotation' are supported as comment thread roots.`),ee(!e.pageIndex||e.pageIndex===r.pageIndex,`The comment can't be created on different page (${e.pageIndex}) than the comment root (${r.pageIndex}).`),!(0,U.mi)(r,n))throw new s.p2("You are not allowed to reply to this thread.");const{annotationCreatorName:i,annotationCreatorNameReadOnly:a}=n;if(e.creatorName&&e.creatorName!==i&&a)throw new s.p2("The comment creator name is different from the one set on the JWT.");const l=e.withMutations((t=>{const o=new Date;t.set("id",te()).set("creatorName",n.annotationCreatorName).set("createdAt",o).set("updatedAt",o).set("pageIndex",r.pageIndex),ee(n.backend),n.backend.isCollaborationPermissionsEnabled()&&!t.group&&n.group!==n.backend.getDefaultGroup()&&t.merge({group:n.group}),["id","creatorName","createdAt","updatedAt"].map((n=>e[n]&&t.set(n,e[n])))}));return(0,D.Gu)(l),l}));return(0,i.dC)((()=>{o.forEach((e=>{e instanceof Error||(this.dispatch((0,N.Jr)(e)),this.autoSave())}))})),(0,$.s)(o)}async update(e){const t=this.getState(),n=e.map((e=>{var n;oe(t),ee("string"==typeof e.id,"The comment you passed to Instance.update() has no id.\nPlease use Instance.create() first to assign an id.");const o=t.comments.get(e.id);ee(o,"An comment that does not exist was updated. This is probably caused by a sync conflict when Instant is enabled.\n The update of this comment was skipped."),null!==(n=t.backend)&&void 0!==n&&n.isCollaborationPermissionsEnabled()||o.group===e.group&&e.isEditable===o.isEditable&&e.isDeletable===o.isDeletable&&e.canSetGroup===o.canSetGroup||(e=e.set("group",o.group).set("isEditable",o.isEditable).set("isDeletable",o.isDeletable).set("canSetGroup",o.canSetGroup),(0,s.ZK)("`group`, `isEditable`, `isDeletable` and `canSetGroup` are only relevant when Collaboration Permissions are enabled in server backed setup. You do not have it enabled so these values are set to `undefined`."));if(!e.delete("group").equals(o.delete("group"))&&!(0,U.kR)(o,t))throw new s.p2("You don't have permission to update this comment.");if(e.group!==o.group&&!(0,U.uW)(e,t))throw new s.p2("You don't have permission to update the `group` of this comment.");if(e.isEditable!==o.isEditable||e.isDeletable!==o.isDeletable||e.canSetGroup!==o.canSetGroup)throw new s.p2("You can't update `isEditable` or `isDeletable` since they are read only properties which depend on the `group` property.");if(e.creatorName!==o.creatorName&&t.annotationCreatorNameReadOnly)throw new s.p2("You can't change the creatorName of a comment if it was already set on the JWT.");if(e.rootId!==o.rootId)throw new s.p2("You can't change the root id of a comment once it has been created.");const r=e.set("updatedAt",new Date);return(0,D.Gu)(r),r}));return(0,i.dC)((()=>{n.forEach((e=>{e instanceof Error||(this.dispatch((0,N.V4)(e)),this.autoSave())}))})),(0,$.s)(n)}async delete(e){const t=this.getState();oe(t);const n=e.map((e=>{ee(e.id);const n=t.comments.get(e.id);if(ee(n,`No comment with id ${e.id} found.`),!(0,U.Ss)(n,t))throw new s.p2("You don't have permission to delete this comment.");return n}));return(0,i.dC)((()=>{n.forEach((e=>{e instanceof Error||(this.dispatch((0,N.UM)(e)),this.autoSave())}))})),(0,$.s)(n)}async ensureChangesSaved(e){oe(this.getState()),ee("string"==typeof e.id,"The comment you passed to Instance.ensureChangesSaved() has no id.\nPlease use Instance.create() first to assign an id.");const{commentManager:t}=this.getState();return ee(t),await t.ensureObjectSaved(e)}async getObjectById(e){ee("string"==typeof e,"The supplied id is not a valid id.");const{comments:t,features:n}=this.getState();return n.includes(V.q.COMMENTS)?t.get(e):null}}function oe(e){const{features:t,backend:n}=e;ee(t.includes(V.q.COMMENTS),Q.kx),ee((0,M.xr)(n),"The API you're trying to use is only available when using the PSPDFKit Instant or PSPDFKit for Web Standalone.")}var re=n(71652);const ie=(0,s.Tr)("Changes");class ae{constructor(e){this.annotation=e.annotation,this.bookmark=e.bookmark,this.comment=e.comment,this.formField=e.formField,this.formFieldValue=e.formFieldValue}toArray(){return[this.annotation,this.bookmark,this.comment,this.formField,this.formFieldValue].filter(Boolean)}forEach(e){this.toArray().forEach(e)}map(e){return this.toArray().map(e)}}class se{constructor(e,t,n,r){(0,o.Z)(this,"_prevHasUnsavedChanges",!1),(0,o.Z)(this,"eventEmitter",new L.Z(["saveStateChange"])),this._dispatch=e,this._getState=t,n&&(this.handlers=new ae(n)),r&&(this.eventEmitter=r)}connect(){const e=this._getState();if(this._backend=e.backend,!this.handlers){const e={};e.annotation=new j.Nk(this._dispatch,this._getState),e.bookmark=new Y(this._dispatch,this._getState),e.formField=new z.fu(this._dispatch,this._getState),e.formFieldValue=new q(this._dispatch,this._getState),e.comment=new ne(this._dispatch,this._getState),this.handlers=new ae(e)}this.handlers.forEach((e=>{const t=e.getEventEmitter();t&&t.supportsEvent("saveStateChange")&&t.on("saveStateChange",(()=>this._onSaveStateChanged()))}))}save(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.hasUnsavedChanges())return Promise.resolve();const t=this.handlers.map((e=>e.manualSave(!1)));return e&&t.push(this._backend.syncChanges().catch(le)),(0,B.jK)(t).then((()=>{})).catch((t=>{const n=e?t.pop():null,o=t.filter(Boolean).map((e=>{if(e instanceof re.V)return e.reason})).filter(Boolean),r=(0,a.aV)(o).flatMap((e=>e)).toArray();throw(0,re.h)(r,Boolean(n),n?n.message:null)}))}hasUnsavedChanges(){return this.handlers.map((e=>e.hasUnsavedChanges())).some(Boolean)}_onSaveStateChanged(){const e=this.hasUnsavedChanges();this._prevHasUnsavedChanges!==e&&(this._prevHasUnsavedChanges=e,this.eventEmitter.emit("saveStateChange",{hasUnsavedChanges:e}))}async create(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this._performChanges(e,((n,o)=>n.create(o,t?e:null)))}async update(e){return this._performChanges(e,((t,n)=>t.update(n,e)))}_changesForHandler(e,t){return t.filter((t=>this._handlerForChange(t)===e))}async delete(e){const t=e.map((()=>ie("Unsupported change type"))),n=await(0,B.jK)(e.map((async(e,n)=>{if(e){if("string"==typeof e){for(const t of this.handlers.toArray()){const n=await t.getObjectById(e);if(n)return n}t[n]=ie(`No object with id '${e}' found.`)}}else t[n]=ie("The supplied id is not a valid id");return e})));return this._performChanges(n,((e,t)=>e.delete(t)),t)}ensureChangesSaved(e){const t=e.map((e=>{const t=this._handlerForChange(e);return t?t.ensureChangesSaved(e):Promise.reject(ie("Unsupported change type"))}));return(0,B.jK)(t)}async _performChanges(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.map((()=>ie("Unsupported change type")));const o=[],r=this.handlers.map((e=>e.lockSave()));try{let n=null;(0,i.dC)((()=>{n=this.handlers.map((async(n,r)=>{const i=this._changesForHandler(n,e);if(i.length)try{o[r]=await t(n,i)}catch(e){o[r]=e}}))})),n&&await(0,B.jK)(n)}finally{r.forEach((e=>{e()}))}const a=await this._mapResultsToChanges(e,o,n);return a.some((e=>e instanceof Error))?Promise.reject(a):Promise.resolve(a)}async _mapResultsToChanges(e,t,n){const o=n;for(const[n,r]of this.handlers.map((e=>e)).entries()){const i=await this._changesForHandler(r,e),a=t[n];i.length&&i.forEach(((t,n)=>{const r=e.findIndex((e=>e===t));var i;a instanceof Error?o[r]=a:o[r]=null!==(i=a[n])&&void 0!==i?i:a}))}return o}_handlerForChange(e){switch(!0){case e instanceof y.q6:return this.handlers.annotation;case e instanceof S.Z:return this.handlers.bookmark;case e instanceof d.sv:return this.handlers.comment;case e instanceof d.Wi:return this.handlers.formField;case e instanceof d.KD:return this.handlers.formFieldValue;default:return null}}}function le(e){throw ie(e),e}var ce=n(16126),ue=n(76367),de=n(67699),pe=n(25387),fe=n(38858);const he="rollover",me="down";var ge=n(5038),ve=n(63738),ye=n(44763);function be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?be(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}async function Se(e,t,n){if(n.pageKeys)try{e(Ee(t())),await Pe(e,t,n)}finally{e(Ee(null))}else await Pe(e,t,n)}async function Pe(e,t,n){let{attemptedUnlockViaModal:o=!1,features:m,signatureFeatureAvailability:v,hasPassword:y=!1,minSearchQueryLength:b,allowedTileScales:S,pageKeys:P}=n;const{backend:D,autoSaveMode:C,clientsChangeCallback:O,formsEnabled:A}=t();(0,s.kG)(D);const{provider:L}=D,[B,j]=await Promise.all([D.permissions(),D.documentInfo()]),z=m&&m.includes(V.q.FORMS),K=(_.Options.IGNORE_DOCUMENT_PERMISSIONS||j.permissions&&(j.permissions.annotationsAndForms||j.permissions.fillForms))&&z&&A,Z=K&&(0,M.k_)(D)&&m&&m.includes(V.q.FORM_DESIGNER),U=z&&!(0,M.k_)(D)?await D.getFormJSON():null;if(D.isUsingInstantProvider()){(0,s.kG)("onClientsChange"in L&&void 0!==L.onClientsChange,"provider has no callback `onClientsChange` although it is using instant.");const n=L;n.onClientsChange((e=>{O.call(null,e)})),n.setDocumentHandleOutdated((t=>{e((0,h.KY)(t))})),n.setFormsEnabledInConfig(A),n.setStateGetter(t)}else if("SERVER"===D.type&&U&&m&&v){if(!(0,M.xW)(m,v)){const e=U.fields.filter((e=>"pspdfkit/form-field/signature"===e.type)).map((e=>e.name));U.annotations=U.annotations.filter((t=>!e.includes(t.formFieldName))),U.fields=U.fields.filter((t=>!e.includes(t.name))),L.setIgnoredFormFieldNames((0,a.aV)(e))}}const G={refreshSignaturesInfo:async()=>{const{digitalSignatures:n}=t();m&&m.includes("digital_signatures")&&n&&n&&n.status!==ue._.not_signed&&!1===n.documentModifiedSinceSignature&&(await D.refreshSignaturesInfo(),e((0,F.Y)(await D.getSignaturesInfo())))}},W=we(we({},G),{},{createAnnotations:(t,n)=>{n&&n.forEach(((t,n)=>{e((0,f.O)(n,t))})),e((0,R.pB)(de.j.EXTERNAL,(()=>{e((0,I.lA)(t))})))},updateAnnotations:t=>{e((0,R.pB)(de.j.EXTERNAL,(()=>{e((0,I.Zr)(t))})))},deleteAnnotations:t=>{e((0,R.pB)(de.j.EXTERNAL,(()=>{e((0,I.aF)(t))})))},getAnnotationById:e=>t().annotations.get(e)}),q=z&&(0,M.k_)(D)?we(we({},G),{},{createFormFields:t=>{e((0,u.TD)(t))},updateFormFields:t=>{e((0,u.C2)(t)),e((0,u.xW)(t.map((e=>new d.KD({name:e.name,value:e.value})))))},deleteFormFields:t=>{e((0,u.M$)(t))},getFormFieldByName:e=>t().formFields.get(e)}):null,H=we(we({},G),{},{createFormFieldValues:t=>e((0,u.zq)(t)),setFormFieldValues:t=>e((0,u.xW)(t)),deleteFormFieldValues:t=>e((0,u.HE)(t))}),$=(0,M.xr)(D),X=$?we(we({},G),{},{createComments:t=>{e((0,N.fg)(t))},updateComments:t=>{e((0,N.gk)(t))},deleteComments:t=>{e((0,N.Vn)(t))}}):null,Y=we({},G),J=t(),Q=new w(L,W,C,J.annotationManager&&J.annotationManager.eventEmitter),ee=new E(L,Y,C,J.bookmarkManager&&J.bookmarkManager.eventEmitter),te=z&&q&&(0,M.k_)(D)?new x.c(L,q,C,J.formFieldManager&&J.formFieldManager.eventEmitter):null,ne=new T(L,H,C,J.formFieldValueManager&&J.formFieldValueManager.eventEmitter);let oe;$&&((0,s.kG)(null!=X),oe=new k(L,X,C,J.commentManager&&J.commentManager.eventEmitter));const re=(0,r.Z)(g.xp),ie=(0,r.Z)(ce.ET),ae={getPageContentState:e=>{const{pages:n,annotations:o,formFields:r}=t(),i=n.get(e);return(0,s.kG)(i),{pageSize:i.pageSize,annotations:re(o,i),formFields:ie(r,i)}},getZoomState:()=>t().viewportState.zoomLevel,getAnnotationWithFormField:e=>{const{annotations:n,formFields:o}=t(),r=n.get(e);return{annotation:r,formField:r instanceof d.x_&&r.formFieldName?o.get(r.formFieldName):null}},getFormFieldWidgets:e=>{const{annotations:n}=t(),{annotationIds:o}=e;return n.filter(((t,n)=>e.annotationIds.includes(n)||e.annotationIds.includes(String(t.pdfObjectId)))).toList().sort(((e,t)=>o.indexOf(e.id)<o.indexOf(t.id)?-1:1))},getFormFieldByName:e=>t().formFields.get(e),isFormDesignerEnabled:()=>(0,M.ix)(t()),isAnnotationInState:e=>t().annotations.has(e),isFormFieldInState:e=>t().formFields.has(e),getAvailableVariants:e=>{const{APStreamVariantsRollover:n,APStreamVariantsDown:o}=t();if(null==e.pdfObjectId)return[];const r=[];return n.has(e.pdfObjectId)&&r.push(he),o.has(e.pdfObjectId)&&r.push(me),r}},le={createAnnotations:(e,t,n)=>{Q.backendObjectsCreated(e,n,{attachments:t})},updateAnnotations:Q.backendObjectsUpdated.bind(Q),deleteAnnotations:Q.backendObjectsDeleted.bind(Q),invalidateAPStreams:t=>e((0,I.GI)(t)),createAttachment:(t,n)=>{e((0,f.O)(t,new d.Pg({data:n})))},addAnnotationVariants:(t,n)=>{e((0,I.mw)(t,n))},applyJavaScriptActionChanges:t=>{e((0,u.bt)(t))}},pe={createBookmarks:ee.backendObjectsCreated.bind(ee),updateBookmarks:ee.backendObjectsUpdated.bind(ee),deleteBookmarks:ee.backendObjectsDeleted.bind(ee)},ge=z&&te instanceof x.c&&(0,M.k_)(D)?{createFormFields:te.backendObjectsCreated.bind(te),updateFormFields:te.backendObjectsUpdated.bind(te),deleteFormFields:te.backendObjectsDeleted.bind(te)}:null,be={createFormFieldValues:(e,t)=>{t===p.y?z&&ne.backendObjectsCreated(e,t):t===p.z&&Z&&ne.backendObjectsCreated(e,t)},setFormFieldValues:e=>{K&&ne.backendObjectsUpdated(e)},deleteFormFieldValues:e=>{Z&&ne.backendObjectsDeleted(e)}};let Se;$&&((0,s.kG)(null!=oe),Se={createComments:oe.backendObjectsCreated.bind(oe),updateComments:oe.backendObjectsUpdated.bind(oe),deleteComments:oe.backendObjectsDeleted.bind(oe)});const Pe=new se(e,t,null,J.changeManager&&J.changeManager.eventEmitter),Ee={attemptedUnlockViaModal:o,hasPassword:y,features:m,signatureFeatureAvailability:v,permissions:B,documentInfo:j,formJSON:U,annotationManager:Q,bookmarkManager:ee,formFieldManager:te,formFieldValueManager:ne,commentManager:oe,changeManager:Pe,minSearchQueryLength:b,documentHandle:D.getDocumentHandle(),allowedTileScales:S,pageKeys:P};let xe=null;(0,i.dC)((function(){e((0,c.rJ)(Ee)),L.setReadStateCallbacks(ae),L.setAnnotationCallbacks(le),L.setBookmarkCallbacks(pe),L.setFormFieldValueCallbacks(be),$&&((0,s.kG)(null!=Se),L.setCommentCallbacks(Se)),z&&(0,M.k_)(D)&&((0,s.kG)(ge),L.setFormFieldCallbacks(ge)),Pe.connect(),xe=L.load()}));try{await xe,await new Promise(((t,n)=>{("visible"===document.visibilityState?requestAnimationFrame:setTimeout)((()=>{D.lazyLoadPages().then((o=>{const r=[];o&&e((0,fe.uM)(o)),z&&(0,M.k_)(D)&&te&&r.push(te.loadFormFields()),(0,s.kG)(m,"Features should be defined at this point"),(0,M.xr)(D)&&(0,M.LC)({features:m,backend:D})&&oe&&r.push(oe.loadComments()),(0,M.YN)({features:m,backend:D})&&r.push(async function(e){var t;let{backend:n,dispatch:o}=e;const r=await(null===(t=n.getSecondaryMeasurementUnit)||void 0===t?void 0:t.call(n));r&&o((0,ye.VO)(r));const i=await n.getMeasurementScales();i&&o((0,ve.RN)(i?(0,l.Ex)(i):null))}({backend:D,dispatch:e})),r.length>0?Promise.all(r).then((()=>t())).catch(n):t()})).catch((e=>{n(e)}))}))}))}catch(e){throw e}}function Ee(e){return{type:pe.UX$,state:e}}function xe(e,t,n,o){let r;if("string"==typeof t){if(n===ge.x.SharePoint){const n=new URL(t,e),[o,r]=n.hostname.split(".").reverse();if("sharepoint"!==r||"com"!==o)throw new s.p2(`When using SharePoint, the document URL must be a sharepoint.com URL: it's ${r}.${o} instead.`)}if(n===ge.x.Salesforce){const t=new URL(e),[n,o]=t.hostname.split(".").reverse();if("salesforce"!==o&&"force"!==o&&"visualforce"!==o||"com"!==n)throw new s.p2(`When using Salesforce, the SDK must be loaded from a Salesforce URL: it's ${o}.${n} instead.`)}r=fetch(t,{credentials:"same-origin"}).then((e=>e.arrayBuffer())).finally((()=>{null==o||o()}))}else r=t;return r}},51559:(e,t,n)=>{"use strict";n.d(t,{RG:()=>c,SH:()=>h,bZ:()=>d,h6:()=>m,mr:()=>p,nN:()=>u,rh:()=>f});var o=n(35369),r=n(47347),i=n(60132),a=n(52560),s=n(28098),l=n(55024);function c(e){var t;return"STANDALONE"===(null===(t=e.backend)||void 0===t?void 0:t.type)&&e.features.includes(i.q.DOCUMENT_COMPARISON)}const u="You need the document comparison license component to use this feature.",d="The document comparison feature is only available in Standalone mode.",p=(e,t)=>(0,a.cq)(e.set("currentPageIndex",0).set("pageSizes",(0,o.aV)([t.pageSize])),s.c.FIT_TO_WIDTH);async function f(e){const t=await e;if("string"==typeof t){let e;try{e=fetch(t).then((e=>e.arrayBuffer()))}catch(e){(0,r.vU)(e)}return e}if(t instanceof ArrayBuffer)return t;throw new r.p2("Comparison document source is not a URL nor an ArrayBuffer")}const h=e=>e===l.Q.documentA?l.Q.documentA:e===l.Q.documentB?l.Q.documentB:l.Q.result,m=[[[0,0],[0,0]],[[0,0],[0,0]],[[0,0],[0,0]]]},4054:(e,t,n)=>{"use strict";n.d(t,{Aw:()=>d,Cz:()=>k,N1:()=>v,PF:()=>D,Qu:()=>p,R4:()=>h,R9:()=>f,_c:()=>x,_s:()=>S,ar:()=>m,cR:()=>P,eR:()=>g,f:()=>c,fp:()=>b,gC:()=>y,o5:()=>u,sR:()=>C});var o=n(47347),r=n(92466),i=n(36095),a=n(71231),s=n(38006),l=n.n(s);function c(e){return function(e){e&&i.vU&&e.scrollHeight}(e),function(e){return e.scrollHeight>e.clientHeight}(e)||u(e)}function u(e){return e.scrollWidth>e.clientWidth}function d(e){const t=e?e.document:document,n=t.createElement("iframe"),{documentElement:r}=t;return(0,o.kG)(r),n.title="script",n.dataset.testid="realm",n.style.position="absolute",n.style.top="-10000px",n.style.left="-10000px",n.style.width="10000px",n.style.height="10000px",n.setAttribute("aria-hidden","true"),r.appendChild(n),{window:n.contentWindow,remove(){r.removeChild(n)}}}function p(e){let t;if(!e.nodeName)return!1;const n=e.nodeName,o=e.hasAttribute("tabindex")&&parseInt(e.getAttribute("tabindex")),r=!isNaN(o)&&isFinite(o)&&"boolean"!=typeof o;if(/^(IFRAME|LABEL|DATALIST|INPUT|SELECT|TEXTAREA|BUTTON|OBJECT)$/.test(n)){if(t=!e.disabled,t){const n=e.closest("fieldset");n&&(t=!n.disabled)}}else t="A"===n?e.href||r:e.hasAttribute("contenteditable")&&"true"===e.getAttribute("contenteditable")||r;return!!t}const f=async e=>{let{buffer:t,width:n,height:o,format:r=(0,a.zP)()}=e;if("bitmap"===r)return(async e=>{let{buffer:t,width:n,height:o}=e;const r=document.createElement("canvas");r.width=n,r.height=o;const i=new Uint8ClampedArray(t),a=r.getContext("2d"),s=null==a?void 0:a.createImageData(n,o);return null==s||s.data.set(i),null==a||a.putImageData(s,0,0),h(await x(r))})({buffer:t,width:n,height:o});return h(new Blob([t],{type:`image/${r}`}))};function h(e){try{return m(URL.createObjectURL(e))}catch(e){return null}}async function m(e){const t=new Image;return t.onerror=e=>{throw new o.p2(`There was an error loading the image: ${e.message}`)},t.src=e,await C(t),new r.Z(t,(()=>URL.revokeObjectURL(e)))}function g(e){return!(!e||1!==e.nodeType)&&("true"===e.contentEditable||"INPUT"===e.nodeName||"TEXTAREA"===e.nodeName)}function v(e){return!(!e||1!==e.nodeType)&&Boolean(e.attributes.role&&"listbox"===e.attributes.role.value||e.attributes.role&&"menu"===e.attributes.role.value)}function y(e){if(!e||1!==e.nodeType)return!1;const t=e.ownerDocument.querySelector(".PSPDFKit-Toolbar"),n=e.ownerDocument.querySelector(".PSPDFKit-Annotation-Toolbar");return Boolean(t&&t.contains(e)||n&&n.contains(e))}function b(e){return!(!e||1!==e.nodeType)&&Boolean(e.closest(".PSPDFKit-Toolbar-Responsive-Group"))}let w=!1;{let e=document.createElement("div");const t=()=>{};try{e.addEventListener("focus",t,!0),e.focus(Object.defineProperty({},"preventScroll",{get:()=>{w=!0}}))}catch(e){w=!1}finally{e.removeEventListener("focus",t),e=null}}function S(e,t){w&&t.focus({preventScroll:!0})}function P(e,t){const n=t.HTMLAnchorElement.prototype.hasOwnProperty("download"),o=new Blob([e],{type:"application/pdf"});if("function"==typeof navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(o,"download.pdf");else if(n){const e=window.URL.createObjectURL(o);E(e),t.URL.revokeObjectURL(e)}else{const e=new FileReader;e.onloadend=function(){const t=e.result;"string"==typeof t&&E(t)},e.readAsDataURL(o)}}function E(e){(0,o.kG)(null!=document.body);const t=document.createElement("a");t.href=e,t.style.display="none",t.download="download.pdf",t.setAttribute("download","download.pdf"),document.body&&document.body.appendChild(t),t.click(),document.body&&document.body.removeChild(t)}function x(e){return new Promise(((t,n)=>{"toBlob"in e?e.toBlob((e=>{t(e)}),"image/png"):"msToBlob"in e?t(null==e?void 0:e.msToBlob()):n(new Error("Exporting HTMLCanvasElement to Blob is not supported in this browser."))}))}function D(e){e.preventDefault()}async function C(e){if(!(e instanceof HTMLImageElement)||"IMG"!==e.nodeName)return;try{await new Promise(((t,n)=>{e.complete?t():(e.onerror=n,e.onload=()=>t())}))}catch(e){throw new o.p2(`The image could not be loaded: ${e.message}`)}const t=e.decode();try{await t}catch(e){if(!i.i7)throw new o.p2(`The image could not be decoded: ${e.message}`);await new Promise((e=>setTimeout(e,200)))}}function k(e){var t,n;null===(t=e.target)||void 0===t||t.classList.remove(l().focusedFocusVisible),null===(n=e.target)||void 0===n||n.removeEventListener("blur",k)}},13997:(e,t,n)=>{"use strict";n.d(t,{SV:()=>l,oM:()=>i,zj:()=>a});var o=n(47347),r=n(21076);function i(){return"protocol=5, client=2023.5.2, client-git=79422c91d1"}function a(){return"production"}const s=new Map;function l(e){const t=(0,r.Qk)();if(t)return t;const n=document.createElement("a");n.href=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Error;const n=s.get(e);if("string"==typeof n)return n;if(e.currentScript){const t=e.currentScript.src;return s.set(e,t),t}{let n;try{throw new t("PSPDFKit document.currentScript.src detection")}catch(e){e.stack&&(n=e.stack.match(/(?:file|https?):[^)]+/i))}(0,o.kG)(n,"Failed to automatically determine baseUrl. Please specify the base url as an option.");const r=n[0].split(":").slice(0,-2).join(":");return s.set(e,r),r}}(e);const i=n.pathname.split("/").filter(Boolean).slice(0,-1);return[`${n.protocol}/`,n.host,...i].join("/")+"/"}},20276:(e,t,n)=>{"use strict";function o(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{bubbles:!1,cancelable:!1};return"function"==typeof Event?t=new Event(e,n):(t=document.createEvent("Event"),t.initEvent(e,Boolean(n.bubbles),Boolean(n.cancelable))),t}function r(e){const t=document.createEvent("MouseEvent");return t.initEvent(e,!0,!0),t}n.d(t,{M:()=>o,_:()=>r})},71231:(e,t,n)=>{"use strict";n.d(t,{Gn:()=>r,Rh:()=>s,Zy:()=>i,zP:()=>a});var o=n(36095);const r=(()=>{if("object"!=typeof window)return!1;let e=!1;const t=Object.defineProperty({},"passive",{get:function(){return e=!0,!0}});try{window.addEventListener("test",null,t)}catch(e){}return e})();let i=!o.G6;if(!o.G6){const e=new Image;e.onload=()=>i=e.width>0&&e.height>0,e.onerror=()=>i=!1,e.src="data:image/webp;base64,UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA=="}const a=()=>"bitmap";let s=!1;try{const e=new FormData;e.append("key","value");const t=new Response(e);"formData"in t&&!fetch.polyfill&&t.formData().then((()=>{s=!0})).catch((()=>{s=!1}))}catch(e){s=!1}},38623:(e,t,n)=>{"use strict";n.d(t,{GE:()=>p,eE:()=>d,vt:()=>u,x6:()=>f});var o=n(35369),r=n(47347),i=n(34710);const a=(0,o.hU)(["Helvetica","Arial","Calibri","Century Gothic","Consolas","Courier","Dejavu Sans","Dejavu Serif","Georgia","Gill Sans","Impact","Lucida Sans","Myriad Pro","Open Sans","Palatino","Tahoma","Times New Roman","Trebuchet","Verdana","Zapfino","Comic Sans"]),s=(0,o.hU)(["sans-serif","serif","monospace"]);let l=new Set;const c=(0,o.aV)(["mmmBESbswy"]);s.forEach((e=>{const t=a.filterNot((e=>l.has(e))),n=new i.f(document,c,{fontFamily:e}),o=t.map((t=>[t,new i.f(document,c,{fontFamily:`${t},${e}`})])),s=n.measure().first();(0,r.kG)(s),o.forEach((e=>{let[t,n]=e;const o=n.measure().first();s.equals(o)||(l=l.add(t))})),n.remove(),o.forEach((e=>{let[,t]=e;t.remove()}))}));const u=a.filter((e=>l.has(e))),d=[{name:"Caveat",file:"Caveat-Bold",weight:700},{name:"Marck Script",file:"MarckScript-Regular",weight:400},{name:"Meddon",file:"Meddon-Regular",weight:400},{name:"Pacifico",file:"Pacifico-Regular",weight:400}];function p(e,t){e.forEach((e=>{t.load(`16px ${e.name}`)}))}function f(e){return Promise.allSettled(e.map((e=>new Promise(((t,n)=>{var o,i;if((0,r.kG)(e.name),i=e.name,!/\.[^.]*$/.test(i))return(0,r.vU)(`The font name for font "${e.name}" must have a file extension.`),void n();null==e||null===(o=e.callback)||void 0===o||o.call(e,e.name).then((o=>{(0,r.kG)(e.name),o instanceof Blob?t({name:e.name,data:o}):((0,r.vU)(`Callback for retrieving font ${e.name} didn't returned a Blob. It returned ${typeof o}`),n())})).catch((t=>{(0,r.vU)(`Error returned by callback for retrieving font ${e.name}. ${t}`),n()}))}))))).then((e=>e.filter((e=>"fulfilled"===e.status)).map((e=>e.value))))}},16126:(e,t,n)=>{"use strict";n.d(t,{$Y:()=>z,AM:()=>_,Ay:()=>N,BT:()=>y,CH:()=>R,CK:()=>j,CL:()=>k,ET:()=>O,G8:()=>E,Qg:()=>v,U_:()=>b,VY:()=>P,as:()=>Z,fF:()=>L,g6:()=>F,gE:()=>T,hT:()=>w,i2:()=>x,l_:()=>S,o6:()=>B,r_:()=>I,sC:()=>A,sh:()=>K});var o=n(84121),r=n(35369),i=n(47347),a=n(59780),s=n(66687),l=n(86920),c=n(78162),u=n(97528),d=n(95651),p=n(20792),f=n(5020),h=n(78233);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e){return e.map((e=>new s.KD({name:e.name,value:"string"==typeof e.value?e.value:e.values,optionIndexes:e.optionIndexes}))).toList()}function y(e,t){var n;return e&&t?e instanceof a.Dz||e instanceof a.rF?e.values.size>0?e.values.equals(t.values):0===t.values.size:(e.value===t.value||"function"==typeof(null===(n=e.value)||void 0===n?void 0:n.equals)&&e.value.equals(t.value))&&(!e.optionIndexes||!t.optionIndexes||e.optionIndexes.every(((e,n)=>t.optionIndexes[n]===e))):!e&&!t}function b(e){return(0,r.D5)(e.map((e=>{(0,i.kG)(null==e.pdfObjectId||"number"==typeof e.pdfObjectId,"Invalid type for `pdfObjectId`.");try{(0,i.kG)(Array.isArray(e.annotationIds),"Invalid type for `annotationIds`."),(0,i.kG)("string"==typeof e.name,"Invalid type for `name`."),(0,i.kG)("string"==typeof e.label,"Invalid type for `label`.");const t=Array.isArray(e.flags)?e.flags:[],n={pdfObjectId:e.pdfObjectId,annotationIds:(0,r.aV)(e.annotationIds),name:e.name,label:e.label,readOnly:t.includes("readOnly"),required:t.includes("required"),noExport:t.includes("noExport")};switch(e.type){case"pspdfkit/form-field/button":return function(e){return new a.R0(g({},e))}(n);case"pspdfkit/form-field/radio":return function(e,t){return(0,i.kG)(t.options instanceof Array,"Invalid type for `options`."),(0,i.kG)("string"==typeof t.defaultValue,"Invalid type for `defaultValue`."),(0,i.kG)("boolean"==typeof t.noToggleToOff,"Invalid type for `noToggleToOff`."),(0,i.kG)("boolean"==typeof t.radiosInUnison,"Invalid type for `radiosInUnison`."),new a.XQ(g(g({},e),{},{options:C(t.options),defaultValue:t.defaultValue,noToggleToOff:t.noToggleToOff,radiosInUnison:t.radiosInUnison}))}(n,e);case"pspdfkit/form-field/checkbox":return function(e,t){return(0,i.kG)(t.options instanceof Array,"Invalid type for `options`."),(0,i.kG)(t.defaultValues instanceof Array,"Invalid type for `defaultValue`."),new a.rF(g(g({},e),{},{options:C(t.options),defaultValues:(0,r.aV)(t.defaultValues)}))}(n,e);case"pspdfkit/form-field/combobox":case"pspdfkit/form-field/listbox":return function(e,t){(0,i.kG)(t.options instanceof Array,"Invalid type for `options`."),(0,i.kG)("boolean"==typeof t.multiSelect,"Invalid type for `multiSelect`."),(0,i.kG)("boolean"==typeof t.commitOnChange,"Invalid type for `commitOnChange`."),(0,i.kG)(!t.defaultValues||Array.isArray(t.defaultValues),"Invalid type for `defaultValue`.");const n=g(g({},e),{},{options:C(t.options),multiSelect:t.multiSelect,commitOnChange:t.commitOnChange,defaultValues:t.defaultValues?(0,r.aV)(t.defaultValues):(0,r.aV)()});switch(t.type){case"pspdfkit/form-field/combobox":{const e=t;return(0,i.kG)("boolean"==typeof e.edit,"Invalid type for `edit`."),(0,i.kG)("boolean"==typeof e.doNotSpellcheck||"boolean"==typeof e.doNotSpellCheck,"Invalid type for `doNotSpellCheck`."),new a.fB(g(g({},n),{},{edit:e.edit,doNotSpellCheck:e.doNotSpellCheck||e.doNotSpellcheck}))}case"pspdfkit/form-field/listbox":return new a.Vi(n);default:throw new Error("Unknown choice field type")}}(n,e);case"pspdfkit/form-field/text":return function(e,t){return(0,i.kG)("boolean"==typeof t.doNotSpellcheck||"boolean"==typeof t.doNotSpellCheck,"Invalid type for `doNotSpellCheck`."),(0,i.kG)("boolean"==typeof t.doNotScroll,"Invalid type for `doNotScroll`."),(0,i.kG)("boolean"==typeof t.password,"Invalid type for `password`."),(0,i.kG)("boolean"==typeof t.multiLine,"Invalid type for `multiLine`."),(0,i.kG)("string"==typeof t.defaultValue||!t.defaultValue,"Invalid type for `defaultValue`."),(0,i.kG)(!0!==t.comb||"number"==typeof t.maxLength,"Invalid type for `comb`. When `comb` is set, the text field must have a `maxLength`."),new a.$o(g(g({},e),{},{defaultValue:t.defaultValue,doNotSpellCheck:t.doNotSpellCheck||t.doNotSpellcheck,doNotScroll:t.doNotScroll,password:t.password,maxLength:"number"==typeof t.maxLength?t.maxLength:null,multiLine:t.multiLine,comb:t.comb}))}(n,e);case"pspdfkit/form-field/signature":return function(e){return new a.Yo(g({},e))}(n);default:throw new Error(`Unsupported form field type: ${e.type}`)}}catch(t){return(0,i.um)(`Skipped parsing form field #${e.name} from payload because an error occurred while deserializing.`),void(0,i.um)(t)}})).filter(Boolean).map((e=>[null==e?void 0:e.name,e])))}function w(e){return e.map((e=>c.Z.fromJSON(e.pdfObjectId?e.pdfObjectId.toString():e.id,e)))}function S(e,t){const n=e.annotationIds.findIndex((0,d.oF)(t)),o=e.options.get(n);return(0,i.kG)(o,`There is no FormOption defined for annotationId '${t.id}' in formField '${e.name}'.`),o.value}function P(e,t){let{rotation:n,boundingBox:o}=e;if(!n)return{};const r=90===(0,f.Lv)(n)||270===(0,f.Lv)(n),i={},a=Math.ceil(o.height*t),s=Math.ceil(o.width*t);return r&&(i.width=a,i.height=s),n&&(i.transformOrigin="50% 50%",i.transform=E({width:s,height:a,rotation:n})),i}function E(e){let{width:t,height:n,rotation:o,reverse:r=!1}=e;const i=90===(0,f.Lv)(o)||270===(0,f.Lv)(o);return r?`rotate(${o}deg)`+(i&&t&&n?`translate(${-Math.round(t/2-n/2)}px, ${Math.round(t/2-n/2)}px)`:""):(i&&t&&n?`translate(${Math.round(t/2-n/2)}px, ${-Math.round(t/2-n/2)}px) `:"")+`rotate(${-o}deg)`}function x(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const{fontColor:o,font:r,backgroundColor:i,borderColor:a,horizontalAlign:s,borderWidth:l,borderStyle:c,isBold:u,isItalic:d,boundingBox:{width:p,height:f},opacity:m}=e,v=Math.ceil(p*t),y=Math.ceil(f*t);return g(g({color:null==o?void 0:o.toCSSValue(),backgroundColor:null==i?void 0:i.toCSSValue(),borderColor:(null==a?void 0:a.toCSSValue())||"transparent",opacity:m,textAlign:s||void 0,fontWeight:u?"bold":void 0,fontStyle:d?"italic":void 0},"string"==typeof r?{fontFamily:(0,h.hm)(r)}:null),{},{borderWidth:l||0,borderStyle:null!=c?D[c]:"none",width:v,height:y},n?P(e,t):{})}const D={solid:"solid",dashed:"dashed",beveled:"groove",inset:"inset",underline:"none none solid"};function C(e){return(0,r.aV)(e.map((e=>new s.mv(e))))}function k(e,t){return e.formFields.find((e=>e.id===t))}function O(e,t){return e.filter((e=>e.annotationIds.some((e=>t.annotationIds.has(e))))).toList()}function A(e,t,n){var o,r,i,a;return"STANDALONE"===e.type&&u.Options.PDF_JAVASCRIPT&&"function"==typeof e.onKeystrokeEvent&&(Boolean(null===(o=t.additionalActions)||void 0===o?void 0:o.onInput)||Boolean(null===(r=n.additionalActions)||void 0===r?void 0:r.onInput)||Boolean(null===(i=t.additionalActions)||void 0===i?void 0:i.onChange)||Boolean(null===(a=n.additionalActions)||void 0===a?void 0:a.onChange))}function T(e,t){if(0===e.length)return t;if(0===t.length)return e;const n=[],o=t.slice(0);return e.forEach((e=>{if((e.change_type===l.uV||e.change_type===l.zR)&&"pspdfkit/form-field-value"===e.object.type){const t=o.findIndex((t=>"pspdfkit/form-field-value"===t.object.type&&t.object.type===e.object.type&&t.object.name===e.object.name));if(t>-1){const n=o[t];e.object.formattedValue=n.object.formattedValue,e.object.editingValue=n.object.editingValue,o.splice(t,1)}}n.push(e)})),n.concat(o)}function I(e,t,n){const o=e&&n.formFields.get(e.name);if(e&&o&&!y(e,o)){e.annotationIds.reduce(((e,n)=>{var o;const i=t.annotations.get(n)||t.annotations.find((e=>e.pdfObjectId===parseInt(n)));if(i&&null!==(o=t.isAPStreamRendered)&&void 0!==o&&o.call(t,i)){return e.get(i.pageIndex)?e.updateIn([i.pageIndex],(e=>e.add(i.id))):e.set(i.pageIndex,(0,r.l4)([i.id]))}return e}),(0,r.D5)()).forEach(((e,n)=>{var o;null===(o=t.backend)||void 0===o||o.clearPageAPStreams(n,e)}))}}function F(e,t,n){const o=e.annotationIds.findIndex((0,d.oF)(t)),i=S(e,t),a=e.options.filter((e=>e.value===i)).size;let s;if(n){if(a<2)return;s=(e.optionIndexes||(0,r.aV)()).push(o)}else{if(!e.optionIndexes)return;s=e.optionIndexes.filter((e=>e!==o))}return s.size>0?s:void 0}function M(e,t,n){const o=t.filter((t=>{const o=e.annotationIds.get(t);if(!o)return!1;const r=n.get(o);if(!r)return!1;const i=S(e,r);return e.options.filter((e=>e.value===i)).size>1}));return o.size>0?o:void 0}function _(e){let{state:t,mutableState:n,formFieldValues:o,areFormFieldValuesNew:s}=e;o.forEach((e=>{let{name:o,value:l,optionIndexes:c}=e;const u=t.formFields.get(o);if(u){if((0,i.kG)(!c||u instanceof a.XQ||u instanceof a.rF,"`optionIndexes` property is only supported in radio and checkbox form field values."),u instanceof a.$o)l=l||"",(0,i.kG)("string"==typeof l,`The type of action value for a TextFormField is ${typeof l}, but has to be a string`),n.setIn(["formFields",o,"value"],l);else if(u instanceof a.XQ){if((0,i.kG)("string"==typeof l||null===l,`The type of action value for a RadioButtonFormField is ${typeof l}, but has to either be a string or null`),n.setIn(["formFields",o,"value"],l),c){const e=M(u,c,t.annotations);e&&n.setIn(["formFields",o,"optionIndexes"],e)}}else if(u instanceof a.Dz||u instanceof a.rF){if(l=l||(0,r.aV)(),(0,i.kG)(l instanceof r.aV,`The type of action value for the ${u instanceof a.Dz?"ChoiceFormField":"CheckBoxFormField"} is ${typeof l}, but has to be a List of strings`),n.setIn(["formFields",o,"values"],l),u instanceof a.rF&&c){const e=M(u,c,t.annotations);e&&n.setIn(["formFields",o,"optionIndexes"],e)}}else u instanceof a.R0||u instanceof a.Yo||(0,i.kG)(!1,`Cannot set form field value for ${u.name}: unknown form field type`);s||I(u,t,n)}else(0,i.ZK)(`No form field found with name ${o}`)}))}function N(e){let{getState:t,originalFormFields:n,formFieldValues:o,callback:a,resolve:s}=e;const{formFields:l,annotations:c,backend:u}=t(),d=[],p=[];n.forEach(((e,t)=>{if(!e)return;(0,i.kG)(u);let n=l.get(t);if((0,i.kG)(n),o.some((e=>e.name===t&&(n=r.aV.isList(e.value)?n.set("values",e.value):n.set("value",e.value),!0))),y(e,n))p.push(t);else{c.filter((e=>e.points===t)).reduce(((e,t)=>{const n=e.get(t.pageIndex);return n?e.set(t.pageIndex,n.add(t.id)):e.set(t.pageIndex,(0,r.l4)([t.id]))}),(0,r.D5)()).forEach(((e,t)=>{d.push({pageIndex:t,pageWidgetIds:e})}))}})),a(p),d.forEach((e=>{let{pageIndex:t,pageWidgetIds:n}=e;null==u||u.clearPageAPStreams(t,n)})),null==s||s()}function R(e){return new s.KD(g({name:e.name,value:e.values||e.value},e.optionIndexes?{optionIndexes:e.optionIndexes}:null))}function L(e){return e===p.A.CHECKBOX_WIDGET||e===p.A.RADIO_BUTTON_WIDGET||e===p.A.SIGNATURE_WIDGET||e===p.A.TEXT_WIDGET||e===p.A.BUTTON_WIDGET||e===p.A.COMBO_BOX_WIDGET||e===p.A.LIST_BOX_WIDGET||e===p.A.FORM_CREATOR||e===p.A.DATE_WIDGET}function B(e){return L(e)&&e!==p.A.FORM_CREATOR}function j(e,t){const n=S(e,t),o=!e.optionIndexes||e.optionIndexes.includes(e.annotationIds.findIndex((0,d.oF)(t)));return e instanceof a.XQ?e.value===n&&o:e instanceof a.rF?e.values.includes(n)&&o:(0,i.Rz)(e)}const z="Invalid date/time: please ensure that the date/time exists. Field [",K="The value entered does not match the format of the field [",Z="format "},51269:(e,t,n)=>{"use strict";function o(e){return e.some((e=>e instanceof Error))?Promise.reject(e):Promise.resolve(e)}n.d(t,{s:()=>o})},39728:(e,t,n)=>{"use strict";n.d(t,{FA:()=>g,GW:()=>y,WF:()=>b,Yr:()=>w,_d:()=>v,ax:()=>S,kM:()=>m,mZ:()=>P});var o=n(84121),r=n(47347),i=n(35369),a=n(32125),s=n(66687),l=n(67699),c=n(95651),u=n(62164),d=n(15973),p=n(60619);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t){return"create"===e.type?null:"update"===e.type||"delete"===e.type?t.get(e.payload.id):void(0,r.Rz)(e.type)}function g(e,t,n){if("create"===e.type)return e.payload;if("update"===e.type){const o=t.get(e.payload.id)||n&&t.get(n)||e.deletedAnnotation;return(0,r.kG)(o instanceof a.Z),o.merge(e.payload)}if("delete"===e.type)return null;(0,r.Rz)(e.type)}function v(e,t){if(e.isHistoryEnabled){let n=!0;if(e.eventEmitter.emit("history.willChange",{annotation:t,type:"create",preventDefault(){n=!1}}),!n)return}e.historyChangeContext===l.j.DEFAULT&&e.isHistoryEnabled&&(e.update("undoActions",(e=>e.push({type:"delete",payload:{id:t.id}}))),e.update("redoActions",(e=>e.clear())))}function y(e,t,n,o){if(e.isHistoryEnabled){let t=!0;if(e.eventEmitter.emit("history.willChange",{annotation:n,type:"update",preventDefault(){t=!1}}),!t)return}if(!t.set("updatedAt",null).equals(n.set("updatedAt",null)))if(e.historyChangeContext===l.j.DEFAULT&&e.isHistoryEnabled&&function(e,t){if(e instanceof s.gd&&!e.text)return!(!t||!("text"in t))&&!!t.text.value;if(e instanceof s.Jn&&!e.isCommentThreadRoot)return!!t&&t.isCommentThreadRoot;if("number"!=typeof e.pageIndex&&"number"!=typeof t.pageIndex)return!1;return!0}(n,t)){const r="number"!=typeof t.pageIndex&&"number"==typeof n.pageIndex||t instanceof s.gd&&null==t.text||t instanceof s.Jn&&!t.isCommentThreadRoot&&n.isCommentThreadRoot?{type:"delete",payload:{id:t.id}}:{type:"update",payload:P(n,t),restoreAPStream:o,deletedAnnotation:null};e.update("undoActions",(e=>e.push(r))),e.update("redoActions",(e=>e.clear()))}else if(e.historyChangeContext!==l.j.HISTORY&&e.undoActions.size>0){const o=e.undoActions.findLastIndex((e=>("update"===e.type||"delete"===e.type)&&e.payload.id===n.id));-1!==o&&e.updateIn(["undoActions",o],(e=>"update"===e.type?h(h({},e),{},{payload:P(n,t.merge(e.payload)),restoreAPStream:e.restoreAPStream}):"delete"===e.type?h(h({},e),{},{payload:h(h({},P(n,t)),e.payload)}):e))}}function b(e,t,n){if(t instanceof d.Hu)return;if(e.isHistoryEnabled){let n=!0;if(e.eventEmitter.emit("history.willChange",{annotation:t,type:"delete",preventDefault(){n=!1}}),!n)return}const o=(0,c.xc)();if(e.historyChangeContext===l.j.DEFAULT&&e.isHistoryEnabled){const r=w(t,o,e.commentThreads,e.comments),i=S(t,o,e);e.update("undoActions",(e=>e.map((e=>e.payload.id===t.id?h(h({},e),{},{payload:h(h({},e.payload),{},{id:o})}):e)).push({type:"create",payload:t.set("id",o),formField:i,restoreAPStream:n,comments:r}))),e.update("redoActions",(e=>e.clear()));const a=e.historyIdsMap.get(t.id);a&&e.deleteIn(["historyIdsMap",t.id]),e.setIn(["historyIdsMap",o],a||t.id)}else if(e.historyChangeContext!==l.j.HISTORY&&e.undoActions.size>0){const r=e.undoActions.findLastIndex((e=>"update"===e.type&&e.payload.id===t.id));if(-1!==r){e.updateIn(["undoActions",r],(e=>({type:"update",deletedAnnotation:t,payload:e.payload,restoreAPStream:n})));const i=e.historyIdsMap.get(t.id);i&&e.deleteIn(["historyIdsMap",t.id]),e.setIn(["historyIdsMap",o],i||t.id)}}}function w(e,t,n,o){let r=null;if(e.isCommentThreadRoot){const i=n.get(e.id);r=i?i.map((e=>{const n=o.get(e);return n&&n.set("rootId",t)})).filter((e=>e&&!(0,u.kT)(e))).toList():null}return r}function S(e,t,n){let o=null;return e instanceof s.x_&&(o=(0,p.GA)(n,e)),o&&o.set("annotationIds",(0,i.aV)([t]))}function P(e,t){return t.toSeq().reduce(((t,n,o)=>(e.has(o)&&e.get(o)===n||(t[o]=n),t)),{id:e.id})}},58479:(e,t,n)=>{"use strict";n.d(t,{$:()=>v,Ah:()=>O,Bo:()=>P,R9:()=>f,Sv:()=>D,Tp:()=>x,U5:()=>T,_x:()=>b,dX:()=>y,jC:()=>S,jw:()=>g,lB:()=>C,mP:()=>E,nG:()=>m,tm:()=>w,wA:()=>A,wL:()=>k});var o=n(67294),r=n(67366),i=n(63738),a=n(27515),s=n(34573),l=n(66687),c=n(51731),u=n(78233),d=n(69939),p=n(4054);function f(e){const t=o.useRef(e),n=o.useCallback((function(){for(var e,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return null==t||null===(e=t.current)||void 0===e?void 0:e.call(t,...o)}),[]);return o.useEffect((()=>(t.current=e,()=>t.current=void 0))),n}function h(e){const t=(0,r.I0)();return[(0,r.v9)((t=>{if(t.documentComparisonState&&void 0!==t.documentComparisonState[e])return t.documentComparisonState[e];throw new Error("Document comparison state not properly initialized.")})),f((n=>t((0,i.M5)({[e]:n}))))]}function m(){return h("referencePoints")}function g(){return h("currentTab")}function v(){return h("autoCompare")}function y(){return h("isResultFetched")}function b(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const t=o.useRef(),n=o.useRef();return(0,r.v9)((o=>(o.viewportState===t.current&&n.current||(n.current=t=>t.apply((0,a.zi)(o,e))),t.current=o.viewportState,n.current)))}function w(){const e=o.useRef(!0),t=o.useCallback((()=>e.current),[]);return o.useEffect((()=>()=>{e.current=!1}),[]),t}function S(e){const t=o.useRef();return o.useEffect((()=>{t.current=e})),t.current}function P(e,t){const{customUIStore:n,sidebarMode:i}=(0,r.v9)((e=>({customUIStore:e.customUIStore,sidebarMode:e.sidebarMode}))),[a,s]=o.useState((()=>{var e;return i?null==n||null===(e=n.getState().Sidebar)||void 0===e?void 0:e[i]:void 0}));o.useEffect((()=>null==n?void 0:n.subscribe((e=>{var t;if(!i)return;const n=null==e||null===(t=e.Sidebar)||void 0===t?void 0:t[i];s((()=>n))}))),[n,i]);const l=e&&(null==a?void 0:a({containerNode:e,items:t})),c=null==l?void 0:l.node;return o.useEffect((()=>{c&&e&&c!==e&&e.lastChild!==c&&e.append(c)}),[e,c]),null==l?void 0:l.onRenderItem}function E(e,t,n){const r=o.useRef({}),i=f(t),a=f(n),s=o.useMemo((()=>(t,n)=>{e&&t&&n&&(e({itemContainerNode:t,item:n}),r.current[i(n)]=t)}),[e,i]);return o.useEffect((()=>{Object.entries(r.current).forEach((t=>{let[n,o]=t;if(o&&n){const t=a(n),o=r.current[n];e&&o&&t&&e({itemContainerNode:o,item:t})}}))}),[e,a]),e?s:null}function x(){const[e,t]=o.useState(null),[n,r]=o.useState(null),[i,a]=o.useState(null),s=o.useRef(),l=o.useRef(),c=o.useRef(null);o.useEffect((()=>{l.current=n,s.current=i})),o.useEffect((()=>{const t=e&&n&&!l.current,o=!e&&s.current&&i;(t||o)&&c.current&&c.current.focus()}),[n,i,e]);const u=o.useCallback((()=>{r(!0)}),[r]);return{handleGroupExpansion:o.useCallback((e=>{t(e),e?a(e):r(!1)}),[a,t,r]),handleEntered:u,expandedGroup:e,prevActiveGroup:i,btnFocusRef:c}}function D(e,t,n){o.useLayoutEffect((function(){null!==e&&(t((0,s.Sb)()),n(e))}),[n,e,t])}function C(e,t,n,r){return o.useCallback((function(o){if(!(e instanceof l.gd))return;const i=(0,u.Zv)(e,t,n).boundingBox;let a=null;switch(o){case c.V.RIGHT:a=e.setIn(["boundingBox","width"],i.width);break;case c.V.BOTTOM:a=e.setIn(["boundingBox","height"],i.height);break;case c.V.BOTTOM_RIGHT:a=e.set("boundingBox",i)}null!==a&&r((0,d.FG)((0,u.XA)(a,n)))}),[e,r,t,n])}function k(e){const t=o.useRef(null);return o.useEffect((function(){const{current:n}=t;n&&(0,p._s)(e(),n)}),[e]),t}function O(e){const[t,n]=o.useState(e),[r,i]=o.useState(e);return t!==e&&(i(e),n(e)),[r,i]}function A(e,t,n){o.useEffect((function(){if(!e)return;const o=t();return o.addEventListener("scroll",n),function(){o.removeEventListener("scroll",n)}}),[t,e,n])}function T(e){let{threshold:t=0}=e;const[n,r]=o.useState(null),[i,a]=o.useState(null),s=o.useRef(null);return o.useEffect((()=>{s.current&&s.current.disconnect(),s.current=new window.IntersectionObserver((e=>{let[t]=e;return r(t)}),{threshold:t});const{current:e}=s;return i&&e.observe(i),()=>e.disconnect()}),[i]),[a,n||{}]}},53678:(e,t,n)=>{"use strict";n.d(t,{Pn:()=>i,rH:()=>a,sf:()=>s,vu:()=>r});var o=n(97413);function r(e){return 200<=e&&e<300}function i(e){const t=e.indexOf("://")>0;(0,o.k)(t,`The baseUrl must be an absolute URL (e.g. https://example.com/pspdfkit-lib/), but it is set to ${e}.\nProtocol relative URLs (e.g. //example.com/pspdfkit-lib/) are not supported.`);const n="/"===e.substr(-1);(0,o.k)(n,`The baseUrl must have a trailing slash in the URL (e.g. https://example.com/pspdfkit-lib/), but it is set to ${e}.`)}function a(e){return i(e)}function s(e){const t=e.indexOf("://")>0;(0,o.k)(t,`The hostedBaseUrl must be an absolute URL (e.g. https://api.pspdfkit.com/, but it is set to ${e}.`);const n="/"===e.substr(-1);(0,o.k)(n,`The hostedBaseUrl must have a trailing slash in the URL (e.g. https://api.pspdfkit.com/), but it is set to ${e}.`)}},45588:(e,t,n)=>{"use strict";n.d(t,{Jc:()=>b,UW:()=>v,Y:()=>w,an:()=>y,uq:()=>g});var o=n(84121),r=n(30845),i=n(47347),a=n(91859),s=n(97333),l=n(37015),c=n(88804),u=n(92466),d=n(73815),p=n(66687);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const m=(0,r.Z)((function(e){const t=new FileReader;return new Promise(((n,o)=>{t.onerror=e=>o(new Error(e)),t.onload=e=>{var t;const o=new Image;o.onload=()=>{n(new c.$u({width:o.width,height:o.height}))},o.onerror=()=>n(new c.$u({width:a.zA,height:a._2})),o.src=null===(t=e.target)||void 0===t?void 0:t.result},t.readAsDataURL(e)}))}));const g=async e=>{const{Sha256:t,bytes_to_hex:o}=await n.e(4536).then(n.bind(n,61529)),r=new t,i=await(0,l.V)(e);return{hash:o(r.process(i).finish().result),dimensions:await m(e)}};function v(e){return`${e.imageAttachmentId}_${e.id}`}function y(e){var t;let{backend:n,blob:o,annotation:r,isDetachedAnnotation:a=!1,zoomLevel:l,variant:u}=e,f=null,m=!1;const y=null!==(t=null==r?void 0:r.rotation)&&void 0!==t?t:0;(0,i.kG)(n);const b=r?v(r):void 0;if(r&&"imageAttachmentId"in r&&r.imageAttachmentId&&b&&n.attachmentsCache.has(b)){const{dimensions:e,img:t,provisional:i,prevRotation:a}=n.attachmentsCache.get(b);if(n&&i&&o&&a===y)return w();o&&"image/png"!==o.type&&"image/jpeg"!==o.type&&"image/webp"!==o.type&&(m=!0),f=S(n,e,y,r,o,t).then((r=>(o&&"image/png"!==o.type&&"image/jpeg"!==o.type&&"image/webp"!==o.type&&r&&(n.attachmentsCache=n.attachmentsCache.set(b,{dimensions:e,img:t,provisional:!0,prevRotation:y})),r)))}else{if(!o||"image/png"!==o.type&&"image/jpeg"!==o.type&&"image/webp"!==o.type)return w();f=g(o).then((e=>{let{dimensions:t}=e;return S(n,t,y,r,o)})).catch((()=>{throw new i.p2("Couldn't read data from the provided image.")}))}return h(h({},(0,s.uZ)(f)),{},{isProvisional:m});function w(){(0,i.kG)(n,"Backend is required to render the image"),(0,i.kG)(r,"Annotation is required to render the image");const{boundingBox:e}=r,t=(0,d.L)()*(null!=l?l:1);let s=Math.round(e.width*t),f=Math.round(e.height*t);if(!(r instanceof p.GI||r instanceof p.sK)){const e=Math.sqrt(s*f/1e7);e>1&&(s=Math.round(s*(1/e)),f=Math.round(f*(1/e)))}const h=new c.$u({width:s,height:f}),m=a?n.renderDetachedAnnotation(r,o,s,f):n.cachedRenderAnnotation(r,o,s,f,u);return m.promise=m.promise.then((async e=>"imageAttachmentId"in r&&r.imageAttachmentId&&b&&null!=e&&e.element?0!==y?S(n,h,360-y,r,o,e.element).then((t=>(null!=t&&t.element&&(n.attachmentsCache=n.attachmentsCache.set(b,{dimensions:90===y||270===y?h.swapDimensions():h,img:t.element,prevRotation:y})),e))):(n.attachmentsCache=n.attachmentsCache.set(b,{dimensions:h,img:e.element,prevRotation:y}),e):e)),m}}function b(e,t){const n=new Uint8Array(e.length);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return new Blob([n.buffer],{type:t})}async function w(e,t,n){let o,r,{font:i,fontColor:a}=t;"OffscreenCanvas"in n?(o=new n.OffscreenCanvas(200,200),r=o.convertToBlob.bind(o)):(o=n.document.createElement("canvas"),r=()=>new Promise((e=>{o.toBlob(e)})));const s=o.getContext("2d");s.textBaseline="hanging";s.font=`100px "${i}"`;const{actualBoundingBoxLeft:l,actualBoundingBoxRight:c,width:u}=s.measureText(e);o.height=500;const d=2*(l||c?l+c:u);return o.width=d,s.textBaseline="hanging",s.font=`100px "${i}"`,s.fillStyle=a.toCSSValue(),s.fillText(e,d/4,125),function(e){const t=e.getContext("2d"),n=t.getImageData(0,0,e.width,e.height),o=n.data.length;let r=null,i=null,a=null,s=null,l=0,c=0;for(let t=0;t<o;t+=4)0!==n.data[t+3]&&(l=t/4%e.width,c=~~(t/4/e.width),null===r&&(r=c),(null===a||l<a)&&(a=l),(null===s||s<l)&&(s=l),(null===i||i<c)&&(i=c));r=r||0,i=i||0,a=a||0,s=s||0;const u=i-r,d=s-a;if(0===d||0===u)return;const p=t.getImageData(a,r,d,u);e.width=d,e.height=u,t.putImageData(p,0,0)}(o),r({type:"image/png"})}function S(e,t,n,o,r,i){if(i)return new Promise(((e,o)=>P(i,t,n).then(e,o)));if(r){const i=URL.createObjectURL(r),a=document.createElement("img");return new Promise(((s,l)=>{a.onload=()=>{r&&o&&(e.attachmentsCache=e.attachmentsCache.set(v(o),{dimensions:t,img:a,prevRotation:n})),P(a,t,n).then(s,l)},a.onerror=()=>{l(new Error("The attachment provided could not be rendered as image/jpeg, image/png or image/webp although the mime type suggests so."))},a.src=i}))}return new Promise((e=>e))}async function P(e,t,n){if(0===n)return e.onload=null,e.onerror=null,new u.Z(e,(()=>{}));{const o=document.createElement("canvas"),{width:r,height:a}=t;90===n||270===n?(o.width=a,o.height=r):(o.width=r,o.height=a);const s=o.getContext("2d");return(0,i.kG)(s,"Could not get canvas context"),90===n||270===n?s.translate(a/2,r/2):s.translate(r/2,a/2),s.rotate(n*-Math.PI/180),s.drawImage(e,-r/2,-a/2),new u.Z(o,(()=>{}))}}},7844:(e,t,n)=>{"use strict";n.d(t,{O:()=>i,b:()=>a});var o=n(35369);function r(e,t){if(e===t||(0,o.is)(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=Object.prototype.hasOwnProperty.bind(t);for(let r=0;r<n.length;r++)if(!i(n[r])||!(0,o.is)(e[n[r]],t[n[r]]))return!1;return!0}function i(e,t){return!r(this.props,e)||!r(this.state,t)}function a(e,t){if(e.length===t.length){let n=0;for(;n<e.length;){if(e[n]!==t[n])return e[n]<t[n]?-1:1;n++}return 0}return e.length<t.length?-1:1}},4352:(e,t,n)=>{"use strict";n.d(t,{$U:()=>g,H9:()=>u,HB:()=>h,IQ:()=>f,Ip:()=>y,Vv:()=>w,gz:()=>d,o:()=>p,u8:()=>v,vR:()=>m});var o=n(35369),r=n(66687),i=n(13816),a=n(51731),s=n(36095),l=n(73815),c=n(97413);function u(e,t,n){return 0===n||0===e.size||e.last().distance(t)>n}function d(e){var t,n,o,i;if(0===e.lines.size)return new r.UL;const a=e.lines.flatMap((e=>e)),s=Math.ceil((null===(t=a.maxBy((e=>e.x)))||void 0===t?void 0:t.x)+e.lineWidth/2),l=Math.ceil((null===(n=a.maxBy((e=>e.y)))||void 0===n?void 0:n.y)+e.lineWidth/2),c=Math.floor((null===(o=a.minBy((e=>e.x)))||void 0===o?void 0:o.x)-e.lineWidth/2),u=Math.floor((null===(i=a.minBy((e=>e.y)))||void 0===i?void 0:i.y)-e.lineWidth/2);return new r.UL({width:s-c,height:l-u,top:u,left:c})}function p(e,t,n){const{width:o,height:s}=e.boundingBox,l=(0,i.BP)(new r.$u({width:o,height:s}),t);return(0,i.D7)(e,new r.E9({x:l.width-o,y:l.height-s}),a.V.BOTTOM_RIGHT,n,!1)}const f=e=>e.reduce(((e,t)=>(null==t?e.push((0,o.aV)()):e[e.length-1]=e[e.length-1].push(t),e)),[(0,o.aV)()]).filter((e=>e.size>0)),h=e=>{const t=Math.abs(Math.ceil(Math.log10((0,l.L)()*e)));let n;return n=t>100?100:t,n},m=(e,t)=>{const n=e.first();if(1===e.size&&n)return[`L ${n.x},${n.y}`];const o=[`M ${n.x},${n.y}`],r=e.get(1);if(2===e.size&&r)return o.push(`L ${r.x},${r.y}`),o;for(let n=2,r=e.size;n<r;++n){const i=e.get(n-2),a=e.get(n-1);if(i&&a){const s={x:(2*i.x+a.x)/3,y:(2*i.y+a.y)/3},l={x:2*s.x-i.x,y:2*s.y-i.y},c=a,u=e.get(n);if(u){const e={x:(2*c.x+u.x)/3,y:(2*c.y+u.y)/3};if(o.push(`C ${s.x.toFixed(t)},${s.y.toFixed(t)} ${l.x.toFixed(t)},${l.y.toFixed(t)} ${(l.x+(e.x-l.x)/2).toFixed(t)},${(l.y+(e.y-l.y)/2).toFixed(t)}`),n===r-1){const n={x:2*e.x-c.x,y:2*e.y-c.y};o.push(`C ${e.x.toFixed(t)},${e.y.toFixed(t)} ${n.x.toFixed(t)},${n.y.toFixed(t)} ${u.x.toFixed(t)},${u.y.toFixed(t)}`)}}}}return o},g=e=>{const t=e.first();return 1===e.size&&t?[`L ${t.x},${t.y}`]:e.reduce(((e,t,n)=>(n>0&&e.push(`L ${t.x},${t.y}`),e)),[`M ${t.x},${t.y}`])},v=e=>e.reduce(((t,n,o)=>(e[o-1]&&"M 0,0"!==e[o-1]||!n.startsWith("L")||t.push(n.replace("L","M")),t.push(n),t)),[]).join(" ");function y(e,t,n){if(e.lines.size<2)return!0;const o=e.lines.last();if(null==e.lines.get(e.lines.size-2)||null==o||0===o.size||o.size>2)return!0;const r=.5*(t.width+t.height),i=e.lines.size<50?.15:.03,a=(Date.now()-n)/1e3;if(a<i)return!0;const s=o.first();return Boolean(e.lines.pop().some((e=>e.some((e=>e.distance(s)<r*i/a)))))}function b(e){const t=Math.ceil(2*e)+4,n=Math.ceil(2*e)+4,o=document.createElement("canvas");o.width=t,o.height=n;const r=o.getContext("2d");return(0,c.k)(r),r.beginPath(),r.arc(e+2,e+2,e,0,2*Math.PI,!1),r.lineWidth=1,r.strokeStyle="rgba(0,0,0,.7)",r.stroke(),r.beginPath(),r.arc(e+2,e+2,e+1,0,2*Math.PI,!1),r.lineWidth=1,r.strokeStyle="white",r.stroke(),o.toDataURL()}function w(e){if(s.Mn||e<3)return"crosshair";const t=b(e),n=s.SR;if("webkit"===n||"blink"===n){return`-webkit-image-set(\n url('${t}') 1x,\n url('${b(2*e)}') 2x\n ) ${e+2} ${e+2}, crosshair`}return`url('${t}') ${e+2} ${e+2}, crosshair`}},97413:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});var o=n(47347);function r(e,t){if(!e)throw new o.p2(`Assertion failed: ${t||"Condition not met"}\n\nFor further assistance, please go to: https://pspdfkit.com/support/request`)}},28028:(e,t,n)=>{"use strict";n.d(t,{eU:()=>s,t0:()=>l,yK:()=>a});var o=n(19575),r=n(47347),i=n(21076);function a(e){const t="The supplied JWT is invalid. Please refer to our guides on how to set up authentication:\n https://pspdfkit.com/guides/web/current/server-backed/client-authentication/";if(-1!==e.indexOf('{"internal":'))return;let n;(0,r.kG)("string"==typeof e&&3===e.split(".").length,t);try{const t=o.Base64.decode(e.split(".")[1]);n=JSON.parse(t)}catch(e){throw new r.p2(t)}(0,r.kG)("string"==typeof n.document_id,"The supplied JWT is invalid. The field 'document_id' has to be a string value.\n Please refer to our guides for further information: https://pspdfkit.com/guides/web/current/server-backed/client-authentication/")}function s(e){if("string"!=typeof e)throw new r.p2("`accessToken` must be of type string.")}function l(e,t){(0,r.kG)("string"==typeof e,"`appName` must be a string."),(0,r.kG)((0,i.d)()||(0,i.AL)(e,t),"`appName` should only be set when using Electron or Maui."),(0,r.kG)(!(0,i.Sk)()||(0,i.AL)(e,t),"`appName` should only be set when using Electron without node integration or Maui.")}},77552:(e,t,n)=>{"use strict";function o(e){return{name:e.name,scale:{unitFrom:e.scale.unitFrom,unitTo:e.scale.unitTo,from:Number(e.scale.fromValue),to:Number(e.scale.toValue)},precision:e.precision}}n.d(t,{f:()=>o})},30570:(e,t,n)=>{"use strict";n.d(t,{B0:()=>Q,Di:()=>x,Ex:()=>G,Hg:()=>q,KI:()=>D,P_:()=>N,Qc:()=>Z,Rc:()=>V,Rw:()=>L,S6:()=>R,W9:()=>z,_P:()=>A,b5:()=>U,bs:()=>Y,cd:()=>B,fH:()=>H,m_:()=>j,mq:()=>$,nK:()=>K,t9:()=>_,xA:()=>X,zl:()=>J});var o=n(84121),r=n(47347),i=n(85628),a=n.n(i),s=n(35369),l=n(71603),c=n(9599),u=n(69939),d=n(74115),p=n(20792),f=n(4132),h=n(36489),m=n(79827),g=n(70076),v=n(20683),y=n(88713),b=n(50690),w=n(87043),S=n(36095);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const x=[{interactionMode:p.A.DISTANCE,icon:"distance",title:"Distance",className:"PSPDFKit-Form-Creator-Toolbar-ButtonWidget",class:v.Z,preset:"distance",localeKey:"distanceMeasurement"},{interactionMode:p.A.PERIMETER,icon:"perimeter",title:"Perimeter",className:"PSPDFKit-Form-Creator-Toolbar-TextWidget",class:b.Z,preset:"perimeter",localeKey:"perimeterMeasurement"},{interactionMode:p.A.RECTANGLE_AREA,icon:"rectangle-area",title:"Rectangle-Area",className:"PSPDFKit-Form-Creator-Toolbar-RadioWidget",class:w.Z,preset:"rectangle-area",localeKey:"rectangularAreaMeasurement"},{interactionMode:p.A.POLYGON_AREA,icon:"polygon-area",title:"Polygon-Area",className:"PSPDFKit-Form-Creator-Toolbar-CheckboxWidget",class:y.Z,preset:"polygon-area",localeKey:"polygonAreaMeasurement"},{interactionMode:p.A.ELLIPSE_AREA,icon:"ellipse-area",title:"Ellipse-Area",className:"PSPDFKit-Form-Creator-Toolbar-ComboboxWidget",class:g.Z,preset:"ellipse-area",localeKey:"ellipseAreaMeasurement"}];function D(e,t){var n;const o=e.strokeWidth/2+10,{coordinate:r,angleInDegrees:i}=function(e,t){if(e instanceof v.Z){const{startPoint:t,endPoint:n}=e;return C(t,n)}if(e instanceof b.Z){const{points:n}=e;if(n.size<2)return{};const o=n.last(),r=n.get(n.size-2);return o.y===r.y?C(r,o):o.y<r.y?{coordinate:[o.x,o.y-t]}:{coordinate:[o.x,o.y+t]}}if(e instanceof y.Z){const{points:n}=e,o=n.sort(((e,t)=>e.y-t.y)).first();return{coordinate:[o.x,o.y-t]}}{const{boundingBox:t}=e;return{coordinate:[t.left+t.width/2,t.top+t.height/2]}}}(e,o);if(!r)return{display:"none"};const a={position:"absolute",transform:"translate(-50%, -50%) "+(e instanceof b.Z||e instanceof w.Z||e instanceof g.Z?"":e instanceof v.Z&&i?`rotate(${i}deg) translate(0, -${e.strokeWidth/2+10}px)`:i?`rotate(${i}deg) translate(0px, -${e.strokeWidth/2+10}px)`:`translate(0px, -${e.strokeWidth/2+10}px)`),transformOrigin:"center",fontSize:12,color:null===(n=e.strokeColor)||void 0===n?void 0:n.toCSSValue(),width:"max-content",left:r[0],top:e instanceof v.Z&&S.G6&&!i?r[1]-20:r[1]},{boundingBox:s}=e;return(e instanceof w.Z||e instanceof g.Z)&&(t&&s.width<200||s.width<80)?E(E({},a),{},{top:s.top-30}):a}function C(e,t){let n=e,o=t;t.x<e.x&&(n=t,o=e);const r=180*Math.atan2(o.y-n.y,o.x-n.x)/Math.PI;return{coordinate:[(e.x+t.x)/2,(e.y+t.y)/2],angleInDegrees:r}}const k={[f.L.WHOLE]:0,[f.L.ONE]:1,[f.L.TWO]:2,[f.L.THREE]:3,[f.L.FOUR]:4},O={[f.L.HALVES]:.5,[f.L.QUARTERS]:1/4,[f.L.EIGHTHS]:1/8,[f.L.SIXTEENTHS]:1/16},A=E(E({},k),O);function T(e){let t=0;function n(e,t){const n=t.x-e.x,o=t.y-e.y;return Math.sqrt(n*n+o*o)}for(let o=0;o<e.size-1;o++)t+=n(e.get(o),e.get(o+1));return t}function I(e){return Math.abs(e)<=Number.EPSILON}var F=function(e){return e[e.in=0]="in",e[e.mm=1]="mm",e[e.cm=2]="cm",e[e.pt=3]="pt",e[e.ft=4]="ft",e[e.m=5]="m",e[e.yd=6]="yd",e[e.km=7]="km",e[e.mi=8]="mi",e}(F||{});const M=[[1,25.4,2.54,72,.083333,.0254,.0277778,254e-7,157828e-10],[.0393701,1,.1,2.83465,.00328084,.001,.00109361,1e-6,6.21371e-7],[.393701,10,1,28.34655,.0328084,.01,.0109361,1e-5,621371e-11],[.0138889,.352778,.0352778,1,.00115741,352778e-9,385802e-9,3.52778e-7,2.19206086473e-7]];function _(e){const{measurementPrecision:t,measurementScale:n}=e;(0,r.kG)(t,"measurementPrecision is required"),(0,r.kG)(n,"measurementScale is required");const o=I(n.toValue)||I(n.fromValue)?0:n.toValue/n.fromValue;let i,l,c=M[F[h.s.POINTS]][F[n.unitFrom]];if(e instanceof v.Z){const{startPoint:t,endPoint:n}=e;i=T((0,s.aV)([t,n])),c*=o}else if(e instanceof b.Z){const{points:t}=e;i=T(t),c*=o}else if(e instanceof y.Z){const{points:t}=e;i=function(e){if(!e.size)return 0;let t=0;for(let n=0;n<e.size-1;n++)t+=e.get(n).x*e.get(n+1).y-e.get(n+1).x*e.get(n).y;return t+=e.get(e.size-1).x*e.get(0).y-e.get(0).x*e.get(e.size-1).y,t/=2,Math.abs(t)}(t),c=Math.pow(c,2)*Math.pow(o,2)}else if(e instanceof w.Z){const{boundingBox:t}=e;i=t.width*t.height,c=Math.pow(c,2)*Math.pow(o,2)}else{const{boundingBox:t}=e;i=Math.PI*(t.width/2)*(t.height/2),c=Math.pow(c,2)*Math.pow(o,2)}if("1/2"===t){const e=2,t=Math.round(i*c*e);l=new(a())(t/e).toFraction(!0)}else if("1/4"===t){const e=4,t=Math.round(i*c*e);l=new(a())(t/e).toFraction(!0)}else if("1/8"===t){const e=8,t=Math.round(i*c*e);l=new(a())(t/e).toFraction(!0)}else if("1/16"===t){const e=16,t=Math.round(i*c*e);l=new(a())(t/e).toFraction(!0)}else l=(i*c).toFixed(A[t]);return{value:i*c,label:`${l} ${e instanceof v.Z||e instanceof b.Z?"":"sq "}${n.unitTo}`}}function N(e,t){var n;const{measurementScale:o}=e;(0,r.kG)(o,"measurementScale is required");const i=t/(T(e instanceof b.Z?e.points:(0,s.aV)([e.startPoint,e.endPoint]))*M[F[h.s.POINTS]][F[o.unitFrom]])*o.fromValue;return null==o||null===(n=o.set)||void 0===n?void 0:n.call(o,"toValue",i)}function R(e){return(e instanceof g.Z||e instanceof w.Z)&&e.isMeasurement()}function L(e,t){if(t&&e.measurementScale){const n=e.measurementScale.set("unitTo",t.unitTo);return _(e.set("measurementScale",n).set("measurementPrecision",t.precision))}return""}function B(e,t){const n=e.scale.unitFrom,o=e.scale.unitTo,r=Number(e.scale.fromValue),i=Number(e.scale.toValue),a=e.precision,s=t.scale.unitFrom,l=t.scale.unitTo,c=Number(t.scale.fromValue),u=Number(t.scale.toValue),d=t.precision;return n===s&&o===l&&r===c&&i===u&&a===d}const j=Object.keys(h.s).map((e=>({label:h.s[e],value:h.s[e],disabled:!1}))),z=function(){const e=[];for(const t in f.L){const n=Object.keys(f.L).find((e=>e===t));if(n&&k.hasOwnProperty(f.L[t]))e.push((1/Math.pow(10,A[f.L[n]])).toString());else if(n&&O.hasOwnProperty(f.L[t])){const t=new(a())(A[f.L[n]]);e.push(t.toFraction(!0).toString())}}return e}(),K=Object.keys(f.L).map(((e,t)=>({label:z[t],value:f.L[e]}))),Z=Object.keys(f.L).filter((e=>!J(f.L[e]))).map(((e,t)=>({label:z[t],value:f.L[e]}))),U=Object.keys(m.K).map((e=>({value:m.K[e],label:m.K[e]}))),V=(e,t)=>({added:t.filter((t=>!e.find((e=>JSON.stringify(e)===JSON.stringify(t))))),deleted:e.filter((e=>!t.find((t=>JSON.stringify(e)===JSON.stringify(t)))))});function G(e){return e.map(((e,t)=>{const n=E(E({},e),{},{scale:E(E({},e.scale),{},{fromValue:e.scale.from,toValue:e.scale.to})});var o;(delete n.scale.from,delete n.scale.to,n.name&&""!==n.name.trim())||(n.name=(null===(o=(0,c.sJ)(n))||void 0===o?void 0:o.label)||`Scale ${t}`);return d.q[n.precision]&&(n.precision=d.q[n.precision]),n}))}async function W(e){let{operation:t,scale:n,getState:o,measurementUpdate:r,dispatch:i}=e;const a=o(),{backend:c,annotations:d,annotationManager:p}=a;const f=async(e,r)=>{const a=await(async e=>(await(null==p?void 0:p.loadAnnotationsForPageIndex(e)),o().annotations))(r);!function(e,t,o){e.forEach((e=>{const r=t.find((t=>t.pdfObjectId===e.pdfObjectId));if(r)switch(o){case"edit":{const e=r.set("measurementScale",new l.Z({fromValue:Number(n.scale.fromValue),toValue:Number(n.scale.toValue),unitFrom:n.scale.unitFrom,unitTo:n.scale.unitTo})).set("measurementPrecision",n.precision);i((0,u.FG)(e));break}case"delete":i((0,u.hQ)(r))}}))}(e,a,t)},h="STANDALONE"===c.type?await c.getAnnotationsByScale(n):function(e,t){return t.filter((t=>{const n=t.measurementScale,o=t.measurementPrecision;return!!n&&n.unitFrom===e.scale.unitFrom&&n.unitTo===e.scale.unitTo&&n.fromValue===e.scale.fromValue&&n.toValue===e.scale.toValue&&o===e.precision}))}(n,d),m=[];if(h.forEach((e=>{const n=d.find((t=>t.pdfObjectId?t.pdfObjectId===e.pdfObjectId:t.id===e.id));if(n&&"edit"===t&&r){const e=n.set("measurementScale",r.scale).set("measurementPrecision",r.precision);i((0,u.FG)(e))}else n&&"delete"===t?i((0,u.hQ)(n)):m.push(e)})),m.length>0){const e=(0,s.l4)(m.map((e=>e.pageIndex)));await Promise.all(e.map((async e=>{await f(m,e)})))}}async function q(e){let{scale:t,oldScale:n,getState:o,dispatch:r}=e;const i={scale:new l.Z({fromValue:Number(t.scale.fromValue),toValue:Number(t.scale.toValue),unitFrom:t.scale.unitFrom,unitTo:t.scale.unitTo}),precision:t.precision};await W({operation:"edit",scale:n,getState:o,measurementUpdate:i,dispatch:r})}async function H(e){let{deletedScale:t,getState:n,dispatch:o}=e;await W({operation:"delete",scale:t,getState:n,dispatch:o})}function $(e){if(e.size<2)return!1;const t=e.toList(),n=t.first(),o={scale:n.measurementScale,precision:n.measurementPrecision};for(let e=1;e<t.size;e++){const n=t.get(e);if(!B(o,{scale:n.measurementScale,precision:n.measurementPrecision}))return!0}return!1}function X(e){if(e.size<2)return!1;const t=e.toList(),n=Y(e.first());for(let e=1;e<t.size;e++){if(n!==Y(t.get(e)))return!0}return!1}function Y(e){return e instanceof v.Z?"Distance":e instanceof b.Z?"Perimeter":e instanceof g.Z?"Ellipse-Area":e instanceof w.Z?"Rectangle-Area":e instanceof y.Z?"Polygon-Area":void 0}function J(e){return["1/2","1/4","1/8","1/16"].includes(e)}function Q(e){return["mm","cm","m","km"].includes(e)}},25256:(e,t,n)=>{"use strict";n.d(t,{Sy:()=>s,Zt:()=>u,dY:()=>l});var o=n(47347),r=n(66687),i=n(3026),a=n(95651);function s(e,t,n){let s;if(e instanceof r.o9)return s=e.set(["startPoint","endPoint"][n],e[["startPoint","endPoint"][n]].translate(t)),s.set("boundingBox",(0,i.sS)(r.o9)(s));var c;if(e instanceof r.om||e instanceof r.Hi)return s=e.setIn(["points",n],null===(c=e.points.get(n))||void 0===c?void 0:c.translate(t)),s.set("boundingBox",(0,i.sS)(r.om)(s));if((0,a.Vc)(e)){var d,p;(0,o.kG)(e instanceof r.gd,"Callout annotation must have a callout");const a=null!==(d=e.callout)&&void 0!==d&&d.knee?["start","knee","end"]:["start","end"];if("end"===a[n])return e;s=e.setIn(["callout",a[n]],null===(p=e.callout)||void 0===p||null===(p=p[a[n]])||void 0===p?void 0:p.translate(t));const{callout:c}=s;(0,o.kG)(c,"Callout annotation must have a callout");const f=c.innerRectInset;(0,o.kG)(f,"Callout annotation must have an innerRectInset"),(0,o.kG)(c.start,"Callout annotation must have a start point");const h={left:e.boundingBox.left+f.left,top:e.boundingBox.top+f.top,right:e.boundingBox.left+e.boundingBox.width-f.right,bottom:e.boundingBox.top+e.boundingBox.height-f.bottom},m=l([[h.left,h.top],[h.right,h.top],[h.right,h.bottom],[h.left,h.bottom]]),g=(0,i.sS)(r.gd)(s),v=new r.eB({left:h.left-g.left,top:h.top-g.top,right:g.left+g.width-h.right,bottom:g.top+g.height-h.bottom});return s.set("boundingBox",g).setIn(["callout","innerRectInset"],v).setIn(["callout","end"],u(c.knee||c.start,m))}return e}function l(e){const t=[];for(let n=0;n<e.length;n++){const o=e[n],i=e[(n+1)%e.length];t.push(new r.E9({x:(o[0]+i[0])/2,y:(o[1]+i[1])/2}))}return t}function c(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function u(e,t){let n=t[0],o=c(e,n);for(const r of t){const t=c(e,r);t<o&&(n=r,o=t)}return n}},49242:(e,t,n)=>{"use strict";n.d(t,{I:()=>r,W:()=>i});var o=n(91859);function r(e){return e.button===o.oW}function i(e){return e.buttons===o.M5}},37676:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i,l:()=>a});var o=n(21076);const r=["http","https","mailto"];function i(e){const t=e.split(":")[0];if(t===e)e=/^[./#]/.test(e)?e:"http://"+e;else if(r.indexOf(t)<=-1)return;a(e,!0)}function a(e,t){if((0,o.Sk)()){(0,o.oH)("electron").shell.openExternal(e)}else if(t){window.open(e,"_blank").opener=null}else window.opener=null,window.location.href=e}},19815:(e,t,n)=>{"use strict";n.d(t,{$Q:()=>g,Ez:()=>S,HI:()=>v,LC:()=>I,Pt:()=>y,RZ:()=>m,VT:()=>h,VY:()=>N,Vz:()=>R,Xr:()=>A,YN:()=>F,aE:()=>M,bp:()=>x,ix:()=>C,j$:()=>P,jb:()=>f,k_:()=>k,lV:()=>w,qs:()=>T,xW:()=>_,xr:()=>O});var o=n(47347),r=n(66687),i=n(18146),a=n(70094),s=n(10284),l=n(67628),c=n(60619),u=n(97528),d=n(60132),p=n(72131);function f(e){return e.documentPermissions.printHighQuality}function h(e){return e.documentPermissions.printing&&e.printingEnabled&&e.backendPermissions.downloadingAllowed}function m(e){return e.exportEnabled&&e.backendPermissions.downloadingAllowed}function g(e){return e.documentPermissions.extract&&e.clientPermissions.extract}function v(e){return g(e)&&!e.clientPermissions.preventTextCopy}function y(e){return e.documentPermissions.toJS()}function b(e){let{backendPermissions:t,documentPermissions:n,readOnlyEnabled:o}=e;return!(!n.modification&&n.annotationsAndForms&&!t.readOnly&&o===p.J.NO)}function w(e,t){let n=!1;if((0,o.kG)(t.backend),t.backend.isCollaborationPermissionsEnabled()&&e instanceof r.x_){const o=(0,c.GA)(t,e);n=!!o&&(0,s.os)(o,t)}const i=!n&&!(0,s.CM)(e,t)&&!(0,s.Kd)(e,t);if(M(t)&&(!("isSignature"in e)||!e.isSignature))return!0;if(E(t)||i)return!0;if(e instanceof a.FN&&(e=e.parentAnnotation),!(e instanceof r.gd||e instanceof r.Qi)&&!e.note&&e.locked)return e.locked;if(e.locked&&e.lockedContents)return!0;if(e.readOnly&&(!(e instanceof r.x_)||!(e instanceof r.R1)))return e.readOnly;if(t.isEditableAnnotation)return!t.isEditableAnnotation(e);if(!x(t)||!b(t)){if(0===t.editableAnnotationTypes.size)return!0;if(t.editableAnnotationTypes.find((t=>e instanceof t)))return!1}return!0}function S(e,t){const n=!(0,s.kR)(e,t)&&!(0,s.Ss)(e,t);return!(I(t)&&!E(t)&&!n)||(t.isEditableComment?!t.isEditableComment(e):!!x(t)&&b(t))}function P(e,t,n){let{features:o,backend:a,backendPermissions:s,documentPermissions:l,readOnlyEnabled:c,editableAnnotationTypes:u}=t;if(e===r.Jn&&!I({features:o,backend:a}))return!0;if(e===i.Z&&!o.includes(d.q.REDACTIONS))return!0;if(e===r.UX&&n&&!o.includes(d.q.MEASUREMENT_TOOLS))return!0;return!!M({features:o})||(!(!x({backendPermissions:s,documentPermissions:l,readOnlyEnabled:c})||!b({backendPermissions:s,documentPermissions:l,readOnlyEnabled:c}))||!u.find((t=>e===t||e.prototype instanceof t||t.prototype instanceof e)))}function E(e){return e.backendPermissions.readOnly}function x(e){let{backendPermissions:t,documentPermissions:n,readOnlyEnabled:o}=e;return t.readOnly||!n.modification||o!==p.J.NO}function D(e){return(e.documentPermissions.annotationsAndForms||e.documentPermissions.fillForms)&&e.formsEnabled}function C(e){return D(e)&&k(e.backend)&&e.features.includes(d.q.FORM_DESIGNER)}function k(e){return(0,o.kG)(e),e.isUsingInstantProvider()||"STANDALONE"===e.type}function O(e){return(0,o.kG)(e),e.isUsingInstantProvider()||"STANDALONE"===e.type}function A(e){let{features:t,backendPermissions:n,documentPermissions:o,readOnlyEnabled:r}=e;return t.includes(d.q.DOCUMENT_EDITING)&&!(n.readOnly||!o.modification||r===p.J.VIA_VIEW_STATE||r===p.J.VIA_BACKEND_PERMISSIONS)}function T(e){let{features:t,backendPermissions:n,documentPermissions:o,readOnlyEnabled:r}=e;return t.includes(d.q.CONTENT_EDITING)&&!(n.readOnly||!o.modification||r===p.J.VIA_VIEW_STATE||r===p.J.VIA_BACKEND_PERMISSIONS)}function I(e){let{features:t,backend:n}=e;return(0,o.kG)(n),t.includes(d.q.COMMENTS)&&("STANDALONE"===n.type||"SERVER"===n.type&&n.isUsingInstantProvider())}function F(e){let{features:t,backend:n}=e;return(0,o.kG)(n),t.includes(d.q.MEASUREMENT_TOOLS)&&("STANDALONE"===n.type||"SERVER"===n.type)}function M(e){let{features:t}=e;return!R(t)&&t.includes(d.q.ELECTRONIC_SIGNATURES)}function _(e,t){return!!(t===l.H.LEGACY_SIGNATURES||e.includes(d.q.FORMS)&&(e.includes(d.q.ELECTRONIC_SIGNATURES)||e.includes(d.q.DIGITAL_SIGNATURES)))}function N(e,t,n){let{backendPermissions:o,documentPermissions:i,isEditableAnnotation:a,editableAnnotationTypes:s,readOnlyEnabled:l}=n;return e.readOnly||a&&!a(t)||!s.has(r.x_)||!u.Options.IGNORE_DOCUMENT_PERMISSIONS&&!i.fillForms&&!i.annotationsAndForms||o.readOnly||l!==p.J.NO}function R(e){return e.includes(d.q.WEB_ANNOTATION_EDITING)||e.includes(d.q.ANNOTATION_EDITING)}},97333:(e,t,n)=>{"use strict";function o(e){return new Promise(((t,n)=>{let o=0;const r=[];let i=!1;const a=()=>{o>=e.length&&(i?n(r):t(r))};a(),e.forEach(((e,t)=>{e.then((e=>{o+=1,r[t]=e,a()})).catch((e=>{o+=1,r[t]=e,i=!0,a()}))}))}))}function r(e,t){let n=!1;return{promise:new Promise(((t,o)=>{e.then((e=>!n&&t(e)),(e=>!n&&o(e)))})),cancel(){n=!0,t&&t()}}}function i(e,t){return new Promise((function(n,o){e.then(n,o),setTimeout((function(){o(Error("promise:timeout"))}),t)}))}n.d(t,{Vs:()=>i,jK:()=>o,uZ:()=>r})},73815:(e,t,n)=>{"use strict";function o(){let e=1;return void 0!==window.devicePixelRatio&&(e=window.devicePixelRatio),e}n.d(t,{L:()=>o})},13816:(e,t,n)=>{"use strict";n.d(t,{BP:()=>E,D7:()=>S,G8:()=>v,cL:()=>x,er:()=>P});var o=n(35369),r=n(47347),i=n(97528),a=n(51731),s=n(66687),l=n(75669);function c(e){switch(e){case a.V.TOP:return{mx:0,my:-1};case a.V.BOTTOM:return{mx:0,my:1};case a.V.LEFT:return{mx:-1,my:0};case a.V.RIGHT:return{mx:1,my:0};case a.V.TOP_LEFT:return{mx:-1,my:-1};case a.V.TOP_RIGHT:return{mx:1,my:-1};case a.V.BOTTOM_RIGHT:return{mx:1,my:1};case a.V.BOTTOM_LEFT:return{mx:-1,my:1}}throw new r.p2("Expected `getMultipliersFromResizeStartingAnchor` to be called with a valid `ResizeStartingAnchor` value.")}function u(e,t,n,o,r){const i=c(t);let a,s=e.width+i.mx*n.x,l=e.height+i.my*n.y;return r&&o&&(i.mx>0&&e.left+s>o.width?(s=o.width-e.left,a="width"):i.mx<0&&s-e.width>e.left&&(s=e.left+e.width,a="width"),i.my>0&&e.top+l>o.height?(l=o.height-e.top,a="height"):i.my<0&&l-e.height>e.top&&(l=e.top+e.height,a="height")),{rect:e.set("width",s).set("height",l),keepToSide:a}}function d(e,t,n,o,r){const i=c(t),a=-1*i.mx*(e.width-e.width*n),l=-1*i.my*(e.height-e.height*o),u=r?new s.E9({x:i.mx>=0?0:Math.max(-e.left,a),y:i.my>=0?0:Math.max(-e.top,l)}):new s.E9({x:i.mx>=0?0:a,y:i.my>=0?0:l});return{translation:u,dragDifference:r?new s.E9({x:i.mx>=0?0:a-u.x,y:i.my>=0?0:l-u.y}):new s.E9({x:0,y:0})}}function p(e,t){const n=c(t);return new s.E9({x:e.boundingBox.left+e.boundingBox.width/2+-1*n.mx*e.boundingBox.width/2,y:e.boundingBox.top+e.boundingBox.height/2+-1*n.my*e.boundingBox.height/2})}function f(e,t,n,o){let r=e.lines;const i=p(e,o);return r=r.map((e=>e.map((e=>e.translate(i.scale(-1)).scale(t,n).translate(i))))),r}function h(e,t,n,r){let i;if(e instanceof s.o9)i=(0,o.aV)([e.startPoint,e.endPoint]);else{if(!(e instanceof s.Hi||e instanceof s.om))return(0,o.aV)();i=e.points}const a=p(e,r);return i=i.map((e=>e.translate(a.scale(-1)).scale(t,n).translate(a))),i}function m(e,t,n){const o=v(e);if(o>0){const r=e.boundingBox,i=r.width<o?r.width:o;if(t.width<i){const e=t.width;if(t=n?y("width",r,t.set("width",i)):t.set("width",i),r.left!==t.left){const n=t.width-e;t=t.set("left",t.left+n)}}const a=r.height<o?r.height:o;if(t.height<a){const e=t.height;if(t=n?y("height",r,t.set("height",a)):t.set("height",a),r.top!==t.top){const n=t.height-e;t=t.set("top",t.top+n)}}}return t}function g(e,t,n,o){const r=e.boundingBox;let i=t.width;o.maxWidth&&i>o.maxWidth&&(i=o.maxWidth),o.minWidth&&i<o.minWidth&&(i=o.minWidth);const a=t.width;if(t=n?y("width",r,t.set("width",i)):t.set("width",i),r.left!==t.left){const e=t.width-a;t=t.set("left",t.left+e)}let s=t.height;o.maxHeight&&t.height>o.maxHeight&&(s=o.maxHeight),o.minHeight&&t.height<o.minHeight&&(s=o.minHeight);const l=t.height;if(t=n?y("height",r,t.set("height",s)):t.set("height",s),r.top!==t.top){const e=t.height-l;t=t.set("top",t.top+e)}return t}function v(e){const{MIN_IMAGE_ANNOTATION_SIZE:t,MIN_STAMP_ANNOTATION_SIZE:n,MIN_TEXT_ANNOTATION_SIZE:o,MIN_INK_ANNOTATION_SIZE:r,MIN_SHAPE_ANNOTATION_SIZE:a,MIN_WIDGET_ANNOTATION_SIZE:l}=i.Options;switch(e.constructor){case s.sK:return t;case s.GI:return n;case s.gd:return o;case s.Zc:return r;case s.o9:case s.b3:case s.Xs:case s.om:case s.Hi:return a;case s.x_:return l;default:return 0}}function y(e,t,n){if(!e)return function(e,t){if(0===e.height||0===e.width)return t;const n=e.width/e.height,o=(t.height+n*t.width)/(n**2+1);return t.set("height",o).set("width",o*n)}(t,n);if(0===t.width||0===t.height||0===n[e])return n;const o="width"===e?"height":"width",r=t[e]/t[o];return n.set(o,n[e]/r)}const b={0:a.V.BOTTOM_RIGHT,90:a.V.TOP_RIGHT,180:a.V.TOP_LEFT,270:a.V.BOTTOM_LEFT},w={[a.V.TOP]:a.V.TOP_RIGHT,[a.V.BOTTOM]:a.V.BOTTOM_RIGHT,[a.V.LEFT]:a.V.BOTTOM_LEFT,[a.V.RIGHT]:a.V.BOTTOM_RIGHT,[a.V.TOP_LEFT]:a.V.TOP_LEFT,[a.V.TOP_RIGHT]:a.V.TOP_RIGHT,[a.V.BOTTOM_LEFT]:a.V.BOTTOM_LEFT,[a.V.BOTTOM_RIGHT]:a.V.BOTTOM_RIGHT};function S(e,t,n,o){let r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=arguments.length>5?arguments[5]:void 0,p=arguments.length>6?arguments[6]:void 0,S=arguments.length>7?arguments[7]:void 0;const E=e.boundingBox;let x;if((0,l.o0)(e)&&!(0,l.Ag)(e)){const o=c(n),r=new s.E9({x:E.width/2*o.mx,y:E.height/2*o.my}),i=r.rotate(e.rotation),a=new s.E9({x:i.x+t.x,y:i.y+t.y}).rotate(-e.rotation);x=new s.E9({x:a.x-r.x,y:a.y-r.y})}else x=t;const D=u(E,n,x,i,p);let C=D.rect;if(o&&(C=y(D.keepToSide,E,C)),r&&S&&(null!=S&&S.maxHeight||null!=S&&S.maxWidth||null!=S&&S.minHeight||null!=S&&S.minWidth)){const t=v(e);S.minHeight=S.minHeight?S.minHeight:t,S.minWidth=S.minWidth?S.minWidth:t}else r&&(C=m(e,C,o));const k=0!==E.width?C.width/E.width:0,O=0!==E.height?C.height/E.height:0,{translation:A,dragDifference:T}=d(E,n,k,O,p);C=C.set("width",C.width+T.x).set("height",C.height+T.y),C=C.translate(A),(null!=S&&S.maxHeight||null!=S&&S.maxWidth||null!=S&&S.minHeight||null!=S&&S.minWidth)&&(C=g(e,C,o,S));const I=function(){const t=e.set("boundingBox",C),r=Math.sqrt(k*O);let i;return t instanceof s.gd?(0,l.Ag)(e)&&n===b[e.rotation]||!(0,l.Ag)(e)&&n===a.V.BOTTOM_RIGHT?t.set("fontSize",t.fontSize*r).set("isFitting",!0):t.set("isFitting",!0):t instanceof s.Zc?t.withMutations((e=>{e.set("lines",f(t,k,O,o?w[n]:n)),e.set("lineWidth",t.lineWidth*r)})):t instanceof s.o9?(i=h(t,k,O,n),t.withMutations((e=>{e.set("startPoint",i.get(0)),e.set("endPoint",i.get(1))}))):t instanceof s.Hi||t instanceof s.om?(i=h(t,k,O,n),t.withMutations((e=>{e.set("boundingBox",C),e.set("points",i)}))):t}();return P(I,E)}function P(e,t){if((0,l.o0)(e)&&!(0,l.Ag)(e)){const n=new s.E9({x:e.boundingBox.getCenter().x-t.getCenter().x,y:e.boundingBox.getCenter().y-t.getCenter().y}).rotate(e.rotation);return e.update("boundingBox",(e=>e.set("left",t.left+n.x-(e.width-t.width)/2).set("top",t.top+n.y-(e.height-t.height)/2)))}return e}function E(e,t){const{width:n,height:o}=e,r=t.width/n,i=t.height/o,a=Math.min(r,i);return new s.$u({width:n*a,height:o*a})}function x(e){switch(e){case a.V.TOP_LEFT:return"Top-Left";case a.V.TOP:return"Top";case a.V.TOP_RIGHT:return"Top-Right";case a.V.LEFT:return"Left";case a.V.RIGHT:return"Right";case a.V.BOTTOM_LEFT:return"Bottom-Left";case a.V.BOTTOM:return"Bottom";case a.V.BOTTOM_RIGHT:return"Bottom-Right";default:(0,r.Rz)(e)}}},75669:(e,t,n)=>{"use strict";n.d(t,{Ag:()=>d,Mg:()=>v,az:()=>l,h4:()=>c,kv:()=>u,o0:()=>p,sw:()=>s});var o=n(66687),r=n(95651),i=n(64377),a=n.n(i);function s(e,t,n,r){const i=e.set("rotation",t);if(n&&r){const t=l(i).boundingBox;if(!new o.UL({left:0,top:0,width:n.width,height:n.height}).isRectInside(t))return e}return i}function l(e){const{boundingBox:t,rotation:n}=e,{width:r,height:i}=t;if(!p(e))return e;const a=new o.E9({x:-r/2,y:-i/2}),s=new o.E9({x:r/2,y:-i/2}),l=new o.E9({x:r/2,y:i/2}),c=new o.E9({x:-r/2,y:i/2}),u=a.rotate(n),d=s.rotate(n),f=l.rotate(n),h=c.rotate(n),m=Math.min(u.x,d.x,f.x,h.x),g=Math.min(u.y,d.y,f.y,h.y),v=Math.max(u.x,d.x,f.x,h.x),y=Math.max(u.y,d.y,f.y,h.y),b=t.getCenter();return e.set("boundingBox",new o.UL({left:b.x+m,top:b.y+g,width:v-m,height:y-g}))}function c(e,t){if(p(e)){const n=t||function(e,t){if(void 0===t||0===t)return e.getSize();const n=Math.floor(t/360);-1===Math.sign(t)&&(t+=360+360*n);let r=(t-=360*n)%180;const i=r>=90,a=i?e.height:e.width,s=i?e.width:e.height;if(r%=90,45===r){if(a!==s){const e=Math.min(a,s);return new o.$u({width:Math.sqrt(2)*e,height:Math.sqrt(2)*e})}return new o.$u({width:Math.sqrt(2)*a,height:Math.sqrt(2)*s})}const l=r*(Math.PI/180);return new o.$u({width:(a*Math.cos(l)-s*Math.sin(l))/Math.cos(2*l),height:(s*Math.cos(l)-a*Math.sin(l))/Math.cos(2*l)})}(e.boundingBox,e.rotation);return e.set("boundingBox",new o.UL({left:e.boundingBox.left+(e.boundingBox.width-n.width)/2,top:e.boundingBox.top+(e.boundingBox.height-n.height)/2,width:n.width,height:n.height}))}return e}function u(e){return"number"==typeof e.rotation&&e.rotation%360!=0}function d(e){return"number"==typeof e.rotation&&Math.abs(e.rotation)%90==0&&Math.abs(e.rotation)%360!=0}function p(e){return(0,r.a$)(e)&&u(e)}let f,h,m,g;function v(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"grab";if(f||(f=new DOMParser,h=f.parseFromString(a(),"image/svg+xml"),m=h.querySelector("svg"),g=new XMLSerializer),m&&(m.style.transform=`rotate(${-e}deg)`),g){return`url("${`data:image/svg+xml;utf8,${encodeURIComponent(g.serializeToString(h))}`}") 15 15, ${t}`}return t}},18803:(e,t,n)=>{"use strict";n.d(t,{Q:()=>b,U2:()=>w,ZJ:()=>m,a7:()=>h,mB:()=>y});var o=n(35369),r=n(47347),i=n(27515),a=n(4757),s=n(19815),l=n(66687),c=n(36095),u=n(34710),d=n(72584),p=n(76413),f=n.n(p);function h(e){var t,n;const{document:o}=e;if(c.TL){var i;const{activeElement:t,body:n}=o,a=t&&1===t.nodeType&&t!==n;if(null!==(i=e.getSelection())&&void 0!==i&&i.isCollapsed&&!a)return;const s=o.createElement("input");return s.style.position="fixed",s.style.left="50vw",s.style.top="50vh",s.readOnly=!0,(0,r.kG)(o.documentElement,"no document object found"),o.documentElement.appendChild(s),s.focus(),s.blur(),void s.remove()}var a;if(null!==(t=e.getSelection())&&void 0!==t&&t.empty)null===(a=e.getSelection())||void 0===a||a.empty();else if(null!==(n=e.getSelection())&&void 0!==n&&n.removeAllRanges){var s;null===(s=e.getSelection())||void 0===s||s.removeAllRanges()}}function m(e,t){const{startTextLineId:n,endTextLineId:i,startPageIndex:a,endPageIndex:s}=t.startAndEndIds();return(0,o.D5)(e.pages.filter((e=>e.textLines&&e.pageIndex>=a&&e.pageIndex<=s)).map((e=>{const t=e.textLines;let o;return e.pageIndex===a&&e.pageIndex===s?o=t.filter((e=>((0,r.kG)((0,d.hj)(e.id)),e.id>=n&&e.id<=i))):e.pageIndex===a?o=t.filter((e=>((0,r.kG)((0,d.hj)(e.id)),e.id>=n))):e.pageIndex===s?o=t.filter((e=>((0,r.kG)((0,d.hj)(e.id)),e.id<=i))):((0,r.kG)(e.textLines),o=e.textLines),[e.pageIndex,o]})))}const g=(e,t,n,o)=>{var i;(0,r.kG)((0,d.hj)(t.pageIndex));const a={transform:n&&n.scaleX>0&&n.scaleY>0?`scale(${n.scaleX*e.viewportState.zoomLevel}, ${n.scaleY*e.viewportState.zoomLevel})`:""};return new u.f(null===(i=e.frameWindow)||void 0===i?void 0:i.document,o,a,f().line)},v=(e,t,n)=>{const o=e.pages.get(t);(0,r.kG)(o&&o.textLines,"Page not found or page has no text lines");const i=o.textLines.find((e=>e.id===n));return(0,r.kG)(i,"TextLine not found"),i};function y(e,t){const{startTextLineId:n,endTextLineId:i,startPageIndex:l,endPageIndex:c}=t.startAndEndIds(),u=e.pages.get(l);(0,r.kG)(u,"Index of start page is out of bounds");const p=e.pages.get(c);if((0,r.kG)(p,"Index of end page is out of bounds"),n===i&&l===c){const i=v(e,l,n);(0,r.kG)((0,d.hj)(i.id));const c=u.textLineScales&&u.textLineScales.get(i.id),p=(0,a.LD)((0,s.HI)(e),i),f=p.substring(0,t.startOffset),h=p.substring(t.startOffset,t.endOffset),m=p.substring(t.endOffset),y=g(e,i,c,(0,o.aV)([f,h,m])),b=y.measure().get(1);(0,r.kG)(b);const w=b.scale(1/e.viewportState.zoomLevel).translate(i.boundingBox.getLocation());return y.remove(),{startRect:w,endRect:w}}{const f=v(e,l,n),h=v(e,c,i);(0,r.kG)((0,d.hj)(f.id)),(0,r.kG)((0,d.hj)(h.id));const m=u.textLineScales&&u.textLineScales.get(f.id),y=p.textLineScales&&p.textLineScales.get(h.id),b=(0,a.LD)((0,s.HI)(e),f),w=b.substring(0,t.startOffset),S=b.substring(t.startOffset),P=(0,a.LD)((0,s.HI)(e),h),E=P.substring(0,t.endOffset),x=P.substring(t.endOffset),D=g(e,f,m,(0,o.aV)([w,S])),C=g(e,h,y,(0,o.aV)([E,x])),k=D.measure().last();(0,r.kG)(k);const O=k.scale(1/e.viewportState.zoomLevel).translate(f.boundingBox.getLocation()),A=C.measure().first();(0,r.kG)(A);const T=A.scale(1/e.viewportState.zoomLevel).translate(h.boundingBox.getLocation());return D.remove(),C.remove(),{startRect:O,endRect:T}}}function b(e,t){const{startTextLineId:n,endTextLineId:o,startPageIndex:i,endPageIndex:a,textRange:s}=t;(0,r.kG)((0,d.hj)(i));const l=e.pages.get(i);(0,r.kG)((0,d.hj)(a)),(0,r.kG)(l,"Index of start page is out of bounds");const c=e.pages.get(a);if((0,r.kG)(c,"Index of end page is out of bounds"),(0,r.kG)(s&&(0,d.hj)(n)&&(0,d.hj)(o)),n===o&&i===a){return v(e,i,n).contents.substring(s.startOffset,s.endOffset)}{const t=v(e,i,n),r=v(e,a,o),l=t.contents.substring(s.startOffset),c=r.contents.substring(0,s.endOffset);return m(e,s).map(((e,t)=>e.map((e=>e.id==n&&t==i?l:e.id==o&&t==a?c:e.contents)))).valueSeq().flatten(!0).join("\n")}}function w(e,t){const{startTextLineId:n,endTextLineId:o,startPageIndex:r,endPageIndex:a}=t.startAndEndIds(),{startRect:s,endRect:c}=y(e,t),u=m(e,t).map(((t,l)=>t.map((t=>{let u;u=t.id==n&&l==r?s:t.id==o&&l==a?c:t.boundingBox;const d=(0,i.cr)(e.viewportState,l).translate(e.viewportState.scrollPosition.scale(e.viewportState.zoomLevel));return u.apply(d)})))).valueSeq().flatten(!0).toList();return l.UL.union(u)}},41952:(e,t,n)=>{"use strict";n.d(t,{K:()=>r,q:()=>i});var o=n(97528);const r=e=>{const{SELECTION_OUTLINE_PADDING:t}=o.Options;return t(e)},i=(e,t)=>e.grow(r(t))},3026:(e,t,n)=>{"use strict";n.d(t,{CW:()=>v,Hx:()=>y,Hz:()=>E,Pr:()=>h,R4:()=>b,rr:()=>w,sS:()=>f});var o=n(35369),r=n(47347),i=n(66687),a=n(18146),s=n(26467),l=n(20792),c=n(91859),u=n(95651);const d=(e,t)=>e-t,p=(e,t)=>{const n=t.reduce(((t,n,o,r)=>{var i,a;const s={x:t.x.concat([n.x]),y:t.y.concat([n.y])},l=r.get(o+1)||r.get(o-1)||n,c=l.x-n.x,u=l.y-n.y;if(0===c&&0===u)return s;const d=Math.sqrt(c**2+u**2),p=(0===o?"lineCaps"in e&&null!==(i=e.lineCaps)&&void 0!==i&&i.start?2.5*e.strokeWidth:e.strokeWidth/2:o===r.size-1&&"lineCaps"in e&&null!==(a=e.lineCaps)&&void 0!==a&&a.end?2.5*e.strokeWidth:e.strokeWidth/2)/d;return{x:s.x.concat([n.x-p*u,n.x+p*u]),y:s.y.concat([n.y-p*c,n.y+p*c])}}),{x:[],y:[]}),[o,...r]=n.x.sort(d),i=r.slice(-1)[0]||o,[a,...s]=n.y.sort(d);return{minX:o,maxX:i,minY:a,maxY:s.slice(-1)[0]||a}};function f(e){switch(e){case i.o9:return e=>{(0,r.kG)(e instanceof i.o9,"Expected `lineAnnotation` to be an instance of `LineAnnotation`");const{minX:t,maxX:n,minY:a,maxY:s}=p(e,(0,o.aV)([e.startPoint,e.endPoint]));return new i.UL({width:n-t+2*e.strokeWidth,height:s-a+2*e.strokeWidth,top:a-e.strokeWidth,left:t-e.strokeWidth})};case i.b3:case i.Xs:case a.Z:return e=>e.boundingBox;case i.Hi:case i.om:return e=>{if((0,r.kG)(e instanceof i.om||e instanceof i.Hi,"Expected `polyshapeAnnotation` to be an instance of `PolylineAnnotation` or `PolygonAnnotation`"),0===e.points.size)return e.boundingBox;const{minX:t,maxX:n,minY:o,maxY:a}=p(e,e.points),s="cloudyBorderIntensity"in e&&e.cloudyBorderIntensity?e.cloudyBorderIntensity*c.St:0;return new i.UL({width:n-t+2*e.strokeWidth+2*s,height:a-o+2*e.strokeWidth+2*s,top:o-e.strokeWidth-s,left:t-e.strokeWidth-s})};case i.gd:return e=>{if((0,u.Vc)(e)){(0,r.kG)(e instanceof i.gd,"Expected `annotation` to be a `TextAnnotation`");const{callout:t}=e;(0,r.kG)(t,"Expected `callout` to be defined");const{innerRectInset:n,knee:o,start:a,end:s}=t;(0,r.kG)(n&&a&&s,"Expected `innerRectInset`, `start` and `end` to be defined");const l=Math.min(e.boundingBox.left+n.left,a.x,s.x,o?o.x:1/0),c=Math.min(e.boundingBox.top+n.top,a.y,s.y,o?o.y:1/0),u=Math.max(e.boundingBox.left+e.boundingBox.width-n.right,a.x,s.x,o?o.x:-1/0),d=Math.max(e.boundingBox.top+e.boundingBox.height-n.bottom,a.y,s.y,o?o.y:-1/0),p=4*(e.borderWidth||2);let f=h(a,new i.UL({left:l,top:c,width:u-l,height:d-c}),p);return o&&(f=h(o,f,p)),f}return e.boundingBox}}throw new r.p2("Expected `getBoundingBoxCalculator` to be called with a valid shape annotation type class value.")}function h(e,t,n){const o=t.left===e.x,r=t.left+t.width===e.x,a=t.top===e.y,s=t.top+t.height===e.y;return new i.UL({left:o?t.left-n:t.left,top:a?t.top-n:t.top,width:o||r?t.width+n:t.width,height:a||s?t.height+n:t.height})}const m=(e,t)=>new i.E9({x:e.x+t.weightedStrokeWidthLineRatio*t.xOffset,y:e.y+t.weightedStrokeWidthLineRatio*t.yOffset}),g={xOffset:0,yOffset:0,weightedStrokeWidthLineRatio:0};function v(e,t,n){if(null===n)return e;const r=n.start,a=n.end,l=r?s.O[r].width:0,c=a?s.O[a].width:0;if(e.size<2||!l&&!c)return e;const u=e.get(0),d=e.get(e.size-1);if(!(u instanceof i.E9&&d instanceof i.E9))return e;const p=r?(()=>{const n=u,o=e.get(1)||n;if(!(o instanceof i.E9))return g;const r=o.x-n.x,a=o.y-n.y;return{xOffset:r,yOffset:a,weightedStrokeWidthLineRatio:0!==r||0!==a?l*t/Math.sqrt(r**2+a**2):0}})():g,f=a&&e.get(e.size-2)instanceof i.E9?(()=>{const n=d,o=e.get(e.size-2)||n,r=-(n.x-o.x),i=-(n.y-o.y);return{xOffset:r,yOffset:i,weightedStrokeWidthLineRatio:0!==r||0!==i?c*t/Math.sqrt(r**2+i**2):0}})():g;return e.size>2||!r||!a?e.map(((t,n)=>0===n?p.weightedStrokeWidthLineRatio<=1?m(t,p):t:n===e.size-1&&f.weightedStrokeWidthLineRatio<=1?m(t,f):t)):p.weightedStrokeWidthLineRatio+f.weightedStrokeWidthLineRatio<=1?(0,o.aV)([m(u,p),m(d,f)]):e}function y(e){return e instanceof i.b3||e instanceof i.Xs?e.delete("boundingBox"):e instanceof i.Hi||e instanceof i.om?e.delete("boundingBox").delete("points"):e instanceof i.o9?e.delete("boundingBox").delete("startPoint").delete("endPoint"):e}function b(e){switch(e){case i.o9:return l.A.SHAPE_LINE;case i.b3:return l.A.SHAPE_RECTANGLE;case i.Xs:return l.A.SHAPE_ELLIPSE;case i.om:return l.A.SHAPE_POLYLINE;case i.Hi:return l.A.SHAPE_POLYGON;default:return null}}function w(e){let{points:t,intensity:n,arcRadius:o=c.St*n}=e;const r=t.reduce(((e,n,r)=>{const i=r===t.length-1?t[0]:t[r+1];if(C(n,i,.01))return e;const a=D(n,i),s=Math.floor(a/(1.75*o));if(a>=a/(s+1)){const t=s+1,o=(i[0]-n[0])/t,r=(i[1]-n[1])/t;e.push(...Array.from({length:t},((e,t)=>[n[0]+o*t,n[1]+r*t])))}return e}),[]),i=x(t),a=i?"1":"0",s="1"===a?"0":"1",l=i?-.3:.3;return r.reduce(((e,t,n)=>{const c=r[n>0?n-1:r.length-1];if(C(t,c))return e;let u=r[(n+1)%r.length],d=n+1;for(;C(t,u);){if(d%r.length===n)return[];u=r[(1+ ++d)%r.length]}let p=k(t,c,o,i),f=k(t,u,o,!i);if(isNaN(p)&&isNaN(f))return e.push(`${u[0]} ${u[1]}`),e;isNaN(p)&&(p=f+Math.PI),isNaN(f)&&(f=p+Math.PI),f+=l;const h=i?f>p?p+(S-f)>Math.PI?"1":"0":p-f>Math.PI?"1":"0":f>p?p+(S-f)>Math.PI?"0":"1":p-f>Math.PI?"0":"1",m=[t[0]+Math.cos(p)*o,t[1]-Math.sin(p)*o],g=[t[0]+Math.cos(f)*o,t[1]-Math.sin(f)*o];return e.push(0===e.length?`M ${m[0]} ${m[1]} A ${o} ${o} 0 ${h} ${a} ${g[0]} ${g[1]}`:` A ${o} ${o} 0 0 ${s} ${m[0]} ${m[1]} A ${o} ${o} 0 ${h} ${a} ${g[0]} ${g[1]}`),e}),[]).join(" ")}const S=2*Math.PI,P=S/360;function E(e){let{boundingBox:t,cloudyBorderIntensity:n,cloudyBorderInset:o}=e;const r=o instanceof i.eB?i.eB.applyToRect(o,t):t,a=t.width/2,s=t.height/2;if(0===a||0===s)return"";const l=Math.min(a,s,c.St*n),u=r.width/2,d=r.height/2,p=r.left+u,f=r.top+d,h=Array.from({length:360},((e,t)=>{const n=P*t;return[p+u*Math.cos(n),f+d*Math.sin(n)]})),m=h.length;let g=1.75*l;const v=O(h),y=v/g;g+=y>0?v%g/y:0;let b=0;const w=h.reduce(((e,t,n)=>{const o=h[(n+1)%m],r=D(t,o)/g,i=(o[0]-t[0])/r,a=(o[1]-t[1])/r,s=i/g*b,l=a/g*b;let c=t[0]+s,u=t[1]+l;for(;(i<=0&&c>=o[0]||i>=0&&c<=o[0])&&(a<=0&&u>=o[1]||a>=0&&u<=o[1]);)e.push([c,u]),c+=i,u+=a;return b=Math.abs(o[0]-c)*(g/Math.abs(i)),e}),[]),E=w.length;return 0===E?"":w.reduce(((e,t,n)=>{const o=w[n>0?n-1:E-1],r=w[(n+1)%E];let i=k(t,o,l,!0),a=k(t,r,l,!1);if(isNaN(i)&&isNaN(a))return e.push(`${r[0]} ${r[1]}`),e;isNaN(i)&&(i=a+Math.PI),isNaN(a)&&(a=i+Math.PI),a-=.3;const s=a>i?i+(S-a)>Math.PI?"1":"0":i-a>Math.PI?"1":"0",c=[t[0]+Math.cos(i)*l,t[1]-Math.sin(i)*l],u=[t[0]+Math.cos(a)*l,t[1]-Math.sin(a)*l];return e.push(0===e.length?`M ${c[0]} ${c[1]} A ${l} ${l} 0 ${s} 1 ${u[0]} ${u[1]}`:`A ${l} ${l} 0 0 0 ${c[0]} ${c[1]} A ${l} ${l} 0 ${s} 1 ${u[0]} ${u[1]}`),e}),[]).join(" ")}const x=e=>e.reduce(((t,n,o)=>o<e.length-1?t+(n[0]*e[o+1][1]-n[1]*e[o+1][0]):t+(n[0]*e[0][1]-n[1]*e[0][0])),0)>0,D=(e,t)=>{const n=t[0]-e[0],o=t[1]-e[1];return e[0]===t[0]?Math.abs(o):e[1]===t[1]?Math.abs(n):Math.sqrt(n**2+o**2)},C=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.001;return Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n},k=(e,t,n,o)=>{const r=.5*Math.sqrt((e[0]-t[0])**2+(e[1]-t[1])**2),i=Math.acos(r/n),a=[t[0]-e[0],t[1]-e[1]];let s=Math.atan2(-a[1],a[0]);return s<0&&(s+=S),o?s-i:s+i},O=e=>e.reduce(((t,n,o)=>t+D(n,o<e.length-1?e[o+1]:e[0])),0)},39583:(e,t,n)=>{"use strict";function o(e,t,n,o){var r;if((null===(r=e.points)||void 0===r?void 0:r.size)<3)return-1;const i=e.get("points"),a=o||(null==i?void 0:i.get(t));return i.findIndex((e=>{if(e.get("x")===a.get("x")&&e.get("y")===a.get("y"))return!1;return e.distance(a)<=n}))}function r(e,t,n){var o;const r=null===(o=e.get("points"))||void 0===o?void 0:o.get(n);return e.update("points",(e=>e.set(t,r)))}function i(e,t,n){return"STANDALONE"===(null==e?void 0:e.type)&&"function"==typeof t.isMeasurement&&t.isMeasurement()&&!n}n.d(t,{KM:()=>o,dg:()=>r,mE:()=>i})},94734:(e,t,n)=>{"use strict";n.d(t,{Cq:()=>b,HL:()=>D,s3:()=>C,vW:()=>w,wB:()=>y});var o=n(84121),r=n(47347),i=n(80857),a=n(15973),s=n(33754),l=n(83634),c=n(86071),u=n(73815),d=n(91859),p=n(41775),f=n(72584),h=n(36095);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const v=(0,i.Z)("StampAnnotationTemplate"),y=e=>{v(e instanceof a.GI||e instanceof a.sK,"`annotationTemplate` is not an instance of `PSPDFKit.Annotations.StampAnnotation` or ``PSPDFKit.Annotations.ImageAnnotation`")},b=function(e){var t;let{includeDate:n,includeTime:o}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,i=arguments.length>2?arguments[2]:void 0;const a={};n&&(a.day="2-digit",a.month="2-digit",a.year="numeric"),o&&(a.hour="2-digit",a.minute="2-digit");let s=n||o?i.formatDate(r,a):null;return s&&h.rO&&(s=s.replace(/[^A-Za-z 0-9 .,?""!@#$%^&*()-_=+;:<>/\\|}{[\]`~]*/g,"")),null!==(t=s)&&void 0!==t?t:null},w=e=>{let{annotation:t,intl:n}=e;const{formatMessage:o}=n,{stampType:r,title:i,description:l,fileName:c}=t;return t instanceof a.GI?"Custom"===r&&i?p.Z[(0,f.LE)(i)]?o(p.Z[(0,f.LE)(i)]):i:p.Z[(0,f.LE)((0,s.k1)(r))]?o(p.Z[(0,f.LE)((0,s.k1)(r))]):r:l||c||" "},S=(0,u.L)(),P=2*S,E=8*S,x=P/2,D=e=>{let{canvas:t,title:n,subtitle:o,color:r,defaultStampWidth:i,stampHeight:a,container:s}=e,l=i*S;if(t&&s&&s.offsetWidth){const e=t.getContext("2d"),c="string"==typeof o&&o.length>0,u=(e=>{let{ctx:t,title:n,fontSize:o,containerWidth:r}=e;t.font=`bold ${o}px Arial`;const i=t.measureText(n);let a=r*S;const s=o;return i.width+s>a?o=a/((i.width+s)/o):a=i.width+s,{fontSize:o,stampWidth:a}})({ctx:e,title:n,fontSize:(c?.6:.7)*S*a,containerWidth:s.offsetWidth});l=Math.max(u.stampWidth,i*S),t.width=l,t.height=a*S,null==e||e.clearRect(0,0,t.width,t.height),(e=>{let{ctx:t,stampWidth:n,stampHeight:o,color:r}=e;t.lineWidth=P;const i=n-x,a=S*o-x;t.strokeStyle=r.toCSSValue(),t.fillStyle=r.lighter(d.zT).toCSSValue(),t.beginPath(),t.moveTo(E+x,x),t.lineTo(i-E,x),t.quadraticCurveTo(i-1,x,i-1,E+x),t.lineTo(i-1,a-E),t.quadraticCurveTo(i-1,a,i-E,a),t.lineTo(E+x,a),t.quadraticCurveTo(x,a,x,a-E),t.lineTo(x,E+x),t.quadraticCurveTo(x,x,E+x,x),t.closePath(),t.stroke(),t.fill()})({ctx:e,stampWidth:l,color:r,stampHeight:a}),(e=>{let{ctx:t,fontSize:n,color:o,stampWidth:r,stampHeight:i,title:a,hasSubTitle:s}=e;t.font=`bold ${n}px Arial`,t.fillStyle=o.toCSSValue(),t.textBaseline="middle",t.textAlign="center",t.fillText(a,r/2,(s?.4*i:.5*i)*S)})({ctx:e,fontSize:u.fontSize,color:r,stampWidth:l,stampHeight:a,title:n,hasSubTitle:c}),c&&(e.font=S*a*.175+"px Arial",null==e||e.fillText(o,l/2,.85*a*S))}return l/S},C=c.Z.filter((e=>[l.Z.BLUE,l.Z.RED,l.Z.ORANGE,l.Z.LIGHT_YELLOW,l.Z.GREEN].includes(e.color)||"mauve"===e.localization.id)).map((e=>function(e){return(0,r.kG)(null!=e.color),g(g({},e),{},{color:Object.values(k(e.color))[0].color})}(e)));function k(e){const t=e.lighter(d.zT);let n=e;const o=Math.max(n.r,n.g,n.b);for(let e=0;e<10&&t.contrastRatio(n)<4.5;e++)n=n.darker((255-o)/25.5);return{[`${n.toCSSValue()}`]:{color:n,backgroundColor:t}}}},55961:(e,t,n)=>{"use strict";n.d(t,{x:()=>r});var o=n(67366);function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o.$j)(((t,n)=>null==e?void 0:e(t.reuseState?i(t,t.reuseState):t,n)),null,null,t)}const i=(0,n(30845).Z)(((e,t)=>e.withMutations((n=>{n.merge(t),n.set("pages",e.pages.map((e=>{const n=e.pageKey,o=t.pages.find((e=>e.pageKey===n));return o&&o?e.set("annotationIds",o.annotationIds):e})))}))))},72584:(e,t,n)=>{"use strict";n.d(t,{F6:()=>c,HD:()=>d,LE:()=>a,Oe:()=>i,QE:()=>l,aF:()=>f,hj:()=>p,zW:()=>u});var o=n(37529),r=n.n(o);function i(e){return e.charAt(0)&&e.charAt(0).toUpperCase()+e.slice(1)}function a(e){return e.charAt(0).toLowerCase()+e.substr(1)}const s=e=>e[0]===r().INSERT;function l(e,t,n){var o;const i=r()(e,t,n);let a="";const l=i.filter(s);return l.length>0&&(a=l[0][1]),{prev:e,next:t,change:a,diff:i,endCursorPosition:n+((null===(o=i[1])||void 0===o||null===(o=o[1])||void 0===o?void 0:o.length)||0)}}function c(e,t){if(t===e.change)return e.next;const{diff:n}=e,o=n.findIndex(s);return o>=0?n[o][1]=t:n.push([r().INSERT,t]),function(e){let t="";for(let n=0;n<e.length;n++){const[o,i]=e[n];switch(o){case r().DELETE:break;case r().INSERT:case r().EQUAL:t+=i}}return t}(n)}function u(e){return e.split("-").map(((e,t)=>t?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e.toLowerCase())).join("")}function d(e){return"string"==typeof e}function p(e){return"number"==typeof e}function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:120;const n=e.trim();return n.length<t?n:n.slice(0,t)+"…"}},30360:(e,t,n)=>{"use strict";n.d(t,{BK:()=>u,KY:()=>c,Vq:()=>d,in:()=>l,kC:()=>s});var o=n(47347),r=n(25256),i=n(66687),a=n(3026);function s(e){return e.charAt(0).toUpperCase()+e.slice(1)}function l(e){return e.split(/[^a-zA-Z0-9]/g).reduce(((e,t)=>e+s(t)),"")}function c(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||""}function u(e){return"#00000000"===e?void 0:e}function d(e){let{rect:t,callout:n,zoomLevel:s,annotation:l,text:c=l.text}=e;const{height:u,width:d}=t,p=l.boundingBox.scale(s);if(null==n||!n.innerRectInset||!d||!u)return;const f=n.innerRectInset.setScale(s),h=p.left+f.left,m=p.left+f.left+d,g=p.top+f.top,v=p.top+f.top+u,y=(l.borderWidth||2)/2,b=(0,r.dY)([[h+y,g+y],[m-y,g+y],[m-y,v-y],[h+y,v-y]]),w=n.knee||n.start;(0,o.kG)(w,"CalloutEditComponent: point is undefined");const S=(0,r.Zt)(w.scale(s),b);(0,o.kG)(n.start);let P=i.UL.fromPoints(...[[h,g],[m,g],[m,v],[h,v]].map((e=>new i.E9({x:e[0],y:e[1]})))).expandToIncludePoints(...[n.start,n.knee].filter(Boolean).map((e=>null==e?void 0:e.scale(s))));P=(0,a.Pr)(n.start.scale(s),P,4*(l.borderWidth||2)),n.knee&&(P=(0,a.Pr)(n.knee.scale(s),P,l.borderWidth||2));const E=S.scale(1/s);return l.setIn(["callout","end"],E).setIn(["callout","innerRectInset"],new i.eB({bottom:(P.top+P.height-v)/s,left:(h-P.left)/s,right:(P.left+P.width-m)/s,top:(g-P.top)/s})).set("text",c).set("boundingBox",P.scale(1/s))}},78233:(e,t,n)=>{"use strict";n.d(t,{MF:()=>h,XA:()=>f,Zv:()=>m,gB:()=>b,hm:()=>w,hr:()=>y,z1:()=>g});var o=n(84121),r=n(47347),i=n(4054),a=n(66687),s=n(34710),l=n(91859),c=n(97528),u=n(75669);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e){let t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!1===c.Options.TEXT_ANNOTATION_AUTOFIT_TEXT_ON_EXPORT)return e.set("isFitting",!1);try{if(t=(0,i.Aw)(),!t.window||!t.window.document)return e;t.window.document.head.appendChild(t.window.document.createElement("style")).textContent="p { margin: 0; }",n=new s.f(t.window.document,e.text.value,g(e.set("rotation",0),o,!1));const r=!(0,i.f)(n.wrapper);return e.set("isFitting",r)}finally{n&&n.remove(),t&&t.remove()}}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=(0,i.Aw)();if(!n.window||!n.window.document)return null==n||n.remove(),e;n.window.document.head.appendChild(n.window.document.createElement("style")).textContent="p { margin: 0; }";const o=new s.f(n.window.document,e.text.value,g(e.set("rotation",0),t,!1)),r=!(0,i.f)(o.wrapper);for(e=e.set("isFitting",r);!e.isFitting&&e.fontSize>=2;){e=e.set("fontSize",e.fontSize-1),o._setStyles(o.wrapper,p(p({},s.f.defaultWrapperStyles),g(e.set("rotation",0),t,!1)));const n=!(0,i.f)(o.wrapper);e=e.set("isFitting",n)}return null==n||n.remove(),e}function m(e,t){let n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;try{const r=t.width-e.boundingBox.left,i=t.height-e.boundingBox.top;n=new s.f(document,e.text.value,p(p({},g(e,o,!1)),{},{width:"auto",height:"auto",maxWidth:`${Math.ceil(r*o)}px`,maxHeight:`${Math.ceil(i*o)}px`,padding:"0px",margin:"0px",overflow:"visible"}));const{width:a,height:l}=n.wrapper.getBoundingClientRect(),c=Math.max(a,n.wrapper.clientWidth,n.wrapper.scrollWidth),u=Math.max(l,n.wrapper.clientHeight,n.wrapper.scrollHeight);return e.set("boundingBox",e.boundingBox.set("width",Math.ceil(c/o)).set("height",Math.ceil(u/o)))}finally{n&&n.remove()}}function g(e,t,n){const o=p(p({width:Math.ceil(e.boundingBox.width*t),height:Math.ceil(e.boundingBox.height*t),color:e.fontColor?e.fontColor.toCSSValue():"transparent",backgroundColor:e.backgroundColor&&!n?e.backgroundColor.toCSSValue():"transparent",fontSize:e.fontSize*t+"px",fontFamily:`${w(e.font)}, sans-serif`,textAlign:e.horizontalAlign},n?null:{opacity:e.opacity}),{},{fontWeight:e.isBold?"bold":"normal",fontStyle:e.isItalic?"italic":"normal",whiteSpace:"pre-wrap",wordBreak:"break-word",overflow:"hidden",lineHeight:"number"==typeof e.lineHeightFactor?e.lineHeightFactor*t*e.fontSize+"px":"normal",flexDirection:"column",justifyContent:v(e.verticalAlign),display:"flex"});return(0,u.kv)(e)&&!n&&(o.transformOrigin="50% 50%",o.transform=`rotate(${String(-e.rotation)}deg)`),o}function v(e){switch(e){case"top":return"flex-start";case"center":return"center";case"bottom":return"flex-end";default:return(0,r.Rz)(e)}}function y(e){return"string"==typeof e?e.split("\r\n").join("\n").split("\r").join("\n"):e}function b(e,t){let n;switch(t){case 0:n=new a.UL({left:e.x,top:e.y,width:l.g3,height:l.rm});break;case 90:n=new a.UL({left:e.x,top:e.y-l.rm,width:l.g3,height:l.rm});break;case 180:n=new a.UL({left:e.x-l.g3,top:e.y-l.rm,width:l.g3,height:l.rm});break;case 270:n=new a.UL({left:e.x-l.g3,top:e.y,width:l.g3,height:l.rm});break;default:throw(0,r.Rz)(t)}return n}function w(e){return/^[-_a-zA-Z0-9\\xA0-\\u{10FFFF}]*$/.test(e)?e:`"${e}"`}},4757:(e,t,n)=>{"use strict";n.d(t,{LD:()=>u,TH:()=>l,uv:()=>c});var o=n(35369),r=n(66687),i=n(33320),a=n(36095),s=n(93572);function l(e,t){return(0,o.aV)(e.textLines.map(((e,n)=>new r.bi({id:n+1,contents:e.contents,pageIndex:t,boundingBox:new r.UL({top:e.top,left:e.left,height:e.height,width:e.width})}))))}function c(e,t,n){let a=n;const l=[],c=[],u={};let d="",p=(0,i.C)();return function e(n,o){n&&n.forEach((n=>{if(n.bbox){a+=1;const e=new r.bi({id:a,contents:n.element.text,pageIndex:t,contentTreeElementMetadata:o,boundingBox:(0,s.k)(n.bbox)});(null==o?void 0:o.pdfua_type)===d&&r.UL.areRectsCloserThan(e.boundingBox,u[p][u[p].length-1].boundingBox,.6*e.boundingBox.height)?u[p]&&u[p].length>0?u[p].push(e):u[p]=[e]:(d=(null==o?void 0:o.pdfua_type)||"",p=(0,i.C)(),u[p]=[e]),l.push(e)}if(n.children){const t={pdfua_type:n.pdfua_type,type:n.type,alt:n.alt};e(n.children,t)}}))}(e,null),a=n,Object.keys(u).forEach((e=>{let n="";const i=[];let s={pdfua_type:"",type:"",alt:""};for(let t=0;t<u[e].length;t++)n+=u[e][t].contents,s=u[e][t].contentTreeElementMetadata,i.push(u[e][t].boundingBox);const l=(0,o.aV)(i),d=new r.bi({id:a,contents:n,pageIndex:t,contentTreeElementMetadata:s,boundingBox:r.UL.union(l)});a+=1,c.push(d)})),c}function u(e,t){if(e)return t.contents;const n=function(e){const t=e.split("");let n=0;for(const e of t){n+=Array.from(e.split(/[\ufe00-\ufe0f]/).join("")).length}return n/t.length}(t.contents);return a.TL?" x".repeat(n/2):" ".repeat(n)}},49177:(e,t,n)=>{"use strict";n.d(t,{Bx:()=>d,PK:()=>u,rf:()=>p});var o=n(84121),r=n(66687),i=n(18803),a=n(95651),s=n(97413);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return p(e).map((o=>{let{pageIndex:i,rects:s}=o;return new t(c(c({},(0,a.lx)(e)),{},{pageIndex:i,boundingBox:r.UL.union(s),rects:s,isCommentThreadRoot:n}))}))}function d(e,t,n){return p(e).map((o=>{let{pageIndex:i,rects:s}=o;const l=t.get(i);return null==l?new n(c(c({},(0,a.lx)(e)),{},{pageIndex:i,boundingBox:r.UL.union(s),rects:s})):l.withMutations((e=>e.set("boundingBox",r.UL.union(s)).set("rects",s)))}))}function p(e){(0,s.k)(e.currentTextSelection,"Cannot create markup annotation without text selection.");const{textRange:t,startTextLineId:n,endTextLineId:o,startPageIndex:r,endPageIndex:a}=e.currentTextSelection;(0,s.k)(t);const{startRect:l,endRect:c}=(0,i.mB)(e,t);return(0,i.ZJ)(e,t).map(((t,i)=>{const u=e.pages.get(i);(0,s.k)(u);const d=t.map((e=>e.id==n&&i==r?l:e.id==o&&i==a?c:e.boundingBox));return{pageIndex:u.pageIndex,rects:d}})).valueSeq().toList()}},94385:(e,t,n)=>{"use strict";function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=null,r=null;return function(){const i=this;for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];if(o)n&&(r=s);else{e.apply(i,s);const a=()=>{o=null,r&&n&&(e.apply(i,r),r=null,o=setTimeout(a,t))};o=setTimeout(a,t)}}}n.d(t,{Z:()=>o})},77528:(e,t,n)=>{"use strict";n.d(t,{CN:()=>h,DQ:()=>c,FO:()=>v,I4:()=>g,KT:()=>b,Kt:()=>m,Li:()=>y,Ut:()=>u,hJ:()=>d,q1:()=>s,se:()=>l});var o=n(35369),r=n(19815),i=n(62164),a=n(20792);function s(e,t,n){return e.filter((e=>{const o=e.get("type");if(t[o]&&t[o].forceHide)return!1;let r=e.get("mediaQueries");if(!r){if(f(e))return!0;const n=t[o].mediaQueries;if(!n)return!0;r=n}const i=null==n?void 0:n.matchMedia(r.join(", "));return null==i?void 0:i.matches}))}function l(e,t){return e.map((e=>{const n=e.get("mediaQueries");if(!n){if(f(e))return;const n=(t[e.get("type")]||{}).mediaQueries;return n?(0,o.aV)(n):void 0}return n})).filter(Boolean).flatten().filter((e=>"all"!==e)).toSet().toArray()}function c(e,t){return e=e.map((e=>{const n=e.get("type"),r=t[n]||{},{id:i,className:a,icon:s,title:l,selected:c,disabled:u,responsiveGroup:d,onPress:p,dropdownGroup:f,preset:h,node:m}=e.toJS(),g="custom"===n,v={id:i||n,type:r.type||n,title:l||r.title,icon:s||r.icon,className:[r.className,a].filter(Boolean).join(" "),selected:g?c:r.selected,disabled:!0===u?u:r.disabled,onPress:g?p:r.onPress,onKeyPress:g?void 0:r.onKeyPress,responsiveGroup:d||r.responsiveGroup,dropdownGroup:void 0!==f?f:r.dropdownGroup,preset:h||r.preset};return m&&(v.node=m),(0,o.D5)(v)}))}function u(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;return e.filter((o=>{const r=o.get("responsiveGroup");return r&&void 0!==p(e,r)?!!t&&r===n:!t}))}function d(e){return e.map((t=>{const n=t.get("type"),o=t.get("id");if("responsive-group"==n||"annotate"==n){const n=t.get("selected"),r=!!e.find((e=>e.get("responsiveGroup")==o&&1==e.get("selected")));return t.set("selected",n||r)}return t}))}function p(e,t){return e.find((e=>e.get("id")&&e.get("id")===t))}function f(e){const t=e.get("type");return"custom"===t||"responsive-group"===t}function h(e,t){return t===e}function m(e,t,n){return n===e&&!t}function g(e){let{toolbarItems:t,features:n,backend:o,backendPermissions:a,documentPermissions:s,readOnlyEnabled:l,showComments:c}=e;return t.filter((e=>"document-editor"===e.get("type")||"document-crop"===e.get("type")?(0,r.Xr)({features:n,backendPermissions:a,documentPermissions:s,readOnlyEnabled:l}):"content-editor"===e.get("type")?(0,r.qs)({features:n,backendPermissions:a,documentPermissions:s,readOnlyEnabled:l}):"comment"!==e.get("type")||(0,r.LC)({features:n,backend:o})&&(0,i.oK)({showComments:c,features:n,backend:o})))}const v={[a.A.INK]:["ink","highlighter"],[a.A.SHAPE_LINE]:["line","arrow"],[a.A.INK_ERASER]:"ink-eraser",[a.A.TEXT_HIGHLIGHTER]:"text-highlighter",[a.A.SHAPE_RECTANGLE]:["rectangle","cloudy-rectangle","dashed-rectangle"],[a.A.SHAPE_ELLIPSE]:["ellipse","cloudy-ellipse","dashed-ellipse"],[a.A.SHAPE_POLYGON]:["polygon","cloudy-polygon","dashed-polygon"],[a.A.SHAPE_POLYLINE]:"polyline",[a.A.NOTE]:"note",[a.A.TEXT]:"text",[a.A.CALLOUT]:"callout",[a.A.LINK]:"link",[a.A.MEASUREMENT]:"measurement"};function y(e){const t=Object.entries(v).find((t=>{let[,n]=t;return Array.isArray(n)?n.includes(e):n===e}));return t&&t[0]||null}function b(e){var t;return null===(t=e.find((e=>"delete"===e.type)))||void 0===t?void 0:t.icon}},42911:(e,t,n)=>{"use strict";n.d(t,{Yw:()=>i,bl:()=>l,sX:()=>a});var o=n(36095),r=n(71231);function i(){const e="webkit"===o.SR;let t;e&&(t=window.PointerEvent);const r=window.Hammer;e&&delete window.PointerEvent;const i=n(34988);return e&&(window.PointerEvent=t),window.Hammer=r,i}function a(e){let t;if(e.touches)t=e.touches;else{if(!e.changedTouches)return!1;t=e.changedTouches}return t.length<=1}const s="webkit"===o.SR||"blink"===o.SR;function l(e){if(!s)return()=>{};const t=e=>{a(e)||e.preventDefault()},n=["touchstart","touchmove"],o=r.Gn?{passive:!1}:void 0;return n.forEach((n=>{e.addEventListener(n,t,o),document.addEventListener(n,t,o)})),()=>{n.forEach((n=>{e.removeEventListener(n,t,o),document.removeEventListener(n,t,o)}))}}},36658:(e,t,n)=>{"use strict";n.d(t,{c:()=>l,n:()=>s});var o=n(15973),r=n(88804),i=n(75669),a=n(95651);function s(e,t){const n=e.set("boundingBox",e.boundingBox.translate(t));return n instanceof o.Zc?n.update("lines",(e=>e.map((e=>e.map((e=>e.translate(t))))))):n instanceof o.o9?n.update("startPoint",(e=>e.translate(t))).update("endPoint",(e=>e.translate(t))):n instanceof o.Hi||n instanceof o.om?n.update("points",(e=>e.map((e=>e.translate(t))))):(0,a.Vc)(e)?n.update("callout",(e=>(e.knee&&(e=e.update("knee",(e=>e.translate(t)))),e.update("start",(e=>e.translate(t))).update("end",(e=>e.translate(t)))))):n}function l(e,t,n,o,a){const l=function(e,t,n,o,a){const{boundingBox:s}=(0,i.az)(e),l=new r.UL({x:0,y:0,width:n.width,height:n.height}).isRectInside(s);a&&l?(s.left+t.x<0&&(t=t.set("x",-s.left)),s.left+s.width+t.x>n.width&&(t=t.set("x",n.width-s.width-s.left)),s.top+t.y<0&&(t=t.set("y",-s.top)),s.top+s.height+t.y>n.height&&(t=t.set("y",n.height-s.height-s.top))):(o.x+s.left+t.x<0&&(t=t.set("x",-o.x-s.left)),o.x+s.left+t.x>n.width&&(t=t.set("x",n.width-(o.x+s.left))),o.y+s.top+t.y<0&&(t=t.set("y",-o.y-s.top)),o.y+s.top+t.y>n.height&&(t=t.set("y",n.height-(o.y+s.top))));return t}(e,t,n,o,a);return s(e,l)}},99745:(e,t,n)=>{"use strict";n.d(t,{s:()=>l,w:()=>c});var o=n(66687),r=n(28098),i=n(34426),a=n(71693),s=n(72131);function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"undefined"!=typeof location?location.hash:null;if(!t)return e;const n=t.replace("#","").split("&").map((e=>{const t=e.split("=");if(2===t.length)return[t[0],t[1]]})).filter(Boolean);return n.forEach((t=>{let[n,o]=t;switch(n){case"page":{const t=parseInt(o,10);if("number"!=typeof t||Number.isNaN(t)||t<=0)break;e=e.set("currentPageIndex",t-1);break}}})),e}function c(e,t){return new i.Z({currentPageIndex:e.viewportState.currentPageIndex,zoom:e.viewportState.zoomMode===r.c.CUSTOM?e.viewportState.zoomLevel:e.viewportState.zoomMode,pagesRotation:e.viewportState.pagesRotation,layoutMode:e.viewportState.layoutMode,scrollMode:e.viewportState.scrollMode,showToolbar:e.showToolbar,enableAnnotationToolbar:e.enableAnnotationToolbar,disablePointSnapping:e.viewportState.disablePointSnapping,allowPrinting:e.printingEnabled,allowExport:e.exportEnabled,interactionMode:e.interactionMode,readOnly:e.readOnlyEnabled!==s.J.NO,showAnnotations:e.showAnnotations,showComments:e.showComments,showAnnotationNotes:e.showAnnotationNotes,sidebarMode:e.sidebarMode,sidebarOptions:e.sidebarOptions,sidebarPlacement:e.sidebarPlacement,spreadSpacing:e.viewportState.spreadSpacing,pageSpacing:e.viewportState.pageSpacing,keepFirstSpreadAsSinglePage:e.viewportState.keepFirstSpreadAsSinglePage,viewportPadding:new o.gx({horizontal:e.viewportState.viewportPadding.x,vertical:e.viewportState.viewportPadding.y}),instance:t||e.instance,formDesignMode:e.formDesignMode,showSignatureValidationStatus:e.showSignatureValidationStatus,previewRedactionMode:e.previewRedactionMode,keepSelectedTool:e.keepSelectedTool,resolvedLayoutMode:(0,a.nw)(e.viewportState),sidebarWidth:e.sidebarWidth})}},27515:(e,t,n)=>{"use strict";n.d(t,{DB:()=>g,EY:()=>x,Ek:()=>m,G4:()=>C,JN:()=>P,YA:()=>w,YS:()=>f,YV:()=>I,_4:()=>y,_P:()=>D,_U:()=>S,a$:()=>b,cr:()=>h,fI:()=>k,oI:()=>A,pA:()=>O,vY:()=>E,vs:()=>v,zi:()=>F,zo:()=>T});var o=n(71693),r=n(52560),i=n(56956),a=n(77973),s=n(88804),l=n(47710),c=n(28098),u=n(91859),d=n(87222),p=n(97413);function f(e,t,n){if((e.scrollMode===l.G.PER_SPREAD||e.scrollMode===l.G.DISABLED)&&t!==e.currentPageIndex)return!1;const o=h(e,t),r=n.apply(o);return e.viewportRect.isRectOverlapping(r)}function h(e,t){var n;if(null!==(n=e._pageToClientTransformation)&&void 0!==n&&n[t])return e._pageToClientTransformation[t];const r=(0,o.dF)(e,t),i=function(e,t){return e.translate(t.viewportRect.getLocation()).translate(t.scrollPosition.scale(-t.zoomLevel))}(y(v(g(s.sl.IDENTITY,e,t,r),e,r),e),e);return e._pageToClientTransformation||(e._pageToClientTransformation={}),e._pageToClientTransformation[t]=i,i}function m(e,t){return h(e,t).inverse()}function g(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;const s=t.pageSizes.get(n);switch((0,p.k)(s),0!==t.pagesRotation&&(e=e.rotate(-t.pagesRotation)),t.pagesRotation){case 0:break;case 90:e=e.translateX(s.height*i);break;case 180:e=e.translateX(s.width*i).translateY(s.height*i);break;case 270:e=e.translateY(s.width*i);break;default:throw new Error(`Unsupported pagesRotation: ${t.pagesRotation}. Only supporting: 0, 90, 180, 270.`)}switch((0,o.nw)(t)){case a.X.SINGLE:return(0,p.k)(n===r,"In LayoutMode.SINGLE, pageIndex must equal spreadIndex."),e;case a.X.DOUBLE:{if(t.keepFirstSpreadAsSinglePage&&0==n&&0==r)return e;const a=t.keepFirstSpreadAsSinglePage?1:0,s=(0,o.hK)(t,n),l=(0,o.Xk)(t,r);return e.translateX((n+a)%2?parseInt((l.width-s.width)*i,10):0).translateY(parseInt((l.height-s.height)*i/2,10))}default:throw new Error("Unsupported layoutMode")}}function v(e,t,n){if(t.scrollMode===l.G.CONTINUOUS){const r=(0,o.Xk)(t,n).width,i=(0,o.e8)(t,n);return e.translateX(((0,o.Ad)(t)-r)/2).translateY(i)}return e}function y(e,t){return e.scale(t.zoomLevel).translate(C(t).getLocation())}function b(e,t,n,o){const r=e.set("viewportRect",new s.UL({width:t.width-o,height:t.height,top:t.top,left:t.left}));return T(k(e,r,n))}function w(e,t){const n=e.set("layoutMode",t);return T(k(e,n))}function S(e,t){const n=e.set("scrollMode",t);return T(k(e,n))}function P(e,t){return T(e.set("spreadSpacing",t))}function E(e,t){return T(e.set("pageSpacing",t))}function x(e,t){return T(e.set("keepFirstSpreadAsSinglePage",t))}function D(e,t){return T(e.set("viewportPadding",t))}function C(e){let t;if(e.scrollMode===l.G.CONTINUOUS)t=new s.$u({width:(0,o.Ad)(e),height:(0,o.Of)(e)});else{const n=(0,o.dF)(e,e.currentPageIndex);t=(0,o.Xk)(e,n)}let n=new s.UL({width:t.width,height:t.height}).scale(e.zoomLevel).translate(e.viewportPadding);const r=e.commentMode===d._.SIDEBAR?u.h8:0;e.viewportRect.width-r-2*e.viewportPadding.x>n.width&&(n=n.translateX((e.viewportRect.width-r-2*e.viewportPadding.x-n.width)/2));return e.viewportRect.height-2*e.viewportPadding.y>n.height&&(n=n.translateY((e.viewportRect.height-2*e.viewportPadding.y-n.height)/2)),n}function k(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=(0,o.nw)(e)!==(0,o.nw)(t),a=e.scrollMode!==t.scrollMode;if(!(n||r||a))return t;switch(t.scrollMode){case l.G.PER_SPREAD:case l.G.DISABLED:return t.set("zoomMode",c.c.FIT_TO_VIEWPORT);case l.G.CONTINUOUS:return t=T(t),(0,i.eb)(t,t.currentPageIndex,!0);default:throw new Error("Unsupported scrollMode")}}function O(e,t){return e.zoomLevel!==t.zoomLevel||e.zoomMode!==t.zoomMode||e.layoutMode!==t.layoutMode||e.scrollMode!==t.scrollMode||e.scrollPosition!==t.scrollPosition||e.currentPageIndex!==t.currentPageIndex||e.viewportRect!==t.viewportRect||e.pageSizes!==t.pageSizes||e.pagesRotation!==t.pagesRotation||e.viewportPadding!==t.viewportPadding||e.spreadSpacing!==t.spreadSpacing||e.pageSpacing!==t.pageSpacing||e.keepFirstSpreadAsSinglePage!==t.keepFirstSpreadAsSinglePage}function A(e){return[e.zoomLevel,e.zoomMode,e.layoutMode,e.scrollMode,e.scrollPosition,e.currentPageIndex,e.viewportRect,e.pageSizes,e.pagesRotation,e.viewportPadding,e.spreadSpacing,e.pageSpacing,e.keepFirstSpreadAsSinglePage]}function T(e){return e.zoomMode!==c.c.CUSTOM?e.set("zoomLevel",(0,r.X9)(e,e.zoomMode)):e}function I(e){return function(t,n){return t.apply(F(e(),n))}}function F(e,t){let{viewportState:n,scrollElement:o}=e;if(o){const e=new s.E9({x:o.scrollLeft/n.zoomLevel,y:o.scrollTop/n.zoomLevel});n=n.set("scrollPosition",e)}return m(n,t)}},5020:(e,t,n)=>{"use strict";n.d(t,{Lv:()=>l,U1:()=>a,kI:()=>c,n5:()=>s});var o=n(47347),r=n(27515),i=n(66687);function a(e,t){(0,o.kG)(t%90==0,"Only multiples of 90° allowed for rotation."),t=s(t);const n=e.update("pagesRotation",(e=>(e+t)%360));return(0,r.zo)((0,r.fI)(e,n,!0))}function s(e){return(0,o.kG)(e%90==0,"Only multiples of 90° allowed for rotation."),(360+e%360)%360}function l(e){return(360+Math.round(e)%360)%360}function c(e,t,n){switch(n){case 90:return new i.UL({left:e.top,top:Math.max(0,Math.round(t.height-e.right)),height:e.width,width:e.height});case 180:return e.merge({left:Math.max(0,Math.round(t.width-e.right)),top:Math.max(0,Math.round(t.height-e.bottom))});case 270:return new i.UL({left:Math.max(0,Math.round(t.width-e.bottom)),top:e.left,height:e.width,width:e.height});default:return e}}},56956:(e,t,n)=>{"use strict";n.d(t,{DJ:()=>u,TW:()=>h,eb:()=>d,hu:()=>m,k3:()=>c,kN:()=>p,vP:()=>f});var o=n(71693),r=n(27515),i=n(52560),a=n(88804),s=n(47710),l=n(28098);function c(e,t,n){n||(n=new a.E9({x:.5*e.viewportRect.width,y:.1*e.viewportRect.height})),n=n.translate(e.viewportPadding.scale(-1));const o=t/e.zoomLevel-1;let r=0;const s=(0,i.kh)(e),l=t>s;if(l){r=t/Math.max(e.zoomLevel,s)-1}return new a.E9({x:l?e.scrollPosition.x+n.x*r/t:0,y:e.scrollPosition.y+n.y*o/t})}function u(e,t){const n=h(e);return new a.E9({x:Math.max(0,Math.min(t.x,n.x)),y:Math.max(0,Math.min(t.y,n.y))})}function d(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!n&&e.currentPageIndex==t)return e;if(e.scrollMode==s.G.PER_SPREAD||e.scrollMode===s.G.DISABLED)return(0,i.cq)(e.set("currentPageIndex",t),l.c.FIT_TO_VIEWPORT).set("scrollPosition",new a.E9).set("currentPageIndex",t);{const n=(0,o.dF)(e,t),r=(0,o.e8)(e,n),i=h(e).y,a=Math.min(i,r);return e.set("currentPageIndex",t).setIn(["scrollPosition","y"],a)}}function p(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!o&&(0,r.YS)(e,t,n))return e;const i=(0,r.cr)(e,t),a=n.apply(i),s=e.viewportRect.getCenter(),l=a.getCenter().translate(s.scale(-1)),c=e.scrollPosition.translate(l.scale(1/e.zoomLevel));return e.merge({scrollPosition:u(e,c),currentPageIndex:t})}function f(e,t,n){const{viewportRect:o,viewportPadding:r}=e,a=(o.width-2*r.x)/n.width,s=(o.height-2*r.y)/n.height,l=Math.min(a,s);return p((0,i.cq)(e,l),t,n,!0)}function h(e){const t=(0,r.G4)(e),n=t.left/e.zoomLevel+t.width/e.zoomLevel+e.viewportPadding.x/e.zoomLevel-e.viewportRect.width/e.zoomLevel,o=t.top/e.zoomLevel+t.height/e.zoomLevel+e.viewportPadding.y/e.zoomLevel-e.viewportRect.height/e.zoomLevel;return new a.E9({x:Math.max(0,n),y:Math.max(0,o)})}function m(e,t){return(0,o.Y2)(e.set("scrollPosition",t))}},71693:(e,t,n)=>{"use strict";n.d(t,{Ad:()=>h,Of:()=>m,P1:()=>g,Xk:()=>w,Y2:()=>P,dF:()=>v,e8:()=>f,hK:()=>b,kd:()=>y,nw:()=>d,s:()=>S,wU:()=>x,wX:()=>D});var o=n(35369),r=n(67294),i=n(47347),a=n(77973),s=n(27515),l=n(88804),c=n(47710),u=n(91859);function d(e){if(e.layoutMode===a.X.AUTO){return e.viewportRect.width>e.viewportRect.height&&e.viewportRect.width>u.GI?a.X.DOUBLE:a.X.SINGLE}return e.layoutMode}function p(e){const t=y(e);let n=(0,o.aV)();for(let e=0;e<t;e++)n=n.push(e);return n}function f(e,t){return p(e).map((t=>w(e,t))).takeUntil(((e,n)=>n>=t)).reduce(((t,n)=>t+n.height+e.spreadSpacing),0)}function h(e){const t=p(e).map((t=>w(e,t))).maxBy((e=>e.width));return t?t.width:0}function m(e){const t=p(e).map((t=>w(e,t))),n=(t.size-1)*e.spreadSpacing;return t.map((e=>e.height)).reduce(((e,t)=>e+t),0)+n}function g(e,t){switch(d(e)){case a.X.SINGLE:return(0,i.kG)(t<y(e),"`spreadIndex` is out of bounds."),[t];case a.X.DOUBLE:{const n=e.pageSizes.count();if(e.keepFirstSpreadAsSinglePage&&0===t)return[0];const o=e.keepFirstSpreadAsSinglePage?1:0,r=[],i=2*t-o;i<n&&r.push(i);const a=2*t+1-o;return a<n&&r.push(a),r}default:throw new Error("Unsupported layoutMode")}}function v(e,t){if(t>=e.pageSizes.size)return 0;switch(d(e)){case a.X.SINGLE:return t;case a.X.DOUBLE:{const n=e.keepFirstSpreadAsSinglePage?1:0;return Math.floor((t+n)/2)}default:throw new Error("Unsupported layoutMode")}}function y(e){switch(d(e)){case a.X.SINGLE:return e.pageSizes.size;case a.X.DOUBLE:{if(e.pageSizes.size<=0)return 0;const t=e.keepFirstSpreadAsSinglePage?1:0;return Math.ceil((e.pageSizes.size+t)/2)}default:throw new Error("Unsupported layoutMode")}}function b(e,t){const n=e.pageSizes.get(t);return(0,i.kG)(n,"No such page size"),90===e.pagesRotation||270===e.pagesRotation?new l.$u({width:n.height,height:n.width}):n}function w(e,t){const n=g(e,t);if(1===n.length)return b(e,n[0]);{let t=0,o=0;for(const r of n){const{width:n,height:i}=b(e,r);t+=n+(0!==r?e.pageSpacing:0),i>o&&(o=i)}return new l.$u({width:t,height:o})}}function S(e){let{width:t}=e;return t<=u.y$?"width-xs":t<=u.Fg?"width-sm":t<=u.GI?"width-md":t<=u.Qq?"width-lg":"width-xl"}function P(e){let t=e.currentPageIndex,n=v(e,e.currentPageIndex);if(e.scrollMode===c.G.CONTINUOUS){const t=[0];let o=0;for(let n=0;n<y(e)-1;n++){const r=o+(w(e,n).height+(0!==n?e.spreadSpacing:0))*e.zoomLevel;o=r,t.push(r)}const r=e.scrollPosition.y*e.zoomLevel-e.viewportPadding.y+e.viewportRect.height/2;n=t.reduce(((e,t,n)=>t<r?n:e),0)}const o=g(e,n);if(o.length>1){const r=e.scrollPosition.x*e.zoomLevel-e.viewportPadding.x+e.viewportRect.width/2,i=o[1],a=(0,s._4)((0,s.vs)((0,s.DB)(l.sl.IDENTITY,e,i,n),e,n),e);t=(new l.E9).apply(a).x<r?i:o[0]}else t=o[0];return e.set("currentPageIndex",t)}const E=n(36095).Mn?2e3:500;function x(e,t){const[n,i]=r.useState(null),a=r.useRef((0,o.l4)()),l=function(){const e=r.useRef({timeoutId:null,clear:function(){this.timeoutId&&clearTimeout(this.timeoutId),this.timeoutId=null},set:function(e,t){this.clear(),this.timeoutId=setTimeout(e,t)}});return r.useEffect((()=>{const t=e.current;return()=>t.clear()})),e.current}(),c=r.useCallback((e=>{a.current.contains(t)&&(e?(l.clear(),l.set((()=>{i(t)}),E)):i(t))}),[t,l,i]);r.useEffect((()=>{l.clear(),a.current=a.current.filter((e=>D(e,t))),c(!1)}),[...(0,s.oI)(e),t,l,c]);return[n,r.useCallback((e=>{a.current=a.current.add(e),c(!0)}),[c])]}function D(e,t){return e>=t-u.J8&&e<=t+u.J8}},58568:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});var o=n(65872);function r(e,t,n){const r=e.viewportState.viewportRect.set("height",t.height);return e.sidebarMode?r.set("width",e.containerRect.width-n).set("left",e.sidebarPlacement===o.d.START?n:0):r.set("width",e.containerRect.width).set("left",0)}},52560:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>h,Sm:()=>p,X9:()=>g,Yo:()=>d,cq:()=>v,hT:()=>y,kh:()=>f,vw:()=>m});var o=n(71693),r=n(91859),i=n(56956),a=n(47710),s=n(28098),l=n(97413);let c=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;function d(e){const t=Math.min(f(e),h(e),e.minDefaultZoomLevel,c);return c>t&&(c=t),t}function p(e){const t=Math.max(f(e),h(e),e.maxDefaultZoomLevel,u);return u<t&&(u=t),t}function f(e){if(0===e.pageSizes.size||0===e.viewportRect.width||0===e.viewportRect.height)return 1;let t;switch(e.scrollMode){case a.G.CONTINUOUS:t=(0,o.Ad)(e);break;case a.G.PER_SPREAD:case a.G.DISABLED:{const n=(0,o.dF)(e,e.currentPageIndex);t=(0,o.Xk)(e,n).width;break}default:throw new Error("Unsupported scrollMode")}return(e.viewportRect.width-2*e.viewportPadding.x)/t}function h(e){if(0===e.pageSizes.size||0===e.viewportRect.width||0===e.viewportRect.height)return 1;const t=(0,o.dF)(e,e.currentPageIndex),n=(0,o.Xk)(e,t).height;return 0===n?1:(e.viewportRect.height-2*e.viewportPadding.y)/n}function m(e){const t=f(e),n=h(e);return Math.min(t,n)}function g(e,t){switch(t){case s.c.AUTO:return function(e){const t=h(e),n=f(e),i=(0,o.hK)(e,0),a=i&&i.width>i.height?Math.min(t,n):n;return Math.min(a,r.zh)}(e);case s.c.FIT_TO_VIEWPORT:return m(e);case s.c.FIT_TO_WIDTH:return f(e);default:return(0,l.k)("number"==typeof t,"Unknown zoom mode"),t}}function v(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=g(e,t);const a="number"==typeof t?s.c.CUSTOM:t,l=d(e),c=p(e);if(r>=c)if(n.unbounded){const e=b((r-c)/25);r=c*(1+.5*e)}else r=c;else if(r<=l)if(n.unbounded){const e=b(4*(r-l));r=l*(1+.25*e)}else r=l;let u=(0,i.k3)(e,r,n.zoomCenter);return u=(0,i.DJ)(e.set("zoomLevel",r),u),(0,o.Y2)(e.withMutations((e=>e.set("zoomLevel",r).set("scrollPosition",u).set("zoomMode",a))))}function y(e){const{zoomLevel:t}=e,n=d(e);return t>p(e)||t<n}function b(e){const t=Math.exp(+e),n=Math.exp(-e);return t==1/0?1:n==1/0?-1:(t-n)/(t+n)}},25904:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>g,DI:()=>d,MX:()=>h,n:()=>u,w5:()=>p});var o=n(35369),r=n(47347),i=n(34710),a=n(4054),s=n(23661),l=n.n(s),c=n(16126);const u=2,d=2,p=[1,2,3,4,6,8,9,10,12,14,16,18,20,25,30,35,40,45,50,55,60,70,80,90,100,110,120,130,144],f=p.slice(0,Math.floor(p.length/4));function h(e,t,n,a,s,c,h){if(s&&e&&10===e.charCodeAt(e.length-1)&&(e+="\n"),"auto"!==a)return a||Math.max(4,Math.min(.7*n,12));let g,v;if(h){const e=window.getComputedStyle(h);g=e.getPropertyValue("font-family"),s||(v=e.getPropertyValue("line-height"))}if(s){const a=n-2*u,s=(0,o.aV)([e]),p=m(f,(e=>{const n=function(e){let{valueString:t,fontSize:n,fontFamily:o="inherit",availableWidth:a,element:s}=e;const c=new i.f(document,t,{fontSize:`${n}px`,width:`${a}px`,wordBreak:"break-word",whiteSpace:"pre-wrap",fontFamily:o,lineHeight:`${n}px`,margin:"0",padding:"0",border:"none",textAlign:(null==s?void 0:s.style.textAlign)||"initial"},l().widget,s&&s.parentNode),u=c.measure().first();(0,r.kG)(u);const d=u.height;return c.remove(),d}({valueString:s,fontSize:e,fontFamily:g,availableWidth:t-2*d,element:h});let o=u;const p=a-e;return p-2*u<0&&(o=p>0?p/2:0),n+2*o+2*c>a?0:1}));return p}{const a=(0,o.aV)([e]),s=m(p,(e=>{const o=function(e){let{valueString:t,fontSize:n,fontFamily:o="inherit",lineHeight:a="inherit",element:s}=e;const c=new i.f(document,t,{fontSize:`${n}px`,fontFamily:o,lineHeight:a},l().widget,s&&s.parentNode),u=c.measure().first();(0,r.kG)(u);const d=u.width;return c.remove(),d}({valueString:a,fontSize:e,fontFamily:g,lineHeight:v,element:h});return o>t||e>n?0:1}));return s}}function m(e,t){let n=0,o=e.length-1,r=0,i=e[0];for(;n<=o;)r=Math.floor((n+o)/2),i=e[r],t(i)?n=r+1:o=r-1;return t(i)||(i=e[Math.max(0,r-1)]),i}function g(e,t){let n,o,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;try{return n=(0,a.Aw)(),o=new i.f(document,t,(0,c.i2)(e,r,!1)),!(0,a.f)(o.wrapper)}finally{o&&o.remove(),n&&n.remove()}}},94184:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===i){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)o.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},18390:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var o=n(67294);function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var s=function(e){function t(e){var n,o;return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),(n=!(o=r(t).call(this,e))||"object"!=typeof o&&"function"!=typeof o?a(this):o).onKeyPress=n.onKeyPress.bind(a(n)),n}var n;return function(e,t){if("function"!=typeof t&&null!==t)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}}),t&&i(e,t)}(t,o.Component),(n=[{key:"onKeyPress",value:function(e){var t=this.props,n=t.onClick,o=t.onKeyPress;switch(e.key){case" ":case"Spacebar":e.preventDefault(),n&&o||o?o(e):n&&n(e);break;case"Enter":if(o&&(o(e),e.isDefaultPrevented()))return;n&&n(e)}}},{key:"render",value:function(){var e=this.props,t=e.is,n=void 0===t?"span":t,r=e.innerRef,i=e.onClick,a=e.disabled,s=e.tabIndex,l=void 0===s?0:s,c=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)t.indexOf(n=i[o])>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)t.indexOf(n=i[o])>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["is","innerRef","onClick","disabled","tabIndex","onKeyPress"]);return o.createElement(n,Object.assign({tabIndex:a?void 0:l,role:"button",onKeyPress:a?void 0:this.onKeyPress,onClick:a?void 0:i,"aria-disabled":a?"true":void 0,ref:r},c))}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(t.prototype,n),t}();function l(e,t){return o.createElement(s,Object.assign({innerRef:t},e))}l.displayName="ClickableBox";const c=o.forwardRef(l)},19662:(e,t,n)=>{var o=n(60614),r=n(66330),i=TypeError;e.exports=function(e){if(o(e))return e;throw i(r(e)+" is not a function")}},39483:(e,t,n)=>{var o=n(4411),r=n(66330),i=TypeError;e.exports=function(e){if(o(e))return e;throw i(r(e)+" is not a constructor")}},96077:(e,t,n)=>{var o=n(60614),r=String,i=TypeError;e.exports=function(e){if("object"==typeof e||o(e))return e;throw i("Can't set "+r(e)+" as a prototype")}},51223:(e,t,n)=>{var o=n(5112),r=n(70030),i=n(3070).f,a=o("unscopables"),s=Array.prototype;null==s[a]&&i(s,a,{configurable:!0,value:r(null)}),e.exports=function(e){s[a][e]=!0}},31530:(e,t,n)=>{"use strict";var o=n(28710).charAt;e.exports=function(e,t,n){return t+(n?o(e,t).length:1)}},25787:(e,t,n)=>{var o=n(47976),r=TypeError;e.exports=function(e,t){if(o(t,e))return e;throw r("Incorrect invocation")}},19670:(e,t,n)=>{var o=n(70111),r=String,i=TypeError;e.exports=function(e){if(o(e))return e;throw i(r(e)+" is not an object")}},23013:e=>{e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7556:(e,t,n)=>{var o=n(47293);e.exports=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},90260:(e,t,n)=>{"use strict";var o,r,i,a=n(23013),s=n(19781),l=n(17854),c=n(60614),u=n(70111),d=n(92597),p=n(70648),f=n(66330),h=n(68880),m=n(98052),g=n(3070).f,v=n(47976),y=n(79518),b=n(27674),w=n(5112),S=n(69711),P=n(29909),E=P.enforce,x=P.get,D=l.Int8Array,C=D&&D.prototype,k=l.Uint8ClampedArray,O=k&&k.prototype,A=D&&y(D),T=C&&y(C),I=Object.prototype,F=l.TypeError,M=w("toStringTag"),_=S("TYPED_ARRAY_TAG"),N="TypedArrayConstructor",R=a&&!!b&&"Opera"!==p(l.opera),L=!1,B={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},j={BigInt64Array:8,BigUint64Array:8},z=function(e){var t=y(e);if(u(t)){var n=x(t);return n&&d(n,N)?n.TypedArrayConstructor:z(t)}},K=function(e){if(!u(e))return!1;var t=p(e);return d(B,t)||d(j,t)};for(o in B)(i=(r=l[o])&&r.prototype)?E(i).TypedArrayConstructor=r:R=!1;for(o in j)(i=(r=l[o])&&r.prototype)&&(E(i).TypedArrayConstructor=r);if((!R||!c(A)||A===Function.prototype)&&(A=function(){throw F("Incorrect invocation")},R))for(o in B)l[o]&&b(l[o],A);if((!R||!T||T===I)&&(T=A.prototype,R))for(o in B)l[o]&&b(l[o].prototype,T);if(R&&y(O)!==T&&b(O,T),s&&!d(T,M))for(o in L=!0,g(T,M,{get:function(){return u(this)?this[_]:void 0}}),B)l[o]&&h(l[o],_,o);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:R,TYPED_ARRAY_TAG:L&&_,aTypedArray:function(e){if(K(e))return e;throw F("Target is not a typed array")},aTypedArrayConstructor:function(e){if(c(e)&&(!b||v(A,e)))return e;throw F(f(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,o){if(s){if(n)for(var r in B){var i=l[r];if(i&&d(i.prototype,e))try{delete i.prototype[e]}catch(n){try{i.prototype[e]=t}catch(e){}}}T[e]&&!n||m(T,e,n?t:R&&C[e]||t,o)}},exportTypedArrayStaticMethod:function(e,t,n){var o,r;if(s){if(b){if(n)for(o in B)if((r=l[o])&&d(r,e))try{delete r[e]}catch(e){}if(A[e]&&!n)return;try{return m(A,e,n?t:R&&A[e]||t)}catch(e){}}for(o in B)!(r=l[o])||r[e]&&!n||m(r,e,t)}},getTypedArrayConstructor:z,isView:function(e){if(!u(e))return!1;var t=p(e);return"DataView"===t||d(B,t)||d(j,t)},isTypedArray:K,TypedArray:A,TypedArrayPrototype:T}},21285:(e,t,n)=>{"use strict";var o=n(47908),r=n(51400),i=n(26244);e.exports=function(e){for(var t=o(this),n=i(t),a=arguments.length,s=r(a>1?arguments[1]:void 0,n),l=a>2?arguments[2]:void 0,c=void 0===l?n:r(l,n);c>s;)t[s++]=e;return t}},48457:(e,t,n)=>{"use strict";var o=n(49974),r=n(46916),i=n(47908),a=n(53411),s=n(97659),l=n(4411),c=n(26244),u=n(86135),d=n(18554),p=n(71246),f=Array;e.exports=function(e){var t=i(e),n=l(this),h=arguments.length,m=h>1?arguments[1]:void 0,g=void 0!==m;g&&(m=o(m,h>2?arguments[2]:void 0));var v,y,b,w,S,P,E=p(t),x=0;if(!E||this===f&&s(E))for(v=c(t),y=n?new this(v):f(v);v>x;x++)P=g?m(t[x],x):t[x],u(y,x,P);else for(S=(w=d(t,E)).next,y=n?new this:[];!(b=r(S,w)).done;x++)P=g?a(w,m,[b.value,x],!0):b.value,u(y,x,P);return y.length=x,y}},41318:(e,t,n)=>{var o=n(45656),r=n(51400),i=n(26244),a=function(e){return function(t,n,a){var s,l=o(t),c=i(l),u=r(a,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},42092:(e,t,n)=>{var o=n(49974),r=n(1702),i=n(68361),a=n(47908),s=n(26244),l=n(65417),c=r([].push),u=function(e){var t=1==e,n=2==e,r=3==e,u=4==e,d=6==e,p=7==e,f=5==e||d;return function(h,m,g,v){for(var y,b,w=a(h),S=i(w),P=o(m,g),E=s(S),x=0,D=v||l,C=t?D(h,E):n||p?D(h,0):void 0;E>x;x++)if((f||x in S)&&(b=P(y=S[x],x,w),e))if(t)C[x]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return x;case 2:c(C,y)}else switch(e){case 4:return!1;case 7:c(C,y)}return d?-1:r||u?u:C}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},9341:(e,t,n)=>{"use strict";var o=n(47293);e.exports=function(e,t){var n=[][e];return!!n&&o((function(){n.call(null,t||function(){return 1},1)}))}},41589:(e,t,n)=>{var o=n(51400),r=n(26244),i=n(86135),a=Array,s=Math.max;e.exports=function(e,t,n){for(var l=r(e),c=o(t,l),u=o(void 0===n?l:n,l),d=a(s(u-c,0)),p=0;c<u;c++,p++)i(d,p,e[c]);return d.length=p,d}},50206:(e,t,n)=>{var o=n(1702);e.exports=o([].slice)},94362:(e,t,n)=>{var o=n(41589),r=Math.floor,i=function(e,t){var n=e.length,l=r(n/2);return n<8?a(e,t):s(e,i(o(e,0,l),t),i(o(e,l),t),t)},a=function(e,t){for(var n,o,r=e.length,i=1;i<r;){for(o=i,n=e[i];o&&t(e[o-1],n)>0;)e[o]=e[--o];o!==i++&&(e[o]=n)}return e},s=function(e,t,n,o){for(var r=t.length,i=n.length,a=0,s=0;a<r||s<i;)e[a+s]=a<r&&s<i?o(t[a],n[s])<=0?t[a++]:n[s++]:a<r?t[a++]:n[s++];return e};e.exports=i},77475:(e,t,n)=>{var o=n(43157),r=n(4411),i=n(70111),a=n(5112)("species"),s=Array;e.exports=function(e){var t;return o(e)&&(t=e.constructor,(r(t)&&(t===s||o(t.prototype))||i(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?s:t}},65417:(e,t,n)=>{var o=n(77475);e.exports=function(e,t){return new(o(e))(0===t?0:t)}},53411:(e,t,n)=>{var o=n(19670),r=n(99212);e.exports=function(e,t,n,i){try{return i?t(o(n)[0],n[1]):t(n)}catch(t){r(e,"throw",t)}}},17072:(e,t,n)=>{var o=n(5112)("iterator"),r=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){r=!0}};a[o]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var i={};i[o]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n}},84326:(e,t,n)=>{var o=n(1702),r=o({}.toString),i=o("".slice);e.exports=function(e){return i(r(e),8,-1)}},70648:(e,t,n)=>{var o=n(51694),r=n(60614),i=n(84326),a=n(5112)("toStringTag"),s=Object,l="Arguments"==i(function(){return arguments}());e.exports=o?i:function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=s(e),a))?n:l?i(t):"Object"==(o=i(t))&&r(t.callee)?"Arguments":o}},29320:(e,t,n)=>{"use strict";var o=n(1702),r=n(89190),i=n(62423).getWeakData,a=n(25787),s=n(19670),l=n(68554),c=n(70111),u=n(20408),d=n(42092),p=n(92597),f=n(29909),h=f.set,m=f.getterFor,g=d.find,v=d.findIndex,y=o([].splice),b=0,w=function(e){return e.frozen||(e.frozen=new S)},S=function(){this.entries=[]},P=function(e,t){return g(e.entries,(function(e){return e[0]===t}))};S.prototype={get:function(e){var t=P(this,e);if(t)return t[1]},has:function(e){return!!P(this,e)},set:function(e,t){var n=P(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=v(this.entries,(function(t){return t[0]===e}));return~t&&y(this.entries,t,1),!!~t}},e.exports={getConstructor:function(e,t,n,o){var d=e((function(e,r){a(e,f),h(e,{type:t,id:b++,frozen:void 0}),l(r)||u(r,e[o],{that:e,AS_ENTRIES:n})})),f=d.prototype,g=m(t),v=function(e,t,n){var o=g(e),r=i(s(t),!0);return!0===r?w(o).set(t,n):r[o.id]=n,e};return r(f,{delete:function(e){var t=g(this);if(!c(e))return!1;var n=i(e);return!0===n?w(t).delete(e):n&&p(n,t.id)&&delete n[t.id]},has:function(e){var t=g(this);if(!c(e))return!1;var n=i(e);return!0===n?w(t).has(e):n&&p(n,t.id)}}),r(f,n?{get:function(e){var t=g(this);if(c(e)){var n=i(e);return!0===n?w(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return v(this,e,t)}}:{add:function(e){return v(this,e,!0)}}),d}}},77710:(e,t,n)=>{"use strict";var o=n(82109),r=n(17854),i=n(1702),a=n(54705),s=n(98052),l=n(62423),c=n(20408),u=n(25787),d=n(60614),p=n(68554),f=n(70111),h=n(47293),m=n(17072),g=n(58003),v=n(79587);e.exports=function(e,t,n){var y=-1!==e.indexOf("Map"),b=-1!==e.indexOf("Weak"),w=y?"set":"add",S=r[e],P=S&&S.prototype,E=S,x={},D=function(e){var t=i(P[e]);s(P,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(b&&!f(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return b&&!f(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(b&&!f(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(a(e,!d(S)||!(b||P.forEach&&!h((function(){(new S).entries().next()})))))E=n.getConstructor(t,e,y,w),l.enable();else if(a(e,!0)){var C=new E,k=C[w](b?{}:-0,1)!=C,O=h((function(){C.has(1)})),A=m((function(e){new S(e)})),T=!b&&h((function(){for(var e=new S,t=5;t--;)e[w](t,t);return!e.has(-0)}));A||((E=t((function(e,t){u(e,P);var n=v(new S,e,E);return p(t)||c(t,n[w],{that:n,AS_ENTRIES:y}),n}))).prototype=P,P.constructor=E),(O||T)&&(D("delete"),D("has"),y&&D("get")),(T||k)&&D(w),b&&P.clear&&delete P.clear}return x[e]=E,o({global:!0,constructor:!0,forced:E!=S},x),g(E,e),b||n.setStrong(E,e,y),E}},99920:(e,t,n)=>{var o=n(92597),r=n(53887),i=n(31236),a=n(3070);e.exports=function(e,t,n){for(var s=r(t),l=a.f,c=i.f,u=0;u<s.length;u++){var d=s[u];o(e,d)||n&&o(n,d)||l(e,d,c(t,d))}}},84964:(e,t,n)=>{var o=n(5112)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[o]=!1,"/./"[e](t)}catch(e){}}return!1}},49920:(e,t,n)=>{var o=n(47293);e.exports=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},76178:e=>{e.exports=function(e,t){return{value:e,done:t}}},68880:(e,t,n)=>{var o=n(19781),r=n(3070),i=n(79114);e.exports=o?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},79114:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},86135:(e,t,n)=>{"use strict";var o=n(34948),r=n(3070),i=n(79114);e.exports=function(e,t,n){var a=o(t);a in e?r.f(e,a,i(0,n)):e[a]=n}},47045:(e,t,n)=>{var o=n(56339),r=n(3070);e.exports=function(e,t,n){return n.get&&o(n.get,t,{getter:!0}),n.set&&o(n.set,t,{setter:!0}),r.f(e,t,n)}},98052:(e,t,n)=>{var o=n(60614),r=n(3070),i=n(56339),a=n(13072);e.exports=function(e,t,n,s){s||(s={});var l=s.enumerable,c=void 0!==s.name?s.name:t;if(o(n)&&i(n,c,s),s.global)l?e[t]=n:a(t,n);else{try{s.unsafe?e[t]&&(l=!0):delete e[t]}catch(e){}l?e[t]=n:r.f(e,t,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},89190:(e,t,n)=>{var o=n(98052);e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},13072:(e,t,n)=>{var o=n(17854),r=Object.defineProperty;e.exports=function(e,t){try{r(o,e,{value:t,configurable:!0,writable:!0})}catch(n){o[e]=t}return t}},85117:(e,t,n)=>{"use strict";var o=n(66330),r=TypeError;e.exports=function(e,t){if(!delete e[t])throw r("Cannot delete property "+o(t)+" of "+o(e))}},19781:(e,t,n)=>{var o=n(47293);e.exports=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4154:e=>{var t="object"==typeof document&&document.all,n=void 0===t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:n}},80317:(e,t,n)=>{var o=n(17854),r=n(70111),i=o.document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},7207:e=>{var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},48324:e=>{e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},98509:(e,t,n)=>{var o=n(80317)("span").classList,r=o&&o.constructor&&o.constructor.prototype;e.exports=r===Object.prototype?void 0:r},68886:(e,t,n)=>{var o=n(88113).match(/firefox\/(\d+)/i);e.exports=!!o&&+o[1]},7871:(e,t,n)=>{var o=n(83823),r=n(35268);e.exports=!o&&!r&&"object"==typeof window&&"object"==typeof document},89363:e=>{e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},83823:e=>{e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},30256:(e,t,n)=>{var o=n(88113);e.exports=/MSIE|Trident/.test(o)},71528:(e,t,n)=>{var o=n(88113),r=n(17854);e.exports=/ipad|iphone|ipod/i.test(o)&&void 0!==r.Pebble},6833:(e,t,n)=>{var o=n(88113);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(o)},35268:(e,t,n)=>{var o=n(84326),r=n(17854);e.exports="process"==o(r.process)},71036:(e,t,n)=>{var o=n(88113);e.exports=/web0s(?!.*chrome)/i.test(o)},88113:(e,t,n)=>{var o=n(35005);e.exports=o("navigator","userAgent")||""},7392:(e,t,n)=>{var o,r,i=n(17854),a=n(88113),s=i.process,l=i.Deno,c=s&&s.versions||l&&l.version,u=c&&c.v8;u&&(r=(o=u.split("."))[0]>0&&o[0]<4?1:+(o[0]+o[1])),!r&&a&&(!(o=a.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=a.match(/Chrome\/(\d+)/))&&(r=+o[1]),e.exports=r},98008:(e,t,n)=>{var o=n(88113).match(/AppleWebKit\/(\d+)\./);e.exports=!!o&&+o[1]},80748:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},82109:(e,t,n)=>{var o=n(17854),r=n(31236).f,i=n(68880),a=n(98052),s=n(13072),l=n(99920),c=n(54705);e.exports=function(e,t){var n,u,d,p,f,h=e.target,m=e.global,g=e.stat;if(n=m?o:g?o[h]||s(h,{}):(o[h]||{}).prototype)for(u in t){if(p=t[u],d=e.dontCallGetSet?(f=r(n,u))&&f.value:n[u],!c(m?u:h+(g?".":"#")+u,e.forced)&&void 0!==d){if(typeof p==typeof d)continue;l(p,d)}(e.sham||d&&d.sham)&&i(p,"sham",!0),a(n,u,p,e)}}},47293:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},27007:(e,t,n)=>{"use strict";n(74916);var o=n(21470),r=n(98052),i=n(22261),a=n(47293),s=n(5112),l=n(68880),c=s("species"),u=RegExp.prototype;e.exports=function(e,t,n,d){var p=s(e),f=!a((function(){var t={};return t[p]=function(){return 7},7!=""[e](t)})),h=f&&!a((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return t=!0,null},n[p](""),!t}));if(!f||!h||n){var m=o(/./[p]),g=t(p,""[e],(function(e,t,n,r,a){var s=o(e),l=t.exec;return l===i||l===u.exec?f&&!a?{done:!0,value:m(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));r(String.prototype,e,g[0]),r(u,p,g[1])}d&&l(u[p],"sham",!0)}},6790:(e,t,n)=>{"use strict";var o=n(43157),r=n(26244),i=n(7207),a=n(49974),s=function(e,t,n,l,c,u,d,p){for(var f,h,m=c,g=0,v=!!d&&a(d,p);g<l;)g in n&&(f=v?v(n[g],g,t):n[g],u>0&&o(f)?(h=r(f),m=s(e,t,f,h,m,u-1)-1):(i(m+1),e[m]=f),m++),g++;return m};e.exports=s},76677:(e,t,n)=>{var o=n(47293);e.exports=!o((function(){return Object.isExtensible(Object.preventExtensions({}))}))},22104:(e,t,n)=>{var o=n(34374),r=Function.prototype,i=r.apply,a=r.call;e.exports="object"==typeof Reflect&&Reflect.apply||(o?a.bind(i):function(){return a.apply(i,arguments)})},49974:(e,t,n)=>{var o=n(21470),r=n(19662),i=n(34374),a=o(o.bind);e.exports=function(e,t){return r(e),void 0===t?e:i?a(e,t):function(){return e.apply(t,arguments)}}},34374:(e,t,n)=>{var o=n(47293);e.exports=!o((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},46916:(e,t,n)=>{var o=n(34374),r=Function.prototype.call;e.exports=o?r.bind(r):function(){return r.apply(r,arguments)}},76530:(e,t,n)=>{var o=n(19781),r=n(92597),i=Function.prototype,a=o&&Object.getOwnPropertyDescriptor,s=r(i,"name"),l=s&&"something"===function(){}.name,c=s&&(!o||o&&a(i,"name").configurable);e.exports={EXISTS:s,PROPER:l,CONFIGURABLE:c}},21470:(e,t,n)=>{var o=n(84326),r=n(1702);e.exports=function(e){if("Function"===o(e))return r(e)}},1702:(e,t,n)=>{var o=n(34374),r=Function.prototype,i=r.call,a=o&&r.bind.bind(i,i);e.exports=o?a:function(e){return function(){return i.apply(e,arguments)}}},35005:(e,t,n)=>{var o=n(17854),r=n(60614),i=function(e){return r(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?i(o[e]):o[e]&&o[e][t]}},71246:(e,t,n)=>{var o=n(70648),r=n(58173),i=n(68554),a=n(97497),s=n(5112)("iterator");e.exports=function(e){if(!i(e))return r(e,s)||r(e,"@@iterator")||a[o(e)]}},18554:(e,t,n)=>{var o=n(46916),r=n(19662),i=n(19670),a=n(66330),s=n(71246),l=TypeError;e.exports=function(e,t){var n=arguments.length<2?s(e):t;if(r(n))return i(o(n,e));throw l(a(e)+" is not iterable")}},58173:(e,t,n)=>{var o=n(19662),r=n(68554);e.exports=function(e,t){var n=e[t];return r(n)?void 0:o(n)}},10647:(e,t,n)=>{var o=n(1702),r=n(47908),i=Math.floor,a=o("".charAt),s=o("".replace),l=o("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,o,d,p){var f=n+e.length,h=o.length,m=u;return void 0!==d&&(d=r(d),m=c),s(p,m,(function(r,s){var c;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,n);case"'":return l(t,f);case"<":c=d[l(s,1,-1)];break;default:var u=+s;if(0===u)return r;if(u>h){var p=i(u/10);return 0===p?r:p<=h?void 0===o[p-1]?a(s,1):o[p-1]+a(s,1):r}c=o[u-1]}return void 0===c?"":c}))}},17854:(e,t,n)=>{var o=function(e){return e&&e.Math==Math&&e};e.exports=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},92597:(e,t,n)=>{var o=n(1702),r=n(47908),i=o({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(r(e),t)}},3501:e=>{e.exports={}},842:(e,t,n)=>{var o=n(17854);e.exports=function(e,t){var n=o.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))}},60490:(e,t,n)=>{var o=n(35005);e.exports=o("document","documentElement")},64664:(e,t,n)=>{var o=n(19781),r=n(47293),i=n(80317);e.exports=!o&&!r((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},68361:(e,t,n)=>{var o=n(1702),r=n(47293),i=n(84326),a=Object,s=o("".split);e.exports=r((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?s(e,""):a(e)}:a},79587:(e,t,n)=>{var o=n(60614),r=n(70111),i=n(27674);e.exports=function(e,t,n){var a,s;return i&&o(a=t.constructor)&&a!==n&&r(s=a.prototype)&&s!==n.prototype&&i(e,s),e}},42788:(e,t,n)=>{var o=n(1702),r=n(60614),i=n(5465),a=o(Function.toString);r(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},62423:(e,t,n)=>{var o=n(82109),r=n(1702),i=n(3501),a=n(70111),s=n(92597),l=n(3070).f,c=n(8006),u=n(1156),d=n(52050),p=n(69711),f=n(76677),h=!1,m=p("meta"),g=0,v=function(e){l(e,m,{value:{objectID:"O"+g++,weakData:{}}})},y=e.exports={enable:function(){y.enable=function(){},h=!0;var e=c.f,t=r([].splice),n={};n[m]=1,e(n).length&&(c.f=function(n){for(var o=e(n),r=0,i=o.length;r<i;r++)if(o[r]===m){t(o,r,1);break}return o},o({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:u.f}))},fastKey:function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,m)){if(!d(e))return"F";if(!t)return"E";v(e)}return e[m].objectID},getWeakData:function(e,t){if(!s(e,m)){if(!d(e))return!0;if(!t)return!1;v(e)}return e[m].weakData},onFreeze:function(e){return f&&h&&d(e)&&!s(e,m)&&v(e),e}};i[m]=!0},29909:(e,t,n)=>{var o,r,i,a=n(94811),s=n(17854),l=n(70111),c=n(68880),u=n(92597),d=n(5465),p=n(6200),f=n(3501),h="Object already initialized",m=s.TypeError,g=s.WeakMap;if(a||d.state){var v=d.state||(d.state=new g);v.get=v.get,v.has=v.has,v.set=v.set,o=function(e,t){if(v.has(e))throw m(h);return t.facade=e,v.set(e,t),t},r=function(e){return v.get(e)||{}},i=function(e){return v.has(e)}}else{var y=p("state");f[y]=!0,o=function(e,t){if(u(e,y))throw m(h);return t.facade=e,c(e,y,t),t},r=function(e){return u(e,y)?e[y]:{}},i=function(e){return u(e,y)}}e.exports={set:o,get:r,has:i,enforce:function(e){return i(e)?r(e):o(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=r(t)).type!==e)throw m("Incompatible receiver, "+e+" required");return n}}}},97659:(e,t,n)=>{var o=n(5112),r=n(97497),i=o("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[i]===e)}},43157:(e,t,n)=>{var o=n(84326);e.exports=Array.isArray||function(e){return"Array"==o(e)}},60614:(e,t,n)=>{var o=n(4154),r=o.all;e.exports=o.IS_HTMLDDA?function(e){return"function"==typeof e||e===r}:function(e){return"function"==typeof e}},4411:(e,t,n)=>{var o=n(1702),r=n(47293),i=n(60614),a=n(70648),s=n(35005),l=n(42788),c=function(){},u=[],d=s("Reflect","construct"),p=/^\s*(?:class|function)\b/,f=o(p.exec),h=!p.exec(c),m=function(e){if(!i(e))return!1;try{return d(c,u,e),!0}catch(e){return!1}},g=function(e){if(!i(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!f(p,l(e))}catch(e){return!0}};g.sham=!0,e.exports=!d||r((function(){var e;return m(m.call)||!m(Object)||!m((function(){e=!0}))||e}))?g:m},45032:(e,t,n)=>{var o=n(92597);e.exports=function(e){return void 0!==e&&(o(e,"value")||o(e,"writable"))}},54705:(e,t,n)=>{var o=n(47293),r=n(60614),i=/#|\.prototype\./,a=function(e,t){var n=l[s(e)];return n==u||n!=c&&(r(t)?o(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},l=a.data={},c=a.NATIVE="N",u=a.POLYFILL="P";e.exports=a},68554:e=>{e.exports=function(e){return null==e}},70111:(e,t,n)=>{var o=n(60614),r=n(4154),i=r.all;e.exports=r.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:o(e)||e===i}:function(e){return"object"==typeof e?null!==e:o(e)}},31913:e=>{e.exports=!1},47850:(e,t,n)=>{var o=n(70111),r=n(84326),i=n(5112)("match");e.exports=function(e){var t;return o(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==r(e))}},52190:(e,t,n)=>{var o=n(35005),r=n(60614),i=n(47976),a=n(43307),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=o("Symbol");return r(t)&&i(t.prototype,s(e))}},20408:(e,t,n)=>{var o=n(49974),r=n(46916),i=n(19670),a=n(66330),s=n(97659),l=n(26244),c=n(47976),u=n(18554),d=n(71246),p=n(99212),f=TypeError,h=function(e,t){this.stopped=e,this.result=t},m=h.prototype;e.exports=function(e,t,n){var g,v,y,b,w,S,P,E=n&&n.that,x=!(!n||!n.AS_ENTRIES),D=!(!n||!n.IS_RECORD),C=!(!n||!n.IS_ITERATOR),k=!(!n||!n.INTERRUPTED),O=o(t,E),A=function(e){return g&&p(g,"normal",e),new h(!0,e)},T=function(e){return x?(i(e),k?O(e[0],e[1],A):O(e[0],e[1])):k?O(e,A):O(e)};if(D)g=e.iterator;else if(C)g=e;else{if(!(v=d(e)))throw f(a(e)+" is not iterable");if(s(v)){for(y=0,b=l(e);b>y;y++)if((w=T(e[y]))&&c(m,w))return w;return new h(!1)}g=u(e,v)}for(S=D?e.next:g.next;!(P=r(S,g)).done;){try{w=T(P.value)}catch(e){p(g,"throw",e)}if("object"==typeof w&&w&&c(m,w))return w}return new h(!1)}},99212:(e,t,n)=>{var o=n(46916),r=n(19670),i=n(58173);e.exports=function(e,t,n){var a,s;r(e);try{if(!(a=i(e,"return"))){if("throw"===t)throw n;return n}a=o(a,e)}catch(e){s=!0,a=e}if("throw"===t)throw n;if(s)throw a;return r(a),n}},63061:(e,t,n)=>{"use strict";var o=n(13383).IteratorPrototype,r=n(70030),i=n(79114),a=n(58003),s=n(97497),l=function(){return this};e.exports=function(e,t,n,c){var u=t+" Iterator";return e.prototype=r(o,{next:i(+!c,n)}),a(e,u,!1,!0),s[u]=l,e}},51656:(e,t,n)=>{"use strict";var o=n(82109),r=n(46916),i=n(31913),a=n(76530),s=n(60614),l=n(63061),c=n(79518),u=n(27674),d=n(58003),p=n(68880),f=n(98052),h=n(5112),m=n(97497),g=n(13383),v=a.PROPER,y=a.CONFIGURABLE,b=g.IteratorPrototype,w=g.BUGGY_SAFARI_ITERATORS,S=h("iterator"),P="keys",E="values",x="entries",D=function(){return this};e.exports=function(e,t,n,a,h,g,C){l(n,t,a);var k,O,A,T=function(e){if(e===h&&N)return N;if(!w&&e in M)return M[e];switch(e){case P:case E:case x:return function(){return new n(this,e)}}return function(){return new n(this)}},I=t+" Iterator",F=!1,M=e.prototype,_=M[S]||M["@@iterator"]||h&&M[h],N=!w&&_||T(h),R="Array"==t&&M.entries||_;if(R&&(k=c(R.call(new e)))!==Object.prototype&&k.next&&(i||c(k)===b||(u?u(k,b):s(k[S])||f(k,S,D)),d(k,I,!0,!0),i&&(m[I]=D)),v&&h==E&&_&&_.name!==E&&(!i&&y?p(M,"name",E):(F=!0,N=function(){return r(_,this)})),h)if(O={values:T(E),keys:g?N:T(P),entries:T(x)},C)for(A in O)(w||F||!(A in M))&&f(M,A,O[A]);else o({target:t,proto:!0,forced:w||F},O);return i&&!C||M[S]===N||f(M,S,N,{name:h}),m[t]=N,O}},13383:(e,t,n)=>{"use strict";var o,r,i,a=n(47293),s=n(60614),l=n(70111),c=n(70030),u=n(79518),d=n(98052),p=n(5112),f=n(31913),h=p("iterator"),m=!1;[].keys&&("next"in(i=[].keys())?(r=u(u(i)))!==Object.prototype&&(o=r):m=!0),!l(o)||a((function(){var e={};return o[h].call(e)!==e}))?o={}:f&&(o=c(o)),s(o[h])||d(o,h,(function(){return this})),e.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:m}},97497:e=>{e.exports={}},26244:(e,t,n)=>{var o=n(17466);e.exports=function(e){return o(e.length)}},56339:(e,t,n)=>{var o=n(47293),r=n(60614),i=n(92597),a=n(19781),s=n(76530).CONFIGURABLE,l=n(42788),c=n(29909),u=c.enforce,d=c.get,p=Object.defineProperty,f=a&&!o((function(){return 8!==p((function(){}),"length",{value:8}).length})),h=String(String).split("String"),m=e.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!i(e,"name")||s&&e.name!==t)&&(a?p(e,"name",{value:t,configurable:!0}):e.name=t),f&&n&&i(n,"arity")&&e.length!==n.arity&&p(e,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?a&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var o=u(e);return i(o,"source")||(o.source=h.join("string"==typeof t?t:"")),e};Function.prototype.toString=m((function(){return r(this)&&d(this).source||l(this)}),"toString")},74758:e=>{var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var o=+e;return(o>0?n:t)(o)}},95948:(e,t,n)=>{var o,r,i,a,s,l,c,u,d=n(17854),p=n(49974),f=n(31236).f,h=n(20261).set,m=n(6833),g=n(71528),v=n(71036),y=n(35268),b=d.MutationObserver||d.WebKitMutationObserver,w=d.document,S=d.process,P=d.Promise,E=f(d,"queueMicrotask"),x=E&&E.value;x||(o=function(){var e,t;for(y&&(e=S.domain)&&e.exit();r;){t=r.fn,r=r.next;try{t()}catch(e){throw r?a():i=void 0,e}}i=void 0,e&&e.enter()},m||y||v||!b||!w?!g&&P&&P.resolve?((c=P.resolve(void 0)).constructor=P,u=p(c.then,c),a=function(){u(o)}):y?a=function(){S.nextTick(o)}:(h=p(h,d),a=function(){h(o)}):(s=!0,l=w.createTextNode(""),new b(o).observe(l,{characterData:!0}),a=function(){l.data=s=!s})),e.exports=x||function(e){var t={fn:e,next:void 0};i&&(i.next=t),r||(r=t,a()),i=t}},78523:(e,t,n)=>{"use strict";var o=n(19662),r=TypeError,i=function(e){var t,n;this.promise=new e((function(e,o){if(void 0!==t||void 0!==n)throw r("Bad Promise constructor");t=e,n=o})),this.resolve=o(t),this.reject=o(n)};e.exports.f=function(e){return new i(e)}},3929:(e,t,n)=>{var o=n(47850),r=TypeError;e.exports=function(e){if(o(e))throw r("The method doesn't accept regular expressions");return e}},2814:(e,t,n)=>{var o=n(17854),r=n(47293),i=n(1702),a=n(41340),s=n(53111).trim,l=n(81361),c=i("".charAt),u=o.parseFloat,d=o.Symbol,p=d&&d.iterator,f=1/u(l+"-0")!=-1/0||p&&!r((function(){u(Object(p))}));e.exports=f?function(e){var t=s(a(e)),n=u(t);return 0===n&&"-"==c(t,0)?-0:n}:u},83009:(e,t,n)=>{var o=n(17854),r=n(47293),i=n(1702),a=n(41340),s=n(53111).trim,l=n(81361),c=o.parseInt,u=o.Symbol,d=u&&u.iterator,p=/^[+-]?0x/i,f=i(p.exec),h=8!==c(l+"08")||22!==c(l+"0x16")||d&&!r((function(){c(Object(d))}));e.exports=h?function(e,t){var n=s(a(e));return c(n,t>>>0||(f(p,n)?16:10))}:c},21574:(e,t,n)=>{"use strict";var o=n(19781),r=n(1702),i=n(46916),a=n(47293),s=n(81956),l=n(25181),c=n(55296),u=n(47908),d=n(68361),p=Object.assign,f=Object.defineProperty,h=r([].concat);e.exports=!p||a((function(){if(o&&1!==p({b:1},p(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=p({},e)[n]||s(p({},t)).join("")!=r}))?function(e,t){for(var n=u(e),r=arguments.length,a=1,p=l.f,f=c.f;r>a;)for(var m,g=d(arguments[a++]),v=p?h(s(g),p(g)):s(g),y=v.length,b=0;y>b;)m=v[b++],o&&!i(f,g,m)||(n[m]=g[m]);return n}:p},70030:(e,t,n)=>{var o,r=n(19670),i=n(36048),a=n(80748),s=n(3501),l=n(60490),c=n(80317),u=n(6200),d=u("IE_PROTO"),p=function(){},f=function(e){return"<script>"+e+"</"+"script>"},h=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{o=new ActiveXObject("htmlfile")}catch(e){}var e,t;m="undefined"!=typeof document?document.domain&&o?h(o):((t=c("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F):h(o);for(var n=a.length;n--;)delete m.prototype[a[n]];return m()};s[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(p.prototype=r(e),n=new p,p.prototype=null,n[d]=e):n=m(),void 0===t?n:i.f(n,t)}},36048:(e,t,n)=>{var o=n(19781),r=n(3353),i=n(3070),a=n(19670),s=n(45656),l=n(81956);t.f=o&&!r?Object.defineProperties:function(e,t){a(e);for(var n,o=s(t),r=l(t),c=r.length,u=0;c>u;)i.f(e,n=r[u++],o[n]);return e}},3070:(e,t,n)=>{var o=n(19781),r=n(64664),i=n(3353),a=n(19670),s=n(34948),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",p="configurable",f="writable";t.f=o?i?function(e,t,n){if(a(e),t=s(t),a(n),"function"==typeof e&&"prototype"===t&&"value"in n&&f in n&&!n.writable){var o=u(e,t);o&&o.writable&&(e[t]=n.value,n={configurable:p in n?n.configurable:o.configurable,enumerable:d in n?n.enumerable:o.enumerable,writable:!1})}return c(e,t,n)}:c:function(e,t,n){if(a(e),t=s(t),a(n),r)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw l("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},31236:(e,t,n)=>{var o=n(19781),r=n(46916),i=n(55296),a=n(79114),s=n(45656),l=n(34948),c=n(92597),u=n(64664),d=Object.getOwnPropertyDescriptor;t.f=o?d:function(e,t){if(e=s(e),t=l(t),u)try{return d(e,t)}catch(e){}if(c(e,t))return a(!r(i.f,e,t),e[t])}},1156:(e,t,n)=>{var o=n(84326),r=n(45656),i=n(8006).f,a=n(41589),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"==o(e)?function(e){try{return i(e)}catch(e){return a(s)}}(e):i(r(e))}},8006:(e,t,n)=>{var o=n(16324),r=n(80748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return o(e,r)}},25181:(e,t)=>{t.f=Object.getOwnPropertySymbols},79518:(e,t,n)=>{var o=n(92597),r=n(60614),i=n(47908),a=n(6200),s=n(49920),l=a("IE_PROTO"),c=Object,u=c.prototype;e.exports=s?c.getPrototypeOf:function(e){var t=i(e);if(o(t,l))return t[l];var n=t.constructor;return r(n)&&t instanceof n?n.prototype:t instanceof c?u:null}},52050:(e,t,n)=>{var o=n(47293),r=n(70111),i=n(84326),a=n(7556),s=Object.isExtensible,l=o((function(){s(1)}));e.exports=l||a?function(e){return!!r(e)&&((!a||"ArrayBuffer"!=i(e))&&(!s||s(e)))}:s},47976:(e,t,n)=>{var o=n(1702);e.exports=o({}.isPrototypeOf)},16324:(e,t,n)=>{var o=n(1702),r=n(92597),i=n(45656),a=n(41318).indexOf,s=n(3501),l=o([].push);e.exports=function(e,t){var n,o=i(e),c=0,u=[];for(n in o)!r(s,n)&&r(o,n)&&l(u,n);for(;t.length>c;)r(o,n=t[c++])&&(~a(u,n)||l(u,n));return u}},81956:(e,t,n)=>{var o=n(16324),r=n(80748);e.exports=Object.keys||function(e){return o(e,r)}},55296:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,r=o&&!n.call({1:2},1);t.f=r?function(e){var t=o(this,e);return!!t&&t.enumerable}:n},27674:(e,t,n)=>{var o=n(1702),r=n(19670),i=n(96077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=o(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e(n,o):n.__proto__=o,n}}():void 0)},92140:(e,t,n)=>{var o=n(46916),r=n(60614),i=n(70111),a=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&r(n=e.toString)&&!i(s=o(n,e)))return s;if(r(n=e.valueOf)&&!i(s=o(n,e)))return s;if("string"!==t&&r(n=e.toString)&&!i(s=o(n,e)))return s;throw a("Can't convert object to primitive value")}},53887:(e,t,n)=>{var o=n(35005),r=n(1702),i=n(8006),a=n(25181),s=n(19670),l=r([].concat);e.exports=o("Reflect","ownKeys")||function(e){var t=i.f(s(e)),n=a.f;return n?l(t,n(e)):t}},40857:(e,t,n)=>{var o=n(17854);e.exports=o},12534:e=>{e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},63702:(e,t,n)=>{var o=n(17854),r=n(2492),i=n(60614),a=n(54705),s=n(42788),l=n(5112),c=n(7871),u=n(83823),d=n(31913),p=n(7392),f=r&&r.prototype,h=l("species"),m=!1,g=i(o.PromiseRejectionEvent),v=a("Promise",(function(){var e=s(r),t=e!==String(r);if(!t&&66===p)return!0;if(d&&(!f.catch||!f.finally))return!0;if(!p||p<51||!/native code/.test(e)){var n=new r((function(e){e(1)})),o=function(e){e((function(){}),(function(){}))};if((n.constructor={})[h]=o,!(m=n.then((function(){}))instanceof o))return!0}return!t&&(c||u)&&!g}));e.exports={CONSTRUCTOR:v,REJECTION_EVENT:g,SUBCLASSING:m}},2492:(e,t,n)=>{var o=n(17854);e.exports=o.Promise},69478:(e,t,n)=>{var o=n(19670),r=n(70111),i=n(78523);e.exports=function(e,t){if(o(e),r(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},80612:(e,t,n)=>{var o=n(2492),r=n(17072),i=n(63702).CONSTRUCTOR;e.exports=i||!r((function(e){o.all(e).then(void 0,(function(){}))}))},2626:(e,t,n)=>{var o=n(3070).f;e.exports=function(e,t,n){n in e||o(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}},18572:e=>{var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},e.exports=t},97651:(e,t,n)=>{var o=n(46916),r=n(19670),i=n(60614),a=n(84326),s=n(22261),l=TypeError;e.exports=function(e,t){var n=e.exec;if(i(n)){var c=o(n,e,t);return null!==c&&r(c),c}if("RegExp"===a(e))return o(s,e,t);throw l("RegExp#exec called on incompatible receiver")}},22261:(e,t,n)=>{"use strict";var o,r,i=n(46916),a=n(1702),s=n(41340),l=n(67066),c=n(52999),u=n(72309),d=n(70030),p=n(29909).get,f=n(9441),h=n(38173),m=u("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,v=g,y=a("".charAt),b=a("".indexOf),w=a("".replace),S=a("".slice),P=(r=/b*/g,i(g,o=/a/,"a"),i(g,r,"a"),0!==o.lastIndex||0!==r.lastIndex),E=c.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];(P||x||E||f||h)&&(v=function(e){var t,n,o,r,a,c,u,f=this,h=p(f),D=s(e),C=h.raw;if(C)return C.lastIndex=f.lastIndex,t=i(v,C,D),f.lastIndex=C.lastIndex,t;var k=h.groups,O=E&&f.sticky,A=i(l,f),T=f.source,I=0,F=D;if(O&&(A=w(A,"y",""),-1===b(A,"g")&&(A+="g"),F=S(D,f.lastIndex),f.lastIndex>0&&(!f.multiline||f.multiline&&"\n"!==y(D,f.lastIndex-1))&&(T="(?: "+T+")",F=" "+F,I++),n=new RegExp("^(?:"+T+")",A)),x&&(n=new RegExp("^"+T+"$(?!\\s)",A)),P&&(o=f.lastIndex),r=i(g,O?n:f,F),O?r?(r.input=S(r.input,I),r[0]=S(r[0],I),r.index=f.lastIndex,f.lastIndex+=r[0].length):f.lastIndex=0:P&&r&&(f.lastIndex=f.global?r.index+r[0].length:o),x&&r&&r.length>1&&i(m,r[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(r[a]=void 0)})),r&&k)for(r.groups=c=d(null),a=0;a<k.length;a++)c[(u=k[a])[0]]=r[u[1]];return r}),e.exports=v},67066:(e,t,n)=>{"use strict";var o=n(19670);e.exports=function(){var e=o(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},34706:(e,t,n)=>{var o=n(46916),r=n(92597),i=n(47976),a=n(67066),s=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in s||r(e,"flags")||!i(s,e)?t:o(a,e)}},52999:(e,t,n)=>{var o=n(47293),r=n(17854).RegExp,i=o((function(){var e=r("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),a=i||o((function(){return!r("a","y").sticky})),s=i||o((function(){var e=r("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:i}},9441:(e,t,n)=>{var o=n(47293),r=n(17854).RegExp;e.exports=o((function(){var e=r(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},38173:(e,t,n)=>{var o=n(47293),r=n(17854).RegExp;e.exports=o((function(){var e=r("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},84488:(e,t,n)=>{var o=n(68554),r=TypeError;e.exports=function(e){if(o(e))throw r("Can't call method on "+e);return e}},81150:e=>{e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},17152:(e,t,n)=>{"use strict";var o,r=n(17854),i=n(22104),a=n(60614),s=n(89363),l=n(88113),c=n(50206),u=n(48053),d=r.Function,p=/MSIE .\./.test(l)||s&&((o=r.Bun.version.split(".")).length<3||0==o[0]&&(o[1]<3||3==o[1]&&0==o[2]));e.exports=function(e,t){var n=t?2:1;return p?function(o,r){var s=u(arguments.length,1)>n,l=a(o)?o:d(o),p=s?c(arguments,n):[],f=s?function(){i(l,this,p)}:l;return t?e(f,r):e(f)}:e}},96340:(e,t,n)=>{"use strict";var o=n(35005),r=n(3070),i=n(5112),a=n(19781),s=i("species");e.exports=function(e){var t=o(e),n=r.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},58003:(e,t,n)=>{var o=n(3070).f,r=n(92597),i=n(5112)("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!r(e,i)&&o(e,i,{configurable:!0,value:t})}},6200:(e,t,n)=>{var o=n(72309),r=n(69711),i=o("keys");e.exports=function(e){return i[e]||(i[e]=r(e))}},5465:(e,t,n)=>{var o=n(17854),r=n(13072),i="__core-js_shared__",a=o[i]||r(i,{});e.exports=a},72309:(e,t,n)=>{var o=n(31913),r=n(5465);(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.27.1",mode:o?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.27.1/LICENSE",source:"https://github.com/zloirock/core-js"})},36707:(e,t,n)=>{var o=n(19670),r=n(39483),i=n(68554),a=n(5112)("species");e.exports=function(e,t){var n,s=o(e).constructor;return void 0===s||i(n=o(s)[a])?t:r(n)}},28710:(e,t,n)=>{var o=n(1702),r=n(19303),i=n(41340),a=n(84488),s=o("".charAt),l=o("".charCodeAt),c=o("".slice),u=function(e){return function(t,n){var o,u,d=i(a(t)),p=r(n),f=d.length;return p<0||p>=f?e?"":void 0:(o=l(d,p))<55296||o>56319||p+1===f||(u=l(d,p+1))<56320||u>57343?e?s(d,p):o:e?c(d,p,p+2):u-56320+(o-55296<<10)+65536}};e.exports={codeAt:u(!1),charAt:u(!0)}},33197:(e,t,n)=>{"use strict";var o=n(1702),r=2147483647,i=/[^\0-\u007E]/,a=/[.\u3002\uFF0E\uFF61]/g,s="Overflow: input needs wider integers to process",l=RangeError,c=o(a.exec),u=Math.floor,d=String.fromCharCode,p=o("".charCodeAt),f=o([].join),h=o([].push),m=o("".replace),g=o("".split),v=o("".toLowerCase),y=function(e){return e+22+75*(e<26)},b=function(e,t,n){var o=0;for(e=n?u(e/700):e>>1,e+=u(e/t);e>455;)e=u(e/35),o+=36;return u(o+36*e/(e+38))},w=function(e){var t=[];e=function(e){for(var t=[],n=0,o=e.length;n<o;){var r=p(e,n++);if(r>=55296&&r<=56319&&n<o){var i=p(e,n++);56320==(64512&i)?h(t,((1023&r)<<10)+(1023&i)+65536):(h(t,r),n--)}else h(t,r)}return t}(e);var n,o,i=e.length,a=128,c=0,m=72;for(n=0;n<e.length;n++)(o=e[n])<128&&h(t,d(o));var g=t.length,v=g;for(g&&h(t,"-");v<i;){var w=r;for(n=0;n<e.length;n++)(o=e[n])>=a&&o<w&&(w=o);var S=v+1;if(w-a>u((r-c)/S))throw l(s);for(c+=(w-a)*S,a=w,n=0;n<e.length;n++){if((o=e[n])<a&&++c>r)throw l(s);if(o==a){for(var P=c,E=36;;){var x=E<=m?1:E>=m+26?26:E-m;if(P<x)break;var D=P-x,C=36-x;h(t,d(y(x+D%C))),P=u(D/C),E+=36}h(t,d(y(P))),m=b(c,S,v==g),c=0,v++}}c++,a++}return f(t,"")};e.exports=function(e){var t,n,o=[],r=g(m(v(e),a,"."),".");for(t=0;t<r.length;t++)n=r[t],h(o,c(i,n)?"xn--"+w(n):n);return f(o,".")}},38415:(e,t,n)=>{"use strict";var o=n(19303),r=n(41340),i=n(84488),a=RangeError;e.exports=function(e){var t=r(i(this)),n="",s=o(e);if(s<0||s==1/0)throw a("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(t+=t))1&s&&(n+=t);return n}},10365:(e,t,n)=>{"use strict";var o=n(53111).end,r=n(76091);e.exports=r("trimEnd")?function(){return o(this)}:"".trimEnd},76091:(e,t,n)=>{var o=n(76530).PROPER,r=n(47293),i=n(81361);e.exports=function(e){return r((function(){return!!i[e]()||"…"!=="…"[e]()||o&&i[e].name!==e}))}},33217:(e,t,n)=>{"use strict";var o=n(53111).start,r=n(76091);e.exports=r("trimStart")?function(){return o(this)}:"".trimStart},53111:(e,t,n)=>{var o=n(1702),r=n(84488),i=n(41340),a=n(81361),s=o("".replace),l="["+a+"]",c=RegExp("^"+l+l+"*"),u=RegExp(l+l+"*$"),d=function(e){return function(t){var n=i(r(t));return 1&e&&(n=s(n,c,"")),2&e&&(n=s(n,u,"")),n}};e.exports={start:d(1),end:d(2),trim:d(3)}},36293:(e,t,n)=>{var o=n(7392),r=n(47293);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&o&&o<41}))},20261:(e,t,n)=>{var o,r,i,a,s=n(17854),l=n(22104),c=n(49974),u=n(60614),d=n(92597),p=n(47293),f=n(60490),h=n(50206),m=n(80317),g=n(48053),v=n(6833),y=n(35268),b=s.setImmediate,w=s.clearImmediate,S=s.process,P=s.Dispatch,E=s.Function,x=s.MessageChannel,D=s.String,C=0,k={},O="onreadystatechange";try{o=s.location}catch(e){}var A=function(e){if(d(k,e)){var t=k[e];delete k[e],t()}},T=function(e){return function(){A(e)}},I=function(e){A(e.data)},F=function(e){s.postMessage(D(e),o.protocol+"//"+o.host)};b&&w||(b=function(e){g(arguments.length,1);var t=u(e)?e:E(e),n=h(arguments,1);return k[++C]=function(){l(t,void 0,n)},r(C),C},w=function(e){delete k[e]},y?r=function(e){S.nextTick(T(e))}:P&&P.now?r=function(e){P.now(T(e))}:x&&!v?(a=(i=new x).port2,i.port1.onmessage=I,r=c(a.postMessage,a)):s.addEventListener&&u(s.postMessage)&&!s.importScripts&&o&&"file:"!==o.protocol&&!p(F)?(r=F,s.addEventListener("message",I,!1)):r=O in m("script")?function(e){f.appendChild(m("script")).onreadystatechange=function(){f.removeChild(this),A(e)}}:function(e){setTimeout(T(e),0)}),e.exports={set:b,clear:w}},50863:(e,t,n)=>{var o=n(1702);e.exports=o(1..valueOf)},51400:(e,t,n)=>{var o=n(19303),r=Math.max,i=Math.min;e.exports=function(e,t){var n=o(e);return n<0?r(n+t,0):i(n,t)}},64599:(e,t,n)=>{var o=n(57593),r=TypeError;e.exports=function(e){var t=o(e,"number");if("number"==typeof t)throw r("Can't convert number to bigint");return BigInt(t)}},45656:(e,t,n)=>{var o=n(68361),r=n(84488);e.exports=function(e){return o(r(e))}},19303:(e,t,n)=>{var o=n(74758);e.exports=function(e){var t=+e;return t!=t||0===t?0:o(t)}},17466:(e,t,n)=>{var o=n(19303),r=Math.min;e.exports=function(e){return e>0?r(o(e),9007199254740991):0}},47908:(e,t,n)=>{var o=n(84488),r=Object;e.exports=function(e){return r(o(e))}},84590:(e,t,n)=>{var o=n(73002),r=RangeError;e.exports=function(e,t){var n=o(e);if(n%t)throw r("Wrong offset");return n}},73002:(e,t,n)=>{var o=n(19303),r=RangeError;e.exports=function(e){var t=o(e);if(t<0)throw r("The argument can't be less than 0");return t}},57593:(e,t,n)=>{var o=n(46916),r=n(70111),i=n(52190),a=n(58173),s=n(92140),l=n(5112),c=TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!r(e)||i(e))return e;var n,l=a(e,u);if(l){if(void 0===t&&(t="default"),n=o(l,e,t),!r(n)||i(n))return n;throw c("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},34948:(e,t,n)=>{var o=n(57593),r=n(52190);e.exports=function(e){var t=o(e,"string");return r(t)?t:t+""}},51694:(e,t,n)=>{var o={};o[n(5112)("toStringTag")]="z",e.exports="[object z]"===String(o)},41340:(e,t,n)=>{var o=n(70648),r=String;e.exports=function(e){if("Symbol"===o(e))throw TypeError("Cannot convert a Symbol value to a string");return r(e)}},66330:e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},69711:(e,t,n)=>{var o=n(1702),r=0,i=Math.random(),a=o(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++r+i,36)}},85143:(e,t,n)=>{var o=n(47293),r=n(5112),i=n(31913),a=r("iterator");e.exports=!o((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,o){t.delete("b"),n+=o+e})),i&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},43307:(e,t,n)=>{var o=n(36293);e.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:(e,t,n)=>{var o=n(19781),r=n(47293);e.exports=o&&r((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},48053:e=>{var t=TypeError;e.exports=function(e,n){if(e<n)throw t("Not enough arguments");return e}},94811:(e,t,n)=>{var o=n(17854),r=n(60614),i=o.WeakMap;e.exports=r(i)&&/native code/.test(String(i))},26800:(e,t,n)=>{var o=n(40857),r=n(92597),i=n(6061),a=n(3070).f;e.exports=function(e){var t=o.Symbol||(o.Symbol={});r(t,e)||a(t,e,{value:i.f(e)})}},6061:(e,t,n)=>{var o=n(5112);t.f=o},5112:(e,t,n)=>{var o=n(17854),r=n(72309),i=n(92597),a=n(69711),s=n(36293),l=n(43307),c=r("wks"),u=o.Symbol,d=u&&u.for,p=l?u:u&&u.withoutSetter||a;e.exports=function(e){if(!i(c,e)||!s&&"string"!=typeof c[e]){var t="Symbol."+e;s&&i(u,e)?c[e]=u[e]:c[e]=l&&d?d(t):p(t)}return c[e]}},81361:e=>{e.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},86535:(e,t,n)=>{"use strict";var o=n(82109),r=n(6790),i=n(19662),a=n(47908),s=n(26244),l=n(65417);o({target:"Array",proto:!0},{flatMap:function(e){var t,n=a(this),o=s(n);return i(e),(t=l(n,0)).length=r(t,n,n,o,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},84944:(e,t,n)=>{"use strict";var o=n(82109),r=n(6790),i=n(47908),a=n(26244),s=n(19303),l=n(65417);o({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=i(this),n=a(t),o=l(t,0);return o.length=r(o,t,t,n,0,void 0===e?1:s(e)),o}})},66992:(e,t,n)=>{"use strict";var o=n(45656),r=n(51223),i=n(97497),a=n(29909),s=n(3070).f,l=n(51656),c=n(76178),u=n(31913),d=n(19781),p="Array Iterator",f=a.set,h=a.getterFor(p);e.exports=l(Array,"Array",(function(e,t){f(this,{type:p,target:o(e),index:0,kind:t})}),(function(){var e=h(this),t=e.target,n=e.kind,o=e.index++;return!t||o>=t.length?(e.target=void 0,c(void 0,!0)):c("keys"==n?o:"values"==n?t[o]:[o,t[o]],!1)}),"values");var m=i.Arguments=i.Array;if(r("keys"),r("values"),r("entries"),!u&&d&&"values"!==m.name)try{s(m,"name",{value:"values"})}catch(e){}},2707:(e,t,n)=>{"use strict";var o=n(82109),r=n(1702),i=n(19662),a=n(47908),s=n(26244),l=n(85117),c=n(41340),u=n(47293),d=n(94362),p=n(9341),f=n(68886),h=n(30256),m=n(7392),g=n(98008),v=[],y=r(v.sort),b=r(v.push),w=u((function(){v.sort(void 0)})),S=u((function(){v.sort(null)})),P=p("sort"),E=!u((function(){if(m)return m<70;if(!(f&&f>3)){if(h)return!0;if(g)return g<603;var e,t,n,o,r="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(o=0;o<47;o++)v.push({k:t+o,v:n})}for(v.sort((function(e,t){return t.v-e.v})),o=0;o<v.length;o++)t=v[o].k.charAt(0),r.charAt(r.length-1)!==t&&(r+=t);return"DGBEFHACIJK"!==r}}));o({target:"Array",proto:!0,forced:w||!S||!P||!E},{sort:function(e){void 0!==e&&i(e);var t=a(this);if(E)return void 0===e?y(t):y(t,e);var n,o,r=[],u=s(t);for(o=0;o<u;o++)o in t&&b(r,t[o]);for(d(r,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:c(t)>c(n)?1:-1}}(e)),n=s(r),o=0;o<n;)t[o]=r[o++];for(;o<u;)l(t,o++);return t}})},99244:(e,t,n)=>{n(51223)("flatMap")},33792:(e,t,n)=>{n(51223)("flat")},61874:(e,t,n)=>{var o=n(82109),r=n(2814);o({target:"Number",stat:!0,forced:Number.parseFloat!=r},{parseFloat:r})},9494:(e,t,n)=>{var o=n(82109),r=n(83009);o({target:"Number",stat:!0,forced:Number.parseInt!=r},{parseInt:r})},56977:(e,t,n)=>{"use strict";var o=n(82109),r=n(1702),i=n(19303),a=n(50863),s=n(38415),l=n(47293),c=RangeError,u=String,d=Math.floor,p=r(s),f=r("".slice),h=r(1..toFixed),m=function(e,t,n){return 0===t?n:t%2==1?m(e,t-1,n*e):m(e*e,t/2,n)},g=function(e,t,n){for(var o=-1,r=n;++o<6;)r+=t*e[o],e[o]=r%1e7,r=d(r/1e7)},v=function(e,t){for(var n=6,o=0;--n>=0;)o+=e[n],e[n]=d(o/t),o=o%t*1e7},y=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var o=u(e[t]);n=""===n?o:n+p("0",7-o.length)+o}return n};o({target:"Number",proto:!0,forced:l((function(){return"0.000"!==h(8e-5,3)||"1"!==h(.9,0)||"1.25"!==h(1.255,2)||"1000000000000000128"!==h(0xde0b6b3a7640080,0)}))||!l((function(){h({})}))},{toFixed:function(e){var t,n,o,r,s=a(this),l=i(e),d=[0,0,0,0,0,0],h="",b="0";if(l<0||l>20)throw c("Incorrect fraction digits");if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return u(s);if(s<0&&(h="-",s=-s),s>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(s*m(2,69,1))-69)<0?s*m(2,-t,1):s/m(2,t,1),n*=4503599627370496,(t=52-t)>0){for(g(d,0,n),o=l;o>=7;)g(d,1e7,0),o-=7;for(g(d,m(10,o,1),0),o=t-1;o>=23;)v(d,1<<23),o-=23;v(d,1<<o),g(d,1,1),v(d,2),b=y(d)}else g(d,0,n),g(d,1<<-t,0),b=y(d)+p("0",l);return b=l>0?h+((r=b.length)<=l?"0."+p("0",l-r)+b:f(b,0,r-l)+"."+f(b,r-l)):h+b}})},19601:(e,t,n)=>{var o=n(82109),r=n(21574);o({target:"Object",stat:!0,arity:2,forced:Object.assign!==r},{assign:r})},38559:(e,t,n)=>{var o=n(82109),r=n(20408),i=n(86135);o({target:"Object",stat:!0},{fromEntries:function(e){var t={};return r(e,(function(e,n){i(t,e,n)}),{AS_ENTRIES:!0}),t}})},54678:(e,t,n)=>{var o=n(82109),r=n(2814);o({global:!0,forced:parseFloat!=r},{parseFloat:r})},91058:(e,t,n)=>{var o=n(82109),r=n(83009);o({global:!0,forced:parseInt!=r},{parseInt:r})},70821:(e,t,n)=>{"use strict";var o=n(82109),r=n(46916),i=n(19662),a=n(78523),s=n(12534),l=n(20408);o({target:"Promise",stat:!0,forced:n(80612)},{all:function(e){var t=this,n=a.f(t),o=n.resolve,c=n.reject,u=s((function(){var n=i(t.resolve),a=[],s=0,u=1;l(e,(function(e){var i=s++,l=!1;u++,r(n,t,e).then((function(e){l||(l=!0,a[i]=e,--u||o(a))}),c)})),--u||o(a)}));return u.error&&c(u.value),n.promise}})},94164:(e,t,n)=>{"use strict";var o=n(82109),r=n(31913),i=n(63702).CONSTRUCTOR,a=n(2492),s=n(35005),l=n(60614),c=n(98052),u=a&&a.prototype;if(o({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(e){return this.then(void 0,e)}}),!r&&l(a)){var d=s("Promise").prototype.catch;u.catch!==d&&c(u,"catch",d,{unsafe:!0})}},43401:(e,t,n)=>{"use strict";var o,r,i,a=n(82109),s=n(31913),l=n(35268),c=n(17854),u=n(46916),d=n(98052),p=n(27674),f=n(58003),h=n(96340),m=n(19662),g=n(60614),v=n(70111),y=n(25787),b=n(36707),w=n(20261).set,S=n(95948),P=n(842),E=n(12534),x=n(18572),D=n(29909),C=n(2492),k=n(63702),O=n(78523),A="Promise",T=k.CONSTRUCTOR,I=k.REJECTION_EVENT,F=k.SUBCLASSING,M=D.getterFor(A),_=D.set,N=C&&C.prototype,R=C,L=N,B=c.TypeError,j=c.document,z=c.process,K=O.f,Z=K,U=!!(j&&j.createEvent&&c.dispatchEvent),V="unhandledrejection",G=function(e){var t;return!(!v(e)||!g(t=e.then))&&t},W=function(e,t){var n,o,r,i=t.value,a=1==t.state,s=a?e.ok:e.fail,l=e.resolve,c=e.reject,d=e.domain;try{s?(a||(2===t.rejection&&Y(t),t.rejection=1),!0===s?n=i:(d&&d.enter(),n=s(i),d&&(d.exit(),r=!0)),n===e.promise?c(B("Promise-chain cycle")):(o=G(n))?u(o,n,l,c):l(n)):c(i)}catch(e){d&&!r&&d.exit(),c(e)}},q=function(e,t){e.notified||(e.notified=!0,S((function(){for(var n,o=e.reactions;n=o.get();)W(n,e);e.notified=!1,t&&!e.rejection&&$(e)})))},H=function(e,t,n){var o,r;U?((o=j.createEvent("Event")).promise=t,o.reason=n,o.initEvent(e,!1,!0),c.dispatchEvent(o)):o={promise:t,reason:n},!I&&(r=c["on"+e])?r(o):e===V&&P("Unhandled promise rejection",n)},$=function(e){u(w,c,(function(){var t,n=e.facade,o=e.value;if(X(e)&&(t=E((function(){l?z.emit("unhandledRejection",o,n):H(V,n,o)})),e.rejection=l||X(e)?2:1,t.error))throw t.value}))},X=function(e){return 1!==e.rejection&&!e.parent},Y=function(e){u(w,c,(function(){var t=e.facade;l?z.emit("rejectionHandled",t):H("rejectionhandled",t,e.value)}))},J=function(e,t,n){return function(o){e(t,o,n)}},Q=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,q(e,!0))},ee=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw B("Promise can't be resolved itself");var o=G(t);o?S((function(){var n={done:!1};try{u(o,t,J(ee,n,e),J(Q,n,e))}catch(t){Q(n,t,e)}})):(e.value=t,e.state=1,q(e,!1))}catch(t){Q({done:!1},t,e)}}};if(T&&(L=(R=function(e){y(this,L),m(e),u(o,this);var t=M(this);try{e(J(ee,t),J(Q,t))}catch(e){Q(t,e)}}).prototype,(o=function(e){_(this,{type:A,done:!1,notified:!1,parent:!1,reactions:new x,rejection:!1,state:0,value:void 0})}).prototype=d(L,"then",(function(e,t){var n=M(this),o=K(b(this,R));return n.parent=!0,o.ok=!g(e)||e,o.fail=g(t)&&t,o.domain=l?z.domain:void 0,0==n.state?n.reactions.add(o):S((function(){W(o,n)})),o.promise})),r=function(){var e=new o,t=M(e);this.promise=e,this.resolve=J(ee,t),this.reject=J(Q,t)},O.f=K=function(e){return e===R||undefined===e?new r(e):Z(e)},!s&&g(C)&&N!==Object.prototype)){i=N.then,F||d(N,"then",(function(e,t){var n=this;return new R((function(e,t){u(i,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete N.constructor}catch(e){}p&&p(N,L)}a({global:!0,constructor:!0,wrap:!0,forced:T},{Promise:R}),f(R,A,!1,!0),h(A)},17727:(e,t,n)=>{"use strict";var o=n(82109),r=n(31913),i=n(2492),a=n(47293),s=n(35005),l=n(60614),c=n(36707),u=n(69478),d=n(98052),p=i&&i.prototype;if(o({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){p.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=c(this,s("Promise")),n=l(e);return this.then(n?function(n){return u(t,e()).then((function(){return n}))}:e,n?function(n){return u(t,e()).then((function(){throw n}))}:e)}}),!r&&l(i)){var f=s("Promise").prototype.finally;p.finally!==f&&d(p,"finally",f,{unsafe:!0})}},88674:(e,t,n)=>{n(43401),n(70821),n(94164),n(6027),n(60683),n(96294)},6027:(e,t,n)=>{"use strict";var o=n(82109),r=n(46916),i=n(19662),a=n(78523),s=n(12534),l=n(20408);o({target:"Promise",stat:!0,forced:n(80612)},{race:function(e){var t=this,n=a.f(t),o=n.reject,c=s((function(){var a=i(t.resolve);l(e,(function(e){r(a,t,e).then(n.resolve,o)}))}));return c.error&&o(c.value),n.promise}})},60683:(e,t,n)=>{"use strict";var o=n(82109),r=n(46916),i=n(78523);o({target:"Promise",stat:!0,forced:n(63702).CONSTRUCTOR},{reject:function(e){var t=i.f(this);return r(t.reject,void 0,e),t.promise}})},96294:(e,t,n)=>{"use strict";var o=n(82109),r=n(35005),i=n(31913),a=n(2492),s=n(63702).CONSTRUCTOR,l=n(69478),c=r("Promise"),u=i&&!s;o({target:"Promise",stat:!0,forced:i||s},{resolve:function(e){return l(u&&this===c?a:this,e)}})},83593:(e,t,n)=>{var o=n(82109),r=n(46916),i=n(19670),a=n(70111),s=n(45032),l=n(47293),c=n(3070),u=n(31236),d=n(79518),p=n(79114);o({target:"Reflect",stat:!0,forced:l((function(){var e=function(){},t=c.f(new e,"a",{configurable:!0});return!1!==Reflect.set(e.prototype,"a",1,t)}))},{set:function e(t,n,o){var l,f,h,m=arguments.length<4?t:arguments[3],g=u.f(i(t),n);if(!g){if(a(f=d(t)))return e(f,n,o,m);g=p(0)}if(s(g)){if(!1===g.writable||!a(m))return!1;if(l=u.f(m,n)){if(l.get||l.set||!1===l.writable)return!1;l.value=o,c.f(m,n,l)}else c.f(m,n,p(0,o))}else{if(void 0===(h=g.set))return!1;r(h,m,o)}return!0}})},24603:(e,t,n)=>{var o=n(19781),r=n(17854),i=n(1702),a=n(54705),s=n(79587),l=n(68880),c=n(8006).f,u=n(47976),d=n(47850),p=n(41340),f=n(34706),h=n(52999),m=n(2626),g=n(98052),v=n(47293),y=n(92597),b=n(29909).enforce,w=n(96340),S=n(5112),P=n(9441),E=n(38173),x=S("match"),D=r.RegExp,C=D.prototype,k=r.SyntaxError,O=i(C.exec),A=i("".charAt),T=i("".replace),I=i("".indexOf),F=i("".slice),M=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,_=/a/g,N=/a/g,R=new D(_)!==_,L=h.MISSED_STICKY,B=h.UNSUPPORTED_Y,j=o&&(!R||L||P||E||v((function(){return N[x]=!1,D(_)!=_||D(N)==N||"/a/i"!=D(_,"i")})));if(a("RegExp",j)){for(var z=function(e,t){var n,o,r,i,a,c,h=u(C,this),m=d(e),g=void 0===t,v=[],w=e;if(!h&&m&&g&&e.constructor===z)return e;if((m||u(C,e))&&(e=e.source,g&&(t=f(w))),e=void 0===e?"":p(e),t=void 0===t?"":p(t),w=e,P&&"dotAll"in _&&(o=!!t&&I(t,"s")>-1)&&(t=T(t,/s/g,"")),n=t,L&&"sticky"in _&&(r=!!t&&I(t,"y")>-1)&&B&&(t=T(t,/y/g,"")),E&&(i=function(e){for(var t,n=e.length,o=0,r="",i=[],a={},s=!1,l=!1,c=0,u="";o<=n;o++){if("\\"===(t=A(e,o)))t+=A(e,++o);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:O(M,F(e,o+1))&&(o+=2,l=!0),r+=t,c++;continue;case">"===t&&l:if(""===u||y(a,u))throw new k("Invalid capture group name");a[u]=!0,i[i.length]=[u,c],l=!1,u="";continue}l?u+=t:r+=t}return[r,i]}(e),e=i[0],v=i[1]),a=s(D(e,t),h?this:C,z),(o||r||v.length)&&(c=b(a),o&&(c.dotAll=!0,c.raw=z(function(e){for(var t,n=e.length,o=0,r="",i=!1;o<=n;o++)"\\"!==(t=A(e,o))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),r+=t):r+="[\\s\\S]":r+=t+A(e,++o);return r}(e),n)),r&&(c.sticky=!0),v.length&&(c.groups=v)),e!==w)try{l(a,"source",""===w?"(?:)":w)}catch(e){}return a},K=c(D),Z=0;K.length>Z;)m(z,D,K[Z++]);C.constructor=z,z.prototype=C,g(r,"RegExp",z,{constructor:!0})}w("RegExp")},74916:(e,t,n)=>{"use strict";var o=n(82109),r=n(22261);o({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},92087:(e,t,n)=>{var o=n(17854),r=n(19781),i=n(47045),a=n(67066),s=n(47293),l=o.RegExp,c=l.prototype;r&&s((function(){var e=!0;try{l(".","d")}catch(t){e=!1}var t={},n="",o=e?"dgimsy":"gimsy",r=function(e,o){Object.defineProperty(t,e,{get:function(){return n+=o,!0}})},i={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in e&&(i.hasIndices="d"),i)r(a,i[a]);return Object.getOwnPropertyDescriptor(c,"flags").get.call(t)!==o||n!==o}))&&i(c,"flags",{configurable:!0,get:a})},39714:(e,t,n)=>{"use strict";var o=n(76530).PROPER,r=n(98052),i=n(19670),a=n(41340),s=n(47293),l=n(34706),c="toString",u=RegExp.prototype.toString,d=s((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),p=o&&u.name!=c;(d||p)&&r(RegExp.prototype,c,(function(){var e=i(this);return"/"+a(e.source)+"/"+a(l(e))}),{unsafe:!0})},27852:(e,t,n)=>{"use strict";var o,r=n(82109),i=n(21470),a=n(31236).f,s=n(17466),l=n(41340),c=n(3929),u=n(84488),d=n(84964),p=n(31913),f=i("".endsWith),h=i("".slice),m=Math.min,g=d("endsWith");r({target:"String",proto:!0,forced:!!(p||g||(o=a(String.prototype,"endsWith"),!o||o.writable))&&!g},{endsWith:function(e){var t=l(u(this));c(e);var n=arguments.length>1?arguments[1]:void 0,o=t.length,r=void 0===n?o:m(s(n),o),i=l(e);return f?f(t,i,r):h(t,r-i.length,r)===i}})},32023:(e,t,n)=>{"use strict";var o=n(82109),r=n(1702),i=n(3929),a=n(84488),s=n(41340),l=n(84964),c=r("".indexOf);o({target:"String",proto:!0,forced:!l("includes")},{includes:function(e){return!!~c(s(a(this)),s(i(e)),arguments.length>1?arguments[1]:void 0)}})},78783:(e,t,n)=>{"use strict";var o=n(28710).charAt,r=n(41340),i=n(29909),a=n(51656),s=n(76178),l="String Iterator",c=i.set,u=i.getterFor(l);a(String,"String",(function(e){c(this,{type:l,string:r(e),index:0})}),(function(){var e,t=u(this),n=t.string,r=t.index;return r>=n.length?s(void 0,!0):(e=o(n,r),t.index+=e.length,s(e,!1))}))},4723:(e,t,n)=>{"use strict";var o=n(46916),r=n(27007),i=n(19670),a=n(68554),s=n(17466),l=n(41340),c=n(84488),u=n(58173),d=n(31530),p=n(97651);r("match",(function(e,t,n){return[function(t){var n=c(this),r=a(t)?void 0:u(t,e);return r?o(r,t,n):new RegExp(t)[e](l(n))},function(e){var o=i(this),r=l(e),a=n(t,o,r);if(a.done)return a.value;if(!o.global)return p(o,r);var c=o.unicode;o.lastIndex=0;for(var u,f=[],h=0;null!==(u=p(o,r));){var m=l(u[0]);f[h]=m,""===m&&(o.lastIndex=d(r,s(o.lastIndex),c)),h++}return 0===h?null:f}]}))},15306:(e,t,n)=>{"use strict";var o=n(22104),r=n(46916),i=n(1702),a=n(27007),s=n(47293),l=n(19670),c=n(60614),u=n(68554),d=n(19303),p=n(17466),f=n(41340),h=n(84488),m=n(31530),g=n(58173),v=n(10647),y=n(97651),b=n(5112)("replace"),w=Math.max,S=Math.min,P=i([].concat),E=i([].push),x=i("".indexOf),D=i("".slice),C="$0"==="a".replace(/./,"$0"),k=!!/./[b]&&""===/./[b]("a","$0");a("replace",(function(e,t,n){var i=k?"$":"$0";return[function(e,n){var o=h(this),i=u(e)?void 0:g(e,b);return i?r(i,e,o,n):r(t,f(o),e,n)},function(e,r){var a=l(this),s=f(e);if("string"==typeof r&&-1===x(r,i)&&-1===x(r,"$<")){var u=n(t,a,s,r);if(u.done)return u.value}var h=c(r);h||(r=f(r));var g=a.global;if(g){var b=a.unicode;a.lastIndex=0}for(var C=[];;){var k=y(a,s);if(null===k)break;if(E(C,k),!g)break;""===f(k[0])&&(a.lastIndex=m(s,p(a.lastIndex),b))}for(var O,A="",T=0,I=0;I<C.length;I++){for(var F=f((k=C[I])[0]),M=w(S(d(k.index),s.length),0),_=[],N=1;N<k.length;N++)E(_,void 0===(O=k[N])?O:String(O));var R=k.groups;if(h){var L=P([F],_,M,s);void 0!==R&&E(L,R);var B=f(o(r,void 0,L))}else B=v(F,s,M,_,R,r);M>=T&&(A+=D(s,T,M)+B,T=M+F.length)}return A+D(s,T)}]}),!!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!C||k)},64765:(e,t,n)=>{"use strict";var o=n(46916),r=n(27007),i=n(19670),a=n(68554),s=n(84488),l=n(81150),c=n(41340),u=n(58173),d=n(97651);r("search",(function(e,t,n){return[function(t){var n=s(this),r=a(t)?void 0:u(t,e);return r?o(r,t,n):new RegExp(t)[e](c(n))},function(e){var o=i(this),r=c(e),a=n(t,o,r);if(a.done)return a.value;var s=o.lastIndex;l(s,0)||(o.lastIndex=0);var u=d(o,r);return l(o.lastIndex,s)||(o.lastIndex=s),null===u?-1:u.index}]}))},23123:(e,t,n)=>{"use strict";var o=n(22104),r=n(46916),i=n(1702),a=n(27007),s=n(19670),l=n(68554),c=n(47850),u=n(84488),d=n(36707),p=n(31530),f=n(17466),h=n(41340),m=n(58173),g=n(41589),v=n(97651),y=n(22261),b=n(52999),w=n(47293),S=b.UNSUPPORTED_Y,P=4294967295,E=Math.min,x=[].push,D=i(/./.exec),C=i(x),k=i("".slice);a("split",(function(e,t,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var i=h(u(this)),a=void 0===n?P:n>>>0;if(0===a)return[];if(void 0===e)return[i];if(!c(e))return r(t,i,e,a);for(var s,l,d,p=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),m=0,v=new RegExp(e.source,f+"g");(s=r(y,v,i))&&!((l=v.lastIndex)>m&&(C(p,k(i,m,s.index)),s.length>1&&s.index<i.length&&o(x,p,g(s,1)),d=s[0].length,m=l,p.length>=a));)v.lastIndex===s.index&&v.lastIndex++;return m===i.length?!d&&D(v,"")||C(p,""):C(p,k(i,m)),p.length>a?g(p,0,a):p}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:r(t,this,e,n)}:t,[function(t,n){var o=u(this),a=l(t)?void 0:m(t,e);return a?r(a,t,o,n):r(i,h(o),t,n)},function(e,o){var r=s(this),a=h(e),l=n(i,r,a,o,i!==t);if(l.done)return l.value;var c=d(r,RegExp),u=r.unicode,m=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(S?"g":"y"),g=new c(S?"^(?:"+r.source+")":r,m),y=void 0===o?P:o>>>0;if(0===y)return[];if(0===a.length)return null===v(g,a)?[a]:[];for(var b=0,w=0,x=[];w<a.length;){g.lastIndex=S?0:w;var D,O=v(g,S?k(a,w):a);if(null===O||(D=E(f(g.lastIndex+(S?w:0)),a.length))===b)w=p(a,w,u);else{if(C(x,k(a,b,w)),x.length===y)return x;for(var A=1;A<=O.length-1;A++)if(C(x,O[A]),x.length===y)return x;w=b=D}}return C(x,k(a,b)),x}]}),!!w((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),S)},23157:(e,t,n)=>{"use strict";var o,r=n(82109),i=n(21470),a=n(31236).f,s=n(17466),l=n(41340),c=n(3929),u=n(84488),d=n(84964),p=n(31913),f=i("".startsWith),h=i("".slice),m=Math.min,g=d("startsWith");r({target:"String",proto:!0,forced:!!(p||g||(o=a(String.prototype,"startsWith"),!o||o.writable))&&!g},{startsWith:function(e){var t=l(u(this));c(e);var n=s(m(arguments.length>1?arguments[1]:void 0,t.length)),o=l(e);return f?f(t,o,n):h(t,n,n+o.length)===o}})},48702:(e,t,n)=>{n(83462);var o=n(82109),r=n(10365);o({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==r},{trimEnd:r})},99967:(e,t,n)=>{var o=n(82109),r=n(33217);o({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==r},{trimLeft:r})},83462:(e,t,n)=>{var o=n(82109),r=n(10365);o({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==r},{trimRight:r})},55674:(e,t,n)=>{n(99967);var o=n(82109),r=n(33217);o({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==r},{trimStart:r})},72443:(e,t,n)=>{n(26800)("asyncIterator")},41817:(e,t,n)=>{"use strict";var o=n(82109),r=n(19781),i=n(17854),a=n(1702),s=n(92597),l=n(60614),c=n(47976),u=n(41340),d=n(3070).f,p=n(99920),f=i.Symbol,h=f&&f.prototype;if(r&&l(f)&&(!("description"in h)||void 0!==f().description)){var m={},g=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:u(arguments[0]),t=c(h,this)?new f(e):void 0===e?f():f(e);return""===e&&(m[t]=!0),t};p(g,f),g.prototype=h,h.constructor=g;var v="Symbol(test)"==String(f("test")),y=a(h.valueOf),b=a(h.toString),w=/^Symbol\((.*)\)[^)]+$/,S=a("".replace),P=a("".slice);d(h,"description",{configurable:!0,get:function(){var e=y(this);if(s(m,e))return"";var t=b(e),n=v?P(t,7,-1):S(t,w,"$1");return""===n?void 0:n}}),o({global:!0,constructor:!0,forced:!0},{Symbol:g})}},69007:(e,t,n)=>{n(26800)("match")},83510:(e,t,n)=>{n(26800)("replace")},41840:(e,t,n)=>{n(26800)("search")},32159:(e,t,n)=>{n(26800)("split")},33105:(e,t,n)=>{"use strict";var o=n(90260),r=n(21285),i=n(64599),a=n(70648),s=n(46916),l=n(1702),c=n(47293),u=o.aTypedArray,d=o.exportTypedArrayMethod,p=l("".slice);d("fill",(function(e){var t=arguments.length;u(this);var n="Big"===p(a(this),0,3)?i(e):+e;return s(r,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})))},3462:(e,t,n)=>{"use strict";var o=n(17854),r=n(46916),i=n(90260),a=n(26244),s=n(84590),l=n(47908),c=n(47293),u=o.RangeError,d=o.Int8Array,p=d&&d.prototype,f=p&&p.set,h=i.aTypedArray,m=i.exportTypedArrayMethod,g=!c((function(){var e=new Uint8ClampedArray(2);return r(f,e,{length:1,0:3},1),3!==e[1]})),v=g&&i.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new d(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));m("set",(function(e){h(this);var t=s(arguments.length>1?arguments[1]:void 0,1),n=l(e);if(g)return r(f,this,n,t);var o=this.length,i=a(n),c=0;if(i+t>o)throw u("Wrong length");for(;c<i;)this[t+c]=n[c++]}),!g||v)},33824:(e,t,n)=>{"use strict";var o=n(17854),r=n(21470),i=n(47293),a=n(19662),s=n(94362),l=n(90260),c=n(68886),u=n(30256),d=n(7392),p=n(98008),f=l.aTypedArray,h=l.exportTypedArrayMethod,m=o.Uint16Array,g=m&&r(m.prototype.sort),v=!(!g||i((function(){g(new m(2),null)}))&&i((function(){g(new m(2),{})}))),y=!!g&&!i((function(){if(d)return d<74;if(c)return c<67;if(u)return!0;if(p)return p<602;var e,t,n=new m(516),o=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,o[e]=e-2*t+3;for(g(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==o[e])return!0}));h("sort",(function(e){return void 0!==e&&a(e),y?g(this,e):s(f(this),function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!y||v)},12974:(e,t,n)=>{"use strict";var o=n(17854),r=n(22104),i=n(90260),a=n(47293),s=n(50206),l=o.Int8Array,c=i.aTypedArray,u=i.exportTypedArrayMethod,d=[].toLocaleString,p=!!l&&a((function(){d.call(new l(1))}));u("toLocaleString",(function(){return r(d,p?s(c(this)):c(this),s(arguments))}),a((function(){return[1,2].toLocaleString()!=new l([1,2]).toLocaleString()}))||!a((function(){l.prototype.toLocaleString.call([1,2])})))},41202:(e,t,n)=>{"use strict";var o,r=n(76677),i=n(17854),a=n(1702),s=n(89190),l=n(62423),c=n(77710),u=n(29320),d=n(70111),p=n(29909).enforce,f=n(47293),h=n(94811),m=Object,g=Array.isArray,v=m.isExtensible,y=m.isFrozen,b=m.isSealed,w=m.freeze,S=m.seal,P={},E={},x=!i.ActiveXObject&&"ActiveXObject"in i,D=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},C=c("WeakMap",D,u),k=C.prototype,O=a(k.set);if(h)if(x){o=u.getConstructor(D,"WeakMap",!0),l.enable();var A=a(k.delete),T=a(k.has),I=a(k.get);s(k,{delete:function(e){if(d(e)&&!v(e)){var t=p(this);return t.frozen||(t.frozen=new o),A(this,e)||t.frozen.delete(e)}return A(this,e)},has:function(e){if(d(e)&&!v(e)){var t=p(this);return t.frozen||(t.frozen=new o),T(this,e)||t.frozen.has(e)}return T(this,e)},get:function(e){if(d(e)&&!v(e)){var t=p(this);return t.frozen||(t.frozen=new o),T(this,e)?I(this,e):t.frozen.get(e)}return I(this,e)},set:function(e,t){if(d(e)&&!v(e)){var n=p(this);n.frozen||(n.frozen=new o),T(this,e)?O(this,e,t):n.frozen.set(e,t)}else O(this,e,t);return this}})}else r&&f((function(){var e=w([]);return O(new C,e,1),!y(e)}))&&s(k,{set:function(e,t){var n;return g(e)&&(y(e)?n=P:b(e)&&(n=E)),O(this,e,t),n==P&&w(e),n==E&&S(e),this}})},4129:(e,t,n)=>{n(41202)},11091:(e,t,n)=>{var o=n(82109),r=n(17854),i=n(20261).clear;o({global:!0,bind:!0,enumerable:!0,forced:r.clearImmediate!==i},{clearImmediate:i})},33948:(e,t,n)=>{var o=n(17854),r=n(48324),i=n(98509),a=n(66992),s=n(68880),l=n(5112),c=l("iterator"),u=l("toStringTag"),d=a.values,p=function(e,t){if(e){if(e[c]!==d)try{s(e,c,d)}catch(t){e[c]=d}if(e[u]||s(e,u,t),r[t])for(var n in a)if(e[n]!==a[n])try{s(e,n,a[n])}catch(t){e[n]=a[n]}}};for(var f in r)p(o[f]&&o[f].prototype,f);p(i,"DOMTokenList")},84633:(e,t,n)=>{n(11091),n(12986)},85844:(e,t,n)=>{var o=n(82109),r=n(17854),i=n(95948),a=n(19662),s=n(48053),l=n(35268),c=r.process;o({global:!0,enumerable:!0,dontCallGetSet:!0},{queueMicrotask:function(e){s(arguments.length,1),a(e);var t=l&&c.domain;i(t?t.bind(e):e)}})},12986:(e,t,n)=>{var o=n(82109),r=n(17854),i=n(20261).set,a=n(17152),s=r.setImmediate?a(i,!1):i;o({global:!0,bind:!0,enumerable:!0,forced:r.setImmediate!==s},{setImmediate:s})},65556:(e,t,n)=>{"use strict";n(66992);var o=n(82109),r=n(17854),i=n(46916),a=n(1702),s=n(19781),l=n(85143),c=n(98052),u=n(89190),d=n(58003),p=n(63061),f=n(29909),h=n(25787),m=n(60614),g=n(92597),v=n(49974),y=n(70648),b=n(19670),w=n(70111),S=n(41340),P=n(70030),E=n(79114),x=n(18554),D=n(71246),C=n(48053),k=n(5112),O=n(94362),A=k("iterator"),T="URLSearchParams",I="URLSearchParamsIterator",F=f.set,M=f.getterFor(T),_=f.getterFor(I),N=Object.getOwnPropertyDescriptor,R=function(e){if(!s)return r[e];var t=N(r,e);return t&&t.value},L=R("fetch"),B=R("Request"),j=R("Headers"),z=B&&B.prototype,K=j&&j.prototype,Z=r.RegExp,U=r.TypeError,V=r.decodeURIComponent,G=r.encodeURIComponent,W=a("".charAt),q=a([].join),H=a([].push),$=a("".replace),X=a([].shift),Y=a([].splice),J=a("".split),Q=a("".slice),ee=/\+/g,te=Array(4),ne=function(e){return te[e-1]||(te[e-1]=Z("((?:%[\\da-f]{2}){"+e+"})","gi"))},oe=function(e){try{return V(e)}catch(t){return e}},re=function(e){var t=$(e,ee," "),n=4;try{return V(t)}catch(e){for(;n;)t=$(t,ne(n--),oe);return t}},ie=/[!'()~]|%20/g,ae={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},se=function(e){return ae[e]},le=function(e){return $(G(e),ie,se)},ce=p((function(e,t){F(this,{type:I,iterator:x(M(e).entries),kind:t})}),"Iterator",(function(){var e=_(this),t=e.kind,n=e.iterator.next(),o=n.value;return n.done||(n.value="keys"===t?o.key:"values"===t?o.value:[o.key,o.value]),n}),!0),ue=function(e){this.entries=[],this.url=null,void 0!==e&&(w(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===W(e,0)?Q(e,1):e:S(e)))};ue.prototype={type:T,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,o,r,a,s,l,c=D(e);if(c)for(n=(t=x(e,c)).next;!(o=i(n,t)).done;){if(a=(r=x(b(o.value))).next,(s=i(a,r)).done||(l=i(a,r)).done||!i(a,r).done)throw U("Expected sequence with length 2");H(this.entries,{key:S(s.value),value:S(l.value)})}else for(var u in e)g(e,u)&&H(this.entries,{key:u,value:S(e[u])})},parseQuery:function(e){if(e)for(var t,n,o=J(e,"&"),r=0;r<o.length;)(t=o[r++]).length&&(n=J(t,"="),H(this.entries,{key:re(X(n)),value:re(q(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],o=0;o<t.length;)e=t[o++],H(n,le(e.key)+"="+le(e.value));return q(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var de=function(){h(this,pe);var e=arguments.length>0?arguments[0]:void 0;F(this,new ue(e))},pe=de.prototype;if(u(pe,{append:function(e,t){C(arguments.length,2);var n=M(this);H(n.entries,{key:S(e),value:S(t)}),n.updateURL()},delete:function(e){C(arguments.length,1);for(var t=M(this),n=t.entries,o=S(e),r=0;r<n.length;)n[r].key===o?Y(n,r,1):r++;t.updateURL()},get:function(e){C(arguments.length,1);for(var t=M(this).entries,n=S(e),o=0;o<t.length;o++)if(t[o].key===n)return t[o].value;return null},getAll:function(e){C(arguments.length,1);for(var t=M(this).entries,n=S(e),o=[],r=0;r<t.length;r++)t[r].key===n&&H(o,t[r].value);return o},has:function(e){C(arguments.length,1);for(var t=M(this).entries,n=S(e),o=0;o<t.length;)if(t[o++].key===n)return!0;return!1},set:function(e,t){C(arguments.length,1);for(var n,o=M(this),r=o.entries,i=!1,a=S(e),s=S(t),l=0;l<r.length;l++)(n=r[l]).key===a&&(i?Y(r,l--,1):(i=!0,n.value=s));i||H(r,{key:a,value:s}),o.updateURL()},sort:function(){var e=M(this);O(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=M(this).entries,o=v(e,arguments.length>1?arguments[1]:void 0),r=0;r<n.length;)o((t=n[r++]).value,t.key,this)},keys:function(){return new ce(this,"keys")},values:function(){return new ce(this,"values")},entries:function(){return new ce(this,"entries")}},{enumerable:!0}),c(pe,A,pe.entries,{name:"entries"}),c(pe,"toString",(function(){return M(this).serialize()}),{enumerable:!0}),d(de,T),o({global:!0,constructor:!0,forced:!l},{URLSearchParams:de}),!l&&m(j)){var fe=a(K.has),he=a(K.set),me=function(e){if(w(e)){var t,n=e.body;if(y(n)===T)return t=e.headers?new j(e.headers):new j,fe(t,"content-type")||he(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),P(e,{body:E(0,S(n)),headers:E(0,t)})}return e};if(m(L)&&o({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return L(e,arguments.length>1?me(arguments[1]):{})}}),m(B)){var ge=function(e){return h(this,z),new B(e,arguments.length>1?me(arguments[1]):{})};z.constructor=ge,ge.prototype=z,o({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:ge})}}e.exports={URLSearchParams:de,getState:M}},41637:(e,t,n)=>{n(65556)},68789:(e,t,n)=>{"use strict";n(78783);var o,r=n(82109),i=n(19781),a=n(85143),s=n(17854),l=n(49974),c=n(1702),u=n(98052),d=n(47045),p=n(25787),f=n(92597),h=n(21574),m=n(48457),g=n(41589),v=n(28710).codeAt,y=n(33197),b=n(41340),w=n(58003),S=n(48053),P=n(65556),E=n(29909),x=E.set,D=E.getterFor("URL"),C=P.URLSearchParams,k=P.getState,O=s.URL,A=s.TypeError,T=s.parseInt,I=Math.floor,F=Math.pow,M=c("".charAt),_=c(/./.exec),N=c([].join),R=c(1..toString),L=c([].pop),B=c([].push),j=c("".replace),z=c([].shift),K=c("".split),Z=c("".slice),U=c("".toLowerCase),V=c([].unshift),G="Invalid scheme",W="Invalid host",q="Invalid port",H=/[a-z]/i,$=/[\d+-.a-z]/i,X=/\d/,Y=/^0x/i,J=/^[0-7]+$/,Q=/^\d+$/,ee=/^[\da-f]+$/i,te=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ne=/[\0\t\n\r #/:<>?@[\\\]^|]/,oe=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,re=/[\t\n\r]/g,ie=function(e){var t,n,o,r;if("number"==typeof e){for(t=[],n=0;n<4;n++)V(t,e%256),e=I(e/256);return N(t,".")}if("object"==typeof e){for(t="",o=function(e){for(var t=null,n=1,o=null,r=0,i=0;i<8;i++)0!==e[i]?(r>n&&(t=o,n=r),o=null,r=0):(null===o&&(o=i),++r);return r>n&&(t=o,n=r),t}(e),n=0;n<8;n++)r&&0===e[n]||(r&&(r=!1),o===n?(t+=n?":":"::",r=!0):(t+=R(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},ae={},se=h({},ae,{" ":1,'"':1,"<":1,">":1,"`":1}),le=h({},se,{"#":1,"?":1,"{":1,"}":1}),ce=h({},le,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ue=function(e,t){var n=v(e,0);return n>32&&n<127&&!f(t,e)?e:encodeURIComponent(e)},de={ftp:21,file:null,http:80,https:443,ws:80,wss:443},pe=function(e,t){var n;return 2==e.length&&_(H,M(e,0))&&(":"==(n=M(e,1))||!t&&"|"==n)},fe=function(e){var t;return e.length>1&&pe(Z(e,0,2))&&(2==e.length||"/"===(t=M(e,2))||"\\"===t||"?"===t||"#"===t)},he=function(e){return"."===e||"%2e"===U(e)},me={},ge={},ve={},ye={},be={},we={},Se={},Pe={},Ee={},xe={},De={},Ce={},ke={},Oe={},Ae={},Te={},Ie={},Fe={},Me={},_e={},Ne={},Re=function(e,t,n){var o,r,i,a=b(e);if(t){if(r=this.parse(a))throw A(r);this.searchParams=null}else{if(void 0!==n&&(o=new Re(n,!0)),r=this.parse(a,null,o))throw A(r);(i=k(new C)).bindURL(this),this.searchParams=i}};Re.prototype={type:"URL",parse:function(e,t,n){var r,i,a,s,l,c=this,u=t||me,d=0,p="",h=!1,v=!1,y=!1;for(e=b(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=j(e,oe,"")),e=j(e,re,""),r=m(e);d<=r.length;){switch(i=r[d],u){case me:if(!i||!_(H,i)){if(t)return G;u=ve;continue}p+=U(i),u=ge;break;case ge:if(i&&(_($,i)||"+"==i||"-"==i||"."==i))p+=U(i);else{if(":"!=i){if(t)return G;p="",u=ve,d=0;continue}if(t&&(c.isSpecial()!=f(de,p)||"file"==p&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=p,t)return void(c.isSpecial()&&de[c.scheme]==c.port&&(c.port=null));p="","file"==c.scheme?u=Oe:c.isSpecial()&&n&&n.scheme==c.scheme?u=ye:c.isSpecial()?u=Pe:"/"==r[d+1]?(u=be,d++):(c.cannotBeABaseURL=!0,B(c.path,""),u=Me)}break;case ve:if(!n||n.cannotBeABaseURL&&"#"!=i)return G;if(n.cannotBeABaseURL&&"#"==i){c.scheme=n.scheme,c.path=g(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,u=Ne;break}u="file"==n.scheme?Oe:we;continue;case ye:if("/"!=i||"/"!=r[d+1]){u=we;continue}u=Ee,d++;break;case be:if("/"==i){u=xe;break}u=Fe;continue;case we:if(c.scheme=n.scheme,i==o)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.query=n.query;else if("/"==i||"\\"==i&&c.isSpecial())u=Se;else if("?"==i)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.query="",u=_e;else{if("#"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.path.length--,u=Fe;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.query=n.query,c.fragment="",u=Ne}break;case Se:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,u=Fe;continue}u=xe}else u=Ee;break;case Pe:if(u=Ee,"/"!=i||"/"!=M(p,d+1))continue;d++;break;case Ee:if("/"!=i&&"\\"!=i){u=xe;continue}break;case xe:if("@"==i){h&&(p="%40"+p),h=!0,a=m(p);for(var w=0;w<a.length;w++){var S=a[w];if(":"!=S||y){var P=ue(S,ce);y?c.password+=P:c.username+=P}else y=!0}p=""}else if(i==o||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==p)return"Invalid authority";d-=m(p).length+1,p="",u=De}else p+=i;break;case De:case Ce:if(t&&"file"==c.scheme){u=Te;continue}if(":"!=i||v){if(i==o||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==p)return W;if(t&&""==p&&(c.includesCredentials()||null!==c.port))return;if(s=c.parseHost(p))return s;if(p="",u=Ie,t)return;continue}"["==i?v=!0:"]"==i&&(v=!1),p+=i}else{if(""==p)return W;if(s=c.parseHost(p))return s;if(p="",u=ke,t==Ce)return}break;case ke:if(!_(X,i)){if(i==o||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=p){var E=T(p,10);if(E>65535)return q;c.port=c.isSpecial()&&E===de[c.scheme]?null:E,p=""}if(t)return;u=Ie;continue}return q}p+=i;break;case Oe:if(c.scheme="file","/"==i||"\\"==i)u=Ae;else{if(!n||"file"!=n.scheme){u=Fe;continue}if(i==o)c.host=n.host,c.path=g(n.path),c.query=n.query;else if("?"==i)c.host=n.host,c.path=g(n.path),c.query="",u=_e;else{if("#"!=i){fe(N(g(r,d),""))||(c.host=n.host,c.path=g(n.path),c.shortenPath()),u=Fe;continue}c.host=n.host,c.path=g(n.path),c.query=n.query,c.fragment="",u=Ne}}break;case Ae:if("/"==i||"\\"==i){u=Te;break}n&&"file"==n.scheme&&!fe(N(g(r,d),""))&&(pe(n.path[0],!0)?B(c.path,n.path[0]):c.host=n.host),u=Fe;continue;case Te:if(i==o||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&pe(p))u=Fe;else if(""==p){if(c.host="",t)return;u=Ie}else{if(s=c.parseHost(p))return s;if("localhost"==c.host&&(c.host=""),t)return;p="",u=Ie}continue}p+=i;break;case Ie:if(c.isSpecial()){if(u=Fe,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=o&&(u=Fe,"/"!=i))continue}else c.fragment="",u=Ne;else c.query="",u=_e;break;case Fe:if(i==o||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(l=U(l=p))||"%2e."===l||".%2e"===l||"%2e%2e"===l?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||B(c.path,"")):he(p)?"/"==i||"\\"==i&&c.isSpecial()||B(c.path,""):("file"==c.scheme&&!c.path.length&&pe(p)&&(c.host&&(c.host=""),p=M(p,0)+":"),B(c.path,p)),p="","file"==c.scheme&&(i==o||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)z(c.path);"?"==i?(c.query="",u=_e):"#"==i&&(c.fragment="",u=Ne)}else p+=ue(i,le);break;case Me:"?"==i?(c.query="",u=_e):"#"==i?(c.fragment="",u=Ne):i!=o&&(c.path[0]+=ue(i,ae));break;case _e:t||"#"!=i?i!=o&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":ue(i,ae)):(c.fragment="",u=Ne);break;case Ne:i!=o&&(c.fragment+=ue(i,se))}d++}},parseHost:function(e){var t,n,o;if("["==M(e,0)){if("]"!=M(e,e.length-1))return W;if(t=function(e){var t,n,o,r,i,a,s,l=[0,0,0,0,0,0,0,0],c=0,u=null,d=0,p=function(){return M(e,d)};if(":"==p()){if(":"!=M(e,1))return;d+=2,u=++c}for(;p();){if(8==c)return;if(":"!=p()){for(t=n=0;n<4&&_(ee,p());)t=16*t+T(p(),16),d++,n++;if("."==p()){if(0==n)return;if(d-=n,c>6)return;for(o=0;p();){if(r=null,o>0){if(!("."==p()&&o<4))return;d++}if(!_(X,p()))return;for(;_(X,p());){if(i=T(p(),10),null===r)r=i;else{if(0==r)return;r=10*r+i}if(r>255)return;d++}l[c]=256*l[c]+r,2!=++o&&4!=o||c++}if(4!=o)return;break}if(":"==p()){if(d++,!p())return}else if(p())return;l[c++]=t}else{if(null!==u)return;d++,u=++c}}if(null!==u)for(a=c-u,c=7;0!=c&&a>0;)s=l[c],l[c--]=l[u+a-1],l[u+--a]=s;else if(8!=c)return;return l}(Z(e,1,-1)),!t)return W;this.host=t}else if(this.isSpecial()){if(e=y(e),_(te,e))return W;if(t=function(e){var t,n,o,r,i,a,s,l=K(e,".");if(l.length&&""==l[l.length-1]&&l.length--,(t=l.length)>4)return e;for(n=[],o=0;o<t;o++){if(""==(r=l[o]))return e;if(i=10,r.length>1&&"0"==M(r,0)&&(i=_(Y,r)?16:8,r=Z(r,8==i?1:2)),""===r)a=0;else{if(!_(10==i?Q:8==i?J:ee,r))return e;a=T(r,i)}B(n,a)}for(o=0;o<t;o++)if(a=n[o],o==t-1){if(a>=F(256,5-t))return null}else if(a>255)return null;for(s=L(n),o=0;o<n.length;o++)s+=n[o]*F(256,3-o);return s}(e),null===t)return W;this.host=t}else{if(_(ne,e))return W;for(t="",n=m(e),o=0;o<n.length;o++)t+=ue(n[o],ae);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return f(de,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&pe(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,o=e.password,r=e.host,i=e.port,a=e.path,s=e.query,l=e.fragment,c=t+":";return null!==r?(c+="//",e.includesCredentials()&&(c+=n+(o?":"+o:"")+"@"),c+=ie(r),null!==i&&(c+=":"+i)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+N(a,"/"):"",null!==s&&(c+="?"+s),null!==l&&(c+="#"+l),c},setHref:function(e){var t=this.parse(e);if(t)throw A(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Le(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+ie(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(b(e)+":",me)},getUsername:function(){return this.username},setUsername:function(e){var t=m(b(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=ue(t[n],ce)}},getPassword:function(){return this.password},setPassword:function(e){var t=m(b(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=ue(t[n],ce)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?ie(e):ie(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,De)},getHostname:function(){var e=this.host;return null===e?"":ie(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Ce)},getPort:function(){var e=this.port;return null===e?"":b(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=b(e))?this.port=null:this.parse(e,ke))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+N(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Ie))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=b(e))?this.query=null:("?"==M(e,0)&&(e=Z(e,1)),this.query="",this.parse(e,_e)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=b(e))?("#"==M(e,0)&&(e=Z(e,1)),this.fragment="",this.parse(e,Ne)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Le=function(e){var t=p(this,Be),n=S(arguments.length,1)>1?arguments[1]:void 0,o=x(t,new Re(e,!1,n));i||(t.href=o.serialize(),t.origin=o.getOrigin(),t.protocol=o.getProtocol(),t.username=o.getUsername(),t.password=o.getPassword(),t.host=o.getHost(),t.hostname=o.getHostname(),t.port=o.getPort(),t.pathname=o.getPathname(),t.search=o.getSearch(),t.searchParams=o.getSearchParams(),t.hash=o.getHash())},Be=Le.prototype,je=function(e,t){return{get:function(){return D(this)[e]()},set:t&&function(e){return D(this)[t](e)},configurable:!0,enumerable:!0}};if(i&&(d(Be,"href",je("serialize","setHref")),d(Be,"origin",je("getOrigin")),d(Be,"protocol",je("getProtocol","setProtocol")),d(Be,"username",je("getUsername","setUsername")),d(Be,"password",je("getPassword","setPassword")),d(Be,"host",je("getHost","setHost")),d(Be,"hostname",je("getHostname","setHostname")),d(Be,"port",je("getPort","setPort")),d(Be,"pathname",je("getPathname","setPathname")),d(Be,"search",je("getSearch","setSearch")),d(Be,"searchParams",je("getSearchParams")),d(Be,"hash",je("getHash","setHash"))),u(Be,"toJSON",(function(){return D(this).serialize()}),{enumerable:!0}),u(Be,"toString",(function(){return D(this).serialize()}),{enumerable:!0}),O){var ze=O.createObjectURL,Ke=O.revokeObjectURL;ze&&u(Le,"createObjectURL",l(ze,O)),Ke&&u(Le,"revokeObjectURL",l(Ke,O))}w(Le,"URL"),r({global:!0,constructor:!0,forced:!a,sham:!i},{URL:Le})},60285:(e,t,n)=>{n(68789)},83753:(e,t,n)=>{"use strict";var o=n(82109),r=n(46916);o({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}})},72572:(e,t,n)=>{"use strict";var o=n(67294);t.createSubscription=function(e){var t=e.getCurrentValue,n=e.subscribe;return function(e){function o(){for(var n=arguments.length,o=Array(n),r=0;r<n;r++)o[r]=arguments[r];return(n=e.call.apply(e,[this].concat(o))||this).state={source:n.props.source,value:null!=n.props.source?t(n.props.source):void 0},n._hasUnmounted=!1,n._unsubscribe=null,n}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(o,e),o.getDerivedStateFromProps=function(e,n){return e.source!==n.source?{source:e.source,value:null!=e.source?t(e.source):void 0}:null};var r=o.prototype;return r.componentDidMount=function(){this.subscribe()},r.componentDidUpdate=function(e,t){this.state.source!==t.source&&(this.unsubscribe(),this.subscribe())},r.componentWillUnmount=function(){this.unsubscribe(),this._hasUnmounted=!0},r.render=function(){return this.props.children(this.state.value)},r.subscribe=function(){var e=this,o=this.state.source;if(null!=o){var r=n(o,(function(t){e._hasUnmounted||e.setState((function(e){return t===e.value||o!==e.source?null:{value:t}}))}));if("function"!=typeof r)throw Error(function(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}(266));this._unsubscribe=r,(r=t(this.props.source))!==this.state.value&&this.setState({value:r})}},r.unsubscribe=function(){"function"==typeof this._unsubscribe&&this._unsubscribe(),this._unsubscribe=null},o}(o.Component)}},74792:(e,t,n)=>{"use strict";e.exports=n(72572)},6907:e=>{"use strict";e.exports=function(e){if(e=String(e||""),o.test(e))return"rtl";if(r.test(e))return"ltr";return"neutral"};var t="֑-߿יִ-﷽ﹰ-ﻼ",n="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",o=new RegExp("^[^"+n+"]*["+t+"]"),r=new RegExp("^[^"+t+"]*["+n+"]")},27856:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:s}=Object,{apply:l,construct:c}="undefined"!=typeof Reflect&&Reflect;l||(l=function(e,t,n){return e.apply(t,n)}),i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t){return new e(...t)});const u=S(Array.prototype.forEach),d=S(Array.prototype.pop),p=S(Array.prototype.push),f=S(String.prototype.toLowerCase),h=S(String.prototype.toString),m=S(String.prototype.match),g=S(String.prototype.replace),v=S(String.prototype.indexOf),y=S(String.prototype.trim),b=S(RegExp.prototype.test),w=P(TypeError);function S(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return l(e,t,o)}}function P(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return c(e,n)}}function E(e,o,r){var i;r=null!==(i=r)&&void 0!==i?i:f,t&&t(e,null);let a=o.length;for(;a--;){let t=o[a];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[a]=e),t=e)}e[t]=!0}return e}function x(t){const n=s(null);for(const[o,r]of e(t))n[o]=r;return n}function D(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return S(n.get);if("function"==typeof n.value)return S(n.value)}e=o(e)}function n(e){return console.warn("fallback value for",e),null}return n}const C=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),k=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),O=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),A=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),T=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),F=i(["#text"]),M=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),_=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),N=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),R=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),L=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),B=a(/<%[\w\W]*|[\w\W]*%>/gm),j=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),K=a(/^aria-[\-\w]+$/),Z=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),U=a(/^(?:\w+script|data):/i),V=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G=a(/^html$/i);var W=Object.freeze({__proto__:null,MUSTACHE_EXPR:L,ERB_EXPR:B,TMPLIT_EXPR:j,DATA_ATTR:z,ARIA_ATTR:K,IS_ALLOWED_URI:Z,IS_SCRIPT_OR_DATA:U,ATTR_WHITESPACE:V,DOCTYPE_NAME:G});const q=()=>"undefined"==typeof window?null:window,H=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};function $(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q();const n=e=>$(e);if(n.version="3.0.5",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;const o=t.document,r=o.currentScript;let{document:a}=t;const{DocumentFragment:s,HTMLTemplateElement:l,Node:c,Element:S,NodeFilter:P,NamedNodeMap:L=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:B,DOMParser:j,trustedTypes:z}=t,K=S.prototype,U=D(K,"cloneNode"),V=D(K,"nextSibling"),X=D(K,"childNodes"),Y=D(K,"parentNode");if("function"==typeof l){const e=a.createElement("template");e.content&&e.content.ownerDocument&&(a=e.content.ownerDocument)}let J,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:oe}=a,{importNode:re}=o;let ie={};n.isSupported="function"==typeof e&&"function"==typeof Y&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:se,TMPLIT_EXPR:le,DATA_ATTR:ce,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:pe}=W;let{IS_ALLOWED_URI:fe}=W,he=null;const me=E({},[...C,...k,...O,...T,...F]);let ge=null;const ve=E({},[...M,..._,...N,...R]);let ye=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),be=null,we=null,Se=!0,Pe=!0,Ee=!1,xe=!0,De=!1,Ce=!1,ke=!1,Oe=!1,Ae=!1,Te=!1,Ie=!1,Fe=!0,Me=!1;const _e="user-content-";let Ne=!0,Re=!1,Le={},Be=null;const je=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ze=null;const Ke=E({},["audio","video","img","source","image","track"]);let Ze=null;const Ue=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",Ge="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let qe=We,He=!1,$e=null;const Xe=E({},[Ve,Ge,We],h);let Ye;const Je=["application/xhtml+xml","text/html"],Qe="text/html";let et,tt=null;const nt=a.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},rt=function(e){if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=x(e),Ye=Ye=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?Qe:e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Ye?h:f,he="ALLOWED_TAGS"in e?E({},e.ALLOWED_TAGS,et):me,ge="ALLOWED_ATTR"in e?E({},e.ALLOWED_ATTR,et):ve,$e="ALLOWED_NAMESPACES"in e?E({},e.ALLOWED_NAMESPACES,h):Xe,Ze="ADD_URI_SAFE_ATTR"in e?E(x(Ue),e.ADD_URI_SAFE_ATTR,et):Ue,ze="ADD_DATA_URI_TAGS"in e?E(x(Ke),e.ADD_DATA_URI_TAGS,et):Ke,Be="FORBID_CONTENTS"in e?E({},e.FORBID_CONTENTS,et):je,be="FORBID_TAGS"in e?E({},e.FORBID_TAGS,et):{},we="FORBID_ATTR"in e?E({},e.FORBID_ATTR,et):{},Le="USE_PROFILES"in e&&e.USE_PROFILES,Se=!1!==e.ALLOW_ARIA_ATTR,Pe=!1!==e.ALLOW_DATA_ATTR,Ee=e.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,De=e.SAFE_FOR_TEMPLATES||!1,Ce=e.WHOLE_DOCUMENT||!1,Ae=e.RETURN_DOM||!1,Te=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,Oe=e.FORCE_BODY||!1,Fe=!1!==e.SANITIZE_DOM,Me=e.SANITIZE_NAMED_PROPS||!1,Ne=!1!==e.KEEP_CONTENT,Re=e.IN_PLACE||!1,fe=e.ALLOWED_URI_REGEXP||Z,qe=e.NAMESPACE||We,ye=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ye.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),De&&(Pe=!1),Te&&(Ae=!0),Le&&(he=E({},[...F]),ge=[],!0===Le.html&&(E(he,C),E(ge,M)),!0===Le.svg&&(E(he,k),E(ge,_),E(ge,R)),!0===Le.svgFilters&&(E(he,O),E(ge,_),E(ge,R)),!0===Le.mathMl&&(E(he,T),E(ge,N),E(ge,R))),e.ADD_TAGS&&(he===me&&(he=x(he)),E(he,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===ve&&(ge=x(ge)),E(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&E(Ze,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(Be===je&&(Be=x(Be)),E(Be,e.FORBID_CONTENTS,et)),Ne&&(he["#text"]=!0),Ce&&E(he,["html","head","body"]),he.table&&(E(he,["tbody"]),delete be.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=H(z,r)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));i&&i(e),tt=e}},it=E({},["mi","mo","mn","ms","mtext"]),at=E({},["foreignobject","desc","title","annotation-xml"]),st=E({},["title","style","font","a","script"]),lt=E({},k);E(lt,O),E(lt,A);const ct=E({},T);E(ct,I);const ut=function(e){let t=Y(e);t&&t.tagName||(t={namespaceURI:qe,tagName:"template"});const n=f(e.tagName),o=f(t.tagName);return!!$e[e.namespaceURI]&&(e.namespaceURI===Ge?t.namespaceURI===We?"svg"===n:t.namespaceURI===Ve?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(lt[n]):e.namespaceURI===Ve?t.namespaceURI===We?"math"===n:t.namespaceURI===Ge?"math"===n&&at[o]:Boolean(ct[n]):e.namespaceURI===We?!(t.namespaceURI===Ge&&!at[o])&&!(t.namespaceURI===Ve&&!it[o])&&!ct[n]&&(st[n]||!lt[n]):!("application/xhtml+xml"!==Ye||!$e[e.namespaceURI]))},dt=function(e){p(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},pt=function(e,t){try{p(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(Ae||Te)try{dt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ft=function(e){let t,n;if(Oe)e="<remove></remove>"+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ye&&qe===We&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=J?J.createHTML(e):e;if(qe===We)try{t=(new j).parseFromString(o,Ye)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(qe,"template",null);try{t.documentElement.innerHTML=He?Q:o}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(a.createTextNode(n),r.childNodes[0]||null),qe===We?oe.call(t,Ce?"html":"body")[0]:Ce?t.documentElement:r},ht=function(e){return te.call(e.ownerDocument||e,e,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT,null,!1)},mt=function(e){return e instanceof B&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof L)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},gt=function(e){return"object"==typeof c?e instanceof c:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},vt=function(e,t,o){ie[e]&&u(ie[e],(e=>{e.call(n,t,o,tt)}))},yt=function(e){let t;if(vt("beforeSanitizeElements",e,null),mt(e))return dt(e),!0;const o=et(e.nodeName);if(vt("uponSanitizeElement",e,{tagName:o,allowedTags:he}),e.hasChildNodes()&&!gt(e.firstElementChild)&&(!gt(e.content)||!gt(e.content.firstElementChild))&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return dt(e),!0;if(!he[o]||be[o]){if(!be[o]&&wt(o)){if(ye.tagNameCheck instanceof RegExp&&b(ye.tagNameCheck,o))return!1;if(ye.tagNameCheck instanceof Function&&ye.tagNameCheck(o))return!1}if(Ne&&!Be[o]){const t=Y(e)||e.parentNode,n=X(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o)t.insertBefore(U(n[o],!0),V(e))}return dt(e),!0}return e instanceof S&&!ut(e)?(dt(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(De&&3===e.nodeType&&(t=e.textContent,t=g(t,ae," "),t=g(t,se," "),t=g(t,le," "),e.textContent!==t&&(p(n.removed,{element:e.cloneNode()}),e.textContent=t)),vt("afterSanitizeElements",e,null),!1):(dt(e),!0)},bt=function(e,t,n){if(Fe&&("id"===t||"name"===t)&&(n in a||n in nt))return!1;if(Pe&&!we[t]&&b(ce,t));else if(Se&&b(ue,t));else if(!ge[t]||we[t]){if(!(wt(e)&&(ye.tagNameCheck instanceof RegExp&&b(ye.tagNameCheck,e)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(e))&&(ye.attributeNameCheck instanceof RegExp&&b(ye.attributeNameCheck,t)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(t))||"is"===t&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&b(ye.tagNameCheck,n)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))))return!1}else if(Ze[t]);else if(b(fe,g(n,pe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(n,"data:")||!ze[e])if(Ee&&!b(de,g(n,pe,"")));else if(n)return!1;return!0},wt=function(e){return e.indexOf("-")>0},St=function(e){let t,o,r,i;vt("beforeSanitizeAttributes",e,null);const{attributes:a}=e;if(!a)return;const s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(i=a.length;i--;){t=a[i];const{name:l,namespaceURI:c}=t;if(o="value"===l?t.value:y(t.value),r=et(l),s.attrName=r,s.attrValue=o,s.keepAttr=!0,s.forceKeepAttr=void 0,vt("uponSanitizeAttribute",e,s),o=s.attrValue,s.forceKeepAttr)continue;if(pt(l,e),!s.keepAttr)continue;if(!xe&&b(/\/>/i,o)){pt(l,e);continue}De&&(o=g(o,ae," "),o=g(o,se," "),o=g(o,le," "));const u=et(e.nodeName);if(bt(u,r,o)){if(!Me||"id"!==r&&"name"!==r||(pt(l,e),o=_e+o),J&&"object"==typeof z&&"function"==typeof z.getAttributeType)if(c);else switch(z.getAttributeType(u,r)){case"TrustedHTML":o=J.createHTML(o);break;case"TrustedScriptURL":o=J.createScriptURL(o)}try{c?e.setAttributeNS(c,l,o):e.setAttribute(l,o),d(n.removed)}catch(e){}}}vt("afterSanitizeAttributes",e,null)},Pt=function e(t){let n;const o=ht(t);for(vt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)vt("uponSanitizeShadowNode",n,null),yt(n)||(n.content instanceof s&&e(n.content),St(n));vt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t,r,i,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(He=!e,He&&(e="\x3c!--\x3e"),"string"!=typeof e&&!gt(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!n.isSupported)return e;if(ke||rt(l),n.removed=[],"string"==typeof e&&(Re=!1),Re){if(e.nodeName){const t=et(e.nodeName);if(!he[t]||be[t])throw w("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)t=ft("\x3c!----\x3e"),r=t.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?t=r:t.appendChild(r);else{if(!Ae&&!De&&!Ce&&-1===e.indexOf("<"))return J&&Ie?J.createHTML(e):e;if(t=ft(e),!t)return Ae?null:Ie?Q:""}t&&Oe&&dt(t.firstChild);const u=ht(Re?e:t);for(;i=u.nextNode();)yt(i)||(i.content instanceof s&&Pt(i.content),St(i));if(Re)return e;if(Ae){if(Te)for(a=ne.call(t.ownerDocument);t.firstChild;)a.appendChild(t.firstChild);else a=t;return(ge.shadowroot||ge.shadowrootmode)&&(a=re.call(o,a,!0)),a}let d=Ce?t.outerHTML:t.innerHTML;return Ce&&he["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&b(G,t.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+d),De&&(d=g(d,ae," "),d=g(d,se," "),d=g(d,le," ")),J&&Ie?J.createHTML(d):d},n.setConfig=function(e){rt(e),ke=!0},n.clearConfig=function(){tt=null,ke=!1},n.isValidAttribute=function(e,t,n){tt||rt({});const o=et(e),r=et(t);return bt(o,r,n)},n.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],p(ie[e],t))},n.removeHook=function(e){if(ie[e])return d(ie[e])},n.removeHooks=function(e){ie[e]&&(ie[e]=[])},n.removeAllHooks=function(){ie={}},n}return $()}()},41756:(e,t,n)=>{"use strict";function o(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r.apply(this,arguments)}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}n.d(t,{ZP:()=>W,L7:()=>xe});var s=n(45697),l=n.n(s),c=n(67294);n(21726);function u(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function d(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function p(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return d(n.overflowY,t)||d(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function f(e,t,n,o,r,i,a,s){return i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-o:a>t&&s<n||i<e&&s>n?a-t+r:0}var h=function(){return h=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},h.apply(this,arguments)};Object.create;Object.create;var m=0;function g(e){return"function"==typeof e?e:v}function v(){}function y(e,t){if(e){var n=function(e,t){var n=window,o=t.scrollMode,r=t.block,i=t.inline,a=t.boundary,s=t.skipOverflowHiddenElements,l="function"==typeof a?a:function(e){return e!==a};if(!u(e))throw new TypeError("Invalid target");for(var c=document.scrollingElement||document.documentElement,d=[],h=e;u(h)&&l(h);){if((h=h.parentElement)===c){d.push(h);break}null!=h&&h===document.body&&p(h)&&!p(document.documentElement)||null!=h&&p(h,s)&&d.push(h)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),w=b.height,S=b.width,P=b.top,E=b.right,x=b.bottom,D=b.left,C="start"===r||"nearest"===r?P:"end"===r?x:P+w/2,k="center"===i?D+S/2:"end"===i?E:D,O=[],A=0;A<d.length;A++){var T=d[A],I=T.getBoundingClientRect(),F=I.height,M=I.width,_=I.top,N=I.right,R=I.bottom,L=I.left;if("if-needed"===o&&P>=0&&D>=0&&x<=g&&E<=m&&P>=_&&x<=R&&D>=L&&E<=N)return O;var B=getComputedStyle(T),j=parseInt(B.borderLeftWidth,10),z=parseInt(B.borderTopWidth,10),K=parseInt(B.borderRightWidth,10),Z=parseInt(B.borderBottomWidth,10),U=0,V=0,G="offsetWidth"in T?T.offsetWidth-T.clientWidth-j-K:0,W="offsetHeight"in T?T.offsetHeight-T.clientHeight-z-Z:0;if(c===T)U="start"===r?C:"end"===r?C-g:"nearest"===r?f(y,y+g,g,z,Z,y+C,y+C+w,w):C-g/2,V="start"===i?k:"center"===i?k-m/2:"end"===i?k-m:f(v,v+m,m,j,K,v+k,v+k+S,S),U=Math.max(0,U+y),V=Math.max(0,V+v);else{U="start"===r?C-_-z:"end"===r?C-R+Z+W:"nearest"===r?f(_,R,F,z,Z+W,C,C+w,w):C-(_+F/2)+W/2,V="start"===i?k-L-j:"center"===i?k-(L+M/2)+G/2:"end"===i?k-N+K+G:f(L,N,M,j,K+G,k,k+S,S);var q=T.scrollLeft,H=T.scrollTop;C+=H-(U=Math.max(0,Math.min(H+U,T.scrollHeight-F+W))),k+=q-(V=Math.max(0,Math.min(q+V,T.scrollWidth-M+G)))}O.push({el:T,top:U,left:V})}return O}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach((function(e){var t=e.el,n=e.top,o=e.left;t.scrollTop=n,t.scrollLeft=o}))}}function b(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function w(e,t){var n;function o(){n&&clearTimeout(n)}function r(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];o(),n=setTimeout((function(){n=null,e.apply(void 0,i)}),t)}return r.cancel=o,r}function S(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return t.some((function(t){return t&&t.apply(void 0,[e].concat(o)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault}))}}function P(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}function E(){return String(m++)}function x(e){var t=e.isOpen,n=e.resultCount,o=e.previousResultCount;return t?n?n!==o?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function D(e,t){return!(e=Array.isArray(e)?e[0]:e)&&t?t:e}function C(e){return"string"==typeof e.type}function k(e){return e.props}var O=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function A(e){void 0===e&&(e={});var t={};return O.forEach((function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function T(e,t){return Object.keys(e).reduce((function(n,o){return n[o]=I(t,o)?t[o]:e[o],n}),{})}function I(e,t){return void 0!==e[t]}function F(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function M(e,t,n,o,r){if(void 0===r&&(r=!0),0===n)return-1;var i=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);var a=t+e;a<0?a=r?i:0:a>i&&(a=r?0:i);var s=_(e,a,n,o,r);return-1===s?t>=n?-1:t:s}function _(e,t,n,o,r){var i=o(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var a=t+1;a<n;a++)if(!o(a).hasAttribute("disabled"))return a}else for(var s=t-1;s>=0;s--)if(!o(s).hasAttribute("disabled"))return s;return r?e>0?_(1,0,n,o,!1):_(-1,n-1,n,o,!1):-1}function N(e,t,n,o){return void 0===o&&(o=!0),t.some((function(t){return t&&(b(t,e,n)||o&&b(t,n.document.activeElement,n))}))}var R=w((function(e){B(e).textContent=""}),500);function L(e,t){var n=B(t);e&&(n.textContent=e,R(t))}function B(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var j=Object.freeze({__proto__:null,unknown:0,mouseUp:1,itemMouseEnter:2,keyDownArrowUp:3,keyDownArrowDown:4,keyDownEscape:5,keyDownEnter:6,keyDownHome:7,keyDownEnd:8,clickItem:9,blurInput:10,changeInput:11,keyDownSpaceButton:12,clickButton:13,blurButton:14,controlledPropUpdatedSelectedItem:15,touchEnd:16}),z=["refKey","ref"],K=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],Z=["onKeyDown","onBlur","onChange","onInput","onChangeText"],U=["refKey","ref"],V=["onMouseMove","onMouseDown","onClick","onPress","index","item"],G=function(){var e=function(e){var t,n;function s(t){var n;(n=e.call(this,t)||this).id=n.props.id||"downshift-"+E(),n.menuId=n.props.menuId||n.id+"-menu",n.labelId=n.props.labelId||n.id+"-label",n.inputId=n.props.inputId||n.id+"-input",n.getItemId=n.props.getItemId||function(e){return n.id+"-item-"+e},n.input=null,n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var o=setTimeout((function(){n.timeoutIds=n.timeoutIds.filter((function(e){return e!==o})),e()}),t);n.timeoutIds.push(o)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.setHighlightedIndex=function(e,t){void 0===e&&(e=n.props.defaultHighlightedIndex),void 0===t&&(t={}),t=A(t),n.internalSetState(r({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,o){t=A(t),n.internalSetState(r({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),o)},n.selectItemAtIndex=function(e,t,o){var r=n.items[e];null!=r&&n.selectItem(r,t,o)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var o,i,a={},s="function"==typeof e;return!s&&e.hasOwnProperty("inputValue")&&n.props.onInputValueChange(e.inputValue,r({},n.getStateAndHelpers(),e)),n.setState((function(t){t=n.getState(t);var l=s?e(t):e;l=n.props.stateReducer(t,l),o=l.hasOwnProperty("selectedItem");var c={},u={};return o&&l.selectedItem!==t.selectedItem&&(i=l.selectedItem),l.type=l.type||0,Object.keys(l).forEach((function(e){t[e]!==l[e]&&(a[e]=l[e]),"type"!==e&&(u[e]=l[e],I(n.props,e)||(c[e]=l[e]))})),s&&l.hasOwnProperty("inputValue")&&n.props.onInputValueChange(l.inputValue,r({},n.getStateAndHelpers(),l)),c}),(function(){g(t)(),Object.keys(a).length>1&&n.props.onStateChange(a,n.getStateAndHelpers()),o&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),void 0!==i&&n.props.onChange(i,n.getStateAndHelpers()),n.props.onUserAction(a,n.getStateAndHelpers())}))},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var i,a=void 0===e?{}:e,s=a.refKey,l=void 0===s?"ref":s,c=a.ref,u=o(a,z),d=(void 0===t?{}:t).suppressRefError,p=void 0!==d&&d;n.getRootProps.called=!0,n.getRootProps.refKey=l,n.getRootProps.suppressRefError=p;var f=n.getState().isOpen;return r(((i={})[l]=P(c,n.rootRef),i.role="combobox",i["aria-expanded"]=f,i["aria-haspopup"]="listbox",i["aria-owns"]=f?n.menuId:null,i["aria-labelledby"]=n.labelId,i),u)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();if(e>0){var n=M(1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:4})}}))},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:3})}else this.internalSetState({isOpen:!0,type:3},(function(){var e=t.getItemCount();if(e>0){var n=M(-1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:3})}}))},Enter:function(e){if(229!==e.which){var t=this.getState(),n=t.isOpen,o=t.highlightedIndex;if(n&&null!=o){e.preventDefault();var r=this.items[o],i=this.getItemNodeFromIndex(o);if(null==r||i&&i.hasAttribute("disabled"))return;this.selectHighlightedItem({type:6})}}},Escape:function(e){e.preventDefault(),this.reset(r({type:5},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},n.buttonKeyDownHandlers=r({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=r({},n.keyDownHandlers,{Home:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var o=this.getItemCount();if(!(o<=0)&&n){var r=_(1,0,o,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(r,{type:7})}}},End:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var o=this.getItemCount();if(!(o<=0)&&n){var r=_(-1,o-1,o,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(r,{type:8})}}}}),n.getToggleButtonProps=function(e){var t=void 0===e?{}:e,i=t.onClick;t.onPress;var a=t.onKeyDown,s=t.onKeyUp,l=t.onBlur,c=o(t,K),u=n.getState().isOpen,d={onClick:S(i,n.buttonHandleClick),onKeyDown:S(a,n.buttonHandleKeyDown),onKeyUp:S(s,n.buttonHandleKeyUp),onBlur:S(l,n.buttonHandleBlur)};return r({type:"button",role:"button","aria-label":u?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},c.disabled?{}:d,c)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=F(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(i(n),e)},n.buttonHandleClick=function(e){e.preventDefault(),n.props.environment.document.activeElement===n.props.environment.document.body&&e.target.focus(),n.internalSetTimeout((function(){return n.toggleMenu({type:13})}))},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout((function(){n.isMouseDown||null!=n.props.environment.document.activeElement&&n.props.environment.document.activeElement.id===n.inputId||n.props.environment.document.activeElement===t||n.reset({type:14})}))},n.getLabelProps=function(e){return r({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=void 0===e?{}:e,i=t.onKeyDown,a=t.onBlur,s=t.onChange,l=t.onInput;t.onChangeText;var c=o(t,Z),u={};var d,p=n.getState(),f=p.inputValue,h=p.isOpen,m=p.highlightedIndex;c.disabled||((d={}).onChange=S(s,l,n.inputHandleChange),d.onKeyDown=S(i,n.inputHandleKeyDown),d.onBlur=S(a,n.inputHandleBlur),u=d);return r({"aria-autocomplete":"list","aria-activedescendant":h&&"number"==typeof m&&m>=0?n.getItemId(m):null,"aria-controls":h?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:f,id:n.inputId},u,c)},n.inputHandleKeyDown=function(e){var t=F(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(i(n),e)},n.inputHandleChange=function(e){n.internalSetState({type:11,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout((function(){var e=n.props.environment.document&&!!n.props.environment.document.activeElement&&!!n.props.environment.document.activeElement.dataset&&n.props.environment.document.activeElement.dataset.toggle&&n._rootNode&&n._rootNode.contains(n.props.environment.document.activeElement);n.isMouseDown||e||n.reset({type:10})}))},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var i,a=void 0===e?{}:e,s=a.refKey,l=void 0===s?"ref":s,c=a.ref,u=o(a,U),d=(void 0===t?{}:t).suppressRefError,p=void 0!==d&&d;return n.getMenuProps.called=!0,n.getMenuProps.refKey=l,n.getMenuProps.suppressRefError=p,r(((i={})[l]=P(c,n.menuRef),i.role="listbox",i["aria-labelledby"]=u&&u["aria-label"]?null:n.labelId,i.id=n.menuId,i),u)},n.getItemProps=function(e){var t,i=void 0===e?{}:e,a=i.onMouseMove,s=i.onMouseDown,l=i.onClick;i.onPress;var c=i.index,u=i.item,d=void 0===u?void 0:u,p=o(i,V);void 0===c?(n.items.push(d),c=n.items.indexOf(d)):n.items[c]=d;var f=l,h=((t={onMouseMove:S(a,(function(){c!==n.getState().highlightedIndex&&(n.setHighlightedIndex(c,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:S(s,(function(e){e.preventDefault()}))}).onClick=S(f,(function(){n.selectItemAtIndex(c,{type:9})})),t),m=p.disabled?{onMouseDown:h.onMouseDown}:h;return r({id:n.getItemId(c),role:"option","aria-selected":n.getState().highlightedIndex===c},m,p)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=A(e),n.internalSetState((function(t){var o=t.selectedItem;return r({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(o)},e)}),t)},n.toggleMenu=function(e,t){void 0===e&&(e={}),e=A(e),n.internalSetState((function(t){var o=t.isOpen;return r({isOpen:!o},o&&{highlightedIndex:n.props.defaultHighlightedIndex},e)}),(function(){var o=n.getState(),r=o.isOpen,i=o.highlightedIndex;r&&n.getItemCount()>0&&"number"==typeof i&&n.setHighlightedIndex(i,e),g(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=w((function(){var e=n.getState(),t=n.items[e.highlightedIndex],o=n.getItemCount(),i=n.props.getA11yStatusMessage(r({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:o,highlightedItem:t},e));n.previousResultCount=o,L(i,n.props.environment.document)}),200);var a=n.props,s=a.defaultHighlightedIndex,l=a.initialHighlightedIndex,c=void 0===l?s:l,u=a.defaultIsOpen,d=a.initialIsOpen,p=void 0===d?u:d,f=a.initialInputValue,h=void 0===f?"":f,m=a.initialSelectedItem,v=void 0===m?null:m,y=n.getState({highlightedIndex:c,isOpen:p,inputValue:h,selectedItem:v});return null!=y.selectedItem&&void 0===n.props.initialInputValue&&(y.inputValue=n.props.itemToString(y.selectedItem)),n.state=y,n}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var l=s.prototype;return l.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},l.getState=function(e){return void 0===e&&(e=this.state),T(e,this.props)},l.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},l.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},l.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},l.moveHighlightedIndex=function(e,t){var n=this,o=this.getItemCount(),r=this.getState().highlightedIndex;if(o>0){var i=M(e,r,o,(function(e){return n.getItemNodeFromIndex(e)}));this.setHighlightedIndex(i,t)}},l.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,o=e.selectedItem,r=e.isOpen,i=this.props.itemToString,a=this.id,s=this.getRootProps,l=this.getToggleButtonProps,c=this.getLabelProps,u=this.getMenuProps,d=this.getInputProps,p=this.getItemProps,f=this.openMenu,h=this.closeMenu,m=this.toggleMenu,g=this.selectItem,v=this.selectItemAtIndex,y=this.selectHighlightedItem,b=this.setHighlightedIndex,w=this.clearSelection,S=this.clearItems;return{getRootProps:s,getToggleButtonProps:l,getLabelProps:c,getMenuProps:u,getInputProps:d,getItemProps:p,reset:this.reset,openMenu:f,closeMenu:h,toggleMenu:m,selectItem:g,selectItemAtIndex:v,selectHighlightedItem:y,setHighlightedIndex:b,clearSelection:w,clearItems:S,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:i,id:a,highlightedIndex:t,inputValue:n,isOpen:r,selectedItem:o}},l.componentDidMount=function(){var e=this;var t=function(){e.isMouseDown=!0},n=function(t){e.isMouseDown=!1,!N(t.target,[e._rootNode,e._menuNode],e.props.environment)&&e.getState().isOpen&&e.reset({type:1},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},o=function(){e.isTouchMove=!1},r=function(){e.isTouchMove=!0},i=function(t){var n=N(t.target,[e._rootNode,e._menuNode],e.props.environment,!1);e.isTouchMove||n||!e.getState().isOpen||e.reset({type:16},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},a=this.props.environment;a.addEventListener("mousedown",t),a.addEventListener("mouseup",n),a.addEventListener("touchstart",o),a.addEventListener("touchmove",r),a.addEventListener("touchend",i),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),a.removeEventListener("mousedown",t),a.removeEventListener("mouseup",n),a.removeEventListener("touchstart",o),a.removeEventListener("touchmove",r),a.removeEventListener("touchend",i)}},l.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,o=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==o},l.componentDidUpdate=function(e,t){I(this.props,"selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},l.componentWillUnmount=function(){this.cleanup()},l.render=function(){var e=D(this.props.children,v);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=D(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:C(t)?(0,c.cloneElement)(t,this.getRootProps(k(t))):void 0:null},s}(c.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:x,itemToString:function(e){return null==e?"":String(e)},onStateChange:v,onInputValueChange:v,onUserAction:v,onChange:v,onSelect:v,onOuterClick:v,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:y},e.stateChangeTypes=j,e}(),W=G;var q=["isInitialMount","highlightedIndex","items","environment"],H={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function $(e,t,n){var o=e.props,i=e.type,a={};Object.keys(t).forEach((function(o){!function(e,t,n,o){var i=t.props,a=t.type,s="on"+te(e)+"Change";i[s]&&void 0!==o[e]&&o[e]!==n[e]&&i[s](r({type:a},o))}(o,e,t,n),n[o]!==t[o]&&(a[o]=n[o])})),o.onStateChange&&Object.keys(a).length&&o.onStateChange(r({type:i},a))}var X=w((function(e,t){L(e(),t)}),200),Y="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?c.useLayoutEffect:c.useEffect;function J(e){var t=e.id,n=void 0===t?"downshift-"+E():t,o=e.labelId,r=e.menuId,i=e.getItemId,a=e.toggleButtonId,s=e.inputId;return(0,c.useRef)({labelId:o||n+"-label",menuId:r||n+"-menu",getItemId:i||function(e){return n+"-item-"+e},toggleButtonId:a||n+"-toggle-button",inputId:s||n+"-input"}).current}function Q(e,t,n){return void 0!==e?e:0===n.length?-1:n.indexOf(t)}function ee(e){return/^\S{1}$/.test(e)}function te(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function ne(e){var t=(0,c.useRef)(e);return t.current=e,t}function oe(e,t,n){var o=(0,c.useRef)(),i=(0,c.useRef)(),a=(0,c.useCallback)((function(t,n){i.current=n,t=T(t,n.props);var o=e(t,n);return n.props.stateReducer(t,r({},n,{changes:o}))}),[e]),s=(0,c.useReducer)(a,t),l=s[0],u=s[1],d=ne(n),p=(0,c.useCallback)((function(e){return u(r({props:d.current},e))}),[d]),f=i.current;return(0,c.useEffect)((function(){f&&o.current&&o.current!==l&&$(f,T(o.current,f.props),l),o.current=l}),[l,n,f]),[l,p]}function re(e,t,n){var o=oe(e,t,n),r=o[0],i=o[1];return[T(r,n),i]}var ie={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""},scrollIntoView:y,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};function ae(e,t,n){void 0===n&&(n=H);var o="default"+te(t);return o in e?e[o]:n[t]}function se(e,t,n){if(void 0===n&&(n=H),t in e)return e[t];var o="initial"+te(t);return o in e?e[o]:ae(e,t,n)}function le(e){var t=se(e,"selectedItem"),n=se(e,"isOpen"),o=se(e,"highlightedIndex"),r=se(e,"inputValue");return{highlightedIndex:o<0&&t&&n?e.items.indexOf(t):o,isOpen:n,selectedItem:t,inputValue:r}}function ce(e,t,n,o){var r=e.items,i=e.initialHighlightedIndex,a=e.defaultHighlightedIndex,s=t.selectedItem,l=t.highlightedIndex;return 0===r.length?-1:void 0!==i&&l===i?i:void 0!==a?a:s?0===n?r.indexOf(s):M(n,r.indexOf(s),r.length,o,!1):0===n?-1:n<0?r.length-1:0}function ue(e,t,n,o){var r=(0,c.useRef)({isMouseDown:!1,isTouchMove:!1});return(0,c.useEffect)((function(){var i=function(){r.current.isMouseDown=!0},a=function(i){r.current.isMouseDown=!1,e&&!N(i.target,t.map((function(e){return e.current})),n)&&o()},s=function(){r.current.isTouchMove=!1},l=function(){r.current.isTouchMove=!0},c=function(i){!e||r.current.isTouchMove||N(i.target,t.map((function(e){return e.current})),n,!1)||o()};return n.addEventListener("mousedown",i),n.addEventListener("mouseup",a),n.addEventListener("touchstart",s),n.addEventListener("touchmove",l),n.addEventListener("touchend",c),function(){n.removeEventListener("mousedown",i),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",l),n.removeEventListener("touchend",c)}}),[e,n]),r}var de=function(){return v};function pe(e,t,n){var i=n.isInitialMount,a=n.highlightedIndex,s=n.items,l=n.environment,u=o(n,q);(0,c.useEffect)((function(){i||X((function(){return e(r({highlightedIndex:a,highlightedItem:s[a],resultCount:s.length},u))}),l.document)}),t)}function fe(e){var t=e.highlightedIndex,n=e.isOpen,o=e.itemRefs,r=e.getItemNodeFromIndex,i=e.menuElement,a=e.scrollIntoView,s=(0,c.useRef)(!0);return Y((function(){t<0||!n||!Object.keys(o.current).length||(!1===s.current?s.current=!0:a(r(t),i))}),[t]),s}var he=v;function me(e,t,n){var o,i=t.type,a=t.props;switch(i){case n.ItemMouseMove:o={highlightedIndex:t.index};break;case n.MenuMouseLeave:o={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:ce(a,e,0)};break;case n.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:ce(a,e,0)};break;case n.FunctionCloseMenu:o={isOpen:!1};break;case n.FunctionSetHighlightedIndex:o={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:o={inputValue:t.inputValue};break;case n.FunctionReset:o={highlightedIndex:ae(a,"highlightedIndex"),isOpen:ae(a,"isOpen"),selectedItem:ae(a,"selectedItem"),inputValue:ae(a,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return r({},e,o)}function ge(e){for(var t=e.keysSoFar,n=e.highlightedIndex,o=e.items,r=e.itemToString,i=e.getItemNodeFromIndex,a=t.toLowerCase(),s=0;s<o.length;s++){var l=(s+n+1)%o.length,c=o[l];if(void 0!==c&&r(c).toLowerCase().startsWith(a)){var u=i(l);if(!(null==u?void 0:u.hasAttribute("disabled")))return l}}return n}l().array.isRequired,l().func,l().func,l().func,l().bool,l().number,l().number,l().number,l().bool,l().bool,l().bool,l().any,l().any,l().any,l().string,l().string,l().string,l().func,l().string,l().func,l().func,l().func,l().func,l().func,l().shape({addEventListener:l().func,removeEventListener:l().func,document:l().shape({getElementById:l().func,activeElement:l().any,body:l().any})});var ve=h(h({},ie),{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,o=e.previousResultCount;return t?n?n!==o?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.":"":"No results are available.":""}}),ye=v;var be=Object.freeze({__proto__:null,MenuKeyDownArrowDown:0,MenuKeyDownArrowUp:1,MenuKeyDownEscape:2,MenuKeyDownHome:3,MenuKeyDownEnd:4,MenuKeyDownEnter:5,MenuKeyDownSpaceButton:6,MenuKeyDownCharacter:7,MenuBlur:8,MenuMouseLeave:9,ItemMouseMove:10,ItemClick:11,ToggleButtonClick:12,ToggleButtonKeyDownArrowDown:13,ToggleButtonKeyDownArrowUp:14,ToggleButtonKeyDownCharacter:15,FunctionToggleMenu:16,FunctionOpenMenu:17,FunctionCloseMenu:18,FunctionSetHighlightedIndex:19,FunctionSelectItem:20,FunctionSetInputValue:21,FunctionReset:22});function we(e,t){var n,o=t.type,i=t.props,a=t.shiftKey;switch(o){case 11:n={isOpen:ae(i,"isOpen"),highlightedIndex:ae(i,"highlightedIndex"),selectedItem:i.items[t.index]};break;case 15:var s=t.key,l=""+e.inputValue+s,c=ge({keysSoFar:l,highlightedIndex:e.selectedItem?i.items.indexOf(e.selectedItem):-1,items:i.items,itemToString:i.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex});n=r({inputValue:l},c>=0&&{selectedItem:i.items[c]});break;case 13:n={highlightedIndex:ce(i,e,1,t.getItemNodeFromIndex),isOpen:!0};break;case 14:n={highlightedIndex:ce(i,e,-1,t.getItemNodeFromIndex),isOpen:!0};break;case 5:case 6:n=r({isOpen:ae(i,"isOpen"),highlightedIndex:ae(i,"highlightedIndex")},e.highlightedIndex>=0&&{selectedItem:i.items[e.highlightedIndex]});break;case 3:n={highlightedIndex:_(1,0,i.items.length,t.getItemNodeFromIndex,!1)};break;case 4:n={highlightedIndex:_(-1,i.items.length-1,i.items.length,t.getItemNodeFromIndex,!1)};break;case 2:case 8:n={isOpen:!1,highlightedIndex:-1};break;case 7:var u=t.key,d=""+e.inputValue+u,p=ge({keysSoFar:d,highlightedIndex:e.highlightedIndex,items:i.items,itemToString:i.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex});n=r({inputValue:d},p>=0&&{highlightedIndex:p});break;case 0:n={highlightedIndex:M(a?5:1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,i.circularNavigation)};break;case 1:n={highlightedIndex:M(a?-5:-1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,i.circularNavigation)};break;case 20:n={selectedItem:t.selectedItem};break;default:return me(e,t,be)}return r({},e,n)}var Se=["onMouseLeave","refKey","onKeyDown","onBlur","ref"],Pe=["onClick","onKeyDown","refKey","ref"],Ee=["item","index","onMouseMove","onClick","refKey","ref"];function xe(e){void 0===e&&(e={}),ye(e,xe);var t=r({},ve,e),n=t.items,i=t.scrollIntoView,a=t.environment,s=t.initialIsOpen,l=t.defaultIsOpen,u=t.itemToString,d=t.getA11ySelectionMessage,p=t.getA11yStatusMessage,f=re(we,le(t),t),h=f[0],m=f[1],g=h.isOpen,v=h.highlightedIndex,y=h.selectedItem,b=h.inputValue,E=(0,c.useRef)(null),x=(0,c.useRef)(null),D=(0,c.useRef)({}),C=(0,c.useRef)(!0),k=(0,c.useRef)(null),O=J(t),A=(0,c.useRef)(),T=(0,c.useRef)(!0),I=ne({state:h,props:t}),M=(0,c.useCallback)((function(e){return D.current[O.getItemId(e)]}),[O]);pe(p,[g,v,b,n],r({isInitialMount:T.current,previousResultCount:A.current,items:n,environment:a,itemToString:u},h)),pe(d,[y],r({isInitialMount:T.current,previousResultCount:A.current,items:n,environment:a,itemToString:u},h));var _=fe({menuElement:x.current,highlightedIndex:v,isOpen:g,itemRefs:D,scrollIntoView:i,getItemNodeFromIndex:M});(0,c.useEffect)((function(){return k.current=w((function(e){e({type:21,inputValue:""})}),500),function(){k.current.cancel()}}),[]),(0,c.useEffect)((function(){b&&k.current(m)}),[m,b]),he({isInitialMount:T.current,props:t,state:h}),(0,c.useEffect)((function(){T.current?(s||l||g)&&x.current&&x.current.focus():g?x.current&&x.current.focus():a.document.activeElement===x.current&&E.current&&(C.current=!1,E.current.focus())}),[g]),(0,c.useEffect)((function(){T.current||(A.current=n.length)}));var N=ue(g,[x,E],a,(function(){m({type:8})})),R=de();(0,c.useEffect)((function(){T.current=!1}),[]),(0,c.useEffect)((function(){g||(D.current={})}),[g]);var L=(0,c.useMemo)((function(){return{ArrowDown:function(e){e.preventDefault(),m({type:13,getItemNodeFromIndex:M,shiftKey:e.shiftKey})},ArrowUp:function(e){e.preventDefault(),m({type:14,getItemNodeFromIndex:M,shiftKey:e.shiftKey})}}}),[m,M]),B=(0,c.useMemo)((function(){return{ArrowDown:function(e){e.preventDefault(),m({type:0,getItemNodeFromIndex:M,shiftKey:e.shiftKey})},ArrowUp:function(e){e.preventDefault(),m({type:1,getItemNodeFromIndex:M,shiftKey:e.shiftKey})},Home:function(e){e.preventDefault(),m({type:3,getItemNodeFromIndex:M})},End:function(e){e.preventDefault(),m({type:4,getItemNodeFromIndex:M})},Escape:function(){m({type:2})},Enter:function(e){e.preventDefault(),m({type:5})}," ":function(e){e.preventDefault(),m({type:6})}}}),[m,M]),j=(0,c.useCallback)((function(){m({type:16})}),[m]),z=(0,c.useCallback)((function(){m({type:18})}),[m]),K=(0,c.useCallback)((function(){m({type:17})}),[m]),Z=(0,c.useCallback)((function(e){m({type:19,highlightedIndex:e})}),[m]),U=(0,c.useCallback)((function(e){m({type:20,selectedItem:e})}),[m]),V=(0,c.useCallback)((function(){m({type:22})}),[m]),G=(0,c.useCallback)((function(e){m({type:21,inputValue:e})}),[m]),W=(0,c.useCallback)((function(e){return r({id:O.labelId,htmlFor:O.toggleButtonId},e)}),[O]),q=(0,c.useCallback)((function(e,t){var n,i=void 0===e?{}:e,a=i.onMouseLeave,s=i.refKey,l=void 0===s?"ref":s,c=i.onKeyDown,u=i.onBlur,d=i.ref,p=o(i,Se),f=(void 0===t?{}:t).suppressRefError,h=void 0!==f&&f,g=I.current.state;return R("getMenuProps",h,l,x),r(((n={})[l]=P(d,(function(e){x.current=e})),n.id=O.menuId,n.role="listbox",n["aria-labelledby"]=O.labelId,n.tabIndex=-1,n),g.isOpen&&g.highlightedIndex>-1&&{"aria-activedescendant":O.getItemId(g.highlightedIndex)},{onMouseLeave:S(a,(function(){m({type:9})})),onKeyDown:S(c,(function(e){var t=F(e);t&&B[t]?B[t](e):ee(t)&&m({type:7,key:t,getItemNodeFromIndex:M})})),onBlur:S(u,(function(){!1!==C.current?!N.current.isMouseDown&&m({type:8}):C.current=!0}))},p)}),[m,I,B,N,R,O,M]);return{getToggleButtonProps:(0,c.useCallback)((function(e,t){var n,i=void 0===e?{}:e,a=i.onClick,s=i.onKeyDown,l=i.refKey,c=void 0===l?"ref":l,u=i.ref,d=o(i,Pe),p=(void 0===t?{}:t).suppressRefError,f=void 0!==p&&p,h=r(((n={})[c]=P(u,(function(e){E.current=e})),n.id=O.toggleButtonId,n["aria-haspopup"]="listbox",n["aria-expanded"]=I.current.state.isOpen,n["aria-labelledby"]=O.labelId+" "+O.toggleButtonId,n),d);return d.disabled||(h.onClick=S(a,(function(){m({type:12})})),h.onKeyDown=S(s,(function(e){var t=F(e);t&&L[t]?L[t](e):ee(t)&&m({type:15,key:t,getItemNodeFromIndex:M})}))),R("getToggleButtonProps",f,c,E),h}),[m,I,L,R,O,M]),getLabelProps:W,getMenuProps:q,getItemProps:(0,c.useCallback)((function(e){var t,n=void 0===e?{}:e,i=n.item,a=n.index,s=n.onMouseMove,l=n.onClick,c=n.refKey,u=void 0===c?"ref":c,d=n.ref,p=o(n,Ee),f=I.current,h=f.state,g=f.props,v=Q(a,i,g.items);if(v<0)throw new Error("Pass either item or item index in getItemProps!");var y=r(((t={role:"option","aria-selected":""+(v===h.highlightedIndex),id:O.getItemId(v)})[u]=P(d,(function(e){e&&(D.current[O.getItemId(v)]=e)})),t),p);return p.disabled||(y.onMouseMove=S(s,(function(){a!==h.highlightedIndex&&(_.current=!1,m({type:10,index:a}))})),y.onClick=S(l,(function(){m({type:11,index:a})}))),y}),[m,I,_,O]),toggleMenu:j,openMenu:K,closeMenu:z,setHighlightedIndex:Z,selectItem:U,reset:V,setInputValue:G,highlightedIndex:v,isOpen:g,selectedItem:y,inputValue:b}}xe.stateChangeTypes=be;l().array.isRequired,l().func,l().func,l().func,l().bool,l().number,l().number,l().number,l().bool,l().bool,l().bool,l().any,l().any,l().any,l().string,l().string,l().string,l().string,l().string,l().string,l().func,l().string,l().string,l().func,l().func,l().func,l().func,l().func,l().func,l().shape({addEventListener:l().func,removeEventListener:l().func,document:l().shape({getElementById:l().func,activeElement:l().any,body:l().any})});r({},ie,{getA11yStatusMessage:x,circularNavigation:!0});l().array,l().array,l().array,l().func,l().func,l().func,l().number,l().number,l().number,l().func,l().func,l().string,l().string,l().shape({addEventListener:l().func,removeEventListener:l().func,document:l().shape({getElementById:l().func,activeElement:l().any,body:l().any})})},56781:(e,t)=>{"use strict";var n=60103,o=60106,r=60107,i=60108,a=60114,s=60109,l=60110,c=60112,u=60113,d=60120,p=60115,f=60116,h=60121,m=60122,g=60117,v=60129,y=60131;if("function"==typeof Symbol&&Symbol.for){var b=Symbol.for;n=b("react.element"),o=b("react.portal"),r=b("react.fragment"),i=b("react.strict_mode"),a=b("react.profiler"),s=b("react.provider"),l=b("react.context"),c=b("react.forward_ref"),u=b("react.suspense"),d=b("react.suspense_list"),p=b("react.memo"),f=b("react.lazy"),h=b("react.block"),m=b("react.server.block"),g=b("react.fundamental"),v=b("react.debug_trace_mode"),y=b("react.legacy_hidden")}function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e.type){case r:case a:case i:case u:case d:return e;default:switch(e&&e.$$typeof){case l:case c:case f:case p:case s:return e;default:return t}}case o:return t}}}},21726:(e,t,n)=>{"use strict";n(56781)},64063:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var o,r,i;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((o=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;0!=r--;){var a=i[r];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n}},37529:e=>{var t=-1;function n(e,s,l,c){if(e===s)return e?[[0,e]]:[];if(null!=l){var u=function(e,t,n){var o="number"==typeof n?{index:n,length:0}:n.oldRange,r="number"==typeof n?null:n.newRange,i=e.length,a=t.length;if(0===o.length&&(null===r||0===r.length)){var s=o.index,l=e.slice(0,s),c=e.slice(s),u=r?r.index:null,p=s+a-i;if((null===u||u===p)&&!(p<0||p>a)){var f=t.slice(0,p);if((g=t.slice(p))===c){var h=Math.min(s,p);if((y=l.slice(0,h))===(w=f.slice(0,h)))return d(y,l.slice(h),f.slice(h),c)}}if(null===u||u===s){var m=s,g=(f=t.slice(0,m),t.slice(m));if(f===l){var v=Math.min(i-m,a-m);if((b=c.slice(c.length-v))===(S=g.slice(g.length-v)))return d(l,c.slice(0,c.length-v),g.slice(0,g.length-v),b)}}}if(o.length>0&&r&&0===r.length){var y=e.slice(0,o.index),b=e.slice(o.index+o.length);if(!(a<(h=y.length)+(v=b.length))){var w=t.slice(0,h),S=t.slice(a-v);if(y===w&&b===S)return d(y,e.slice(h,i-v),t.slice(h,a-v),b)}}return null}(e,s,l);if(u)return u}var p=r(e,s),f=e.substring(0,p);p=i(e=e.substring(p),s=s.substring(p));var h=e.substring(e.length-p),m=function(e,a){var s;if(!e)return[[1,a]];if(!a)return[[t,e]];var l=e.length>a.length?e:a,c=e.length>a.length?a:e,u=l.indexOf(c);if(-1!==u)return s=[[1,l.substring(0,u)],[0,c],[1,l.substring(u+c.length)]],e.length>a.length&&(s[0][0]=s[2][0]=t),s;if(1===c.length)return[[t,e],[1,a]];var d=function(e,t){var n=e.length>t.length?e:t,o=e.length>t.length?t:e;if(n.length<4||2*o.length<n.length)return null;function a(e,t,n){for(var o,a,s,l,c=e.substring(n,n+Math.floor(e.length/4)),u=-1,d="";-1!==(u=t.indexOf(c,u+1));){var p=r(e.substring(n),t.substring(u)),f=i(e.substring(0,n),t.substring(0,u));d.length<f+p&&(d=t.substring(u-f,u)+t.substring(u,u+p),o=e.substring(0,n-f),a=e.substring(n+p),s=t.substring(0,u-f),l=t.substring(u+p))}return 2*d.length>=e.length?[o,a,s,l,d]:null}var s,l,c,u,d,p=a(n,o,Math.ceil(n.length/4)),f=a(n,o,Math.ceil(n.length/2));if(!p&&!f)return null;s=f?p&&p[4].length>f[4].length?p:f:p;e.length>t.length?(l=s[0],c=s[1],u=s[2],d=s[3]):(u=s[0],d=s[1],l=s[2],c=s[3]);var h=s[4];return[l,c,u,d,h]}(e,a);if(d){var p=d[0],f=d[1],h=d[2],m=d[3],g=d[4],v=n(p,h),y=n(f,m);return v.concat([[0,g]],y)}return function(e,n){for(var r=e.length,i=n.length,a=Math.ceil((r+i)/2),s=a,l=2*a,c=new Array(l),u=new Array(l),d=0;d<l;d++)c[d]=-1,u[d]=-1;c[s+1]=0,u[s+1]=0;for(var p=r-i,f=p%2!=0,h=0,m=0,g=0,v=0,y=0;y<a;y++){for(var b=-y+h;b<=y-m;b+=2){for(var w=s+b,S=(C=b===-y||b!==y&&c[w-1]<c[w+1]?c[w+1]:c[w-1]+1)-b;C<r&&S<i&&e.charAt(C)===n.charAt(S);)C++,S++;if(c[w]=C,C>r)m+=2;else if(S>i)h+=2;else if(f){if((x=s+p-b)>=0&&x<l&&-1!==u[x])if(C>=(E=r-u[x]))return o(e,n,C,S)}}for(var P=-y+g;P<=y-v;P+=2){for(var E,x=s+P,D=(E=P===-y||P!==y&&u[x-1]<u[x+1]?u[x+1]:u[x-1]+1)-P;E<r&&D<i&&e.charAt(r-E-1)===n.charAt(i-D-1);)E++,D++;if(u[x]=E,E>r)v+=2;else if(D>i)g+=2;else if(!f){if((w=s+p-P)>=0&&w<l&&-1!==c[w]){var C;S=s+(C=c[w])-w;if(C>=(E=r-E))return o(e,n,C,S)}}}}return[[t,e],[1,n]]}(e,a)}(e=e.substring(0,e.length-p),s=s.substring(0,s.length-p));return f&&m.unshift([0,f]),h&&m.push([0,h]),a(m,c),m}function o(e,t,o,r){var i=e.substring(0,o),a=t.substring(0,r),s=e.substring(o),l=t.substring(r),c=n(i,a),u=n(s,l);return c.concat(u)}function r(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;for(var n=0,o=Math.min(e.length,t.length),r=o,i=0;n<r;)e.substring(i,r)==t.substring(i,r)?i=n=r:o=r,r=Math.floor((o-n)/2+n);return s(e.charCodeAt(r-1))&&r--,r}function i(e,t){if(!e||!t||e.slice(-1)!==t.slice(-1))return 0;for(var n=0,o=Math.min(e.length,t.length),r=o,i=0;n<r;)e.substring(e.length-r,e.length-i)==t.substring(t.length-r,t.length-i)?i=n=r:o=r,r=Math.floor((o-n)/2+n);return l(e.charCodeAt(e.length-r))&&r--,r}function a(e,n){e.push([0,""]);for(var o,s=0,l=0,d=0,p="",f="";s<e.length;)if(s<e.length-1&&!e[s][1])e.splice(s,1);else switch(e[s][0]){case 1:d++,f+=e[s][1],s++;break;case t:l++,p+=e[s][1],s++;break;case 0:var h=s-d-l-1;if(n){if(h>=0&&u(e[h][1])){var m=e[h][1].slice(-1);if(e[h][1]=e[h][1].slice(0,-1),p=m+p,f=m+f,!e[h][1]){e.splice(h,1),s--;var g=h-1;e[g]&&1===e[g][0]&&(d++,f=e[g][1]+f,g--),e[g]&&e[g][0]===t&&(l++,p=e[g][1]+p,g--),h=g}}if(c(e[s][1])){m=e[s][1].charAt(0);e[s][1]=e[s][1].slice(1),p+=m,f+=m}}if(s<e.length-1&&!e[s][1]){e.splice(s,1);break}if(p.length>0||f.length>0){p.length>0&&f.length>0&&(0!==(o=r(f,p))&&(h>=0?e[h][1]+=f.substring(0,o):(e.splice(0,0,[0,f.substring(0,o)]),s++),f=f.substring(o),p=p.substring(o)),0!==(o=i(f,p))&&(e[s][1]=f.substring(f.length-o)+e[s][1],f=f.substring(0,f.length-o),p=p.substring(0,p.length-o)));var v=d+l;0===p.length&&0===f.length?(e.splice(s-v,v),s-=v):0===p.length?(e.splice(s-v,v,[1,f]),s=s-v+1):0===f.length?(e.splice(s-v,v,[t,p]),s=s-v+1):(e.splice(s-v,v,[t,p],[1,f]),s=s-v+2)}0!==s&&0===e[s-1][0]?(e[s-1][1]+=e[s][1],e.splice(s,1)):s++,d=0,l=0,p="",f=""}""===e[e.length-1][1]&&e.pop();var y=!1;for(s=1;s<e.length-1;)0===e[s-1][0]&&0===e[s+1][0]&&(e[s][1].substring(e[s][1].length-e[s-1][1].length)===e[s-1][1]?(e[s][1]=e[s-1][1]+e[s][1].substring(0,e[s][1].length-e[s-1][1].length),e[s+1][1]=e[s-1][1]+e[s+1][1],e.splice(s-1,1),y=!0):e[s][1].substring(0,e[s+1][1].length)==e[s+1][1]&&(e[s-1][1]+=e[s+1][1],e[s][1]=e[s][1].substring(e[s+1][1].length)+e[s+1][1],e.splice(s+1,1),y=!0)),s++;y&&a(e,n)}function s(e){return e>=55296&&e<=56319}function l(e){return e>=56320&&e<=57343}function c(e){return l(e.charCodeAt(0))}function u(e){return s(e.charCodeAt(e.length-1))}function d(e,n,o,r){return u(e)||c(r)?null:function(e){for(var t=[],n=0;n<e.length;n++)e[n][1].length>0&&t.push(e[n]);return t}([[0,e],[t,n],[1,o],[0,r]])}function p(e,t,o){return n(e,t,o,!0)}p.INSERT=1,p.DELETE=t,p.EQUAL=0,e.exports=p},53316:e=>{function t(e,t,n,o){var r,i=null==(r=o)||"number"==typeof r||"boolean"==typeof r?o:n(o),a=t.get(i);return void 0===a&&(a=e.call(this,o),t.set(i,a)),a}function n(e,t,n){var o=Array.prototype.slice.call(arguments,3),r=n(o),i=t.get(r);return void 0===i&&(i=e.apply(this,o),t.set(r,i)),i}function o(e,t,n,o,r){return n.bind(t,e,o,r)}function r(e,r){return o(e,this,1===e.length?t:n,r.cache.create(),r.serializer)}function i(){return JSON.stringify(arguments)}function a(){this.cache=Object.create(null)}a.prototype.has=function(e){return e in this.cache},a.prototype.get=function(e){return this.cache[e]},a.prototype.set=function(e,t){this.cache[e]=t};var s={create:function(){return new a}};e.exports=function(e,t){var n=t&&t.cache?t.cache:s,o=t&&t.serializer?t.serializer:i;return(t&&t.strategy?t.strategy:r)(e,{cache:n,serializer:o})},e.exports.strategies={variadic:function(e,t){return o(e,this,n,t.cache.create(),t.serializer)},monadic:function(e,n){return o(e,this,t,n.cache.create(),n.serializer)}}},93162:function(e,t,n){var o,r,i;r=[],o=function(){"use strict";function t(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function o(e,t,n){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){l(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,s=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(e,t,n){var s=a.URL||a.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?i(l):r(l.href)?o(e,t,n):i(l,l.target="_blank")):(l.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(l.href)}),4e4),setTimeout((function(){i(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,a){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,a),n);else if(r(e))o(e,n,a);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){i(s)}))}}:function(e,t,n,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof e)return o(e,t,n);var i="application/octet-stream"===e.type,l=/constructor/i.test(a.HTMLElement)||a.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||i&&l||s)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=e:location=e,r=null},u.readAsDataURL(e)}else{var d=a.URL||a.webkitURL,p=d.createObjectURL(e);r?r.location=p:location.href=p,r=null,setTimeout((function(){d.revokeObjectURL(p)}),4e4)}});a.saveAs=l.saveAs=l,e.exports=l},void 0===(i="function"==typeof o?o.apply(t,r):o)||(e.exports=i)},85628:function(e,t){var n;!function(o){"use strict";var r={s:1,n:0,d:1};function i(e,t){if(isNaN(e=parseInt(e,10)))throw u.InvalidParameter;return e*t}function a(e,t){if(0===t)throw u.DivisionByZero;var n=Object.create(u.prototype);n.s=e<0?-1:1;var o=c(e=e<0?-e:e,t);return n.n=e/o,n.d=t/o,n}function s(e){for(var t={},n=e,o=2,r=4;r<=n;){for(;n%o==0;)n/=o,t[o]=(t[o]||0)+1;r+=1+2*o++}return n!==e?n>1&&(t[n]=(t[n]||0)+1):t[e]=(t[e]||0)+1,t}var l=function(e,t){var n,o=0,a=1,s=1,l=0,c=0,d=0,p=1,f=1,h=0,m=1,g=1,v=1,y=1e7;if(null==e);else if(void 0!==t){if(s=(o=e)*(a=t),o%1!=0||a%1!=0)throw u.NonIntegerParameter}else switch(typeof e){case"object":if("d"in e&&"n"in e)o=e.n,a=e.d,"s"in e&&(o*=e.s);else{if(!(0 in e))throw u.InvalidParameter;o=e[0],1 in e&&(a=e[1])}s=o*a;break;case"number":if(e<0&&(s=e,e=-e),e%1==0)o=e;else if(e>0){for(e>=1&&(e/=f=Math.pow(10,Math.floor(1+Math.log(e)/Math.LN10)));m<=y&&v<=y;){if(e===(n=(h+g)/(m+v))){m+v<=y?(o=h+g,a=m+v):v>m?(o=g,a=v):(o=h,a=m);break}e>n?(h+=g,m+=v):(g+=h,v+=m),m>y?(o=g,a=v):(o=h,a=m)}o*=f}else(isNaN(e)||isNaN(t))&&(a=o=NaN);break;case"string":if(null===(m=e.match(/\d+|./g)))throw u.InvalidParameter;if("-"===m[h]?(s=-1,h++):"+"===m[h]&&h++,m.length===h+1?c=i(m[h++],s):"."===m[h+1]||"."===m[h]?("."!==m[h]&&(l=i(m[h++],s)),(++h+1===m.length||"("===m[h+1]&&")"===m[h+3]||"'"===m[h+1]&&"'"===m[h+3])&&(c=i(m[h],s),p=Math.pow(10,m[h].length),h++),("("===m[h]&&")"===m[h+2]||"'"===m[h]&&"'"===m[h+2])&&(d=i(m[h+1],s),f=Math.pow(10,m[h+1].length)-1,h+=3)):"/"===m[h+1]||":"===m[h+1]?(c=i(m[h],s),p=i(m[h+2],1),h+=3):"/"===m[h+3]&&" "===m[h+1]&&(l=i(m[h],s),c=i(m[h+2],s),p=i(m[h+4],1),h+=5),m.length<=h){s=o=d+(a=p*f)*l+f*c;break}default:throw u.InvalidParameter}if(0===a)throw u.DivisionByZero;r.s=s<0?-1:1,r.n=Math.abs(o),r.d=Math.abs(a)};function c(e,t){if(!e)return t;if(!t)return e;for(;;){if(!(e%=t))return t;if(!(t%=e))return e}}function u(e,t){if(l(e,t),!(this instanceof u))return a(r.s*r.n,r.d);e=c(r.d,r.n),this.s=r.s,this.n=r.n/e,this.d=r.d/e}u.DivisionByZero=new Error("Division by Zero"),u.InvalidParameter=new Error("Invalid argument"),u.NonIntegerParameter=new Error("Parameters must be integer"),u.prototype={s:1,n:0,d:1,abs:function(){return a(this.n,this.d)},neg:function(){return a(-this.s*this.n,this.d)},add:function(e,t){return l(e,t),a(this.s*this.n*r.d+r.s*this.d*r.n,this.d*r.d)},sub:function(e,t){return l(e,t),a(this.s*this.n*r.d-r.s*this.d*r.n,this.d*r.d)},mul:function(e,t){return l(e,t),a(this.s*r.s*this.n*r.n,this.d*r.d)},div:function(e,t){return l(e,t),a(this.s*r.s*this.n*r.d,this.d*r.n)},clone:function(){return a(this.s*this.n,this.d)},mod:function(e,t){if(isNaN(this.n)||isNaN(this.d))return new u(NaN);if(void 0===e)return a(this.s*this.n%this.d,1);if(l(e,t),0===r.n&&0===this.d)throw u.DivisionByZero;return a(this.s*(r.d*this.n)%(r.n*this.d),r.d*this.d)},gcd:function(e,t){return l(e,t),a(c(r.n,this.n)*c(r.d,this.d),r.d*this.d)},lcm:function(e,t){return l(e,t),0===r.n&&0===this.n?a(0,1):a(r.n*this.n,c(r.n,this.n)*c(r.d,this.d))},ceil:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new u(NaN):a(Math.ceil(e*this.s*this.n/this.d),e)},floor:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new u(NaN):a(Math.floor(e*this.s*this.n/this.d),e)},round:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new u(NaN):a(Math.round(e*this.s*this.n/this.d),e)},inverse:function(){return a(this.s*this.d,this.n)},pow:function(e,t){if(l(e,t),1===r.d)return r.s<0?a(Math.pow(this.s*this.d,r.n),Math.pow(this.n,r.n)):a(Math.pow(this.s*this.n,r.n),Math.pow(this.d,r.n));if(this.s<0)return null;var n=s(this.n),o=s(this.d),i=1,c=1;for(var u in n)if("1"!==u){if("0"===u){i=0;break}if(n[u]*=r.n,n[u]%r.d!=0)return null;n[u]/=r.d,i*=Math.pow(u,n[u])}for(var u in o)if("1"!==u){if(o[u]*=r.n,o[u]%r.d!=0)return null;o[u]/=r.d,c*=Math.pow(u,o[u])}return r.s<0?a(c,i):a(i,c)},equals:function(e,t){return l(e,t),this.s*this.n*r.d==r.s*r.n*this.d},compare:function(e,t){l(e,t);var n=this.s*this.n*r.d-r.s*r.n*this.d;return(0<n)-(n<0)},simplify:function(e){if(isNaN(this.n)||isNaN(this.d))return this;e=e||.001;for(var t=this.abs(),n=t.toContinued(),o=1;o<n.length;o++){for(var r=a(n[o-1],1),i=o-2;i>=0;i--)r=r.inverse().add(n[i]);if(r.sub(t).abs().valueOf()<e)return r.mul(this.s)}return this},divisible:function(e,t){return l(e,t),!(!(r.n*this.d)||this.n*r.d%(r.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(e){var t,n="",o=this.n,r=this.d;return this.s<0&&(n+="-"),1===r?n+=o:(e&&(t=Math.floor(o/r))>0&&(n+=t,n+=" ",o%=r),n+=o,n+="/",n+=r),n},toLatex:function(e){var t,n="",o=this.n,r=this.d;return this.s<0&&(n+="-"),1===r?n+=o:(e&&(t=Math.floor(o/r))>0&&(n+=t,o%=r),n+="\\frac{",n+=o,n+="}{",n+=r,n+="}"),n},toContinued:function(){var e,t=this.n,n=this.d,o=[];if(isNaN(t)||isNaN(n))return o;do{o.push(Math.floor(t/n)),e=t%n,t=n,n=e}while(1!==t);return o},toString:function(e){var t=this.n,n=this.d;if(isNaN(t)||isNaN(n))return"NaN";e=e||15;var o=function(e,t){for(;t%2==0;t/=2);for(;t%5==0;t/=5);if(1===t)return 0;for(var n=10%t,o=1;1!==n;o++)if(n=10*n%t,o>2e3)return 0;return o}(0,n),r=function(e,t,n){for(var o=1,r=function(e,t,n){for(var o=1;t>0;e=e*e%n,t>>=1)1&t&&(o=o*e%n);return o}(10,n,t),i=0;i<300;i++){if(o===r)return i;o=10*o%t,r=10*r%t}return 0}(0,n,o),i=this.s<0?"-":"";if(i+=t/n|0,t%=n,(t*=10)&&(i+="."),o){for(var a=r;a--;)i+=t/n|0,t%=n,t*=10;i+="(";for(a=o;a--;)i+=t/n|0,t%=n,t*=10;i+=")"}else for(a=e;t&&a--;)i+=t/n|0,t%=n,t*=10;return i}},void 0===(n=function(){return u}.apply(t,[]))||(e.exports=n)}()},87360:function(e,t){var n,o,r;o=[],void 0===(r="function"==typeof(n=e=>{"use strict";var t=(e,t)=>{if("farzher"==e)return{target:"farzher was here (^-^*)/",score:0,_indexes:[0]};if(!e||!t)return I;var n=c(e);E(t)||(t=l(t));var o=n.bitflags;return(o&t._bitflags)!==o?I:d(n,t)},n=(e,t,n)=>{if("farzher"==e)return[{target:"farzher was here (^-^*)/",score:0,_indexes:[0],obj:t?t[0]:I}];if(!e)return n&&n.all?u(e,t,n):C;var o=c(e),r=o.bitflags,i=(o.containsSpace,n&&n.threshold||D),a=n&&n.limit||x,s=0,p=0,f=t.length;if(n&&n.key)for(var h=n.key,m=0;m<f;++m){var g=t[m];(A=P(g,h))&&(E(A)||(A=l(A)),(r&A._bitflags)===r&&(T=d(o,A))!==I&&(T.score<i||(T={target:T.target,_targetLower:"",_targetLowerCodes:I,_nextBeginningIndexes:I,_bitflags:0,score:T.score,_indexes:T._indexes,obj:g},s<a?(F.add(T),++s):(++p,T.score>F.peek().score&&F.replaceTop(T)))))}else if(n&&n.keys){var v=n.scoreFn||S,y=n.keys,b=y.length;for(m=0;m<f;++m){g=t[m];for(var w=new Array(b),k=0;k<b;++k)h=y[k],(A=P(g,h))?(E(A)||(A=l(A)),(r&A._bitflags)!==r?w[k]=I:w[k]=d(o,A)):w[k]=I;w.obj=g;var O=v(w);O!==I&&(O<i||(w.score=O,s<a?(F.add(w),++s):(++p,O>F.peek().score&&F.replaceTop(w))))}}else for(m=0;m<f;++m){var A,T;(A=t[m])&&(E(A)||(A=l(A)),(r&A._bitflags)===r&&(T=d(o,A))!==I&&(T.score<i||(s<a?(F.add(T),++s):(++p,T.score>F.peek().score&&F.replaceTop(T)))))}if(0===s)return C;var M=new Array(s);for(m=s-1;m>=0;--m)M[m]=F.poll();return M.total=s+p,M},o=(e,t,n)=>{if("function"==typeof t)return r(e,t);if(e===I)return I;void 0===t&&(t="<b>"),void 0===n&&(n="</b>");var o="",i=0,a=!1,s=e.target,l=s.length,c=e._indexes;c=c.slice(0,c.len).sort(((e,t)=>e-t));for(var u=0;u<l;++u){var d=s[u];if(c[i]===u){if(a||(a=!0,o+=t),++i===c.length){o+=d+n+s.substr(u+1);break}}else a&&(a=!1,o+=n);o+=d}return o},r=(e,t)=>{if(e===I)return I;var n=e.target,o=n.length,r=e._indexes;r=r.slice(0,r.len).sort(((e,t)=>e-t));for(var i="",a=0,s=0,l=!1,c=(e=[],0);c<o;++c){var u=n[c];if(r[s]===c){if(++s,l||(l=!0,e.push(i),i=""),s===r.length){i+=u,e.push(t(i,a++)),i="",e.push(n.substr(c+1));break}}else l&&(l=!1,e.push(t(i,a++)),i="");i+=u}return e},i=e=>e._indexes.slice(0,e._indexes.len).sort(((e,t)=>e-t)),a=e=>{"string"!=typeof e&&(e="");var t=f(e);return{target:e,_targetLower:t._lower,_targetLowerCodes:t.lowerCodes,_nextBeginningIndexes:I,_bitflags:t.bitflags,score:I,_indexes:[0],obj:I}},s=e=>{"string"!=typeof e&&(e=""),e=e.trim();var t=f(e),n=[];if(t.containsSpace){var o=e.split(/\s+/);o=[...new Set(o)];for(var r=0;r<o.length;r++)if(""!==o[r]){var i=f(o[r]);n.push({lowerCodes:i.lowerCodes,_lower:o[r].toLowerCase(),containsSpace:!1})}}return{lowerCodes:t.lowerCodes,bitflags:t.bitflags,containsSpace:t.containsSpace,_lower:t._lower,spaceSearches:n}},l=e=>{if(e.length>999)return a(e);var t=v.get(e);return void 0!==t||(t=a(e),v.set(e,t)),t},c=e=>{if(e.length>999)return s(e);var t=y.get(e);return void 0!==t||(t=s(e),y.set(e,t)),t},u=(e,t,n)=>{var o=[];o.total=t.length;var r=n&&n.limit||x;if(n&&n.key)for(var i=0;i<t.length;i++){var a=t[i];if(d=P(a,n.key)){E(d)||(d=l(d)),d.score=D,d._indexes.len=0;var s=d;if(s={target:s.target,_targetLower:"",_targetLowerCodes:I,_nextBeginningIndexes:I,_bitflags:0,score:d.score,_indexes:I,obj:a},o.push(s),o.length>=r)return o}}else if(n&&n.keys)for(i=0;i<t.length;i++){a=t[i];for(var c=new Array(n.keys.length),u=n.keys.length-1;u>=0;--u)(d=P(a,n.keys[u]))?(E(d)||(d=l(d)),d.score=D,d._indexes.len=0,c[u]=d):c[u]=I;if(c.obj=a,c.score=D,o.push(c),o.length>=r)return o}else for(i=0;i<t.length;i++){var d;if((d=t[i])&&(E(d)||(d=l(d)),d.score=D,d._indexes.len=0,o.push(d),o.length>=r))return o}return o},d=(e,t,n=!1)=>{if(!1===n&&e.containsSpace)return p(e,t);for(var o=e._lower,r=e.lowerCodes,i=r[0],a=t._targetLowerCodes,s=r.length,l=a.length,c=0,u=0,d=0;;){if(i===a[u]){if(b[d++]=u,++c===s)break;i=r[c]}if(++u>=l)return I}c=0;var f=!1,h=0,g=t._nextBeginningIndexes;g===I&&(g=t._nextBeginningIndexes=m(t.target)),u=0===b[0]?0:g[b[0]-1];var v=0;if(u!==l)for(;;)if(u>=l){if(c<=0)break;if(++v>200)break;--c,u=g[w[--h]]}else if(r[c]===a[u]){if(w[h++]=u,++c===s){f=!0;break}++u}else u=g[u];var y=t._targetLower.indexOf(o,b[0]),S=~y;if(S&&!f)for(var P=0;P<d;++P)b[P]=y+P;var E=!1;if(S&&(E=t._nextBeginningIndexes[y-1]===y),f)var x=w,D=h;else x=b,D=d;var C=0,k=0;for(P=1;P<s;++P)x[P]-x[P-1]!=1&&(C-=x[P],++k);if(C-=(x[s-1]-x[0]-(s-1)+12)*k,0!==x[0]&&(C-=x[0]*x[0]*.2),f){var O=1;for(P=g[0];P<l;P=g[P])++O;O>24&&(C*=10*(O-24))}else C*=1e3;for(S&&(C/=1+s*s*1),E&&(C/=1+s*s*1),C-=l-s,t.score=C,P=0;P<D;++P)t._indexes[P]=x[P];return t._indexes.len=D,t},p=(e,t)=>{for(var n=new Set,o=0,r=I,i=0,a=e.spaceSearches,s=0;s<a.length;++s){var l=a[s];if((r=d(l,t))===I)return I;o+=r.score,r._indexes[0]<i&&(o-=i-r._indexes[0]),i=r._indexes[0];for(var c=0;c<r._indexes.len;++c)n.add(r._indexes[c])}var u=d(e,t,!0);if(u!==I&&u.score>o)return u;r.score=o,s=0;for(let e of n)r._indexes[s++]=e;return r._indexes.len=s,r},f=e=>{for(var t=e.length,n=e.toLowerCase(),o=[],r=0,i=!1,a=0;a<t;++a){var s=o[a]=n.charCodeAt(a);32!==s?r|=1<<(s>=97&&s<=122?s-97:s>=48&&s<=57?26:s<=127?30:31):i=!0}return{lowerCodes:o,bitflags:r,containsSpace:i,_lower:n}},h=e=>{for(var t=e.length,n=[],o=0,r=!1,i=!1,a=0;a<t;++a){var s=e.charCodeAt(a),l=s>=65&&s<=90,c=l||s>=97&&s<=122||s>=48&&s<=57,u=l&&!r||!i||!c;r=l,i=c,u&&(n[o++]=a)}return n},m=e=>{for(var t=e.length,n=h(e),o=[],r=n[0],i=0,a=0;a<t;++a)r>a?o[a]=r:(r=n[++i],o[a]=void 0===r?t:r);return o},g=()=>{v.clear(),y.clear(),b=[],w=[]},v=new Map,y=new Map,b=[],w=[],S=e=>{for(var t=D,n=e.length,o=0;o<n;++o){var r=e[o];if(r!==I){var i=r.score;i>t&&(t=i)}}return t===D?I:t},P=(e,t)=>{var n=e[t];if(void 0!==n)return n;var o=t;Array.isArray(t)||(o=t.split("."));for(var r=o.length,i=-1;e&&++i<r;)e=e[o[i]];return e},E=e=>"object"==typeof e,x=1/0,D=-x,C=[];C.total=0;var k,O,A,T,I=null,F=(k=[],O=0,T=e=>{for(var t=0,n=k[t],o=1;o<O;){var r=o+1;t=o,r<O&&k[r].score<k[o].score&&(t=r),k[t-1>>1]=k[t],o=1+(t<<1)}for(var i=t-1>>1;t>0&&n.score<k[i].score;i=(t=i)-1>>1)k[t]=k[i];k[t]=n},(A={}).add=e=>{var t=O;k[O++]=e;for(var n=t-1>>1;t>0&&e.score<k[n].score;n=(t=n)-1>>1)k[t]=k[n];k[t]=e},A.poll=e=>{if(0!==O){var t=k[0];return k[0]=k[--O],T(),t}},A.peek=e=>{if(0!==O)return k[0]},A.replaceTop=e=>{k[0]=e,T()},A);return{single:t,go:n,highlight:o,prepare:a,indexes:i,cleanup:g}})?n.apply(t,o):n)||(e.exports=r)},3513:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(67294),i=o(n(83057));t.default=(e,t,n)=>(0,i.default)(r.useCallback,e,t,n)},7167:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(67294),i=o(n(83057));t.default=(e,t,n)=>(0,i.default)(r.useEffect,e,t,n)},83057:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(67294);t.default=(e,t,n,r)=>{const i=(0,o.useRef)();return i.current&&n.every(((e,t)=>Object.is(e,i.current[t])))||(i.current=[...n,...r]),e(t,i.current)}},33063:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(67294),i=o(n(83057));t.default=(e,t,n)=>(0,i.default)(r.useLayoutEffect,e,t,n)},63346:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(67294),i=o(n(83057));t.default=(e,t,n)=>(0,i.default)(r.useMemo,e,t,n)},45071:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useGranularMemo=t.useGranularLayoutEffect=t.useGranularHook=t.useGranularEffect=t.useGranularCallback=void 0;var r=n(3513);Object.defineProperty(t,"useGranularCallback",{enumerable:!0,get:function(){return o(r).default}});var i=n(7167);Object.defineProperty(t,"useGranularEffect",{enumerable:!0,get:function(){return o(i).default}});var a=n(83057);Object.defineProperty(t,"useGranularHook",{enumerable:!0,get:function(){return o(a).default}});var s=n(33063);Object.defineProperty(t,"useGranularLayoutEffect",{enumerable:!0,get:function(){return o(s).default}});var l=n(63346);Object.defineProperty(t,"useGranularMemo",{enumerable:!0,get:function(){return o(l).default}})},8679:(e,t,n)=>{"use strict";var o=n(59864),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return o.isMemo(e)?a:s[e.$$typeof]||r}s[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[o.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,o){if("string"!=typeof n){if(h){var r=f(n);r&&r!==h&&e(t,r,o)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),g=0;g<a.length;++g){var v=a[g];if(!(i[v]||o&&o[v]||m&&m[v]||s&&s[v])){var y=p(n,v);try{c(t,v,y)}catch(e){}}}}return t}},35369:(e,t,n)=>{"use strict";n.d(t,{D5:()=>Dt,WV:()=>to,aV:()=>$t,d0:()=>lo,dM:()=>W,hU:()=>Xn,is:()=>le,l4:()=>kn,t8:()=>nt,zN:()=>un});var o=32,r=31,i={};function a(e){e&&(e.value=!0)}function s(){}function l(e){return void 0===e.size&&(e.size=e.__iterate(u)),e.size}function c(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?l(e)+t:t}function u(){return!0}function d(e,t,n){return(0===e&&!m(e)||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function p(e,t){return h(e,t,0)}function f(e,t){return h(e,t,t)}function h(e,t,n){return void 0===e?n:m(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function m(e){return e<0||0===e&&1/e==-1/0}var g="@@__IMMUTABLE_ITERABLE__@@";function v(e){return Boolean(e&&e[g])}var y="@@__IMMUTABLE_KEYED__@@";function b(e){return Boolean(e&&e[y])}var w="@@__IMMUTABLE_INDEXED__@@";function S(e){return Boolean(e&&e[w])}function P(e){return b(e)||S(e)}var E=function(e){return v(e)?e:W(e)},x=function(e){function t(e){return b(e)?e:q(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(E),D=function(e){function t(e){return S(e)?e:H(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(E),C=function(e){function t(e){return v(e)&&!P(e)?e:$(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(E);E.Keyed=x,E.Indexed=D,E.Set=C;var k="@@__IMMUTABLE_SEQ__@@";function O(e){return Boolean(e&&e[k])}var A="@@__IMMUTABLE_RECORD__@@";function T(e){return Boolean(e&&e[A])}function I(e){return v(e)||T(e)}var F="@@__IMMUTABLE_ORDERED__@@";function M(e){return Boolean(e&&e[F])}var _="function"==typeof Symbol&&Symbol.iterator,N="@@iterator",R=_||N,L=function(e){this.next=e};function B(e,t,n,o){var r=0===e?t:1===e?n:[t,n];return o?o.value=r:o={value:r,done:!1},o}function j(){return{value:void 0,done:!0}}function z(e){return!!U(e)}function K(e){return e&&"function"==typeof e.next}function Z(e){var t=U(e);return t&&t.call(e)}function U(e){var t=e&&(_&&e[_]||e["@@iterator"]);if("function"==typeof t)return t}L.prototype.toString=function(){return"[Iterator]"},L.KEYS=0,L.VALUES=1,L.ENTRIES=2,L.prototype.inspect=L.prototype.toSource=function(){return this.toString()},L.prototype[R]=function(){return this};var V=Object.prototype.hasOwnProperty;function G(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var W=function(e){function t(e){return null==e?ee():I(e)?e.toSeq():function(e){var t=oe(e);if(t)return t;if("object"==typeof e)return new Y(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var o=n.length,r=0;r!==o;){var i=n[t?o-++r:r++];if(!1===e(i[1],i[0],this))break}return r}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var n=this._cache;if(n){var o=n.length,r=0;return new L((function(){if(r===o)return{value:void 0,done:!0};var i=n[t?o-++r:r++];return B(e,i[0],i[1])}))}return this.__iteratorUncached(e,t)},t}(E),q=function(e){function t(e){return null==e?ee().toKeyedSeq():v(e)?b(e)?e.toSeq():e.fromEntrySeq():T(e)?e.toSeq():te(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(W),H=function(e){function t(e){return null==e?ee():v(e)?b(e)?e.entrySeq():e.toIndexedSeq():T(e)?e.toSeq().entrySeq():ne(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(W),$=function(e){function t(e){return(v(e)&&!P(e)?e:H(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(W);W.isSeq=O,W.Keyed=q,W.Set=$,W.Indexed=H,W.prototype[k]=!0;var X=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[c(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,o=n.length,r=0;r!==o;){var i=t?o-++r:r++;if(!1===e(n[i],i,this))break}return r},t.prototype.__iterator=function(e,t){var n=this._array,o=n.length,r=0;return new L((function(){if(r===o)return{value:void 0,done:!0};var i=t?o-++r:r++;return B(e,i,n[i])}))},t}(H),Y=function(e){function t(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return V.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,o=this._keys,r=o.length,i=0;i!==r;){var a=o[t?r-++i:i++];if(!1===e(n[a],a,this))break}return i},t.prototype.__iterator=function(e,t){var n=this._object,o=this._keys,r=o.length,i=0;return new L((function(){if(i===r)return{value:void 0,done:!0};var a=o[t?r-++i:i++];return B(e,a,n[a])}))},t}(q);Y.prototype[F]=!0;var J,Q=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=Z(this._collection),o=0;if(K(n))for(var r;!(r=n.next()).done&&!1!==e(r.value,o++,this););return o},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=Z(this._collection);if(!K(n))return new L(j);var o=0;return new L((function(){var t=n.next();return t.done?t:B(e,o++,t.value)}))},t}(H);function ee(){return J||(J=new X([]))}function te(e){var t=Array.isArray(e)?new X(e):z(e)?new Q(e):void 0;if(t)return t.fromEntrySeq();if("object"==typeof e)return new Y(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function ne(e){var t=oe(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function oe(e){return G(e)?new X(e):z(e)?new Q(e):void 0}var re="@@__IMMUTABLE_MAP__@@";function ie(e){return Boolean(e&&e[re])}function ae(e){return ie(e)&&M(e)}function se(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function le(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(se(e)&&se(t)&&e.equals(t))}var ce="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),o=65535&(t|=0);return n*o+((e>>>16)*o+n*(t>>>16)<<16>>>0)|0};function ue(e){return e>>>1&1073741824|3221225471&e}function de(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return ue(n)}if("string"===t)return e.length>be?function(e){var t=Pe[e];void 0===t&&(t=pe(e),Se===we&&(Se=0,Pe={}),Se++,Pe[e]=t);return t}(e):pe(e);if("function"==typeof e.hashCode)return ue(e.hashCode());if("object"===t||"function"===t)return function(e){var t;if(ge&&void 0!==(t=me.get(e)))return t;if(void 0!==(t=e[ye]))return t;if(!he){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[ye]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}t=++ve,1073741824&ve&&(ve=0);if(ge)me.set(e,t);else{if(void 0!==fe&&!1===fe(e))throw new Error("Non-extensible objects are not allowed as keys.");if(he)Object.defineProperty(e,ye,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[ye]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[ye]=t}}return t}(e);if("function"==typeof e.toString)return pe(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function pe(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return ue(t)}var fe=Object.isExtensible,he=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();var me,ge="function"==typeof WeakMap;ge&&(me=new WeakMap);var ve=0,ye="__immutablehash__";"function"==typeof Symbol&&(ye=Symbol(ye));var be=16,we=255,Se=0,Pe={},Ee=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=Ae(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var n=this,o=Oe(this,e,t);return this._useKeys||(o.valueSeq=function(){return n._iter.toSeq().map(e,t)}),o},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t,o){return e(t,o,n)}),t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(q);Ee.prototype[F]=!0;var xe=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this,o=0;return t&&l(this),this._iter.__iterate((function(r){return e(r,t?n.size-++o:o++,n)}),t)},t.prototype.__iterator=function(e,t){var n=this,o=this._iter.__iterator(1,t),r=0;return t&&l(this),new L((function(){var i=o.next();return i.done?i:B(e,t?n.size-++r:r++,i.value,i)}))},t}(H),De=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){return e(t,t,n)}),t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new L((function(){var t=n.next();return t.done?t:B(e,t.value,t.value,t)}))},t}($),Ce=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){if(t){ze(t);var o=v(t);return e(o?t.get(1):t[1],o?t.get(0):t[0],n)}}),t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new L((function(){for(;;){var t=n.next();if(t.done)return t;var o=t.value;if(o){ze(o);var r=v(o);return B(e,r?o.get(0):o[0],r?o.get(1):o[1],t)}}}))},t}(q);function ke(e){var t=Ze(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Ue,t.__iterateUncached=function(t,n){var o=this;return e.__iterate((function(e,n){return!1!==t(n,e,o)}),n)},t.__iteratorUncached=function(t,n){if(2===t){var o=e.__iterator(t,n);return new L((function(){var e=o.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(1===t?0:1,n)},t}function Oe(e,t,n){var o=Ze(e);return o.size=e.size,o.has=function(t){return e.has(t)},o.get=function(o,r){var a=e.get(o,i);return a===i?r:t.call(n,a,o,e)},o.__iterateUncached=function(o,r){var i=this;return e.__iterate((function(e,r,a){return!1!==o(t.call(n,e,r,a),r,i)}),r)},o.__iteratorUncached=function(o,r){var i=e.__iterator(2,r);return new L((function(){var r=i.next();if(r.done)return r;var a=r.value,s=a[0];return B(o,s,t.call(n,a[1],s,e),r)}))},o}function Ae(e,t){var n=this,o=Ze(e);return o._iter=e,o.size=e.size,o.reverse=function(){return e},e.flip&&(o.flip=function(){var t=ke(e);return t.reverse=function(){return e.flip()},t}),o.get=function(n,o){return e.get(t?n:-1-n,o)},o.has=function(n){return e.has(t?n:-1-n)},o.includes=function(t){return e.includes(t)},o.cacheResult=Ue,o.__iterate=function(n,o){var r=this,i=0;return o&&l(e),e.__iterate((function(e,a){return n(e,t?a:o?r.size-++i:i++,r)}),!o)},o.__iterator=function(o,r){var i=0;r&&l(e);var a=e.__iterator(2,!r);return new L((function(){var e=a.next();if(e.done)return e;var s=e.value;return B(o,t?s[0]:r?n.size-++i:i++,s[1],e)}))},o}function Te(e,t,n,o){var r=Ze(e);return o&&(r.has=function(o){var r=e.get(o,i);return r!==i&&!!t.call(n,r,o,e)},r.get=function(o,r){var a=e.get(o,i);return a!==i&&t.call(n,a,o,e)?a:r}),r.__iterateUncached=function(r,i){var a=this,s=0;return e.__iterate((function(e,i,l){if(t.call(n,e,i,l))return s++,r(e,o?i:s-1,a)}),i),s},r.__iteratorUncached=function(r,i){var a=e.__iterator(2,i),s=0;return new L((function(){for(;;){var i=a.next();if(i.done)return i;var l=i.value,c=l[0],u=l[1];if(t.call(n,u,c,e))return B(r,o?c:s++,u,i)}}))},r}function Ie(e,t,n,o){var r=e.size;if(d(t,n,r))return e;var i=p(t,r),a=f(n,r);if(i!=i||a!=a)return Ie(e.toSeq().cacheResult(),t,n,o);var s,l=a-i;l==l&&(s=l<0?0:l);var u=Ze(e);return u.size=0===s?s:e.size&&s||void 0,!o&&O(e)&&s>=0&&(u.get=function(t,n){return(t=c(this,t))>=0&&t<s?e.get(t+i,n):n}),u.__iterateUncached=function(t,n){var r=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(t,n);var a=0,l=!0,c=0;return e.__iterate((function(e,n){if(!l||!(l=a++<i))return c++,!1!==t(e,o?n:c-1,r)&&c!==s})),c},u.__iteratorUncached=function(t,n){if(0!==s&&n)return this.cacheResult().__iterator(t,n);if(0===s)return new L(j);var r=e.__iterator(t,n),a=0,l=0;return new L((function(){for(;a++<i;)r.next();if(++l>s)return{value:void 0,done:!0};var e=r.next();return o||1===t||e.done?e:B(t,l-1,0===t?void 0:e.value[1],e)}))},u}function Fe(e,t,n,o){var r=Ze(e);return r.__iterateUncached=function(r,i){var a=this;if(i)return this.cacheResult().__iterate(r,i);var s=!0,l=0;return e.__iterate((function(e,i,c){if(!s||!(s=t.call(n,e,i,c)))return l++,r(e,o?i:l-1,a)})),l},r.__iteratorUncached=function(r,i){var a=this;if(i)return this.cacheResult().__iterator(r,i);var s=e.__iterator(2,i),l=!0,c=0;return new L((function(){var e,i,u;do{if((e=s.next()).done)return o||1===r?e:B(r,c++,0===r?void 0:e.value[1],e);var d=e.value;i=d[0],u=d[1],l&&(l=t.call(n,u,i,a))}while(l);return 2===r?e:B(r,i,u,e)}))},r}function Me(e,t){var n=b(e),o=[e].concat(t).map((function(e){return v(e)?n&&(e=x(e)):e=n?te(e):ne(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var r=o[0];if(r===e||n&&b(r)||S(e)&&S(r))return r}var i=new X(o);return n?i=i.toKeyedSeq():S(e)||(i=i.toSetSeq()),(i=i.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),i}function _e(e,t,n){var o=Ze(e);return o.__iterateUncached=function(r,i){if(i)return this.cacheResult().__iterate(r,i);var a=0,s=!1;return function e(l,c){l.__iterate((function(i,l){return(!t||c<t)&&v(i)?e(i,c+1):(a++,!1===r(i,n?l:a-1,o)&&(s=!0)),!s}),i)}(e,0),a},o.__iteratorUncached=function(o,r){if(r)return this.cacheResult().__iterator(o,r);var i=e.__iterator(o,r),a=[],s=0;return new L((function(){for(;i;){var e=i.next();if(!1===e.done){var l=e.value;if(2===o&&(l=l[1]),t&&!(a.length<t)||!v(l))return n?e:B(o,s++,l,e);a.push(i),i=l.__iterator(o,r)}else i=a.pop()}return{value:void 0,done:!0}}))},o}function Ne(e,t,n){t||(t=Ve);var o=b(e),r=0,i=e.toSeq().map((function(t,o){return[o,t,r++,n?n(t,o,e):t]})).valueSeq().toArray();return i.sort((function(e,n){return t(e[3],n[3])||e[2]-n[2]})).forEach(o?function(e,t){i[t].length=2}:function(e,t){i[t]=e[1]}),o?q(i):S(e)?H(i):$(i)}function Re(e,t,n){if(t||(t=Ve),n){var o=e.toSeq().map((function(t,o){return[t,n(t,o,e)]})).reduce((function(e,n){return Le(t,e[1],n[1])?n:e}));return o&&o[0]}return e.reduce((function(e,n){return Le(t,e,n)?n:e}))}function Le(e,t,n){var o=e(n,t);return 0===o&&n!==t&&(null==n||n!=n)||o>0}function Be(e,t,n,o){var r=Ze(e),i=new X(n).map((function(e){return e.size}));return r.size=o?i.max():i.min(),r.__iterate=function(e,t){for(var n,o=this.__iterator(1,t),r=0;!(n=o.next()).done&&!1!==e(n.value,r++,this););return r},r.__iteratorUncached=function(e,r){var i=n.map((function(e){return e=E(e),Z(r?e.reverse():e)})),a=0,s=!1;return new L((function(){var n;return s||(n=i.map((function(e){return e.next()})),s=o?n.every((function(e){return e.done})):n.some((function(e){return e.done}))),s?{value:void 0,done:!0}:B(e,a++,t.apply(null,n.map((function(e){return e.value}))))}))},r}function je(e,t){return e===t?e:O(e)?t:e.constructor(t)}function ze(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ke(e){return b(e)?x:S(e)?D:C}function Ze(e){return Object.create((b(e)?q:S(e)?H:$).prototype)}function Ue(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):W.prototype.cacheResult.call(this)}function Ve(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e<t?-1:0}function Ge(e,t){t=t||0;for(var n=Math.max(0,e.length-t),o=new Array(n),r=0;r<n;r++)o[r]=e[r+t];return o}function We(e,t){if(!e)throw new Error(t)}function qe(e){We(e!==1/0,"Cannot perform this action with an infinite size.")}function He(e){if(G(e)&&"string"!=typeof e)return e;if(M(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}function $e(e){return e&&(e.constructor&&"Object"===e.constructor.name||void 0===e.constructor)}function Xe(e){return"object"==typeof e&&(I(e)||Array.isArray(e)||$e(e))}function Ye(e){try{return"string"==typeof e?JSON.stringify(e):String(e)}catch(t){return JSON.stringify(e)}}function Je(e,t){return I(e)?e.has(t):Xe(e)&&V.call(e,t)}function Qe(e,t,n){return I(e)?e.get(t,n):Je(e,t)?"function"==typeof e.get?e.get(t):e[t]:n}function et(e){if(Array.isArray(e))return Ge(e);var t={};for(var n in e)V.call(e,n)&&(t[n]=e[n]);return t}function tt(e,t){if(!Xe(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(I(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!V.call(e,t))return e;var n=et(e);return Array.isArray(n)?n.splice(t,1):delete n[t],n}function nt(e,t,n){if(!Xe(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(I(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,n)}if(V.call(e,t)&&n===e[t])return e;var o=et(e);return o[t]=n,o}function ot(e,t,n,o){o||(o=n,n=void 0);var r=rt(I(e),e,He(t),0,n,o);return r===i?n:r}function rt(e,t,n,o,r,a){var s=t===i;if(o===n.length){var l=s?r:t,c=a(l);return c===l?t:c}if(!s&&!Xe(t))throw new TypeError("Cannot update within non-data-structure value in path ["+n.slice(0,o).map(Ye)+"]: "+t);var u=n[o],d=s?i:Qe(t,u,i),p=rt(d===i?e:I(d),d,n,o+1,r,a);return p===d?t:p===i?tt(t,u):nt(s?e?Lt():{}:t,u,p)}function it(e,t,n){return ot(e,t,i,(function(){return n}))}function at(e,t){return it(this,e,t)}function st(e,t){return ot(e,t,(function(){return i}))}function lt(e){return st(this,e)}function ct(e,t,n,o){return ot(e,[t],n,o)}function ut(e,t,n){return 1===arguments.length?e(this):ct(this,e,t,n)}function dt(e,t,n){return ot(this,e,t,n)}function pt(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return ht(this,e)}function ft(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return ht(this,t,e)}function ht(e,t,n){for(var o=[],r=0;r<t.length;r++){var a=x(t[r]);0!==a.size&&o.push(a)}return 0===o.length?e:0!==e.toSeq().size||e.__ownerID||1!==o.length?e.withMutations((function(e){for(var t=n?function(t,o){ct(e,o,i,(function(e){return e===i?t:n(e,t,o)}))}:function(t,n){e.set(n,t)},r=0;r<o.length;r++)o[r].forEach(t)})):e.constructor(o[0])}function mt(e,t,n){return gt(e,t,function(e){function t(n,o,r){return Xe(n)&&Xe(o)?gt(n,[o],t):e?e(n,o,r):o}return t}(n))}function gt(e,t,n){if(!Xe(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(I(e))return"function"==typeof n&&e.mergeWith?e.mergeWith.apply(e,[n].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var o=Array.isArray(e),r=e,i=o?D:x,a=o?function(t){r===e&&(r=et(r)),r.push(t)}:function(t,o){var i=V.call(r,o),a=i&&n?n(r[o],t,o):t;i&&a===r[o]||(r===e&&(r=et(r)),r[o]=a)},s=0;s<t.length;s++)i(t[s]).forEach(a);return r}function vt(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return mt(this,e)}function yt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return mt(this,t,e)}function bt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return ot(this,e,Lt(),(function(e){return gt(e,t)}))}function wt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return ot(this,e,Lt(),(function(e){return mt(e,t)}))}function St(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Pt(){return this.__ownerID?this:this.__ensureOwner(new s)}function Et(){return this.__ensureOwner()}function xt(){return this.__altered}xe.prototype.cacheResult=Ee.prototype.cacheResult=De.prototype.cacheResult=Ce.prototype.cacheResult=Ue;var Dt=function(e){function t(t){return null==t?Lt():ie(t)&&!M(t)?t:Lt().withMutations((function(n){var o=e(t);qe(o.size),o.forEach((function(e,t){return n.set(t,e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Lt().withMutations((function(t){for(var n=0;n<e.length;n+=2){if(n+1>=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}}))},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return Bt(this,e,t)},t.prototype.remove=function(e){return Bt(this,e,i)},t.prototype.deleteAll=function(e){var t=E(e);return 0===t.size?this:this.withMutations((function(e){t.forEach((function(t){return e.remove(t)}))}))},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Lt()},t.prototype.sort=function(e){return un(Ne(this,e))},t.prototype.sortBy=function(e,t){return un(Ne(this,t,e))},t.prototype.map=function(e,t){return this.withMutations((function(n){n.forEach((function(o,r){n.set(r,e.call(t,o,r,n))}))}))},t.prototype.__iterator=function(e,t){return new Mt(this,e,t)},t.prototype.__iterate=function(e,t){var n=this,o=0;return this._root&&this._root.iterate((function(t){return o++,e(t[1],t[0],n)}),t),o},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Rt(this.size,this._root,e,this.__hash):0===this.size?Lt():(this.__ownerID=e,this.__altered=!1,this)},t}(x);Dt.isMap=ie;var Ct=Dt.prototype;Ct[re]=!0,Ct.delete=Ct.remove,Ct.removeAll=Ct.deleteAll,Ct.setIn=at,Ct.removeIn=Ct.deleteIn=lt,Ct.update=ut,Ct.updateIn=dt,Ct.merge=Ct.concat=pt,Ct.mergeWith=ft,Ct.mergeDeep=vt,Ct.mergeDeepWith=yt,Ct.mergeIn=bt,Ct.mergeDeepIn=wt,Ct.withMutations=St,Ct.wasAltered=xt,Ct.asImmutable=Et,Ct["@@transducer/init"]=Ct.asMutable=Pt,Ct["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},Ct["@@transducer/result"]=function(e){return e.asImmutable()};var kt=function(e,t){this.ownerID=e,this.entries=t};kt.prototype.get=function(e,t,n,o){for(var r=this.entries,i=0,a=r.length;i<a;i++)if(le(n,r[i][0]))return r[i][1];return o},kt.prototype.update=function(e,t,n,o,r,l,c){for(var u=r===i,d=this.entries,p=0,f=d.length;p<f&&!le(o,d[p][0]);p++);var h=p<f;if(h?d[p][1]===r:u)return this;if(a(c),(u||!h)&&a(l),!u||1!==d.length){if(!h&&!u&&d.length>=Vt)return function(e,t,n,o){e||(e=new s);for(var r=new It(e,de(n),[n,o]),i=0;i<t.length;i++){var a=t[i];r=r.update(e,0,void 0,a[0],a[1])}return r}(e,d,o,r);var m=e&&e===this.ownerID,g=m?d:Ge(d);return h?u?p===f-1?g.pop():g[p]=g.pop():g[p]=[o,r]:g.push([o,r]),m?(this.entries=g,this):new kt(e,g)}};var Ot=function(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n};Ot.prototype.get=function(e,t,n,o){void 0===t&&(t=de(n));var i=1<<((0===e?t:t>>>e)&r),a=this.bitmap;return 0==(a&i)?o:this.nodes[Zt(a&i-1)].get(e+5,t,n,o)},Ot.prototype.update=function(e,t,n,a,s,l,c){void 0===n&&(n=de(a));var u=(0===t?n:n>>>t)&r,d=1<<u,p=this.bitmap,f=0!=(p&d);if(!f&&s===i)return this;var h=Zt(p&d-1),m=this.nodes,g=f?m[h]:void 0,v=jt(g,e,t+5,n,a,s,l,c);if(v===g)return this;if(!f&&v&&m.length>=Gt)return function(e,t,n,r,i){for(var a=0,s=new Array(o),l=0;0!==n;l++,n>>>=1)s[l]=1&n?t[a++]:void 0;return s[r]=i,new At(e,a+1,s)}(e,m,p,u,v);if(f&&!v&&2===m.length&&zt(m[1^h]))return m[1^h];if(f&&v&&1===m.length&&zt(v))return v;var y=e&&e===this.ownerID,b=f?v?p:p^d:p|d,w=f?v?Ut(m,h,v,y):function(e,t,n){var o=e.length-1;if(n&&t===o)return e.pop(),e;for(var r=new Array(o),i=0,a=0;a<o;a++)a===t&&(i=1),r[a]=e[a+i];return r}(m,h,y):function(e,t,n,o){var r=e.length+1;if(o&&t+1===r)return e[t]=n,e;for(var i=new Array(r),a=0,s=0;s<r;s++)s===t?(i[s]=n,a=-1):i[s]=e[s+a];return i}(m,h,v,y);return y?(this.bitmap=b,this.nodes=w,this):new Ot(e,b,w)};var At=function(e,t,n){this.ownerID=e,this.count=t,this.nodes=n};At.prototype.get=function(e,t,n,o){void 0===t&&(t=de(n));var i=(0===e?t:t>>>e)&r,a=this.nodes[i];return a?a.get(e+5,t,n,o):o},At.prototype.update=function(e,t,n,o,a,s,l){void 0===n&&(n=de(o));var c=(0===t?n:n>>>t)&r,u=a===i,d=this.nodes,p=d[c];if(u&&!p)return this;var f=jt(p,e,t+5,n,o,a,s,l);if(f===p)return this;var h=this.count;if(p){if(!f&&--h<Wt)return function(e,t,n,o){for(var r=0,i=0,a=new Array(n),s=0,l=1,c=t.length;s<c;s++,l<<=1){var u=t[s];void 0!==u&&s!==o&&(r|=l,a[i++]=u)}return new Ot(e,r,a)}(e,d,h,c)}else h++;var m=e&&e===this.ownerID,g=Ut(d,c,f,m);return m?(this.count=h,this.nodes=g,this):new At(e,h,g)};var Tt=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n};Tt.prototype.get=function(e,t,n,o){for(var r=this.entries,i=0,a=r.length;i<a;i++)if(le(n,r[i][0]))return r[i][1];return o},Tt.prototype.update=function(e,t,n,o,r,s,l){void 0===n&&(n=de(o));var c=r===i;if(n!==this.keyHash)return c?this:(a(l),a(s),Kt(this,e,t,n,[o,r]));for(var u=this.entries,d=0,p=u.length;d<p&&!le(o,u[d][0]);d++);var f=d<p;if(f?u[d][1]===r:c)return this;if(a(l),(c||!f)&&a(s),c&&2===p)return new It(e,this.keyHash,u[1^d]);var h=e&&e===this.ownerID,m=h?u:Ge(u);return f?c?d===p-1?m.pop():m[d]=m.pop():m[d]=[o,r]:m.push([o,r]),h?(this.entries=m,this):new Tt(e,this.keyHash,m)};var It=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n};It.prototype.get=function(e,t,n,o){return le(n,this.entry[0])?this.entry[1]:o},It.prototype.update=function(e,t,n,o,r,s,l){var c=r===i,u=le(o,this.entry[0]);return(u?r===this.entry[1]:c)?this:(a(l),c?void a(s):u?e&&e===this.ownerID?(this.entry[1]=r,this):new It(e,this.keyHash,[o,r]):(a(s),Kt(this,e,t,de(o),[o,r])))},kt.prototype.iterate=Tt.prototype.iterate=function(e,t){for(var n=this.entries,o=0,r=n.length-1;o<=r;o++)if(!1===e(n[t?r-o:o]))return!1},Ot.prototype.iterate=At.prototype.iterate=function(e,t){for(var n=this.nodes,o=0,r=n.length-1;o<=r;o++){var i=n[t?r-o:o];if(i&&!1===i.iterate(e,t))return!1}},It.prototype.iterate=function(e,t){return e(this.entry)};var Ft,Mt=function(e){function t(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&Nt(e._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var e=this,t=this._type,n=this._stack;n;){var o=n.node,r=n.index++,i=void 0;if(o.entry){if(0===r)return _t(t,o.entry)}else if(o.entries){if(r<=(i=o.entries.length-1))return _t(t,o.entries[e._reverse?i-r:r])}else if(r<=(i=o.nodes.length-1)){var a=o.nodes[e._reverse?i-r:r];if(a){if(a.entry)return _t(t,a.entry);n=e._stack=Nt(a,n)}continue}n=e._stack=e._stack.__prev}return{value:void 0,done:!0}},t}(L);function _t(e,t){return B(e,t[0],t[1])}function Nt(e,t){return{node:e,index:0,__prev:t}}function Rt(e,t,n,o){var r=Object.create(Ct);return r.size=e,r._root=t,r.__ownerID=n,r.__hash=o,r.__altered=!1,r}function Lt(){return Ft||(Ft=Rt(0))}function Bt(e,t,n){var o,r;if(e._root){var a={value:!1},s={value:!1};if(o=jt(e._root,e.__ownerID,0,void 0,t,n,a,s),!s.value)return e;r=e.size+(a.value?n===i?-1:1:0)}else{if(n===i)return e;r=1,o=new kt(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=r,e._root=o,e.__hash=void 0,e.__altered=!0,e):o?Rt(r,o):Lt()}function jt(e,t,n,o,r,s,l,c){return e?e.update(t,n,o,r,s,l,c):s===i?e:(a(c),a(l),new It(t,o,[r,s]))}function zt(e){return e.constructor===It||e.constructor===Tt}function Kt(e,t,n,o,i){if(e.keyHash===o)return new Tt(t,o,[e.entry,i]);var a,s=(0===n?e.keyHash:e.keyHash>>>n)&r,l=(0===n?o:o>>>n)&r,c=s===l?[Kt(e,t,n+5,o,i)]:(a=new It(t,o,i),s<l?[e,a]:[a,e]);return new Ot(t,1<<s|1<<l,c)}function Zt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function Ut(e,t,n,o){var r=o?e:Ge(e);return r[t]=n,r}var Vt=8,Gt=16,Wt=8,qt="@@__IMMUTABLE_LIST__@@";function Ht(e){return Boolean(e&&e[qt])}var $t=function(e){function t(t){var n=nn();if(null==t)return n;if(Ht(t))return t;var r=e(t),i=r.size;return 0===i?n:(qe(i),i>0&&i<o?tn(0,i,5,null,new Yt(r.toArray())):n.withMutations((function(e){e.setSize(i),r.forEach((function(t,n){return e.set(n,t)}))})))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(e,t){if((e=c(this,e))>=0&&e<this.size){var n=an(this,e+=this._origin);return n&&n.array[e&r]}return t},t.prototype.set=function(e,t){return function(e,t,n){if((t=c(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?sn(e,t).set(0,n):sn(e,0,t+1).set(t,n)}));t+=e._origin;var o=e._tail,r=e._root,i={value:!1};t>=ln(e._capacity)?o=on(o,e.__ownerID,0,t,n,i):r=on(r,e.__ownerID,e._level,t,n,i);if(!i.value)return e;if(e.__ownerID)return e._root=r,e._tail=o,e.__hash=void 0,e.__altered=!0,e;return tn(e._origin,e._capacity,e._level,r,o)}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):nn()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){sn(n,0,t+e.length);for(var o=0;o<e.length;o++)n.set(t+o,e[o])}))},t.prototype.pop=function(){return sn(this,0,-1)},t.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){sn(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])}))},t.prototype.shift=function(){return sn(this,1)},t.prototype.concat=function(){for(var t=arguments,n=[],o=0;o<arguments.length;o++){var r=t[o],i=e("string"!=typeof r&&z(r)?r:[r]);0!==i.size&&n.push(i)}return 0===n.length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations((function(e){n.forEach((function(t){return t.forEach((function(t){return e.push(t)}))}))})):this.constructor(n[0])},t.prototype.setSize=function(e){return sn(this,0,e)},t.prototype.map=function(e,t){var n=this;return this.withMutations((function(o){for(var r=0;r<n.size;r++)o.set(r,e.call(t,o.get(r),r,o))}))},t.prototype.slice=function(e,t){var n=this.size;return d(e,t,n)?this:sn(this,p(e,n),f(t,n))},t.prototype.__iterator=function(e,t){var n=t?this.size:0,o=en(this,t);return new L((function(){var r=o();return r===Qt?{value:void 0,done:!0}:B(e,t?--n:n++,r)}))},t.prototype.__iterate=function(e,t){for(var n,o=t?this.size:0,r=en(this,t);(n=r())!==Qt&&!1!==e(n,t?--o:o++,this););return o},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?tn(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?nn():(this.__ownerID=e,this.__altered=!1,this)},t}(D);$t.isList=Ht;var Xt=$t.prototype;Xt[qt]=!0,Xt.delete=Xt.remove,Xt.merge=Xt.concat,Xt.setIn=at,Xt.deleteIn=Xt.removeIn=lt,Xt.update=ut,Xt.updateIn=dt,Xt.mergeIn=bt,Xt.mergeDeepIn=wt,Xt.withMutations=St,Xt.wasAltered=xt,Xt.asImmutable=Et,Xt["@@transducer/init"]=Xt.asMutable=Pt,Xt["@@transducer/step"]=function(e,t){return e.push(t)},Xt["@@transducer/result"]=function(e){return e.asImmutable()};var Yt=function(e,t){this.array=e,this.ownerID=t};Yt.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var o=n>>>t&r;if(o>=this.array.length)return new Yt([],e);var i,a=0===o;if(t>0){var s=this.array[o];if((i=s&&s.removeBefore(e,t-5,n))===s&&a)return this}if(a&&!i)return this;var l=rn(this,e);if(!a)for(var c=0;c<o;c++)l.array[c]=void 0;return i&&(l.array[o]=i),l},Yt.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var o,i=n-1>>>t&r;if(i>=this.array.length)return this;if(t>0){var a=this.array[i];if((o=a&&a.removeAfter(e,t-5,n))===a&&i===this.array.length-1)return this}var s=rn(this,e);return s.array.splice(i+1),o&&(s.array[i]=o),s};var Jt,Qt={};function en(e,t){var n=e._origin,r=e._capacity,i=ln(r),a=e._tail;return s(e._root,e._level,0);function s(e,l,c){return 0===l?function(e,s){var l=s===i?a&&a.array:e&&e.array,c=s>n?0:n-s,u=r-s;u>o&&(u=o);return function(){if(c===u)return Qt;var e=t?--u:c++;return l&&l[e]}}(e,c):function(e,i,a){var l,c=e&&e.array,u=a>n?0:n-a>>i,d=1+(r-a>>i);d>o&&(d=o);return function(){for(;;){if(l){var e=l();if(e!==Qt)return e;l=null}if(u===d)return Qt;var n=t?--d:u++;l=s(c&&c[n],i-5,a+(n<<i))}}}(e,l,c)}}function tn(e,t,n,o,r,i,a){var s=Object.create(Xt);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=o,s._tail=r,s.__ownerID=i,s.__hash=a,s.__altered=!1,s}function nn(){return Jt||(Jt=tn(0,0,5))}function on(e,t,n,o,i,s){var l,c=o>>>n&r,u=e&&c<e.array.length;if(!u&&void 0===i)return e;if(n>0){var d=e&&e.array[c],p=on(d,t,n-5,o,i,s);return p===d?e:((l=rn(e,t)).array[c]=p,l)}return u&&e.array[c]===i?e:(s&&a(s),l=rn(e,t),void 0===i&&c===l.array.length-1?l.array.pop():l.array[c]=i,l)}function rn(e,t){return t&&e&&t===e.ownerID?e:new Yt(e?e.array.slice():[],t)}function an(e,t){if(t>=ln(e._capacity))return e._tail;if(t<1<<e._level+5){for(var n=e._root,o=e._level;n&&o>0;)n=n.array[t>>>o&r],o-=5;return n}}function sn(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var o=e.__ownerID||new s,i=e._origin,a=e._capacity,l=i+t,c=void 0===n?a:n<0?a+n:i+n;if(l===i&&c===a)return e;if(l>=c)return e.clear();for(var u=e._level,d=e._root,p=0;l+p<0;)d=new Yt(d&&d.array.length?[void 0,d]:[],o),p+=1<<(u+=5);p&&(l+=p,i+=p,c+=p,a+=p);for(var f=ln(a),h=ln(c);h>=1<<u+5;)d=new Yt(d&&d.array.length?[d]:[],o),u+=5;var m=e._tail,g=h<f?an(e,c-1):h>f?new Yt([],o):m;if(m&&h>f&&l<a&&m.array.length){for(var v=d=rn(d,o),y=u;y>5;y-=5){var b=f>>>y&r;v=v.array[b]=rn(v.array[b],o)}v.array[f>>>5&r]=m}if(c<a&&(g=g&&g.removeAfter(o,0,c)),l>=h)l-=h,c-=h,u=5,d=null,g=g&&g.removeBefore(o,0,l);else if(l>i||h<f){for(p=0;d;){var w=l>>>u&r;if(w!==h>>>u&r)break;w&&(p+=(1<<u)*w),u-=5,d=d.array[w]}d&&l>i&&(d=d.removeBefore(o,u,l-p)),d&&h<f&&(d=d.removeAfter(o,u,h-p)),p&&(l-=p,c-=p)}return e.__ownerID?(e.size=c-l,e._origin=l,e._capacity=c,e._level=u,e._root=d,e._tail=g,e.__hash=void 0,e.__altered=!0,e):tn(l,c,u,d,g)}function ln(e){return e<o?0:e-1>>>5<<5}var cn,un=function(e){function t(e){return null==e?pn():ae(e)?e:pn().withMutations((function(t){var n=x(e);qe(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):pn()},t.prototype.set=function(e,t){return fn(this,e,t)},t.prototype.remove=function(e){return fn(this,e,i)},t.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],n)}),t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?dn(t,n,e,this.__hash):0===this.size?pn():(this.__ownerID=e,this._map=t,this._list=n,this)},t}(Dt);function dn(e,t,n,o){var r=Object.create(un.prototype);return r.size=e?e.size:0,r._map=e,r._list=t,r.__ownerID=n,r.__hash=o,r}function pn(){return cn||(cn=dn(Lt(),nn()))}function fn(e,t,n){var r,a,s=e._map,l=e._list,c=s.get(t),u=void 0!==c;if(n===i){if(!u)return e;l.size>=o&&l.size>=2*s.size?(r=(a=l.filter((function(e,t){return void 0!==e&&c!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=a.__ownerID=e.__ownerID)):(r=s.remove(t),a=c===l.size-1?l.pop():l.set(c,void 0))}else if(u){if(n===l.get(c)[1])return e;r=s,a=l.set(c,[t,n])}else r=s.set(t,l.size),a=l.set(l.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=a,e.__hash=void 0,e):dn(r,a)}un.isOrderedMap=ae,un.prototype[F]=!0,un.prototype.delete=un.prototype.remove;var hn="@@__IMMUTABLE_STACK__@@";function mn(e){return Boolean(e&&e[hn])}var gn=function(e){function t(e){return null==e?wn():mn(e)?e:wn().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var n=this._head;for(e=c(this,e);n&&e--;)n=n.next;return n?n.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,n=this._head,o=arguments.length-1;o>=0;o--)n={value:e[o],next:n};return this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):bn(t,n)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&mn(t))return t;qe(t.size);var n=this.size,o=this._head;return t.__iterate((function(e){n++,o={value:e,next:o}}),!0),this.__ownerID?(this.size=n,this._head=o,this.__hash=void 0,this.__altered=!0,this):bn(n,o)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):wn()},t.prototype.slice=function(t,n){if(d(t,n,this.size))return this;var o=p(t,this.size);if(f(n,this.size)!==this.size)return e.prototype.slice.call(this,t,n);for(var r=this.size-o,i=this._head;o--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):bn(r,i)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?bn(this.size,this._head,e,this.__hash):0===this.size?wn():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new X(this.toArray()).__iterate((function(t,o){return e(t,o,n)}),t);for(var o=0,r=this._head;r&&!1!==e(r.value,o++,n);)r=r.next;return o},t.prototype.__iterator=function(e,t){if(t)return new X(this.toArray()).__iterator(e,t);var n=0,o=this._head;return new L((function(){if(o){var t=o.value;return o=o.next,B(e,n++,t)}return{value:void 0,done:!0}}))},t}(D);gn.isStack=mn;var vn,yn=gn.prototype;function bn(e,t,n,o){var r=Object.create(yn);return r.size=e,r._head=t,r.__ownerID=n,r.__hash=o,r.__altered=!1,r}function wn(){return vn||(vn=bn(0))}yn[hn]=!0,yn.shift=yn.pop,yn.unshift=yn.push,yn.unshiftAll=yn.pushAll,yn.withMutations=St,yn.wasAltered=xt,yn.asImmutable=Et,yn["@@transducer/init"]=yn.asMutable=Pt,yn["@@transducer/step"]=function(e,t){return e.unshift(t)},yn["@@transducer/result"]=function(e){return e.asImmutable()};var Sn="@@__IMMUTABLE_SET__@@";function Pn(e){return Boolean(e&&e[Sn])}function En(e){return Pn(e)&&M(e)}function xn(e,t){if(e===t)return!0;if(!v(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||b(e)!==b(t)||S(e)!==S(t)||M(e)!==M(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!P(e);if(M(e)){var o=e.entries();return t.every((function(e,t){var r=o.next().value;return r&&le(r[1],e)&&(n||le(r[0],t))}))&&o.next().done}var r=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{r=!0;var a=e;e=t,t=a}var s=!0,l=t.__iterate((function(t,o){if(n?!e.has(t):r?!le(t,e.get(o,i)):!le(e.get(o,i),t))return s=!1,!1}));return s&&e.size===l}function Dn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}function Cn(e){if(!e||"object"!=typeof e)return e;if(!v(e)){if(!Xe(e))return e;e=W(e)}if(b(e)){var t={};return e.__iterate((function(e,n){t[n]=Cn(e)})),t}var n=[];return e.__iterate((function(e){n.push(Cn(e))})),n}var kn=function(e){function t(t){return null==t?Fn():Pn(t)&&!M(t)?t:Fn().withMutations((function(n){var o=e(t);qe(o.size),o.forEach((function(e){return n.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(x(e).keySeq())},t.intersect=function(e){return(e=E(e).toArray()).length?An.intersect.apply(t(e.pop()),e):Fn()},t.union=function(e){return(e=E(e).toArray()).length?An.union.apply(t(e.pop()),e):Fn()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Tn(this,this._map.set(e,e))},t.prototype.remove=function(e){return Tn(this,this._map.remove(e))},t.prototype.clear=function(){return Tn(this,this._map.clear())},t.prototype.map=function(e,t){var n=this;return Tn(this,this._map.map((function(t){return e(t,t,n)}),t))},t.prototype.union=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(n){for(var o=0;o<t.length;o++)e(t[o]).forEach((function(e){return n.add(e)}))})):this.constructor(t[0])},t.prototype.intersect=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map((function(t){return e(t)}));var o=[];return this.forEach((function(e){t.every((function(t){return t.includes(e)}))||o.push(e)})),this.withMutations((function(e){o.forEach((function(t){e.remove(t)}))}))},t.prototype.subtract=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map((function(t){return e(t)}));var o=[];return this.forEach((function(e){t.some((function(t){return t.includes(e)}))&&o.push(e)})),this.withMutations((function(e){o.forEach((function(t){e.remove(t)}))}))},t.prototype.sort=function(e){return Xn(Ne(this,e))},t.prototype.sortBy=function(e,t){return Xn(Ne(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate((function(t){return e(t,t,n)}),t)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this)},t}(C);kn.isSet=Pn;var On,An=kn.prototype;function Tn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function In(e,t){var n=Object.create(An);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Fn(){return On||(On=In(Lt()))}An[Sn]=!0,An.delete=An.remove,An.merge=An.concat=An.union,An.withMutations=St,An.asImmutable=Et,An["@@transducer/init"]=An.asMutable=Pt,An["@@transducer/step"]=function(e,t){return e.add(t)},An["@@transducer/result"]=function(e){return e.asImmutable()},An.__empty=Fn,An.__make=In;var Mn,_n=function(e){function t(e,n,o){if(!(this instanceof t))return new t(e,n,o);if(We(0!==o,"Cannot step a Range by 0"),e=e||0,void 0===n&&(n=1/0),o=void 0===o?1:Math.abs(o),n<e&&(o=-o),this._start=e,this._end=n,this._step=o,this.size=Math.max(0,Math.ceil((n-e)/o-1)+1),0===this.size){if(Mn)return Mn;Mn=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},t.prototype.get=function(e,t){return this.has(e)?this._start+c(this,e)*this._step:t},t.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},t.prototype.slice=function(e,n){return d(e,n,this.size)?this:(e=p(e,this.size),(n=f(n,this.size))<=e?new t(0,0):new t(this.get(e,this._end),this.get(n,this._end),this._step))},t.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},t.prototype.lastIndexOf=function(e){return this.indexOf(e)},t.prototype.__iterate=function(e,t){for(var n=this.size,o=this._step,r=t?this._start+(n-1)*o:this._start,i=0;i!==n&&!1!==e(r,t?n-++i:i++,this);)r+=t?-o:o;return i},t.prototype.__iterator=function(e,t){var n=this.size,o=this._step,r=t?this._start+(n-1)*o:this._start,i=0;return new L((function(){if(i===n)return{value:void 0,done:!0};var a=r;return r+=t?-o:o,B(e,t?n-++i:i++,a)}))},t.prototype.equals=function(e){return e instanceof t?this._start===e._start&&this._end===e._end&&this._step===e._step:xn(this,e)},t}(H);function Nn(e,t,n){for(var o=He(t),r=0;r!==o.length;)if((e=Qe(e,o[r++],i))===i)return n;return e}function Rn(e,t){return Nn(this,e,t)}function Ln(e,t){return Nn(e,t,i)!==i}function Bn(){qe(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e}E.isIterable=v,E.isKeyed=b,E.isIndexed=S,E.isAssociative=P,E.isOrdered=M,E.Iterator=L,Dn(E,{toArray:function(){qe(this.size);var e=new Array(this.size||0),t=b(this),n=0;return this.__iterate((function(o,r){e[n++]=t?[r,o]:o})),e},toIndexedSeq:function(){return new xe(this)},toJS:function(){return Cn(this)},toKeyedSeq:function(){return new Ee(this,!0)},toMap:function(){return Dt(this.toKeyedSeq())},toObject:Bn,toOrderedMap:function(){return un(this.toKeyedSeq())},toOrderedSet:function(){return Xn(b(this)?this.valueSeq():this)},toSet:function(){return kn(b(this)?this.valueSeq():this)},toSetSeq:function(){return new De(this)},toSeq:function(){return S(this)?this.toIndexedSeq():b(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return gn(b(this)?this.valueSeq():this)},toList:function(){return $t(b(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return je(this,Me(this,e))},includes:function(e){return this.some((function(t){return le(t,e)}))},entries:function(){return this.__iterator(2)},every:function(e,t){qe(this.size);var n=!0;return this.__iterate((function(o,r,i){if(!e.call(t,o,r,i))return n=!1,!1})),n},filter:function(e,t){return je(this,Te(this,e,t,!0))},find:function(e,t,n){var o=this.findEntry(e,t);return o?o[1]:n},forEach:function(e,t){return qe(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){qe(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(o){n?n=!1:t+=e,t+=null!=o?o.toString():""})),t},keys:function(){return this.__iterator(0)},map:function(e,t){return je(this,Oe(this,e,t))},reduce:function(e,t,n){return Zn(this,e,t,n,arguments.length<2,!1)},reduceRight:function(e,t,n){return Zn(this,e,t,n,arguments.length<2,!0)},reverse:function(){return je(this,Ae(this,!0))},slice:function(e,t){return je(this,Ie(this,e,t,!0))},some:function(e,t){return!this.every(Gn(e),t)},sort:function(e){return je(this,Ne(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return l(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var o=Dt().asMutable();return e.__iterate((function(r,i){o.update(t.call(n,r,i,e),0,(function(e){return e+1}))})),o.asImmutable()}(this,e,t)},equals:function(e){return xn(this,e)},entrySeq:function(){var e=this;if(e._cache)return new X(e._cache);var t=e.toSeq().map(Vn).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Gn(e),t)},findEntry:function(e,t,n){var o=n;return this.__iterate((function(n,r,i){if(e.call(t,n,r,i))return o=[r,n],!1})),o},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find(u,null,e)},flatMap:function(e,t){return je(this,function(e,t,n){var o=Ke(e);return e.toSeq().map((function(r,i){return o(t.call(n,r,i,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return je(this,_e(this,e,!0))},fromEntrySeq:function(){return new Ce(this)},get:function(e,t){return this.find((function(t,n){return le(n,e)}),void 0,t)},getIn:Rn,groupBy:function(e,t){return function(e,t,n){var o=b(e),r=(M(e)?un():Dt()).asMutable();e.__iterate((function(i,a){r.update(t.call(n,i,a,e),(function(e){return(e=e||[]).push(o?[a,i]:i),e}))}));var i=Ke(e);return r.map((function(t){return je(e,i(t))})).asImmutable()}(this,e,t)},has:function(e){return this.get(e,i)!==i},hasIn:function(e){return Ln(this,e)},isSubset:function(e){return e="function"==typeof e.includes?e:E(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:E(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return le(t,e)}))},keySeq:function(){return this.toSeq().map(Un).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Re(this,e)},maxBy:function(e,t){return Re(this,t,e)},min:function(e){return Re(this,e?Wn(e):Hn)},minBy:function(e,t){return Re(this,t?Wn(t):Hn,e)},rest:function(){return this.slice(1)},skip:function(e){return 0===e?this:this.slice(Math.max(0,e))},skipLast:function(e){return 0===e?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return je(this,Fe(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Gn(e),t)},sortBy:function(e,t){return je(this,Ne(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return je(this,function(e,t,n){var o=Ze(e);return o.__iterateUncached=function(o,r){var i=this;if(r)return this.cacheResult().__iterate(o,r);var a=0;return e.__iterate((function(e,r,s){return t.call(n,e,r,s)&&++a&&o(e,r,i)})),a},o.__iteratorUncached=function(o,r){var i=this;if(r)return this.cacheResult().__iterator(o,r);var a=e.__iterator(2,r),s=!0;return new L((function(){if(!s)return{value:void 0,done:!0};var e=a.next();if(e.done)return e;var r=e.value,l=r[0],c=r[1];return t.call(n,c,l,i)?2===o?e:B(o,l,c,e):(s=!1,{value:void 0,done:!0})}))},o}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Gn(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=M(e),n=b(e),o=t?1:0;return function(e,t){return t=ce(t,3432918353),t=ce(t<<15|t>>>-15,461845907),t=ce(t<<13|t>>>-13,5),t=ce((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=ue((t=ce(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){o=31*o+$n(de(e),de(t))|0}:function(e,t){o=o+$n(de(e),de(t))|0}:t?function(e){o=31*o+de(e)|0}:function(e){o=o+de(e)|0}),o)}(this))}});var jn=E.prototype;jn[g]=!0,jn[R]=jn.values,jn.toJSON=jn.toArray,jn.__toStringMapper=Ye,jn.inspect=jn.toSource=function(){return this.toString()},jn.chain=jn.flatMap,jn.contains=jn.includes,Dn(x,{flip:function(){return je(this,ke(this))},mapEntries:function(e,t){var n=this,o=0;return je(this,this.toSeq().map((function(r,i){return e.call(t,[i,r],o++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return je(this,this.toSeq().flip().map((function(o,r){return e.call(t,o,r,n)})).flip())}});var zn=x.prototype;zn[y]=!0,zn[R]=jn.entries,zn.toJSON=Bn,zn.__toStringMapper=function(e,t){return Ye(t)+": "+Ye(e)},Dn(D,{toKeyedSeq:function(){return new Ee(this,!1)},filter:function(e,t){return je(this,Te(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return je(this,Ae(this,!1))},slice:function(e,t){return je(this,Ie(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t||0,0),0===n||2===n&&!t)return this;e=p(e,e<0?this.count():this.size);var o=this.slice(0,e);return je(this,1===n?o:o.concat(Ge(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return je(this,_e(this,e,!1))},get:function(e,t){return(e=c(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=c(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return je(this,function(e,t){var n=Ze(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,o){var r=this,i=0;return e.__iterate((function(e){return(!i||!1!==n(t,i++,r))&&!1!==n(e,i++,r)}),o),i},n.__iteratorUncached=function(n,o){var r,i=e.__iterator(1,o),a=0;return new L((function(){return(!r||a%2)&&(r=i.next()).done?r:a%2?B(n,a++,t):B(n,a++,r.value,r)}))},n}(this,e))},interleave:function(){var e=[this].concat(Ge(arguments)),t=Be(this.toSeq(),H.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),je(this,n)},keySeq:function(){return _n(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return je(this,Fe(this,e,t,!1))},zip:function(){var e=[this].concat(Ge(arguments));return je(this,Be(this,qn,e))},zipAll:function(){var e=[this].concat(Ge(arguments));return je(this,Be(this,qn,e,!0))},zipWith:function(e){var t=Ge(arguments);return t[0]=this,je(this,Be(this,e,t))}});var Kn=D.prototype;function Zn(e,t,n,o,r,i){return qe(e.size),e.__iterate((function(e,i,a){r?(r=!1,n=e):n=t.call(o,n,e,i,a)}),i),n}function Un(e,t){return t}function Vn(e,t){return[t,e]}function Gn(e){return function(){return!e.apply(this,arguments)}}function Wn(e){return function(){return-e.apply(this,arguments)}}function qn(){return Ge(arguments)}function Hn(e,t){return e<t?1:e>t?-1:0}function $n(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}Kn[w]=!0,Kn[F]=!0,Dn(C,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),C.prototype.has=jn.includes,C.prototype.contains=C.prototype.includes,Dn(q,x.prototype),Dn(H,D.prototype),Dn($,C.prototype);var Xn=function(e){function t(e){return null==e?eo():En(e)?e:eo().withMutations((function(t){var n=C(e);qe(n.size),n.forEach((function(e){return t.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(x(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(kn);Xn.isOrderedSet=En;var Yn,Jn=Xn.prototype;function Qn(e,t){var n=Object.create(Jn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function eo(){return Yn||(Yn=Qn(pn()))}Jn[F]=!0,Jn.zip=Kn.zip,Jn.zipWith=Kn.zipWith,Jn.__empty=eo,Jn.__make=Qn;var to=function(e,t){var n,o=function(i){var a=this;if(i instanceof o)return i;if(!(this instanceof o))return new o(i);if(!n){n=!0;var s=Object.keys(e),l=r._indices={};r._name=t,r._keys=s,r._defaultValues=e;for(var c=0;c<s.length;c++){var u=s[c];l[u]=c,r[u]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+ro(a)+' with property "'+u+'" since that property name is part of the Record API.'):ao(r,u)}}this.__ownerID=void 0,this._values=$t().withMutations((function(e){e.setSize(a._keys.length),x(i).forEach((function(t,n){e.set(a._indices[n],t===a._defaultValues[n]?void 0:t)}))}))},r=o.prototype=Object.create(no);return r.constructor=o,o};to.prototype.toString=function(){for(var e,t=ro(this)+" { ",n=this._keys,o=0,r=n.length;o!==r;o++)t+=(o?", ":"")+(e=n[o])+": "+Ye(this.get(e));return t+" }"},to.prototype.equals=function(e){return this===e||e&&this._keys===e._keys&&io(this).equals(io(e))},to.prototype.hashCode=function(){return io(this).hashCode()},to.prototype.has=function(e){return this._indices.hasOwnProperty(e)},to.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._indices[e],o=this._values.get(n);return void 0===o?this._defaultValues[e]:o},to.prototype.set=function(e,t){if(this.has(e)){var n=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(n!==this._values&&!this.__ownerID)return oo(this,n)}return this},to.prototype.remove=function(e){return this.set(e)},to.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:oo(this,e)},to.prototype.wasAltered=function(){return this._values.wasAltered()},to.prototype.toSeq=function(){return io(this)},to.prototype.toJS=function(){return Cn(this)},to.prototype.entries=function(){return this.__iterator(2)},to.prototype.__iterator=function(e,t){return io(this).__iterator(e,t)},to.prototype.__iterate=function(e,t){return io(this).__iterate(e,t)},to.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?oo(this,t,e):(this.__ownerID=e,this._values=t,this)},to.isRecord=T,to.getDescriptiveName=ro;var no=to.prototype;function oo(e,t,n){var o=Object.create(Object.getPrototypeOf(e));return o._values=t,o.__ownerID=n,o}function ro(e){return e._name||e.constructor.name||"Record"}function io(e){return te(e._keys.map((function(t){return[t,e.get(t)]})))}function ao(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){We(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}catch(e){}}no[A]=!0,no.delete=no.remove,no.deleteIn=no.removeIn=lt,no.getIn=Rn,no.hasIn=jn.hasIn,no.merge=pt,no.mergeWith=ft,no.mergeIn=bt,no.mergeDeep=vt,no.mergeDeepWith=yt,no.mergeDeepIn=wt,no.setIn=at,no.update=ut,no.updateIn=dt,no.withMutations=St,no.asMutable=Pt,no.asImmutable=Et,no[R]=no.entries,no.toJSON=no.toObject=jn.toObject,no.inspect=no.toSource=function(){return this.toString()};var so;!function(e){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this._value=e,this.size=void 0===n?1/0:Math.max(0,n),0===this.size){if(so)return so;so=this}}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},t.prototype.get=function(e,t){return this.has(e)?this._value:t},t.prototype.includes=function(e){return le(this._value,e)},t.prototype.slice=function(e,n){var o=this.size;return d(e,n,o)?this:new t(this._value,f(n,o)-p(e,o))},t.prototype.reverse=function(){return this},t.prototype.indexOf=function(e){return le(this._value,e)?0:-1},t.prototype.lastIndexOf=function(e){return le(this._value,e)?this.size:-1},t.prototype.__iterate=function(e,t){for(var n=this.size,o=0;o!==n&&!1!==e(this._value,t?n-++o:o++,this););return o},t.prototype.__iterator=function(e,t){var n=this,o=this.size,r=0;return new L((function(){return r===o?{value:void 0,done:!0}:B(e,t?o-++r:r++,n._value)}))},t.prototype.equals=function(e){return e instanceof t?le(this._value,e._value):xn(e)}}(H);function lo(e,t){return co([],t||uo,e,"",t&&t.length>2?[]:void 0,{"":e})}function co(e,t,n,o,r,i){var a=Array.isArray(n)?H:$e(n)?q:null;if(a){if(~e.indexOf(n))throw new TypeError("Cannot convert circular structure to Immutable");e.push(n),r&&""!==o&&r.push(o);var s=t.call(i,o,a(n).map((function(o,i){return co(e,t,o,i,r,n)})),r&&r.slice());return e.pop(),r&&r.pop(),s}return n}function uo(e,t){return b(t)?t.toMap():t.toList()}},18156:(e,t)=>{"use strict";for(var n="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),o={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},r={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:n?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},i={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},a=1;a<20;a++)i["f"+a]=111+a;function s(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var o=e.map((function(e){return l(e,t)})),r=function(e){return o.some((function(t){return c(t,e)}))};return null==n?r:r(n)}function l(e,t){var n=t&&t.byKey,r={},i=(e=e.replace("++","+add")).split("+"),a=i.length;for(var s in o)r[o[s]]=!1;var l=!0,c=!1,p=void 0;try{for(var f,h=i[Symbol.iterator]();!(l=(f=h.next()).done);l=!0){var m=f.value,g=m.endsWith("?")&&m.length>1;g&&(m=m.slice(0,-1));var v=d(m),y=o[v];1!==a&&y||(n?r.key=v:r.which=u(m)),y&&(r[y]=!g||null)}}catch(e){c=!0,p=e}finally{try{!l&&h.return&&h.return()}finally{if(c)throw p}}return r}function c(e,t){for(var n in e){var o=e[n],r=void 0;if(null!=o&&((null!=(r="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===o&&93===t.which?91:t.which:t[n])||!1!==o)&&r!==o))return!1}return!0}function u(e){return e=d(e),i[e]||e.toUpperCase().charCodeAt(0)}function d(e){return e=e.toLowerCase(),e=r[e]||e}t.TB=function(e,t){return s(e,{byKey:!0},t)}},35583:(e,t,n)=>{"use strict";function o(e){return"[object Object]"===Object.prototype.toString.call(e)}function r(e){var t,n;return!1!==o(e)&&(void 0===(t=e.constructor)||!1!==o(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}n.d(t,{P:()=>r})},94301:(e,t,n)=>{n(57147),e.exports=self.fetch.bind(self)},19575:function(e,t,n){var o,r;r="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:this,e.exports=function(n){"use strict";var r,i=(n=n||{}).Base64,a="2.6.4",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=function(e){for(var t={},n=0,o=e.length;n<o;n++)t[e.charAt(n)]=n;return t}(s),c=String.fromCharCode,u=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?c(192|t>>>6)+c(128|63&t):c(224|t>>>12&15)+c(128|t>>>6&63)+c(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return c(240|t>>>18&7)+c(128|t>>>12&63)+c(128|t>>>6&63)+c(128|63&t)},d=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,p=function(e){return e.replace(d,u)},f=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[s.charAt(n>>>18),s.charAt(n>>>12&63),t>=2?"=":s.charAt(n>>>6&63),t>=1?"=":s.charAt(63&n)].join("")},h=n.btoa&&"function"==typeof n.btoa?function(e){return n.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,f)},m=function(e){return h(p(String(e)))},g=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},v=function(e,t){return t?g(m(e)):m(e)},y=function(e){return v(e,!0)};n.Uint8Array&&(r=function(e,t){for(var n="",o=0,r=e.length;o<r;o+=3){var i=e[o],a=e[o+1],l=e[o+2],c=i<<16|a<<8|l;n+=s.charAt(c>>>18)+s.charAt(c>>>12&63)+(void 0!==a?s.charAt(c>>>6&63):"=")+(void 0!==l?s.charAt(63&c):"=")}return t?g(n):n});var b,w=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,S=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return c(55296+(t>>>10))+c(56320+(1023&t));case 3:return c((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return c((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},P=function(e){return e.replace(w,S)},E=function(e){var t=e.length,n=t%4,o=(t>0?l[e.charAt(0)]<<18:0)|(t>1?l[e.charAt(1)]<<12:0)|(t>2?l[e.charAt(2)]<<6:0)|(t>3?l[e.charAt(3)]:0),r=[c(o>>>16),c(o>>>8&255),c(255&o)];return r.length-=[0,0,2,1][n],r.join("")},x=n.atob&&"function"==typeof n.atob?function(e){return n.atob(e)}:function(e){return e.replace(/\S{1,4}/g,E)},D=function(e){return x(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},C=function(e){return P(x(e))},k=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},O=function(e){return C(k(e))};n.Uint8Array&&(b=function(e){return Uint8Array.from(D(k(e)),(function(e){return e.charCodeAt(0)}))});var A=function(){var e=n.Base64;return n.Base64=i,e};if(n.Base64={VERSION:a,atob:D,btoa:h,fromBase64:O,toBase64:v,utob:p,encode:v,encodeURI:y,btou:P,decode:O,noConflict:A,fromUint8Array:r,toUint8Array:b},"function"==typeof Object.defineProperty){var T=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",T((function(){return O(this)}))),Object.defineProperty(String.prototype,"toBase64",T((function(e){return v(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",T((function(){return v(this,!0)})))}}return n.Meteor&&(Base64=n.Base64),e.exports?e.exports.Base64=n.Base64:void 0===(o=function(){return n.Base64}.apply(t,[]))||(e.exports=o),{Base64:n.Base64}}(r)},91296:(e,t,n)=>{var o=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),d=Object.prototype.toString,p=Math.max,f=Math.min,h=function(){return u.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=i.test(e);return n||a.test(e)?s(e.slice(2),n?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var o,r,i,a,s,l,c=0,u=!1,d=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=o,i=r;return o=r=void 0,c=t,a=e.apply(i,n)}function b(e){return c=e,s=setTimeout(S,t),u?y(e):a}function w(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=i}function S(){var e=h();if(w(e))return P(e);s=setTimeout(S,function(e){var n=t-(e-l);return d?f(n,i-(e-c)):n}(e))}function P(e){return s=void 0,v&&o?y(e):(o=r=void 0,a)}function E(){var e=h(),n=w(e);if(o=arguments,r=this,l=e,n){if(void 0===s)return b(l);if(d)return s=setTimeout(S,t),y(l)}return void 0===s&&(s=setTimeout(S,t)),a}return t=g(t)||0,m(n)&&(u=!!n.leading,i=(d="maxWait"in n)?p(g(n.maxWait)||0,t):i,v="trailing"in n?!!n.trailing:v),E.cancel=function(){void 0!==s&&clearTimeout(s),c=0,o=l=r=s=void 0},E.flush=function(){return void 0===s?a:P(h())},E}},62705:(e,t,n)=>{var o=n(55639).Symbol;e.exports=o},44239:(e,t,n)=>{var o=n(62705),r=n(89607),i=n(2333),a=o?o.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?r(e):i(e)}},27561:(e,t,n)=>{var o=n(67990),r=/^\s+/;e.exports=function(e){return e?e.slice(0,o(e)+1).replace(r,""):e}},31957:(e,t,n)=>{var o="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=o},89607:(e,t,n)=>{var o=n(62705),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,s=o?o.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var o=!0}catch(e){}var r=a.call(e);return o&&(t?e[s]=n:delete e[s]),r}},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},55639:(e,t,n)=>{var o=n(31957),r="object"==typeof self&&self&&self.Object===Object&&self,i=o||r||Function("return this")();e.exports=i},67990:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},23279:(e,t,n)=>{var o=n(13218),r=n(7771),i=n(14841),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,c,u,d,p,f,h=0,m=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=l,o=c;return l=c=void 0,h=t,d=e.apply(o,n)}function b(e){return h=e,p=setTimeout(S,t),m?y(e):d}function w(e){var n=e-f;return void 0===f||n>=t||n<0||g&&e-h>=u}function S(){var e=r();if(w(e))return P(e);p=setTimeout(S,function(e){var n=t-(e-f);return g?s(n,u-(e-h)):n}(e))}function P(e){return p=void 0,v&&l?y(e):(l=c=void 0,d)}function E(){var e=r(),n=w(e);if(l=arguments,c=this,f=e,n){if(void 0===p)return b(f);if(g)return clearTimeout(p),p=setTimeout(S,t),y(f)}return void 0===p&&(p=setTimeout(S,t)),d}return t=i(t)||0,o(n)&&(m=!!n.leading,u=(g="maxWait"in n)?a(i(n.maxWait)||0,t):u,v="trailing"in n?!!n.trailing:v),E.cancel=function(){void 0!==p&&clearTimeout(p),h=0,l=f=c=p=void 0},E.flush=function(){return void 0===p?d:P(r())},E}},13218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},33448:(e,t,n)=>{var o=n(44239),r=n(37005);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==o(e)}},7771:(e,t,n)=>{var o=n(55639);e.exports=function(){return o.Date.now()}},23493:(e,t,n)=>{var o=n(23279),r=n(13218);e.exports=function(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return r(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),o(e,t,{leading:i,maxWait:t,trailing:a})}},14841:(e,t,n)=>{var o=n(27561),r=n(13218),i=n(33448),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=o(e);var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},30845:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var o=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function r(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],i=t[n],!(r===i||o(r)&&o(i)))return!1;var r,i;return!0}const i=function(e,t){var n;void 0===t&&(t=r);var o,i=[],a=!1;return function(){for(var r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];return a&&n===this&&t(r,i)||(o=e.apply(this,r),a=!0,n=this,i=r),o}}},38996:e=>{e.exports={general:"PSPDFKit-au2y6ump4kfh59dxhzebebxuk",default:"PSPDFKit-rnby3kbjng3wxrprufma34mec",primary:"PSPDFKit-2pntgtgpg8fsv3qg8w5fqacy4h",disabled:"PSPDFKit-8gpjtx5az7b1eem7nk5gvydakg",inverted:"PSPDFKit-268tqp6xe3scp42vzy5s2eg3gw",danger:"PSPDFKit-948yzas5m1v89qgwznr168uzt",group:"PSPDFKit-3k3q1afeauc3dkyydsfhd7rcnf",groupAlignStart:"PSPDFKit-5rgcz4b9h8c8cna578xznnvwj9",groupAlignEnd:"PSPDFKit-7hx4xwaavengsmnusu1bgqjqxm",groupSpacer:"PSPDFKit-5s4by7ab9qyy27f25vvhggw9a1"}},61431:e=>{e.exports={controlButton:"PSPDFKit-2vhjpczqartzetc7h7a1xe2swv",contentHidden:"PSPDFKit-2nr4hbrfacpy6asgcy579kavvy",wrapper:"PSPDFKit-54fzg7z8tvnck7852u5y8tje7y",pickerWidget:"PSPDFKit-6e5m92eu677mvmp8771tt8vjp4",picker:"PSPDFKit-4z6z5fvcvgzmwxqzw9312q7pbd"}},81585:e=>{e.exports={center:"PSPDFKit-38tjaczw7mwm22y3raq5wmyy1j"}},98932:e=>{e.exports={label:"PSPDFKit-4x5dznaux2fnhttuhjv8qpnrxj",root:"PSPDFKit-79691ssynn76fuqcjks69dk3ms",input:"PSPDFKit-7sgqtcguswky89v7b7fn8q2nc4"}},12459:e=>{e.exports={container:"PSPDFKit-8gjpn8p7xvprbe81bs4qegz9b5",dragPreview:"PSPDFKit-49jnx4hscrumgdkjrg64zuk14q",item:"PSPDFKit-7ax9upudu4ydm6jd89kdj7c6yp",content:"PSPDFKit-2x9bkxefr59ns3waswhn3y72cg"}},37940:e=>{e.exports={}},11149:e=>{e.exports={wrapper:"PSPDFKit-65g4dzzwf1baxctk21rdyms5mr",trigger:"PSPDFKit-8argm94ptuprgj7y3vhw6dr8au",triggerNative:"PSPDFKit-8bsn2442emy52wh8sckmyyq3b6",triggerIcon:"PSPDFKit-4e1fn8va5ecagrevznyumqpt8k",content:"PSPDFKit-5mvfn68qgpc7atqubnfuc3f4b4",contentNative:"PSPDFKit-8bk7wp33b8n1aehgs8mmv32j4t",item:"PSPDFKit-399auf99f4y73aujcw9743yw3g",checkboxItem:"PSPDFKit-59ey17e4mhkgymzb2eu552tv9e",itemCheckmark:"PSPDFKit-6pvqs8xmu549e8xwas52rsdn3a",separatorItem:"PSPDFKit-23nsg5e8wvhgwkuwtf7s7yajjk",itemNative:"PSPDFKit-7hgwsfrfptbsjff1w8wp3vs3fh",itemHelperText:"PSPDFKit-8319n6q61cgvbywqraddyzzq4g"}},18953:e=>{e.exports={richTextEditor:"PSPDFKit-5dmn7sg6ek1rhdxkvkqcbqh9k",wrapper:"PSPDFKit-5uzk3qfr7fcvb4g9gra8chacg8"}},68402:e=>{e.exports={controlButton:"PSPDFKit-4nwgurkrevp1yuf43kw3pw6n4x",contentHidden:"PSPDFKit-617nrrn3mfmnddnq1twgtfg8r6"}},45265:e=>{e.exports={wrapper:"PSPDFKit-2sdtmn12dteusjwrjqrdg811d9"}},48721:e=>{e.exports={dialog:"PSPDFKit-72w9tuwnjsamr2knxvc63vmsar",squareCorners:"PSPDFKit-4xwm59bykq6v7gwcyxwek1ydrn",backdropContainer:"PSPDFKit-3284fys8g583pzu3bk5ga8zefu",section:"PSPDFKit-7765ngjsv6cemmhcayzhemjc2z",divider:"PSPDFKit-3mw4zj9p2e4tyy78h5yqq4qax7",dividerSpaced:"PSPDFKit-47ev9d7dyk4ccum2tcjz3a3r35",sectionSpaced:"PSPDFKit-z6uw3esrcxb9v43jgpz5fvnmt",shaking:"PSPDFKit-38d49zqp894x7hvhpr4zu4cbhn",shake:"PSPDFKit-73sp85tuvq7xtryqz19u273z9z"}},41707:e=>{e.exports={progress:"PSPDFKit-7ed17gy5t5hdnc4rekhbhwue9z",appear:"PSPDFKit-28ac9mfnscmu7fw7gy316sv7bn",progressBar:"PSPDFKit-35yq8vgyqdkq1cwb6v94z64det",progressFill:"PSPDFKit-4dwvz8ana6tddzhfs85f6mnnp8",progressText:"PSPDFKit-c8eg9u7nftba2p6d1jj8d8kzb",loader:"PSPDFKit-7ndmeze8gd8de3z4btdkfg1dtd",loaderDot:"PSPDFKit-3kawgqfqrbzkay9qu26fpcdsef",loading:"PSPDFKit-58k69thdd3ken25z2cjaqd7zx3"}},15967:e=>{e.exports={radioGroup:"PSPDFKit-f9rncje5vypsb5267rnrdcs85",iconLabel:"PSPDFKit-3uur2bmk3hqenhtsm6vtpkds4a",iconLabelIsActive:"PSPDFKit-6xcnmm7jxc3re1cmuv5z4j6sk7",icon:"PSPDFKit-8c6mhtrbbsa2js16uaq25bwfa1",selectedLabel:"PSPDFKit-7xbq3geyeftt96vccbps1yn6n7",radioGroupLabel:"PSPDFKit-6d1dypxk3mwh24wj647gqjdppa",fullWidthRadio:"PSPDFKit-4psvp5qh3p6sm4qkr5q2ax9kw5",radioGroupIcon:"PSPDFKit-57yjxnefe1fy6tdx3g76jf6qzv"}},60044:e=>{e.exports={default:"PSPDFKit-38cjpvxsadupm25h2qyxa7n5gd",error:"PSPDFKit-6x4yhy9ph7pfrk6h8kw9utwu6",success:"PSPDFKit-2ymexjhtn4dy2ktzjafxvn4mcm"}},38104:e=>{e.exports={h1:"PSPDFKit-8t7e487v5yhvt5nw4msux95yx4",p:"PSPDFKit-4u8kmkyf5hdjhe4qvnt5a975a7"}},37024:e=>{e.exports={}},21246:e=>{e.exports={visuallyHidden:"PSPDFKit-8aptmp24g12z3cd4gbhkz59kk"}},66489:e=>{e.exports={container:"PSPDFKit-37y8jyguj8pacvfe5xhztdrrvh",hoverContainer:"PSPDFKit-5wkfpeyned7c4yt1mthjm2byaz",innerHoverContainer:"PSPDFKit-273bhz15uvme1jcsnfahrnpqhm",innerContainer:"PSPDFKit-6c7xfncwch6xyvu2c9ht4628jr",title:"PSPDFKit-7pv18yphuz8xnmy775ru1vhcxe",label:"PSPDFKit-35atxysv8qfd3f8r6vuxhqfqdg",content:"PSPDFKit-3771qspwv8ehjtp2dy2fzju48j",contentRow:"PSPDFKit-2yrnzfc2gx8w1fwmkqaw1avw1e",radioGroupWrapper:"PSPDFKit-88mdrcgzvp2729thzbev99hpvr"}},91533:e=>{e.exports={wrapper:"PSPDFKit-3g9zhcucr422ntc7f1j5r7d642",handles:"PSPDFKit-5jju3cq115q7jyhsr5tbbc9k5v",handleBottom:"PSPDFKit-7crnzth1tunbc1y11dsmm25d3d",handleTop:"PSPDFKit-6jhwapspg9juffwvb74ngnheyk",vertical:"PSPDFKit-72wh5syb1qx2wkvnqjh2ts7ghz",handleLeft:"PSPDFKit-3532cjnqew5bhzac79j6tsgba9",handleRight:"PSPDFKit-2mzfwjn4a49rq62m884wpsqvwe",horizontal:"PSPDFKit-4xstjgjt6yzwy52577u1uxmq58",handleTopLeft:"PSPDFKit-75mze7fkqv4saep8aun4y1qf7n",handleTopRight:"PSPDFKit-q2hk1mcaqqvf11djfan91yrhz",handleBottomLeft:"PSPDFKit-7w3jyr3yvfr7hpbmmha8uc2wr7",handleBottomRight:"PSPDFKit-3n3x1jyrwpd789w22qhc6nrscf",cropBox:"PSPDFKit-7mmux7swq1uq9t5m59se9qu3u4"}},14526:e=>{e.exports={commentThreads:"PSPDFKit-4fy2py5absazy7wc1atsvf39uh",commentThreadsSmall:"PSPDFKit-8skwhax4ksk9yd3zuznq1wyjxx",commentThreadWrapper:"PSPDFKit-846k3gp7b8ystvpdat7kchu6cf",commentThreadWrapperExpanded:"PSPDFKit-57ma556dgg7p25vkpwgypaprqm",commentThread:"PSPDFKit-62tyf1xqx4kgnu144gt5uy9j9p",comment:"PSPDFKit-6n4vf5zb3fds69s2uvw3xyfaxk",separatorSameAuthor:"PSPDFKit-6abtkbxbe387rzj3weks85eubv",separatorDifferentAuthor:"PSPDFKit-8gpdea9u4mgzacra4wx6vq3mxh",header:"PSPDFKit-83aay96yymctba7rmvy6wzwfzs",creatorName:"PSPDFKit-th67kk1b8w7umaeh289rjkc6s",commentDate:"PSPDFKit-6kppppmn52ajrv8ahh7vyaqspg",avatar:"PSPDFKit-e5y5twy8xx7ngqc3p762cs3ca",nameAndDate:"PSPDFKit-8xau5mfzb7xbtsd67bf4f7amph",commentText:"PSPDFKit-2uymwug35415u37jmmjeckcf66",notExpanded:"PSPDFKit-3setj6xgj3k3aecpjfhn26sbqn",commentActions:"PSPDFKit-3jv55mynpjvcvxarj2awcxbc4q",commentToggle:"PSPDFKit-3wf8kzxdewz91bkynxz9nf13vn",commentFooter:"PSPDFKit-526mgvw6wxrzqu5nzg18xsexvq",moreComments:"PSPDFKit-37dn8ce9d95692mrtn658uddbn",showMore:"PSPDFKit-728a47tmgr74fsteq92f378fyg",commentEditorInput:"PSPDFKit-8bcg3139te3u6y5mk63jjafky4",commentFooterEditor:"PSPDFKit-gwvf3p8zpgqc2xerb19dqrnes",commentEditorActions:"PSPDFKit-3a6az8snvjp28tbbeuzbhb8g3j",commentEditorAction:"PSPDFKit-78r8tk3h18d8s38nbbx1uqszas",commentEditorAnonymityActive:"PSPDFKit-564hkgdsdrr48xx9gtkeb7dqfn",commentDelete:"PSPDFKit-89d8rmjrbxpgn7uejbavm1wqax",dropdownWrapper:"PSPDFKit-5y5p3r6ykjn2ayvbvjkrfqphey",editingCommentText:"PSPDFKit-37gwnzwf4ca3vasdqrh9p66p1v",editingCommentWrapper:"PSPDFKit-8nc3tp5w5tk5jedzmbawt81rb3",editingCommentActionButton:"PSPDFKit-6jv6xmp6n2fxwyfe3phh1xct3z",editingCommentActionSave:"PSPDFKit-4dtxkws1vg1m6nx9tv4e33tefm",editingCommentActionSaveNew:"PSPDFKit-7n31ebvwcswtxak829vc39yhjg",editingCommentActionCancel:"PSPDFKit-2bmschmeqc7h7vpt1u1ks4ekab",inlineToolbar:"PSPDFKit-58hy6741cqa5n2g3pqaermn97s",inlineToolbarButton:"PSPDFKit-7azr74fz3pqmr7w95zv8xmz3ht",linkActive:"PSPDFKit-5ege4ny766r38mq51n6h553ksm",caret:"PSPDFKit-2vt7cft41fzxgd9tpfhgpj5wba",inlineToolbarGroup:"PSPDFKit-89u863ebnbu84fn5v8hhghh83x",inlineToolbarSeparator:"PSPDFKit-3e81entadshw7dt4gtbeuem2xu",colorPickerContent:"PSPDFKit-2nb7drgzfpu5sppaazuvdaas8q",colorPickerItem:"PSPDFKit-27enn5x7u3gsa4w34fz12kuudf",colorPickerCheckered:"PSPDFKit-7cw46tuwy1qkcm76hq7uwx4ts8",linkEditor:"PSPDFKit-3c59qxsr59e1naufh4mu6t8e1m",linkEditorHeader:"PSPDFKit-7kqa88wjcucusw944q4td6njjs",linkEditorMenu:"PSPDFKit-45m9kechgpmukdwrz93q4qmrh1",linkSaveContainer:"PSPDFKit-78emxwqr69budhctjscsd4btu4",linkEditorRow:"PSPDFKit-739qzd1hv6b6qjjx638p4258gh",linkEditorCenteredRow:"PSPDFKit-2t2huzxxwcaje7r4h9u6cs8gf8",linkEditorEndAlignedRow:"PSPDFKit-4pxvqpszy7wy3zb3hxw4p8qk2r",centeredLinkEditorHeader:"PSPDFKit-3u7etkbahb7gyv7dvxrfvtugfd",linkEditorFullWidthButton:"PSPDFKit-23zx2zfm8wum8a6s3vr81nawu9",linkEditorFooterButton:"PSPDFKit-pjs3fa92fehykyz7vs566ebn3",removeLink:"PSPDFKit-7h3b7pnecezaz8fgbk4hcbh93n",linkEditorArrow:"PSPDFKit-2cz2cdu6k2usyms4krcjqkgzbu",commentWrapper:"PSPDFKit-52j8fcsvjaarry461zrkhc7yda",commentThreadPopover:"PSPDFKit-4jcbdncntz6ym55txnw16jhkaq",innerWrapper:"PSPDFKit-738g668qas89ty7hkqaw6r3wj8",commentThreadPopoverFooter:"PSPDFKit-4amdryyq1gwctc8eh3eqqdusyx",commentThreadPopoverFooterEmpty:"PSPDFKit-2k9waz28euj6he95bg1pth1q71",moreCommentsContainer:"PSPDFKit-fe2j351tsy55sdctatshf3857",moreCommentsContent:"PSPDFKit-2trdpjz58pc2r42ej2mpjdjggh",moreCommentsIcon:"PSPDFKit-2d8udu9h2jqun2hh3rp6ezbyge",mentionDropdown:"PSPDFKit-2qrt7yauvpmt7wqd1bfz4r74ju",commentActionsFooter:"PSPDFKit-29ub44u4t1nq9au4r5r8gq16zz",mentionDropdownListWrapper:"PSPDFKit-7wmscxcygts9c5vqhurfsbvmz5",mentionDescription:"PSPDFKit-2gj9mhp9gmfbukw358y5b5qcg1",mentionImg:"PSPDFKit-5an9sajqpsfwmvtaqzwmrwpa1f",mentionName:"PSPDFKit-82e5n33n5hsu3sehrtwr8cegm6",mentionDropdownList:"PSPDFKit-283uxv24vcfj241z4bctddtydk",mentionDropdownListWithoutDescription:"PSPDFKit-6f9qc1enqd8ejv1rusfkvmsbum",wrapper:"PSPDFKit-6p3jtubgkq6b3vgyr1n1fm5hh6",flagWrapper:"PSPDFKit-2cdzkdcuqaah7ztnfqfbupn397",label:"PSPDFKit-4693n37yeyx3742yquf9zbuh9x"}},14149:e=>{e.exports={wrapper:"PSPDFKit-5eynqxckhbqrz8a4f77yujbh2k",tooltipFont:"PSPDFKit-42pbth2eu2zrmgpae4jhg6h8en",arrow:"PSPDFKit-6nx2uf6vhf6v33bnb1j4ganvvd"}},20423:e=>{e.exports={textBlock:"PSPDFKit-nxtuykwdsyjh6y7z8brn21b7",activeTextBlock:"PSPDFKit-7qanggak6kh1whzh64vrkx4krz",focusIn:"PSPDFKit-6jc5m1b3ck8fqehqqd9b7th6gt",movingTextBlock:"PSPDFKit-7mzzrbnpvegtq3qm6jswkervc3",selectedTextBlock:"PSPDFKit-f7jcky6yaxh4m5617uaekk3cj",tooltipButton:"PSPDFKit-3mngkstqybyrr7k8f5kgqf5ksn",tooltipSVG:"PSPDFKit-7eywttjpush5dwpejjm2b1edg3",blinkingCaret:"PSPDFKit-4tgb9n39czt6qk8ajacqjv5xdj",blinkEffect:"PSPDFKit-7kwgpn262dubfp6s5nxvyrt295",resizeHandle:"PSPDFKit-7mpkqw7nbbw6tju4s46mm141sc",resizeHandleCircle:"PSPDFKit-3wksyn2d8kqsw1kg6b3vqztpfr",resizeHandleRight:"PSPDFKit-2dv6u2bf1w5g4e17qeenc78qhu",resizeHandleLeft:"PSPDFKit-4fvhxnqd5sg3bad4pr5gsqshv2"}},44295:e=>{e.exports={header:"PSPDFKit-8pxcgwyzugpmx2y9hzc8mar5sx",legend:"PSPDFKit-46bu8hmtxqnu6z2bfjmgu8yc12",footer:"PSPDFKit-2xtks3w6gdnf916enx9j4pwpfu",addButton:"PSPDFKit-4vs74kx4e13zumkps7tgue7ez",signaturePickerContainer:"PSPDFKit-5aztmmhhz1251z37zr16w279dd"}},83251:e=>{e.exports={modal:"PSPDFKit-upyueavav3kv33ygfhr93t7hn"}},52940:e=>{e.exports={tabsContainer:"PSPDFKit-8gq7mgq8djv9ezfm3aggdqah73",tabsList:"PSPDFKit-4naqn2bzdrgu5nb7mcca6813b9",singleTab:"PSPDFKit-2wypy7bhpedng6w2enk86n2ffe",tab:"PSPDFKit-2c6rssd6rpe9grxycaej4zf8rn",activeTabIndicator:"PSPDFKit-79am7vyks3epfsjgn3wk7mww8m",checkbox:"PSPDFKit-83cpfrtzfckj4rmhdjbf74dvzb",checkboxLabel:"PSPDFKit-7wtc4u9qzvmjad6d77716688jh",contentArea:"PSPDFKit-u7shgag5rj3hh92n3awajszy4",footer:"PSPDFKit-2qk916qe3f3jfunhkv92wmtjwx"}},27074:e=>{e.exports={addIcon:"PSPDFKit-47zcsv3fwu5f5j1agedgk7s38h",addButton:"PSPDFKit-84pakzkccrn1sw838hggzcebe3",dragZone:"PSPDFKit-73gasbj8rxtmc5mfcsd6kz1pnz",dragZoneNoLegacyEdge:"PSPDFKit-46re49atn1q2cssy9hm43jv1d9",dragZoneNoSelection:"PSPDFKit-7aga8jh8uu7qs1c39crzpzcny9",dragZoneContent:"PSPDFKit-64akqfkfe3yfh3psehrkhk11cn",wrapper:"PSPDFKit-8p7hj7mrmswvdvz9dgac99kcbp",imagePreview:"PSPDFKit-7p7qnahhw8p91ewfd4espwghse",draggingOver:"PSPDFKit-2y5be3xzgvqseyuzhcmm6vsx4z",hoveringOver:"PSPDFKit-7d7x8413mymuchrw2nz2993mp7",legend:"PSPDFKit-83fg6reutzs25txppbedtku6vc",filePicker:"PSPDFKit-82vsn8dkv4nb7e9kgk5qp8xbgp",fileLabel:"PSPDFKit-6u72ac2hzryqdgq3x5wsufupt4",buttonLink:"PSPDFKit-5dt9dw8u46k56qmj8cuh4sh97h"}},70768:e=>{e.exports={wrapper:"PSPDFKit-5e3vu2w8sdv2pf1emxt3yraaqv",colorPickerContainer:"PSPDFKit-4a1d7hjmzrnsgm1gb318csfrvy",canvas:"PSPDFKit-8wzepjf229upy2k96xt66nwvg1",editorCanvasContainer:"PSPDFKit-4g59caqc4n814yqz4cmsatkbb4",signHere:"PSPDFKit-25wyftd6zqm5vz9yxv6w2ptfka",deleteSignature:"PSPDFKit-465fzcz7141apddhad1qk38m5n",actionContainer:"PSPDFKit-8ca9yy99yv6dw22x1rju3mhdb"}},49814:e=>{e.exports={wrapper:"PSPDFKit-719ep6pyz562atwmhkacj3k3m6",typingUiContainer:"PSPDFKit-3n31k66pdk1ftnkfsz9qyf4hw2",colorPickerContainer:"PSPDFKit-8wj5zntp4dv3watzk8r2x89phc",DropdownColorPicker:"PSPDFKit-61amcd4h9urqydnusjka2n26zq",colorSvg:"PSPDFKit-2drm1cp6n3kvyeazukdtmu95sc",inputContainer:"PSPDFKit-4ptevweskgj257y41s798h5jjb",opaque:"PSPDFKit-7nwwdf84apx2b7hzp5dwzennx6",input:"PSPDFKit-g4c1ts5y4vg7jfgqfpbfzejm3",actionContainer:"PSPDFKit-73vux44ggg8dap4rwv4kyjkhn3",signHere:"PSPDFKit-3p7nz96bvsjsdgjw4c8kyj4398",deleteSignature:"PSPDFKit-3ks1wb4nkwub2urv5f3f4u4yvj",fontFamiliesPickerContainer:"PSPDFKit-qs3v152s7j26gqhj68c2q6bss",fontFamilyWrapper:"PSPDFKit-8y4kczzw2wzt6m4hbr729kb92t",fontFamilyRadio:"PSPDFKit-77g32ukjbbpdu75xgmdsyxjjhg",fontLabel:"PSPDFKit-5ua85syhm5ve22x5eyb9j4wkut"}},72673:e=>{e.exports={label:"PSPDFKit-5w3r6933jce2abq346fpwgue51",input:"PSPDFKit-45ug7rn2wuu9n7de4t3y1vuqwa"}},99580:e=>{e.exports={wrapper:"PSPDFKit-9kt28ket9qkhevfbz7cbbw1hb",controlContent:"PSPDFKit-4qbtrs7uku7m1vc5hra33bpuyg",icon:"PSPDFKit-3wag8ffkyv8h2tybvhe7amk9nm",content:"PSPDFKit-5sx5qx4udha76yjmqjkh932ffg"}},47860:e=>{e.exports={wrapper:"PSPDFKit-5ndr2a8v593wmzbkugj7mhpkx6",title:"PSPDFKit-8a1r68duucnwazuve1yp3nbng9",option:"PSPDFKit-4wma8z492shc4ep1hmy6t4vqut",icon:"PSPDFKit-4tmeja8e4gtumrdf83gvhyrcc4",button:"PSPDFKit-2ajb1c5391tmr11mqhaytx273m",optionContent:"PSPDFKit-42c2zme6zggmdzdxcpyafgegx3",deleteButton:"PSPDFKit-4muygv9es2v72qv85d9qdw6e96",deleteIcon:"PSPDFKit-7qr7fr949c5zy3chtgst1aqgnh",addOptionButton:"PSPDFKit-2ds9qudjp9zf1adda74rdu1zrf",addOptionInputWrapper:"PSPDFKit-4h68nb316qa6qx4sztcx3gjhnt",addOptionInput:"PSPDFKit-7squ9wp4ashk5qmgwbchusb3aq",hamburger:"PSPDFKit-62ry3uufpzt87bj49pdg2g3nbm",preview:"PSPDFKit-35d4wvwwd43nxvufv3g9vaexbe",invalidOptionInput:"PSPDFKit-2qjmywkp4vpcrjshnshk8bang7",addOptionInputWrapperInvalid:"PSPDFKit-2jz3pq39c872g9k317nqj88ts4"}},22458:e=>{e.exports={item:"PSPDFKit-6zammky19ps21racepzhy8rr4j",itemIcon:"PSPDFKit-2973scygnut2d1y23dq3gdzwkg",itemLabel:"PSPDFKit-257gq35az6dtxxmtvu6h8s17rt",advancedItemLabel:"PSPDFKit-4jkuv1k2kb5b4d6b929psybced",colorDropdown:"PSPDFKit-5n1c5d9upb23g6mdj3vrzdqj7c",colorDropdownMenu:"PSPDFKit-78jtbtb2j2q11tpjx4jn1wvwvk",sliderDropdown:"PSPDFKit-6s5q3xcggvrp6jet4dfsc14pgv",colorSvg:"PSPDFKit-6gk4p1adjfr1kg7hjpk3dgvtwc",colorItem:"PSPDFKit-4eqdajsqgt941vw7crd9u82kmt",nativeDropdown:"PSPDFKit-837ytb7vykc59sv5yrbgvzw1yp",dropdownGroupComponent:"PSPDFKit-6u23tbh3mu8cm8awxqyzn1zyru",dropdownGroupMenu:"PSPDFKit-5rw15mhzf9ycre4r1g7q2ptv9h",selectBox:"PSPDFKit-3691qqtsdq1317y5z7k3ak5jgk",advancedItem:"PSPDFKit-68nrp97epj74ah3dwvjg79nfmr",advancedItemValue:"PSPDFKit-5fqyghhu3ajdj6t464j4ufdk6q",radioButtonWarning:"PSPDFKit-7qt3uxz4r5wpssw2bbe778ga4g",radioButtonWarningIcon:"PSPDFKit-edsr1ac3tdhjwcufzhwq9jz98",radioButtonWarningLabel:"PSPDFKit-8fdb8fsm3rux9gpz8ggdyhhsyb",formFieldNameReadOnly:"PSPDFKit-71h65asx9k85mdns4n8j2kt3ag",inputReadOnly:"PSPDFKit-8drrc5pnvxucen4e82mywhscj3",lastInputField:"PSPDFKit-6eg6h7jnq9b1wjwv6kf3eqsd7b",footerButton:"PSPDFKit-7kqbgjh4u33aw27zwkrtu57p2e",deleteButton:"PSPDFKit-68w1xn1tjp178f46bwdhvjg7f1",doneButton:"PSPDFKit-8jb23wpy76fvg2x2vsvwy4rwvx"}},23756:e=>{e.exports={wrapper:"PSPDFKit-4q6rf47rhqhrpm9gdfefxt7qxa",label:"PSPDFKit-nt12adttbyb52awsgj2pvucxy",dateSelect:"PSPDFKit-3wx3w3pvjj3upy6569x74y56pt",formatSelect:"PSPDFKit-gcyutzqwxqe8x4u9j7mbfz1ub",input:"PSPDFKit-3yju2u277834cy3gahr2r5pxwa",inputError:"PSPDFKit-42bq6cs954sqg5h9qybewg7j71",errorLabel:"PSPDFKit-m39r8ehbhmf2d2t2fhn5emy6h",formatSelectWrapper:"PSPDFKit-ef4eqctrqnwdwaphd17x3zhbd",disabled:"PSPDFKit-u8tjzsmapgm69zq2qzyaxhxkn"}},92164:e=>{e.exports={wrapper:"PSPDFKit-21tdya9vwjkb9467d89dpj3dz5",guide:"PSPDFKit-6hysu1r6uydnrqrhfk1pps1pr8",hGuide:"PSPDFKit-7dhdpumpuhp8jg295a51ffsd9j",vGuide:"PSPDFKit-8csd1vhppnqgu7uyk8b5mf7czf",buttonWidget:"PSPDFKit-68un8hbc6qvj9x9s9g5q6t21ve",checkboxWidget:"PSPDFKit-5ah6dzjmznmmkdumesdneq7wz7",comboBoxWidget:"PSPDFKit-6fnpakckpk47tsnm8uz3m17u6y",dateWidget:"PSPDFKit-4yuxudxn8gpqg5ask3mtg2zakk",listBoxWidget:"PSPDFKit-51yew4ehdjn7cbsyfq5njb69ma",radioWidget:"PSPDFKit-41fvab9cypgzqfakdc8v95dcb3",signWidget:"PSPDFKit-7w2dawdet2j2kdxg5sat88d5bq",textWidget:"PSPDFKit-ecnxn5u4wzb7hzydwhayukxj",widgets:"PSPDFKit-737nkwy7w9s6vc4dtbb23bs54a"}},36898:e=>{e.exports={hintLineSvg:"PSPDFKit-34rw6dd52chrrk7xv2jr6zquew",line:"PSPDFKit-3eg3ptc58eu1dbczvddeqqmn75"}},25393:e=>{e.exports={root:"PSPDFKit-6eekmx2r3rzpn49557vdt2e5tj"}},62967:e=>{e.exports={colorDeleteButton:"PSPDFKit-996xvngvf7q6px5aesbyjcvt5",colorItemContainer:"PSPDFKit-43z4uam4dc2twts8dzzjr863sc"}},61252:e=>{e.exports={root:"PSPDFKit-8yyas95udks18p394fepzz4n9c",expanded:"PSPDFKit-4a4w8vxdz3qm2pcgsdreydv72t",content:"PSPDFKit-4xrf431ss37nqh76k5db3ja96w",left:"PSPDFKit-7s5tce8pp2hsk5huzfuxez1gr9",right:"PSPDFKit-53fgdvrhz6gw1hw6bdctgq1t9y",mobileTextMarkup:"PSPDFKit-5cjsnmyjcke6b1v12yfgbz41gg",stickToBottom:"PSPDFKit-6kfdt35ea6cx8yeepx58n36vmj",fixedHeight:"PSPDFKit-5f5bztx4e8cyvfqegfp7b8wthw",control:"PSPDFKit-443h9wb93vz3ncxwx1m5fdwczf",selectBox:"PSPDFKit-7m8dfjh7avxk6eweakkjyh6xyd",textFormatControls:"PSPDFKit-713qj5u5gbp169rww4vvs3uac",controlWrapper:"PSPDFKit-4h4nb13c68hupg148pgyvzqd9f",controlWrapperAutoWidth:"PSPDFKit-6xaanvujukmusu5r1tv594b12u",separator:"PSPDFKit-3vb4yamdnmg7g9xnhd6yk22phr",form:"PSPDFKit-4cdb93w5e9ug2gjhtp66ummy9y",formGroup:"PSPDFKit-5wuw8bj8khzgeg84fnwh7kh6sn",button:"PSPDFKit-nwjc4czbh63dp4kvymek1fa3e",rotateButton:"PSPDFKit-sja59fxys18kkmu18xy6hph1s",measurementToolbarButton:"PSPDFKit-c3779mg2s6295w7bzec9269ub",iconOnlyMobile:"PSPDFKit-3xypkvwg7p8nvzw3r5s1buz9ej",blendModeSelect:"PSPDFKit-7gmgduz1enf1gxbhyfgf6e75hf",fontFamilySelect:"PSPDFKit-5r3wt2zcuevj4sv3duqd61jwmv",fontSizeSelect:"PSPDFKit-6wmznmmpnx14v21nf84mdrgcjn",colorSelect:"PSPDFKit-s6seujr5t4rukk7rxf3xkz55e",endLineCapSelect:"PSPDFKit-3g7scgbk9uy7r46ajp7k1jjfbv",startLineCapSelect:"PSPDFKit-4h8xfhv4hcmbz7pprrj5g8dddv",strokeDashArraySelect:"PSPDFKit-c55swym84na3uj8cbws3nfkvk",colorSelectButton:"PSPDFKit-7eqxqzsm46bunvt6wn6a96cph7",controlIsDisabled:"PSPDFKit-54dwj7qcngkpxsybb6fqkr7y51",textAnnotationOpacitySlider:"PSPDFKit-2mcx41qn64buedadzqmun4x439",annotationNoteButton:"PSPDFKit-8ax4j3a47u9hsgjmxfqh4s4b59",deleteButton:"PSPDFKit-64vjbtpmt1hrduq893ygvk8vse",buttonNoBorder:"PSPDFKit-v8tqx1qvfp1vbwuttpp622dr3",noteIconLabel:"PSPDFKit-4cag238pz8y3y7dh5jbngjmrzs",applyRedactionsButton:"PSPDFKit-2hdx47smz78g3s16p3r4j4dgty",formDesignerButton:"PSPDFKit-2annhwtak67ncv4t85ctg2y3mz",isActive:"PSPDFKit-2vn1euub4mwbphwqwgfs1891h9",disableEditing:"PSPDFKit-p1au3zb7x12z2rhdhxt23urrf",disabledButton:"PSPDFKit-3jfra6hbvv4uav6ycenbqaya53",icon:"PSPDFKit-4qyrxjw4v89xuqdkqa4k8ztzzu",focusRing:"PSPDFKit-21r1nktvgb352rd4c4yy57pz9g",fontFamily:"PSPDFKit-7gzw1kmadbfq1tnmw7d1w7zxd1",dropdownMenu:"PSPDFKit-3ytv364gpnrm7x19bnbmeyg8f8",warningButton:"PSPDFKit-46sarmfrc8jg6s66bqgfefbjjh",warningButtonIcon:"PSPDFKit-4zhmsmuwkhtpwtruurtrcn2q8j",radioButtonWarningLabel:"PSPDFKit-54kg6hjakpubj7vt368nk674tz",colorPickerDropdownMenu:"PSPDFKit-2nazf4z9xd7xjtyhnbhe7rqgep",colorItem:"PSPDFKit-2kf3vca84fgs4vq9s7zs1gpcmp",deleteButtonIsVisibleInTouchDevices:"PSPDFKit-8gqc3tnvh9jka9muq4a9t5ahej",colorSvg:"PSPDFKit-5c7qnuw3hacprzg2xwyca31kpu",lineCapsDashArrayMenu:"PSPDFKit-46k4525rumt3dyxruh7yn6ftbe",strokeDashArrayMenu:"PSPDFKit-2ujy7afe1awfhuh9ymbm6bme7t",nativeDropdown:"PSPDFKit-4prbc6dhxp9ma6y7x5bw6vwpyu",fontFamilyNativeFlexbox:"PSPDFKit-2kq3mk8tfsg87ukm5zvcxchay3",fontSizeNativeFlexbox:"PSPDFKit-77brcq5bxx44kv6p84cffgnrfh",fontColorControl:"PSPDFKit-5frf4ykayzzn33hp3c5h7em7an",overlayTextInput:"PSPDFKit-2skb7mhe9t63pg2ukxcsw49xsr",overlayTextMargin:"PSPDFKit-3rsn1zkbd3dgwrjegb8g9hvhhg",groupWrapper:"PSPDFKit-2jq33zcqjvm19mjme567rvfrrm",groupDescription:"PSPDFKit-3xk6qkbjafwv7228ck9bx347w6",overlayInput:"PSPDFKit-7jwg5rgcerucffvtbsmxvfb7zk",radioInput:"PSPDFKit-4e75mg661j3ax96qwbdmpzpsb4",applyRedactionsWrapper:"PSPDFKit-2u9q2pe1ftds2f7qj2g4w622vw",customIconSvg:"PSPDFKit-6jesjcs8hzf3yy3bqdg9kv3hk7",snappingCheckbox:"PSPDFKit-7bm2dwvsr17e373y82u42rsemg",radioGroupWrapper:"PSPDFKit-2x6urux4z76dkhv9azjrwtw1r6",reverseRow:"PSPDFKit-41f3k1r3a4wcjyvwb632qbpsar",measurementToolbar:"PSPDFKit-8an6xzj8dczndqf5kkqj5bmdbb",measurementBackButton:"PSPDFKit-5zh4b5sq7ky7hj92aqd24n3cec",pointSnappingToggleButtonWrapper:"PSPDFKit-5y5uj8j53b14ftvfmra5n2fyyy",pointSnappingToggleButton:"PSPDFKit-6rhfuqge1pjsww21nyns7uzwz3",textInput:"PSPDFKit-28p9qe5v9wa12h9abqanj7759r",textInputField:"PSPDFKit-2dbzger7c772nf61kqx2yj1snn",inputDisabled:"PSPDFKit-37jqdeb6j87paw3ang9yrcet45",wrapper:"PSPDFKit-6pxk5ky2kj8jh4j1mw616vg41d",arrowDropdownBtn:"PSPDFKit-pynbrvdg7hats6u5gzc58czkp",fontSizeDropdownBtn:"PSPDFKit-8uffc57cupxw72ujvccyd5u75q",item:"PSPDFKit-4v7qu3gbmmmxc2v2hdycthse1t"}},10754:e=>{e.exports={calibration:"PSPDFKit-2s9j7gu6ht55v3fyhb7xkheuuq",item:"PSPDFKit-fn2f5n9d9n8sgj4djs9y86gau",scale:"PSPDFKit-3jgnu7ag1ffzarpqmuquune258",itemIcon:"PSPDFKit-nmsane1s7x9rp49pa42tzpgya",itemLabel:"PSPDFKit-2r48s2je9bp19zqfbs8mgk7184",advancedItemLabel:"PSPDFKit-24yucwgnrz6dxz6nmkt9jremkb",areaLabel:"PSPDFKit-4cuxks564t1dxgzbv7nvjy4yuc",colorDropdown:"PSPDFKit-9rhw3adf6wbfa7qrq615fjqaf",colorDropdownMenu:"PSPDFKit-6e6bk97ea2ucn9vbtxktfajm2p",sliderDropdown:"PSPDFKit-82a458mhumnurhq39us7zu6hyz",colorSvg:"PSPDFKit-5nmcjw7r4p1h2nd2mexfegg2rt",colorItem:"PSPDFKit-3cbxsq6nmh9r4f5756r6c95c7m",nativeDropdown:"PSPDFKit-86jxsd27b1jv4t4ubqhrx633pn",dropdownGroupComponent:"PSPDFKit-6ts2t8acharjbuq54t5wy2eb74",dropdownGroupMenu:"PSPDFKit-u1vpgqn2y5rje53z63f7mq5er",selectBox:"PSPDFKit-51c4fjecxrh9h4tcuygx1te5q8",advancedItem:"PSPDFKit-ncuqwmdusv2msxq73z6fzb24z",advancedItemValue:"PSPDFKit-4ua7xnacac2pm8hhds1kq2me5u",radioButtonWarning:"PSPDFKit-2abxjf7c5m54s1fbpjybj51p2m",radioButtonWarningIcon:"PSPDFKit-4enmf2wc85hnr4743bkg1tyeer",radioButtonWarningLabel:"PSPDFKit-6z22nmct2crec69qf41ena61ub",formFieldNameReadOnly:"PSPDFKit-4nrcak3ru32krpendekckcwwv8",inputReadOnly:"PSPDFKit-5x7gnppfkuuynrhwnep13pak49",lastInputField:"PSPDFKit-8zzdqsxn1q94q3wn44vjes6g2r",footerButton:"PSPDFKit-71vy88q3wndydgre2e58gj53rd",deleteButton:"PSPDFKit-5np2yc2xrsd6y7kt22abt9hb6d",doneButton:"PSPDFKit-4n879bzvk8q7g195cmz6yr433b",calibrationTop:"PSPDFKit-6ckerwnts2h4dqbxrjurcef6dc",scaleTop:"PSPDFKit-4fbe83fym7dgut61w2nf74r473",calibrationBottom:"PSPDFKit-7j9yftqvyfsbxszyryvg4tugmg",scaleBottom:"PSPDFKit-5naa93y6vbhdeeygcvssv2w99g",calibrateRight:"PSPDFKit-83b7zxjm332wqcc4s5gvrxfucj",nativeButton:"PSPDFKit-5xp4qfj9u68z92e75mcf5nqkcg",scaleDropdownContainer:"PSPDFKit-3bdhuh7gr82rtyrxt33vmpj2hk",itemHeader:"PSPDFKit-76y3uq9zy9ugrnh25fwthbtxdy",spacer:"PSPDFKit-4kxzb9uytx6jnhjtkwnzccwcb1",icon:"PSPDFKit-29u9ktdbpp3nysqgxn6naha4m8"}},80324:e=>{e.exports={modal:"PSPDFKit-52vp1wxnkrwaqvutwh9kdyma98",contentRow:"PSPDFKit-5rsrw7ak9xvqnc7bwahsasngx9",spaceBetweenRow:"PSPDFKit-6zjmyma75e4rfma6ujstg3d11u",scaleRow:"PSPDFKit-2ybdx86p6v4nqn1zrarhep8fhd",scaleRowContent:"PSPDFKit-6xaquyhkgnnz83eh3tcntmwpqp",addNewScale:"PSPDFKit-7zz1pa7xv6wgt2y9szvhke9935",rowSeparator:"PSPDFKit-4smtt8g7weze8w3e3n9ht93ak4",scaleMiddleSection:"PSPDFKit-37dv4qsruvxu93evjeh9gtqdna",scaleContent:"PSPDFKit-3766zw48tmq7b2dbzcgstgzxpt",footer:"PSPDFKit-43ubpyc1q299xrwh4k5xrxtk4m",header:"PSPDFKit-32yn21p1rhkx6139tfee43rskf",sectionTitle:"PSPDFKit-88em62dff33bjz4dpcz217kgw1",title:"PSPDFKit-5dpchy3cupj5bxucqn5nt8anr5",scale:"PSPDFKit-8cfu1mwm1ccfxda8tyh14s93v5",signatureValidationCloseIcon:"PSPDFKit-7ypv327ggsprw7wtqh3ggzwtt5",closeButton:"PSPDFKit-6t3gx31kbfuvg7pvvv3m4y2ud6",isActive:"PSPDFKit-7u52vd8vcqhwm46mqm3f6x3u4n",error:"PSPDFKit-4mb9ffzr14xj4f7cmnqkgcrcmq",scalesDropdownItem:"PSPDFKit-65q27ak2bn51hh1r3q8bw6pvrm",calibrationSuccessModal:"PSPDFKit-27a27t78xjc4pkkn8fs1enm4up",calibrationSuccessModalContainer:"PSPDFKit-6g6xvejv8dd1pf35kx6ba8gp5e",calibrationSuccessRow:"PSPDFKit-41haxjcx7ed6crwc23x62ewb7t",calibrationSuccessTitle:"PSPDFKit-68duutqz7ut9qftzm7ns95kbsg",nativeDropdown:"PSPDFKit-6zd1ytwjwxzumcawqamehzyaqs",dropdownGroupComponent:"PSPDFKit-49whdesn68fq294wzdzda443yx",dropdownGroupMenu:"PSPDFKit-3xxzytnemnzg22awfk9rymr2m7",scaleError:"PSPDFKit-75ga4kp46pkcv4peqbsu45nk79",icon:"PSPDFKit-5d5cb99rrfftnfraj6ve1wxtcw",activeScaleRadio:"PSPDFKit-5ypdmxk3tukb91thbuegtp28ry"}},31060:e=>{e.exports={container:"PSPDFKit-7d2gpuvu6pf58ndvvr6gvsje7q",warningIcon:"PSPDFKit-89fc7eud4xcjy12ca7j2haddwk",modalRoot:"PSPDFKit-47ced6qn4nruzv5vuz287qtd7z",heading:"PSPDFKit-2cqd842dczj7tmreu8ur1v9s39",description:"PSPDFKit-yuc41qrmjjetqv8krhsnx78k4",closeButton:"PSPDFKit-6xed4xk58tjqt3b2cq9x86gehh",closeIcon:"PSPDFKit-5zfc76hv99gw27ybkmbk7ebzep",buttonsGroupSection:"PSPDFKit-5wvh17kef4x55jrrzkh3hkaga3",buttonsGroup:"PSPDFKit-4qu4e2qh9g4wt4vaj7wc7rek98",button:"PSPDFKit-8etcg5412u6jyxe6wcw49n4eev",dropdownSection:"PSPDFKit-3hxqujdr5scngtpmjesahhytzq",mainSection:"PSPDFKit-3nd9gpwyygjwssm1a6vvyp2m5n",mobileWrapper:"PSPDFKit-8p7rfubnucmdpxjpsw31xbf5mm",formWrapper:"PSPDFKit-v7ryn5whw1cfrp237m7h2y2mz"}},76374:e=>{e.exports={wrapper:"PSPDFKit-6zm9nnbwvmtst5hnt9v1yhtmta",selectionBox:"PSPDFKit-4rqhxj4gybrps8vxa7fy7a3ssd"}},97066:e=>{e.exports={root:"PSPDFKit-8ffg9gawq78kbmz1r4tzjvvqc9",button:"PSPDFKit-8xy9jsj7mkgjmn242vthsdvebm"}},44364:e=>{e.exports={root:"PSPDFKit-8ehcbhz241z1tfyhjztbe12ube",isDisabled:"PSPDFKit-86bf3wbtmfc5xa3yfd4fazea9y",withLabel:"PSPDFKit-5734rhbbfgd613g81qs13md49y",disabledWrapper:"PSPDFKit-2n6h3jcy1kke81pjgewmpnqa34"}},18571:e=>{e.exports={root:"PSPDFKit-7kgnbhpp26m2rect3yjw1u1693",disabled:"PSPDFKit-314s1es5hfe28mgs9tnhkzb1de",annotationToolbar:"PSPDFKit-812ak3qykd2u5n22qxdy661rhr"}},90133:e=>{e.exports={root:"PSPDFKit-32xak74au7weyz9ycbwytr2c3f",item:"PSPDFKit-5j1459s9zq1zket63h26xjmr1j"}},80303:e=>{e.exports={container:"PSPDFKit-8cswfxve74abt7a5ua2r512q67",empty:"PSPDFKit-7ukwuhzxh3rd8yp7euuxw4jn9b",annotationCounter:"PSPDFKit-4qgb7hxxn2r4g3fdet5bn1pzv8",pageNumber:"PSPDFKit-7pcrw4sjytqdrvwzpes48axkkj",annotations:"PSPDFKit-4uh3zdrahzskzstfsa5v48m76w",icon:"PSPDFKit-65qjuaube253zzcqdz1q4ku4y9",layout:"PSPDFKit-6dxjd7dzqt7trrg39dqjupckv3",layoutNavigationDisabled:"PSPDFKit-6ek4wb89x2x5x1vhr1s1xdux9n",layoutContent:"PSPDFKit-7uyteqpmrzbvazvysj6dcy32h8",footer:"PSPDFKit-5c6ug4g42fqed2454e7qctd4sn",delete:"PSPDFKit-3jftjfjas9mc5fnfn3nvfw9rbs",lock:"PSPDFKit-52gz8466br5ea9fb7c841e2syj",flagsContainer:"PSPDFKit-8wr83uqbdd33rfwu128mj5gnh2",flagWrapper:"PSPDFKit-8d9gtv8zjahaxqn3hdsa2t7tea",label:"PSPDFKit-6qg835argr8knewku8zy5hfyqv"}},36401:e=>{e.exports={root:"PSPDFKit-3g5zqud1wjmcd71kwst6gjbcds",main:"PSPDFKit-6qc6bjvev7sffhewvpkas9njsf",mainContent:"PSPDFKit-2f9xn5bkkrt3h6fsmstdexegkk",mainContentResizing:"PSPDFKit-61bk1385h5ss7vmr9n4d26y7wj",viewportContent:"PSPDFKit-ejvfc31fwjv43pf6dxbymn8xw",overscrollDisabled:"PSPDFKit-gec7bey8wdz7abca1kbpqjncb"}},42952:e=>{e.exports={container:"PSPDFKit-3794mza67b1yg72kafrt5hb5ne",wrapper:"PSPDFKit-82vfq7tmnvc7msfc9e69vvteqg",fullWidth:"PSPDFKit-74mdazdfzvch29s6gw4fvdanw9",layoutSmallWidth:"PSPDFKit-3fv5zkg97n3mu687rszsbq2vap",layoutWidth:"PSPDFKit-6n1ufy9m7k6kddjekzx8ra9equ",loading:"PSPDFKit-8ar7rzebgg8hmscpa7e7zunr9c",heading:"PSPDFKit-425nu4nkcgh6mxxdgbc94tfnnh",pageNumber:"PSPDFKit-7q4jhntpw5ww3s7967h4fxawb9",nameEllipsis:"PSPDFKit-25cnnvzt1zat453758mcudxsca",buttonContainer:"PSPDFKit-39x22bdb75a1huszgc6wehk4n2",name:"PSPDFKit-8qwj35jvzfa59ztz98a439e6uy",layout:"PSPDFKit-8xc3qwhsubkavwu93mg3mhacd1",selected:"PSPDFKit-3xvextg3pac89n7ybnha6syffx",edit:"PSPDFKit-2msvy6g19deemzxgx9xvgw7c57",editVisible:"PSPDFKit-3gpkhfqvs5pqtr4r9ry6e3jwjq",editor:"PSPDFKit-5j54uxjtt11g68z45aykeapv6x",editorControls:"PSPDFKit-5zwbu9g714rrbrfqc66ep7t3cs",editorEditButtons:"PSPDFKit-2b313c5ajnt3v97v7xqyj8k9ag",bookmarkDeleteButton:"PSPDFKit-426mdzb7nn1fr9xdajcg4c1cqv",bookmarkSaveCancelButtonsContainer:"PSPDFKit-2bfgwcaxtth9w1jg88tzb46hy7"}},61470:e=>{e.exports={loader:"PSPDFKit-7386u3hksvwqrk1txdsf6yjwh7"}},6969:e=>{e.exports={root:"PSPDFKit-rmf34nztrfgm2bcf7ccec8zhz",header:"PSPDFKit-3xkskd39bk5c2rsxpw7jwbmnn6",textarea:"PSPDFKit-8m2ghddxnzm27ad3jnnphw522j"}},93621:e=>{e.exports={root:"PSPDFKit-59dey26v49qmxgx7zfh1ehxqag",message:"PSPDFKit-4dct27k6q3q9d4c4atrzr75u79",icon:"PSPDFKit-6pphz7vq2cfumupsmn27tmjjzb"}},94358:e=>{e.exports={container:"PSPDFKit-5wp751jqbxpbbwkus9rbbddxgu",empty:"PSPDFKit-38m3bpj83kumpugydqecgvfb87",content:"PSPDFKit-6thyvskwj8bhtjt43bjv7r2tv3",controlContainer:"PSPDFKit-2wc1eg8pv5bz8rp1599q8cfpf",controlContainerNavigationDisabled:"PSPDFKit-8q6pak6zvt1x45sh6b8f91pb5g",controlContainerNoIcon:"PSPDFKit-8ea69n5pavewcwdnwuxcsvwz4",control:"PSPDFKit-83geqxjybeyf3vmtnwsfwrkpk1",icon:"PSPDFKit-8hs25mq46u5e54udrwp52hzqxc",iconExpanded:"PSPDFKit-6dv6mkjhdzxrbje2fu49pke6cy"}},93628:e=>{e.exports={root:"PSPDFKit-61pwj551swb751vsvtncfs97hr",hiddenMenu:"PSPDFKit-3txgs1brv6djswfx9c7deps2u2",hiddenMenuEdge:"PSPDFKit-8f8f78v7f3wp5n55qwjfz6qd98",item:"PSPDFKit-33kurg23vuastg415g558n9d74",selectBox:"PSPDFKit-4dvm3x8wyss7tgunnpgjqt7f8r",dropdownIcon:"PSPDFKit-2npkau1bttsh6zan1r4gdrzpzd",disabled:"PSPDFKit-2dk2qm9asz7my783w1r6n44gcq",isSelected:"PSPDFKit-5nr9hus8pqrwezzkgpd829srq5",isOpen:"PSPDFKit-5qky4ks8vy64a1wucbs25k86sv",measurementDropdownText:"PSPDFKit-7e9vp9ptc17dn5jtjsppjv8j8d"}},50653:e=>{e.exports={root:"PSPDFKit-5y28nfkmugyqqwevkxsjrpvq3c",box:"PSPDFKit-3gr2ksq6zccy3zdrbnfy8nh55j",error:"PSPDFKit-6eb3kcqgd5y9q8r7d8xtqz4649",errorMessage:"PSPDFKit-scv92vgvrnxnyc284zcn6hjk3",icon:"PSPDFKit-4wf98g1ha47f4tw6p5xpr51nn7"}},21824:e=>{e.exports={root:"PSPDFKit-6wak7k5y4nxmyh4g8xnd4zxf8d"}},6006:e=>{e.exports={row:"PSPDFKit-69gywaa9k96ge1hvked74ez5n1",column:"PSPDFKit-83vux4k1ev4t7s9g2qxwew634a",columnPreview:"PSPDFKit-42kn3f7jwfc8upuf4bdwgdyxcg",moveCursor:"PSPDFKit-7x2bqjhgdt551w3v3y37gv3yub",moveCursorDisabled:"PSPDFKit-78m832wbg6e9vmp1jz7knc9yk2",moveCursorPreview:"PSPDFKit-6bd8y61brzkav8gpvce127azsv",moveCursorPreviewEnd:"PSPDFKit-7b8eq949hpzkc8q3qh9tv8nxbp",thumbnail:"PSPDFKit-8vr6stqqbzz9z9n2w721sczcmz",thumbnailClickDisabled:"PSPDFKit-213q4dhe5s5dzr5zeyuf11xun6",thumbnailSelected:"PSPDFKit-4vvz95aegtycng8362mk8x2u2f",thumbnailBeingDragged:"PSPDFKit-7w3scq2qsd5h5g3fxuj2wccn4t",label:"PSPDFKit-2y5u2mcg8a7zhnfwfbbcfhnxcx",labelSelected:"PSPDFKit-3q3ydy7h9pcgtbpzqngpf8cet1","engine-blink":"PSPDFKit-38dx8eye5za2p9zfprek3a6fmu"}},921:e=>{e.exports={layer:"PSPDFKit-2z5hjphww7fvh1z69wxptsw1b9",cursorPointer:"PSPDFKit-3hfxfy9zqj8jprbtu9vf3epp17",cursorText:"PSPDFKit-3p9u592y96exhe2r2ntk5vbyxu"}},41067:e=>{e.exports={imageAnnotation:"PSPDFKit-5jn8feeuubm369vnx3evcba1rp",stampAnnotation:"PSPDFKit-5b8wstcs14vckqa7tw77vr685r","imageAnnotation-error":"PSPDFKit-6anvx47kar5w253fz6rqg9hxcr","imageAnnotation-loading":"PSPDFKit-rfgw2ucjvptvmzh7zu271n4x2",wrapper:"PSPDFKit-4jv7s61cvh1pcgqnvbxqubx8xv",errorIcon:"PSPDFKit-3z5svj219typgks4atm97b4y6h",notContainedImg:"PSPDFKit-7kevtqukx2j121vwemdz3hztp6",containedImg:"PSPDFKit-56vfsb9q6rq86j9dwdwt9edsp5",wideImg:"PSPDFKit-7yuetahtedwdfmawkggfhnmc8",highImg:"PSPDFKit-4bu7pjnhzjnq6m5wh7z589mw3t",placeHolder:"PSPDFKit-4dw6z4dcs45pn73rp3uakt52q2"}},90523:e=>{e.exports={layer:"PSPDFKit-26jegsvp6ufypbu8pxdv7fr1zz",deadCenter:"PSPDFKit-2wjxpeaermrgg7maxgnqmz9nc3",selectable:"PSPDFKit-3g43gj4at3dwbty7y7kctavd8b",withLayers:"PSPDFKit-85dfpszurcp74kqrua8y455s3x"}},71945:e=>{e.exports={loader:"PSPDFKit-xe2ftya3wdjvwwhx6d5stmz59",loaderDot:"PSPDFKit-6wzqbae66q9h6nya7ye8mvy8kt",loaderShown:"PSPDFKit-64xwysuhvuuphryhjd9kj5nvy3",loading:"PSPDFKit-3u75qfne74tt2wqf8tq6zfy48n"}},51869:e=>{e.exports={canvas:"PSPDFKit-3tr6q51qastpckz1pg3zrtz3rw",svg:"PSPDFKit-2t63tjx7ps8wa34htwyhg1avhr",rect:"PSPDFKit-zxyvguvek2ym1z7dekdnq5v1z",rectStrokeBetween:"PSPDFKit-brx4byv7qnas5ky1tfgt6ba6x"}},5912:e=>{e.exports={layer:"PSPDFKit-4vgck46zhyuscqkznsp8pabh68",isPanning:"PSPDFKit-4cbfb2m7vt4aq7g21z3gxtzzde"}},58005:e=>{e.exports={root:"PSPDFKit-6m9gupd1vyy1fr4bpfheg6wwdk",progress:"PSPDFKit-8nwc6qm7s426c5g16sqaykh38n",progressBar:"PSPDFKit-3mu82vxhmw13y36qrsu6ya81cc",progressText:"PSPDFKit-489xz3n1mhssjcqb9fqcbey276"}},76134:e=>{e.exports={root:"PSPDFKit-5w2de1uyy445puycu46qkgmvar",message:"PSPDFKit-6w84556468p7ssdr8cqmyn8mjr",icon:"PSPDFKit-75vqhz2zk4qrae8pgcsegd1jf9"}},93242:e=>{e.exports={root:"PSPDFKit-6mny4jk3t426w24d83deht33rn"}},32360:e=>{e.exports={selectionRect:"PSPDFKit-41x845wgwdrzef1yhewvdke7jq",isDragging:"PSPDFKit-4xr8ttj6ez7ht327cw29e7egf4",draggingRect:"PSPDFKit-3zx2hhrb4ywt7dnp33xe4gkwb3",resizeAnchor:"PSPDFKit-dhbnhykfyudwqtjr6bkvb411g",rotateAnchor:"PSPDFKit-m9u6yjwr7kv5hrxj2edskfkgq",nwseCursor:"PSPDFKit-39325679hnnu7x4wvxu6tbzens",neswCursor:"PSPDFKit-4d596dtje8pvaa57j35a6jumtj",ewCursor:"PSPDFKit-24ebukh9y4t3vv23sz65xrazp3",nsCursor:"PSPDFKit-3vgs6mrf1dabs2kb4pj7s49g45",rotationLine:"PSPDFKit-h4n5vrr4a9j6mcbt75ygqk7hf",svg:"PSPDFKit-8edbp12fj3btvvzys6786f1fgj",rotationHandleSvg:"PSPDFKit-cb345hgmyvpuvgnewsbd7dmq6"}},70742:e=>{e.exports={root:"PSPDFKit-7dzbfgjr5hhbb3rc1z1j74nw53",signatureInfoContainer:"PSPDFKit-67qcupwvpz7h59x97s5hu3w8y9",signatureValidationStatusIconContainer:"PSPDFKit-5hnd1py888z6q6dqpr2kp2cq2e",signatureValidationStatusIcon:"PSPDFKit-6ee193drjzesd61tu19hcvekb6",signatureValidationCloseButton:"PSPDFKit-67meud5692v5j5a61jw2681xzk",signatureValidationCloseIcon:"PSPDFKit-6u1j5sk8ayvj3gvkxqkswrcet2","status-valid":"PSPDFKit-44csr6tj4teuj9fhfz8ee71tfx","status-valid-icon":"PSPDFKit-2e9udw15t4gp8scnfddhxz9hsd","status-warning":"PSPDFKit-4ppb4buhu7rwnjufcn6ajpkskn","status-warning-icon":"PSPDFKit-86f3yc46j85tr3gsnftm482dk","status-error":"PSPDFKit-2c4pxuv49a7x173nj5nzfauxbt","status-error-icon":"PSPDFKit-8zs1teqnye2ksnaxmemgknn6pv"}},46983:e=>{e.exports={root:"PSPDFKit-6rzkyc987bqyetscyfvr4nf3f2",stickToBottom:"PSPDFKit-2fwepfwm4jpbvv9evy3bh2cmsu"}},11521:e=>{e.exports={slideDownEnter:"PSPDFKit-7q656qfg6merpmvr8kzt9szzpm",slideDownEnterActive:"PSPDFKit-2uctbmt9nj99yrpxdk24951hsm",slideDownExit:"PSPDFKit-5v5jfhfemf1mxc5ret8j9wh9sh",slideDownExitActive:"PSPDFKit-3a46uu7aytzncpnz4ppsu1ucnd",slideUpEnter:"PSPDFKit-7yg9b82v4xahqj93wys6tpbu1f",slideUpEnterActive:"PSPDFKit-44rpp3fvbs9mj6uu6g6my1392",slideUpExit:"PSPDFKit-4pjqt364whvu7b81yv22fwa1ve",slideUpExitActive:"PSPDFKit-4sea6h8efz1kfffbq87vcmq3qu",moveDownSignatureBarEnter:"PSPDFKit-6hdgn11y1ecgvxga69t6p78b9a",moveDownSignatureBarEnterActive:"PSPDFKit-2b6tmwyq1x3rcswb7k71f8vurh",moveDownSignatureBarExit:"PSPDFKit-7hwkgbqv2uvce8qyhqnq7n9vdp",moveDownSignatureBarExitActive:"PSPDFKit-4b3k2aksgt8h7qfz8vz5nbnvfz",moveUpSignatureBarEnter:"PSPDFKit-6rtd66rsbcpdy21mbkethcajk1",moveUpSignatureBarEnterActive:"PSPDFKit-6jy41y1rpnd5deemk7hqpbq4m1",moveUpSignatureBarExit:"PSPDFKit-21nc3yzh856bkm3mw7smrrzb5w",moveUpSignatureBarExitActive:"PSPDFKit-4zmvpm3c2adfnu8qnuw79cjh3s",fadeEnter:"PSPDFKit-79rm2zddjaxgzdkx4w8mqnqa8c",fadeEnterActive:"PSPDFKit-7trwsc5j1bg69wa1vf9qt5e2ve",fadeExit:"PSPDFKit-8t2qrt9phw91wb7a8wwmgdce7p",fadeExitActive:"PSPDFKit-7e9n9mfhw378wrt55c2j4gpdxm",scaleInEnter:"PSPDFKit-67d6x1qnthds5d58mamrx9qpu3",scaleInEnterTop:"PSPDFKit-3dfszxf6jpx5tm2y1gn1ehxgtw",scaleInEnterBottom:"PSPDFKit-8kb8kruw3xcx17v1486van1ttq",scaleInEnterActive:"PSPDFKit-3c4mxzjgy4m6n8r275v2uyp4we",scaleInExit:"PSPDFKit-3uce8apgqwt65tqd63cq5zuvpm",scaleInExitTop:"PSPDFKit-3hsvwu5hjq1a44vcrtkv5fhpnr",scaleInExitBottom:"PSPDFKit-5r2r1t3f6q5zqjq84zbr69ejuk",scaleInExitActive:"PSPDFKit-35xj9c4azp7m511gxuzzvr1k5d",scaleInExitActiveTop:"PSPDFKit-t8mvndx8cr8ydw9bm2vyh2wgw",scaleInExitActiveBottom:"PSPDFKit-378kvahbp4zr42u1gb4cqyxsad"}},94287:e=>{e.exports={container:"PSPDFKit-5b8n6ax7uyfq7q2zt9n9en17ab",wrapper:"PSPDFKit-2jffvae4wwchr5476dpvz5z5ch",header:"PSPDFKit-2ehyk369yxm1zk369m6mttkt22",hideButton:"PSPDFKit-7agv7htc7d2j2xf6ugmwrw1ppu",hint:"PSPDFKit-6qzybrgcrc8sfgmwkc749exk9n",icon:"PSPDFKit-32x2pcstxyeubux789j773s9rc"}},73396:e=>{e.exports={root:"PSPDFKit-8jp8nm1hj7szh4vv5aurdvd5j9"}},92606:e=>{e.exports={placeholder:"PSPDFKit-611629rcz14kzt4fxq9cun8r55",stampAnnotation:"PSPDFKit-291h7cpg24qsc3uyjkzbr88w1y",widgetAnnotation:"PSPDFKit-3k8pvf98ypg7cfxdw2h4s9hks8",error:"PSPDFKit-6kn9fwrhmcn5ws8thfmrbawkps",loading:"PSPDFKit-4668kvbgmy9yr757xzersy788h",wrapper:"PSPDFKit-3gs4z9rtc1a83dstvmn7mamwfd",errorIcon:"PSPDFKit-4vsf7ppa6vgpu72s69w4p6cheb",APStreamParent:"PSPDFKit-6gjytkd24fh19g96hp4rxaukmu"}},57497:e=>{e.exports={annotation:"PSPDFKit-6nx1rtuadk913zxen95pax5hz5",icon:"PSPDFKit-8qpben4cgdt355xztxuqcrcxvg",iconActive:"PSPDFKit-5ty8mmke3as9vprwxv67knqxcc",noteIndicator:"PSPDFKit-4cgbq7rdg2pm33fadjsppnpuux",noteIndicatorActive:"PSPDFKit-2aywxsct3x3wxc4d46re3nssxu"}},29544:e=>{e.exports={btn:"PSPDFKit-7ynwexufv1hs2a9qe2gqaegb69",btnFormDesigner:"PSPDFKit-4cfxcba5wt87u69f2dw7v6xter"}},69554:e=>{e.exports={checkradio:"PSPDFKit-24sm6mv9bd2n715byv1c75x3p1",input:"PSPDFKit-8zz118e9x2cbq64jj7xe4juhtg",checked:"PSPDFKit-5d2c15vj7t3amwwn2yqea1bcas",inputRadio:"PSPDFKit-yun3fvwa7cmcs36wxdpy8barj",check:"PSPDFKit-5kxx5vfzwztr2mwa4mzj18jqrq"}},80599:e=>{e.exports={layer:"PSPDFKit-5pebxrpmqgkrf7vcxe4371geyh",comboBox:"PSPDFKit-7fyvzesvuhuugesmttmj91m4nm",expanded:"PSPDFKit-2a2g4zggqmewex1vm5v4zpgb56",comboBoxTop:"PSPDFKit-6s31a1f931synspdjrnvzxnfgc",valueBtn:"PSPDFKit-4bd1e6vbjnuczspgvgas5tb4us",arrowBtn:"PSPDFKit-3hahgu1xkd2v4363x5d3e6rryn",menu:"PSPDFKit-3vaw2awbbx1p5zjtdh9v5dhtts",comboBoxInput:"PSPDFKit-89gzhtz3mw6xunsgtyr2eum9s6",comboBoxList:"PSPDFKit-88t5fcsjadwffxkef3gfkzaksk",comboBoxListItem:"PSPDFKit-844vbxfxwv5rq9arab8e8gd5de",comboBoxListItemSelected:"PSPDFKit-rrhtfqn9ehag1af8v4xkdd8au",comboBoxListItemActive:"PSPDFKit-49532ws826dtcr1m8n5e4dcjzu",empty:"PSPDFKit-57p3ubjwqmm7d4cs2pftzys4tx"}},14437:e=>{e.exports={annotation:"PSPDFKit-6mcjw1j7tzm5hepajxw83pzakp",icon:"PSPDFKit-5cbbkpsrtp7h1aheyyz5jh553f",iconActive:"PSPDFKit-gfh2n7ye6agxztvft95yj26j6"}},2019:e=>{e.exports={layer:"PSPDFKit-334y8gbu8r2jjjn87nzvuevc59"}},70994:e=>{e.exports={canvas:"PSPDFKit-3w2n2qdrr23cmdk4q8whx3tsxf",container:"PSPDFKit-2gh7qt7mp38bkn5x9qf3y99zu3",path:"PSPDFKit-39tt5mrp55ku7xxg9u7mh41a33",selectable:"PSPDFKit-6wrq4aekz4kq4fgt2pvnb9w6a3",rect:"PSPDFKit-57qn9qb3ug1rpk9v33hd5cxd1d",svg:"PSPDFKit-5q9h4djx3kcxba1qj815pdz3fs",cursorNotAllowed:"PSPDFKit-252bad36x484xaffc25n3h9thg"}},17090:e=>{e.exports={layer:"PSPDFKit-3ncb69xb2ve1sqjjdtyc6cd8g4",annotationRect:"PSPDFKit-5mur5qgg6vwc2wpggzustr83j9"}},82654:e=>{e.exports={listBoxRotated:"PSPDFKit-4epuuwuap9pk3ntjcv5zf9djsb",listBox:"PSPDFKit-7xq92qy48k696v9kfs77d7f216"}},72032:e=>{e.exports={layer:"PSPDFKit-2wu94uj3duvdnqa6qcf42ezs6d",annotation:"PSPDFKit-54pg5n9qt6pj2u219my1yv9v14",wrapper:"PSPDFKit-4ywhmukc4gwqac7ntzy2uz9x6h",content:"PSPDFKit-8tznpz6dg1zmer4mxt1kj4d367",fullScreen:"PSPDFKit-77mpcyuxmy88vcuvt1qbfqn1bg",button:"PSPDFKit-4sup5zkzxcndck1xbaquyw5tat",hidden:"PSPDFKit-3zbd56btxsp72du8mq44gc68pf",header:"PSPDFKit-7t4t5t39c8gj689nypcn8sy1n4",title:"PSPDFKit-8jdq4qfwqhh5yzunhf1nvu3sxs",tools:"PSPDFKit-5ns5z6cwaq7uvb37ejfqcck6cj",tool:"PSPDFKit-28m2z472nqzne4jhz5hvqkzp78",footer:"PSPDFKit-53wjfdyupu3zpctpt74eumsq2b",label:"PSPDFKit-39sru8fstgk9ukw59vdxw6fxkm",icon:"PSPDFKit-2rbb4rpjnbmgu1bj6enchp1549"}},92135:e=>{e.exports={container:"PSPDFKit-87g1wera6smataxregkeucdz7u",wrapper:"PSPDFKit-7nzf5ygyxf3ft1vwqded1vys1c",canvas:"PSPDFKit-7ckwm8p8x63jumkemns7vefj6u",rectContainer:"PSPDFKit-8629afaazd1efzub8c3z1qfnae",active:"PSPDFKit-4vzt6kbkqqcu93437rphdgn7xj",selectable:"PSPDFKit-8qst6ht79xb7qug95szm7j35vv",textContainer:"PSPDFKit-86f9zgw71s8n95n7rxd3uqn3c",textSpan:"PSPDFKit-82f4yxbm2u7ssyqxr8sztm7qzb",svg:"PSPDFKit-7vkn9dyk6rhen2hjabdgskypgp"}},29978:e=>{e.exports={canvas:"PSPDFKit-86u6qqcu5qd2p78j3sasqcq3r4",container:"PSPDFKit-6euxnwumsrs547zhsd467cw4p9",visible:"PSPDFKit-2gqt93vqwz7akw64wyn6tk2eqn",cloudy:"PSPDFKit-67t1bptsfdkkkbpn6jgsm9ktd9",selectable:"PSPDFKit-xydzth3k7ns3nahap4gpxayej",strokeDashArray:"PSPDFKit-3zmy52u71trzxmdvbycck28tg7",svg:"PSPDFKit-68femat6jd47qrav117uen51r",cursorNotAllowed:"PSPDFKit-btun3r6cqwxytpv1u8kdyngqc"}},43578:e=>{e.exports={sign:"PSPDFKit-6b7je6w7pq8q3htgsu22kkv6jy",signReadOnly:"PSPDFKit-7181s3qkmmn7fdexydqff3quq3",modal:"PSPDFKit-4kv9rhr6nzpkdjsr5xsjyfaqju",editorCanvasContainer:"PSPDFKit-3nvj481sp2nd9z1gjhvh4xnak2",signaturePickerContainer:"PSPDFKit-3v4b4f9nkt7wjjd26afq8763k5",viewRoot:"PSPDFKit-2g5n99kjfbnxh1che778jg7tjb",viewSignaturePicker:"PSPDFKit-6qtbckagb6bfbdepc3443v6ywj",header:"PSPDFKit-4su78ec7s1c5mkz65pjuq22xsv",footer:"PSPDFKit-5ru14aj6muejw948tvdz1gb3ks",colorPicker:"PSPDFKit-3bexu72w84xp6s2e361sj7711b",title:"PSPDFKit-5r5vdeqd1th8znbb9ygk279qt7",button:"PSPDFKit-8c4vuvw13bebs9s1s79remb5de",group:"PSPDFKit-4kzbv64jk7wgnrp27w38k26bj3",editorCanvas:"PSPDFKit-5ngq82qgx5cxz4uz5mzjkchjr4",signHere:"PSPDFKit-2ju133936zwp42hg96a2f41uec",signHereHidden:"PSPDFKit-2ttca3yjnqndu3nqu48x21jqwz",checkbox:"PSPDFKit-6uvk92p73etnn6mk5qcbqwj9yx",checkboxLabel:"PSPDFKit-642395esq5512gt252k1kx6gg2",signaturePickerList:"PSPDFKit-6p71pj5wv5hqqjxncy9s2zhp6z",signaturePickerListItem:"PSPDFKit-4yhszj3k6pkfr9qjx6zw41fd3g",selectSignatureButton:"PSPDFKit-4nbyd35stvtu3bz3kk4yr18ed3",imageAnnotation:"PSPDFKit-353zxjn4cwq7f5trcamndrkw3j",deleteSignatureButton:"PSPDFKit-7urkar9j36rp4ztzeaqz3jjm6x"}},24011:e=>{e.exports={readOnlyOutline:"PSPDFKit-4rfp7ee9191kd8ynnn3bq8u33p"}},3119:e=>{e.exports={layer:"PSPDFKit-4dwy35ce5zzs8fcuzm4z5qyj9j",annotation:"PSPDFKit-4rhmvvkqbbeztw9z4seq55hdh4",editorWrapper:"PSPDFKit-5sgjnpxkms74d5uhcrs1xnpjkh",editor:"PSPDFKit-c8up8r9n155axqjtb8dat8e5t",richEditor:"PSPDFKit-3g965ce6b38z92kn57ymc33d93",readOnlyOutline:"PSPDFKit-4f28b7qs5h6nk9v4ngh8xr9zsb"}},65642:e=>{e.exports={annotationRect:"PSPDFKit-8py43zrk8tdwczbp1rgu5zkpcc",activeTextMarkup:"PSPDFKit-4111jnwhknt7c61pjq82hshdjm",highlight:"PSPDFKit-68rke3v2mwfersk9s87pby4xqz",active:"PSPDFKit-2wyzkwftushgxqvheqv9gc1qz7",markup:"PSPDFKit-6jx1pd841ynqrzk4be2rtgtwnc",strikeout:"PSPDFKit-4hm8gjadpcvqnu18qte7mqnfey",underline:"PSPDFKit-8hws43jkrgjxj8tajvc3qfhyfr",squiggle:"PSPDFKit-78vd6wa19gxf1ecyped1w9etsw"}},68108:e=>{e.exports={layer:"PSPDFKit-73459dse4nv5d9mqecpwp57s3d",annotation:"PSPDFKit-8wsgnacdwb75d488xzar24jqkq"}},23661:e=>{e.exports={widget:"PSPDFKit-7fx816mm5dnp6e45vtkbeu7u6h",readOnly:"PSPDFKit-53uhn3hvzxffzgk8gjs3fbkn19",focusedWidget:"PSPDFKit-2j44z8y92gejua2pwvgm8sjhm4",onFocus:"PSPDFKit-2kwn8pyc4wfu8r2pfah6fq7qfx",combNoPaddingLeftOnFocus:"PSPDFKit-x9z86ubc4peun53ye7m7udhyp",flexText:"PSPDFKit-cr6q4n8xfg6vtzd5q658psukz"}},79973:e=>{e.exports={docComparison:"PSPDFKit-6xbbtf8p2qcsg9fyy1cuyj7gw5",source:"PSPDFKit-5vy62kz7ms89nk2k2k3swztwdt",sourceTouch:"PSPDFKit-2bqfqmutsr41ycmfq7rs53uqxa",referencePoint:"PSPDFKit-3r5sb26jgasuxhwabq3dunx45u",crosshair:"PSPDFKit-83td1duhyv22mhv3yff4qtza4s",selectPoint:"PSPDFKit-4fgfk59wcke21gwwxhuq8mm7n7",hidden:"PSPDFKit-3dkk2vqpcthpdtrchghtj4ssn4",comparisonPin:"PSPDFKit-7kr3xjykvj7fr643ccby96g62n",page:"PSPDFKit-76gy17tgphy3rkqc839s5j1pzc","deg-0":"PSPDFKit-5pzb826nhfhqp1g5p1ks17fq77","deg-90":"PSPDFKit-427zszzm3g9rt685w6err79657","deg-180":"PSPDFKit-2ymsd6xds9g7m3tn384wexbs7d","deg-270":"PSPDFKit-36rheuktx5sb8ecxck9vutfh9y",magnifierContainer:"PSPDFKit-4y67gffktarr3dzsdm3be4tkxg",magnifier:"PSPDFKit-5dnneume1xfsb52nce5gmkwws3",magnifierGridContainer:"PSPDFKit-5vm17u78a9y73z4fns92w8pcmh",magnifierGridStroke:"PSPDFKit-5r343876m2a2k85cus2jjxh8fw",magnifierCenterOutlineStroke:"PSPDFKit-54zz8rzg9jq31dvzq91d2qkgg5",magnifierCenterStroke:"PSPDFKit-5ct94rndvza9jt8fdk5kj434wf",magnifierZoomValueBackground:"PSPDFKit-jyeb8qr8rp75utm5jpsrrw1xb",magnifierZoomValueText:"PSPDFKit-41ur68urabv2z38jg19c3pcx39",documentComparisonPageLoading:"PSPDFKit-4kmrm9dhgkuczunfzmxs26b83p",pointerLayer:"PSPDFKit-4t23dm96wzfwsfr5116ky9f96y"}},72952:e=>{e.exports={docEditor:"PSPDFKit-5jknctefe1bdrcw8ckp4c84xxz",moveButtonContainer:"PSPDFKit-4pkhpangb13n8mmvw8ukdfhw4n",moveDialog:"PSPDFKit-8am6zresjtqzubaax3ncbdkk65",moveToolbarButton:"PSPDFKit-4m35g8jgpcwck6gzgr9fx9sj37",moveDialogDetached:"PSPDFKit-7wm68x153yxrzfku2ccv6bng6w",moveDialogShown:"PSPDFKit-78jn9e1vjnny6e5w7kbswqahdm",moveDialogForm:"PSPDFKit-8h6fy8n1ae1b2jzvx2bx945q5p",moveDialogFormLabel:"PSPDFKit-2q7tsdrjbypfd7mwu6hbfdnmqn",moveDialogFormInput:"PSPDFKit-7ja4pzq1aasqwczs6cw41n68nw",moveDialogMoveButton:"PSPDFKit-86an2z1e8c3rstpug6xhqbrz92",moveDialogHint:"PSPDFKit-7nbf67rhjsg7k4gsdmg33muhjb",moveDialogHintText:"PSPDFKit-2mh89kckyg3qpesbhuwrcrw9rd",pagesView:"PSPDFKit-4qc12j3k5rawv8wqf56u3q8k4b",pagesTitle:"PSPDFKit-87xjjuqyeg5kxzvrh4nak5jkrs",tileContainer:"PSPDFKit-832dwy6tmpr3u59345n392d5kp",newPage:"PSPDFKit-ufnr5vdahbxdpe2583xyak7wk",importedDocument:"PSPDFKit-36mc2jhmhw8s6j455stsmh6k7t",importedDocumentIconCircle:"PSPDFKit-7mtmexx6nf2jzpxs9vv5ukyjhk",importedDocumentMovePreview:"PSPDFKit-bx6vky4fzf7e375qv4fgmyffe",importedDocumentInfo:"PSPDFKit-3hs8zjffpgsz41nr4dp7ybdkt5",pagesGridLargeThumbnails:"PSPDFKit-5yvxb7rnpjz9pacz8czkc32f8y",pagesGridLargeThumbnailsIconCircle:"PSPDFKit-491vbmcbxhae4fwryx7hsht2wh",pagesGridLargeThumbnailsInfo:"PSPDFKit-2q199y39wutn5mwnfxjd4juxqq",pageEntrySelected:"PSPDFKit-8cajckh5v3zfxfj9hpdytffrv9",page:"PSPDFKit-5nnn6safhgnqp45k1gnacbs5b9",pageLabel:"PSPDFKit-7hskkg7c42g4u1gxydpvnhrare",pagesSelectedIndicator:"PSPDFKit-267ekkrqhchqasjegw4gdy4gr3",pagesSelectedIndicatorShown:"PSPDFKit-7dep96m3dt6f6m6ggtsdvejn1b",pagesSelectedIcon:"PSPDFKit-czbss4f5tejzb3s7rydnxdc6g",bottomBar:"PSPDFKit-8rq6e51mxrxdrszuexbb2cnxhy",spacer:"PSPDFKit-397h62jvayz1wt2xp2cz2ekmmw",toolbarRoot:"PSPDFKit-7egcdrn8t9zxr4h4f3tqd6a6q9",toolbarContainer:"PSPDFKit-5mgaebuj6tj1kbvvkf42rphvab",movePreview:"PSPDFKit-7mbngz46jn2pabmnth6t7hsds1",movePreviewPages:"PSPDFKit-7bbxybqv7gn2ruj7drnnj7fqgj",movePreviewCount:"PSPDFKit-339r3xtmjz8gs5vpsy5ncb75nb"}},6733:e=>{e.exports={modal:"PSPDFKit-3jpjxq56vk2un8ub8pje71u85a",fallback:"PSPDFKit-68rzfs8a4kxm2sv4wxbhvjjsk4",fallbackPagesView:"PSPDFKit-8a6esc3kchamvphrc23c4bjcxn"}},45719:e=>{e.exports={root:"PSPDFKit-er87znp11z8wa56gmt1nr1adc"}},927:e=>{e.exports={root:"PSPDFKit-8ytejk69dm72arac6kecrv7jgs",input:"PSPDFKit-4mck9x4g933qtvsqa6g63nq21j",focusRing:"PSPDFKit-5z85yf9u7uzqx732cjqehyhd3s",swatch:"PSPDFKit-7899cbm2djcuh9uzvh8y9mhq12",inputIsActive:"PSPDFKit-7m6c5mvk9zc3ccp4w9ckt76p5q",swatchIsTransparent:"PSPDFKit-6ge99vaebv8tjqjjwz2pg1qzd6",swatchIsWhite:"PSPDFKit-3eaf5m5zxe8hsj1wptbbs2ru3r"}},47650:e=>{e.exports={nativeColorInputWrapper:"PSPDFKit-3rtr4tx6y919hj63k8j6veyfvu",nativeColorInput:"PSPDFKit-2f2ahvz6xw42cz6ppqg7qrnv5w"}},23215:e=>{e.exports={root:"PSPDFKit-4knn6qcs6mfzubc11j3jn3kdh9",label:"PSPDFKit-5sa85wwcx2g58bvnwu3e9vxux8",input:"PSPDFKit-27139754tezpaj4xtjvqyqphqa",value:"PSPDFKit-6b7xgm3nqzh79vcp4knygzskc2"}},19770:e=>{e.exports={root:"PSPDFKit-877ty5wd8zf2uk8mwxy3vm7ra1",slider:"PSPDFKit-8mewb5unfae7pfb8a3vhx2pfe4",label:"PSPDFKit-7s1evqenghjbnmpkjx46g7aj7a",value:"PSPDFKit-4tsachwba3d2gug8ut8n2k7kw2",dropdownItems:"PSPDFKit-339qy9bx9b7sqbvd31hpseqnhm",dropDownItemsUp:"PSPDFKit-86g1a3rfhteap5bxhyrt2js27u",button:"PSPDFKit-7dtmrym3urvgecwht2mvnd78yn",toggle:"PSPDFKit-4ukn6hggdcjm9mj167e7f6hqx1",flexContainer:"PSPDFKit-7bepqp75z28r5jat89hqdhcjva",show:"PSPDFKit-9f949cfpq924euep2ae47njjm",dropdownItem:"PSPDFKit-5zut7thxsf86fddq8rgtbtrenu",isFocused:"PSPDFKit-5bqkg9v7er35bgbtaqq2vnq3z8",selected:"PSPDFKit-y9nzknrtb2kq52c2xfb4715p7",disabled:"PSPDFKit-6baefa9vw8uyyrsvfez7h3ewrq",dropdown:"PSPDFKit-4xjmg49gjvk5zp5p42ms81uw4h",srLabel:"PSPDFKit-2cuzr66tz354vn9dgkzb1pwq4b"}},16593:e=>{e.exports={root:"PSPDFKit-6pk75qzdg2ukj6fscjncywz97r",input:"PSPDFKit-5nhvbbak97n275vs6wmzzmeuwc"}},89029:e=>{e.exports={magnifierContainer:"PSPDFKit-5u5zg1p821mpfkbnn2k5uwyj5f",magnifierContainerMobile:"PSPDFKit-8wd7v7mnz2rcxvt87ua26mzc6b",magnifier:"PSPDFKit-5nkfqsjv5yud4v1dqua4t23fay",magnifierGridContainer:"PSPDFKit-4ucp3vtq371cyq6rjfnyr48ke9",magnifierGridStroke:"PSPDFKit-2mrwgj2fjj6868616ds613yrym",magnifierCenterOutlineStroke:"PSPDFKit-7sk5hhk6ycrf96cdxc48xy41us",magnifierCenterStroke:"PSPDFKit-4cc9nv4wau5sr77yxnn4p9c6vn",magnifierLabelBackground:"PSPDFKit-61a71yusrshwesstskqk1ts821",magnifierLabelText:"PSPDFKit-zd3q5csyfkc4sst1n5gwd6ynd"}},73535:e=>{e.exports={confirmGroup:"PSPDFKit-6sv7sqb53n124u6fj1tms89hna",content:"PSPDFKit-654mqarkz9bpasgehzef4652nz",button:"PSPDFKit-3db8msn3nmbe95zjws8yr4m8q6"}},55733:e=>{e.exports={container:"PSPDFKit-87k1yb2m56xugj11pvrn2epwmr",icon:"PSPDFKit-3s4vm3fcksqsg2getabuj9bha4","icon-regular":"PSPDFKit-g3g187c7zezz65j88wexd218w","icon-error":"PSPDFKit-568kqv9a573y6cm3j1y6xs5v62","icon-success":"PSPDFKit-287v657mcme5ewwt57t23w5qyh",iconBox:"PSPDFKit-3m2rqse7rv63dfkwgvcjy19997",alert:"PSPDFKit-3eq8gr4w2wkxz8kcemn3feckgz",dialogButtons:"PSPDFKit-7qjt9yezkrce9kdkn11wwk7ntz",unlockEnter:"PSPDFKit-5r5qzyzhnat22bqdytrnu5ageu",unlockEnterActive:"PSPDFKit-678vkyyxar4zfmqvz19pk1gg7c",unlockExit:"PSPDFKit-g25477hjsg4skgtpfrw93sj7u",unlockExitActive:"PSPDFKit-3vp9fnny3e7hxta8yxd6jaxea4"}},35088:e=>{e.exports={root:"PSPDFKit-5e6tnwkxw9ka415svsdkkptcvx","deg-0":"PSPDFKit-5scxecvmyvz7wahnvpvhqf1u6n","deg-90":"PSPDFKit-4f127napxmw48wj78u1h4t24d5","deg-180":"PSPDFKit-6ncgj8zzkc4v2az5nh5414n95b","deg-270":"PSPDFKit-2a2y9pvb8su899gfj1wsz2ta6n",image:"PSPDFKit-863nmkfmtuh7z8chsq5cfw6y9h",textHighlighterMode:"PSPDFKit-q7ejbjhybhuyqgmj1yb6a4f56",focusPage:"PSPDFKit-8hbgq8hdkhtfm5abztpkrkdp87",hideCursor:"PSPDFKit-87pd6mukheqbugejr1g1n3es7w"}},76413:e=>{e.exports={layer:"PSPDFKit-7v6us4bgaesz3ux74pvm4adq66",overlay:"PSPDFKit-3p1jq2xuq7kt61btvzbmcvfsdg",linePadding:"PSPDFKit-4sqvdfhz56pzjs657n5gmfjv4t",line:"PSPDFKit-8ayy4hjz5h5sb5mqfjxzpc42zw",preventUserSelect:"PSPDFKit-7mqrwx6ruetyxx1crt7g8tj53b",chromeSelectionWorkaround:"PSPDFKit-55tte6u6fczpks4kxqrywvkhcv",lineTextCursor:"PSPDFKit-3npj2ht4kppfp95hepqhfjb49x",vertical:"PSPDFKit-68wd7m2jrz9c462vgy6yvba62f",enableTextSelection:"PSPDFKit-2tg9p1utsyyke5vpebq5gc3413",debug:"PSPDFKit-3a9hp6ezp9vyzwpeksepg43552",selectableText:"PSPDFKit-6fq5ysqkmc2gc1fek9b659qfh8"}},10333:e=>{e.exports={tile:"PSPDFKit-2ef7r6efsekvzma2acw68z2wsd",tileChrome:"PSPDFKit-74yvexyjr8t4ns42jhvu6euzjz",crispTile:"PSPDFKit-8qymj2kknqsa216hrbd9qhuh5b",tileSafari:"PSPDFKit-8yevkzm64ywt19z5trdgvvvu8n",tileFirefox:"PSPDFKit-43q2x5xuukayeyf9pnsf3s8vxv",tilePlaceholder:"PSPDFKit-4uahg5akq9ua7h3n6r45t9pnv1"}},80649:e=>{e.exports={tooltip:"PSPDFKit-818uepd2971vwf3fmcn6tbacgg",arrow:"PSPDFKit-5zd14p1pfpmy1ny1f8skcknw3j"}},22181:e=>{e.exports={popover:"PSPDFKit-538wj3bujswdrqewakmmxa9fyf",popoverHidden:"PSPDFKit-8ahxg2rbtxn2ubnutukzs28dqn",container:"PSPDFKit-4jrgdk842q6nrzgfag4cvz7hsa",innerContainer:"PSPDFKit-7bx43nrztecej9c1j8qw9tshdy",title:"PSPDFKit-7w1dhbtytq2jfdb48gs1ywe8jm",content:"PSPDFKit-7dajp2vmg4zxw9ambet64n9umu",footer:"PSPDFKit-2wtzexryxvzwm2ffu1e1vh391u",footerButton:"PSPDFKit-239sjtxdzvwfjbe3ass6aqfp77",shakeEffect:"PSPDFKit-41mt66hwvjgy4qa89c1mtspd1a",shake:"PSPDFKit-7y3ggnb1s18b42w9z9msgq8hr6",centeredTitle:"PSPDFKit-79jfh5ner7hhtyf4y5s4u8az38"}},32905:e=>{e.exports={root:"PSPDFKit-8djq2v9hms33ptxdax4spyth66",arrow:"PSPDFKit-3msp5htb4zsdjjpxv5m6zezhpm",arrowTop:"PSPDFKit-6b9stttuxax9qewr2yxczpv3yz",arrowBottom:"PSPDFKit-6zjksunaugtab91x5bucrc5pa6",arrowLeft:"PSPDFKit-6bfp163dnjfdkd9f9m84znw1uj",arrowRight:"PSPDFKit-7es6pryn4pwz64rxf4payggfh1"}},51025:e=>{e.exports={root:"PSPDFKit-twmttjfcv6j7rzbc8ybn7jhdf",inner:"PSPDFKit-6stgnz1576bk1x1pc2nvf8mswa",separator:"PSPDFKit-47apua2t9uqk8xayrhg2x6bxwp",button:"PSPDFKit-dcqzrnymm6bk9dm2mrhum7xwe"}},45590:e=>{e.exports={root:"PSPDFKit-m8vcznd3skqsshg6rhqg119mc"}},50397:e=>{e.exports={root:"PSPDFKit-5m6rrz61wj3npfybbf6bf7n132",noToolbar:"PSPDFKit-kygm1cgnwkp9bv59ggpqfyv9j",searchBox:"PSPDFKit-3zeygmv635dt4bunbqaw9pc4vc",input:"PSPDFKit-882tgx1vetesc36x9va6ha65fk",results:"PSPDFKit-8eacsmz4utrfkj8dhzhdh842ct",resultsDisabled:"PSPDFKit-4ysp4ac7wzfr8k1j96hrpb6232",button:"PSPDFKit-3mm3z68vbg9jrrv8ctujsff2j",control:"PSPDFKit-6jsphwggasn3qhq6cpukr87kyp",next:"PSPDFKit-the91ha3x5196stsyerdyzwb2",previous:"PSPDFKit-8sbnka5652yjkubedgurz66zwq",icon:"PSPDFKit-6p53nwyvjc1gsacy8fr4fac4q4",iconLeft:"PSPDFKit-5q7decz5hdban3tfadcauvj14t",iconRight:"PSPDFKit-7uhhgqhkvcnxbwk9kfhjy9v9yt"}},98973:e=>{e.exports={loader:"PSPDFKit-5e2eu5vu2edrbusdw9chj1k5ya",searchPosition:"PSPDFKit-qrb6rv4vd7m34wj2w85zjxjfu"}},99398:e=>{e.exports={layer:"PSPDFKit-4hndx219v53cj6xkbemwdxxfbp",highlight:"PSPDFKit-6q1j1fe91dp7b7uxu21ghbjvam",focused:"PSPDFKit-2m3zj91uw1smew17zjaj1g3xfx"}},60493:e=>{e.exports={sidebar:"PSPDFKit-wqnk7x3sp9sp2zkcvbfawsb6r",sidebarHeader:"PSPDFKit-6zdf5v5224wp5vu92pkacn6sx3",dragger:"PSPDFKit-4bvu69j78qa67c4wqqxaxrqbs5",draggerHandle:"PSPDFKit-6dtj44vm5qz5vw1njqxgaem7na",container:"PSPDFKit-2x4gzue77m9rd4f4ax5y9e5wj1"}},44182:e=>{e.exports={modal:"PSPDFKit-4cerm34vb8pczts7hmcng7djt6",editorModal:"PSPDFKit-5vxa6baehq7axm7hfhdhastujx",previewContainerBlock:"PSPDFKit-2z88h3qxg8pahcdtccg1v16rzw",stampModalSection:"PSPDFKit-37n3gwhc7empyyme4xj5mr6fmd",viewRoot:"PSPDFKit-5d23s5wtcb4xyd2r69ffat43tr",viewStampsPicker:"PSPDFKit-htg8xmsw1medv8z65rsxzra3j",header:"PSPDFKit-83y7r7bjft89d7vj54ak85a64d",footer:"PSPDFKit-4c13ns3r3x61v4zpchdh6wzdc6",colorPicker:"PSPDFKit-8aay2s7evt3up79u41nwecrs5b",button:"PSPDFKit-7e7t5guyqmbj19anjq7fu2apb2",group:"PSPDFKit-nzezcbc9ek89hybgj1pckw2zs",previewContainer:"PSPDFKit-72pcrgpengy3y8cuv97n9jaw3f",customStampPreviewContainer:"PSPDFKit-572d5dceqqhvah17hy2c45a4ej",templateImageContainer:"PSPDFKit-68gt1wmwq59s62gmycmujxmmb4",writeHere:"PSPDFKit-2ntpjcyeqryy3sx2z21svrqz1w",checkbox:"PSPDFKit-66ekjcxsaeqgn89qtwpugg9xvn",dateTimeLabels:"PSPDFKit-6zmyzykxc4t66pwbdd5sen73re",stampPickerContainer:"PSPDFKit-6j7fbdr9rnqrtkj8begfh32k5z",stampPickerList:"PSPDFKit-7nv5w9b4mfxuda9qpmyu4tfmkq",stampPickerListItem:"PSPDFKit-3cppdtq9fhab43g49xz5t5vzy5",selectStampButton:"PSPDFKit-8hmu8h2yx3k1xretx3c2t5e35j",active:"PSPDFKit-6rfyzsd4thzrxy3u2uacc8zvq4",title:"PSPDFKit-8agdbfphrnw37rw3cw5sfvvfjm",modalSubHeader:"PSPDFKit-2dzap69xuhzmtc67qz5wnyya7a",annotationRect:"PSPDFKit-8kvufduapwfav2a4wpe2xsukhy",modalDivider:"PSPDFKit-7s8151tm4sjch2syfq2v6t7wzw",spaceBetween:"PSPDFKit-zdns58vemvwxvgxmts83x9exn"}},9437:e=>{e.exports={root:"PSPDFKit-6r17fy6uh5kqy3cfjb73vq9v1v",expanded:"PSPDFKit-2uhz161knhrkpzrb5mn5na3aqr",content:"PSPDFKit-6jgwts4kv8dr7cftse42cxk2z3",left:"PSPDFKit-4hphv7cb89h1ffw9ptvmg9xjt8",right:"PSPDFKit-86nhzcde1runqybnpjzcykq7ex",mobileTextMarkup:"PSPDFKit-2qbav5sard6dxefsy6p5gufajq",stickToBottom:"PSPDFKit-318vz1kpftbtjp8eccy824g4m6",fixedHeight:"PSPDFKit-78mpt2swt4apfep3ag7quqq6me",control:"PSPDFKit-2uws3ww83fja6b3syxj88szuvh",selectBox:"PSPDFKit-532n3mbvmujvwmv3zweh7u59u7",textFormatControls:"PSPDFKit-8b7caq86m7x4bkzf3ecjwqesrz",controlWrapper:"PSPDFKit-xmyz8vgna6pqfkw4wx1twayf1",controlWrapperAutoWidth:"PSPDFKit-559g7qqwsyx86ydrj6d8x6kwqz",separator:"PSPDFKit-4cjwhud83czuezgnpqtt8t1g4y",form:"PSPDFKit-6x3mktvp3y8yqny5uh5ph6t27s",formGroup:"PSPDFKit-6f2cfyrxss9tgjemae8n6d2v6x",button:"PSPDFKit-5qha63wcjhyk977pmb11w183gf",rotateButton:"PSPDFKit-3zswrctphfm56abme3mhe89x7j",measurementToolbarButton:"PSPDFKit-5d6y6gzx57mzvk4ghwgz8bysng",iconOnlyMobile:"PSPDFKit-56zcn74uwt3jmwt9eqt4nkmm3w",blendModeSelect:"PSPDFKit-7tafq9cxvp7fp9488nkv4gt1q2",fontFamilySelect:"PSPDFKit-6panjxae2rqax33e2x13v8zhd7",fontSizeSelect:"PSPDFKit-4aap34xg2exyha2wvgep2kbrsr",colorSelect:"PSPDFKit-63mkqz864gr762bjh37u3z33ks",endLineCapSelect:"PSPDFKit-7ahby6faw9zgpdmzru1qdud52z",startLineCapSelect:"PSPDFKit-7bb9twn4c2xfchvdyv1arjd4y1",strokeDashArraySelect:"PSPDFKit-64yekz19k5s2s3kk34sutarr9w",colorSelectButton:"PSPDFKit-6e37e5hxgedzhdzpj3bgcfw8wg",controlIsDisabled:"PSPDFKit-4b2dydfrvtffvsbyz6hjmmskx3",textAnnotationOpacitySlider:"PSPDFKit-xjmpbe2ndu31ngzn7k6thcce2",annotationNoteButton:"PSPDFKit-8b5wugfkhy83qz3mrt12xxee7b",deleteButton:"PSPDFKit-3pw5d71zmdn7g2d7f7cezqab2k",buttonNoBorder:"PSPDFKit-7hhujt42dfa3wavves9fezeqju",noteIconLabel:"PSPDFKit-6kwwztxzkww77985knzv4yj25t",applyRedactionsButton:"PSPDFKit-dh9zgevasabjjq92gftvq7d1s",formDesignerButton:"PSPDFKit-6hwd5kb669g2rktq8z7tch8zey",isActive:"PSPDFKit-7hajh57r86sbfab9agdabjpdus",disableEditing:"PSPDFKit-qq4v7j3ztmbsu7sszn7n6eedz",disabledButton:"PSPDFKit-53qj5y7xwpxf385e5qupnueez4",icon:"PSPDFKit-67g1s4jvmu1dwuq693983pavtq",focusRing:"PSPDFKit-p3fhayknwfc2wy838mm6uf6ts",fontFamily:"PSPDFKit-7pxe4xgby27sg3gch3hgymc65k",dropdownMenu:"PSPDFKit-3fr3j3qzhb8zms4ha22gf8ap4w",warningButton:"PSPDFKit-7vux3363c2h5bhhue8x2tgc2d8",warningButtonIcon:"PSPDFKit-55tsnvt1cbusd6n1b314embzfj",radioButtonWarningLabel:"PSPDFKit-ve8hjm9h24pnag6snsj5hqyba",colorPickerDropdownMenu:"PSPDFKit-364rxkqcrexqk43jvg479qt5us",colorItem:"PSPDFKit-7fb12eurd4ysp5ys7tc9wgnuqm",deleteButtonIsVisibleInTouchDevices:"PSPDFKit-5rx1gxu9ku1pmjedwxt4bb8tcs",colorSvg:"PSPDFKit-2v57cb7nenh6qvs2r55dm7ftbf",lineCapsDashArrayMenu:"PSPDFKit-42uwtdws1bb24aernmbsz8ndnc",strokeDashArrayMenu:"PSPDFKit-8497hrdu98kjamf5s4gjf2bqmd",nativeDropdown:"PSPDFKit-3c6frtkm4xmn7hkv9bmpghx53j",fontFamilyNativeFlexbox:"PSPDFKit-3smmwjpf56cyb4zkshtg21jz2s",fontSizeNativeFlexbox:"PSPDFKit-7bwhutmv5jg6hggz6hp8kfcaxy",fontColorControl:"PSPDFKit-2zvhj3he31vtfrqjkjpsjb1694",overlayTextInput:"PSPDFKit-823r5gtrunhm37br45pwje8e5c",overlayTextMargin:"PSPDFKit-65ynqjj3xqcettebe26255q3ky",groupWrapper:"PSPDFKit-j3u5td7da5d2g12j3qb8kpqeq",groupDescription:"PSPDFKit-74acavk6n23dwq957gtnmbyyrf",overlayInput:"PSPDFKit-6dqybwsyjvqprdkfh1d5t3w2yj",radioInput:"PSPDFKit-87t3tq755fdm56p5111u2h5a4g",applyRedactionsWrapper:"PSPDFKit-4ssbr6rxv19yz6yh7bjp4pfgeq",customIconSvg:"PSPDFKit-p9ftrww9ym9pd2eqpps4xf6fp",snappingCheckbox:"PSPDFKit-68jg3chhe27v2qnds97q2btw4c",radioGroupWrapper:"PSPDFKit-3hf9zjqgg3t2aehba45fzmw9nc",reverseRow:"PSPDFKit-4g9caken58dfxv7snyka36rppq",measurementToolbar:"PSPDFKit-4pfvumqbpr5cct3yusfvsb8cza",measurementBackButton:"PSPDFKit-5mpcapg77fbdwa2sj3mz1x79hy",pointSnappingToggleButtonWrapper:"PSPDFKit-8bdhrea5ynkgph4wjuf7eenccs",pointSnappingToggleButton:"PSPDFKit-3jwjxf3q3tc2mjebw5qwnndfvn"}},56939:e=>{e.exports={root:"PSPDFKit-369qag2kn88x7fd7hzmy37u7jj",expanded:"PSPDFKit-s88hmm2u6mr4p6a34q6p5x97j",content:"PSPDFKit-2xkt2dmssjrt1zt3392unparpj",left:"PSPDFKit-22vuhdxbyg68mzx1mpbw51te8s",right:"PSPDFKit-8yz513hepw5dtea8yuyyc36z3g",mobileTextMarkup:"PSPDFKit-7p5sgv4my75nm8c7s61pavhw9k",stickToBottom:"PSPDFKit-4s922kjq16ky2tuz2stu8cmevf",fixedHeight:"PSPDFKit-3yctv5gp7m63pzzfqmcn2vwzsu",control:"PSPDFKit-5c3edpftcxt25778bnf8dge8wm",selectBox:"PSPDFKit-2td3u6fzb1juvzark5t2sx4q2k",textFormatControls:"PSPDFKit-5aqdkx2cvj2jkgvavhn63b9ng2",controlWrapper:"PSPDFKit-56wa92tpx7h9ndndf4p4ntj594",controlWrapperAutoWidth:"PSPDFKit-7yq1g1auatabjgr9redkv9mw4z",separator:"PSPDFKit-4dbdwzw5vf7q7u9tzye7tg1nrb",form:"PSPDFKit-6k49n5ndgcc66dsatpj5sjmvzv",formGroup:"PSPDFKit-6daq73jrkrpvw8as2bjg158s14",button:"PSPDFKit-fcgb4uy1g1393vcttkd834zya",rotateButton:"PSPDFKit-6yuyamdwf1rrwnzc2w8fqr4pjd",measurementToolbarButton:"PSPDFKit-29bp4qx2ar9g3bkzyq9mtha47h",iconOnlyMobile:"PSPDFKit-57jstkypwesnde2vkmqgh9jdhc",blendModeSelect:"PSPDFKit-8925upm91judwppvv9p55bukww",fontFamilySelect:"PSPDFKit-6j8484gf6zuru867h7zbjhwpsr",fontSizeSelect:"PSPDFKit-47dkg274amuhtuvgmphaa3qbp8",colorSelect:"PSPDFKit-6kf14wyby256uusycuansuqden",endLineCapSelect:"PSPDFKit-496rvwdezqxaryf6ba6wew6ysj",startLineCapSelect:"PSPDFKit-628jqdm82emd3wd8ywct68fvp2",strokeDashArraySelect:"PSPDFKit-6fdkgc1bgv67zv1wegm6hsq355",colorSelectButton:"PSPDFKit-58854re4pgbwg56mdaznmjjscz",controlIsDisabled:"PSPDFKit-5z4at4466ca8t6dkug1bqpq81",textAnnotationOpacitySlider:"PSPDFKit-8uywmag1h1x3ypdz5b98crr775",annotationNoteButton:"PSPDFKit-8tn5aruncqkpg83c6e9e6yv53r",deleteButton:"PSPDFKit-59bjkj2c9dfb828xaun8u4uq5q",buttonNoBorder:"PSPDFKit-5gsachaj1r6ar3h4ru679tq718",noteIconLabel:"PSPDFKit-4bkwv3nn67k2hqt55w19s4dvs4",applyRedactionsButton:"PSPDFKit-4bdfdwv6dxjwygm9tw1zmjrta9",formDesignerButton:"PSPDFKit-3pymza1pztyu17t83dfx3cmmsm",isActive:"PSPDFKit-382u1rdjb1tf6tnk2q2g7kgvgp",disableEditing:"PSPDFKit-48d85wg1rgb1utxa2a4fvw2vth",disabledButton:"PSPDFKit-cmgrqrz9uxy4sb9vg43t341c1",icon:"PSPDFKit-8xb3dqw6xuht2n573uhuknfp2k",focusRing:"PSPDFKit-52c5dtm21r4933mu2fkpjpe6uk",fontFamily:"PSPDFKit-5kgz7sh1trs8k2a4xw51qvusej",dropdownMenu:"PSPDFKit-psd9e4tcte8ac4k6jmkt1wfeu",warningButton:"PSPDFKit-8zkbczvhbtdyv5utgdt42896wt",warningButtonIcon:"PSPDFKit-2bmrfq7hm8z4thd49fdtpzxewe",radioButtonWarningLabel:"PSPDFKit-6q2rpnx5br9xmymy4hxdvc9atg",colorPickerDropdownMenu:"PSPDFKit-mjt1a3qgrvvxan7b2eet56kkt",colorItem:"PSPDFKit-3radjttaddx7fe6dnnreugbam2",deleteButtonIsVisibleInTouchDevices:"PSPDFKit-7uud28jq3crfqs4f4edufdekkf",colorSvg:"PSPDFKit-5jpt4x4a9kj7rf7d24shsfp48k",lineCapsDashArrayMenu:"PSPDFKit-3fweswjpkq7dt55fw6t438rgun",strokeDashArrayMenu:"PSPDFKit-3hmu51e1ur6hrmfyzz2cru1c48",nativeDropdown:"PSPDFKit-5fwcr59aaugp5fp73hthrqwxw9",fontFamilyNativeFlexbox:"PSPDFKit-5p5hpd3y1t7kjkjpn6cyqaqptj",fontSizeNativeFlexbox:"PSPDFKit-3v6m9ae9v1gsx87x46mg6kjmzf",fontColorControl:"PSPDFKit-67wu3hjpwubg5cqg8c94vydj5a",overlayTextInput:"PSPDFKit-41gfyk1yj6dkqvg8px6c7j3sec",overlayTextMargin:"PSPDFKit-43q9sy7pzu933w9kdbph2ahftx",groupWrapper:"PSPDFKit-77hntfhrv9fmz6c5684u5bkz7s",groupDescription:"PSPDFKit-7kmmurpd341ujzyvezu9ecj88h",overlayInput:"PSPDFKit-3fu4z9m4y47mmezmqbsmsg6u6f",radioInput:"PSPDFKit-8pbq1nn2qbdp1czxjuu7bjw2ks",applyRedactionsWrapper:"PSPDFKit-6w6h956ezp7gtq4cmy2r5mkyhu",customIconSvg:"PSPDFKit-6ep9xddvqffd53nu5e72pbdbgj",snappingCheckbox:"PSPDFKit-717y4rg4qa1pc652h8cg793m4d",radioGroupWrapper:"PSPDFKit-4xdm97phakaezcxf6wpdxn2tjm",reverseRow:"PSPDFKit-62hyggwkdx954k8f821btn7zeh",measurementToolbar:"PSPDFKit-2wv2dfhgdk3dpbha4mv9u16vs",measurementBackButton:"PSPDFKit-6dpm8fme3awumu6c44rktfucs2",pointSnappingToggleButtonWrapper:"PSPDFKit-4y4mzezsayhjmmtm9qqkgywcsh",pointSnappingToggleButton:"PSPDFKit-8grpnn6cc1r855m2st438et1tg",container:"PSPDFKit-zmwf99thxv6fcrc5fedznzzbf",buttonContainer:"PSPDFKit-5xkwu35z1pdufxyge2fpn149wt",contentEditorButton:"PSPDFKit-8p5cvevhmuv7u5wjndvwnbnu5w",saveButton:"PSPDFKit-2aekynqmf5d2unsgpe2a63pqe7",fontStyleBtn:"PSPDFKit-tb2p4fkm5haam7ptsvqb6c982",fontStyleBtnBorderless:"PSPDFKit-5hv5vgzkpzspks749ufhhvfz1k",activeFontStyleBtn:"PSPDFKit-3y1g2avp88swge652xu9nj312z",iconButton:"PSPDFKit-792vfa9s6t83dgghq4y7ghk2fj"}},78869:e=>{e.exports={root:"PSPDFKit-6wj1ne12vnarkud1xme1m8q59e",expanded:"PSPDFKit-8dvj6jpqdurcexw9s38nyrdusm",content:"PSPDFKit-ng2p7yzx55dk3e8yd33ucyq3w",left:"PSPDFKit-2nxj8qm7t143fbftj5wc5fkpmh",right:"PSPDFKit-8hmxpj5ufr2dmugsrzsfj5w24w",mobileTextMarkup:"PSPDFKit-5whgpdfnjnj445bw24d7d2eepu",stickToBottom:"PSPDFKit-qg3hbxzy2wa7d7kn2kyb5hfg6",fixedHeight:"PSPDFKit-fw1d4hymsqsunxnj7htn2vejg",control:"PSPDFKit-cvx8h4gvhqzqc8bb9wcmvaxnc",selectBox:"PSPDFKit-8p1jwd1vdxc1uu5kv9x8p6kgp5",textFormatControls:"PSPDFKit-4tf1hj3ua2348x3vfjq2ckjdzj",controlWrapper:"PSPDFKit-698j5mv28ddfb1zzrmuuvu4bgt",controlWrapperAutoWidth:"PSPDFKit-8rw1bsyhe4kbrshjzkbxn2pxt9",separator:"PSPDFKit-2p1w8qyfeab7u2r61e5xm9basn",form:"PSPDFKit-7x5nveetga7f3u3eyhc2y9z693",formGroup:"PSPDFKit-4m86pvrmtk7xh9sv3z47hqfan",button:"PSPDFKit-8sgpeb7apq77q6pg14srm485gf",rotateButton:"PSPDFKit-67pvyt6s62cm85bnpjx6pbnnxh",cancelButton:"PSPDFKit-8cc6ksf43ant6wkp5gxwmyn376",measurementToolbarButton:"PSPDFKit-5pby2mjv6be8mvvy41rpp7dkwn",iconOnlyMobile:"PSPDFKit-2rtyr394stgbvv5j9jd2mrzx4w",blendModeSelect:"PSPDFKit-56zf8cu97f7wx6varc1jbjbc1t",fontFamilySelect:"PSPDFKit-322qz987bpbdyu82atqpttzvvy",fontSizeSelect:"PSPDFKit-3spwsrcuq4a58mafezc2hew2hm",colorSelect:"PSPDFKit-4evwmwkh2v68zx97dy8htnw1he",endLineCapSelect:"PSPDFKit-5g195rx1hwggkduwfaghaguwp8",startLineCapSelect:"PSPDFKit-4h81esfk99wjjw1j1e4evv86k6",strokeDashArraySelect:"PSPDFKit-8vcucy3gdsu18nrccy3sfz6e8e",colorSelectButton:"PSPDFKit-47tvrbutrws584y86zkht7ugrh",controlIsDisabled:"PSPDFKit-3z6z4mnx2mybf2dduwbnu4ghbx",textAnnotationOpacitySlider:"PSPDFKit-7dcpygp7ucqsxtt8jqu8wqaek8",annotationNoteButton:"PSPDFKit-2ztmuxhn7vkbcnujg5fjs2nxk6",deleteButton:"PSPDFKit-74uqksjtt33kw457gbgm6cjhar",buttonNoBorder:"PSPDFKit-wnrcu53f16qwbavnhtrcsrvtt",noteIconLabel:"PSPDFKit-3j7ttk21fapf4hjzymwfaax2pp",applyRedactionsButton:"PSPDFKit-4jweuxb68jk1sdm8kfuh5e2v3b",formDesignerButton:"PSPDFKit-26sazeqcf3gq4uzpnpv7rxy5tc",isActive:"PSPDFKit-36xa88kvhztmqf3w9bw4r5ux2b",disableEditing:"PSPDFKit-7ksmq2q9vqb2a84h6pknr59vq",disabledButton:"PSPDFKit-4frspfy8ydaf2dspz1w2fe24sm",icon:"PSPDFKit-6a17y1zq5nmhnd7rsvvnnp3u82",focusRing:"PSPDFKit-2kd6b54vbgtjvjpw1vfjnz3gxa",fontFamily:"PSPDFKit-5ju67k328yc7tj3jx5vxn2tn9q",dropdownMenu:"PSPDFKit-4rm6x2vr78j36rwf82x8zcfxaf",warningButton:"PSPDFKit-2jdyb25hw79fahb16kjd7nuauu",warningButtonIcon:"PSPDFKit-6gnk29arwa3bmx79suwfyneh29",radioButtonWarningLabel:"PSPDFKit-76w7jmjqqnsz53a6hk7gjuqjfv",colorPickerDropdownMenu:"PSPDFKit-7xact8a8nm7egrfqd6jm8dexja",colorItem:"PSPDFKit-5swkhzjuhg7a1yzus1srcazf4",deleteButtonIsVisibleInTouchDevices:"PSPDFKit-6j136ndjfdbtgth4w1223r3b8v",colorSvg:"PSPDFKit-53pmrz6mhqkv25rduwt3r74tdf",lineCapsDashArrayMenu:"PSPDFKit-6kht9xjauanscqhyehtvh2m7kf",strokeDashArrayMenu:"PSPDFKit-64qwd21qw14a1hs2qywq9dktfv",nativeDropdown:"PSPDFKit-51ppvqecyde7wtftnkhpvreywa",fontFamilyNativeFlexbox:"PSPDFKit-47ujkffabzpr19w6jed6s7rn8s",fontSizeNativeFlexbox:"PSPDFKit-79wa34vt8h1dey55mwshznckvh",fontColorControl:"PSPDFKit-59kfug1yak6p54pbhwzyzp8nqv",overlayTextInput:"PSPDFKit-2bv4uu555xwcfzm4cbz9xw1575",overlayTextMargin:"PSPDFKit-7y73pgnyhcbyab2r86s5wpf3tq",groupWrapper:"PSPDFKit-3n3jywv8np58aypaxcq1dxaka4",groupDescription:"PSPDFKit-7h2nqj8dz99huxsdvz85vzqtkv",overlayInput:"PSPDFKit-3sskmdn9q2pttd7gnbgtfx1svm",radioInput:"PSPDFKit-5161whx8v77nvzdxwn92nren7h",applyRedactionsWrapper:"PSPDFKit-35zv6qfn2dk55st59jvbvkebe4",customIconSvg:"PSPDFKit-6zcvxqm7p1fu6peaqcvy1ggxur",snappingCheckbox:"PSPDFKit-87rtaenbkbsa4vh76fdk49yn3",radioGroupWrapper:"PSPDFKit-7n79z1dfc6drdkd4q859desfw4",reverseRow:"PSPDFKit-7h73prxvatb9v6feg135wrgpnu",measurementToolbar:"PSPDFKit-7ftvxz7pwnjfrf9p9bvx4kdaem",measurementBackButton:"PSPDFKit-5zxmaq2rs3z7z1ycb76vnfp8s7",pointSnappingToggleButtonWrapper:"PSPDFKit-54tjnzkmwp6xxxj9x2w181zxyx",pointSnappingToggleButton:"PSPDFKit-4jxexvux8xqt39asa2n5j1bhaz",container:"PSPDFKit-2zcrcumxc9rs6exf4ygg6wxhud",buttonContainer:"PSPDFKit-4su7z3fj53danm9m8sfmsun6mh",cropButton:"PSPDFKit-3fqbszrmhfm53fj9m672rspbb9",cropButtonDisabled:"PSPDFKit-3yfe86869dr14nnq3hdqmpstt3",cancelDesktop:"PSPDFKit-5q4w3drt2wva22st2m2zv3jdy9",cancelMobile:"PSPDFKit-46c99tbpsdnq21yere2qsvz9cs",desktopButtonText:"PSPDFKit-5uhy32eduhqeagjxsx8v1dsupn",mobileButtonText:"PSPDFKit-89hzg3dmpqdp1bb33by963n2me"}},4888:e=>{e.exports={toolbarReferencePoints:"PSPDFKit-3j4jdq7qz2dwxa1279k9vazwef",documentTabActive:"PSPDFKit-69m56fu4j9n82gdbujywja2gvt",toolbarReferencePointsSet:"PSPDFKit-8eej8fpcv5wjeexf54uv82ajge",referencePointParent:"PSPDFKit-5ryk8gx2yq84us8ukyczpsxy3m",documentText:"PSPDFKit-8rqw29ppj2w4yuvy43x1xrr11j",mobileText:"PSPDFKit-2we2fxduv62wzemn8q1msf1mgz",documentTabActiveText:"PSPDFKit-4dxpfmdzs1ahjnhcn4j2824q7j",separator:"PSPDFKit-xy1ab3hf7etfk3xyw2jg4queq",toolbarReferencePoint:"PSPDFKit-3wymx3u415ps1255jfa43bguba",documentTab:"PSPDFKit-4a9v7b75g9brahh3mp79eahacf",toolbarReferencePointMobile:"PSPDFKit-4negp1qnzp2hght5fzzkb948bq",second:"PSPDFKit-4aha149mn5fr2qf7nm9vv3s1e8",checkMarkSvg:"PSPDFKit-8vq8197jb1dah7zkt2cj4puza6",checkMark:"PSPDFKit-5vyjan5cx19u6zqmpkyk5y6n4m",documentCheckMark:"PSPDFKit-8y45regm71axdj29fvpdnyyqw9",referencePoint:"PSPDFKit-8kjh85hafnnbaywytk891yszzy",referencePointSet:"PSPDFKit-5u4fqe6u9h9335r2untkufbfcj",autoCompareTab:"PSPDFKit-3a6ss6w8kz4a9bg1ppdxs9wfjn",mobileTab:"PSPDFKit-4ws5865r8ddf7waw5w994xbgka",resultTab:"PSPDFKit-63wgvxgkew5y5nngyepzsvu4me",root:"PSPDFKit-5g2uumfazey6jk28fuu62t1ku1",content:"PSPDFKit-49apg3ban7f6z5tha93nkbxpj4",left:"PSPDFKit-46dnp15jxsmbmfb4w9u1ffee2p",right:"PSPDFKit-3bsbcmmu6v14v6bf89hvv51u6r",mobileTextMarkup:"PSPDFKit-54wvq7waj941tcr6uq8dg63zsm",stickToBottom:"PSPDFKit-84kxsxx785v52177eqww89wnfu",controlButtonContainer:"PSPDFKit-7vccbh9nhre14pssj1cjg5ykph",tabsContainer:"PSPDFKit-6q2z53f1kt5u3frhayfupey174",buttonAlignDocuments:"PSPDFKit-6qd7xqnwwt5spedkqzrq2xxd1y",buttonExport:"PSPDFKit-v7w7h5tnf2m47yzqtd84h1drm",buttonReset:"PSPDFKit-kfexhdzwencygrragmhzwd8v3",mobileButton:"PSPDFKit-67ced71xr6v9qcqegyjdb8f9h2",buttonAlignDocumentsActive:"PSPDFKit-2wue8e3wfu7w9cxehmz4e88ktt",buttonExportActive:"PSPDFKit-5p1uejfqckjn5s61nuatmaqbme",buttonResetActive:"PSPDFKit-5jfgm1cjfd1sp4z1fkd6a1hcc7",form:"PSPDFKit-6s9dcaafj7ab6mc6ktq5xn5tw6"}},68073:e=>{e.exports={root:"PSPDFKit-8mw7cgx9nrd1yg35kkhqyhksqy",expanded:"PSPDFKit-3e1ymauppttrz41jzw3mzc2t65",content:"PSPDFKit-2eu14kmrb8nn2j13et7k8kxgy2",left:"PSPDFKit-768zuvadpfp2s99ztcwnaee5jp",right:"PSPDFKit-263brxaxc464ym7sfe4phds8ah",mobileTextMarkup:"PSPDFKit-39d47rs5fq7kcjer959hp5rx8d",stickToBottom:"PSPDFKit-8y6ce6n5884k7zrpr3uqnz7htb",fixedHeight:"PSPDFKit-pqz79rmnz1jk37ra4q9jr8t33",control:"PSPDFKit-628h193kd9qu5d9hhsg3cdnuza",selectBox:"PSPDFKit-6nbc7qagvqu9yd6yet13hb6rhj",textFormatControls:"PSPDFKit-48x8nkebmfpqss6a3u7rs8g9q5",controlWrapper:"PSPDFKit-5m1cnawh6718mpdfvfzbb11abd",controlWrapperAutoWidth:"PSPDFKit-7ntyew6gjjyyu8e3azuddfrhnp",separator:"PSPDFKit-6c1mz88rtks35wu1xhbrekd71a",form:"PSPDFKit-t6r39wvb2q9vjm8wcyu4ean8",formGroup:"PSPDFKit-5nvf2c6yp9b7ynxetxyjq8ejcn",button:"PSPDFKit-39fu85k99jh2maw1gkthhh4pas",rotateButton:"PSPDFKit-6usxmcuq89wy8smur4v8ryhswg",cancelButton:"PSPDFKit-3dr4ygvb5bf362jg5fmzym38e3",formDesignerButton:"PSPDFKit-6y1y58bqs19k64pa2axe4rgkgj",measurementToolbarButton:"PSPDFKit-8tz941rhqxq9a7km8terwandnm",iconOnlyMobile:"PSPDFKit-21jwyumejben4aqq13bksg3xh8",blendModeSelect:"PSPDFKit-75ttad8xww9mpzzprak2aac974",fontFamilySelect:"PSPDFKit-6ft5xhbubs9uamqn8s4zfnq4b4",fontSizeSelect:"PSPDFKit-w47nwqgy1154yrmztu2mnwzpm",colorSelect:"PSPDFKit-2bnqvejyfcr2xpnvmzxrzqhapp",endLineCapSelect:"PSPDFKit-zxa6uqty5r8s91cyrkfmxkc93",startLineCapSelect:"PSPDFKit-275wshr5dpqatccw8ux11qqk9s",strokeDashArraySelect:"PSPDFKit-3hxmaadpfcejwvjvjd3srb4nq4",colorSelectButton:"PSPDFKit-7ub6g8tsdw1g86bt2kvn83wa7p",controlIsDisabled:"PSPDFKit-48byv3uppm1nzjqfybkzwnzjf",textAnnotationOpacitySlider:"PSPDFKit-8j3bg3d3dbcpkjba4qpgt6mtwx",annotationNoteButton:"PSPDFKit-7ryrry1x131tjsax7f4kwd8zfz",deleteButton:"PSPDFKit-4fg19pph8cyagbqvnfr8fms11",buttonNoBorder:"PSPDFKit-769hazgdc7wc335k78212j8emp",noteIconLabel:"PSPDFKit-73qv358utjtrzr85ky96uevmtg",applyRedactionsButton:"PSPDFKit-5uud5zxk4ybq2mv2nt3caxrq3g",isActive:"PSPDFKit-3z1atvkwb5ng185njjj5rz7xbz",disableEditing:"PSPDFKit-fts7hzse3qdkgfmxd89z1sxgg",disabledButton:"PSPDFKit-4q6ah6p4esufmffveqzpjh47b",icon:"PSPDFKit-2s797jk128ay8vfscex2bv7kfe",focusRing:"PSPDFKit-4nuygfwr1ru425pyg3yjydvr61",fontFamily:"PSPDFKit-3fzefd39fwgk1qdbxv6jdjs8f7",dropdownMenu:"PSPDFKit-5cn9vbp8wrnrmnk914jdmynjve",warningButton:"PSPDFKit-88kdpafyrs8h3rj4zjbrrted2p",warningButtonIcon:"PSPDFKit-6yj82gkzhm3npm9qtbttnwhvqs",radioButtonWarningLabel:"PSPDFKit-5kx5x5nrf9ffzpw127n7tdvrqw",colorPickerDropdownMenu:"PSPDFKit-6m8awubd892h2q7bxq6ucu9yx5",colorItem:"PSPDFKit-5z24bvabee7axqkv39se95kj79",deleteButtonIsVisibleInTouchDevices:"PSPDFKit-5uu5r98quqvpyqqvmhf7eqx6n8",colorSvg:"PSPDFKit-7sx7anuampjzrt9mnvv7zccdny",lineCapsDashArrayMenu:"PSPDFKit-84hychtak5eqe99svt8mp3g7gq",strokeDashArrayMenu:"PSPDFKit-3wpt6233mxj93ajtgz97kkfp95",nativeDropdown:"PSPDFKit-75syshz3pwrn5szey2w1zrbwhq",fontFamilyNativeFlexbox:"PSPDFKit-5wjc8qvxn2shc717ghes4hwe4r",fontSizeNativeFlexbox:"PSPDFKit-4axb3jsn3p35zcvz2qkf1627s1",fontColorControl:"PSPDFKit-3gbc7z42ncvpe6ecjsfvekn6bf",overlayTextInput:"PSPDFKit-25fpzkeppwbvrayjgduw8retb5",overlayTextMargin:"PSPDFKit-8q8cpk21u1e4cgjxkuetq25ac5",groupWrapper:"PSPDFKit-2syhxbxpfgp19jpz3z5x49q224",groupDescription:"PSPDFKit-7eua9n76z6wh9hyqtrgxabwhyp",overlayInput:"PSPDFKit-8san6jac5e16c3cmp3udzsyzq9",radioInput:"PSPDFKit-2bhr7dx4y8a6z7s598sms29ggb",applyRedactionsWrapper:"PSPDFKit-uqsh2mfe72fsz9emybm4vb6u9",customIconSvg:"PSPDFKit-6s24914j26xzdhgmaqjbdae7a8",snappingCheckbox:"PSPDFKit-7kdp2eku1rven1vm3eug4x6su9",radioGroupWrapper:"PSPDFKit-5mud2pd31puwn1df9zjr639yy4",reverseRow:"PSPDFKit-84kcnetmpfg2e64pd3wmwkkbud",measurementToolbar:"PSPDFKit-2f6g3rm6gpedqtnwpk94cu5b6q",measurementBackButton:"PSPDFKit-2q1r39e1v2u5ekry3v7vbc9yr7",pointSnappingToggleButtonWrapper:"PSPDFKit-4g2ngud8r3s5zduhf5fa58c69y",pointSnappingToggleButton:"PSPDFKit-7bbcwaht73ggqqhpqdhb435dan",container:"PSPDFKit-48mktwcp2g29yu9eg22p2pbvmh",formDesignerContainer:"PSPDFKit-8dznuywttgafn2v7zy61c6ctg4",buttonContainer:"PSPDFKit-5t9fk8ex9uwch2qhza7wa1pacw",cropButton:"PSPDFKit-2x4tn85f3krgk9xb8r993atjue",cropButtonDisabled:"PSPDFKit-6uhymu5y17pjr47gp9zdvgf3bd",cancelDesktop:"PSPDFKit-4wcvaawwq3jw743mwnp8vtf9df",cancelMobile:"PSPDFKit-7tretxh1ue798paef14ryrb6q6",desktopButtonText:"PSPDFKit-649k7389pwcsgmvwdt2yuhu7n3",mobileButtonText:"PSPDFKit-3uxhzwe7ph1xrpb89482k7hrd",formDesignerButtonActive:"PSPDFKit-7dgtuxjugwv9wr6k94pfvchgzt",spacer:"PSPDFKit-3nf3mgqa1mk6xs968ztk8n1ped",measurementValue:"PSPDFKit-7kz6k3947em3q3sp47s5cd3u3m"}},60964:e=>{e.exports={dropdownMenu:"PSPDFKit-2nvh838hnrmj6tjpctafyh5x7m",dropdownMenuUp:"PSPDFKit-5xzg6bg1qbsb5nyd5qtnxyygh4",arrow:"PSPDFKit-7m14b5a6nxx7rywstpkcac66jh",arrowFill:"PSPDFKit-3m2a5gvruf8k4he7qc4zjkr6ph",arrowFillUp:"PSPDFKit-8eerxut5n95np3tqrj71w5e222",arrowUp:"PSPDFKit-5b9jgmbtab9q2nsf1et2wzayps",table:"PSPDFKit-6nefwc9ww2a6bdsknb6pf9xqyf",button:"PSPDFKit-441mq6m2ewd76vee95v9fr7my2",icon:"PSPDFKit-6f7sarp7tsa7umn4f92wvj1bfv",activeIcon:"PSPDFKit-36mkhhuvsv1c4uvf7vtkhpvmrp",highlightedIcon:"PSPDFKit-h975nt1b2sjwtx24fkebaskvu"}},36105:e=>{e.exports={root:"PSPDFKit-ueuej8dv753zvbk6mp828mzsr",desktop:"PSPDFKit-5k4sr6w4zxhd2hs9mbp6s6pzny",mobile:"PSPDFKit-4mcfrdfta1gqurpt3wsxjc97a",label:"PSPDFKit-bc9txuev7gse3pp84ajq62vmt",control:"PSPDFKit-7tngmuaurbw9evq3vhsmqhb79y",input:"PSPDFKit-6akg5tb3pdjbrjepp4y44p6w6w",next:"PSPDFKit-8eqdrxrxh6w15npezgfrhr5xaw",prev:"PSPDFKit-218fbh46vhgjukxda9q16dva61",icon:"PSPDFKit-4k74zzdsrvasvyyh48kjpdwb69",inputLabel:"PSPDFKit-6fnzgpjer6z7ca9jecfhk8hdsy"}},23477:e=>{e.exports={root:"PSPDFKit-7y27utzt66zv3mqf62v5b93bkj",left:"PSPDFKit-39uutbqvjcmpw86wegd169emzw",right:"PSPDFKit-7kw269a3q1nnm4e8q7ph8skd1y",toolbarButton:"PSPDFKit-yzpfzw9bfd9ejp1k7kgdacu7d",separator:"PSPDFKit-4z9qs61q4s33nvuwafvrr69p27",buttonGroup:"PSPDFKit-2znbjv3uzcg3sd8kby58ara78y",dropdownButton:"PSPDFKit-6uq6r7dsfrgrfk6e7j9247tmjh",dropdownButtonSelected:"PSPDFKit-4w5v8zc35y6mjqvgzm7h29yxjz",dropdownButtonDisabled:"PSPDFKit-3esgz77hvs295449651j22wfqe",dropdownButtonFocused:"PSPDFKit-7afsq6jcreh7h5cqqjrdd1xq87"}},27435:e=>{e.exports={dropdown:"PSPDFKit-2h6u1uvepb29aceyswrhabn442",root:"PSPDFKit-5hqvpgcgpf1769cn35dvtg4ktz",withDropdown:"PSPDFKit-59hpcfye46ptznzj6qnfjzxmw5",icon:"PSPDFKit-3dcfza4a2zm1e2eg4echhrm6g5",isDisabled:"PSPDFKit-43cceb3p2mywgnc9ah1q5apjh4",withDropdownDisabled:"PSPDFKit-5wps7sscy34hpgrmzwbrb2k8h8",wrapper:"PSPDFKit-8nyvpcm5qq23nzqvwdfzqayryh",disabledWrapper:"PSPDFKit-8mq4c412r44dvy4qtvyfp64p1k",discreteDropdown:"PSPDFKit-32j2tkxs7yf83d9vrqs2np1xja",dropdownIcon:"PSPDFKit-6511p928m8fcbcd7nb8arydjxe",withDropdownIcon:"PSPDFKit-7t6uf3numwbvg2qg3x9sx7rkjx",withDropdownIdle:"PSPDFKit-6s8pjz7ybfkbm9j34ce4qsz32w",withLabel:"PSPDFKit-67e5xx7a8j97ze41fv1th56sbu",isActive:"PSPDFKit-yyu2s7s1tuqk1ww7hvgfnef81",disabledDropdownIcon:"PSPDFKit-7mpjdpbxyc5gttymwetaz47j3q"}},85578:e=>{e.exports={responsiveGroup:"PSPDFKit-7s54nnph7yayfgqvb7rcy9q2r9",primary:"PSPDFKit-6zy881tctu9r8st5vfwvpcfxja",stickToBottom:"PSPDFKit-2sm51vztwj4mjbhd5pehvnauwk",secondary:"PSPDFKit-272tn91arpsx8j7fngtk874eyz",button:"PSPDFKit-8tf4984hks13xr145qxkvqh5x2",animatedArrow:"PSPDFKit-3skkbnpn3gm9d5fp6b75tc96pe",isActive:"PSPDFKit-3jvcxjeemxp6228839um72qy4t",items:"PSPDFKit-2n3akw6g2m6zcpdwrxfqcdm28q","arrow-left":"PSPDFKit-6t665x89dpp83cptuahpm823v9","arrow-bottom":"PSPDFKit-3ta9x8afg61d6nxtq9yhdeq5k2",slideRightEnter:"PSPDFKit-5g7enmsbf45swnff2zwyxdwmd8",slideRightEnterActive:"PSPDFKit-h2x5j64f4qrks9ntdqzgenamu",slideRightExit:"PSPDFKit-4hcst5bakcb11gphagzdemmaj2",slideRightExitActive:"PSPDFKit-2f4rg8arx4myttw4gnp6m4cj6f",slideRightEnterDone:"PSPDFKit-3zhxpze9bhbrk5wqq7cnx6rrcz"}},38006:e=>{e.exports={focusVisible:"PSPDFKit-224gyk59mnmuy1j6u58s8bcf2p",focusedFocusVisible:"PSPDFKit-3mxmx3p3whct5a2qk5bsb3v7rg"}},26656:()=>{},27418:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function r(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,s,l=r(e),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))n.call(a,u)&&(l[u]=a[u]);if(t){s=t(a);for(var d=0;d<s.length;d++)o.call(a,s[d])&&(l[s[d]]=a[s[d]])}}return l}},92703:(e,t,n)=>{"use strict";var o=n(50414);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,a){if(a!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},45697:(e,t,n)=>{e.exports=n(92703)()},50414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},53441:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebounceInput=void 0;var o=i(n(67294)),r=i(n(91296));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=m(e);if(t){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)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}}),t&&d(e,t)}(l,e);var t,n,i,a=p(l);function l(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),g(h(t=a.call(this,e)),"onChange",(function(e){e.persist();var n=t.state.value,o=t.props.minLength;t.setState({value:e.target.value},(function(){var r=t.state.value;r.length>=o?t.notify(e):n.length>r.length&&t.notify(c(c({},e),{},{target:c(c({},e.target),{},{value:""})}))}))})),g(h(t),"onKeyDown",(function(e){"Enter"===e.key&&t.forceNotify(e);var n=t.props.onKeyDown;n&&(e.persist(),n(e))})),g(h(t),"onBlur",(function(e){t.forceNotify(e);var n=t.props.onBlur;n&&(e.persist(),n(e))})),g(h(t),"createNotifier",(function(e){if(e<0)t.notify=function(){return null};else if(0===e)t.notify=t.doNotify;else{var n=(0,r.default)((function(e){t.isDebouncing=!1,t.doNotify(e)}),e);t.notify=function(e){t.isDebouncing=!0,n(e)},t.flush=function(){return n.flush()},t.cancel=function(){t.isDebouncing=!1,n.cancel()}}})),g(h(t),"doNotify",(function(){var e=t.props.onChange;e.apply(void 0,arguments)})),g(h(t),"forceNotify",(function(e){var n=t.props.debounceTimeout;if(t.isDebouncing||!(n>0)){t.cancel&&t.cancel();var o=t.state.value,r=t.props.minLength;o.length>=r?t.doNotify(e):t.doNotify(c(c({},e),{},{target:c(c({},e.target),{},{value:o})}))}})),t.isDebouncing=!1,t.state={value:void 0===e.value||null===e.value?"":e.value};var n=t.props.debounceTimeout;return t.createNotifier(n),t}return t=l,(n=[{key:"componentDidUpdate",value:function(e){if(!this.isDebouncing){var t=this.props,n=t.value,o=t.debounceTimeout,r=e.debounceTimeout,i=e.value,a=this.state.value;void 0!==n&&i!==n&&a!==n&&this.setState({value:n}),o!==r&&this.createNotifier(o)}}},{key:"componentWillUnmount",value:function(){this.flush&&this.flush()}},{key:"render",value:function(){var e,t,n=this.props,r=n.element,i=(n.onChange,n.value,n.minLength,n.debounceTimeout,n.forceNotifyByEnter),a=n.forceNotifyOnBlur,l=n.onKeyDown,u=n.onBlur,d=n.inputRef,p=s(n,["element","onChange","value","minLength","debounceTimeout","forceNotifyByEnter","forceNotifyOnBlur","onKeyDown","onBlur","inputRef"]),f=this.state.value;e=i?{onKeyDown:this.onKeyDown}:l?{onKeyDown:l}:{},t=a?{onBlur:this.onBlur}:u?{onBlur:u}:{};var h=d?{ref:d}:{};return o.default.createElement(r,c(c(c(c({},p),{},{onChange:this.onChange,value:f},e),t),h))}}])&&u(t.prototype,n),i&&u(t,i),l}(o.default.PureComponent);t.DebounceInput=v,g(v,"defaultProps",{element:"input",type:"text",onKeyDown:void 0,onBlur:void 0,value:void 0,minLength:0,debounceTimeout:100,forceNotifyByEnter:!0,forceNotifyOnBlur:!0,inputRef:void 0})},775:(e,t,n)=>{"use strict";var o=n(53441).DebounceInput;o.DebounceInput=o,e.exports=o},64448:(e,t,n)=>{"use strict";var o=n(67294),r=n(27418),i=n(63840);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!o)throw Error(a(227));function s(e,t,n,o,r,i,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var l=!1,c=null,u=!1,d=null,p={onError:function(e){l=!0,c=e}};function f(e,t,n,o,r,i,a,u,d){l=!1,c=null,s.apply(p,arguments)}var h=null,m=null,g=null;function v(e,t,n){var o=e.type||"unknown-event";e.currentTarget=g(n),function(e,t,n,o,r,i,s,p,h){if(f.apply(this,arguments),l){if(!l)throw Error(a(198));var m=c;l=!1,c=null,u||(u=!0,d=m)}}(o,t,void 0,e),e.currentTarget=null}var y=null,b={};function w(){if(y)for(var e in b){var t=b[e],n=y.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!P[n]){if(!t.extractEvents)throw Error(a(97,e));for(var o in P[n]=t,n=t.eventTypes){var r=void 0,i=n[o],s=t,l=o;if(E.hasOwnProperty(l))throw Error(a(99,l));E[l]=i;var c=i.phasedRegistrationNames;if(c){for(r in c)c.hasOwnProperty(r)&&S(c[r],s,l);r=!0}else i.registrationName?(S(i.registrationName,s,l),r=!0):r=!1;if(!r)throw Error(a(98,o,e))}}}}function S(e,t,n){if(x[e])throw Error(a(100,e));x[e]=t,D[e]=t.eventTypes[n].dependencies}var P=[],E={},x={},D={};function C(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var o=e[t];if(!b.hasOwnProperty(t)||b[t]!==o){if(b[t])throw Error(a(102,t));b[t]=o,n=!0}}n&&w()}var k=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),O=null,A=null,T=null;function I(e){if(e=m(e)){if("function"!=typeof O)throw Error(a(280));var t=e.stateNode;t&&(t=h(t),O(e.stateNode,e.type,t))}}function F(e){A?T?T.push(e):T=[e]:A=e}function M(){if(A){var e=A,t=T;if(T=A=null,I(e),t)for(e=0;e<t.length;e++)I(t[e])}}function _(e,t){return e(t)}function N(e,t,n,o,r){return e(t,n,o,r)}function R(){}var L=_,B=!1,j=!1;function z(){null===A&&null===T||(R(),M())}function K(e,t,n){if(j)return e(t,n);j=!0;try{return L(e,t,n)}finally{j=!1,z()}}var Z=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,U=Object.prototype.hasOwnProperty,V={},G={};function W(e,t,n,o,r,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var q={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){q[e]=new W(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];q[t]=new W(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){q[e]=new W(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){q[e]=new W(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){q[e]=new W(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){q[e]=new W(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){q[e]=new W(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){q[e]=new W(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){q[e]=new W(e,5,!1,e.toLowerCase(),null,!1)}));var H=/[\-:]([a-z])/g;function $(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(H,$);q[t]=new W(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(H,$);q[t]=new W(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(H,$);q[t]=new W(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){q[e]=new W(e,1,!1,e.toLowerCase(),null,!1)})),q.xlinkHref=new W("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){q[e]=new W(e,1,!1,e.toLowerCase(),null,!0)}));var X=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Y(e,t,n,o){var r=q.hasOwnProperty(t)?q[t]:null;(null!==r?0===r.type:!o&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,o){if(null==t||function(e,t,n,o){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!o&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,o))return!0;if(o)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,r,o)&&(n=null),o||null===r?function(e){return!!U.call(G,e)||!U.call(V,e)&&(Z.test(e)?G[e]=!0:(V[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):r.mustUseProperty?e[r.propertyName]=null===n?3!==r.type&&"":n:(t=r.attributeName,o=r.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(r=r.type)||4===r&&!0===n?"":""+n,o?e.setAttributeNS(o,t,n):e.setAttribute(t,n))))}X.hasOwnProperty("ReactCurrentDispatcher")||(X.ReactCurrentDispatcher={current:null}),X.hasOwnProperty("ReactCurrentBatchConfig")||(X.ReactCurrentBatchConfig={suspense:null});var J=/^(.*)[\\\/]/,Q="function"==typeof Symbol&&Symbol.for,ee=Q?Symbol.for("react.element"):60103,te=Q?Symbol.for("react.portal"):60106,ne=Q?Symbol.for("react.fragment"):60107,oe=Q?Symbol.for("react.strict_mode"):60108,re=Q?Symbol.for("react.profiler"):60114,ie=Q?Symbol.for("react.provider"):60109,ae=Q?Symbol.for("react.context"):60110,se=Q?Symbol.for("react.concurrent_mode"):60111,le=Q?Symbol.for("react.forward_ref"):60112,ce=Q?Symbol.for("react.suspense"):60113,ue=Q?Symbol.for("react.suspense_list"):60120,de=Q?Symbol.for("react.memo"):60115,pe=Q?Symbol.for("react.lazy"):60116,fe=Q?Symbol.for("react.block"):60121,he="function"==typeof Symbol&&Symbol.iterator;function me(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=he&&e[he]||e["@@iterator"])?e:null}function ge(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case re:return"Profiler";case oe:return"StrictMode";case ce:return"Suspense";case ue:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case ie:return"Context.Provider";case le:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case de:return ge(e.type);case fe:return ge(e.render);case pe:if(e=1===e._status?e._result:null)return ge(e)}return null}function ve(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var o=e._debugOwner,r=e._debugSource,i=ge(e.type);n=null,o&&(n=ge(o.type)),o=i,i="",r?i=" (at "+r.fileName.replace(J,"")+":"+r.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(o||"Unknown")+i}t+=n,e=e.return}while(e);return t}function ye(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function we(e){e._valueTracker||(e._valueTracker=function(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var r=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(e){o=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return o},setValue:function(e){o=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Se(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=be(e)?e.checked?"true":"false":e.value),(e=o)!==n&&(t.setValue(e),!0)}function Pe(e,t){var n=t.checked;return r({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,o=null!=t.checked?t.checked:t.defaultChecked;n=ye(null!=t.value?t.value:n),e._wrapperState={initialChecked:o,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function xe(e,t){null!=(t=t.checked)&&Y(e,"checked",t,!1)}function De(e,t){xe(e,t);var n=ye(t.value),o=t.type;if(null!=n)"number"===o?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===o||"reset"===o)return void e.removeAttribute("value");t.hasOwnProperty("value")?ke(e,t.type,n):t.hasOwnProperty("defaultValue")&&ke(e,t.type,ye(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Ce(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!("submit"!==o&&"reset"!==o||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ke(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Oe(e,t){return e=r({children:void 0},t),(t=function(e){var t="";return o.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function Ae(e,t,n,o){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&o&&(e[n].defaultSelected=!0)}else{for(n=""+ye(n),t=null,r=0;r<e.length;r++){if(e[r].value===n)return e[r].selected=!0,void(o&&(e[r].defaultSelected=!0));null!==t||e[r].disabled||(t=e[r])}null!==t&&(t.selected=!0)}}function Te(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return r({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ye(n)}}function Fe(e,t){var n=ye(t.value),o=ye(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=o&&(e.defaultValue=""+o)}function Me(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var _e="http://www.w3.org/1999/xhtml",Ne="http://www.w3.org/2000/svg";function Re(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Re(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Be,je,ze=(je=function(e,t){if(e.namespaceURI!==Ne||"innerHTML"in e)e.innerHTML=t;else{for((Be=Be||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Be.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,o){MSApp.execUnsafeLocalFunction((function(){return je(e,t)}))}:je);function Ke(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Ze(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ue={animationend:Ze("Animation","AnimationEnd"),animationiteration:Ze("Animation","AnimationIteration"),animationstart:Ze("Animation","AnimationStart"),transitionend:Ze("Transition","TransitionEnd")},Ve={},Ge={};function We(e){if(Ve[e])return Ve[e];if(!Ue[e])return e;var t,n=Ue[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ge)return Ve[e]=n[t];return e}k&&(Ge=document.createElement("div").style,"AnimationEvent"in window||(delete Ue.animationend.animation,delete Ue.animationiteration.animation,delete Ue.animationstart.animation),"TransitionEvent"in window||delete Ue.transitionend.transition);var qe=We("animationend"),He=We("animationiteration"),$e=We("animationstart"),Xe=We("transitionend"),Ye="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Je=new("function"==typeof WeakMap?WeakMap:Map);function Qe(e){var t=Je.get(e);return void 0===t&&(t=new Map,Je.set(e,t)),t}function et(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function tt(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function nt(e){if(et(e)!==e)throw Error(a(188))}function ot(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=et(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,o=t;;){var r=n.return;if(null===r)break;var i=r.alternate;if(null===i){if(null!==(o=r.return)){n=o;continue}break}if(r.child===i.child){for(i=r.child;i;){if(i===n)return nt(r),e;if(i===o)return nt(r),t;i=i.sibling}throw Error(a(188))}if(n.return!==o.return)n=r,o=i;else{for(var s=!1,l=r.child;l;){if(l===n){s=!0,n=r,o=i;break}if(l===o){s=!0,o=r,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,o=r;break}if(l===o){s=!0,o=i,n=r;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==o)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function rt(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function it(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var at=null;function st(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var o=0;o<t.length&&!e.isPropagationStopped();o++)v(e,t[o],n[o]);else t&&v(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function lt(e){if(null!==e&&(at=rt(at,e)),e=at,at=null,e){if(it(e,st),at)throw Error(a(95));if(u)throw e=d,u=!1,d=null,e}}function ct(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function ut(e){if(!k)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var dt=[];function pt(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>dt.length&&dt.push(e)}function ft(e,t,n,o){if(dt.length){var r=dt.pop();return r.topLevelType=e,r.eventSystemFlags=o,r.nativeEvent=t,r.targetInst=n,r}return{topLevelType:e,eventSystemFlags:o,nativeEvent:t,targetInst:n,ancestors:[]}}function ht(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var o=n;if(3===o.tag)o=o.stateNode.containerInfo;else{for(;o.return;)o=o.return;o=3!==o.tag?null:o.stateNode.containerInfo}if(!o)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=In(o)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var r=ct(e.nativeEvent);o=e.topLevelType;var i=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var s=null,l=0;l<P.length;l++){var c=P[l];c&&(c=c.extractEvents(o,t,i,r,a))&&(s=rt(s,c))}lt(s)}}function mt(e,t,n){if(!n.has(e)){switch(e){case"scroll":$t(t,"scroll",!0);break;case"focus":case"blur":$t(t,"focus",!0),$t(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":ut(e)&&$t(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Ye.indexOf(e)&&Ht(e,t)}n.set(e,null)}}var gt,vt,yt,bt=!1,wt=[],St=null,Pt=null,Et=null,xt=new Map,Dt=new Map,Ct=[],kt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Ot="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function At(e,t,n,o,r){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:r,container:o}}function Tt(e,t){switch(e){case"focus":case"blur":St=null;break;case"dragenter":case"dragleave":Pt=null;break;case"mouseover":case"mouseout":Et=null;break;case"pointerover":case"pointerout":xt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dt.delete(t.pointerId)}}function It(e,t,n,o,r,i){return null===e||e.nativeEvent!==i?(e=At(t,n,o,r,i),null!==t&&(null!==(t=Fn(t))&&vt(t)),e):(e.eventSystemFlags|=o,e)}function Ft(e){var t=In(e.target);if(null!==t){var n=et(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=tt(n)))return e.blockedOn=t,void i.unstable_runWithPriority(e.priority,(function(){yt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Mt(e){if(null!==e.blockedOn)return!1;var t=Qt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=Fn(t);return null!==n&&vt(n),e.blockedOn=t,!1}return!0}function _t(e,t,n){Mt(e)&&n.delete(t)}function Nt(){for(bt=!1;0<wt.length;){var e=wt[0];if(null!==e.blockedOn){null!==(e=Fn(e.blockedOn))&&gt(e);break}var t=Qt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:wt.shift()}null!==St&&Mt(St)&&(St=null),null!==Pt&&Mt(Pt)&&(Pt=null),null!==Et&&Mt(Et)&&(Et=null),xt.forEach(_t),Dt.forEach(_t)}function Rt(e,t){e.blockedOn===t&&(e.blockedOn=null,bt||(bt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Nt)))}function Lt(e){function t(t){return Rt(t,e)}if(0<wt.length){Rt(wt[0],e);for(var n=1;n<wt.length;n++){var o=wt[n];o.blockedOn===e&&(o.blockedOn=null)}}for(null!==St&&Rt(St,e),null!==Pt&&Rt(Pt,e),null!==Et&&Rt(Et,e),xt.forEach(t),Dt.forEach(t),n=0;n<Ct.length;n++)(o=Ct[n]).blockedOn===e&&(o.blockedOn=null);for(;0<Ct.length&&null===(n=Ct[0]).blockedOn;)Ft(n),null===n.blockedOn&&Ct.shift()}var Bt={},jt=new Map,zt=new Map,Kt=["abort","abort",qe,"animationEnd",He,"animationIteration",$e,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Xe,"transitionEnd","waiting","waiting"];function Zt(e,t){for(var n=0;n<e.length;n+=2){var o=e[n],r=e[n+1],i="on"+(r[0].toUpperCase()+r.slice(1));i={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[o],eventPriority:t},zt.set(o,t),jt.set(o,i),Bt[r]=i}}Zt("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Zt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Zt(Kt,2);for(var Ut="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Vt=0;Vt<Ut.length;Vt++)zt.set(Ut[Vt],0);var Gt=i.unstable_UserBlockingPriority,Wt=i.unstable_runWithPriority,qt=!0;function Ht(e,t){$t(t,e,!1)}function $t(e,t,n){var o=zt.get(t);switch(void 0===o?2:o){case 0:o=Xt.bind(null,t,1,e);break;case 1:o=Yt.bind(null,t,1,e);break;default:o=Jt.bind(null,t,1,e)}n?e.addEventListener(t,o,!0):e.addEventListener(t,o,!1)}function Xt(e,t,n,o){B||R();var r=Jt,i=B;B=!0;try{N(r,e,t,n,o)}finally{(B=i)||z()}}function Yt(e,t,n,o){Wt(Gt,Jt.bind(null,e,t,n,o))}function Jt(e,t,n,o){if(qt)if(0<wt.length&&-1<kt.indexOf(e))e=At(null,e,t,n,o),wt.push(e);else{var r=Qt(e,t,n,o);if(null===r)Tt(e,o);else if(-1<kt.indexOf(e))e=At(r,e,t,n,o),wt.push(e);else if(!function(e,t,n,o,r){switch(t){case"focus":return St=It(St,e,t,n,o,r),!0;case"dragenter":return Pt=It(Pt,e,t,n,o,r),!0;case"mouseover":return Et=It(Et,e,t,n,o,r),!0;case"pointerover":var i=r.pointerId;return xt.set(i,It(xt.get(i)||null,e,t,n,o,r)),!0;case"gotpointercapture":return i=r.pointerId,Dt.set(i,It(Dt.get(i)||null,e,t,n,o,r)),!0}return!1}(r,e,t,n,o)){Tt(e,o),e=ft(e,o,null,t);try{K(ht,e)}finally{pt(e)}}}}function Qt(e,t,n,o){if(null!==(n=In(n=ct(o)))){var r=et(n);if(null===r)n=null;else{var i=r.tag;if(13===i){if(null!==(n=tt(r)))return n;n=null}else if(3===i){if(r.stateNode.hydrate)return 3===r.tag?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}e=ft(e,o,n,t);try{K(ht,e)}finally{pt(e)}return null}var en={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},tn=["Webkit","ms","Moz","O"];function nn(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||en.hasOwnProperty(e)&&en[e]?(""+t).trim():t+"px"}function on(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var o=0===n.indexOf("--"),r=nn(n,t[n],o);"float"===n&&(n="cssFloat"),o?e.setProperty(n,r):e[n]=r}}Object.keys(en).forEach((function(e){tn.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),en[t]=en[e]}))}));var rn=r({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function an(e,t){if(t){if(rn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62,""))}}function sn(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ln=_e;function cn(e,t){var n=Qe(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=D[t];for(var o=0;o<t.length;o++)mt(t[o],e,n)}function un(){}function dn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function pn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fn(e,t){var n,o=pn(e);for(e=0;o;){if(3===o.nodeType){if(n=e+o.textContent.length,e<=t&&n>=t)return{node:o,offset:t-e};e=n}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=pn(o)}}function hn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function mn(){for(var e=window,t=dn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=dn((e=t.contentWindow).document)}return t}function gn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var vn="$?",yn="$!",bn=null,wn=null;function Sn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Pn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var En="function"==typeof setTimeout?setTimeout:void 0,xn="function"==typeof clearTimeout?clearTimeout:void 0;function Dn(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Cn(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||n===yn||n===vn){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var kn=Math.random().toString(36).slice(2),On="__reactInternalInstance$"+kn,An="__reactEventHandlers$"+kn,Tn="__reactContainere$"+kn;function In(e){var t=e[On];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Tn]||n[On]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Cn(e);null!==e;){if(n=e[On])return n;e=Cn(e)}return t}n=(e=n).parentNode}return null}function Fn(e){return!(e=e[On]||e[Tn])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Mn(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function _n(e){return e[An]||null}function Nn(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Rn(e,t){var n=e.stateNode;if(!n)return null;var o=h(n);if(!o)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(o=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!o;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}function Ln(e,t,n){(t=Rn(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function Bn(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=Nn(t);for(t=n.length;0<t--;)Ln(n[t],"captured",e);for(t=0;t<n.length;t++)Ln(n[t],"bubbled",e)}}function jn(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Rn(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function zn(e){e&&e.dispatchConfig.registrationName&&jn(e._targetInst,null,e)}function Kn(e){it(e,Bn)}var Zn=null,Un=null,Vn=null;function Gn(){if(Vn)return Vn;var e,t,n=Un,o=n.length,r="value"in Zn?Zn.value:Zn.textContent,i=r.length;for(e=0;e<o&&n[e]===r[e];e++);var a=o-e;for(t=1;t<=a&&n[o-t]===r[i-t];t++);return Vn=r.slice(e,1<t?1-t:void 0)}function Wn(){return!0}function qn(){return!1}function Hn(e,t,n,o){for(var r in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(r)&&((t=e[r])?this[r]=t(n):"target"===r?this.target=o:this[r]=n[r]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Wn:qn,this.isPropagationStopped=qn,this}function $n(e,t,n,o){if(this.eventPool.length){var r=this.eventPool.pop();return this.call(r,e,t,n,o),r}return new this(e,t,n,o)}function Xn(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Yn(e){e.eventPool=[],e.getPooled=$n,e.release=Xn}r(Hn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Wn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Wn)},persist:function(){this.isPersistent=Wn},isPersistent:qn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=qn,this._dispatchInstances=this._dispatchListeners=null}}),Hn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Hn.extend=function(e){function t(){}function n(){return o.apply(this,arguments)}var o=this;t.prototype=o.prototype;var i=new t;return r(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=r({},o.Interface,e),n.extend=o.extend,Yn(n),n},Yn(Hn);var Jn=Hn.extend({data:null}),Qn=Hn.extend({data:null}),eo=[9,13,27,32],to=k&&"CompositionEvent"in window,no=null;k&&"documentMode"in document&&(no=document.documentMode);var oo=k&&"TextEvent"in window&&!no,ro=k&&(!to||no&&8<no&&11>=no),io=String.fromCharCode(32),ao={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},so=!1;function lo(e,t){switch(e){case"keyup":return-1!==eo.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function co(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var uo=!1;var po={eventTypes:ao,extractEvents:function(e,t,n,o){var r;if(to)e:{switch(e){case"compositionstart":var i=ao.compositionStart;break e;case"compositionend":i=ao.compositionEnd;break e;case"compositionupdate":i=ao.compositionUpdate;break e}i=void 0}else uo?lo(e,n)&&(i=ao.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=ao.compositionStart);return i?(ro&&"ko"!==n.locale&&(uo||i!==ao.compositionStart?i===ao.compositionEnd&&uo&&(r=Gn()):(Un="value"in(Zn=o)?Zn.value:Zn.textContent,uo=!0)),i=Jn.getPooled(i,t,n,o),r?i.data=r:null!==(r=co(n))&&(i.data=r),Kn(i),r=i):r=null,(e=oo?function(e,t){switch(e){case"compositionend":return co(t);case"keypress":return 32!==t.which?null:(so=!0,io);case"textInput":return(e=t.data)===io&&so?null:e;default:return null}}(e,n):function(e,t){if(uo)return"compositionend"===e||!to&&lo(e,t)?(e=Gn(),Vn=Un=Zn=null,uo=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ro&&"ko"!==t.locale?null:t.data}}(e,n))?((t=Qn.getPooled(ao.beforeInput,t,n,o)).data=e,Kn(t)):t=null,null===r?t:null===t?r:[r,t]}},fo={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ho(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!fo[e.type]:"textarea"===t}var mo={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function go(e,t,n){return(e=Hn.getPooled(mo.change,e,t,n)).type="change",F(n),Kn(e),e}var vo=null,yo=null;function bo(e){lt(e)}function wo(e){if(Se(Mn(e)))return e}function So(e,t){if("change"===e)return t}var Po=!1;function Eo(){vo&&(vo.detachEvent("onpropertychange",xo),yo=vo=null)}function xo(e){if("value"===e.propertyName&&wo(yo))if(e=go(yo,e,ct(e)),B)lt(e);else{B=!0;try{_(bo,e)}finally{B=!1,z()}}}function Do(e,t,n){"focus"===e?(Eo(),yo=n,(vo=t).attachEvent("onpropertychange",xo)):"blur"===e&&Eo()}function Co(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return wo(yo)}function ko(e,t){if("click"===e)return wo(t)}function Oo(e,t){if("input"===e||"change"===e)return wo(t)}k&&(Po=ut("input")&&(!document.documentMode||9<document.documentMode));var Ao={eventTypes:mo,_isInputEventSupported:Po,extractEvents:function(e,t,n,o){var r=t?Mn(t):window,i=r.nodeName&&r.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===r.type)var a=So;else if(ho(r))if(Po)a=Oo;else{a=Co;var s=Do}else(i=r.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===r.type||"radio"===r.type)&&(a=ko);if(a&&(a=a(e,t)))return go(a,n,o);s&&s(e,r,t),"blur"===e&&(e=r._wrapperState)&&e.controlled&&"number"===r.type&&ke(r,"number",r.value)}},To=Hn.extend({view:null,detail:null}),Io={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Fo(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Io[e])&&!!t[e]}function Mo(){return Fo}var _o=0,No=0,Ro=!1,Lo=!1,Bo=To.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Mo,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=_o;return _o=e.screenX,Ro?"mousemove"===e.type?e.screenX-t:0:(Ro=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=No;return No=e.screenY,Lo?"mousemove"===e.type?e.screenY-t:0:(Lo=!0,0)}}),jo=Bo.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),zo={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Ko={eventTypes:zo,extractEvents:function(e,t,n,o,r){var i="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(i&&0==(32&r)&&(n.relatedTarget||n.fromElement)||!a&&!i)return null;(i=o.window===o?o:(i=o.ownerDocument)?i.defaultView||i.parentWindow:window,a)?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?In(t):null)&&(t!==et(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null;if(a===t)return null;if("mouseout"===e||"mouseover"===e)var s=Bo,l=zo.mouseLeave,c=zo.mouseEnter,u="mouse";else"pointerout"!==e&&"pointerover"!==e||(s=jo,l=zo.pointerLeave,c=zo.pointerEnter,u="pointer");if(e=null==a?i:Mn(a),i=null==t?i:Mn(t),(l=s.getPooled(l,a,n,o)).type=u+"leave",l.target=e,l.relatedTarget=i,(n=s.getPooled(c,t,n,o)).type=u+"enter",n.target=i,n.relatedTarget=e,u=t,(o=a)&&u)e:{for(c=u,a=0,e=s=o;e;e=Nn(e))a++;for(e=0,t=c;t;t=Nn(t))e++;for(;0<a-e;)s=Nn(s),a--;for(;0<e-a;)c=Nn(c),e--;for(;a--;){if(s===c||s===c.alternate)break e;s=Nn(s),c=Nn(c)}s=null}else s=null;for(c=s,s=[];o&&o!==c&&(null===(a=o.alternate)||a!==c);)s.push(o),o=Nn(o);for(o=[];u&&u!==c&&(null===(a=u.alternate)||a!==c);)o.push(u),u=Nn(u);for(u=0;u<s.length;u++)jn(s[u],"bubbled",l);for(u=o.length;0<u--;)jn(o[u],"captured",n);return 0==(64&r)?[l]:[l,n]}};var Zo="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Uo=Object.prototype.hasOwnProperty;function Vo(e,t){if(Zo(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(o=0;o<n.length;o++)if(!Uo.call(t,n[o])||!Zo(e[n[o]],t[n[o]]))return!1;return!0}var Go=k&&"documentMode"in document&&11>=document.documentMode,Wo={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},qo=null,Ho=null,$o=null,Xo=!1;function Yo(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Xo||null==qo||qo!==dn(n)?null:("selectionStart"in(n=qo)&&gn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},$o&&Vo($o,n)?null:($o=n,(e=Hn.getPooled(Wo.select,Ho,e,t)).type="select",e.target=qo,Kn(e),e))}var Jo={eventTypes:Wo,extractEvents:function(e,t,n,o,r,i){if(!(i=!(r=i||(o.window===o?o.document:9===o.nodeType?o:o.ownerDocument)))){e:{r=Qe(r),i=D.onSelect;for(var a=0;a<i.length;a++)if(!r.has(i[a])){r=!1;break e}r=!0}i=!r}if(i)return null;switch(r=t?Mn(t):window,e){case"focus":(ho(r)||"true"===r.contentEditable)&&(qo=r,Ho=t,$o=null);break;case"blur":$o=Ho=qo=null;break;case"mousedown":Xo=!0;break;case"contextmenu":case"mouseup":case"dragend":return Xo=!1,Yo(n,o);case"selectionchange":if(Go)break;case"keydown":case"keyup":return Yo(n,o)}return null}},Qo=Hn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),er=Hn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),tr=To.extend({relatedTarget:null});function nr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var or={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rr={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ir=To.extend({key:function(e){if(e.key){var t=or[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=nr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?rr[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Mo,charCode:function(e){return"keypress"===e.type?nr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?nr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),ar=Bo.extend({dataTransfer:null}),sr=To.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Mo}),lr=Hn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),cr=Bo.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),ur={eventTypes:Bt,extractEvents:function(e,t,n,o){var r=jt.get(e);if(!r)return null;switch(e){case"keypress":if(0===nr(n))return null;case"keydown":case"keyup":e=ir;break;case"blur":case"focus":e=tr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Bo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=ar;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=sr;break;case qe:case He:case $e:e=Qo;break;case Xe:e=lr;break;case"scroll":e=To;break;case"wheel":e=cr;break;case"copy":case"cut":case"paste":e=er;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=jo;break;default:e=Hn}return Kn(t=e.getPooled(r,t,n,o)),t}};if(y)throw Error(a(101));y=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),w(),h=_n,m=Fn,g=Mn,C({SimpleEventPlugin:ur,EnterLeaveEventPlugin:Ko,ChangeEventPlugin:Ao,SelectEventPlugin:Jo,BeforeInputEventPlugin:po});var dr=[],pr=-1;function fr(e){0>pr||(e.current=dr[pr],dr[pr]=null,pr--)}function hr(e,t){pr++,dr[pr]=e.current,e.current=t}var mr={},gr={current:mr},vr={current:!1},yr=mr;function br(e,t){var n=e.type.contextTypes;if(!n)return mr;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var r,i={};for(r in n)i[r]=t[r];return o&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function wr(e){return null!=(e=e.childContextTypes)}function Sr(){fr(vr),fr(gr)}function Pr(e,t,n){if(gr.current!==mr)throw Error(a(168));hr(gr,t),hr(vr,n)}function Er(e,t,n){var o=e.stateNode;if(e=t.childContextTypes,"function"!=typeof o.getChildContext)return n;for(var i in o=o.getChildContext())if(!(i in e))throw Error(a(108,ge(t)||"Unknown",i));return r({},n,{},o)}function xr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mr,yr=gr.current,hr(gr,e),hr(vr,vr.current),!0}function Dr(e,t,n){var o=e.stateNode;if(!o)throw Error(a(169));n?(e=Er(e,t,yr),o.__reactInternalMemoizedMergedChildContext=e,fr(vr),fr(gr),hr(gr,e)):fr(vr),hr(vr,n)}var Cr=i.unstable_runWithPriority,kr=i.unstable_scheduleCallback,Or=i.unstable_cancelCallback,Ar=i.unstable_requestPaint,Tr=i.unstable_now,Ir=i.unstable_getCurrentPriorityLevel,Fr=i.unstable_ImmediatePriority,Mr=i.unstable_UserBlockingPriority,_r=i.unstable_NormalPriority,Nr=i.unstable_LowPriority,Rr=i.unstable_IdlePriority,Lr={},Br=i.unstable_shouldYield,jr=void 0!==Ar?Ar:function(){},zr=null,Kr=null,Zr=!1,Ur=Tr(),Vr=1e4>Ur?Tr:function(){return Tr()-Ur};function Gr(){switch(Ir()){case Fr:return 99;case Mr:return 98;case _r:return 97;case Nr:return 96;case Rr:return 95;default:throw Error(a(332))}}function Wr(e){switch(e){case 99:return Fr;case 98:return Mr;case 97:return _r;case 96:return Nr;case 95:return Rr;default:throw Error(a(332))}}function qr(e,t){return e=Wr(e),Cr(e,t)}function Hr(e,t,n){return e=Wr(e),kr(e,t,n)}function $r(e){return null===zr?(zr=[e],Kr=kr(Fr,Yr)):zr.push(e),Lr}function Xr(){if(null!==Kr){var e=Kr;Kr=null,Or(e)}Yr()}function Yr(){if(!Zr&&null!==zr){Zr=!0;var e=0;try{var t=zr;qr(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),zr=null}catch(t){throw null!==zr&&(zr=zr.slice(e+1)),kr(Fr,Xr),t}finally{Zr=!1}}}function Jr(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Qr(e,t){if(e&&e.defaultProps)for(var n in t=r({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var ei={current:null},ti=null,ni=null,oi=null;function ri(){oi=ni=ti=null}function ii(e){var t=ei.current;fr(ei),e.type._context._currentValue=t}function ai(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function si(e,t){ti=e,oi=ni=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(_a=!0),e.firstContext=null)}function li(e,t){if(oi!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(oi=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ni){if(null===ti)throw Error(a(308));ni=t,ti.dependencies={expirationTime:0,firstContext:t,responders:null}}else ni=ni.next=t;return e._currentValue}var ci=!1;function ui(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function di(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function pi(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function fi(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function hi(e,t){var n=e.alternate;null!==n&&di(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function mi(e,t,n,o){var i=e.updateQueue;ci=!1;var a=i.baseQueue,s=i.shared.pending;if(null!==s){if(null!==a){var l=a.next;a.next=s.next,s.next=l}a=s,i.shared.pending=null,null!==(l=e.alternate)&&(null!==(l=l.updateQueue)&&(l.baseQueue=s))}if(null!==a){l=a.next;var c=i.baseState,u=0,d=null,p=null,f=null;if(null!==l)for(var h=l;;){if((s=h.expirationTime)<o){var m={expirationTime:h.expirationTime,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null};null===f?(p=f=m,d=c):f=f.next=m,s>u&&(u=s)}else{null!==f&&(f=f.next={expirationTime:1073741823,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null}),fl(s,h.suspenseConfig);e:{var g=e,v=h;switch(s=t,m=n,v.tag){case 1:if("function"==typeof(g=v.payload)){c=g.call(m,c,s);break e}c=g;break e;case 3:g.effectTag=-4097&g.effectTag|64;case 0:if(null==(s="function"==typeof(g=v.payload)?g.call(m,c,s):g))break e;c=r({},c,s);break e;case 2:ci=!0}}null!==h.callback&&(e.effectTag|=32,null===(s=i.effects)?i.effects=[h]:s.push(h))}if(null===(h=h.next)||h===l){if(null===(s=i.shared.pending))break;h=a.next=s.next,s.next=l,i.baseQueue=a=s,i.shared.pending=null}}null===f?d=c:f.next=p,i.baseState=d,i.baseQueue=f,hl(u),e.expirationTime=u,e.memoizedState=c}}function gi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var o=e[t],r=o.callback;if(null!==r){if(o.callback=null,o=r,r=n,"function"!=typeof o)throw Error(a(191,o));o.call(r)}}}var vi=X.ReactCurrentBatchConfig,yi=(new o.Component).refs;function bi(e,t,n,o){n=null==(n=n(o,t=e.memoizedState))?t:r({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var wi={isMounted:function(e){return!!(e=e._reactInternalFiber)&&et(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var o=el(),r=vi.suspense;(r=pi(o=tl(o,e,r),r)).payload=t,null!=n&&(r.callback=n),fi(e,r),nl(e,o)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var o=el(),r=vi.suspense;(r=pi(o=tl(o,e,r),r)).tag=1,r.payload=t,null!=n&&(r.callback=n),fi(e,r),nl(e,o)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=el(),o=vi.suspense;(o=pi(n=tl(n,e,o),o)).tag=2,null!=t&&(o.callback=t),fi(e,o),nl(e,n)}};function Si(e,t,n,o,r,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(o,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!Vo(n,o)||!Vo(r,i))}function Pi(e,t,n){var o=!1,r=mr,i=t.contextType;return"object"==typeof i&&null!==i?i=li(i):(r=wr(t)?yr:gr.current,i=(o=null!=(o=t.contextTypes))?br(e,r):mr),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=wi,e.stateNode=t,t._reactInternalFiber=e,o&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=i),t}function Ei(e,t,n,o){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,o),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,o),t.state!==e&&wi.enqueueReplaceState(t,t.state,null)}function xi(e,t,n,o){var r=e.stateNode;r.props=n,r.state=e.memoizedState,r.refs=yi,ui(e);var i=t.contextType;"object"==typeof i&&null!==i?r.context=li(i):(i=wr(t)?yr:gr.current,r.context=br(e,i)),mi(e,n,r,o),r.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(bi(e,t,i,n),r.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(t=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),t!==r.state&&wi.enqueueReplaceState(r,r.state,null),mi(e,n,r,o),r.state=e.memoizedState),"function"==typeof r.componentDidMount&&(e.effectTag|=4)}var Di=Array.isArray;function Ci(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var o=n.stateNode}if(!o)throw Error(a(147,e));var r=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===r?t.ref:(t=function(e){var t=o.refs;t===yi&&(t=o.refs={}),null===e?delete t[r]:t[r]=e},t._stringRef=r,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function ki(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function Oi(e){function t(t,n){if(e){var o=t.lastEffect;null!==o?(o.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,o){if(!e)return null;for(;null!==o;)t(n,o),o=o.sibling;return null}function o(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function r(e,t){return(e=_l(e,t)).index=0,e.sibling=null,e}function i(t,n,o){return t.index=o,e?null!==(o=t.alternate)?(o=o.index)<n?(t.effectTag=2,n):o:(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function l(e,t,n,o){return null===t||6!==t.tag?((t=Ll(n,e.mode,o)).return=e,t):((t=r(t,n)).return=e,t)}function c(e,t,n,o){return null!==t&&t.elementType===n.type?((o=r(t,n.props)).ref=Ci(e,t,n),o.return=e,o):((o=Nl(n.type,n.key,n.props,null,e.mode,o)).ref=Ci(e,t,n),o.return=e,o)}function u(e,t,n,o){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Bl(n,e.mode,o)).return=e,t):((t=r(t,n.children||[])).return=e,t)}function d(e,t,n,o,i){return null===t||7!==t.tag?((t=Rl(n,e.mode,o,i)).return=e,t):((t=r(t,n)).return=e,t)}function p(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Ll(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=Nl(t.type,t.key,t.props,null,e.mode,n)).ref=Ci(e,null,t),n.return=e,n;case te:return(t=Bl(t,e.mode,n)).return=e,t}if(Di(t)||me(t))return(t=Rl(t,e.mode,n,null)).return=e,t;ki(e,t)}return null}function f(e,t,n,o){var r=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==r?null:l(e,t,""+n,o);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===r?n.type===ne?d(e,t,n.props.children,o,r):c(e,t,n,o):null;case te:return n.key===r?u(e,t,n,o):null}if(Di(n)||me(n))return null!==r?null:d(e,t,n,o,null);ki(e,n)}return null}function h(e,t,n,o,r){if("string"==typeof o||"number"==typeof o)return l(t,e=e.get(n)||null,""+o,r);if("object"==typeof o&&null!==o){switch(o.$$typeof){case ee:return e=e.get(null===o.key?n:o.key)||null,o.type===ne?d(t,e,o.props.children,r,o.key):c(t,e,o,r);case te:return u(t,e=e.get(null===o.key?n:o.key)||null,o,r)}if(Di(o)||me(o))return d(t,e=e.get(n)||null,o,r,null);ki(t,o)}return null}function m(r,a,s,l){for(var c=null,u=null,d=a,m=a=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=f(r,d,s[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(r,d),a=i(v,a,m),null===u?c=v:u.sibling=v,u=v,d=g}if(m===s.length)return n(r,d),c;if(null===d){for(;m<s.length;m++)null!==(d=p(r,s[m],l))&&(a=i(d,a,m),null===u?c=d:u.sibling=d,u=d);return c}for(d=o(r,d);m<s.length;m++)null!==(g=h(d,r,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),a=i(g,a,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(r,e)})),c}function g(r,s,l,c){var u=me(l);if("function"!=typeof u)throw Error(a(150));if(null==(l=u.call(l)))throw Error(a(151));for(var d=u=null,m=s,g=s=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=f(r,m,y.value,c);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(r,m),s=i(b,s,g),null===d?u=b:d.sibling=b,d=b,m=v}if(y.done)return n(r,m),u;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=p(r,y.value,c))&&(s=i(y,s,g),null===d?u=y:d.sibling=y,d=y);return u}for(m=o(r,m);!y.done;g++,y=l.next())null!==(y=h(m,r,g,y.value,c))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=i(y,s,g),null===d?u=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(r,e)})),u}return function(e,o,i,l){var c="object"==typeof i&&null!==i&&i.type===ne&&null===i.key;c&&(i=i.props.children);var u="object"==typeof i&&null!==i;if(u)switch(i.$$typeof){case ee:e:{for(u=i.key,c=o;null!==c;){if(c.key===u){if(7===c.tag){if(i.type===ne){n(e,c.sibling),(o=r(c,i.props.children)).return=e,e=o;break e}}else if(c.elementType===i.type){n(e,c.sibling),(o=r(c,i.props)).ref=Ci(e,c,i),o.return=e,e=o;break e}n(e,c);break}t(e,c),c=c.sibling}i.type===ne?((o=Rl(i.props.children,e.mode,l,i.key)).return=e,e=o):((l=Nl(i.type,i.key,i.props,null,e.mode,l)).ref=Ci(e,o,i),l.return=e,e=l)}return s(e);case te:e:{for(c=i.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===i.containerInfo&&o.stateNode.implementation===i.implementation){n(e,o.sibling),(o=r(o,i.children||[])).return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}(o=Bl(i,e.mode,l)).return=e,e=o}return s(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==o&&6===o.tag?(n(e,o.sibling),(o=r(o,i)).return=e,e=o):(n(e,o),(o=Ll(i,e.mode,l)).return=e,e=o),s(e);if(Di(i))return m(e,o,i,l);if(me(i))return g(e,o,i,l);if(u&&ki(e,i),void 0===i&&!c)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,o)}}var Ai=Oi(!0),Ti=Oi(!1),Ii={},Fi={current:Ii},Mi={current:Ii},_i={current:Ii};function Ni(e){if(e===Ii)throw Error(a(174));return e}function Ri(e,t){switch(hr(_i,t),hr(Mi,e),hr(Fi,Ii),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Le(null,"");break;default:t=Le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}fr(Fi),hr(Fi,t)}function Li(){fr(Fi),fr(Mi),fr(_i)}function Bi(e){Ni(_i.current);var t=Ni(Fi.current),n=Le(t,e.type);t!==n&&(hr(Mi,e),hr(Fi,n))}function ji(e){Mi.current===e&&(fr(Fi),fr(Mi))}var zi={current:0};function Ki(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||n.data===vn||n.data===yn))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Zi(e,t){return{responder:e,props:t}}var Ui=X.ReactCurrentDispatcher,Vi=X.ReactCurrentBatchConfig,Gi=0,Wi=null,qi=null,Hi=null,$i=!1;function Xi(){throw Error(a(321))}function Yi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Zo(e[n],t[n]))return!1;return!0}function Ji(e,t,n,o,r,i){if(Gi=i,Wi=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Ui.current=null===e||null===e.memoizedState?Sa:Pa,e=n(o,r),t.expirationTime===Gi){i=0;do{if(t.expirationTime=0,!(25>i))throw Error(a(301));i+=1,Hi=qi=null,t.updateQueue=null,Ui.current=Ea,e=n(o,r)}while(t.expirationTime===Gi)}if(Ui.current=wa,t=null!==qi&&null!==qi.next,Gi=0,Hi=qi=Wi=null,$i=!1,t)throw Error(a(300));return e}function Qi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Hi?Wi.memoizedState=Hi=e:Hi=Hi.next=e,Hi}function ea(){if(null===qi){var e=Wi.alternate;e=null!==e?e.memoizedState:null}else e=qi.next;var t=null===Hi?Wi.memoizedState:Hi.next;if(null!==t)Hi=t,qi=e;else{if(null===e)throw Error(a(310));e={memoizedState:(qi=e).memoizedState,baseState:qi.baseState,baseQueue:qi.baseQueue,queue:qi.queue,next:null},null===Hi?Wi.memoizedState=Hi=e:Hi=Hi.next=e}return Hi}function ta(e,t){return"function"==typeof t?t(e):t}function na(e){var t=ea(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var o=qi,r=o.baseQueue,i=n.pending;if(null!==i){if(null!==r){var s=r.next;r.next=i.next,i.next=s}o.baseQueue=r=i,n.pending=null}if(null!==r){r=r.next,o=o.baseState;var l=s=i=null,c=r;do{var u=c.expirationTime;if(u<Gi){var d={expirationTime:c.expirationTime,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(s=l=d,i=o):l=l.next=d,u>Wi.expirationTime&&(Wi.expirationTime=u,hl(u))}else null!==l&&(l=l.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),fl(u,c.suspenseConfig),o=c.eagerReducer===e?c.eagerState:e(o,c.action);c=c.next}while(null!==c&&c!==r);null===l?i=o:l.next=s,Zo(o,t.memoizedState)||(_a=!0),t.memoizedState=o,t.baseState=i,t.baseQueue=l,n.lastRenderedState=o}return[t.memoizedState,n.dispatch]}function oa(e){var t=ea(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var o=n.dispatch,r=n.pending,i=t.memoizedState;if(null!==r){n.pending=null;var s=r=r.next;do{i=e(i,s.action),s=s.next}while(s!==r);Zo(i,t.memoizedState)||(_a=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,o]}function ra(e){var t=Qi();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ta,lastRenderedState:e}).dispatch=ba.bind(null,Wi,e),[t.memoizedState,e]}function ia(e,t,n,o){return e={tag:e,create:t,destroy:n,deps:o,next:null},null===(t=Wi.updateQueue)?(t={lastEffect:null},Wi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(o=n.next,n.next=e,e.next=o,t.lastEffect=e),e}function aa(){return ea().memoizedState}function sa(e,t,n,o){var r=Qi();Wi.effectTag|=e,r.memoizedState=ia(1|t,n,void 0,void 0===o?null:o)}function la(e,t,n,o){var r=ea();o=void 0===o?null:o;var i=void 0;if(null!==qi){var a=qi.memoizedState;if(i=a.destroy,null!==o&&Yi(o,a.deps))return void ia(t,n,i,o)}Wi.effectTag|=e,r.memoizedState=ia(1|t,n,i,o)}function ca(e,t){return sa(516,4,e,t)}function ua(e,t){return la(516,4,e,t)}function da(e,t){return la(4,2,e,t)}function pa(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function fa(e,t,n){return n=null!=n?n.concat([e]):null,la(4,2,pa.bind(null,t,e),n)}function ha(){}function ma(e,t){return Qi().memoizedState=[e,void 0===t?null:t],e}function ga(e,t){var n=ea();t=void 0===t?null:t;var o=n.memoizedState;return null!==o&&null!==t&&Yi(t,o[1])?o[0]:(n.memoizedState=[e,t],e)}function va(e,t){var n=ea();t=void 0===t?null:t;var o=n.memoizedState;return null!==o&&null!==t&&Yi(t,o[1])?o[0]:(e=e(),n.memoizedState=[e,t],e)}function ya(e,t,n){var o=Gr();qr(98>o?98:o,(function(){e(!0)})),qr(97<o?97:o,(function(){var o=Vi.suspense;Vi.suspense=void 0===t?null:t;try{e(!1),n()}finally{Vi.suspense=o}}))}function ba(e,t,n){var o=el(),r=vi.suspense;r={expirationTime:o=tl(o,e,r),suspenseConfig:r,action:n,eagerReducer:null,eagerState:null,next:null};var i=t.pending;if(null===i?r.next=r:(r.next=i.next,i.next=r),t.pending=r,i=e.alternate,e===Wi||null!==i&&i===Wi)$i=!0,r.expirationTime=Gi,Wi.expirationTime=Gi;else{if(0===e.expirationTime&&(null===i||0===i.expirationTime)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(r.eagerReducer=i,r.eagerState=s,Zo(s,a))return}catch(e){}nl(e,o)}}var wa={readContext:li,useCallback:Xi,useContext:Xi,useEffect:Xi,useImperativeHandle:Xi,useLayoutEffect:Xi,useMemo:Xi,useReducer:Xi,useRef:Xi,useState:Xi,useDebugValue:Xi,useResponder:Xi,useDeferredValue:Xi,useTransition:Xi},Sa={readContext:li,useCallback:ma,useContext:li,useEffect:ca,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,sa(4,2,pa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return sa(4,2,e,t)},useMemo:function(e,t){var n=Qi();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var o=Qi();return t=void 0!==n?n(t):t,o.memoizedState=o.baseState=t,e=(e=o.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=ba.bind(null,Wi,e),[o.memoizedState,e]},useRef:function(e){return e={current:e},Qi().memoizedState=e},useState:ra,useDebugValue:ha,useResponder:Zi,useDeferredValue:function(e,t){var n=ra(e),o=n[0],r=n[1];return ca((function(){var n=Vi.suspense;Vi.suspense=void 0===t?null:t;try{r(e)}finally{Vi.suspense=n}}),[e,t]),o},useTransition:function(e){var t=ra(!1),n=t[0];return t=t[1],[ma(ya.bind(null,t,e),[t,e]),n]}},Pa={readContext:li,useCallback:ga,useContext:li,useEffect:ua,useImperativeHandle:fa,useLayoutEffect:da,useMemo:va,useReducer:na,useRef:aa,useState:function(){return na(ta)},useDebugValue:ha,useResponder:Zi,useDeferredValue:function(e,t){var n=na(ta),o=n[0],r=n[1];return ua((function(){var n=Vi.suspense;Vi.suspense=void 0===t?null:t;try{r(e)}finally{Vi.suspense=n}}),[e,t]),o},useTransition:function(e){var t=na(ta),n=t[0];return t=t[1],[ga(ya.bind(null,t,e),[t,e]),n]}},Ea={readContext:li,useCallback:ga,useContext:li,useEffect:ua,useImperativeHandle:fa,useLayoutEffect:da,useMemo:va,useReducer:oa,useRef:aa,useState:function(){return oa(ta)},useDebugValue:ha,useResponder:Zi,useDeferredValue:function(e,t){var n=oa(ta),o=n[0],r=n[1];return ua((function(){var n=Vi.suspense;Vi.suspense=void 0===t?null:t;try{r(e)}finally{Vi.suspense=n}}),[e,t]),o},useTransition:function(e){var t=oa(ta),n=t[0];return t=t[1],[ga(ya.bind(null,t,e),[t,e]),n]}},xa=null,Da=null,Ca=!1;function ka(e,t){var n=Fl(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Oa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Aa(e){if(Ca){var t=Da;if(t){var n=t;if(!Oa(e,t)){if(!(t=Dn(n.nextSibling))||!Oa(e,t))return e.effectTag=-1025&e.effectTag|2,Ca=!1,void(xa=e);ka(xa,n)}xa=e,Da=Dn(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,Ca=!1,xa=e}}function Ta(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;xa=e}function Ia(e){if(e!==xa)return!1;if(!Ca)return Ta(e),Ca=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Pn(t,e.memoizedProps))for(t=Da;t;)ka(e,t),t=Dn(t.nextSibling);if(Ta(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Da=Dn(e.nextSibling);break e}t--}else"$"!==n&&n!==yn&&n!==vn||t++}e=e.nextSibling}Da=null}}else Da=xa?Dn(e.stateNode.nextSibling):null;return!0}function Fa(){Da=xa=null,Ca=!1}var Ma=X.ReactCurrentOwner,_a=!1;function Na(e,t,n,o){t.child=null===e?Ti(t,null,n,o):Ai(t,e.child,n,o)}function Ra(e,t,n,o,r){n=n.render;var i=t.ref;return si(t,r),o=Ji(e,t,n,o,i,r),null===e||_a?(t.effectTag|=1,Na(e,t,o,r),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=r&&(e.expirationTime=0),Ja(e,t,r))}function La(e,t,n,o,r,i){if(null===e){var a=n.type;return"function"!=typeof a||Ml(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Nl(n.type,null,o,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ba(e,t,a,o,r,i))}return a=e.child,r<i&&(r=a.memoizedProps,(n=null!==(n=n.compare)?n:Vo)(r,o)&&e.ref===t.ref)?Ja(e,t,i):(t.effectTag|=1,(e=_l(a,o)).ref=t.ref,e.return=t,t.child=e)}function Ba(e,t,n,o,r,i){return null!==e&&Vo(e.memoizedProps,o)&&e.ref===t.ref&&(_a=!1,r<i)?(t.expirationTime=e.expirationTime,Ja(e,t,i)):za(e,t,n,o,i)}function ja(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function za(e,t,n,o,r){var i=wr(n)?yr:gr.current;return i=br(t,i),si(t,r),n=Ji(e,t,n,o,i,r),null===e||_a?(t.effectTag|=1,Na(e,t,n,r),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=r&&(e.expirationTime=0),Ja(e,t,r))}function Ka(e,t,n,o,r){if(wr(n)){var i=!0;xr(t)}else i=!1;if(si(t,r),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),Pi(t,n,o),xi(t,n,o,r),o=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=li(c):c=br(t,c=wr(n)?yr:gr.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==o||l!==c)&&Ei(t,a,o,c),ci=!1;var p=t.memoizedState;a.state=p,mi(t,o,a,r),l=t.memoizedState,s!==o||p!==l||vr.current||ci?("function"==typeof u&&(bi(t,n,u,o),l=t.memoizedState),(s=ci||Si(t,n,s,o,p,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=o,t.memoizedState=l),a.props=o,a.state=l,a.context=c,o=s):("function"==typeof a.componentDidMount&&(t.effectTag|=4),o=!1)}else a=t.stateNode,di(e,t),s=t.memoizedProps,a.props=t.type===t.elementType?s:Qr(t.type,s),l=a.context,"object"==typeof(c=n.contextType)&&null!==c?c=li(c):c=br(t,c=wr(n)?yr:gr.current),(d="function"==typeof(u=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==o||l!==c)&&Ei(t,a,o,c),ci=!1,l=t.memoizedState,a.state=l,mi(t,o,a,r),p=t.memoizedState,s!==o||l!==p||vr.current||ci?("function"==typeof u&&(bi(t,n,u,o),p=t.memoizedState),(u=ci||Si(t,n,s,o,l,p,c))?(d||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(o,p,c),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(o,p,c)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),t.memoizedProps=o,t.memoizedState=p),a.props=o,a.state=p,a.context=c,o=u):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),o=!1);return Za(e,t,n,o,i,r)}function Za(e,t,n,o,r,i){ja(e,t);var a=0!=(64&t.effectTag);if(!o&&!a)return r&&Dr(t,n,!1),Ja(e,t,i);o=t.stateNode,Ma.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:o.render();return t.effectTag|=1,null!==e&&a?(t.child=Ai(t,e.child,null,i),t.child=Ai(t,null,s,i)):Na(e,t,s,i),t.memoizedState=o.state,r&&Dr(t,n,!0),t.child}function Ua(e){var t=e.stateNode;t.pendingContext?Pr(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Pr(0,t.context,!1),Ri(e,t.containerInfo)}var Va,Ga,Wa,qa={dehydrated:null,retryTime:0};function Ha(e,t,n){var o,r=t.mode,i=t.pendingProps,a=zi.current,s=!1;if((o=0!=(64&t.effectTag))||(o=0!=(2&a)&&(null===e||null!==e.memoizedState)),o?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),hr(zi,1&a),null===e){if(void 0!==i.fallback&&Aa(t),s){if(s=i.fallback,(i=Rl(null,r,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Rl(s,r,n,null)).return=t,i.sibling=n,t.memoizedState=qa,t.child=i,n}return r=i.children,t.memoizedState=null,t.child=Ti(t,null,r,n)}if(null!==e.memoizedState){if(r=(e=e.child).sibling,s){if(i=i.fallback,(n=_l(e,e.pendingProps)).return=t,0==(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(r=_l(r,i)).return=t,n.sibling=r,n.childExpirationTime=0,t.memoizedState=qa,t.child=n,r}return n=Ai(t,e.child,i.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=i.fallback,(i=Rl(null,r,0,null)).return=t,i.child=e,null!==e&&(e.return=i),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Rl(s,r,n,null)).return=t,i.sibling=n,n.effectTag|=2,i.childExpirationTime=0,t.memoizedState=qa,t.child=i,n}return t.memoizedState=null,t.child=Ai(t,e,i.children,n)}function $a(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),ai(e.return,t)}function Xa(e,t,n,o,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:n,tailExpiration:0,tailMode:r,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=o,a.tail=n,a.tailExpiration=0,a.tailMode=r,a.lastEffect=i)}function Ya(e,t,n){var o=t.pendingProps,r=o.revealOrder,i=o.tail;if(Na(e,t,o.children,n),0!=(2&(o=zi.current)))o=1&o|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&$a(e,n);else if(19===e.tag)$a(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(hr(zi,o),0==(2&t.mode))t.memoizedState=null;else switch(r){case"forwards":for(n=t.child,r=null;null!==n;)null!==(e=n.alternate)&&null===Ki(e)&&(r=n),n=n.sibling;null===(n=r)?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Xa(t,!1,r,n,i,t.lastEffect);break;case"backwards":for(n=null,r=t.child,t.child=null;null!==r;){if(null!==(e=r.alternate)&&null===Ki(e)){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Xa(t,!0,n,null,i,t.lastEffect);break;case"together":Xa(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Ja(e,t,n){null!==e&&(t.dependencies=e.dependencies);var o=t.expirationTime;if(0!==o&&hl(o),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=_l(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=_l(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Qa(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var o=null;null!==n;)null!==n.alternate&&(o=n),n=n.sibling;null===o?t||null===e.tail?e.tail=null:e.tail.sibling=null:o.sibling=null}}function es(e,t,n){var o=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return wr(t.type)&&Sr(),null;case 3:return Li(),fr(vr),fr(gr),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!Ia(t)||(t.effectTag|=4),null;case 5:ji(t),n=Ni(_i.current);var i=t.type;if(null!==e&&null!=t.stateNode)Ga(e,t,i,o,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!o){if(null===t.stateNode)throw Error(a(166));return null}if(e=Ni(Fi.current),Ia(t)){o=t.stateNode,i=t.type;var s=t.memoizedProps;switch(o[On]=t,o[An]=s,i){case"iframe":case"object":case"embed":Ht("load",o);break;case"video":case"audio":for(e=0;e<Ye.length;e++)Ht(Ye[e],o);break;case"source":Ht("error",o);break;case"img":case"image":case"link":Ht("error",o),Ht("load",o);break;case"form":Ht("reset",o),Ht("submit",o);break;case"details":Ht("toggle",o);break;case"input":Ee(o,s),Ht("invalid",o),cn(n,"onChange");break;case"select":o._wrapperState={wasMultiple:!!s.multiple},Ht("invalid",o),cn(n,"onChange");break;case"textarea":Ie(o,s),Ht("invalid",o),cn(n,"onChange")}for(var l in an(i,s),e=null,s)if(s.hasOwnProperty(l)){var c=s[l];"children"===l?"string"==typeof c?o.textContent!==c&&(e=["children",c]):"number"==typeof c&&o.textContent!==""+c&&(e=["children",""+c]):x.hasOwnProperty(l)&&null!=c&&cn(n,l)}switch(i){case"input":we(o),Ce(o,s,!0);break;case"textarea":we(o),Me(o);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(o.onclick=un)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(l=9===n.nodeType?n:n.ownerDocument,e===ln&&(e=Re(i)),e===ln?"script"===i?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof o.is?e=l.createElement(i,{is:o.is}):(e=l.createElement(i),"select"===i&&(l=e,o.multiple?l.multiple=!0:o.size&&(l.size=o.size))):e=l.createElementNS(e,i),e[On]=t,e[An]=o,Va(e,t),t.stateNode=e,l=sn(i,o),i){case"iframe":case"object":case"embed":Ht("load",e),c=o;break;case"video":case"audio":for(c=0;c<Ye.length;c++)Ht(Ye[c],e);c=o;break;case"source":Ht("error",e),c=o;break;case"img":case"image":case"link":Ht("error",e),Ht("load",e),c=o;break;case"form":Ht("reset",e),Ht("submit",e),c=o;break;case"details":Ht("toggle",e),c=o;break;case"input":Ee(e,o),c=Pe(e,o),Ht("invalid",e),cn(n,"onChange");break;case"option":c=Oe(e,o);break;case"select":e._wrapperState={wasMultiple:!!o.multiple},c=r({},o,{value:void 0}),Ht("invalid",e),cn(n,"onChange");break;case"textarea":Ie(e,o),c=Te(e,o),Ht("invalid",e),cn(n,"onChange");break;default:c=o}an(i,c);var u=c;for(s in u)if(u.hasOwnProperty(s)){var d=u[s];"style"===s?on(e,d):"dangerouslySetInnerHTML"===s?null!=(d=d?d.__html:void 0)&&ze(e,d):"children"===s?"string"==typeof d?("textarea"!==i||""!==d)&&Ke(e,d):"number"==typeof d&&Ke(e,""+d):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(x.hasOwnProperty(s)?null!=d&&cn(n,s):null!=d&&Y(e,s,d,l))}switch(i){case"input":we(e),Ce(e,o,!1);break;case"textarea":we(e),Me(e);break;case"option":null!=o.value&&e.setAttribute("value",""+ye(o.value));break;case"select":e.multiple=!!o.multiple,null!=(n=o.value)?Ae(e,!!o.multiple,n,!1):null!=o.defaultValue&&Ae(e,!!o.multiple,o.defaultValue,!0);break;default:"function"==typeof c.onClick&&(e.onclick=un)}Sn(i,o)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Wa(0,t,e.memoizedProps,o);else{if("string"!=typeof o&&null===t.stateNode)throw Error(a(166));n=Ni(_i.current),Ni(Fi.current),Ia(t)?(n=t.stateNode,o=t.memoizedProps,n[On]=t,n.nodeValue!==o&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(o))[On]=t,t.stateNode=n)}return null;case 13:return fr(zi),o=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==o,o=!1,null===e?void 0!==t.memoizedProps.fallback&&Ia(t):(o=null!==(i=e.memoizedState),n||null===i||null!==(i=e.child.sibling)&&(null!==(s=t.firstEffect)?(t.firstEffect=i,i.nextEffect=s):(t.firstEffect=t.lastEffect=i,i.nextEffect=null),i.effectTag=8)),n&&!o&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&zi.current)?Ns===Os&&(Ns=As):(Ns!==Os&&Ns!==As||(Ns=Ts),0!==zs&&null!==Fs&&(Kl(Fs,_s),Zl(Fs,zs)))),(n||o)&&(t.effectTag|=4),null);case 4:return Li(),null;case 10:return ii(t),null;case 19:if(fr(zi),null===(o=t.memoizedState))return null;if(i=0!=(64&t.effectTag),null===(s=o.rendering)){if(i)Qa(o,!1);else if(Ns!==Os||null!==e&&0!=(64&e.effectTag))for(s=t.child;null!==s;){if(null!==(e=Ki(s))){for(t.effectTag|=64,Qa(o,!1),null!==(i=e.updateQueue)&&(t.updateQueue=i,t.effectTag|=4),null===o.lastEffect&&(t.firstEffect=null),t.lastEffect=o.lastEffect,o=t.child;null!==o;)s=n,(i=o).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(e=i.alternate)?(i.childExpirationTime=0,i.expirationTime=s,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=e.childExpirationTime,i.expirationTime=e.expirationTime,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,s=e.dependencies,i.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),o=o.sibling;return hr(zi,1&zi.current|2),t.child}s=s.sibling}}else{if(!i)if(null!==(e=Ki(s))){if(t.effectTag|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),Qa(o,!0),null===o.tail&&"hidden"===o.tailMode&&!s.alternate)return null!==(t=t.lastEffect=o.lastEffect)&&(t.nextEffect=null),null}else 2*Vr()-o.renderingStartTime>o.tailExpiration&&1<n&&(t.effectTag|=64,i=!0,Qa(o,!1),t.expirationTime=t.childExpirationTime=n-1);o.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=o.last)?n.sibling=s:t.child=s,o.last=s)}return null!==o.tail?(0===o.tailExpiration&&(o.tailExpiration=Vr()+500),n=o.tail,o.rendering=n,o.tail=n.sibling,o.lastEffect=t.lastEffect,o.renderingStartTime=Vr(),n.sibling=null,t=zi.current,hr(zi,i?1&t|2:1&t),n):null}throw Error(a(156,t.tag))}function ts(e){switch(e.tag){case 1:wr(e.type)&&Sr();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(Li(),fr(vr),fr(gr),0!=(64&(t=e.effectTag)))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return ji(e),null;case 13:return fr(zi),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return fr(zi),null;case 4:return Li(),null;case 10:return ii(e),null;default:return null}}function ns(e,t){return{value:e,source:t,stack:ve(t)}}Va=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ga=function(e,t,n,o,i){var a=e.memoizedProps;if(a!==o){var s,l,c=t.stateNode;switch(Ni(Fi.current),e=null,n){case"input":a=Pe(c,a),o=Pe(c,o),e=[];break;case"option":a=Oe(c,a),o=Oe(c,o),e=[];break;case"select":a=r({},a,{value:void 0}),o=r({},o,{value:void 0}),e=[];break;case"textarea":a=Te(c,a),o=Te(c,o),e=[];break;default:"function"!=typeof a.onClick&&"function"==typeof o.onClick&&(c.onclick=un)}for(s in an(n,o),n=null,a)if(!o.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s)for(l in c=a[s])c.hasOwnProperty(l)&&(n||(n={}),n[l]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(x.hasOwnProperty(s)?e||(e=[]):(e=e||[]).push(s,null));for(s in o){var u=o[s];if(c=null!=a?a[s]:void 0,o.hasOwnProperty(s)&&u!==c&&(null!=u||null!=c))if("style"===s)if(c){for(l in c)!c.hasOwnProperty(l)||u&&u.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in u)u.hasOwnProperty(l)&&c[l]!==u[l]&&(n||(n={}),n[l]=u[l])}else n||(e||(e=[]),e.push(s,n)),n=u;else"dangerouslySetInnerHTML"===s?(u=u?u.__html:void 0,c=c?c.__html:void 0,null!=u&&c!==u&&(e=e||[]).push(s,u)):"children"===s?c===u||"string"!=typeof u&&"number"!=typeof u||(e=e||[]).push(s,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(x.hasOwnProperty(s)?(null!=u&&cn(i,s),e||c===u||(e=[])):(e=e||[]).push(s,u))}n&&(e=e||[]).push("style",n),i=e,(t.updateQueue=i)&&(t.effectTag|=4)}},Wa=function(e,t,n,o){n!==o&&(t.effectTag|=4)};var os="function"==typeof WeakSet?WeakSet:Set;function rs(e,t){var n=t.source,o=t.stack;null===o&&null!==n&&(o=ve(n)),null!==n&&ge(n.type),t=t.value,null!==e&&1===e.tag&&ge(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function is(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Cl(e,t)}else t.current=null}function as(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 3:case 5:case 6:case 4:case 17:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,o=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Qr(t.type,n),o),e.__reactInternalSnapshotBeforeUpdate=t}return}throw Error(a(163))}function ss(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var o=n.destroy;n.destroy=void 0,void 0!==o&&o()}n=n.next}while(n!==t)}}function ls(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var o=n.create;n.destroy=o()}n=n.next}while(n!==t)}}function cs(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void ls(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var o=n.elementType===n.type?t.memoizedProps:Qr(n.type,t.memoizedProps);e.componentDidUpdate(o,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&gi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}gi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&Sn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Lt(n)))))}throw Error(a(163))}function us(e,t,n){switch("function"==typeof Tl&&Tl(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var o=e.next;qr(97<n?97:n,(function(){var e=o;do{var n=e.destroy;if(void 0!==n){var r=t;try{n()}catch(e){Cl(r,e)}}e=e.next}while(e!==o)}))}break;case 1:is(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Cl(e,t)}}(t,n);break;case 5:is(t);break;case 4:gs(e,t,n)}}function ds(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&ds(t)}function ps(e){return 5===e.tag||3===e.tag||4===e.tag}function fs(e){e:{for(var t=e.return;null!==t;){if(ps(t)){var n=t;break e}t=t.return}throw Error(a(160))}switch(t=n.stateNode,n.tag){case 5:var o=!1;break;case 3:case 4:t=t.containerInfo,o=!0;break;default:throw Error(a(161))}16&n.effectTag&&(Ke(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ps(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}o?hs(e,n,t):ms(e,n,t)}function hs(e,t,n){var o=e.tag,r=5===o||6===o;if(r)e=r?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=un));else if(4!==o&&null!==(e=e.child))for(hs(e,t,n),e=e.sibling;null!==e;)hs(e,t,n),e=e.sibling}function ms(e,t,n){var o=e.tag,r=5===o||6===o;if(r)e=r?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==o&&null!==(e=e.child))for(ms(e,t,n),e=e.sibling;null!==e;)ms(e,t,n),e=e.sibling}function gs(e,t,n){for(var o,r,i=t,s=!1;;){if(!s){s=i.return;e:for(;;){if(null===s)throw Error(a(160));switch(o=s.stateNode,s.tag){case 5:r=!1;break e;case 3:case 4:o=o.containerInfo,r=!0;break e}s=s.return}s=!0}if(5===i.tag||6===i.tag){e:for(var l=e,c=i,u=n,d=c;;)if(us(l,d,u),null!==d.child&&4!==d.tag)d.child.return=d,d=d.child;else{if(d===c)break e;for(;null===d.sibling;){if(null===d.return||d.return===c)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}r?(l=o,c=i.stateNode,8===l.nodeType?l.parentNode.removeChild(c):l.removeChild(c)):o.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){o=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(us(e,i,n),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(s=!1)}i.sibling.return=i.return,i=i.sibling}}function vs(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void ss(3,t);case 1:case 12:case 17:return;case 5:var n=t.stateNode;if(null!=n){var o=t.memoizedProps,r=null!==e?e.memoizedProps:o;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[An]=o,"input"===e&&"radio"===o.type&&null!=o.name&&xe(n,o),sn(e,r),t=sn(e,o),r=0;r<i.length;r+=2){var s=i[r],l=i[r+1];"style"===s?on(n,l):"dangerouslySetInnerHTML"===s?ze(n,l):"children"===s?Ke(n,l):Y(n,s,l,t)}switch(e){case"input":De(n,o);break;case"textarea":Fe(n,o);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!o.multiple,null!=(e=o.value)?Ae(n,!!o.multiple,e,!1):t!==!!o.multiple&&(null!=o.defaultValue?Ae(n,!!o.multiple,o.defaultValue,!0):Ae(n,!!o.multiple,o.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,Lt(t.containerInfo)));case 13:if(n=t,null===t.memoizedState?o=!1:(o=!0,n=t.child,Zs=Vr()),null!==n)e:for(e=n;;){if(5===e.tag)i=e.stateNode,o?"function"==typeof(i=i.style).setProperty?i.setProperty("display","none","important"):i.display="none":(i=e.stateNode,r=null!=(r=e.memoizedProps.style)&&r.hasOwnProperty("display")?r.display:null,i.style.display=nn("display",r));else if(6===e.tag)e.stateNode.nodeValue=o?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(i=e.child.sibling).return=e,e=i;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void ys(t);case 19:return void ys(t)}throw Error(a(163))}function ys(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new os),t.forEach((function(t){var o=Ol.bind(null,e,t);n.has(t)||(n.add(t),t.then(o,o))}))}}var bs="function"==typeof WeakMap?WeakMap:Map;function ws(e,t,n){(n=pi(n,null)).tag=3,n.payload={element:null};var o=t.value;return n.callback=function(){Vs||(Vs=!0,Gs=o),rs(e,t)},n}function Ss(e,t,n){(n=pi(n,null)).tag=3;var o=e.type.getDerivedStateFromError;if("function"==typeof o){var r=t.value;n.payload=function(){return rs(e,t),o(r)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof o&&(null===Ws?Ws=new Set([this]):Ws.add(this),rs(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var Ps,Es=Math.ceil,xs=X.ReactCurrentDispatcher,Ds=X.ReactCurrentOwner,Cs=16,ks=32,Os=0,As=3,Ts=4,Is=0,Fs=null,Ms=null,_s=0,Ns=Os,Rs=null,Ls=1073741823,Bs=1073741823,js=null,zs=0,Ks=!1,Zs=0,Us=null,Vs=!1,Gs=null,Ws=null,qs=!1,Hs=null,$s=90,Xs=null,Ys=0,Js=null,Qs=0;function el(){return 0!=(48&Is)?1073741821-(Vr()/10|0):0!==Qs?Qs:Qs=1073741821-(Vr()/10|0)}function tl(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var o=Gr();if(0==(4&t))return 99===o?1073741823:1073741822;if(0!=(Is&Cs))return _s;if(null!==n)e=Jr(e,0|n.timeoutMs||5e3,250);else switch(o){case 99:e=1073741823;break;case 98:e=Jr(e,150,100);break;case 97:case 96:e=Jr(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==Fs&&e===_s&&--e,e}function nl(e,t){if(50<Ys)throw Ys=0,Js=null,Error(a(185));if(null!==(e=ol(e,t))){var n=Gr();1073741823===t?0!=(8&Is)&&0==(48&Is)?sl(e):(il(e),0===Is&&Xr()):il(e),0==(4&Is)||98!==n&&99!==n||(null===Xs?Xs=new Map([[e,t]]):(void 0===(n=Xs.get(e))||n>t)&&Xs.set(e,t))}}function ol(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var o=e.return,r=null;if(null===o&&3===e.tag)r=e.stateNode;else for(;null!==o;){if(n=o.alternate,o.childExpirationTime<t&&(o.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===o.return&&3===o.tag){r=o.stateNode;break}o=o.return}return null!==r&&(Fs===r&&(hl(t),Ns===Ts&&Kl(r,_s)),Zl(r,t)),r}function rl(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!zl(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function il(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=$r(sl.bind(null,e));else{var t=rl(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var o=el();if(1073741823===t?o=99:1===t||2===t?o=95:o=0>=(o=10*(1073741821-t)-10*(1073741821-o))?99:250>=o?98:5250>=o?97:95,null!==n){var r=e.callbackPriority;if(e.callbackExpirationTime===t&&r>=o)return;n!==Lr&&Or(n)}e.callbackExpirationTime=t,e.callbackPriority=o,t=1073741823===t?$r(sl.bind(null,e)):Hr(o,al.bind(null,e),{timeout:10*(1073741821-t)-Vr()}),e.callbackNode=t}}}function al(e,t){if(Qs=0,t)return Ul(e,t=el()),il(e),null;var n=rl(e);if(0!==n){if(t=e.callbackNode,0!=(48&Is))throw Error(a(327));if(El(),e===Fs&&n===_s||ul(e,n),null!==Ms){var o=Is;Is|=Cs;for(var r=pl();;)try{gl();break}catch(t){dl(e,t)}if(ri(),Is=o,xs.current=r,1===Ns)throw t=Rs,ul(e,n),Kl(e,n),il(e),t;if(null===Ms)switch(r=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,o=Ns,Fs=null,o){case Os:case 1:throw Error(a(345));case 2:Ul(e,2<n?2:n);break;case As:if(Kl(e,n),n===(o=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=bl(r)),1073741823===Ls&&10<(r=Zs+500-Vr())){if(Ks){var i=e.lastPingedTime;if(0===i||i>=n){e.lastPingedTime=n,ul(e,n);break}}if(0!==(i=rl(e))&&i!==n)break;if(0!==o&&o!==n){e.lastPingedTime=o;break}e.timeoutHandle=En(wl.bind(null,e),r);break}wl(e);break;case Ts:if(Kl(e,n),n===(o=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=bl(r)),Ks&&(0===(r=e.lastPingedTime)||r>=n)){e.lastPingedTime=n,ul(e,n);break}if(0!==(r=rl(e))&&r!==n)break;if(0!==o&&o!==n){e.lastPingedTime=o;break}if(1073741823!==Bs?o=10*(1073741821-Bs)-Vr():1073741823===Ls?o=0:(o=10*(1073741821-Ls)-5e3,0>(o=(r=Vr())-o)&&(o=0),(n=10*(1073741821-n)-r)<(o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Es(o/1960))-o)&&(o=n)),10<o){e.timeoutHandle=En(wl.bind(null,e),o);break}wl(e);break;case 5:if(1073741823!==Ls&&null!==js){i=Ls;var s=js;if(0>=(o=0|s.busyMinDurationMs)?o=0:(r=0|s.busyDelayMs,o=(i=Vr()-(10*(1073741821-i)-(0|s.timeoutMs||5e3)))<=r?0:r+o-i),10<o){Kl(e,n),e.timeoutHandle=En(wl.bind(null,e),o);break}}wl(e);break;default:throw Error(a(329))}if(il(e),e.callbackNode===t)return al.bind(null,e)}}return null}function sl(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&Is))throw Error(a(327));if(El(),e===Fs&&t===_s||ul(e,t),null!==Ms){var n=Is;Is|=Cs;for(var o=pl();;)try{ml();break}catch(t){dl(e,t)}if(ri(),Is=n,xs.current=o,1===Ns)throw n=Rs,ul(e,t),Kl(e,t),il(e),n;if(null!==Ms)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Fs=null,wl(e),il(e)}return null}function ll(e,t){var n=Is;Is|=1;try{return e(t)}finally{0===(Is=n)&&Xr()}}function cl(e,t){var n=Is;Is&=-2,Is|=8;try{return e(t)}finally{0===(Is=n)&&Xr()}}function ul(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,xn(n)),null!==Ms)for(n=Ms.return;null!==n;){var o=n;switch(o.tag){case 1:null!=(o=o.type.childContextTypes)&&Sr();break;case 3:Li(),fr(vr),fr(gr);break;case 5:ji(o);break;case 4:Li();break;case 13:case 19:fr(zi);break;case 10:ii(o)}n=n.return}Fs=e,Ms=_l(e.current,null),_s=t,Ns=Os,Rs=null,Bs=Ls=1073741823,js=null,zs=0,Ks=!1}function dl(e,t){for(;;){try{if(ri(),Ui.current=wa,$i)for(var n=Wi.memoizedState;null!==n;){var o=n.queue;null!==o&&(o.pending=null),n=n.next}if(Gi=0,Hi=qi=Wi=null,$i=!1,null===Ms||null===Ms.return)return Ns=1,Rs=t,Ms=null;e:{var r=e,i=Ms.return,a=Ms,s=t;if(t=_s,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var l=s;if(0==(2&a.mode)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.expirationTime=c.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var u=0!=(1&zi.current),d=i;do{var p;if(p=13===d.tag){var f=d.memoizedState;if(null!==f)p=null!==f.dehydrated;else{var h=d.memoizedProps;p=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!u)}}if(p){var m=d.updateQueue;if(null===m){var g=new Set;g.add(l),d.updateQueue=g}else m.add(l);if(0==(2&d.mode)){if(d.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var v=pi(1073741823,null);v.tag=2,fi(a,v)}a.expirationTime=1073741823;break e}s=void 0,a=t;var y=r.pingCache;if(null===y?(y=r.pingCache=new bs,s=new Set,y.set(l,s)):void 0===(s=y.get(l))&&(s=new Set,y.set(l,s)),!s.has(a)){s.add(a);var b=kl.bind(null,r,l,a);l.then(b,b)}d.effectTag|=4096,d.expirationTime=t;break e}d=d.return}while(null!==d);s=Error((ge(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+ve(a))}5!==Ns&&(Ns=2),s=ns(s,a),d=i;do{switch(d.tag){case 3:l=s,d.effectTag|=4096,d.expirationTime=t,hi(d,ws(d,l,t));break e;case 1:l=s;var w=d.type,S=d.stateNode;if(0==(64&d.effectTag)&&("function"==typeof w.getDerivedStateFromError||null!==S&&"function"==typeof S.componentDidCatch&&(null===Ws||!Ws.has(S)))){d.effectTag|=4096,d.expirationTime=t,hi(d,Ss(d,l,t));break e}}d=d.return}while(null!==d)}Ms=yl(Ms)}catch(e){t=e;continue}break}}function pl(){var e=xs.current;return xs.current=wa,null===e?wa:e}function fl(e,t){e<Ls&&2<e&&(Ls=e),null!==t&&e<Bs&&2<e&&(Bs=e,js=t)}function hl(e){e>zs&&(zs=e)}function ml(){for(;null!==Ms;)Ms=vl(Ms)}function gl(){for(;null!==Ms&&!Br();)Ms=vl(Ms)}function vl(e){var t=Ps(e.alternate,e,_s);return e.memoizedProps=e.pendingProps,null===t&&(t=yl(e)),Ds.current=null,t}function yl(e){Ms=e;do{var t=Ms.alternate;if(e=Ms.return,0==(2048&Ms.effectTag)){if(t=es(t,Ms,_s),1===_s||1!==Ms.childExpirationTime){for(var n=0,o=Ms.child;null!==o;){var r=o.expirationTime,i=o.childExpirationTime;r>n&&(n=r),i>n&&(n=i),o=o.sibling}Ms.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Ms.firstEffect),null!==Ms.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Ms.firstEffect),e.lastEffect=Ms.lastEffect),1<Ms.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=Ms:e.firstEffect=Ms,e.lastEffect=Ms))}else{if(null!==(t=ts(Ms)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=Ms.sibling))return t;Ms=e}while(null!==Ms);return Ns===Os&&(Ns=5),null}function bl(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function wl(e){var t=Gr();return qr(99,Sl.bind(null,e,t)),null}function Sl(e,t){do{El()}while(null!==Hs);if(0!=(48&Is))throw Error(a(327));var n=e.finishedWork,o=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var r=bl(n);if(e.firstPendingTime=r,o<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:o<=e.firstSuspendedTime&&(e.firstSuspendedTime=o-1),o<=e.lastPingedTime&&(e.lastPingedTime=0),o<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Fs&&(Ms=Fs=null,_s=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){var i=Is;Is|=ks,Ds.current=null,bn=qt;var s=mn();if(gn(s)){if("selectionStart"in s)var l={start:s.selectionStart,end:s.selectionEnd};else e:{var c=(l=(l=s.ownerDocument)&&l.defaultView||window).getSelection&&l.getSelection();if(c&&0!==c.rangeCount){l=c.anchorNode;var u=c.anchorOffset,d=c.focusNode;c=c.focusOffset;try{l.nodeType,d.nodeType}catch(e){l=null;break e}var p=0,f=-1,h=-1,m=0,g=0,v=s,y=null;t:for(;;){for(var b;v!==l||0!==u&&3!==v.nodeType||(f=p+u),v!==d||0!==c&&3!==v.nodeType||(h=p+c),3===v.nodeType&&(p+=v.nodeValue.length),null!==(b=v.firstChild);)y=v,v=b;for(;;){if(v===s)break t;if(y===l&&++m===u&&(f=p),y===d&&++g===c&&(h=p),null!==(b=v.nextSibling))break;y=(v=y).parentNode}v=b}l=-1===f||-1===h?null:{start:f,end:h}}else l=null}l=l||{start:0,end:0}}else l=null;wn={activeElementDetached:null,focusedElem:s,selectionRange:l},qt=!1,Us=r;do{try{Pl()}catch(e){if(null===Us)throw Error(a(330));Cl(Us,e),Us=Us.nextEffect}}while(null!==Us);Us=r;do{try{for(s=e,l=t;null!==Us;){var w=Us.effectTag;if(16&w&&Ke(Us.stateNode,""),128&w){var S=Us.alternate;if(null!==S){var P=S.ref;null!==P&&("function"==typeof P?P(null):P.current=null)}}switch(1038&w){case 2:fs(Us),Us.effectTag&=-3;break;case 6:fs(Us),Us.effectTag&=-3,vs(Us.alternate,Us);break;case 1024:Us.effectTag&=-1025;break;case 1028:Us.effectTag&=-1025,vs(Us.alternate,Us);break;case 4:vs(Us.alternate,Us);break;case 8:gs(s,u=Us,l),ds(u)}Us=Us.nextEffect}}catch(e){if(null===Us)throw Error(a(330));Cl(Us,e),Us=Us.nextEffect}}while(null!==Us);if(P=wn,S=mn(),w=P.focusedElem,l=P.selectionRange,S!==w&&w&&w.ownerDocument&&hn(w.ownerDocument.documentElement,w)){null!==l&&gn(w)&&(S=l.start,void 0===(P=l.end)&&(P=S),"selectionStart"in w?(w.selectionStart=S,w.selectionEnd=Math.min(P,w.value.length)):(P=(S=w.ownerDocument||document)&&S.defaultView||window).getSelection&&(P=P.getSelection(),u=w.textContent.length,s=Math.min(l.start,u),l=void 0===l.end?s:Math.min(l.end,u),!P.extend&&s>l&&(u=l,l=s,s=u),u=fn(w,s),d=fn(w,l),u&&d&&(1!==P.rangeCount||P.anchorNode!==u.node||P.anchorOffset!==u.offset||P.focusNode!==d.node||P.focusOffset!==d.offset)&&((S=S.createRange()).setStart(u.node,u.offset),P.removeAllRanges(),s>l?(P.addRange(S),P.extend(d.node,d.offset)):(S.setEnd(d.node,d.offset),P.addRange(S))))),S=[];for(P=w;P=P.parentNode;)1===P.nodeType&&S.push({element:P,left:P.scrollLeft,top:P.scrollTop});for("function"==typeof w.focus&&w.focus(),w=0;w<S.length;w++)(P=S[w]).element.scrollLeft=P.left,P.element.scrollTop=P.top}qt=!!bn,wn=bn=null,e.current=n,Us=r;do{try{for(w=e;null!==Us;){var E=Us.effectTag;if(36&E&&cs(w,Us.alternate,Us),128&E){S=void 0;var x=Us.ref;if(null!==x){var D=Us.stateNode;Us.tag,S=D,"function"==typeof x?x(S):x.current=S}}Us=Us.nextEffect}}catch(e){if(null===Us)throw Error(a(330));Cl(Us,e),Us=Us.nextEffect}}while(null!==Us);Us=null,jr(),Is=i}else e.current=n;if(qs)qs=!1,Hs=e,$s=t;else for(Us=r;null!==Us;)t=Us.nextEffect,Us.nextEffect=null,Us=t;if(0===(t=e.firstPendingTime)&&(Ws=null),1073741823===t?e===Js?Ys++:(Ys=0,Js=e):Ys=0,"function"==typeof Al&&Al(n.stateNode,o),il(e),Vs)throw Vs=!1,e=Gs,Gs=null,e;return 0!=(8&Is)||Xr(),null}function Pl(){for(;null!==Us;){var e=Us.effectTag;0!=(256&e)&&as(Us.alternate,Us),0==(512&e)||qs||(qs=!0,Hr(97,(function(){return El(),null}))),Us=Us.nextEffect}}function El(){if(90!==$s){var e=97<$s?97:$s;return $s=90,qr(e,xl)}}function xl(){if(null===Hs)return!1;var e=Hs;if(Hs=null,0!=(48&Is))throw Error(a(331));var t=Is;for(Is|=ks,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:ss(5,n),ls(5,n)}}catch(t){if(null===e)throw Error(a(330));Cl(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return Is=t,Xr(),!0}function Dl(e,t,n){fi(e,t=ws(e,t=ns(n,t),1073741823)),null!==(e=ol(e,1073741823))&&il(e)}function Cl(e,t){if(3===e.tag)Dl(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Dl(n,e,t);break}if(1===n.tag){var o=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof o.componentDidCatch&&(null===Ws||!Ws.has(o))){fi(n,e=Ss(n,e=ns(t,e),1073741823)),null!==(n=ol(n,1073741823))&&il(n);break}}n=n.return}}function kl(e,t,n){var o=e.pingCache;null!==o&&o.delete(t),Fs===e&&_s===n?Ns===Ts||Ns===As&&1073741823===Ls&&Vr()-Zs<500?ul(e,_s):Ks=!0:zl(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,il(e)))}function Ol(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(t=tl(t=el(),e,null)),null!==(e=ol(e,t))&&il(e)}Ps=function(e,t,n){var o=t.expirationTime;if(null!==e){var r=t.pendingProps;if(e.memoizedProps!==r||vr.current)_a=!0;else{if(o<n){switch(_a=!1,t.tag){case 3:Ua(t),Fa();break;case 5:if(Bi(t),4&t.mode&&1!==n&&r.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:wr(t.type)&&xr(t);break;case 4:Ri(t,t.stateNode.containerInfo);break;case 10:o=t.memoizedProps.value,r=t.type._context,hr(ei,r._currentValue),r._currentValue=o;break;case 13:if(null!==t.memoizedState)return 0!==(o=t.child.childExpirationTime)&&o>=n?Ha(e,t,n):(hr(zi,1&zi.current),null!==(t=Ja(e,t,n))?t.sibling:null);hr(zi,1&zi.current);break;case 19:if(o=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(o)return Ya(e,t,n);t.effectTag|=64}if(null!==(r=t.memoizedState)&&(r.rendering=null,r.tail=null),hr(zi,zi.current),!o)return null}return Ja(e,t,n)}_a=!1}}else _a=!1;switch(t.expirationTime=0,t.tag){case 2:if(o=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,r=br(t,gr.current),si(t,n),r=Ji(null,t,o,e,r,n),t.effectTag|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,wr(o)){var i=!0;xr(t)}else i=!1;t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,ui(t);var s=o.getDerivedStateFromProps;"function"==typeof s&&bi(t,o,s,e),r.updater=wi,t.stateNode=r,r._reactInternalFiber=t,xi(t,o,e,n),t=Za(null,t,o,!0,i,n)}else t.tag=0,Na(null,t,r,n),t=t.child;return t;case 16:e:{if(r=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(r),1!==r._status)throw r._result;switch(r=r._result,t.type=r,i=t.tag=function(e){if("function"==typeof e)return Ml(e)?1:0;if(null!=e){if((e=e.$$typeof)===le)return 11;if(e===de)return 14}return 2}(r),e=Qr(r,e),i){case 0:t=za(null,t,r,e,n);break e;case 1:t=Ka(null,t,r,e,n);break e;case 11:t=Ra(null,t,r,e,n);break e;case 14:t=La(null,t,r,Qr(r.type,e),o,n);break e}throw Error(a(306,r,""))}return t;case 0:return o=t.type,r=t.pendingProps,za(e,t,o,r=t.elementType===o?r:Qr(o,r),n);case 1:return o=t.type,r=t.pendingProps,Ka(e,t,o,r=t.elementType===o?r:Qr(o,r),n);case 3:if(Ua(t),o=t.updateQueue,null===e||null===o)throw Error(a(282));if(o=t.pendingProps,r=null!==(r=t.memoizedState)?r.element:null,di(e,t),mi(t,o,null,n),(o=t.memoizedState.element)===r)Fa(),t=Ja(e,t,n);else{if((r=t.stateNode.hydrate)&&(Da=Dn(t.stateNode.containerInfo.firstChild),xa=t,r=Ca=!0),r)for(n=Ti(t,null,o,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Na(e,t,o,n),Fa();t=t.child}return t;case 5:return Bi(t),null===e&&Aa(t),o=t.type,r=t.pendingProps,i=null!==e?e.memoizedProps:null,s=r.children,Pn(o,r)?s=null:null!==i&&Pn(o,i)&&(t.effectTag|=16),ja(e,t),4&t.mode&&1!==n&&r.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Na(e,t,s,n),t=t.child),t;case 6:return null===e&&Aa(t),null;case 13:return Ha(e,t,n);case 4:return Ri(t,t.stateNode.containerInfo),o=t.pendingProps,null===e?t.child=Ai(t,null,o,n):Na(e,t,o,n),t.child;case 11:return o=t.type,r=t.pendingProps,Ra(e,t,o,r=t.elementType===o?r:Qr(o,r),n);case 7:return Na(e,t,t.pendingProps,n),t.child;case 8:case 12:return Na(e,t,t.pendingProps.children,n),t.child;case 10:e:{o=t.type._context,r=t.pendingProps,s=t.memoizedProps,i=r.value;var l=t.type._context;if(hr(ei,l._currentValue),l._currentValue=i,null!==s)if(l=s.value,0===(i=Zo(l,i)?0:0|("function"==typeof o._calculateChangedBits?o._calculateChangedBits(l,i):1073741823))){if(s.children===r.children&&!vr.current){t=Ja(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.dependencies;if(null!==c){s=l.child;for(var u=c.firstContext;null!==u;){if(u.context===o&&0!=(u.observedBits&i)){1===l.tag&&((u=pi(n,null)).tag=2,fi(l,u)),l.expirationTime<n&&(l.expirationTime=n),null!==(u=l.alternate)&&u.expirationTime<n&&(u.expirationTime=n),ai(l.return,n),c.expirationTime<n&&(c.expirationTime=n);break}u=u.next}}else s=10===l.tag&&l.type===t.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===t){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}Na(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,o=(i=t.pendingProps).children,si(t,n),o=o(r=li(r,i.unstable_observedBits)),t.effectTag|=1,Na(e,t,o,n),t.child;case 14:return i=Qr(r=t.type,t.pendingProps),La(e,t,r,i=Qr(r.type,i),o,n);case 15:return Ba(e,t,t.type,t.pendingProps,o,n);case 17:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:Qr(o,r),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,wr(o)?(e=!0,xr(t)):e=!1,si(t,n),Pi(t,o,r),xi(t,o,r,n),Za(null,t,o,!0,e,n);case 19:return Ya(e,t,n)}throw Error(a(156,t.tag))};var Al=null,Tl=null;function Il(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Fl(e,t,n,o){return new Il(e,t,n,o)}function Ml(e){return!(!(e=e.prototype)||!e.isReactComponent)}function _l(e,t){var n=e.alternate;return null===n?((n=Fl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Nl(e,t,n,o,r,i){var s=2;if(o=e,"function"==typeof e)Ml(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case ne:return Rl(n.children,r,i,t);case se:s=8,r|=7;break;case oe:s=8,r|=1;break;case re:return(e=Fl(12,n,t,8|r)).elementType=re,e.type=re,e.expirationTime=i,e;case ce:return(e=Fl(13,n,t,r)).type=ce,e.elementType=ce,e.expirationTime=i,e;case ue:return(e=Fl(19,n,t,r)).elementType=ue,e.expirationTime=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ie:s=10;break e;case ae:s=9;break e;case le:s=11;break e;case de:s=14;break e;case pe:s=16,o=null;break e;case fe:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Fl(s,n,t,r)).elementType=e,t.type=o,t.expirationTime=i,t}function Rl(e,t,n,o){return(e=Fl(7,e,o,t)).expirationTime=n,e}function Ll(e,t,n){return(e=Fl(6,e,null,t)).expirationTime=n,e}function Bl(e,t,n){return(t=Fl(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jl(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function zl(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Kl(e,t){var n=e.firstSuspendedTime,o=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(o>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Zl(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Ul(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Vl(e,t,n,o){var r=t.current,i=el(),s=vi.suspense;i=tl(i,r,s);e:if(n){t:{if(et(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(wr(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(a(171))}if(1===n.tag){var c=n.type;if(wr(c)){n=Er(n,c,l);break e}}n=l}else n=mr;return null===t.context?t.context=n:t.pendingContext=n,(t=pi(i,s)).payload={element:e},null!==(o=void 0===o?null:o)&&(t.callback=o),fi(r,t),nl(r,i),i}function Gl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Wl(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function ql(e,t){Wl(e,t),(e=e.alternate)&&Wl(e,t)}function Hl(e,t,n){var o=new jl(e,t,n=null!=n&&!0===n.hydrate),r=Fl(3,null,null,2===t?7:1===t?3:0);o.current=r,r.stateNode=o,ui(r),e[Tn]=o.current,n&&0!==t&&function(e,t){var n=Qe(t);kt.forEach((function(e){mt(e,t,n)})),Ot.forEach((function(e){mt(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=o}function $l(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Xl(e,t,n,o,r){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"==typeof r){var s=r;r=function(){var e=Gl(a);s.call(e)}}Vl(t,a,e,r)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Hl(e,0,t?{hydrate:!0}:void 0)}(n,o),a=i._internalRoot,"function"==typeof r){var l=r;r=function(){var e=Gl(a);l.call(e)}}cl((function(){Vl(t,a,e,r)}))}return Gl(a)}function Yl(e,t,n){var o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==o?null:""+o,children:e,containerInfo:t,implementation:n}}function Jl(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!$l(t))throw Error(a(200));return Yl(e,t,null,n)}Hl.prototype.render=function(e){Vl(e,this._internalRoot,null,null)},Hl.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Vl(null,e,null,(function(){t[Tn]=null}))},gt=function(e){if(13===e.tag){var t=Jr(el(),150,100);nl(e,t),ql(e,t)}},vt=function(e){13===e.tag&&(nl(e,3),ql(e,3))},yt=function(e){if(13===e.tag){var t=el();nl(e,t=tl(t,e,null)),ql(e,t)}},O=function(e,t,n){switch(t){case"input":if(De(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var r=_n(o);if(!r)throw Error(a(90));Se(o),De(o,r)}}}break;case"textarea":Fe(e,n);break;case"select":null!=(t=n.value)&&Ae(e,!!n.multiple,t,!1)}},_=ll,N=function(e,t,n,o,r){var i=Is;Is|=4;try{return qr(98,e.bind(null,t,n,o,r))}finally{0===(Is=i)&&Xr()}},R=function(){0==(49&Is)&&(function(){if(null!==Xs){var e=Xs;Xs=null,e.forEach((function(e,t){Ul(t,e),il(t)})),Xr()}}(),El())},L=function(e,t){var n=Is;Is|=2;try{return e(t)}finally{0===(Is=n)&&Xr()}};var Ql={Events:[Fn,Mn,_n,C,E,Kn,function(e){it(e,zn)},F,M,Jt,lt,El,{current:!1}]};!function(e){var t=e.findFiberByHostInstance;(function(e){if(void 0==={isDisabled:!0})return!1;var t={isDisabled:!0};if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Al=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},Tl=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}})(r({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:X.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=ot(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:In,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ql,t.createPortal=Jl,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=ot(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!=(48&Is))throw Error(a(187));var n=Is;Is|=1;try{return qr(99,e.bind(null,t))}finally{Is=n,Xr()}},t.hydrate=function(e,t,n){if(!$l(t))throw Error(a(200));return Xl(null,e,t,!0,n)},t.render=function(e,t,n){if(!$l(t))throw Error(a(200));return Xl(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!$l(e))throw Error(a(40));return!!e._reactRootContainer&&(cl((function(){Xl(null,null,e,!1,(function(){e._reactRootContainer=null,e[Tn]=null}))})),!0)},t.unstable_batchedUpdates=ll,t.unstable_createPortal=function(e,t){return Jl(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,o){if(!$l(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return Xl(e,t,n,!1,o)},t.version="16.14.0"},73935:(e,t,n)=>{"use strict";!function e(){if(void 0!=={isDisabled:!0}&&"function"==typeof{isDisabled:!0}.checkDCE)try{({isDisabled:!0}).checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(64448)},75668:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraggableCore",{enumerable:!0,get:function(){return u.default}}),t.default=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==h(e)&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=o?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n(67294)),r=p(n(45697)),i=p(n(73935)),a=p(n(47980)),s=n(81825),l=n(2849),c=n(9280),u=p(n(80783)),d=p(n(55904));function p(e){return e&&e.__esModule?e:{default:e}}function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},m.apply(this,arguments)}function g(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function P(e,t,n){return t&&S(e.prototype,t),n&&S(e,n),e}function E(e,t){return E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},E(e,t)}function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=k(e);if(t){var r=k(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return D(this,n)}}function D(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?C(e):t}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)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}}),t&&E(e,t)}(n,e);var t=x(n);function n(e){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),O(C(o=t.call(this,e)),"onDragStart",(function(e,t){if((0,d.default)("Draggable: onDragStart: %j",t),!1===o.props.onStart(e,(0,l.createDraggableData)(C(o),t)))return!1;o.setState({dragging:!0,dragged:!0})})),O(C(o),"onDrag",(function(e,t){if(!o.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",t);var n=(0,l.createDraggableData)(C(o),t),r={x:n.x,y:n.y};if(o.props.bounds){var i=r.x,a=r.y;r.x+=o.state.slackX,r.y+=o.state.slackY;var s=v((0,l.getBoundPosition)(C(o),r.x,r.y),2),c=s[0],u=s[1];r.x=c,r.y=u,r.slackX=o.state.slackX+(i-r.x),r.slackY=o.state.slackY+(a-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-o.state.x,n.deltaY=r.y-o.state.y}if(!1===o.props.onDrag(e,n))return!1;o.setState(r)})),O(C(o),"onDragStop",(function(e,t){if(!o.state.dragging)return!1;if(!1===o.props.onStop(e,(0,l.createDraggableData)(C(o),t)))return!1;(0,d.default)("Draggable: onDragStop: %j",t);var n={dragging:!1,slackX:0,slackY:0};if(Boolean(o.props.position)){var r=o.props.position,i=r.x,a=r.y;n.x=i,n.y=a}o.setState(n)})),o.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:w({},e.position),slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),o}return P(n,null,[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.position,o=t.prevPropsPosition;return!n||o&&n.x===o.x&&n.y===o.y?null:((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:o}),{x:n.x,y:n.y,prevPropsPosition:w({},n)})}}]),P(n,[{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){return this.props.nodeRef?this.props.nodeRef.current:i.default.findDOMNode(this)}},{key:"render",value:function(){var e,t=this.props,n=(t.axis,t.bounds,t.children),r=t.defaultPosition,i=t.defaultClassName,c=t.defaultClassNameDragging,d=t.defaultClassNameDragged,p=t.position,f=t.positionOffset,h=(t.scale,g(t,["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"])),v={},y=null,b=!Boolean(p)||this.state.dragging,S=p||r,P={x:(0,l.canDragX)(this)&&b?this.state.x:S.x,y:(0,l.canDragY)(this)&&b?this.state.y:S.y};this.state.isElementSVG?y=(0,s.createSVGTransform)(P,f):v=(0,s.createCSSTransform)(P,f);var E=(0,a.default)(n.props.className||"",i,(O(e={},c,this.state.dragging),O(e,d,this.state.dragged),e));return o.createElement(u.default,m({},h,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),o.cloneElement(o.Children.only(n),{className:E,style:w(w({},n.props.style),v),transform:y}))}}]),n}(o.Component);t.default=A,O(A,"displayName","Draggable"),O(A,"propTypes",w(w({},u.default.propTypes),{},{axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe})),O(A,"defaultProps",w(w({},u.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},position:null,scale:1}))},80783:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==p(e)&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=o?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n(67294)),r=u(n(45697)),i=u(n(73935)),a=n(81825),s=n(2849),l=n(9280),c=u(n(55904));function u(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==s.return||s.return()}finally{if(r)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=S(e);if(t){var r=S(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return b(this,n)}}function b(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?w(e):t}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E={start:"touchstart",move:"touchmove",stop:"touchend"},x={start:"mousedown",move:"mousemove",stop:"mouseup"},D=x,C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)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}}),t&&v(e,t)}(u,e);var t,n,r,l=y(u);function u(){var e;m(this,u);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return P(w(e=l.call.apply(l,[this].concat(n))),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),P(w(e),"mounted",!1),P(w(e),"handleDragStart",(function(t){if(e.props.onMouseDown(t),!e.props.allowAnyClick&&"number"==typeof t.button&&0!==t.button)return!1;var n=e.findDOMNode();if(!n||!n.ownerDocument||!n.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var o=n.ownerDocument;if(!(e.props.disabled||!(t.target instanceof o.defaultView.Node)||e.props.handle&&!(0,a.matchesSelectorAndParentsTo)(t.target,e.props.handle,n)||e.props.cancel&&(0,a.matchesSelectorAndParentsTo)(t.target,e.props.cancel,n))){"touchstart"===t.type&&t.preventDefault();var r=(0,a.getTouchIdentifier)(t);e.setState({touchIdentifier:r});var i=(0,s.getControlPosition)(t,r,w(e));if(null!=i){var l=i.x,u=i.y,d=(0,s.createCoreData)(w(e),l,u);(0,c.default)("DraggableCore: handleDragStart: %j",d),(0,c.default)("calling",e.props.onStart),!1!==e.props.onStart(t,d)&&!1!==e.mounted&&(e.props.enableUserSelectHack&&(0,a.addUserSelectStyles)(o),e.setState({dragging:!0,lastX:l,lastY:u}),(0,a.addEvent)(o,D.move,e.handleDrag),(0,a.addEvent)(o,D.stop,e.handleDragStop))}}})),P(w(e),"handleDrag",(function(t){var n=(0,s.getControlPosition)(t,e.state.touchIdentifier,w(e));if(null!=n){var o=n.x,r=n.y;if(Array.isArray(e.props.grid)){var i=o-e.state.lastX,a=r-e.state.lastY,l=f((0,s.snapToGrid)(e.props.grid,i,a),2);if(i=l[0],a=l[1],!i&&!a)return;o=e.state.lastX+i,r=e.state.lastY+a}var u=(0,s.createCoreData)(w(e),o,r);if((0,c.default)("DraggableCore: handleDrag: %j",u),!1!==e.props.onDrag(t,u)&&!1!==e.mounted)e.setState({lastX:o,lastY:r});else try{e.handleDragStop(new MouseEvent("mouseup"))}catch(t){var d=document.createEvent("MouseEvents");d.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.handleDragStop(d)}}})),P(w(e),"handleDragStop",(function(t){if(e.state.dragging){var n=(0,s.getControlPosition)(t,e.state.touchIdentifier,w(e));if(null!=n){var o=n.x,r=n.y,i=(0,s.createCoreData)(w(e),o,r);if(!1===e.props.onStop(t,i)||!1===e.mounted)return!1;var l=e.findDOMNode();l&&e.props.enableUserSelectHack&&(0,a.removeUserSelectStyles)(l.ownerDocument),(0,c.default)("DraggableCore: handleDragStop: %j",i),e.setState({dragging:!1,lastX:NaN,lastY:NaN}),l&&((0,c.default)("DraggableCore: Removing handlers"),(0,a.removeEvent)(l.ownerDocument,D.move,e.handleDrag),(0,a.removeEvent)(l.ownerDocument,D.stop,e.handleDragStop))}}})),P(w(e),"onMouseDown",(function(t){return D=x,e.handleDragStart(t)})),P(w(e),"onMouseUp",(function(t){return D=x,e.handleDragStop(t)})),P(w(e),"onTouchStart",(function(t){return D=E,e.handleDragStart(t)})),P(w(e),"onTouchEnd",(function(t){return D=E,e.handleDragStop(t)})),e}return t=u,(n=[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.findDOMNode();e&&(0,a.addEvent)(e,E.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.findDOMNode();if(e){var t=e.ownerDocument;(0,a.removeEvent)(t,x.move,this.handleDrag),(0,a.removeEvent)(t,E.move,this.handleDrag),(0,a.removeEvent)(t,x.stop,this.handleDragStop),(0,a.removeEvent)(t,E.stop,this.handleDragStop),(0,a.removeEvent)(e,E.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,a.removeUserSelectStyles)(t)}}},{key:"findDOMNode",value:function(){return this.props.nodeRef?this.props.nodeRef.current:i.default.findDOMNode(this)}},{key:"render",value:function(){return o.cloneElement(o.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&g(t.prototype,n),r&&g(t,r),u}(o.Component);t.default=C,P(C,"displayName","DraggableCore"),P(C,"propTypes",{allowAnyClick:r.default.bool,disabled:r.default.bool,enableUserSelectHack:r.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:r.default.arrayOf(r.default.number),handle:r.default.string,cancel:r.default.string,nodeRef:r.default.object,onStart:r.default.func,onDrag:r.default.func,onStop:r.default.func,onMouseDown:r.default.func,scale:r.default.number,className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),P(C,"defaultProps",{allowAnyClick:!1,cancel:null,disabled:!1,enableUserSelectHack:!0,offsetParent:null,handle:null,grid:null,transform:null,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},61193:(e,t,n)=>{"use strict";var o=n(75668),r=o.default,i=o.DraggableCore;e.exports=r,e.exports.default=r,e.exports.DraggableCore=i},81825:(e,t,n)=>{"use strict";function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.matchesSelector=d,t.matchesSelectorAndParentsTo=function(e,t,n){var o=e;do{if(d(o,t))return!0;if(o===n)return!1;o=o.parentNode}while(o);return!1},t.addEvent=function(e,t,n,o){if(!e)return;var r=l({capture:!0},o);e.addEventListener?e.addEventListener(t,n,r):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},t.removeEvent=function(e,t,n,o){if(!e)return;var r=l({capture:!0},o);e.removeEventListener?e.removeEventListener(t,n,r):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},t.outerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,r.int)(n.borderTopWidth),t+=(0,r.int)(n.borderBottomWidth)},t.outerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,r.int)(n.borderLeftWidth),t+=(0,r.int)(n.borderRightWidth)},t.innerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,r.int)(n.paddingTop),t-=(0,r.int)(n.paddingBottom)},t.innerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,r.int)(n.paddingLeft),t-=(0,r.int)(n.paddingRight)},t.offsetXYFromParent=function(e,t,n){var o=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),r=(e.clientX+t.scrollLeft-o.left)/n,i=(e.clientY+t.scrollTop-o.top)/n;return{x:r,y:i}},t.createCSSTransform=function(e,t){var n=p(e,t,"px");return c({},(0,i.browserPrefixToKey)("transform",i.default),n)},t.createSVGTransform=function(e,t){return p(e,t,"")},t.getTranslation=p,t.getTouch=function(e,t){return e.targetTouches&&(0,r.findInArray)(e.targetTouches,(function(e){return t===e.identifier}))||e.changedTouches&&(0,r.findInArray)(e.changedTouches,(function(e){return t===e.identifier}))},t.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},t.addUserSelectStyles=function(e){if(!e)return;var t=e.getElementById("react-draggable-style-el");t||((t=e.createElement("style")).type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&f(e.body,"react-draggable-transparent-selection")},t.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&h(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{var t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}},t.addClassName=f,t.removeClassName=h;var r=n(9280),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(38650));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u="";function d(e,t){return u||(u=(0,r.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(t){return(0,r.isFunction)(e[t])}))),!!(0,r.isFunction)(e[u])&&e[u](t)}function p(e,t,n){var o=e.x,r=e.y,i="translate(".concat(o).concat(n,",").concat(r).concat(n,")");if(t){var a="".concat("string"==typeof t.x?t.x:t.x+n),s="".concat("string"==typeof t.y?t.y:t.y+n);i="translate(".concat(a,", ").concat(s,")")+i}return i}function f(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function h(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}},38650:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPrefix=o,t.browserPrefixToKey=r,t.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},t.default=void 0;var n=["Moz","Webkit","O","ms"];function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window||void 0===window.document)return"";var t=window.document.documentElement.style;if(e in t)return"";for(var o=0;o<n.length;o++)if(r(e,n[o])in t)return n[o];return""}function r(e,t){return t?"".concat(t).concat(function(e){for(var t="",n=!0,o=0;o<e.length;o++)n?(t+=e[o].toUpperCase(),n=!1):"-"===e[o]?n=!0:t+=e[o];return t}(e)):e}var i=o();t.default=i},55904:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){0}},2849:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBoundPosition=function(e,t,n){if(!e.props.bounds)return[t,n];var a=e.props.bounds;a="string"==typeof a?a:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(a);var s=i(e);if("string"==typeof a){var l,c=s.ownerDocument,u=c.defaultView;if(!((l="parent"===a?s.parentNode:c.querySelector(a))instanceof u.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');var d=u.getComputedStyle(s),p=u.getComputedStyle(l);a={left:-s.offsetLeft+(0,o.int)(p.paddingLeft)+(0,o.int)(d.marginLeft),top:-s.offsetTop+(0,o.int)(p.paddingTop)+(0,o.int)(d.marginTop),right:(0,r.innerWidth)(l)-(0,r.outerWidth)(s)-s.offsetLeft+(0,o.int)(p.paddingRight)-(0,o.int)(d.marginRight),bottom:(0,r.innerHeight)(l)-(0,r.outerHeight)(s)-s.offsetTop+(0,o.int)(p.paddingBottom)-(0,o.int)(d.marginBottom)}}(0,o.isNum)(a.right)&&(t=Math.min(t,a.right));(0,o.isNum)(a.bottom)&&(n=Math.min(n,a.bottom));(0,o.isNum)(a.left)&&(t=Math.max(t,a.left));(0,o.isNum)(a.top)&&(n=Math.max(n,a.top));return[t,n]},t.snapToGrid=function(e,t,n){var o=Math.round(t/e[0])*e[0],r=Math.round(n/e[1])*e[1];return[o,r]},t.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},t.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},t.getControlPosition=function(e,t,n){var o="number"==typeof t?(0,r.getTouch)(e,t):null;if("number"==typeof t&&!o)return null;var a=i(n),s=n.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,r.offsetXYFromParent)(o||e,s,n.props.scale)},t.createCoreData=function(e,t,n){var r=e.state,a=!(0,o.isNum)(r.lastX),s=i(e);return a?{node:s,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:s,deltaX:t-r.lastX,deltaY:n-r.lastY,lastX:r.lastX,lastY:r.lastY,x:t,y:n}},t.createDraggableData=function(e,t){var n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}};var o=n(9280),r=n(81825);function i(e){var t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}},9280:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findInArray=function(e,t){for(var n=0,o=e.length;n<o;n++)if(t.apply(t,[e[n],n,e]))return e[n]},t.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},t.isNum=function(e){return"number"==typeof e&&!isNaN(e)},t.int=function(e){return parseInt(e,10)},t.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))}},47980:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var s in n)o.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},38401:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withErrorBoundary=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(67294),i=s(r),a=s(n(13118));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=n(67294).babelPluginFlowReactPropTypes_proptype_ComponentType||n(45697).any,d=function(e){function t(){var e,n,o;l(this,t);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=o=c(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),o.state={error:null,info:null},c(o,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidCatch",value:function(e,t){var n=this.props.onError;if("function"==typeof n)try{n.call(this,e,t?t.componentStack:"")}catch(e){}this.setState({error:e,info:t})}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.FallbackComponent,o=this.state,r=o.error,a=o.info;return null!==r?i.default.createElement(n,{componentStack:a?a.componentStack:"",error:r}):t||null}}]),t}(r.Component);d.defaultProps={FallbackComponent:a.default},d.propTypes={error:"function"==typeof Error?n(45697).instanceOf(Error):n(45697).any,info:n(45697).shape({componentStack:n(45697).string.isRequired})},(t.withErrorBoundary=function(e,t,n){var o=function(o){return i.default.createElement(d,{FallbackComponent:t,onError:n},i.default.createElement(e,o))},r=e.displayName||e.name;return o.displayName=r?"WithErrorBoundary("+r+")":"WithErrorBoundary",o}).propTypes=u===n(45697).any?{}:u,t.default=d},13118:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n(67294),i=(o=r)&&o.__esModule?o:{default:o};var a=function(e,t){return e.toString()+"\n\nThis is located at:"+t},s=function(e){var t=e.componentStack,n=e.error;return i.default.createElement("div",{style:l,title:a(n,t)},i.default.createElement("svg",{style:c,viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid"},i.default.createElement("path",{d:"M20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,\n 12M22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,\n 12M15.5,8C16.3,8 17,8.7 17,9.5C17,10.3 16.3,11 15.5,11C14.7,11 14,10.3 14,\n 9.5C14,8.7 14.7,8 15.5,8M10,9.5C10,10.3 9.3,11 8.5,11C7.7,11 7,10.3 7,9.5C7,\n 8.7 7.7,8 8.5,8C9.3,8 10,8.7 10,9.5M12,14C13.75,14 15.29,14.72 16.19,\n 15.81L14.77,17.23C14.32,16.5 13.25,16 12,16C10.75,16 9.68,16.5 9.23,\n 17.23L7.81,15.81C8.71,14.72 10.25,14 12,14Z"})))};s.propTypes={componentStack:n(45697).string.isRequired,error:"function"==typeof Error?n(45697).instanceOf(Error).isRequired:n(45697).any.isRequired};var l={height:"100%",maxHeight:"100vh",width:"100%",maxWidth:"100vw",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",backgroundColor:"#C00",color:"#FFF",boxSizing:"border-box",cursor:"help"},c={fill:"currentColor",flex:"1 1 auto"};t.default=s},47859:(e,t,n)=>{"use strict";var o=a(n(13118)),r=n(38401),i=a(r);function a(e){return e&&e.__esModule?e:{default:e}}t.ZP=i.default,i.default,r.withErrorBoundary,o.default},69921:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,r=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function S(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case u:case d:case i:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case m:case l:return e;default:return t}}case r:return t}}}function P(e){return S(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=o,t.ForwardRef=p,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=r,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return P(e)||S(e)===u},t.isConcurrentMode=P,t.isContextConsumer=function(e){return S(e)===c},t.isContextProvider=function(e){return S(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return S(e)===p},t.isFragment=function(e){return S(e)===i},t.isLazy=function(e){return S(e)===g},t.isMemo=function(e){return S(e)===m},t.isPortal=function(e){return S(e)===r},t.isProfiler=function(e){return S(e)===s},t.isStrictMode=function(e){return S(e)===a},t.isSuspense=function(e){return S(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===v)},t.typeOf=S},59864:(e,t,n)=>{"use strict";e.exports=n(69921)},67665:(e,t,n)=>{"use strict";n.d(t,{P:()=>f,m:()=>h});var o=n(67294),r=n(73935),i=(0,o.createContext)(),a=i.Provider,s=i.Consumer,l=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},d=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},p=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},f=function(e){function t(){var e,n,r;l(this,t);for(var i=arguments.length,a=Array(i),s=0;s<i;s++)a[s]=arguments[s];return n=r=p(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.root=o.createRef(),r.host=o.createRef(),r.state={root:r.root.current,host:r.host.current},p(r,n)}return d(t,e),c(t,[{key:"componentDidMount",value:function(){this.setState({root:this.root.current,host:this.host.current})}},{key:"render",value:function(){return o.createElement(a,{value:this.state},o.createElement("div",{ref:this.root,style:{opacity:.9999999}},this.props.children),o.createElement("div",{ref:this.host,style:{opacity:.9999999}}))}}]),t}(o.Component),h=function(e){return o.createElement(s,null,(function(t){var n=t.host,r=t.root;return n&&r&&o.createElement(m,u({},e,{host:n,root:r}))}))},m=function(e){function t(){var e,n,o;l(this,t);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=o=p(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),o.state={container:null},p(o,n)}return d(t,e),c(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.host,n=e.index,o=e.onMount,r=e.root,i=t.ownerDocument.createElement("div"),a="number"==typeof n&&t.children[n];a?t.insertBefore(i,a):t.appendChild(i),this.setState({container:i},(function(){r&&o&&o(r)}))}},{key:"componentWillUnmount",value:function(){var e=this.state.container,t=this.props,n=t.root,o=t.host,r=t.onUnmount;n&&r&&r(n),o&&e&&o.removeChild(e)}},{key:"render",value:function(){var e=this.state.container;return e&&(0,r.createPortal)(this.props.children,e)}}]),t}(o.Component)},67366:(e,t,n)=>{"use strict";n.d(t,{zt:()=>j,dC:()=>i.unstable_batchedUpdates,$j:()=>B,wU:()=>F,I0:()=>U,v9:()=>m});var o=n(61688),r=n(52798),i=n(73935);let a=function(e){e()};const s=()=>a;var l=n(67294);const c=(0,l.createContext)(null);function u(){return(0,l.useContext)(c)}const d=()=>{throw new Error("uSES not initialized!")};let p=d;const f=(e,t)=>e===t;function h(e=c){const t=e===c?u:()=>(0,l.useContext)(e);return function(e,n=f){const{store:o,subscription:r,getServerState:i}=t(),a=p(r.addNestedSub,o.getState,i||o.getState,e,n);return(0,l.useDebugValue)(a),a}}const m=h();function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},g.apply(this,arguments)}function v(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}var y=n(8679),b=n.n(y),w=n(72973);const S=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function P(e,t,n,o,{areStatesEqual:r,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,l,c,u,d,p=!1;function f(p,f){const h=!i(f,l),m=!r(p,s,f,l);return s=p,l=f,h&&m?(c=e(s,l),t.dependsOnOwnProps&&(u=t(o,l)),d=n(c,u,l),d):h?(e.dependsOnOwnProps&&(c=e(s,l)),t.dependsOnOwnProps&&(u=t(o,l)),d=n(c,u,l),d):m?function(){const t=e(s,l),o=!a(t,c);return c=t,o&&(d=n(c,u,l)),d}():d}return function(r,i){return p?f(r,i):(s=r,l=i,c=e(s,l),u=t(o,l),d=n(c,u,l),p=!0,d)}}function E(e){return function(t){const n=e(t);function o(){return n}return o.dependsOnOwnProps=!1,o}}function x(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function D(e,t){return function(t,{displayName:n}){const o=function(e,t){return o.dependsOnOwnProps?o.mapToProps(e,t):o.mapToProps(e,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(t,n){o.mapToProps=e,o.dependsOnOwnProps=x(e);let r=o(t,n);return"function"==typeof r&&(o.mapToProps=r,o.dependsOnOwnProps=x(r),r=o(t,n)),r},o}}function C(e,t){return(n,o)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${o.wrappedComponentName}.`)}}function k(e,t,n){return g({},n,e,t)}const O={notify(){},get:()=>[]};function A(e,t){let n,o=O;function r(){a.onStateChange&&a.onStateChange()}function i(){n||(n=t?t.addNestedSub(r):e.subscribe(r),o=function(){const e=s();let t=null,n=null;return{clear(){t=null,n=null},notify(){e((()=>{let e=t;for(;e;)e.callback(),e=e.next}))},get(){let e=[],n=t;for(;n;)e.push(n),n=n.next;return e},subscribe(e){let o=!0,r=n={callback:e,next:null,prev:n};return r.prev?r.prev.next=r:t=r,function(){o&&null!==t&&(o=!1,r.next?r.next.prev=r.prev:n=r.prev,r.prev?r.prev.next=r.next:t=r.next)}}}}())}const a={addNestedSub:function(e){return i(),o.subscribe(e)},notifyNestedSubs:function(){o.notify()},handleChangeWrapper:r,isSubscribed:function(){return Boolean(n)},trySubscribe:i,tryUnsubscribe:function(){n&&(n(),n=void 0,o.clear(),o=O)},getListeners:()=>o};return a}const T=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?l.useLayoutEffect:l.useEffect;function I(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function F(e,t){if(I(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!I(e[n[o]],t[n[o]]))return!1;return!0}const M=["reactReduxForwardedRef"];let _=d;const N=[null,null];function R(e,t,n,o,r,i){e.current=o,n.current=!1,r.current&&(r.current=null,i())}function L(e,t){return e===t}const B=function(e,t,n,{pure:o,areStatesEqual:r=L,areOwnPropsEqual:i=F,areStatePropsEqual:a=F,areMergedPropsEqual:s=F,forwardRef:u=!1,context:d=c}={}){const p=d,f=function(e){return e?"function"==typeof e?D(e):C(e,"mapStateToProps"):E((()=>({})))}(e),h=function(e){return e&&"object"==typeof e?E((t=>function(e,t){const n={};for(const o in e){const r=e[o];"function"==typeof r&&(n[o]=(...e)=>t(r(...e)))}return n}(e,t))):e?"function"==typeof e?D(e):C(e,"mapDispatchToProps"):E((e=>({dispatch:e})))}(t),m=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:o}){let r,i=!1;return function(t,n,a){const s=e(t,n,a);return i?o(s,r)||(r=s):(i=!0,r=s),r}}}(e):C(e,"mergeProps"):()=>k}(n),y=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,o={shouldHandleStateChanges:y,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:f,initMapDispatchToProps:h,initMergeProps:m,areStatesEqual:r,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:s};function c(t){const[n,r,i]=(0,l.useMemo)((()=>{const{reactReduxForwardedRef:e}=t,n=v(t,M);return[t.context,e,n]}),[t]),a=(0,l.useMemo)((()=>n&&n.Consumer&&(0,w.isContextConsumer)(l.createElement(n.Consumer,null))?n:p),[n,p]),s=(0,l.useContext)(a),c=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),u=Boolean(s)&&Boolean(s.store);const d=c?t.store:s.store,f=u?s.getServerState:d.getState,h=(0,l.useMemo)((()=>function(e,t){let{initMapStateToProps:n,initMapDispatchToProps:o,initMergeProps:r}=t,i=v(t,S);return P(n(e,i),o(e,i),r(e,i),e,i)}(d.dispatch,o)),[d]),[m,b]=(0,l.useMemo)((()=>{if(!y)return N;const e=A(d,c?void 0:s.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[d,c,s]),E=(0,l.useMemo)((()=>c?s:g({},s,{subscription:m})),[c,s,m]),x=(0,l.useRef)(),D=(0,l.useRef)(i),C=(0,l.useRef)(),k=(0,l.useRef)(!1),O=((0,l.useRef)(!1),(0,l.useRef)(!1)),I=(0,l.useRef)();T((()=>(O.current=!0,()=>{O.current=!1})),[]);const F=(0,l.useMemo)((()=>()=>C.current&&i===D.current?C.current:h(d.getState(),i)),[d,i]),L=(0,l.useMemo)((()=>e=>m?function(e,t,n,o,r,i,a,s,l,c,u){if(!e)return()=>{};let d=!1,p=null;const f=()=>{if(d||!s.current)return;const e=t.getState();let n,f;try{n=o(e,r.current)}catch(e){f=e,p=e}f||(p=null),n===i.current?a.current||c():(i.current=n,l.current=n,a.current=!0,u())};return n.onStateChange=f,n.trySubscribe(),f(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}(y,d,m,h,D,x,k,O,C,b,e):()=>{}),[m]);var B,j,z;let K;B=R,j=[D,x,k,i,C,b],T((()=>B(...j)),z);try{K=_(L,F,f?()=>h(f(),i):F)}catch(e){throw I.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${I.current.stack}\n\n`),e}T((()=>{I.current=void 0,C.current=void 0,x.current=K}));const Z=(0,l.useMemo)((()=>l.createElement(e,g({},K,{ref:r}))),[r,e,K]);return(0,l.useMemo)((()=>y?l.createElement(a.Provider,{value:E},Z):Z),[a,Z,E])}const d=l.memo(c);if(d.WrappedComponent=e,d.displayName=c.displayName=n,u){const t=l.forwardRef((function(e,t){return l.createElement(d,g({},e,{reactReduxForwardedRef:t}))}));return t.displayName=n,t.WrappedComponent=e,b()(t,e)}return b()(d,e)}};const j=function({store:e,context:t,children:n,serverState:o}){const r=(0,l.useMemo)((()=>{const t=A(e);return{store:e,subscription:t,getServerState:o?()=>o:void 0}}),[e,o]),i=(0,l.useMemo)((()=>e.getState()),[e]);T((()=>{const{subscription:t}=r;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),i!==e.getState()&&t.notifyNestedSubs(),()=>{t.tryUnsubscribe(),t.onStateChange=void 0}}),[r,i]);const a=t||c;return l.createElement(a.Provider,{value:r},n)};function z(e=c){const t=e===c?u:()=>(0,l.useContext)(e);return function(){const{store:e}=t();return e}}const K=z();function Z(e=c){const t=e===c?K:z(e);return function(){return t().dispatch}}const U=Z();var V,G;V=r.useSyncExternalStoreWithSelector,p=V,(e=>{_=e})(o.useSyncExternalStore),G=i.unstable_batchedUpdates,a=G},88359:(e,t)=>{"use strict";var n,o=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case i:case s:case a:case p:case f:return e;default:switch(e=e&&e.$$typeof){case u:case c:case d:case m:case h:case l:return e;default:return t}}case r:return t}}}n=Symbol.for("react.module.reference"),t.isContextConsumer=function(e){return v(e)===c}},72973:(e,t,n)=>{"use strict";e.exports=n(88359)},81066:(e,t,n)=>{"use strict";n.d(t,{f:()=>z});var o=n(70655),r=n(67294),i="right-scroll-bar-position",a="width-before-scroll-bar";function s(e,t){return n=t||null,o=function(t){return e.forEach((function(e){return function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}(e,t)}))},(i=(0,r.useState)((function(){return{value:n,callback:o,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}}))[0]).callback=o,i.facade;var n,o,i}new WeakMap;new WeakMap;function l(e){return e}function c(e,t){void 0===t&&(t=l);var n=[],o=!1;return{read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var r=t(e,o);return n.push(r),function(){n=n.filter((function(e){return e!==r}))}},assignSyncMedium:function(e){for(o=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){o=!0;var t=[];if(n.length){var r=n;n=[],r.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}}}var u=function(e){var t=e.sideCar,n=(0,o._T)(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return r.createElement(i,(0,o.pi)({},n))};u.isSideCarExport=!0;var d,p=function(e){void 0===e&&(e={});var t=c(null);return t.options=(0,o.pi)({async:!0,ssr:!1},e),t}(),f=function(){},h=r.forwardRef((function(e,t){var n=r.useRef(null),i=r.useState({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:f}),a=i[0],l=i[1],c=e.forwardProps,u=e.children,d=e.className,h=e.removeScrollBar,m=e.enabled,g=e.shards,v=e.sideCar,y=e.noIsolation,b=e.inert,w=e.allowPinchZoom,S=e.as,P=void 0===S?"div":S,E=(0,o._T)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=v,D=s([n,t]),C=(0,o.pi)((0,o.pi)({},E),a);return r.createElement(r.Fragment,null,m&&r.createElement(x,{sideCar:p,removeScrollBar:h,shards:g,noIsolation:y,inert:b,setCallbacks:l,allowPinchZoom:!!w,lockRef:n}),c?r.cloneElement(r.Children.only(u),(0,o.pi)((0,o.pi)({},C),{ref:D})):r.createElement(P,(0,o.pi)({},C,{className:d,ref:D}),u))}));h.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},h.classNames={fullWidth:a,zeroRight:i};function m(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=d||n.nc;return t&&e.setAttribute("nonce",t),e}var g=function(){var e=0,t=null;return{add:function(n){var o,r;0==e&&(t=m())&&(r=n,(o=t).styleSheet?o.styleSheet.cssText=r:o.appendChild(document.createTextNode(r)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){!--e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},v=function(){var e,t=(e=g(),function(t,n){r.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,o=e.dynamic;return t(n,o),null}},y={left:0,top:0,right:0,gap:0},b=function(e){return parseInt(e||"",10)||0},w=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return y;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],o=t["padding"===e?"paddingTop":"marginTop"],r=t["padding"===e?"paddingRight":"marginRight"];return[b(n),b(o),b(r)]}(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},S=v(),P=function(e,t,n,o){var r=e.left,s=e.top,l=e.right,c=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(o,";\n padding-right: ").concat(c,"px ").concat(o,";\n }\n body {\n overflow: hidden ").concat(o,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(o,";"),"margin"===n&&"\n padding-left: ".concat(r,"px;\n padding-top: ").concat(s,"px;\n padding-right: ").concat(l,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(c,"px ").concat(o,";\n "),"padding"===n&&"padding-right: ".concat(c,"px ").concat(o,";")].filter(Boolean).join(""),"\n }\n \n .").concat(i," {\n right: ").concat(c,"px ").concat(o,";\n }\n \n .").concat(a," {\n margin-right: ").concat(c,"px ").concat(o,";\n }\n \n .").concat(i," .").concat(i," {\n right: 0 ").concat(o,";\n }\n \n .").concat(a," .").concat(a," {\n margin-right: 0 ").concat(o,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(c,"px;\n }\n")},E=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=void 0===o?"margin":o,a=r.useMemo((function(){return w(i)}),[i]);return r.createElement(S,{styles:P(a,!t,i,n?"":"!important")})},x=!1;if("undefined"!=typeof window)try{var D=Object.defineProperty({},"passive",{get:function(){return x=!0,!0}});window.addEventListener("test",D,D),window.removeEventListener("test",D,D)}catch(e){x=!1}var C=!!x&&{passive:!1},k=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},O=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),A(e,n)){var o=T(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},A=function(e,t){return"v"===e?function(e){return k(e,"overflowY")}(t):function(e){return k(e,"overflowX")}(t)},T=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},I=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},F=function(e){return[e.deltaX,e.deltaY]},M=function(e){return e&&"current"in e?e.current:e},_=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},N=0,R=[];const L=(B=function(e){var t=r.useRef([]),n=r.useRef([0,0]),i=r.useRef(),a=r.useState(N++)[0],s=r.useState((function(){return v()}))[0],l=r.useRef(e);r.useEffect((function(){l.current=e}),[e]),r.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=(0,o.ev)([e.lockRef.current],(e.shards||[]).map(M),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[e.inert,e.lockRef.current,e.shards]);var c=r.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!l.current.allowPinchZoom;var o,r=I(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-r[0],c="deltaY"in e?e.deltaY:a[1]-r[1],u=e.target,d=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var p=O(d,u);if(!p)return!0;if(p?o=d:(o="v"===d?"h":"v",p=O(d,u)),!p)return!1;if(!i.current&&"changedTouches"in e&&(s||c)&&(i.current=o),!o)return!0;var f=i.current||o;return function(e,t,n,o,r){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*o,s=n.target,l=t.contains(s),c=!1,u=a>0,d=0,p=0;do{var f=T(e,s),h=f[0],m=f[1]-f[2]-i*h;(h||m)&&A(e,s)&&(d+=m,p+=h),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(r&&0===d||!r&&a>d)||!u&&(r&&0===p||!r&&-a>p))&&(c=!0),c}(f,t,e,"h"===f?s:c,!0)}),[]),u=r.useCallback((function(e){var n=e;if(R.length&&R[R.length-1]===s){var o="deltaY"in n?F(n):I(n),r=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&(t=e.delta,r=o,t[0]===r[0]&&t[1]===r[1]);var t,r}))[0];if(r&&r.should)n.cancelable&&n.preventDefault();else if(!r){var i=(l.current.shards||[]).map(M).filter(Boolean).filter((function(e){return e.contains(n.target)}));(i.length>0?c(n,i[0]):!l.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),d=r.useCallback((function(e,n,o,r){var i={name:e,delta:n,target:o,should:r};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),p=r.useCallback((function(e){n.current=I(e),i.current=void 0}),[]),f=r.useCallback((function(t){d(t.type,F(t),t.target,c(t,e.lockRef.current))}),[]),h=r.useCallback((function(t){d(t.type,I(t),t.target,c(t,e.lockRef.current))}),[]);r.useEffect((function(){return R.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,C),document.addEventListener("touchmove",u,C),document.addEventListener("touchstart",p,C),function(){R=R.filter((function(e){return e!==s})),document.removeEventListener("wheel",u,C),document.removeEventListener("touchmove",u,C),document.removeEventListener("touchstart",p,C)}}),[]);var m=e.removeScrollBar,g=e.inert;return r.createElement(r.Fragment,null,g?r.createElement(s,{styles:_(a)}):null,m?r.createElement(E,{gapMode:"margin"}):null)},p.useMedium(B),u);var B,j=r.forwardRef((function(e,t){return r.createElement(h,(0,o.pi)({},e,{ref:t,sideCar:L}))}));j.classNames=h.classNames;const z=j},26353:(e,t,n)=>{"use strict";n.d(t,{Z:()=>S});var o=n(54337),r=n(73949),i=n(6531);n(45697);function a(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var s=n(67294),l=n(73935);const c=!1;var u=n(220),d="unmounted",p="exited",f="entering",h="entered",m="exiting",g=function(e){function t(t,n){var o;o=e.call(this,t,n)||this;var r,i=n&&!n.isMounting?t.enter:t.appear;return o.appearStatus=null,t.in?i?(r=p,o.appearStatus=f):r=h:r=t.unmountOnExit||t.mountOnEnter?d:p,o.state={status:r},o.nextCallback=null,o}(0,i.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===d?{status:p}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==f&&n!==h&&(t=f):n!==f&&n!==h||(t=m)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,o=this.props.timeout;return e=t=n=o,null!=o&&"number"!=typeof o&&(e=o.exit,t=o.enter,n=void 0!==o.appear?o.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===f?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===p&&this.setState({status:d})},n.performEnter=function(e){var t=this,n=this.props.enter,o=this.context?this.context.isMounting:e,r=this.props.nodeRef?[o]:[l.findDOMNode(this),o],i=r[0],a=r[1],s=this.getTimeouts(),u=o?s.appear:s.enter;!e&&!n||c?this.safeSetState({status:h},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:f},(function(){t.props.onEntering(i,a),t.onTransitionEnd(u,(function(){t.safeSetState({status:h},(function(){t.props.onEntered(i,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),o=this.props.nodeRef?void 0:l.findDOMNode(this);t&&!c?(this.props.onExit(o),this.safeSetState({status:m},(function(){e.props.onExiting(o),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:p},(function(){e.props.onExited(o)}))}))}))):this.safeSetState({status:p},(function(){e.props.onExited(o)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(o){n&&(n=!1,t.nextCallback=null,e(o))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:l.findDOMNode(this),o=null==e&&!this.props.addEndListener;if(n&&!o){if(this.props.addEndListener){var r=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=r[0],a=r[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===d)return null;var t=this.props,n=t.children,o=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,r.Z)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return s.createElement(u.Z.Provider,{value:null},"function"==typeof n?n(e,o):s.cloneElement(s.Children.only(n),o))},t}(s.Component);function v(){}g.contextType=u.Z,g.propTypes={},g.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:v,onEntering:v,onEntered:v,onExit:v,onExiting:v,onExited:v},g.UNMOUNTED=d,g.EXITED=p,g.ENTERING=f,g.ENTERED=h,g.EXITING=m;const y=g;var b=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return o=t,void((n=e).classList?n.classList.remove(o):"string"==typeof n.className?n.className=a(n.className,o):n.setAttribute("class",a(n.className&&n.className.baseVal||"",o)));var n,o}))},w=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=e.call.apply(e,[this].concat(o))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var o=t.resolveArguments(e,n),r=o[0],i=o[1];t.removeClasses(r,"exit"),t.addClass(r,i?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var o=t.resolveArguments(e,n),r=o[0],i=o[1]?"appear":"enter";t.addClass(r,i,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var o=t.resolveArguments(e,n),r=o[0],i=o[1]?"appear":"enter";t.removeClasses(r,i),t.addClass(r,i,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,o="string"==typeof n,r=o?""+(o&&n?n+"-":"")+e:n[e];return{baseClassName:r,activeClassName:o?r+"-active":n[e+"Active"],doneClassName:o?r+"-done":n[e+"Done"]}},t}(0,i.Z)(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var o=this.getClassNames(t)[n+"ClassName"],r=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&r&&(o+=" "+r),"active"===n&&e&&e.scrollTop,o&&(this.appliedClasses[t][n]=o,function(e,t){e&&t&&t.split(" ").forEach((function(t){return o=t,void((n=e).classList?n.classList.add(o):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,o)||("string"==typeof n.className?n.className=n.className+" "+o:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+o)));var n,o}))}(e,o))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],o=n.base,r=n.active,i=n.done;this.appliedClasses[t]={},o&&b(e,o),r&&b(e,r),i&&b(e,i)},n.render=function(){var e=this.props,t=(e.classNames,(0,r.Z)(e,["classNames"]));return s.createElement(y,(0,o.Z)({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(s.Component);w.defaultProps={classNames:""},w.propTypes={};const S=w},84013:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var o=n(73949),r=n(54337);var i=n(6531),a=(n(45697),n(67294)),s=n(220);function l(e,t){var n=Object.create(null);return e&&a.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,a.isValidElement)(e)?t(e):e}(e)})),n}function c(e,t,n){return null!=n[t]?n[t]:e.props[t]}function u(e,t,n){var o=l(e.children),r=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var o,r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(r[l])for(o=0;o<r[l].length;o++){var c=r[l][o];s[r[l][o]]=n(c)}s[l]=n(l)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}(t,o);return Object.keys(r).forEach((function(i){var s=r[i];if((0,a.isValidElement)(s)){var l=i in t,u=i in o,d=t[i],p=(0,a.isValidElement)(d)&&!d.props.in;!u||l&&!p?u||!l||p?u&&l&&(0,a.isValidElement)(d)&&(r[i]=(0,a.cloneElement)(s,{onExited:n.bind(null,s),in:d.props.in,exit:c(s,"exit",e),enter:c(s,"enter",e)})):r[i]=(0,a.cloneElement)(s,{in:!1}):r[i]=(0,a.cloneElement)(s,{onExited:n.bind(null,s),in:!0,exit:c(s,"exit",e),enter:c(s,"enter",e)})}})),r}var d=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},p=function(e){function t(t,n){var o,r=(o=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(o));return o.state={contextValue:{isMounting:!0},handleExited:r,firstRender:!0},o}(0,i.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,o,r=t.children,i=t.handleExited;return{children:t.firstRender?(n=e,o=i,l(n.children,(function(e){return(0,a.cloneElement)(e,{onExited:o.bind(null,e),in:!0,appear:c(e,"appear",n),enter:c(e,"enter",n),exit:c(e,"exit",n)})}))):u(e,r,i),firstRender:!1}},n.handleExited=function(e,t){var n=l(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=(0,r.Z)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=(0,o.Z)(e,["component","childFactory"]),i=this.state.contextValue,l=d(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a.createElement(s.Z.Provider,{value:i},l):a.createElement(s.Z.Provider,{value:i},a.createElement(t,r,l))},t}(a.Component);p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};const f=p},220:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});const o=n(67294).createContext(null)},54337:(e,t,n)=>{"use strict";function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(this,arguments)}n.d(t,{Z:()=>o})},6531:(e,t,n)=>{"use strict";function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)}n.d(t,{Z:()=>r})},73949:(e,t,n)=>{"use strict";function o(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}n.d(t,{Z:()=>o})},75251:(e,t,n)=>{"use strict";var o=n(67294),r=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;r=i("react.element"),i("react.fragment")}var a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var o,i={},c=null,u=null;for(o in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,o)&&!l.hasOwnProperty(o)&&(i[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===i[o]&&(i[o]=t[o]);return{$$typeof:r,type:e,key:c,ref:u,props:i,_owner:a.current}}t.jsx=c},72408:(e,t,n)=>{"use strict";var o=n(27418),r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,s=r?Symbol.for("react.fragment"):60107,l=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,d=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,g="function"==typeof Symbol&&Symbol.iterator;function v(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}function S(){}function P(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(v(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},S.prototype=w.prototype;var E=P.prototype=new S;E.constructor=P,o(E,w.prototype),E.isPureReactComponent=!0;var x={current:null},D=Object.prototype.hasOwnProperty,C={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,n){var o,r={},a=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)D.call(t,o)&&!C.hasOwnProperty(o)&&(r[o]=t[o]);var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];r.children=c}if(e&&e.defaultProps)for(o in l=e.defaultProps)void 0===r[o]&&(r[o]=l[o]);return{$$typeof:i,type:e,key:a,ref:s,props:r,_owner:x.current}}function O(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var A=/\/+/g,T=[];function I(e,t,n,o){if(T.length){var r=T.pop();return r.result=e,r.keyPrefix=t,r.func=n,r.context=o,r.count=0,r}return{result:e,keyPrefix:t,func:n,context:o,count:0}}function F(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>T.length&&T.push(e)}function M(e,t,n,o){var r=typeof e;"undefined"!==r&&"boolean"!==r||(e=null);var s=!1;if(null===e)s=!0;else switch(r){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case i:case a:s=!0}}if(s)return n(o,e,""===t?"."+N(e,0):t),1;if(s=0,t=""===t?".":t+":",Array.isArray(e))for(var l=0;l<e.length;l++){var c=t+N(r=e[l],l);s+=M(r,c,n,o)}else if(null===e||"object"!=typeof e?c=null:c="function"==typeof(c=g&&e[g]||e["@@iterator"])?c:null,"function"==typeof c)for(e=c.call(e),l=0;!(r=e.next()).done;)s+=M(r=r.value,c=t+N(r,l++),n,o);else if("object"===r)throw n=""+e,Error(v(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return s}function _(e,t,n){return null==e?0:M(e,"",t,n)}function N(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function R(e,t){e.func.call(e.context,t,e.count++)}function L(e,t,n){var o=e.result,r=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?B(e,o,n,(function(e){return e})):null!=e&&(O(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,r+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(A,"$&/")+"/")+n)),o.push(e))}function B(e,t,n,o,r){var i="";null!=n&&(i=(""+n).replace(A,"$&/")+"/"),_(e,L,t=I(t,i,o,r)),F(t)}var j={current:null};function z(){var e=j.current;if(null===e)throw Error(v(321));return e}var K={ReactCurrentDispatcher:j,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:x,IsSomeRendererActing:{current:!1},assign:o};t.Children={map:function(e,t,n){if(null==e)return e;var o=[];return B(e,o,null,t,n),o},forEach:function(e,t,n){if(null==e)return e;_(e,R,t=I(null,null,t,n)),F(t)},count:function(e){return _(e,(function(){return null}),null)},toArray:function(e){var t=[];return B(e,t,null,(function(e){return e})),t},only:function(e){if(!O(e))throw Error(v(143));return e}},t.Component=w,t.Fragment=s,t.Profiler=c,t.PureComponent=P,t.StrictMode=l,t.Suspense=f,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=K,t.cloneElement=function(e,t,n){if(null==e)throw Error(v(267,e));var r=o({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=x.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)D.call(t,u)&&!C.hasOwnProperty(u)&&(r[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)r.children=n;else if(1<u){c=Array(u);for(var d=0;d<u;d++)c[d]=arguments[d+2];r.children=c}return{$$typeof:i,type:e.type,key:a,ref:s,props:r,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:u,_context:e},e.Consumer=e},t.createElement=k,t.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:p,render:e}},t.isValidElement=O,t.lazy=function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return z().useCallback(e,t)},t.useContext=function(e,t){return z().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return z().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return z().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return z().useLayoutEffect(e,t)},t.useMemo=function(e,t){return z().useMemo(e,t)},t.useReducer=function(e,t,n){return z().useReducer(e,t,n)},t.useRef=function(e){return z().useRef(e)},t.useState=function(e){return z().useState(e)},t.version="16.14.0"},67294:(e,t,n)=>{"use strict";e.exports=n(72408)},85893:(e,t,n)=>{"use strict";e.exports=n(75251)},94500:function(e,t,n){!function(e){"use strict";function t(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function o(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function r(e,t,n){r.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:n,enumerable:!0})}function i(e,t){i.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function a(e,t){a.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function s(e,t,n){s.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:n,enumerable:!0})}function l(e,t,n){var o=e.slice((n||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,o),e}function c(e){var t=void 0===e?"undefined":T(e);return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object"}function u(e,t,n,o,d,p,f){f=f||[];var h=(d=d||[]).slice(0);if(void 0!==p){if(o){if("function"==typeof o&&o(h,p))return;if("object"===(void 0===o?"undefined":T(o))){if(o.prefilter&&o.prefilter(h,p))return;if(o.normalize){var m=o.normalize(h,p,e,t);m&&(e=m[0],t=m[1])}}}h.push(p)}"regexp"===c(e)&&"regexp"===c(t)&&(e=e.toString(),t=t.toString());var g=void 0===e?"undefined":T(e),v=void 0===t?"undefined":T(t),y="undefined"!==g||f&&f[f.length-1].lhs&&f[f.length-1].lhs.hasOwnProperty(p),b="undefined"!==v||f&&f[f.length-1].rhs&&f[f.length-1].rhs.hasOwnProperty(p);if(!y&&b)n(new i(h,t));else if(!b&&y)n(new a(h,e));else if(c(e)!==c(t))n(new r(h,e,t));else if("date"===c(e)&&e-t!=0)n(new r(h,e,t));else if("object"===g&&null!==e&&null!==t)if(f.filter((function(t){return t.lhs===e})).length)e!==t&&n(new r(h,e,t));else{if(f.push({lhs:e,rhs:t}),Array.isArray(e)){var w;for(e.length,w=0;w<e.length;w++)w>=t.length?n(new s(h,w,new a(void 0,e[w]))):u(e[w],t[w],n,o,h,w,f);for(;w<t.length;)n(new s(h,w,new i(void 0,t[w++])))}else{var S=Object.keys(e),P=Object.keys(t);S.forEach((function(r,i){var a=P.indexOf(r);a>=0?(u(e[r],t[r],n,o,h,r,f),P=l(P,a)):u(e[r],void 0,n,o,h,r,f)})),P.forEach((function(e){u(void 0,t[e],n,o,h,e,f)}))}f.length=f.length-1}else e!==t&&("number"===g&&isNaN(e)&&isNaN(t)||n(new r(h,e,t)))}function d(e,t,n,o){return o=o||[],u(e,t,(function(e){e&&o.push(e)}),n),o.length?o:void 0}function p(e,t,n){if(n.path&&n.path.length){var o,r=e[t],i=n.path.length-1;for(o=0;o<i;o++)r=r[n.path[o]];switch(n.kind){case"A":p(r[n.path[o]],n.index,n.item);break;case"D":delete r[n.path[o]];break;case"E":case"N":r[n.path[o]]=n.rhs}}else switch(n.kind){case"A":p(e[t],n.index,n.item);break;case"D":e=l(e,t);break;case"E":case"N":e[t]=n.rhs}return e}function f(e,t,n){if(e&&t&&n&&n.kind){for(var o=e,r=-1,i=n.path?n.path.length-1:0;++r<i;)void 0===o[n.path[r]]&&(o[n.path[r]]="number"==typeof n.path[r]?[]:{}),o=o[n.path[r]];switch(n.kind){case"A":p(n.path?o[n.path[r]]:o,n.index,n.item);break;case"D":delete o[n.path[r]];break;case"E":case"N":o[n.path[r]]=n.rhs}}}function h(e,t,n){if(n.path&&n.path.length){var o,r=e[t],i=n.path.length-1;for(o=0;o<i;o++)r=r[n.path[o]];switch(n.kind){case"A":h(r[n.path[o]],n.index,n.item);break;case"D":case"E":r[n.path[o]]=n.lhs;break;case"N":delete r[n.path[o]]}}else switch(n.kind){case"A":h(e[t],n.index,n.item);break;case"D":case"E":e[t]=n.lhs;break;case"N":e=l(e,t)}return e}function m(e,t,n){if(e&&t&&n&&n.kind){var o,r,i=e;for(r=n.path.length-1,o=0;o<r;o++)void 0===i[n.path[o]]&&(i[n.path[o]]={}),i=i[n.path[o]];switch(n.kind){case"A":h(i[n.path[o]],n.index,n.item);break;case"D":case"E":i[n.path[o]]=n.lhs;break;case"N":delete i[n.path[o]]}}}function g(e,t,n){e&&t&&u(e,t,(function(o){n&&!n(e,t,o)||f(e,t,o)}))}function v(e){return"color: "+M[e].color+"; font-weight: bold"}function y(e){var t=e.kind,n=e.path,o=e.lhs,r=e.rhs,i=e.index,a=e.item;switch(t){case"E":return[n.join("."),o,"→",r];case"N":return[n.join("."),r];case"D":return[n.join(".")];case"A":return[n.join(".")+"["+i+"]",a];default:return[]}}function b(e,t,n,o){var r=d(e,t);try{o?n.groupCollapsed("diff"):n.group("diff")}catch(e){n.log("diff")}r?r.forEach((function(e){var t=e.kind,o=y(e);n.log.apply(n,["%c "+M[t].text,v(t)].concat(I(o)))})):n.log("—— no diff ——");try{n.groupEnd()}catch(e){n.log("—— diff end —— ")}}function w(e,t,n,o){switch(void 0===e?"undefined":T(e)){case"object":return"function"==typeof e[o]?e[o].apply(e,I(n)):e[o];case"function":return e(t);default:return e}}function S(e){var t=e.timestamp,n=e.duration;return function(e,o,r){var i=["action"];return i.push("%c"+String(e.type)),t&&i.push("%c@ "+o),n&&i.push("%c(in "+r.toFixed(2)+" ms)"),i.join(" ")}}function P(e,t){var n=t.logger,o=t.actionTransformer,r=t.titleFormatter,i=void 0===r?S(t):r,a=t.collapsed,s=t.colors,l=t.level,c=t.diff,u=void 0===t.titleFormatter;e.forEach((function(r,d){var p=r.started,f=r.startedTime,h=r.action,m=r.prevState,g=r.error,v=r.took,y=r.nextState,S=e[d+1];S&&(y=S.prevState,v=S.started-p);var P=o(h),E="function"==typeof a?a((function(){return y}),h,r):a,x=O(f),D=s.title?"color: "+s.title(P)+";":"",C=["color: gray; font-weight: lighter;"];C.push(D),t.timestamp&&C.push("color: gray; font-weight: lighter;"),t.duration&&C.push("color: gray; font-weight: lighter;");var k=i(P,x,v);try{E?s.title&&u?n.groupCollapsed.apply(n,["%c "+k].concat(C)):n.groupCollapsed(k):s.title&&u?n.group.apply(n,["%c "+k].concat(C)):n.group(k)}catch(e){n.log(k)}var A=w(l,P,[m],"prevState"),T=w(l,P,[P],"action"),I=w(l,P,[g,m],"error"),F=w(l,P,[y],"nextState");if(A)if(s.prevState){var M="color: "+s.prevState(m)+"; font-weight: bold";n[A]("%c prev state",M,m)}else n[A]("prev state",m);if(T)if(s.action){var _="color: "+s.action(P)+"; font-weight: bold";n[T]("%c action ",_,P)}else n[T]("action ",P);if(g&&I)if(s.error){var N="color: "+s.error(g,m)+"; font-weight: bold;";n[I]("%c error ",N,g)}else n[I]("error ",g);if(F)if(s.nextState){var R="color: "+s.nextState(y)+"; font-weight: bold";n[F]("%c next state",R,y)}else n[F]("next state",y);c&&b(m,y,n,E);try{n.groupEnd()}catch(e){n.log("—— log end ——")}}))}function E(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},_,e),n=t.logger,o=t.stateTransformer,r=t.errorTransformer,i=t.predicate,a=t.logErrors,s=t.diffPredicate;if(void 0===n)return function(){return function(e){return function(t){return e(t)}}};if(e.getState&&e.dispatch)return console.error("[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:\n// Logger with default options\nimport { logger } from 'redux-logger'\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n// Or you can create your own logger with custom options http://bit.ly/redux-logger-options\nimport createLogger from 'redux-logger'\nconst logger = createLogger({\n // ...options\n});\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n"),function(){return function(e){return function(t){return e(t)}}};var l=[];return function(e){var n=e.getState;return function(e){return function(c){if("function"==typeof i&&!i(n,c))return e(c);var u={};l.push(u),u.started=A.now(),u.startedTime=new Date,u.prevState=o(n()),u.action=c;var d=void 0;if(a)try{d=e(c)}catch(e){u.error=r(e)}else d=e(c);u.took=A.now()-u.started,u.nextState=o(n());var p=t.diff&&"function"==typeof s?s(n,c):t.diff;if(P(l,Object.assign({},t,{diff:p})),l.length=0,u.error)throw u.error;return d}}}}var x,D,C=function(e,t){return new Array(t+1).join(e)},k=function(e,t){return C("0",t-e.toString().length)+e},O=function(e){return k(e.getHours(),2)+":"+k(e.getMinutes(),2)+":"+k(e.getSeconds(),2)+"."+k(e.getMilliseconds(),3)},A="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance:Date,T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},F=[];x="object"===(void 0===n.g?"undefined":T(n.g))&&n.g?n.g:"undefined"!=typeof window?window:{},(D=x.DeepDiff)&&F.push((function(){void 0!==D&&x.DeepDiff===d&&(x.DeepDiff=D,D=void 0)})),t(r,o),t(i,o),t(a,o),t(s,o),Object.defineProperties(d,{diff:{value:d,enumerable:!0},observableDiff:{value:u,enumerable:!0},applyDiff:{value:g,enumerable:!0},applyChange:{value:f,enumerable:!0},revertChange:{value:m,enumerable:!0},isConflict:{value:function(){return void 0!==D},enumerable:!0},noConflict:{value:function(){return F&&(F.forEach((function(e){e()})),F=null),d},enumerable:!0}});var M={E:{color:"#2196F3",text:"CHANGED:"},N:{color:"#4CAF50",text:"ADDED:"},D:{color:"#F44336",text:"DELETED:"},A:{color:"#2196F3",text:"ARRAY:"}},_={level:"log",logger:console,logErrors:!0,collapsed:void 0,predicate:void 0,duration:!1,timestamp:!0,stateTransformer:function(e){return e},actionTransformer:function(e){return e},errorTransformer:function(e){return e},colors:{title:function(){return"inherit"},prevState:function(){return"#9E9E9E"},action:function(){return"#03A9F4"},nextState:function(){return"#4CAF50"},error:function(){return"#F20404"}},diff:!1,diffPredicate:void 0,transformer:void 0},N=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.dispatch,n=e.getState;return"function"==typeof t||"function"==typeof n?E()({dispatch:t,getState:n}):void console.error("\n[redux-logger v3] BREAKING CHANGE\n[redux-logger v3] Since 3.0.0 redux-logger exports by default logger with default settings.\n[redux-logger v3] Change\n[redux-logger v3] import createLogger from 'redux-logger'\n[redux-logger v3] to\n[redux-logger v3] import { createLogger } from 'redux-logger'\n")};e.defaults=_,e.createLogger=E,e.logger=N,e.default=N,Object.defineProperty(e,"__esModule",{value:!0})}(t)},40230:(e,t,n)=>{"use strict";function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}n.d(t,{md:()=>m,DE:()=>f,MT:()=>d});var s="function"==typeof Symbol&&Symbol.observable||"@@observable",l=function(){return Math.random().toString(36).substring(7).split("").join(".")},c={INIT:"@@redux/INIT"+l(),REPLACE:"@@redux/REPLACE"+l(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+l()}};function u(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function d(e,t,n){var o;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(a(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(a(1));return n(d)(e,t)}if("function"!=typeof e)throw new Error(a(2));var r=e,i=t,l=[],p=l,f=!1;function h(){p===l&&(p=l.slice())}function m(){if(f)throw new Error(a(3));return i}function g(e){if("function"!=typeof e)throw new Error(a(4));if(f)throw new Error(a(5));var t=!0;return h(),p.push(e),function(){if(t){if(f)throw new Error(a(6));t=!1,h();var n=p.indexOf(e);p.splice(n,1),l=null}}}function v(e){if(!u(e))throw new Error(a(7));if(void 0===e.type)throw new Error(a(8));if(f)throw new Error(a(9));try{f=!0,i=r(i,e)}finally{f=!1}for(var t=l=p,n=0;n<t.length;n++){(0,t[n])()}return e}function y(e){if("function"!=typeof e)throw new Error(a(10));r=e,v({type:c.REPLACE})}function b(){var e,t=g;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(a(11));function n(){e.next&&e.next(m())}return n(),{unsubscribe:t(n)}}})[s]=function(){return this},e}return v({type:c.INIT}),(o={dispatch:v,subscribe:g,getState:m,replaceReducer:y})[s]=b,o}function p(e,t){return function(){return t(e.apply(this,arguments))}}function f(e,t){if("function"==typeof e)return p(e,t);if("object"!=typeof e||null===e)throw new Error(a(16));var n={};for(var o in e){var r=e[o];"function"==typeof r&&(n[o]=p(r,t))}return n}function h(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),o=function(){throw new Error(a(15))},r={getState:n.getState,dispatch:function(){return o.apply(void 0,arguments)}},s=t.map((function(e){return e(r)}));return o=h.apply(void 0,s)(n.dispatch),i(i({},n),{},{dispatch:o})}}}},60053:(e,t)=>{"use strict";var n,o,r,i,a;if("undefined"==typeof window||"function"!=typeof MessageChannel){var s=null,l=null,c=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(e){throw setTimeout(c,0),e}},u=Date.now();t.unstable_now=function(){return Date.now()-u},n=function(e){null!==s?setTimeout(n,0,e):(s=e,setTimeout(c,0))},o=function(e,t){l=setTimeout(e,t)},r=function(){clearTimeout(l)},i=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var d=window.performance,p=window.Date,f=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var m=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof d&&"function"==typeof d.now)t.unstable_now=function(){return d.now()};else{var g=p.now();t.unstable_now=function(){return p.now()-g}}var v=!1,y=null,b=-1,w=5,S=0;i=function(){return t.unstable_now()>=S},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):w=0<e?Math.floor(1e3/e):5};var P=new MessageChannel,E=P.port2;P.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();S=e+w;try{y(!0,e)?E.postMessage(null):(v=!1,y=null)}catch(e){throw E.postMessage(null),e}}else v=!1},n=function(e){y=e,v||(v=!0,E.postMessage(null))},o=function(e,n){b=f((function(){e(t.unstable_now())}),n)},r=function(){h(b),b=-1}}function x(e,t){var n=e.length;e.push(t);e:for(;;){var o=n-1>>>1,r=e[o];if(!(void 0!==r&&0<k(r,t)))break e;e[o]=t,e[n]=r,n=o}}function D(e){return void 0===(e=e[0])?null:e}function C(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var o=0,r=e.length;o<r;){var i=2*(o+1)-1,a=e[i],s=i+1,l=e[s];if(void 0!==a&&0>k(a,n))void 0!==l&&0>k(l,a)?(e[o]=l,e[s]=n,o=s):(e[o]=a,e[i]=n,o=i);else{if(!(void 0!==l&&0>k(l,n)))break e;e[o]=l,e[s]=n,o=s}}}return t}return null}function k(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var O=[],A=[],T=1,I=null,F=3,M=!1,_=!1,N=!1;function R(e){for(var t=D(A);null!==t;){if(null===t.callback)C(A);else{if(!(t.startTime<=e))break;C(A),t.sortIndex=t.expirationTime,x(O,t)}t=D(A)}}function L(e){if(N=!1,R(e),!_)if(null!==D(O))_=!0,n(B);else{var t=D(A);null!==t&&o(L,t.startTime-e)}}function B(e,n){_=!1,N&&(N=!1,r()),M=!0;var a=F;try{for(R(n),I=D(O);null!==I&&(!(I.expirationTime>n)||e&&!i());){var s=I.callback;if(null!==s){I.callback=null,F=I.priorityLevel;var l=s(I.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?I.callback=l:I===D(O)&&C(O),R(n)}else C(O);I=D(O)}if(null!==I)var c=!0;else{var u=D(A);null!==u&&o(L,u.startTime-n),c=!1}return c}finally{I=null,F=a,M=!1}}function j(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var z=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){_||M||(_=!0,n(B))},t.unstable_getCurrentPriorityLevel=function(){return F},t.unstable_getFirstCallbackNode=function(){return D(O)},t.unstable_next=function(e){switch(F){case 1:case 2:case 3:var t=3;break;default:t=F}var n=F;F=t;try{return e()}finally{F=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=z,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=F;F=e;try{return t()}finally{F=n}},t.unstable_scheduleCallback=function(e,i,a){var s=t.unstable_now();if("object"==typeof a&&null!==a){var l=a.delay;l="number"==typeof l&&0<l?s+l:s,a="number"==typeof a.timeout?a.timeout:j(e)}else a=j(e),l=s;return e={id:T++,callback:i,priorityLevel:e,startTime:l,expirationTime:a=l+a,sortIndex:-1},l>s?(e.sortIndex=l,x(A,e),null===D(O)&&e===D(A)&&(N?r():N=!0,o(L,l-s))):(e.sortIndex=a,x(O,e),_||M||(_=!0,n(B))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();R(e);var n=D(O);return n!==I&&null!==I&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<I.expirationTime||i()},t.unstable_wrapCallback=function(e){var t=F;return function(){var n=F;F=t;try{return e.apply(this,arguments)}finally{F=n}}}},63840:(e,t,n)=>{"use strict";e.exports=n(60053)},74305:(e,t,n)=>{"use strict";n.d(t,{CX:()=>sn,F3:()=>at,mH:()=>gn,BU:()=>Pn});var o=n(6907),r=n.n(o),i=n(23279),a=n.n(i),s=n(23493),l=n.n(s),c=n(67294);function u(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function d(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function p(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return d(n.overflowY,t)||d(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function f(e,t,n,o,r,i,a,s){return i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-o:a>t&&s<n||i<e&&s>n?a-t+r:0}var h=function(e,t){var n=window,o=t.scrollMode,r=t.block,i=t.inline,a=t.boundary,s=t.skipOverflowHiddenElements,l="function"==typeof a?a:function(e){return e!==a};if(!u(e))throw new TypeError("Invalid target");for(var c,d,h=document.scrollingElement||document.documentElement,m=[],g=e;u(g)&&l(g);){if((g=null==(d=(c=g).parentElement)?c.getRootNode().host||null:d)===h){m.push(g);break}null!=g&&g===document.body&&p(g)&&!p(document.documentElement)||null!=g&&p(g,s)&&m.push(g)}for(var v=n.visualViewport?n.visualViewport.width:innerWidth,y=n.visualViewport?n.visualViewport.height:innerHeight,b=window.scrollX||pageXOffset,w=window.scrollY||pageYOffset,S=e.getBoundingClientRect(),P=S.height,E=S.width,x=S.top,D=S.right,C=S.bottom,k=S.left,O="start"===r||"nearest"===r?x:"end"===r?C:x+P/2,A="center"===i?k+E/2:"end"===i?D:k,T=[],I=0;I<m.length;I++){var F=m[I],M=F.getBoundingClientRect(),_=M.height,N=M.width,R=M.top,L=M.right,B=M.bottom,j=M.left;if("if-needed"===o&&x>=0&&k>=0&&C<=y&&D<=v&&x>=R&&C<=B&&k>=j&&D<=L)return T;var z=getComputedStyle(F),K=parseInt(z.borderLeftWidth,10),Z=parseInt(z.borderTopWidth,10),U=parseInt(z.borderRightWidth,10),V=parseInt(z.borderBottomWidth,10),G=0,W=0,q="offsetWidth"in F?F.offsetWidth-F.clientWidth-K-U:0,H="offsetHeight"in F?F.offsetHeight-F.clientHeight-Z-V:0,$="offsetWidth"in F?0===F.offsetWidth?0:N/F.offsetWidth:0,X="offsetHeight"in F?0===F.offsetHeight?0:_/F.offsetHeight:0;if(h===F)G="start"===r?O:"end"===r?O-y:"nearest"===r?f(w,w+y,y,Z,V,w+O,w+O+P,P):O-y/2,W="start"===i?A:"center"===i?A-v/2:"end"===i?A-v:f(b,b+v,v,K,U,b+A,b+A+E,E),G=Math.max(0,G+w),W=Math.max(0,W+b);else{G="start"===r?O-R-Z:"end"===r?O-B+V+H:"nearest"===r?f(R,B,_,Z,V+H,O,O+P,P):O-(R+_/2)+H/2,W="start"===i?A-j-K:"center"===i?A-(j+N/2)+q/2:"end"===i?A-L+U+q:f(j,L,N,K,U+q,A,A+E,E);var Y=F.scrollLeft,J=F.scrollTop;O+=J-(G=Math.max(0,Math.min(J+G/X,F.scrollHeight-_/X+H))),A+=Y-(W=Math.max(0,Math.min(Y+W/$,F.scrollWidth-N/$+q)))}T.push({el:F,top:G,left:W})}return T};function m(e){return e===Object(e)&&0!==Object.keys(e).length}const g=function(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(m(t)&&"function"==typeof t.behavior)return t.behavior(n?h(e,t):[]);if(n){var o=function(e){return!1===e?{block:"end",inline:"nearest"}:m(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var o=e.el,r=e.top,i=e.left;o.scroll&&n?o.scroll({top:r,left:i,behavior:t}):(o.scrollTop=r,o.scrollLeft=i)}))}(h(e,o),o.behavior)}};var v,y=n(42308),b=[],w="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(v||(v={}));var S,P=function(e){return Object.freeze(e)},E=function(e,t){this.inlineSize=e,this.blockSize=t,P(this)},x=function(){function e(e,t,n,o){return this.x=e,this.y=t,this.width=n,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,P(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),D=function(e){return e instanceof SVGElement&&"getBBox"in e},C=function(e){if(D(e)){var t=e.getBBox(),n=t.width,o=t.height;return!n&&!o}var r=e,i=r.offsetWidth,a=r.offsetHeight;return!(i||a||e.getClientRects().length)},k=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},O="undefined"!=typeof window?window:{},A=new WeakMap,T=/auto|scroll/,I=/^tb|vertical/,F=/msie|trident/i.test(O.navigator&&O.navigator.userAgent),M=function(e){return parseFloat(e||"0")},_=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new E((n?t:e)||0,(n?e:t)||0)},N=P({devicePixelContentBoxSize:_(),borderBoxSize:_(),contentBoxSize:_(),contentRect:new x(0,0,0,0)}),R=function(e,t){if(void 0===t&&(t=!1),A.has(e)&&!t)return A.get(e);if(C(e))return A.set(e,N),N;var n=getComputedStyle(e),o=D(e)&&e.ownerSVGElement&&e.getBBox(),r=!F&&"border-box"===n.boxSizing,i=I.test(n.writingMode||""),a=!o&&T.test(n.overflowY||""),s=!o&&T.test(n.overflowX||""),l=o?0:M(n.paddingTop),c=o?0:M(n.paddingRight),u=o?0:M(n.paddingBottom),d=o?0:M(n.paddingLeft),p=o?0:M(n.borderTopWidth),f=o?0:M(n.borderRightWidth),h=o?0:M(n.borderBottomWidth),m=d+c,g=l+u,v=(o?0:M(n.borderLeftWidth))+f,y=p+h,b=s?e.offsetHeight-y-e.clientHeight:0,w=a?e.offsetWidth-v-e.clientWidth:0,S=r?m+v:0,E=r?g+y:0,k=o?o.width:M(n.width)-S-w,O=o?o.height:M(n.height)-E-b,R=k+m+w+v,L=O+g+b+y,B=P({devicePixelContentBoxSize:_(Math.round(k*devicePixelRatio),Math.round(O*devicePixelRatio),i),borderBoxSize:_(R,L,i),contentBoxSize:_(k,O,i),contentRect:new x(d,l,k,O)});return A.set(e,B),B},L=function(e,t,n){var o=R(e,n),r=o.borderBoxSize,i=o.contentBoxSize,a=o.devicePixelContentBoxSize;switch(t){case v.DEVICE_PIXEL_CONTENT_BOX:return a;case v.BORDER_BOX:return r;default:return i}},B=function(e){var t=R(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=P([t.borderBoxSize]),this.contentBoxSize=P([t.contentBoxSize]),this.devicePixelContentBoxSize=P([t.devicePixelContentBoxSize])},j=function(e){if(C(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},z=function(){var e=1/0,t=[];b.forEach((function(n){if(0!==n.activeTargets.length){var o=[];n.activeTargets.forEach((function(t){var n=new B(t.target),r=j(t.target);o.push(n),t.lastReportedSize=L(t.target,t.observedBox),r<e&&(e=r)})),t.push((function(){n.callback.call(n.observer,o,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,o=t;n<o.length;n++){(0,o[n])()}return e},K=function(e){b.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(j(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},Z=function(){var e,t=0;for(K(t);b.some((function(e){return e.activeTargets.length>0}));)t=z(),K(t);return b.some((function(e){return e.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:w}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=w),window.dispatchEvent(e)),t>0},U=[],V=function(e){if(!S){var t=0,n=document.createTextNode("");new MutationObserver((function(){return U.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),S=function(){n.textContent="".concat(t?t--:t++)}}U.push(e),S()},G=0,W={attributes:!0,characterData:!0,childList:!0,subtree:!0},q=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],H=function(e){return void 0===e&&(e=0),Date.now()+e},$=!1,X=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!$){$=!0;var n,o=H(e);n=function(){var n=!1;try{n=Z()}finally{if($=!1,e=o-H(),!G)return;n?t.run(1e3):e>0?t.run(e):t.start()}},V((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,W)};document.body?t():O.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),q.forEach((function(t){return O.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),q.forEach((function(t){return O.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Y=function(e){!G&&e>0&&X.start(),!(G+=e)&&X.stop()},J=function(){function e(e,t){this.target=e,this.observedBox=t||v.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=L(this.target,this.observedBox,!0);return e=this.target,D(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),Q=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},ee=new WeakMap,te=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},ne=function(){function e(){}return e.connect=function(e,t){var n=new Q(e,t);ee.set(e,n)},e.observe=function(e,t,n){var o=ee.get(e),r=0===o.observationTargets.length;te(o.observationTargets,t)<0&&(r&&b.push(o),o.observationTargets.push(new J(t,n&&n.box)),Y(1),X.schedule())},e.unobserve=function(e,t){var n=ee.get(e),o=te(n.observationTargets,t),r=1===n.observationTargets.length;o>=0&&(r&&b.splice(b.indexOf(n),1),n.observationTargets.splice(o,1),Y(-1))},e.disconnect=function(e){var t=this,n=ee.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),oe=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ne.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!k(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ne.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!k(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ne.unobserve(this,e)},e.prototype.disconnect=function(){ne.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}(),re=n(18156),ie=n(73935);function ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function se(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var le=0;class ce{constructor(){this.id="".concat(le++)}}var ue=new WeakMap,de=new WeakMap,pe=new WeakMap,fe=new WeakMap,he=new WeakMap,me=new WeakMap,ge=new WeakMap,ve=new WeakMap,ye=new WeakMap,be=new WeakMap,we=new WeakMap,Se=new WeakMap,Pe=new WeakMap,Ee=new WeakMap,xe=new WeakMap,De=new WeakMap,Ce=new WeakMap,ke=new WeakMap,Oe=new WeakMap,Ae=new WeakMap,Te=new WeakMap,Ie=Symbol("placeholder"),Fe=Symbol("mark-placeholder"),Me=globalThis.Text,_e=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,Ne=e=>Re(e)&&1===e.nodeType,Re=e=>{var t=_e(e);return!!t&&e instanceof t.Node},Le=e=>{var t=e&&e.anchorNode&&_e(e.anchorNode);return!!t&&e instanceof t.Selection},Be=e=>Re(e)&&3===e.nodeType,je=(e,t,n)=>{for(var o,{childNodes:r}=e,i=r[t],a=t,s=!1,l=!1;(Re(o=i)&&8===o.nodeType||Ne(i)&&0===i.childNodes.length||Ne(i)&&"false"===i.getAttribute("contenteditable"))&&(!s||!l);)a>=r.length?(s=!0,a=t-1,n="backward"):a<0?(l=!0,a=t+1,n="forward"):(i=r[a],t=a,a+="forward"===n?1:-1);return[i,t]},ze=(e,t,n)=>{var[o]=je(e,t,n);return o},Ke=e=>{var t="";if(Be(e)&&e.nodeValue)return e.nodeValue;if(Ne(e)){for(var n of Array.from(e.childNodes))t+=Ke(n);var o=getComputedStyle(e).getPropertyValue("display");"block"!==o&&"list"!==o&&"BR"!==e.tagName||(t+="\n")}return t},Ze=/data-slate-fragment="(.+?)"/m,Ue=e=>{var t=e.getData("text/html"),[,n]=t.match(Ze)||[];return n},Ve=(e,t,n)=>{var{target:o}=t;if(Ne(o)&&o.matches('[contentEditable="false"]'))return!1;var{document:r}=at.getWindow(e);if(r.contains(o))return at.hasDOMNode(e,o,{editable:!0});var i=n.find((e=>{var{addedNodes:t,removedNodes:n}=e;for(var r of t)if(r===o||r.contains(o))return!0;for(var i of n)if(i===o||i.contains(o))return!0}));return!(!i||i===t)&&Ve(e,i,n)},Ge=parseInt(c.version.split(".")[0],10)>=17,We="undefined"!=typeof navigator&&"undefined"!=typeof window&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,qe="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),He="undefined"!=typeof navigator&&/Android/.test(navigator.userAgent),$e="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Xe="undefined"!=typeof navigator&&/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),Ye="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Je="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),Qe="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),et=He&&"undefined"!=typeof navigator&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),tt="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),nt="undefined"!=typeof navigator&&/.*UCBrowser/.test(navigator.userAgent),ot="undefined"!=typeof navigator&&/.*Wechat/.test(navigator.userAgent),rt=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),it=(!Qe||!et)&&!Ye&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,at={isComposing:e=>!!Se.get(e),getWindow(e){var t=pe.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey(e,t){var n=ve.get(t);return n||(n=new ce,ve.set(t,n)),n},findPath(e,t){for(var n=[],o=t;;){var r=de.get(o);if(null==r){if(y.ML.isEditor(o))return n;break}var i=ue.get(o);if(null==i)break;n.unshift(i),o=r}throw new Error("Unable to find the path for Slate node: ".concat(y.o4.stringify(t)))},findDocumentOrShadowRoot(e){var t=at.toDOMNode(e,e),n=t.getRootNode();return(n instanceof Document||n instanceof ShadowRoot)&&null!=n.getSelection?n:t.ownerDocument},isFocused:e=>!!we.get(e),isReadOnly:e=>!!be.get(e),blur(e){var t=at.toDOMNode(e,e),n=at.findDocumentOrShadowRoot(e);we.set(e,!1),n.activeElement===t&&t.blur()},focus(e){var t=at.toDOMNode(e,e),n=at.findDocumentOrShadowRoot(e);we.set(e,!0),n.activeElement!==t&&t.focus({preventScroll:!0})},deselect(e){var{selection:t}=e,n=at.findDocumentOrShadowRoot(e).getSelection();n&&n.rangeCount>0&&n.removeAllRanges(),t&&y.YR.deselect(e)},hasDOMNode(e,t){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{editable:r=!1}=o,i=at.toDOMNode(e,e);try{n=Ne(t)?t:t.parentElement}catch(e){if(!e.message.includes('Permission denied to access property "nodeType"'))throw e}return!!n&&!(n.closest("[data-slate-editor]")!==i||r&&!n.isContentEditable&&("boolean"!=typeof n.isContentEditable||n.closest('[contenteditable="false"]')!==i)&&!n.getAttribute("data-slate-zero-width"))},insertData(e,t){e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),setFragmentData(e,t,n){e.setFragmentData(t,n)},toDOMNode(e,t){var n=ye.get(e),o=y.ML.isEditor(t)?fe.get(e):null==n?void 0:n.get(at.findKey(e,t));if(!o)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(y.o4.stringify(t)));return o},toDOMPoint(e,t){var n,[o]=y.ML.node(e,t.path),r=at.toDOMNode(e,o);y.ML.void(e,{at:t})&&(t={path:t.path,offset:0});for(var i=Array.from(r.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),a=0,s=0;s<i.length;s++){var l=i[s],c=l.childNodes[0];if(null!=c&&null!=c.textContent){var{length:u}=c.textContent,d=l.getAttribute("data-slate-length"),p=a+(null==d?u:parseInt(d,10)),f=i[s+1];if(t.offset===p&&null!=f&&f.hasAttribute("data-slate-mark-placeholder")){var h,m=f.childNodes[0];n=[m instanceof Me?m:f,null!==(h=f.textContent)&&void 0!==h&&h.startsWith("\ufeff")?1:0];break}if(t.offset<=p){n=[c,Math.min(u,Math.max(0,t.offset-a))];break}a=p}}if(!n)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(y.o4.stringify(t)));return n},toDOMRange(e,t){var{anchor:n,focus:o}=t,r=y.e6.isBackward(t),i=at.toDOMPoint(e,n),a=y.e6.isCollapsed(t)?i:at.toDOMPoint(e,o),s=at.getWindow(e).document.createRange(),[l,c]=r?a:i,[u,d]=r?i:a,p=!!(Ne(l)?l:l.parentElement).getAttribute("data-slate-zero-width"),f=!!(Ne(u)?u:u.parentElement).getAttribute("data-slate-zero-width");return s.setStart(l,p?1:c),s.setEnd(u,f?1:d),s},toSlateNode(e,t){var n=Ne(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var o=n?me.get(n):null;if(!o)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return o},findEventRange(e,t){"nativeEvent"in t&&(t=t.nativeEvent);var{clientX:n,clientY:o,target:r}=t;if(null==n||null==o)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var i,a=at.toSlateNode(e,t.target),s=at.findPath(e,a);if(y.W_.isElement(a)&&y.ML.isVoid(e,a)){var l=r.getBoundingClientRect(),c=e.isInline(a)?n-l.left<l.left+l.width-n:o-l.top<l.top+l.height-o,u=y.ML.point(e,s,{edge:c?"start":"end"}),d=c?y.ML.before(e,u):y.ML.after(e,u);if(d)return y.ML.range(e,d)}var{document:p}=at.getWindow(e);if(p.caretRangeFromPoint)i=p.caretRangeFromPoint(n,o);else{var f=p.caretPositionFromPoint(n,o);f&&((i=p.createRange()).setStart(f.offsetNode,f.offset),i.setEnd(f.offsetNode,f.offset))}if(!i)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));return at.toSlateRange(e,i,{exactMatch:!1,suppressThrow:!1})},toSlatePoint(e,t,n){var{exactMatch:o,suppressThrow:r}=n,[i,a]=o?t:(e=>{var[t,n]=e;if(Ne(t)&&t.childNodes.length){var o=n===t.childNodes.length,r=o?n-1:n;for([t,r]=je(t,r,o?"backward":"forward"),o=r<n;Ne(t)&&t.childNodes.length;){var i=o?t.childNodes.length-1:0;t=ze(t,i,o?"backward":"forward")}n=o&&null!=t.textContent?t.textContent.length:0}return[t,n]})(t),s=i.parentNode,l=null,c=0;if(s){var u,d,p=at.toDOMNode(e,e),f=s.closest('[data-slate-void="true"]'),h=f&&p.contains(f)?f:null,m=s.closest("[data-slate-leaf]"),g=null;if(m){if(l=m.closest('[data-slate-node="text"]')){var v=at.getWindow(e).document.createRange();v.setStart(l,0),v.setEnd(i,a);var b=v.cloneContents();[...Array.prototype.slice.call(b.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(b.querySelectorAll("[contenteditable=false]"))].forEach((e=>{He&&!o&&e.hasAttribute("data-slate-zero-width")&&e.textContent.length>0&&"\ufeff"!==e.textContext?e.textContent.startsWith("\ufeff")&&(e.textContent=e.textContent.slice(1)):e.parentNode.removeChild(e)})),c=b.textContent.length,g=l}}else if(h){for(var w=h.querySelectorAll("[data-slate-leaf]"),S=0;S<w.length;S++){var P=w[S];if(at.hasDOMNode(e,P)){m=P;break}}m?(l=m.closest('[data-slate-node="text"]'),c=(g=m).textContent.length,g.querySelectorAll("[data-slate-zero-width]").forEach((e=>{c-=e.textContent.length}))):c=1}g&&c===g.textContent.length&&He&&"z"===g.getAttribute("data-slate-zero-width")&&null!==(u=g.textContent)&&void 0!==u&&u.startsWith("\ufeff")&&(s.hasAttribute("data-slate-zero-width")||$e&&null!==(d=g.textContent)&&void 0!==d&&d.endsWith("\n\n"))&&c--}if(He&&!l&&!o){var E=s.hasAttribute("data-slate-node")?s:s.closest("[data-slate-node]");if(E&&at.hasDOMNode(e,E,{editable:!0})){var x=at.toSlateNode(e,E),{path:D,offset:C}=y.ML.start(e,at.findPath(e,x));return E.querySelector("[data-slate-leaf]")||(C=a),{path:D,offset:C}}}if(!l){if(r)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var k=at.toSlateNode(e,l);return{path:at.findPath(e,k),offset:c}},toSlateRange(e,t,n){var o,r,i,a,s,{exactMatch:l,suppressThrow:c}=n;if((Le(t)?t.anchorNode:t.startContainer)&&(Le(t)?(o=t.anchorNode,r=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=Je&&(e=>{for(var t=e&&e.parentNode;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1})(o)?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(o=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,s=t.collapsed)),null==o||null==i||null==r||null==a)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));var u=at.toSlatePoint(e,[o,r],{exactMatch:l,suppressThrow:c});if(!u)return null;var d=s?u:at.toSlatePoint(e,[i,a],{exactMatch:l,suppressThrow:c});if(!d)return null;if($e&&!s&&o!==i){var p=y.ML.isEnd(e,u,u.path),f=y.ML.isStart(e,d,d.path);if(p)u=y.ML.after(e,u)||u;if(f)d=y.ML.before(e,d)||d}var h={anchor:u,focus:d};return y.e6.isExpanded(h)&&y.e6.isForward(h)&&Ne(i)&&y.ML.void(e,{at:h.focus,mode:"highest"})&&(h=y.ML.unhangRange(e,h,{voids:!0})),h},hasRange(e,t){var{anchor:n,focus:o}=t;return y.ML.hasPath(e,n.path)&&y.ML.hasPath(e,o.path)},hasTarget:(e,t)=>Re(t)&&at.hasDOMNode(e,t),hasEditableTarget:(e,t)=>Re(t)&&at.hasDOMNode(e,t,{editable:!0}),hasSelectableTarget:(e,t)=>at.hasEditableTarget(e,t)||at.isTargetInsideNonReadonlyVoid(e,t),isTargetInsideNonReadonlyVoid(e,t){if(be.get(e))return!1;var n=at.hasTarget(e,t)&&at.toSlateNode(e,t);return y.W_.isElement(n)&&y.ML.isVoid(e,n)},androidScheduleFlush(e){var t;null===(t=xe.get(e))||void 0===t||t()},androidPendingDiffs:e=>ke.get(e)},st=["anchor","focus"],lt=["anchor","focus"],ct=(e,t)=>{var n,o,r=se(e,st),i=se(t,lt);return e[Ie]===t[Ie]&&(n=r,o=i,Object.keys(n).length===Object.keys(o).length&&Object.keys(n).every((e=>o.hasOwnProperty(e)&&n[e]===o[e])))},ut=rt?c.useLayoutEffect:c.useEffect,dt=e=>{var{isLast:t,leaf:n,parent:o,text:r}=e,i=gt(),a=at.findPath(i,r),s=y.y$.parent(a),l=!0===n[Fe];return i.isVoid(o)?c.createElement(ht,{length:y.NB.string(o).length}):""!==n.text||o.children[o.children.length-1]!==r||i.isInline(o)||""!==y.ML.string(i,s)?""===n.text?c.createElement(ht,{isMarkPlaceholder:l}):t&&"\n"===n.text.slice(-1)?c.createElement(pt,{isTrailing:!0,text:n.text}):c.createElement(pt,{text:n.text}):c.createElement(ht,{isLineBreak:!0,isMarkPlaceholder:l})},pt=e=>{var{text:t,isTrailing:n=!1}=e,o=(0,c.useRef)(null),r=()=>"".concat(null!=t?t:"").concat(n?"\n":""),[i]=(0,c.useState)(r);return ut((()=>{var e=r();o.current&&o.current.textContent!==e&&(o.current.textContent=e)})),c.createElement(ft,{ref:o},i)},ft=(0,c.memo)((0,c.forwardRef)(((e,t)=>c.createElement("span",{"data-slate-string":!0,ref:t},e.children)))),ht=e=>{var{length:t=0,isLineBreak:n=!1,isMarkPlaceholder:o=!1}=e,r={"data-slate-zero-width":n?"n":"z","data-slate-length":t};return o&&(r["data-slate-mark-placeholder"]=!0),c.createElement("span",Object.assign({},r),He&&n?null:"\ufeff",n?c.createElement("br",null):null)},mt=(0,c.createContext)(null),gt=()=>{var e=(0,c.useContext)(mt);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},vt=e=>{var{leaf:t,isLast:n,text:o,parent:r,renderPlaceholder:i,renderLeaf:a=(e=>c.createElement(bt,Object.assign({},e)))}=e,s=(0,c.useRef)(null),l=(0,c.useRef)(null),u=gt(),d=(0,c.useRef)(null);(0,c.useEffect)((()=>()=>{d.current&&d.current.disconnect()}),[]),(0,c.useEffect)((()=>{var e=null==l?void 0:l.current;if(e?he.set(u,e):he.delete(u),d.current)d.current.disconnect(),e&&d.current.observe(e);else if(e){var t=window.ResizeObserver||oe;d.current=new t((()=>{var e=Te.get(u);null==e||e()})),d.current.observe(e)}if(!e&&s.current){var n=Te.get(u);null==n||n()}return s.current=l.current,()=>{he.delete(u)}}),[l,t]);var p=c.createElement(dt,{isLast:n,leaf:t,parent:r,text:o});if(t[Ie]){var f={children:t.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none"},contentEditable:!1,ref:l}};p=c.createElement(c.Fragment,null,i(f),p)}return a({attributes:{"data-slate-leaf":!0},children:p,leaf:t,text:o})},yt=c.memo(vt,((e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&y.xv.equals(t.leaf,e.leaf)&&t.leaf[Ie]===e.leaf[Ie])),bt=e=>{var{attributes:t,children:n}=e;return c.createElement("span",Object.assign({},t),n)},wt=e=>{for(var{decorations:t,isLast:n,parent:o,renderPlaceholder:r,renderLeaf:i,text:a}=e,s=gt(),l=(0,c.useRef)(null),u=y.xv.decorations(a,t),d=at.findKey(s,a),p=[],f=0;f<u.length;f++){var h=u[f];p.push(c.createElement(yt,{isLast:n&&f===u.length-1,key:"".concat(d.id,"-").concat(f),renderPlaceholder:r,leaf:h,text:a,parent:o,renderLeaf:i}))}var m=(0,c.useCallback)((e=>{var t=ye.get(s);e?(null==t||t.set(d,e),ge.set(a,e),me.set(e,a)):(null==t||t.delete(d),ge.delete(a),l.current&&me.delete(l.current)),l.current=e}),[l,s,d,a]);return c.createElement("span",{"data-slate-node":"text",ref:m},p)},St=c.memo(wt,((e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&((e,t)=>{if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var o=e[n],r=t[n];if(o.anchor.offset!==r.anchor.offset||o.focus.offset!==r.focus.offset||!ct(o,r))return!1}return!0})(t.decorations,e.decorations))),Pt=e=>{var{decorations:t,element:n,renderElement:o=(e=>c.createElement(xt,Object.assign({},e))),renderPlaceholder:i,renderLeaf:a,selection:s}=e,l=gt(),u=At(),d=l.isInline(n),p=at.findKey(l,n),f=(0,c.useCallback)((e=>{var t=ye.get(l);e?(null==t||t.set(p,e),ge.set(n,e),me.set(e,n)):(null==t||t.delete(p),ge.delete(n))}),[l,p,n]),h=kt({decorations:t,node:n,renderElement:o,renderPlaceholder:i,renderLeaf:a,selection:s}),m={"data-slate-node":"element",ref:f};if(d&&(m["data-slate-inline"]=!0),!d&&y.ML.hasInlines(l,n)){var g=y.NB.string(n),v=r()(g);"rtl"===v&&(m.dir=v)}if(y.ML.isVoid(l,n)){m["data-slate-void"]=!0,!u&&d&&(m.contentEditable=!1);var b=d?"span":"div",[[w]]=y.NB.texts(n);h=c.createElement(b,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},c.createElement(St,{renderPlaceholder:i,decorations:[],isLast:!1,parent:n,text:w})),ue.set(w,0),de.set(w,n)}return o({attributes:m,children:h,element:n})},Et=c.memo(Pt,((e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&((e,t)=>{if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var o=e[n],r=t[n];if(!y.e6.equals(o,r)||!ct(o,r))return!1}return!0})(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&y.e6.equals(e.selection,t.selection)))),xt=e=>{var{attributes:t,children:n,element:o}=e,r=gt().isInline(o)?"span":"div";return c.createElement(r,Object.assign({},t,{style:{position:"relative"}}),n)},Dt=(0,c.createContext)((()=>[])),Ct=(0,c.createContext)(!1),kt=e=>{for(var{decorations:t,node:n,renderElement:o,renderPlaceholder:r,renderLeaf:i,selection:a}=e,s=(0,c.useContext)(Dt),l=gt(),u=at.findPath(l,n),d=[],p=y.W_.isElement(n)&&!l.isInline(n)&&y.ML.hasInlines(l,n),f=0;f<n.children.length;f++){var h=u.concat(f),m=n.children[f],g=at.findKey(l,m),v=y.ML.range(l,h),b=a&&y.e6.intersection(v,a),w=s([m,h]);for(var S of t){var P=y.e6.intersection(S,v);P&&w.push(P)}y.W_.isElement(m)?d.push(c.createElement(Ct.Provider,{key:"provider-".concat(g.id),value:!!b},c.createElement(Et,{decorations:w,element:m,key:g.id,renderElement:o,renderPlaceholder:r,renderLeaf:i,selection:b}))):d.push(c.createElement(St,{decorations:w,key:g.id,isLast:p&&f===n.children.length-1,parent:n,renderPlaceholder:r,renderLeaf:i,text:m})),ue.set(m,f),de.set(m,n)}return d},Ot=(0,c.createContext)(!1),At=()=>(0,c.useContext)(Ot),Tt=(0,c.createContext)(null),It={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},Ft={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},Mt={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},_t=e=>{var t=It[e],n=Ft[e],o=Mt[e],r=t&&(0,re.TB)(t),i=n&&(0,re.TB)(n),a=o&&(0,re.TB)(o);return e=>!(!r||!r(e))||(!!(qe&&i&&i(e))||!(qe||!a||!a(e)))},Nt={isBold:_t("bold"),isCompose:_t("compose"),isMoveBackward:_t("moveBackward"),isMoveForward:_t("moveForward"),isDeleteBackward:_t("deleteBackward"),isDeleteForward:_t("deleteForward"),isDeleteLineBackward:_t("deleteLineBackward"),isDeleteLineForward:_t("deleteLineForward"),isDeleteWordBackward:_t("deleteWordBackward"),isDeleteWordForward:_t("deleteWordForward"),isExtendBackward:_t("extendBackward"),isExtendForward:_t("extendForward"),isExtendLineBackward:_t("extendLineBackward"),isExtendLineForward:_t("extendLineForward"),isItalic:_t("italic"),isMoveLineBackward:_t("moveLineBackward"),isMoveLineForward:_t("moveLineForward"),isMoveWordBackward:_t("moveWordBackward"),isMoveWordForward:_t("moveWordForward"),isRedo:_t("redo"),isSoftBreak:_t("insertSoftBreak"),isSplitBlock:_t("splitBlock"),isTransposeCharacter:_t("transposeCharacter"),isUndo:_t("undo")},Rt={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class Lt extends c.Component{constructor(){super(...arguments),this.context=null,this.manager=null,this.mutationObserver=null}observe(){var e,{node:t}=this.props;if(!t.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");null===(e=this.mutationObserver)||void 0===e||e.observe(t.current,Rt)}componentDidMount(){var{receivedUserInput:e}=this.props,t=this.context;this.manager=((e,t)=>{var n=[],o=()=>{n=[]};return{registerMutations:o=>{if(t.current){var r=o.filter((t=>Ve(e,t,o)));n.push(...r)}},restoreDOM:function(){n.length>0&&(n.reverse().forEach((e=>{"characterData"!==e.type&&(e.removedNodes.forEach((t=>{e.target.insertBefore(t,e.nextSibling)})),e.addedNodes.forEach((t=>{e.target.removeChild(t)})))})),o())},clear:o}})(t,e),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var e,t,n,o,r=null===(e=this.mutationObserver)||void 0===e?void 0:e.takeRecords();null!=r&&r.length&&(null===(o=this.manager)||void 0===o||o.registerMutations(r));return null===(t=this.mutationObserver)||void 0===t||t.disconnect(),null===(n=this.manager)||void 0===n||n.restoreDOM(),null}componentDidUpdate(){var e;null===(e=this.manager)||void 0===e||e.clear(),this.observe()}componentWillUnmount(){var e;null===(e=this.mutationObserver)||void 0===e||e.disconnect()}render(){return this.props.children}}Lt.contextType=mt;var Bt=He?Lt:e=>{var{children:t}=e;return c.createElement(c.Fragment,null,t)};function jt(e,t){var{path:n,diff:o}=t;if(!y.ML.hasPath(e,n))return!1;var r=y.NB.get(e,n);if(!y.xv.isText(r))return!1;if(o.start!==r.text.length||0===o.text.length)return r.text.slice(o.start,o.start+o.text.length)===o.text;var i=y.y$.next(n);if(!y.ML.hasPath(e,i))return!1;var a=y.NB.get(e,i);return y.xv.isText(a)&&a.text.startsWith(o.text)}function zt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return n.reduce(((e,t)=>e.slice(0,t.start)+t.text+e.slice(t.end)),e)}function Kt(e,t){var{start:n,end:o,text:r}=t,i=e.slice(n,o),a=function(e,t){for(var n=Math.min(e.length,t.length),o=0;o<n;o++)if(e.charAt(o)!==t.charAt(o))return o;return n}(i,r),s=function(e,t,n){for(var o=Math.min(e.length,t.length,n),r=0;r<o;r++)if(e.charAt(e.length-r-1)!==t.charAt(t.length-r-1))return r;return o}(i,r,Math.min(i.length-a,r.length-a)),l={start:n+a,end:o-s,text:r.slice(a,r.length-s)};return l.start===l.end&&0===l.text.length?null:l}function Zt(e){var{path:t,diff:n}=e;return{anchor:{path:t,offset:n.start},focus:{path:t,offset:n.end}}}function Ut(e,t){var{path:n,offset:o}=t;if(!y.ML.hasPath(e,n))return null;var r=y.NB.get(e,n);if(!y.xv.isText(r))return null;var i=y.ML.above(e,{match:t=>y.W_.isElement(t)&&y.ML.isBlock(e,t),at:n});if(!i)return null;for(;o>r.text.length;){var a=y.ML.next(e,{at:n,match:y.xv.isText});if(!a||!y.y$.isDescendant(a[1],i[1]))return null;o-=r.text.length,r=a[0],n=a[1]}return{path:n,offset:o}}function Vt(e,t){var n=Ut(e,t.anchor);if(!n)return null;if(y.e6.isCollapsed(t))return{anchor:n,focus:n};var o=Ut(e,t.focus);return o?{anchor:n,focus:o}:null}function Gt(e,t,n){var o=ke.get(e),r=null==o?void 0:o.find((e=>{var{path:n}=e;return y.y$.equals(n,t.path)}));if(!r||t.offset<=r.diff.start)return y.E9.transform(t,n,{affinity:"backward"});var{diff:i}=r;if(t.offset<=i.start+i.text.length){var a={path:t.path,offset:i.start},s=y.E9.transform(a,n,{affinity:"backward"});return s?{path:s.path,offset:s.offset+t.offset-i.start}:null}var l={path:t.path,offset:t.offset-i.text.length+i.end-i.start},c=y.E9.transform(l,n,{affinity:"backward"});return c?"split_node"===n.type&&y.y$.equals(n.path,t.path)&&l.offset<n.position&&i.start<n.position?c:{path:c.path,offset:c.offset+i.text.length-i.end+i.start}:null}function Wt(e,t,n){var o=Gt(e,t.anchor,n);if(!o)return null;if(y.e6.isCollapsed(t))return{anchor:o,focus:o};var r=Gt(e,t.focus,n);return r?{anchor:o,focus:r}:null}function qt(e,t){var{path:n,diff:o,id:r}=e;switch(t.type){case"insert_text":return!y.y$.equals(t.path,n)||t.offset>=o.end?e:t.offset<=o.start?{diff:{start:t.text.length+o.start,end:t.text.length+o.end,text:o.text},id:r,path:n}:{diff:{start:o.start,end:o.end+t.text.length,text:o.text},id:r,path:n};case"remove_text":return!y.y$.equals(t.path,n)||t.offset>=o.end?e:t.offset+t.text.length<=o.start?{diff:{start:o.start-t.text.length,end:o.end-t.text.length,text:o.text},id:r,path:n}:{diff:{start:o.start,end:o.end-t.text.length,text:o.text},id:r,path:n};case"split_node":return!y.y$.equals(t.path,n)||t.position>=o.end?{diff:o,id:r,path:y.y$.transform(n,t,{affinity:"backward"})}:t.position>o.start?{diff:{start:o.start,end:Math.min(t.position,o.end),text:o.text},id:r,path:n}:{diff:{start:o.start-t.position,end:o.end-t.position,text:o.text},id:r,path:y.y$.transform(n,t,{affinity:"forward"})};case"merge_node":return y.y$.equals(t.path,n)?{diff:{start:o.start+t.position,end:o.end+t.position,text:o.text},id:r,path:y.y$.transform(n,t)}:{diff:o,id:r,path:y.y$.transform(n,t)}}var i=y.y$.transform(n,t);return i?{diff:o,path:i,id:r}:null}function Ht(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function $t(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ht(Object(n),!0).forEach((function(t){ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ht(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xt(e){var{editor:t,scheduleOnDOMSelectionChange:n,onDOMSelectionChange:o}=e,r=!1,i=null,a=null,s=null,l=0,c=!1,u=()=>{var e=Ae.get(t);if(Ae.delete(t),e){var{selection:n}=t,o=Vt(t,e);!o||n&&y.e6.equals(o,n)||y.YR.select(t,o)}},d=()=>{if(a&&(clearTimeout(a),a=null),s&&(clearTimeout(s),s=null),g()||m()){r||(r=!0,setTimeout((()=>r=!1))),m()&&(r="action");var e=t.selection&&y.ML.rangeRef(t,t.selection,{affinity:"forward"});Ce.set(t,t.marks),Oe.get(t),ke.get(t);for(var i,l=g();i=null===(d=ke.get(t))||void 0===d?void 0:d[0];){var d,p,f=De.get(t);void 0!==f&&(De.delete(t),t.marks=f),f&&!1===c&&(c=null);var h=Zt(i);t.selection&&y.e6.equals(t.selection,h)||y.YR.select(t,h),i.diff.text?y.ML.insertText(t,i.diff.text):y.ML.deleteFragment(t),ke.set(t,null===(p=ke.get(t))||void 0===p?void 0:p.filter((e=>{var{id:t}=e;return t!==i.id}))),jt(t,i)||(l=!1,Oe.delete(t),Ce.delete(t),r="action",Ae.delete(t),n.cancel(),o.cancel(),null==e||e.unref())}var v=null==e?void 0:e.unref();if(!v||Ae.get(t)||t.selection&&y.e6.equals(v,t.selection)||y.YR.select(t,v),m())(()=>{var e=Oe.get(t);if(Oe.delete(t),e){if(e.at){var n=y.E9.isPoint(e.at)?Ut(t,e.at):Vt(t,e.at);if(!n)return;var o=y.ML.range(t,n);t.selection&&y.e6.equals(t.selection,o)||y.YR.select(t,n)}e.run()}})();else{l&&n(),n.flush(),o.flush(),u();var b=Ce.get(t);Ce.delete(t),void 0!==b&&(t.marks=b,t.onChange())}}else u()},p=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=he.get(t);n&&(g()||e?n.style.display="none":n.style.removeProperty("display"))},f=(e,n)=>{var o,r=null!==(o=ke.get(t))&&void 0!==o?o:[];ke.set(t,r);var i=y.NB.leaf(t,e),a=r.findIndex((t=>y.y$.equals(t.path,e)));if(a<0)return Kt(i.text,n)&&r.push({path:e,diff:n,id:l++}),void p();var s,c,u,d,f,h,m,g,v=(s=i.text,c=r[a].diff,u=n,d=Math.min(c.start,u.start),f=Math.max(0,Math.min(c.start+c.text.length,u.end)-u.start),h=zt(s,c,u),m=Math.max(u.start+u.text.length,c.start+c.text.length+(c.start+c.text.length>u.start?u.text.length:0)-f),g=h.slice(d,m),Kt(s,{start:d,end:Math.max(c.end,u.end-c.text.length+(c.end-c.start)),text:g}));if(!v)return r.splice(a,1),void p();r[a]=$t($t({},r[a]),{},{diff:v})},h=function(e){var{at:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c=!1,Ae.delete(t),n.cancel(),o.cancel(),m()&&d(),Oe.set(t,{at:r,run:e}),s=setTimeout(d)},m=()=>!!Oe.get(t),g=()=>{var e;return!(null===(e=ke.get(t))||void 0===e||!e.length)},v=e=>{Ae.set(t,e),a&&(clearTimeout(a),a=null);var{selection:n}=t;if(e){var o=!n||!y.y$.equals(n.anchor.path,e.anchor.path),r=!n||!y.y$.equals(n.anchor.path.slice(0,-1),e.anchor.path.slice(0,-1));(o&&c||r)&&(c=!1),!o&&g()||(a=setTimeout(d,200))}},b=()=>{m()||(s=setTimeout(d))};return{flush:d,scheduleFlush:b,hasPendingDiffs:g,hasPendingAction:m,hasPendingChanges:()=>m()||g(),isFlushing:()=>r,handleUserSelect:v,handleCompositionEnd:e=>{i&&clearTimeout(i),i=setTimeout((()=>{Se.set(t,!1),d()}),25)},handleCompositionStart:e=>{Se.set(t,!0),i&&(clearTimeout(i),i=null)},handleDOMBeforeInput:e=>{var n;a&&(clearTimeout(a),a=null);var{inputType:o}=e,r=null,i=e.dataTransfer||e.data||void 0;!1!==c&&"insertText"!==o&&"insertCompositionText"!==o&&(c=!1);var[s]=e.getTargetRanges();s&&(r=at.toSlateRange(t,s,{exactMatch:!1,suppressThrow:!0}));var l=at.getWindow(t).getSelection();if(!r&&l&&(s=l,r=at.toSlateRange(t,l,{exactMatch:!1,suppressThrow:!0})),r=null!==(n=r)&&void 0!==n?n:t.selection){var u=!0;if(o.startsWith("delete")){if(y.e6.isExpanded(r)){var[d,p]=y.e6.edges(r);if(y.NB.leaf(t,d.path).text.length===d.offset&&0===p.offset){var m=y.ML.next(t,{at:d.path,match:y.xv.isText});m&&y.y$.equals(m[1],p.path)&&(r={anchor:p,focus:p})}}var g=o.endsWith("Backward")?"backward":"forward",[w,S]=y.e6.edges(r),[P,E]=y.ML.leaf(t,w.path),x={text:"",start:w.offset,end:S.offset},D=ke.get(t),C=null==D?void 0:D.find((e=>y.y$.equals(e.path,E))),k=C?[C.diff,x]:[x];if(0===zt(P.text,...k).length&&(u=!1),y.e6.isExpanded(r)){if(u&&y.y$.equals(r.anchor.path,r.focus.path)){var O={path:r.anchor.path,offset:w.offset},A=y.ML.range(t,O,O);return v(A),f(r.anchor.path,{text:"",end:S.offset,start:w.offset})}return h((()=>y.ML.deleteFragment(t,{direction:g})),{at:r})}}switch(o){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return h((()=>y.ML.deleteFragment(t)),{at:r});case"deleteContent":case"deleteContentForward":var{anchor:T}=r;if(u&&y.e6.isCollapsed(r)){var I=y.NB.leaf(t,T.path);if(T.offset<I.text.length)return f(T.path,{text:"",start:T.offset,end:T.offset+1})}return h((()=>y.ML.deleteForward(t)),{at:r});case"deleteContentBackward":var F,{anchor:M}=r,_=Le(s)?s.isCollapsed:!(null===(F=s)||void 0===F||!F.collapsed);return u&&_&&y.e6.isCollapsed(r)&&M.offset>0?f(M.path,{text:"",start:M.offset-1,end:M.offset}):h((()=>y.ML.deleteBackward(t)),{at:r});case"deleteEntireSoftLine":return h((()=>{y.ML.deleteBackward(t,{unit:"line"}),y.ML.deleteForward(t,{unit:"line"})}),{at:r});case"deleteHardLineBackward":return h((()=>y.ML.deleteBackward(t,{unit:"block"})),{at:r});case"deleteSoftLineBackward":return h((()=>y.ML.deleteBackward(t,{unit:"line"})),{at:r});case"deleteHardLineForward":return h((()=>y.ML.deleteForward(t,{unit:"block"})),{at:r});case"deleteSoftLineForward":return h((()=>y.ML.deleteForward(t,{unit:"line"})),{at:r});case"deleteWordBackward":return h((()=>y.ML.deleteBackward(t,{unit:"word"})),{at:r});case"deleteWordForward":return h((()=>y.ML.deleteForward(t,{unit:"word"})),{at:r});case"insertLineBreak":return h((()=>y.ML.insertSoftBreak(t)),{at:r});case"insertParagraph":return h((()=>y.ML.insertBreak(t)),{at:r});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("DataTransfer"===(null==i?void 0:i.constructor.name))return h((()=>at.insertData(t,i)),{at:r});if("string"==typeof i&&i.includes("\n"))return h((()=>y.ML.insertSoftBreak(t)),{at:y.e6.end(r)});var N=null!=i?i:"";if(De.get(t)&&(N=N.replace("\ufeff","")),y.y$.equals(r.anchor.path,r.focus.path)){var[R,L]=y.e6.edges(r),B={start:R.offset,end:L.offset,text:N};if(N&&c&&"insertCompositionText"===o){var j=c.start+c.text.search(/\S|$/);B.start+B.text.search(/\S|$/)===j+1&&B.end===c.start+c.text.length?(B.start-=1,c=null,b()):c=!1}else c="insertText"===o&&(null===c?B:!(!c||!y.e6.isCollapsed(r)||c.end+c.text.length!==R.offset)&&$t($t({},c),{},{text:c.text+N}));if(u)return void f(R.path,B)}return h((()=>y.ML.insertText(t,N)),{at:r})}}},handleKeyDown:e=>{g()||(p(!0),setTimeout(p))},handleDomMutations:e=>{var n;g()||m()||e.some((n=>Ve(t,n,e)))&&(null===(n=Te.get(t))||void 0===n||n())},handleInput:()=>{!m()&&g()||d()}}}var Yt=["node"];function Jt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var Qt={subtree:!0,childList:!0,characterData:!0};function en(e){var{node:t}=e,n=se(e,Yt);if(!He)return null;var o,r=gt(),i=(o=(0,c.useRef)(!1),(0,c.useEffect)((()=>(o.current=!0,()=>{o.current=!1})),[]),o.current),[a]=(0,c.useState)((()=>Xt(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jt(Object(n),!0).forEach((function(t){ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({editor:r},n))));return function(e,t,n){var[o]=(0,c.useState)((()=>new MutationObserver(t)));ut((()=>{o.takeRecords()})),(0,c.useEffect)((()=>{if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return o.observe(e.current,n),()=>o.disconnect()}),[])}(t,a.handleDomMutations,Qt),xe.set(r,a.scheduleFlush),i&&a.flush(),a}var tn=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],nn=["text"];function on(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function rn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?on(Object(n),!0).forEach((function(t){ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):on(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var an=e=>c.createElement(c.Fragment,null,kt(e)),sn=e=>{var t,n,o=(0,c.useCallback)((e=>c.createElement(ln,Object.assign({},e))),[]),{autoFocus:i,decorate:s=cn,onDOMBeforeInput:u,placeholder:d,readOnly:p=!1,renderElement:f,renderLeaf:h,renderPlaceholder:m=o,scrollSelectionIntoView:g=un,style:v={},as:b="div",disableDefaultStyles:w=!1}=e,S=se(e,tn),P=(()=>{var e=(0,c.useContext)(Tt);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:t}=e;return t})(),[E,x]=(0,c.useState)(!1),D=(0,c.useRef)(null),C=(0,c.useRef)([]),{onUserInput:k,receivedUserInput:O}=function(){var e=gt(),t=(0,c.useRef)(!1),n=(0,c.useRef)(0),o=(0,c.useCallback)((()=>{if(!t.current){t.current=!0;var o=at.getWindow(e);o.cancelAnimationFrame(n.current),n.current=o.requestAnimationFrame((()=>{t.current=!1}))}}),[]);return(0,c.useEffect)((()=>()=>cancelAnimationFrame(n.current)),[]),{receivedUserInput:t,onUserInput:o}}(),[,A]=(0,c.useReducer)((e=>e+1),0);Te.set(P,A),be.set(P,p);var T=(0,c.useMemo)((()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1})),[]);(0,c.useEffect)((()=>{D.current&&i&&D.current.focus()}),[i]);var I=(0,c.useCallback)(l()((()=>{if((He||!at.isComposing(P))&&(!T.isUpdatingSelection||null!=M&&M.isFlushing())&&!T.isDraggingInternally){var e=at.findDocumentOrShadowRoot(P),{activeElement:t}=e,n=at.toDOMNode(P,P),o=e.getSelection();if(t===n?(T.latestElement=t,we.set(P,!0)):we.delete(P),!o)return y.YR.deselect(P);var{anchorNode:r,focusNode:i}=o,a=at.hasEditableTarget(P,r)||at.isTargetInsideNonReadonlyVoid(P,r),s=at.hasEditableTarget(P,i)||at.isTargetInsideNonReadonlyVoid(P,i);if(a&&s){var l=at.toSlateRange(P,o,{exactMatch:!1,suppressThrow:!0});l&&(at.isComposing(P)||null!=M&&M.hasPendingChanges()||null!=M&&M.isFlushing()?null==M||M.handleUserSelect(l):y.YR.select(P,l))}!p||a&&s||y.YR.deselect(P)}}),100),[p]),F=(0,c.useMemo)((()=>a()(I,0)),[I]),M=en({node:D,onDOMSelectionChange:I,scheduleOnDOMSelectionChange:F});ut((()=>{var e;D.current&&(e=_e(D.current))?(pe.set(P,e),fe.set(P,D.current),ge.set(P,D.current),me.set(D.current,P)):ge.delete(P);var{selection:t}=P,n=at.findDocumentOrShadowRoot(P).getSelection();if(n&&at.isFocused(P)&&(null==M||!M.hasPendingAction())){var o=e=>{var o="None"!==n.type;if(t||o){var r=fe.get(P),i=!1;if(r.contains(n.anchorNode)&&r.contains(n.focusNode)&&(i=!0),o&&i&&t&&!e){var a=at.toSlateRange(P,n,{exactMatch:!0,suppressThrow:!0});if(a&&y.e6.equals(a,t)){var s;if(!T.hasMarkPlaceholder)return;var{anchorNode:l}=n;if(null!=l&&null!==(s=l.parentElement)&&void 0!==s&&s.hasAttribute("data-slate-mark-placeholder"))return}}if(!t||at.hasRange(P,t)){T.isUpdatingSelection=!0;var c=t&&at.toDOMRange(P,t);return c?(y.e6.isBackward(t)?n.setBaseAndExtent(c.endContainer,c.endOffset,c.startContainer,c.startOffset):n.setBaseAndExtent(c.startContainer,c.startOffset,c.endContainer,c.endOffset),g(P,c)):n.removeAllRanges(),c}P.selection=at.toSlateRange(P,n,{exactMatch:!1,suppressThrow:!0})}},r=o(),i="action"===(null==M?void 0:M.isFlushing());if(He&&i){var a=null,s=requestAnimationFrame((()=>{if(i){var e=e=>{try{at.toDOMNode(P,P).focus(),o(e)}catch(e){}};e(),a=setTimeout((()=>{e(!0),T.isUpdatingSelection=!1}))}}));return()=>{cancelAnimationFrame(s),a&&clearTimeout(a)}}setTimeout((()=>{r&&$e&&at.toDOMNode(P,P).focus();T.isUpdatingSelection=!1}))}}));var _=(0,c.useCallback)((e=>{if(k(),!p&&at.hasEditableTarget(P,e.target)&&!pn(e,u)){var t;if(M)return M.handleDOMBeforeInput(e);F.flush(),I.flush();var{selection:n}=P,{inputType:o}=e,r=e.dataTransfer||e.data||void 0,i="insertCompositionText"===o||"deleteCompositionText"===o;if(i&&at.isComposing(P))return;var a=!1;if("insertText"===o&&n&&y.e6.isCollapsed(n)&&e.data&&1===e.data.length&&/[a-z ]/i.test(e.data)&&0!==n.anchor.offset){var s,l;a=!0,P.marks&&(a=!1);var{anchor:c}=n,[d,f]=at.toDOMPoint(P,c),h=null===(s=d.parentElement)||void 0===s?void 0:s.closest("a"),m=at.getWindow(P);if(a&&h&&at.hasDOMNode(P,h)){var g,v=null==m?void 0:m.document.createTreeWalker(h,NodeFilter.SHOW_TEXT).lastChild();v===d&&(null===(g=v.textContent)||void 0===g?void 0:g.length)===f&&(a=!1)}if(a&&d.parentElement&&"pre"===(null==m||null===(l=m.getComputedStyle(d.parentElement))||void 0===l?void 0:l.whiteSpace)){var b=y.ML.above(P,{at:c.path,match:e=>y.W_.isElement(e)&&y.ML.isBlock(P,e)});b&&y.NB.string(b[0]).includes("\t")&&(a=!1)}}if(!o.startsWith("delete")||o.startsWith("deleteBy")){var[w]=e.getTargetRanges();if(w){var S=at.toSlateRange(P,w,{exactMatch:!1,suppressThrow:!1});if(!n||!y.e6.equals(n,S)){a=!1;var E=!i&&P.selection&&y.ML.rangeRef(P,P.selection);y.YR.select(P,S),E&&Pe.set(P,E)}}}if(i)return;if(a||e.preventDefault(),n&&y.e6.isExpanded(n)&&o.startsWith("delete")){var D=o.endsWith("Backward")?"backward":"forward";return void y.ML.deleteFragment(P,{direction:D})}switch(o){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":y.ML.deleteFragment(P);break;case"deleteContent":case"deleteContentForward":y.ML.deleteForward(P);break;case"deleteContentBackward":y.ML.deleteBackward(P);break;case"deleteEntireSoftLine":y.ML.deleteBackward(P,{unit:"line"}),y.ML.deleteForward(P,{unit:"line"});break;case"deleteHardLineBackward":y.ML.deleteBackward(P,{unit:"block"});break;case"deleteSoftLineBackward":y.ML.deleteBackward(P,{unit:"line"});break;case"deleteHardLineForward":y.ML.deleteForward(P,{unit:"block"});break;case"deleteSoftLineForward":y.ML.deleteForward(P,{unit:"line"});break;case"deleteWordBackward":y.ML.deleteBackward(P,{unit:"word"});break;case"deleteWordForward":y.ML.deleteForward(P,{unit:"word"});break;case"insertLineBreak":y.ML.insertSoftBreak(P);break;case"insertParagraph":y.ML.insertBreak(P);break;case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":"insertFromComposition"===o&&at.isComposing(P)&&(x(!1),Se.set(P,!1)),"DataTransfer"===(null==r?void 0:r.constructor.name)?at.insertData(P,r):"string"==typeof r&&(a?C.current.push((()=>y.ML.insertText(P,r))):y.ML.insertText(P,r))}var O=null===(t=Pe.get(P))||void 0===t?void 0:t.unref();Pe.delete(P),!O||P.selection&&y.e6.equals(P.selection,O)||y.YR.select(P,O)}}),[p,u]),N=(0,c.useCallback)((e=>{null==e?(I.cancel(),F.cancel(),fe.delete(P),ge.delete(P),D.current&&it&&D.current.removeEventListener("beforeinput",_)):it&&e.addEventListener("beforeinput",_),D.current=e}),[D,_,I,F]);ut((()=>{var e=at.getWindow(P);return e.document.addEventListener("selectionchange",F),()=>{e.document.removeEventListener("selectionchange",F)}}),[F]);var R=s([P,[]]);if(d&&1===P.children.length&&1===Array.from(y.NB.texts(P)).length&&""===y.NB.string(P)&&!E){var L=y.ML.start(P,[]);R.push({[Ie]:!0,placeholder:d,anchor:L,focus:L})}var{marks:B}=P;if(T.hasMarkPlaceholder=!1,P.selection&&y.e6.isCollapsed(P.selection)&&B){var{anchor:j}=P.selection,z=y.NB.leaf(P,j.path),K=se(z,nn);if(!y.xv.equals(z,B,{loose:!0})){T.hasMarkPlaceholder=!0;var Z=Object.fromEntries(Object.keys(K).map((e=>[e,null])));R.push(rn(rn(rn({[Fe]:!0},Z),B),{},{anchor:j,focus:j}))}}(0,c.useEffect)((()=>{setTimeout((()=>{var{selection:e}=P;if(e){var{anchor:t}=e,n=y.NB.leaf(P,t.path);if(B&&!y.xv.equals(n,B,{loose:!0}))return void De.set(P,B)}De.delete(P)}))}));var U=null===(t=he.get(P))||void 0===t||null===(n=t.getBoundingClientRect())||void 0===n?void 0:n.height;return c.createElement(Ot.Provider,{value:p},c.createElement(Dt.Provider,{value:s},c.createElement(Bt,{node:D,receivedUserInput:O},c.createElement(b,Object.assign({role:p?void 0:"textbox","aria-multiline":!p||void 0},S,{spellCheck:!(!it&&rt)&&S.spellCheck,autoCorrect:it||!rt?S.autoCorrect:"false",autoCapitalize:it||!rt?S.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!p,zindex:-1,suppressContentEditableWarning:!0,ref:N,style:rn(rn({},w?{}:rn({position:"relative",outline:"none",whiteSpace:"pre-wrap",wordWrap:"break-word"},U?{minHeight:U}:{})),v),onBeforeInput:(0,c.useCallback)((e=>{if(!it&&!p&&!dn(e,S.onBeforeInput)&&at.hasSelectableTarget(P,e.target)&&(e.preventDefault(),!at.isComposing(P))){var t=e.data;y.ML.insertText(P,t)}}),[p]),onInput:(0,c.useCallback)((e=>{if(!dn(e,S.onInput))if(M)M.handleInput();else{for(var t of C.current)t();C.current=[]}}),[]),onBlur:(0,c.useCallback)((e=>{if(!p&&!T.isUpdatingSelection&&at.hasSelectableTarget(P,e.target)&&!dn(e,S.onBlur)){var t=at.findDocumentOrShadowRoot(P);if(T.latestElement!==t.activeElement){var{relatedTarget:n}=e;if(!(n===at.toDOMNode(P,P)||Ne(n)&&n.hasAttribute("data-slate-spacer"))){if(null!=n&&Re(n)&&at.hasDOMNode(P,n)){var o=at.toSlateNode(P,n);if(y.W_.isElement(o)&&!P.isVoid(o))return}if(Xe){var r=t.getSelection();null==r||r.removeAllRanges()}we.delete(P)}}}}),[p,S.onBlur]),onClick:(0,c.useCallback)((e=>{if(at.hasTarget(P,e.target)&&!dn(e,S.onClick)&&Re(e.target)){var t=at.toSlateNode(P,e.target),n=at.findPath(P,t);if(!y.ML.hasPath(P,n)||y.NB.get(P,n)!==t)return;if(3===e.detail&&n.length>=1){var o=n;if(!y.W_.isElement(t)||!y.ML.isBlock(P,t)){var r,i=y.ML.above(P,{match:e=>y.W_.isElement(e)&&y.ML.isBlock(P,e),at:n});o=null!==(r=null==i?void 0:i[1])&&void 0!==r?r:n.slice(0,1)}var a=y.ML.range(P,o);return void y.YR.select(P,a)}if(p)return;var s=y.ML.start(P,n),l=y.ML.end(P,n),c=y.ML.void(P,{at:s}),u=y.ML.void(P,{at:l});if(c&&u&&y.y$.equals(c[1],u[1])){var d=y.ML.range(P,s);y.YR.select(P,d)}}}),[p,S.onClick]),onCompositionEnd:(0,c.useCallback)((e=>{if(at.hasSelectableTarget(P,e.target)){if(at.isComposing(P)&&(x(!1),Se.set(P,!1)),null==M||M.handleCompositionEnd(e),dn(e,S.onCompositionEnd)||He)return;if(!Xe&&!tt&&!We&&!ot&&!nt&&e.data){var t=De.get(P);De.delete(P),void 0!==t&&(Ce.set(P,P.marks),P.marks=t),y.ML.insertText(P,e.data);var n=Ce.get(P);Ce.delete(P),void 0!==n&&(P.marks=n)}}}),[S.onCompositionEnd]),onCompositionUpdate:(0,c.useCallback)((e=>{at.hasSelectableTarget(P,e.target)&&!dn(e,S.onCompositionUpdate)&&(at.isComposing(P)||(x(!0),Se.set(P,!0)))}),[S.onCompositionUpdate]),onCompositionStart:(0,c.useCallback)((e=>{if(at.hasSelectableTarget(P,e.target)){if(null==M||M.handleCompositionStart(e),dn(e,S.onCompositionStart)||He)return;x(!0);var{selection:t}=P;if(t){if(y.e6.isExpanded(t))return void y.ML.deleteFragment(P);var n=y.ML.above(P,{match:e=>y.W_.isElement(e)&&y.ML.isInline(P,e),mode:"highest"});if(n){var[,o]=n;if(y.ML.isEnd(P,t.anchor,o)){var r=y.ML.after(P,o);y.YR.setSelection(P,{anchor:r,focus:r})}}}}}),[S.onCompositionStart]),onCopy:(0,c.useCallback)((e=>{at.hasSelectableTarget(P,e.target)&&!dn(e,S.onCopy)&&(e.preventDefault(),at.setFragmentData(P,e.clipboardData,"copy"))}),[S.onCopy]),onCut:(0,c.useCallback)((e=>{if(!p&&at.hasSelectableTarget(P,e.target)&&!dn(e,S.onCut)){e.preventDefault(),at.setFragmentData(P,e.clipboardData,"cut");var{selection:t}=P;if(t)if(y.e6.isExpanded(t))y.ML.deleteFragment(P);else{var n=y.NB.parent(P,t.anchor.path);y.ML.isVoid(P,n)&&y.YR.delete(P)}}}),[p,S.onCut]),onDragOver:(0,c.useCallback)((e=>{if(at.hasTarget(P,e.target)&&!dn(e,S.onDragOver)){var t=at.toSlateNode(P,e.target);y.W_.isElement(t)&&y.ML.isVoid(P,t)&&e.preventDefault()}}),[S.onDragOver]),onDragStart:(0,c.useCallback)((e=>{if(!p&&at.hasTarget(P,e.target)&&!dn(e,S.onDragStart)){var t=at.toSlateNode(P,e.target),n=at.findPath(P,t);if(y.W_.isElement(t)&&y.ML.isVoid(P,t)||y.ML.void(P,{at:n,voids:!0})){var o=y.ML.range(P,n);y.YR.select(P,o)}T.isDraggingInternally=!0,at.setFragmentData(P,e.dataTransfer,"drag")}}),[p,S.onDragStart]),onDrop:(0,c.useCallback)((e=>{if(!p&&at.hasTarget(P,e.target)&&!dn(e,S.onDrop)){e.preventDefault();var t=P.selection,n=at.findEventRange(P,e),o=e.dataTransfer;y.YR.select(P,n),T.isDraggingInternally&&(!t||y.e6.equals(t,n)||y.ML.void(P,{at:n,voids:!0})||y.YR.delete(P,{at:t})),at.insertData(P,o),at.isFocused(P)||at.focus(P)}T.isDraggingInternally=!1}),[p,S.onDrop]),onDragEnd:(0,c.useCallback)((e=>{!p&&T.isDraggingInternally&&S.onDragEnd&&at.hasTarget(P,e.target)&&S.onDragEnd(e),T.isDraggingInternally=!1}),[p,S.onDragEnd]),onFocus:(0,c.useCallback)((e=>{if(!p&&!T.isUpdatingSelection&&at.hasEditableTarget(P,e.target)&&!dn(e,S.onFocus)){var t=at.toDOMNode(P,P),n=at.findDocumentOrShadowRoot(P);if(T.latestElement=n.activeElement,$e&&e.target!==t)return void t.focus();we.set(P,!0)}}),[p,S.onFocus]),onKeyDown:(0,c.useCallback)((e=>{if(!p&&at.hasEditableTarget(P,e.target)){null==M||M.handleKeyDown(e);var{nativeEvent:t}=e;if(at.isComposing(P)&&!1===t.isComposing&&(Se.set(P,!1),x(!1)),dn(e,S.onKeyDown)||at.isComposing(P))return;var{selection:n}=P,o=P.children[null!==n?n.focus.path[0]:0],i="rtl"===r()(y.NB.string(o));if(Nt.isRedo(t)){e.preventDefault();var a=P;return void("function"==typeof a.redo&&a.redo())}if(Nt.isUndo(t)){e.preventDefault();var s=P;return void("function"==typeof s.undo&&s.undo())}if(Nt.isMoveLineBackward(t))return e.preventDefault(),void y.YR.move(P,{unit:"line",reverse:!0});if(Nt.isMoveLineForward(t))return e.preventDefault(),void y.YR.move(P,{unit:"line"});if(Nt.isExtendLineBackward(t))return e.preventDefault(),void y.YR.move(P,{unit:"line",edge:"focus",reverse:!0});if(Nt.isExtendLineForward(t))return e.preventDefault(),void y.YR.move(P,{unit:"line",edge:"focus"});if(Nt.isMoveBackward(t))return e.preventDefault(),void(n&&y.e6.isCollapsed(n)?y.YR.move(P,{reverse:!i}):y.YR.collapse(P,{edge:"start"}));if(Nt.isMoveForward(t))return e.preventDefault(),void(n&&y.e6.isCollapsed(n)?y.YR.move(P,{reverse:i}):y.YR.collapse(P,{edge:"end"}));if(Nt.isMoveWordBackward(t))return e.preventDefault(),n&&y.e6.isExpanded(n)&&y.YR.collapse(P,{edge:"focus"}),void y.YR.move(P,{unit:"word",reverse:!i});if(Nt.isMoveWordForward(t))return e.preventDefault(),n&&y.e6.isExpanded(n)&&y.YR.collapse(P,{edge:"focus"}),void y.YR.move(P,{unit:"word",reverse:i});if(it){if((Je||Xe)&&n&&(Nt.isDeleteBackward(t)||Nt.isDeleteForward(t))&&y.e6.isCollapsed(n)){var l=y.NB.parent(P,n.anchor.path);if(y.W_.isElement(l)&&y.ML.isVoid(P,l)&&(y.ML.isInline(P,l)||y.ML.isBlock(P,l)))return e.preventDefault(),void y.ML.deleteBackward(P,{unit:"block"})}}else{if(Nt.isBold(t)||Nt.isItalic(t)||Nt.isTransposeCharacter(t))return void e.preventDefault();if(Nt.isSoftBreak(t))return e.preventDefault(),void y.ML.insertSoftBreak(P);if(Nt.isSplitBlock(t))return e.preventDefault(),void y.ML.insertBreak(P);if(Nt.isDeleteBackward(t))return e.preventDefault(),void(n&&y.e6.isExpanded(n)?y.ML.deleteFragment(P,{direction:"backward"}):y.ML.deleteBackward(P));if(Nt.isDeleteForward(t))return e.preventDefault(),void(n&&y.e6.isExpanded(n)?y.ML.deleteFragment(P,{direction:"forward"}):y.ML.deleteForward(P));if(Nt.isDeleteLineBackward(t))return e.preventDefault(),void(n&&y.e6.isExpanded(n)?y.ML.deleteFragment(P,{direction:"backward"}):y.ML.deleteBackward(P,{unit:"line"}));if(Nt.isDeleteLineForward(t))return e.preventDefault(),void(n&&y.e6.isExpanded(n)?y.ML.deleteFragment(P,{direction:"forward"}):y.ML.deleteForward(P,{unit:"line"}));if(Nt.isDeleteWordBackward(t))return e.preventDefault(),void(n&&y.e6.isExpanded(n)?y.ML.deleteFragment(P,{direction:"backward"}):y.ML.deleteBackward(P,{unit:"word"}));if(Nt.isDeleteWordForward(t))return e.preventDefault(),void(n&&y.e6.isExpanded(n)?y.ML.deleteFragment(P,{direction:"forward"}):y.ML.deleteForward(P,{unit:"word"}))}}}),[p,S.onKeyDown]),onPaste:(0,c.useCallback)((e=>{p||!at.hasEditableTarget(P,e.target)||dn(e,S.onPaste)||it&&!(e=>e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length)(e.nativeEvent)||(e.preventDefault(),at.insertData(P,e.clipboardData))}),[p,S.onPaste])}),c.createElement(an,{decorations:R,node:P,renderElement:f,renderPlaceholder:m,renderLeaf:h,selection:P.selection})))))},ln=e=>{var{attributes:t,children:n}=e;return c.createElement("span",Object.assign({},t),n,He&&c.createElement("br",null))},cn=()=>[],un=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&y.e6.isCollapsed(e.selection))){var n=t.startContainer.parentElement;n.getBoundingClientRect=t.getBoundingClientRect.bind(t),g(n,{scrollMode:"if-needed"}),delete n.getBoundingClientRect}},dn=(e,t)=>{if(!t)return!1;var n=t(e);return null!=n?n:e.isDefaultPrevented()||e.isPropagationStopped()},pn=(e,t)=>{if(!t)return!1;var n=t(e);return null!=n?n:e.defaultPrevented},fn=(0,c.createContext)(!1);var hn=(0,c.createContext)({});var mn=["editor","children","onChange","value"],gn=e=>{var{editor:t,children:n,onChange:o,value:r}=e,i=se(e,mn),a=(0,c.useRef)(!1),[s,l]=c.useState((()=>{if(!y.NB.isNodeList(r))throw new Error("[Slate] value is invalid! Expected a list of elements but got: ".concat(y.o4.stringify(r)));if(!y.ML.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(y.o4.stringify(t)));return t.children=r,Object.assign(t,i),{v:0,editor:t}})),{selectorContext:u,onChange:d}=function(e){var t=(0,c.useRef)([]).current,n=(0,c.useRef)({editor:e}).current,o=(0,c.useCallback)((e=>{n.editor=e,t.forEach((t=>t(e)))}),[]);return{selectorContext:(0,c.useMemo)((()=>({getSlate:()=>n.editor,addEventListener:e=>(t.push(e),()=>{t.splice(t.indexOf(e),1)})})),[t,n]),onChange:o}}(t),p=(0,c.useCallback)((()=>{o&&o(t.children),l((e=>({v:e.v+1,editor:t}))),d(t)}),[o]);(0,c.useEffect)((()=>(Ee.set(t,p),()=>{Ee.set(t,(()=>{})),a.current=!0})),[p]);var[f,h]=(0,c.useState)(at.isFocused(t));return(0,c.useEffect)((()=>{h(at.isFocused(t))})),ut((()=>{var e=()=>h(at.isFocused(t));return Ge?(document.addEventListener("focusin",e),document.addEventListener("focusout",e),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",e)}):(document.addEventListener("focus",e,!0),document.addEventListener("blur",e,!0),()=>{document.removeEventListener("focus",e,!0),document.removeEventListener("blur",e,!0)})}),[]),c.createElement(hn.Provider,{value:u},c.createElement(Tt.Provider,{value:s},c.createElement(mt.Provider,{value:s.editor},c.createElement(fn.Provider,{value:f},n))))},vn=(e,t)=>{var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},yn=(e,t,n)=>{var o=at.toDOMRange(e,t).getBoundingClientRect(),r=at.toDOMRange(e,n).getBoundingClientRect();return vn(o,r)&&vn(r,o)},bn=(e,t)=>{var n=y.ML.range(e,y.e6.end(t)),o=Array.from(y.ML.positions(e,{at:t})),r=0,i=o.length,a=Math.floor(i/2);if(yn(e,y.ML.range(e,o[r]),n))return y.ML.range(e,o[r],n);if(o.length<2)return y.ML.range(e,o[o.length-1],n);for(;a!==o.length&&a!==r;)yn(e,y.ML.range(e,o[a]),n)?i=a:r=a,a=Math.floor((r+i)/2);return y.ML.range(e,o[i],n)};function wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Sn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wn(Object(n),!0).forEach((function(t){ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x-slate-fragment",n=e,{apply:o,onChange:r,deleteBackward:i,addMark:a,removeMark:s}=n;return ye.set(n,new WeakMap),n.addMark=(e,t)=>{var o,r;null===(o=xe.get(n))||void 0===o||o(),!De.get(n)&&null!==(r=ke.get(n))&&void 0!==r&&r.length&&De.set(n,null),Ce.delete(n),a(e,t)},n.removeMark=e=>{var t;!De.get(n)&&null!==(t=ke.get(n))&&void 0!==t&&t.length&&De.set(n,null),Ce.delete(n),s(e)},n.deleteBackward=e=>{if("line"!==e)return i(e);if(n.selection&&y.e6.isCollapsed(n.selection)){var t=y.ML.above(n,{match:e=>y.W_.isElement(e)&&y.ML.isBlock(n,e),at:n.selection});if(t){var[,o]=t,r=y.ML.range(n,o,n.selection.anchor),a=bn(n,r);y.e6.isCollapsed(a)||y.YR.delete(n,{at:a})}}},n.apply=e=>{var t=[],r=ke.get(n);if(null!=r&&r.length){var i=r.map((t=>qt(t,e))).filter(Boolean);ke.set(n,i)}var a=Ae.get(n);a&&Ae.set(n,Wt(n,a,e));var s=Oe.get(n);if(null!=s&&s.at){var l=y.E9.isPoint(null==s?void 0:s.at)?Gt(n,s.at,e):Wt(n,s.at,e);Oe.set(n,l?Sn(Sn({},s),{},{at:l}):null)}switch(e.type){case"insert_text":case"remove_text":case"set_node":case"split_node":t.push(...En(n,e.path));break;case"set_selection":var c;null===(c=Pe.get(n))||void 0===c||c.unref(),Pe.delete(n);break;case"insert_node":case"remove_node":t.push(...En(n,y.y$.parent(e.path)));break;case"merge_node":var u=y.y$.previous(e.path);t.push(...En(n,u));break;case"move_node":var d=y.y$.common(y.y$.parent(e.path),y.y$.parent(e.newPath));t.push(...En(n,d))}for(var[p,f]of(o(e),t)){var[h]=y.ML.node(n,p);ve.set(h,f)}},n.setFragmentData=e=>{var{selection:o}=n;if(o){var[r,i]=y.e6.edges(o),a=y.ML.void(n,{at:r.path}),s=y.ML.void(n,{at:i.path});if(!y.e6.isCollapsed(o)||a){var l=at.toDOMRange(n,o),c=l.cloneContents(),u=c.childNodes[0];if(c.childNodes.forEach((e=>{e.textContent&&""!==e.textContent.trim()&&(u=e)})),s){var[d]=s,p=l.cloneRange(),f=at.toDOMNode(n,d);p.setEndAfter(f),c=p.cloneContents()}if(a&&(u=c.querySelector("[data-slate-spacer]")),Array.from(c.querySelectorAll("[data-slate-zero-width]")).forEach((e=>{var t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""})),Be(u)){var h=u.ownerDocument.createElement("span");h.style.whiteSpace="pre",h.appendChild(u),c.appendChild(h),u=h}var m=n.getFragment(),g=JSON.stringify(m),v=window.btoa(encodeURIComponent(g));u.setAttribute("data-slate-fragment",v),e.setData("application/".concat(t),v);var b=c.ownerDocument.createElement("div");return b.appendChild(c),b.setAttribute("hidden","true"),c.ownerDocument.body.appendChild(b),e.setData("text/html",b.innerHTML),e.setData("text/plain",Ke(b)),c.ownerDocument.body.removeChild(b),e}}},n.insertData=e=>{n.insertFragmentData(e)||n.insertTextData(e)},n.insertFragmentData=e=>{var o=e.getData("application/".concat(t))||Ue(e);if(o){var r=decodeURIComponent(window.atob(o)),i=JSON.parse(r);return n.insertFragment(i),!0}return!1},n.insertTextData=e=>{var t=e.getData("text/plain");if(t){var o=t.split(/\r\n|\r|\n/),r=!1;for(var i of o)r&&y.YR.splitNodes(n,{always:!0}),n.insertText(i),r=!0;return!0}return!1},n.onChange=e=>{ie.unstable_batchedUpdates((()=>{var t=Ee.get(n);t&&t(),r(e)}))},n},En=(e,t)=>{var n=[];for(var[o,r]of y.ML.levels(e,{at:t})){var i=at.findKey(e,o);n.push([r,i])}return n}},42308:(e,t,n)=>{"use strict";n.d(t,{ML:()=>Xe,W_:()=>Ve,NB:()=>tt,OX:()=>rt,y$:()=>it,E9:()=>ct,e6:()=>ft,o4:()=>gt,xv:()=>Pt,YR:()=>zt,Jh:()=>he});var o=n(35583);function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function i(e){return!!e&&!!e[W]}function a(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===q}(e)||Array.isArray(e)||!!e[G]||!!(null===(t=e.constructor)||void 0===t?void 0:t[G])||f(e)||h(e))}function s(e,t,n){void 0===n&&(n=!1),0===l(e)?(n?Object.keys:H)(e).forEach((function(o){n&&"symbol"==typeof o||t(o,e[o],e)})):e.forEach((function(n,o){return t(o,n,e)}))}function l(e){var t=e[W];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:f(e)?2:h(e)?3:0}function c(e,t){return 2===l(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){return 2===l(e)?e.get(t):e[t]}function d(e,t,n){var o=l(e);2===o?e.set(t,n):3===o?(e.delete(t),e.add(n)):e[t]=n}function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e){return K&&e instanceof Map}function h(e){return Z&&e instanceof Set}function m(e){return e.o||e.t}function g(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=$(e);delete t[W];for(var n=H(t),o=0;o<n.length;o++){var r=n[o],i=t[r];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[r]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[r]})}return Object.create(Object.getPrototypeOf(e),t)}function v(e,t){return void 0===t&&(t=!1),b(e)||i(e)||!a(e)||(l(e)>1&&(e.set=e.add=e.clear=e.delete=y),Object.freeze(e),t&&s(e,(function(e,t){return v(t,!0)}),!0)),e}function y(){r(2)}function b(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function w(e){var t=X[e];return t||r(18,e),t}function S(){return j}function P(e,t){t&&(w("Patches"),e.u=[],e.s=[],e.v=t)}function E(e){x(e),e.p.forEach(C),e.p=null}function x(e){e===j&&(j=e.l)}function D(e){return j={p:[],l:j,h:e,m:!0,_:0}}function C(e){var t=e[W];0===t.i||1===t.i?t.j():t.O=!0}function k(e,t){t._=t.p.length;var n=t.p[0],o=void 0!==e&&e!==n;return t.h.g||w("ES5").S(t,e,o),o?(n[W].P&&(E(t),r(4)),a(e)&&(e=O(t,e),t.l||T(t,e)),t.u&&w("Patches").M(n[W].t,e,t.u,t.s)):e=O(t,n,[]),E(t),t.u&&t.v(t.u,t.s),e!==V?e:void 0}function O(e,t,n){if(b(t))return t;var o=t[W];if(!o)return s(t,(function(r,i){return A(e,o,t,r,i,n)}),!0),t;if(o.A!==e)return t;if(!o.P)return T(e,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var r=4===o.i||5===o.i?o.o=g(o.k):o.o;s(3===o.i?new Set(r):r,(function(t,i){return A(e,o,r,t,i,n)})),T(e,r,!1),n&&e.u&&w("Patches").R(o,n,e.u,e.s)}return o.o}function A(e,t,n,o,r,s){if(i(r)){var l=O(e,r,s&&t&&3!==t.i&&!c(t.D,o)?s.concat(o):void 0);if(d(n,o,l),!i(l))return;e.m=!1}if(a(r)&&!b(r)){if(!e.h.F&&e._<1)return;O(e,r),t&&t.A.l||T(e,r)}}function T(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&v(t,n)}function I(e,t){var n=e[W];return(n?m(n):e)[t]}function F(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var o=Object.getOwnPropertyDescriptor(n,t);if(o)return o;n=Object.getPrototypeOf(n)}}function M(e){e.P||(e.P=!0,e.l&&M(e.l))}function _(e){e.o||(e.o=g(e.t))}function N(e,t,n){var o=f(t)?w("MapSet").N(t,n):h(t)?w("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),o={i:n?1:0,A:t?t.A:S(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},r=o,i=Y;n&&(r=[o],i=J);var a=Proxy.revocable(r,i),s=a.revoke,l=a.proxy;return o.k=l,o.j=s,l}(t,n):w("ES5").J(t,n);return(n?n.A:S()).p.push(o),o}function R(e){return i(e)||r(22,e),function e(t){if(!a(t))return t;var n,o=t[W],r=l(t);if(o){if(!o.P&&(o.i<4||!w("ES5").K(o)))return o.t;o.I=!0,n=L(t,r),o.I=!1}else n=L(t,r);return s(n,(function(t,r){o&&u(o.t,t)===r||d(n,t,e(r))})),3===r?new Set(n):n}(e)}function L(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return g(e)}var B,j,z="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),K="undefined"!=typeof Map,Z="undefined"!=typeof Set,U="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,V=z?Symbol.for("immer-nothing"):((B={})["immer-nothing"]=!0,B),G=z?Symbol.for("immer-draftable"):"__$immer_draftable",W=z?Symbol.for("immer-state"):"__$immer_state",q=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),H="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,$=Object.getOwnPropertyDescriptors||function(e){var t={};return H(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},X={},Y={get:function(e,t){if(t===W)return e;var n=m(e);if(!c(n,t))return function(e,t,n){var o,r=F(t,n);return r?"value"in r?r.value:null===(o=r.get)||void 0===o?void 0:o.call(e.k):void 0}(e,n,t);var o=n[t];return e.I||!a(o)?o:o===I(e.t,t)?(_(e),e.o[t]=N(e.A.h,o,e)):o},has:function(e,t){return t in m(e)},ownKeys:function(e){return Reflect.ownKeys(m(e))},set:function(e,t,n){var o=F(m(e),t);if(null==o?void 0:o.set)return o.set.call(e.k,n),!0;if(!e.P){var r=I(m(e),t),i=null==r?void 0:r[W];if(i&&i.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(p(n,r)&&(void 0!==n||c(e.t,t)))return!0;_(e),M(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==I(e.t,t)||t in e.t?(e.D[t]=!1,_(e),M(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=m(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:o.enumerable,value:n[t]}:o},defineProperty:function(){r(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){r(12)}},J={};s(Y,(function(e,t){J[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),J.deleteProperty=function(e,t){return J.set.call(this,e,t,void 0)},J.set=function(e,t,n){return Y.set.call(this,e[0],t,n,e[0])};var Q=function(){function e(e){var t=this;this.g=U,this.F=!0,this.produce=function(e,n,o){if("function"==typeof e&&"function"!=typeof n){var i=n;n=e;var s=t;return function(e){var t=this;void 0===e&&(e=i);for(var o=arguments.length,r=Array(o>1?o-1:0),a=1;a<o;a++)r[a-1]=arguments[a];return s.produce(e,(function(e){var o;return(o=n).call.apply(o,[t,e].concat(r))}))}}var l;if("function"!=typeof n&&r(6),void 0!==o&&"function"!=typeof o&&r(7),a(e)){var c=D(t),u=N(t,e,void 0),d=!0;try{l=n(u),d=!1}finally{d?E(c):x(c)}return"undefined"!=typeof Promise&&l instanceof Promise?l.then((function(e){return P(c,o),k(e,c)}),(function(e){throw E(c),e})):(P(c,o),k(l,c))}if(!e||"object"!=typeof e){if(void 0===(l=n(e))&&(l=e),l===V&&(l=void 0),t.F&&v(l,!0),o){var p=[],f=[];w("Patches").M(e,l,p,f),o(p,f)}return l}r(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var o=arguments.length,r=Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(r))}))};var o,r,i=t.produce(e,n,(function(e,t){o=e,r=t}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(e){return[e,o,r]})):[i,o,r]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){a(e)||r(8),i(e)&&(e=R(e));var t=D(this),n=N(this,e,void 0);return n[W].C=!0,x(t),n},t.finishDraft=function(e,t){var n=(e&&e[W]).A;return P(n,t),k(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!U&&r(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var o=t[n];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}n>-1&&(t=t.slice(n+1));var r=w("Patches").$;return i(e)?r(e,t):this.produce(e,(function(e){return r(e,t)}))},e}(),ee=new Q,te=ee.produce,ne=(ee.produceWithPatches.bind(ee),ee.setAutoFreeze.bind(ee),ee.setUseProxies.bind(ee),ee.applyPatches.bind(ee),ee.createDraft.bind(ee)),oe=ee.finishDraft.bind(ee);function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ie=new WeakMap,ae=new WeakMap,se=new WeakMap,le=new WeakMap,ce=new WeakMap,ue=new WeakMap,de=new WeakMap;function pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var he=()=>{var e={children:[],operations:[],selection:null,marks:null,isInline:()=>!1,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:t=>{for(var n of Xe.pathRefs(e))at.transform(n,t);for(var o of Xe.pointRefs(e))ut.transform(o,t);for(var r of Xe.rangeRefs(e))ht.transform(r,t);var i,a,s=ie.get(e)||[],l=ae.get(e)||new Set,c=e=>{if(e){var t=e.join(",");a.has(t)||(a.add(t),i.push(e))}};if(it.operationCanTransformPath(t))for(var u of(i=[],a=new Set,s)){c(it.transform(u,t))}else i=s,a=l;var d=e.getDirtyPaths(t);for(var p of d)c(p);ie.set(e,i),ae.set(e,a),zt.transform(e,t),e.operations.push(t),Xe.normalize(e,{operation:t}),"set_selection"===t.type&&(e.marks=null),se.get(e)||(se.set(e,!0),Promise.resolve().then((()=>{se.set(e,!1),e.onChange({operation:t}),e.operations=[]})))},addMark:(t,n)=>{var{selection:o,markableVoid:r}=e;if(o){var i=(t,n)=>{if(!Pt.isText(t))return!1;var[o,r]=Xe.parent(e,n);return!e.isVoid(o)||e.markableVoid(o)},a=ft.isExpanded(o),s=!1;if(!a){var[l,c]=Xe.node(e,o);if(l&&i(l,c)){var[u]=Xe.parent(e,c);s=u&&e.markableVoid(u)}}if(a||s)zt.setNodes(e,{[t]:n},{match:i,split:!0,voids:!0});else{var d=fe(fe({},Xe.marks(e)||{}),{},{[t]:n});e.marks=d,se.get(e)||e.onChange()}}},deleteBackward:t=>{var{selection:n}=e;n&&ft.isCollapsed(n)&&zt.delete(e,{unit:t,reverse:!0})},deleteForward:t=>{var{selection:n}=e;n&&ft.isCollapsed(n)&&zt.delete(e,{unit:t})},deleteFragment:t=>{var{selection:n}=e;n&&ft.isExpanded(n)&&zt.delete(e,{reverse:"backward"===t})},getFragment:()=>{var{selection:t}=e;return t?tt.fragment(e,t):[]},insertBreak:()=>{zt.splitNodes(e,{always:!0})},insertSoftBreak:()=>{zt.splitNodes(e,{always:!0})},insertFragment:t=>{zt.insertFragment(e,t)},insertNode:t=>{zt.insertNodes(e,t)},insertText:t=>{var{selection:n,marks:o}=e;if(n){if(o){var r=fe({text:t},o);zt.insertNodes(e,r)}else zt.insertText(e,t);e.marks=null}},normalizeNode:t=>{var[n,o]=t;if(!Pt.isText(n))if(Ve.isElement(n)&&0===n.children.length){zt.insertNodes(e,{text:""},{at:o.concat(0),voids:!0})}else for(var r=!Xe.isEditor(n)&&(Ve.isElement(n)&&(e.isInline(n)||0===n.children.length||Pt.isText(n.children[0])||e.isInline(n.children[0]))),i=0,a=0;a<n.children.length;a++,i++){var s=tt.get(e,o);if(!Pt.isText(s)){var l=n.children[a],c=s.children[i-1],u=a===n.children.length-1;if((Pt.isText(l)||Ve.isElement(l)&&e.isInline(l))!==r)zt.removeNodes(e,{at:o.concat(i),voids:!0}),i--;else if(Ve.isElement(l)){if(e.isInline(l))if(null!=c&&Pt.isText(c)){if(u){zt.insertNodes(e,{text:""},{at:o.concat(i+1),voids:!0}),i++}}else{zt.insertNodes(e,{text:""},{at:o.concat(i),voids:!0}),i++}}else null!=c&&Pt.isText(c)&&(Pt.equals(l,c,{loose:!0})?(zt.mergeNodes(e,{at:o.concat(i),voids:!0}),i--):""===c.text?(zt.removeNodes(e,{at:o.concat(i-1),voids:!0}),i--):""===l.text&&(zt.removeNodes(e,{at:o.concat(i),voids:!0}),i--))}}},removeMark:t=>{var{selection:n}=e;if(n){var o=(t,n)=>{if(!Pt.isText(t))return!1;var[o,r]=Xe.parent(e,n);return!e.isVoid(o)||e.markableVoid(o)},r=ft.isExpanded(n),i=!1;if(!r){var[a,s]=Xe.node(e,n);if(a&&o(a,s)){var[l]=Xe.parent(e,s);i=l&&e.markableVoid(l)}}if(r||i)zt.unsetNodes(e,t,{match:o,split:!0,voids:!0});else{var c=fe({},Xe.marks(e)||{});delete c[t],e.marks=c,se.get(e)||e.onChange()}}},getDirtyPaths:e=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":var{path:t}=e;return it.levels(t);case"insert_node":var{node:n,path:o}=e,r=it.levels(o),i=Pt.isText(n)?[]:Array.from(tt.nodes(n),(e=>{var[,t]=e;return o.concat(t)}));return[...r,...i];case"merge_node":var{path:a}=e;return[...it.ancestors(a),it.previous(a)];case"move_node":var{path:s,newPath:l}=e;if(it.equals(s,l))return[];var c=[],u=[];for(var d of it.ancestors(s)){var p=it.transform(d,e);c.push(p)}for(var f of it.ancestors(l)){var h=it.transform(f,e);u.push(h)}var m=u[u.length-1],g=l[l.length-1],v=m.concat(g);return[...c,...u,v];case"remove_node":var{path:y}=e;return[...it.ancestors(y)];case"split_node":var{path:b}=e;return[...it.levels(b),it.next(b)];default:return[]}},shouldNormalize:e=>{var{iteration:t,initialDirtyPathsLength:n}=e,o=42*n;if(t>o)throw new Error("Could not completely normalize the editor after ".concat(o," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0}};return e};function me(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var ge,ve=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!t,o=t?Ee(e):e,r=ge.None,i=ge.None,a=0,s=null;for(var l of o){var c=l.codePointAt(0);if(!c)break;var u=Ne(l,c);if([r,i]=n?[i,u]:[u,r],Re(r,ge.ZWJ)&&Re(i,ge.ExtPict)&&!ze(n?e.substring(0,a):e.substring(0,e.length-a)))break;if(Re(r,ge.RI)&&Re(i,ge.RI)&&!(s=null!==s?!s:!!n||Ze(e.substring(0,e.length-a))))break;if(r!==ge.None&&i!==ge.None&&Be(r,i))break;a+=l.length}return a||1},ye=/\s/,be=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,we=/['\u2018\u2019]/,Se=(e,t,n)=>{if(n){var o=e.length-t;return[e.slice(o,e.length),e.slice(0,o)]}return[e.slice(0,t),e.slice(t)]},Pe=function e(t,n){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(ye.test(t))return!1;if(we.test(t)){var r=ve(n,o),[i,a]=Se(n,r,o);if(e(i,a,o))return!0}return!be.test(t)},Ee=function*(e){for(var t=e.length-1,n=0;n<e.length;n++){var o=e.charAt(t-n);if(De(o.charCodeAt(0))){var r=e.charAt(t-n-1);if(xe(r.charCodeAt(0))){yield r+o,n++;continue}}yield o}},xe=e=>e>=55296&&e<=56319,De=e=>e>=56320&&e<=57343;!function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"}(ge||(ge={}));var Ce=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,ke=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,Oe=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,Ae=/^[\u1100-\u115F\uA960-\uA97C]$/,Te=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,Ie=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Fe=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,Me=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,_e=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,Ne=(e,t)=>{var n=ge.Any;return-1!==e.search(Ce)&&(n|=ge.Extend),8205===t&&(n|=ge.ZWJ),t>=127462&&t<=127487&&(n|=ge.RI),-1!==e.search(ke)&&(n|=ge.Prepend),-1!==e.search(Oe)&&(n|=ge.SpacingMark),-1!==e.search(Ae)&&(n|=ge.L),-1!==e.search(Te)&&(n|=ge.V),-1!==e.search(Ie)&&(n|=ge.T),-1!==e.search(Fe)&&(n|=ge.LV),-1!==e.search(Me)&&(n|=ge.LVT),-1!==e.search(_e)&&(n|=ge.ExtPict),n};function Re(e,t){return 0!=(e&t)}var Le=[[ge.L,ge.L|ge.V|ge.LV|ge.LVT],[ge.LV|ge.V,ge.V|ge.T],[ge.LVT|ge.T,ge.T],[ge.Any,ge.Extend|ge.ZWJ],[ge.Any,ge.SpacingMark],[ge.Prepend,ge.Any],[ge.ZWJ,ge.ExtPict],[ge.RI,ge.RI]];function Be(e,t){return-1===Le.findIndex((n=>Re(e,n[0])&&Re(t,n[1])))}var je=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,ze=e=>-1!==e.search(je),Ke=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Ze=e=>{var t=e.match(Ke);return null!==t&&t[0].length/2%2==1},Ue=e=>(0,o.P)(e)&&tt.isNodeList(e.children)&&!Xe.isEditor(e),Ve={isAncestor:e=>(0,o.P)(e)&&tt.isNodeList(e.children),isElement:Ue,isElementList:e=>Array.isArray(e)&&e.every((e=>Ve.isElement(e))),isElementProps:e=>void 0!==e.children,isElementType:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return Ue(e)&&e[n]===t},matches(e,t){for(var n in t)if("children"!==n&&e[n]!==t[n])return!1;return!0}},Ge=["text"],We=["text"];function qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $e=new WeakMap,Xe={above(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{voids:n=!1,mode:o="lowest",at:r=e.selection,match:i}=t;if(r){var a=Xe.path(e,r),s="lowest"===o;for(var[l,c]of Xe.levels(e,{at:a,voids:n,match:i,reverse:s}))if(!Pt.isText(l))if(ft.isRange(r)){if(it.isAncestor(c,r.anchor.path)&&it.isAncestor(c,r.focus.path))return[l,c]}else if(!it.equals(a,c))return[l,c]}},addMark(e,t,n){e.addMark(t,n)},after(e,t){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={anchor:Xe.point(e,t,{edge:"end"}),focus:Xe.end(e,[])},{distance:i=1}=o,a=0;for(var s of Xe.positions(e,He(He({},o),{},{at:r}))){if(a>i)break;0!==a&&(n=s),a++}return n},before(e,t){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={anchor:Xe.start(e,[]),focus:Xe.point(e,t,{edge:"start"})},{distance:i=1}=o,a=0;for(var s of Xe.positions(e,He(He({},o),{},{at:r,reverse:!0}))){if(a>i)break;0!==a&&(n=s),a++}return n},deleteBackward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{direction:n="forward"}=t;e.deleteFragment(n)},edges:(e,t)=>[Xe.start(e,t),Xe.end(e,t)],end:(e,t)=>Xe.point(e,t,{edge:"end"}),first(e,t){var n=Xe.path(e,t,{edge:"start"});return Xe.node(e,n)},fragment(e,t){var n=Xe.range(e,t);return tt.fragment(e,n)},hasBlocks:(e,t)=>t.children.some((t=>Ve.isElement(t)&&Xe.isBlock(e,t))),hasInlines:(e,t)=>t.children.some((t=>Pt.isText(t)||Xe.isInline(e,t))),hasTexts:(e,t)=>t.children.every((e=>Pt.isText(e))),insertBreak(e){e.insertBreak()},insertSoftBreak(e){e.insertSoftBreak()},insertFragment(e,t){e.insertFragment(t)},insertNode(e,t){e.insertNode(t)},insertText(e,t){e.insertText(t)},isBlock:(e,t)=>!e.isInline(t),isEditor(e){var t=$e.get(e);if(void 0!==t)return t;if(!(0,o.P)(e))return!1;var n="function"==typeof e.addMark&&"function"==typeof e.apply&&"function"==typeof e.deleteBackward&&"function"==typeof e.deleteForward&&"function"==typeof e.deleteFragment&&"function"==typeof e.insertBreak&&"function"==typeof e.insertSoftBreak&&"function"==typeof e.insertFragment&&"function"==typeof e.insertNode&&"function"==typeof e.insertText&&"function"==typeof e.isInline&&"function"==typeof e.isVoid&&"function"==typeof e.normalizeNode&&"function"==typeof e.onChange&&"function"==typeof e.removeMark&&"function"==typeof e.getDirtyPaths&&(null===e.marks||(0,o.P)(e.marks))&&(null===e.selection||ft.isRange(e.selection))&&tt.isNodeList(e.children)&&rt.isOperationList(e.operations);return $e.set(e,n),n},isEnd(e,t,n){var o=Xe.end(e,n);return ct.equals(t,o)},isEdge:(e,t,n)=>Xe.isStart(e,t,n)||Xe.isEnd(e,t,n),isEmpty(e,t){var{children:n}=t,[o]=n;return 0===n.length||1===n.length&&Pt.isText(o)&&""===o.text&&!e.isVoid(t)},isInline:(e,t)=>e.isInline(t),isNormalizing(e){var t=le.get(e);return void 0===t||t},isStart(e,t,n){if(0!==t.offset)return!1;var o=Xe.start(e,n);return ct.equals(t,o)},isVoid:(e,t)=>e.isVoid(t),last(e,t){var n=Xe.path(e,t,{edge:"end"});return Xe.node(e,n)},leaf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=Xe.path(e,t,n);return[tt.leaf(e,o),o]},*levels(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{at:n=e.selection,reverse:o=!1,voids:r=!1}=t,{match:i}=t;if(null==i&&(i=()=>!0),n){var a=[],s=Xe.path(e,n);for(var[l,c]of tt.levels(e,s))if(i(l,c)&&(a.push([l,c]),!r&&Ve.isElement(l)&&Xe.isVoid(e,l)))break;o&&a.reverse(),yield*a}},marks(e){var{marks:t,selection:n}=e;if(!n)return null;if(t)return t;if(ft.isExpanded(n)){var[o]=Xe.nodes(e,{match:Pt.isText});if(o){var[r]=o;return me(r,Ge)}return{}}var{anchor:i}=n,{path:a}=i,[s]=Xe.leaf(e,a);if(0===i.offset){var l=Xe.previous(e,{at:a,match:Pt.isText}),c=Xe.above(e,{match:t=>Ve.isElement(t)&&Xe.isVoid(e,t)&&e.markableVoid(t)});if(!c){var u=Xe.above(e,{match:t=>Ve.isElement(t)&&Xe.isBlock(e,t)});if(l&&u){var[d,p]=l,[,f]=u;it.isAncestor(f,p)&&(s=d)}}}return me(s,We)},next(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{mode:n="lowest",voids:o=!1}=t,{match:r,at:i=e.selection}=t;if(i){var a=Xe.after(e,i,{voids:o});if(a){var[,s]=Xe.last(e,[]),l=[a.path,s];if(it.isPath(i)&&0===i.length)throw new Error("Cannot get the next node from the root node!");if(null==r)if(it.isPath(i)){var[c]=Xe.parent(e,i);r=e=>c.children.includes(e)}else r=()=>!0;var[u]=Xe.nodes(e,{at:l,match:r,mode:n,voids:o});return u}}},node(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=Xe.path(e,t,n);return[tt.get(e,o),o]},*nodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{at:n=e.selection,mode:o="all",universal:r=!1,reverse:i=!1,voids:a=!1}=t,{match:s}=t;if(s||(s=()=>!0),n){var l,c;if(Ye.isSpan(n))l=n[0],c=n[1];else{var u=Xe.path(e,n,{edge:"start"}),d=Xe.path(e,n,{edge:"end"});l=i?d:u,c=i?u:d}var p,f=tt.nodes(e,{reverse:i,from:l,to:c,pass:t=>{var[n]=t;return!a&&(Ve.isElement(n)&&Xe.isVoid(e,n))}}),h=[];for(var[m,g]of f){var v=p&&0===it.compare(g,p[1]);if("highest"!==o||!v)if(s(m,g))if("lowest"===o&&v)p=[m,g];else{var y="lowest"===o?p:[m,g];y&&(r?h.push(y):yield y),p=[m,g]}else if(r&&!v&&Pt.isText(m))return}"lowest"===o&&p&&(r?h.push(p):yield p),r&&(yield*h)}},normalize(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{force:n=!1,operation:o}=t,r=e=>ie.get(e)||[],i=e=>{var t=r(e).pop(),n=t.join(",");return(e=>ae.get(e)||new Set)(e).delete(n),t};if(Xe.isNormalizing(e)){if(n){var a=Array.from(tt.nodes(e),(e=>{var[,t]=e;return t})),s=new Set(a.map((e=>e.join(","))));ie.set(e,a),ae.set(e,s)}0!==r(e).length&&Xe.withoutNormalizing(e,(()=>{for(var t of r(e))if(tt.has(e,t)){var n=Xe.node(e,t),[a,s]=n;Ve.isElement(a)&&0===a.children.length&&e.normalizeNode(n,{operation:o})}for(var l=r(e),c=l.length,u=0;0!==l.length;){if(!e.shouldNormalize({dirtyPaths:l,iteration:u,initialDirtyPathsLength:c,operation:o}))return;var d=i(e);if(tt.has(e,d)){var p=Xe.node(e,d);e.normalizeNode(p,{operation:o})}u++,l=r(e)}}))}},parent(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=Xe.path(e,t,n),r=it.parent(o);return Xe.node(e,r)},path(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{depth:o,edge:r}=n;if(it.isPath(t))if("start"===r){var[,i]=tt.first(e,t);t=i}else if("end"===r){var[,a]=tt.last(e,t);t=a}return ft.isRange(t)&&(t="start"===r?ft.start(t):"end"===r?ft.end(t):it.common(t.anchor.path,t.focus.path)),ct.isPoint(t)&&(t=t.path),null!=o&&(t=t.slice(0,o)),t},hasPath:(e,t)=>tt.has(e,t),pathRef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:o="forward"}=n,r={current:t,affinity:o,unref(){var{current:t}=r;return Xe.pathRefs(e).delete(r),r.current=null,t}};return Xe.pathRefs(e).add(r),r},pathRefs(e){var t=ce.get(e);return t||(t=new Set,ce.set(e,t)),t},point(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{edge:o="start"}=n;if(it.isPath(t)){var r;if("end"===o){var[,i]=tt.last(e,t);r=i}else{var[,a]=tt.first(e,t);r=a}var s=tt.get(e,r);if(!Pt.isText(s))throw new Error("Cannot get the ".concat(o," point in the node at path [").concat(t,"] because it has no ").concat(o," text node."));return{path:r,offset:"end"===o?s.text.length:0}}if(ft.isRange(t)){var[l,c]=ft.edges(t);return"start"===o?l:c}return t},pointRef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:o="forward"}=n,r={current:t,affinity:o,unref(){var{current:t}=r;return Xe.pointRefs(e).delete(r),r.current=null,t}};return Xe.pointRefs(e).add(r),r},pointRefs(e){var t=ue.get(e);return t||(t=new Set,ue.set(e,t)),t},*positions(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{at:n=e.selection,unit:o="offset",reverse:r=!1,voids:i=!1}=t;if(n){var a=Xe.range(e,n),[s,l]=ft.edges(a),c=r?l:s,u=!1,d="",p=0,f=0,h=0;for(var[m,g]of Xe.nodes(e,{at:n,reverse:r,voids:i})){if(Ve.isElement(m)){if(!i&&e.isVoid(m)){yield Xe.start(e,g);continue}if(e.isInline(m))continue;if(Xe.hasInlines(e,m)){var v=it.isAncestor(g,l.path)?l:Xe.end(e,g),y=it.isAncestor(g,s.path)?s:Xe.start(e,g);d=Xe.string(e,{anchor:y,focus:v},{voids:i}),u=!0}}if(Pt.isText(m)){var b=it.equals(g,c.path);for(b?(f=r?c.offset:m.text.length-c.offset,h=c.offset):(f=m.text.length,h=r?f:0),(b||u||"offset"===o)&&(yield{path:g,offset:h},u=!1);;){if(0===p){if(""===d)break;p=w(d,o,r),d=Se(d,p,r)[1]}if(h=r?h-p:h+p,(f-=p)<0){p=-f;break}p=0,yield{path:g,offset:h}}}}}function w(e,t,n){return"character"===t?ve(e,n):"word"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,o=!1;e.length>0;){var r=ve(e,t),[i,a]=Se(e,r,t);if(Pe(i,a,t))o=!0,n+=r;else{if(o)break;n+=r}e=a}return n}(e,n):"line"===t||"block"===t?e.length:1}},previous(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{mode:n="lowest",voids:o=!1}=t,{match:r,at:i=e.selection}=t;if(i){var a=Xe.before(e,i,{voids:o});if(a){var[,s]=Xe.first(e,[]),l=[a.path,s];if(it.isPath(i)&&0===i.length)throw new Error("Cannot get the previous node from the root node!");if(null==r)if(it.isPath(i)){var[c]=Xe.parent(e,i);r=e=>c.children.includes(e)}else r=()=>!0;var[u]=Xe.nodes(e,{reverse:!0,at:l,match:r,mode:n,voids:o});return u}}},range:(e,t,n)=>ft.isRange(t)&&!n?t:{anchor:Xe.start(e,t),focus:Xe.end(e,n||t)},rangeRef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:o="forward"}=n,r={current:t,affinity:o,unref(){var{current:t}=r;return Xe.rangeRefs(e).delete(r),r.current=null,t}};return Xe.rangeRefs(e).add(r),r},rangeRefs(e){var t=de.get(e);return t||(t=new Set,de.set(e,t)),t},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){le.set(e,t)},start:(e,t)=>Xe.point(e,t,{edge:"start"}),string(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{voids:o=!1}=n,r=Xe.range(e,t),[i,a]=ft.edges(r),s="";for(var[l,c]of Xe.nodes(e,{at:r,match:Pt.isText,voids:o})){var u=l.text;it.equals(c,a.path)&&(u=u.slice(0,a.offset)),it.equals(c,i.path)&&(u=u.slice(i.offset)),s+=u}return s},unhangRange(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{voids:o=!1}=n,[r,i]=ft.edges(t);if(0!==r.offset||0!==i.offset||ft.isCollapsed(t)||it.hasPrevious(i.path))return t;var a=Xe.above(e,{at:i,match:t=>Ve.isElement(t)&&Xe.isBlock(e,t),voids:o}),s=a?a[1]:[],l={anchor:Xe.start(e,r),focus:i},c=!0;for(var[u,d]of Xe.nodes(e,{at:l,match:Pt.isText,reverse:!0,voids:o}))if(c)c=!1;else if(""!==u.text||it.isBefore(d,s)){i={path:d,offset:u.text.length};break}return{anchor:r,focus:i}},void(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Xe.above(e,He(He({},t),{},{match:t=>Ve.isElement(t)&&Xe.isVoid(e,t)}))},withoutNormalizing(e,t){var n=Xe.isNormalizing(e);Xe.setNormalizing(e,!1);try{t()}finally{Xe.setNormalizing(e,n)}Xe.normalize(e)}},Ye={isSpan:e=>Array.isArray(e)&&2===e.length&&e.every(it.isPath)},Je=["children"],Qe=["text"],et=new WeakMap,tt={ancestor(e,t){var n=tt.get(e,t);if(Pt.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(gt.stringify(n)));return n},*ancestors(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(var o of it.ancestors(t,n)){var r=[tt.ancestor(e,o),o];yield r}},child(e,t){if(Pt.isText(e))throw new Error("Cannot get the child of a text node: ".concat(gt.stringify(e)));var n=e.children[t];if(null==n)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(gt.stringify(e)));return n},*children(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{reverse:o=!1}=n,r=tt.ancestor(e,t),{children:i}=r,a=o?i.length-1:0;o?a>=0:a<i.length;){var s=tt.child(r,a),l=t.concat(a);yield[s,l],a=o?a-1:a+1}},common(e,t,n){var o=it.common(t,n);return[tt.get(e,o),o]},descendant(e,t){var n=tt.get(e,t);if(Xe.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(gt.stringify(n)));return n},*descendants(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var[n,o]of tt.nodes(e,t))0!==o.length&&(yield[n,o])},*elements(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var[n,o]of tt.nodes(e,t))Ve.isElement(n)&&(yield[n,o])},extractProps:e=>Ve.isAncestor(e)?me(e,Je):me(e,Qe),first(e,t){for(var n=t.slice(),o=tt.get(e,n);o&&!Pt.isText(o)&&0!==o.children.length;)o=o.children[0],n.push(0);return[o,n]},fragment(e,t){if(Pt.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(gt.stringify(e)));var n=te({children:e.children},(e=>{var[n,o]=ft.edges(t),r=tt.nodes(e,{reverse:!0,pass:e=>{var[,n]=e;return!ft.includes(t,n)}});for(var[,i]of r){if(!ft.includes(t,i)){var a=tt.parent(e,i),s=i[i.length-1];a.children.splice(s,1)}if(it.equals(i,o.path)){var l=tt.leaf(e,i);l.text=l.text.slice(0,o.offset)}if(it.equals(i,n.path)){var c=tt.leaf(e,i);c.text=c.text.slice(n.offset)}}Xe.isEditor(e)&&(e.selection=null)}));return n.children},get(e,t){for(var n=e,o=0;o<t.length;o++){var r=t[o];if(Pt.isText(n)||!n.children[r])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(gt.stringify(e)));n=n.children[r]}return n},has(e,t){for(var n=e,o=0;o<t.length;o++){var r=t[o];if(Pt.isText(n)||!n.children[r])return!1;n=n.children[r]}return!0},isNode:e=>Pt.isText(e)||Ve.isElement(e)||Xe.isEditor(e),isNodeList(e){if(!Array.isArray(e))return!1;var t=et.get(e);if(void 0!==t)return t;var n=e.every((e=>tt.isNode(e)));return et.set(e,n),n},last(e,t){for(var n=t.slice(),o=tt.get(e,n);o&&!Pt.isText(o)&&0!==o.children.length;){var r=o.children.length-1;o=o.children[r],n.push(r)}return[o,n]},leaf(e,t){var n=tt.get(e,t);if(!Pt.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(gt.stringify(n)));return n},*levels(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(var o of it.levels(t,n)){var r=tt.get(e,o);yield[r,o]}},matches:(e,t)=>Ve.isElement(e)&&Ve.isElementProps(t)&&Ve.matches(e,t)||Pt.isText(e)&&Pt.isTextProps(t)&&Pt.matches(e,t),*nodes(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{pass:n,reverse:o=!1}=t,{from:r=[],to:i}=t,a=new Set,s=[],l=e;!i||!(o?it.isBefore(s,i):it.isAfter(s,i));)if(a.has(l)||(yield[l,s]),a.has(l)||Pt.isText(l)||0===l.children.length||null!=n&&!1!==n([l,s])){if(0===s.length)break;if(!o){var c=it.next(s);if(tt.has(e,c)){s=c,l=tt.get(e,s);continue}}if(o&&0!==s[s.length-1])s=it.previous(s),l=tt.get(e,s);else s=it.parent(s),l=tt.get(e,s),a.add(l)}else{a.add(l);var u=o?l.children.length-1:0;it.isAncestor(s,r)&&(u=r[s.length]),s=s.concat(u),l=tt.get(e,s)}},parent(e,t){var n=it.parent(t),o=tt.get(e,n);if(Pt.isText(o))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return o},string:e=>Pt.isText(e)?e.text:e.children.map(tt.string).join(""),*texts(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var[n,o]of tt.nodes(e,t))Pt.isText(n)&&(yield[n,o])}};function nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ot(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nt(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var rt={isNodeOperation:e=>rt.isOperation(e)&&e.type.endsWith("_node"),isOperation(e){if(!(0,o.P)(e))return!1;switch(e.type){case"insert_node":case"remove_node":return it.isPath(e.path)&&tt.isNode(e.node);case"insert_text":case"remove_text":return"number"==typeof e.offset&&"string"==typeof e.text&&it.isPath(e.path);case"merge_node":return"number"==typeof e.position&&it.isPath(e.path)&&(0,o.P)(e.properties);case"move_node":return it.isPath(e.path)&&it.isPath(e.newPath);case"set_node":return it.isPath(e.path)&&(0,o.P)(e.properties)&&(0,o.P)(e.newProperties);case"set_selection":return null===e.properties&&ft.isRange(e.newProperties)||null===e.newProperties&&ft.isRange(e.properties)||(0,o.P)(e.properties)&&(0,o.P)(e.newProperties);case"split_node":return it.isPath(e.path)&&"number"==typeof e.position&&(0,o.P)(e.properties);default:return!1}},isOperationList:e=>Array.isArray(e)&&e.every((e=>rt.isOperation(e))),isSelectionOperation:e=>rt.isOperation(e)&&e.type.endsWith("_selection"),isTextOperation:e=>rt.isOperation(e)&&e.type.endsWith("_text"),inverse(e){switch(e.type){case"insert_node":return ot(ot({},e),{},{type:"remove_node"});case"insert_text":return ot(ot({},e),{},{type:"remove_text"});case"merge_node":return ot(ot({},e),{},{type:"split_node",path:it.previous(e.path)});case"move_node":var{newPath:t,path:n}=e;if(it.equals(t,n))return e;if(it.isSibling(n,t))return ot(ot({},e),{},{path:t,newPath:n});var o=it.transform(n,e),r=it.transform(it.next(n),e);return ot(ot({},e),{},{path:o,newPath:r});case"remove_node":return ot(ot({},e),{},{type:"insert_node"});case"remove_text":return ot(ot({},e),{},{type:"insert_text"});case"set_node":var{properties:i,newProperties:a}=e;return ot(ot({},e),{},{properties:a,newProperties:i});case"set_selection":var{properties:s,newProperties:l}=e;return ot(ot({},e),{},null==s?{properties:l,newProperties:null}:null==l?{properties:null,newProperties:s}:{properties:l,newProperties:s});case"split_node":return ot(ot({},e),{},{type:"merge_node",path:it.next(e.path)})}}},it={ancestors(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,o=it.levels(e,t);return o=n?o.slice(1):o.slice(0,-1)},common(e,t){for(var n=[],o=0;o<e.length&&o<t.length;o++){var r=e[o];if(r!==t[o])break;n.push(r)}return n},compare(e,t){for(var n=Math.min(e.length,t.length),o=0;o<n;o++){if(e[o]<t[o])return-1;if(e[o]>t[o])return 1}return 0},endsAfter(e,t){var n=e.length-1,o=e.slice(0,n),r=t.slice(0,n),i=e[n],a=t[n];return it.equals(o,r)&&i>a},endsAt(e,t){var n=e.length,o=e.slice(0,n),r=t.slice(0,n);return it.equals(o,r)},endsBefore(e,t){var n=e.length-1,o=e.slice(0,n),r=t.slice(0,n),i=e[n],a=t[n];return it.equals(o,r)&&i<a},equals:(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n])),hasPrevious:e=>e[e.length-1]>0,isAfter:(e,t)=>1===it.compare(e,t),isAncestor:(e,t)=>e.length<t.length&&0===it.compare(e,t),isBefore:(e,t)=>-1===it.compare(e,t),isChild:(e,t)=>e.length===t.length+1&&0===it.compare(e,t),isCommon:(e,t)=>e.length<=t.length&&0===it.compare(e,t),isDescendant:(e,t)=>e.length>t.length&&0===it.compare(e,t),isParent:(e,t)=>e.length+1===t.length&&0===it.compare(e,t),isPath:e=>Array.isArray(e)&&(0===e.length||"number"==typeof e[0]),isSibling(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),o=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&it.equals(n,o)},levels(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,o=[],r=0;r<=e.length;r++)o.push(e.slice(0,r));return n&&o.reverse(),o},next(e){if(0===e.length)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(0===e.length)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(0===e.length)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!it.isAncestor(t,e)&&!it.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return null;var o=[...e],{affinity:r="forward"}=n;if(0===e.length)return o;switch(t.type){case"insert_node":var{path:i}=t;(it.equals(i,o)||it.endsBefore(i,o)||it.isAncestor(i,o))&&(o[i.length-1]+=1);break;case"remove_node":var{path:a}=t;if(it.equals(a,o)||it.isAncestor(a,o))return null;it.endsBefore(a,o)&&(o[a.length-1]-=1);break;case"merge_node":var{path:s,position:l}=t;it.equals(s,o)||it.endsBefore(s,o)?o[s.length-1]-=1:it.isAncestor(s,o)&&(o[s.length-1]-=1,o[s.length]+=l);break;case"split_node":var{path:c,position:u}=t;if(it.equals(c,o)){if("forward"===r)o[o.length-1]+=1;else if("backward"!==r)return null}else it.endsBefore(c,o)?o[c.length-1]+=1:it.isAncestor(c,o)&&e[c.length]>=u&&(o[c.length-1]+=1,o[c.length]-=u);break;case"move_node":var{path:d,newPath:p}=t;if(it.equals(d,p))return o;if(it.isAncestor(d,o)||it.equals(d,o)){var f=p.slice();return it.endsBefore(d,p)&&d.length<p.length&&(f[d.length-1]-=1),f.concat(o.slice(d.length))}it.isSibling(d,p)&&(it.isAncestor(p,o)||it.equals(p,o))?it.endsBefore(d,o)?o[d.length-1]-=1:o[d.length-1]+=1:it.endsBefore(p,o)||it.equals(p,o)||it.isAncestor(p,o)?(it.endsBefore(d,o)&&(o[d.length-1]-=1),o[p.length-1]+=1):it.endsBefore(d,o)&&(it.equals(p,o)&&(o[p.length-1]+=1),o[d.length-1]-=1)}return o}},at={transform(e,t){var{current:n,affinity:o}=e;if(null!=n){var r=it.transform(n,t,{affinity:o});e.current=r,null==r&&e.unref()}}};function st(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?st(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):st(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ct={compare(e,t){var n=it.compare(e.path,t.path);return 0===n?e.offset<t.offset?-1:e.offset>t.offset?1:0:n},isAfter:(e,t)=>1===ct.compare(e,t),isBefore:(e,t)=>-1===ct.compare(e,t),equals:(e,t)=>e.offset===t.offset&&it.equals(e.path,t.path),isPoint:e=>(0,o.P)(e)&&"number"==typeof e.offset&&it.isPath(e.path),transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return te(e,(e=>{if(null===e)return null;var{affinity:o="forward"}=n,{path:r,offset:i}=e;switch(t.type){case"insert_node":case"move_node":e.path=it.transform(r,t,n);break;case"insert_text":it.equals(t.path,r)&&(t.offset<i||t.offset===i&&"forward"===o)&&(e.offset+=t.text.length);break;case"merge_node":it.equals(t.path,r)&&(e.offset+=t.position),e.path=it.transform(r,t,n);break;case"remove_text":it.equals(t.path,r)&&t.offset<=i&&(e.offset-=Math.min(i-t.offset,t.text.length));break;case"remove_node":if(it.equals(t.path,r)||it.isAncestor(t.path,r))return null;e.path=it.transform(r,t,n);break;case"split_node":if(it.equals(t.path,r)){if(t.position===i&&null==o)return null;(t.position<i||t.position===i&&"forward"===o)&&(e.offset-=t.position,e.path=it.transform(r,t,lt(lt({},n),{},{affinity:"forward"})))}else e.path=it.transform(r,t,n)}}))}},ut={transform(e,t){var{current:n,affinity:o}=e;if(null!=n){var r=ct.transform(n,t,{affinity:o});e.current=r,null==r&&e.unref()}}},dt=["anchor","focus"];function pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var ft={edges(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,{anchor:o,focus:r}=e;return ft.isBackward(e)===n?[o,r]:[r,o]},end(e){var[,t]=ft.edges(e);return t},equals:(e,t)=>ct.equals(e.anchor,t.anchor)&&ct.equals(e.focus,t.focus),includes(e,t){if(ft.isRange(t)){if(ft.includes(e,t.anchor)||ft.includes(e,t.focus))return!0;var[n,o]=ft.edges(e),[r,i]=ft.edges(t);return ct.isBefore(n,r)&&ct.isAfter(o,i)}var[a,s]=ft.edges(e),l=!1,c=!1;return ct.isPoint(t)?(l=ct.compare(t,a)>=0,c=ct.compare(t,s)<=0):(l=it.compare(t,a.path)>=0,c=it.compare(t,s.path)<=0),l&&c},intersection(e,t){var n=me(e,dt),[o,r]=ft.edges(e),[i,a]=ft.edges(t),s=ct.isBefore(o,i)?i:o,l=ct.isBefore(r,a)?r:a;return ct.isBefore(l,s)?null:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pt(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({anchor:s,focus:l},n)},isBackward(e){var{anchor:t,focus:n}=e;return ct.isAfter(t,n)},isCollapsed(e){var{anchor:t,focus:n}=e;return ct.equals(t,n)},isExpanded:e=>!ft.isCollapsed(e),isForward:e=>!ft.isBackward(e),isRange:e=>(0,o.P)(e)&&ct.isPoint(e.anchor)&&ct.isPoint(e.focus),*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=ft.edges(e);return t},transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return te(e,(e=>{if(null===e)return null;var o,r,{affinity:i="inward"}=n;if("inward"===i){var a=ft.isCollapsed(e);ft.isForward(e)?(o="forward",r=a?o:"backward"):(o="backward",r=a?o:"forward")}else"outward"===i?ft.isForward(e)?(o="backward",r="forward"):(o="forward",r="backward"):(o=i,r=i);var s=ct.transform(e.anchor,t,{affinity:o}),l=ct.transform(e.focus,t,{affinity:r});if(!s||!l)return null;e.anchor=s,e.focus=l}))}},ht={transform(e,t){var{current:n,affinity:o}=e;if(null!=n){var r=ft.transform(n,t,{affinity:o});e.current=r,null==r&&e.unref()}}},mt=void 0,gt={setScrubber(e){mt=e},stringify:e=>JSON.stringify(e,mt)},vt=(e,t)=>{for(var n in e){var r=e[n],i=t[n];if((0,o.P)(r)&&(0,o.P)(i)){if(!vt(r,i))return!1}else if(Array.isArray(r)&&Array.isArray(i)){if(r.length!==i.length)return!1;for(var a=0;a<r.length;a++)if(r[a]!==i[a])return!1}else if(r!==i)return!1}for(var s in t)if(void 0===e[s]&&void 0!==t[s])return!1;return!0},yt=["text"],bt=["anchor","focus"];function wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function St(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wt(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pt={equals(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{loose:o=!1}=n;function r(e){return me(e,yt)}return vt(o?r(e):e,o?r(t):t)},isText:e=>(0,o.P)(e)&&"string"==typeof e.text,isTextList:e=>Array.isArray(e)&&e.every((e=>Pt.isText(e))),isTextProps:e=>void 0!==e.text,matches(e,t){for(var n in t)if("text"!==n&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[St({},e)];for(var o of t){var r=me(o,bt),[i,a]=ft.edges(o),s=[],l=0,c=i.offset,u=a.offset;for(var d of n){var{length:p}=d.text,f=l;if(l+=p,c<=f&&l<=u)Object.assign(d,r),s.push(d);else if(c!==u&&(c===l||u===f)||c>l||u<f||u===f&&0!==f)s.push(d);else{var h=d,m=void 0,g=void 0;if(u<l){var v=u-f;g=St(St({},h),{},{text:h.text.slice(v)}),h=St(St({},h),{},{text:h.text.slice(0,v)})}if(c>f){var y=c-f;m=St(St({},h),{},{text:h.text.slice(0,y)}),h=St(St({},h),{},{text:h.text.slice(y)})}Object.assign(h,r),m&&s.push(m),s.push(h),g&&s.push(g)}}n=s}return n}};function Et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function xt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Et(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Dt={transform(e,t){e.children=ne(e.children);var n=e.selection&&ne(e.selection);try{n=((e,t,n)=>{switch(n.type){case"insert_node":var{path:o,node:r}=n,i=tt.parent(e,o),a=o[o.length-1];if(a>i.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(o,"] because the destination is past the end of the node."));if(i.children.splice(a,0,r),t)for(var[s,l]of ft.points(t))t[l]=ct.transform(s,n);break;case"insert_text":var{path:c,offset:u,text:d}=n;if(0===d.length)break;var p=tt.leaf(e,c),f=p.text.slice(0,u),h=p.text.slice(u);if(p.text=f+d+h,t)for(var[m,g]of ft.points(t))t[g]=ct.transform(m,n);break;case"merge_node":var{path:v}=n,y=tt.get(e,v),b=it.previous(v),w=tt.get(e,b),S=tt.parent(e,v),P=v[v.length-1];if(Pt.isText(y)&&Pt.isText(w))w.text+=y.text;else{if(Pt.isText(y)||Pt.isText(w))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(v,"] to nodes of different interfaces: ").concat(gt.stringify(y)," ").concat(gt.stringify(w)));w.children.push(...y.children)}if(S.children.splice(P,1),t)for(var[E,x]of ft.points(t))t[x]=ct.transform(E,n);break;case"move_node":var{path:D,newPath:C}=n;if(it.isAncestor(D,C))throw new Error("Cannot move a path [".concat(D,"] to new path [").concat(C,"] because the destination is inside itself."));var k=tt.get(e,D),O=tt.parent(e,D),A=D[D.length-1];O.children.splice(A,1);var T=it.transform(D,n),I=tt.get(e,it.parent(T)),F=T[T.length-1];if(I.children.splice(F,0,k),t)for(var[M,_]of ft.points(t))t[_]=ct.transform(M,n);break;case"remove_node":var{path:N}=n,R=N[N.length-1];if(tt.parent(e,N).children.splice(R,1),t)for(var[L,B]of ft.points(t)){var j=ct.transform(L,n);if(null!=t&&null!=j)t[B]=j;else{var z=void 0,K=void 0;for(var[Z,U]of tt.texts(e)){if(-1!==it.compare(U,N)){K=[Z,U];break}z=[Z,U]}var V=!1;z&&K&&(V=it.equals(K[1],N)?!it.hasPrevious(K[1]):it.common(z[1],N).length<it.common(K[1],N).length),z&&!V?(L.path=z[1],L.offset=z[0].text.length):K?(L.path=K[1],L.offset=0):t=null}}break;case"remove_text":var{path:G,offset:W,text:q}=n;if(0===q.length)break;var H=tt.leaf(e,G),$=H.text.slice(0,W),X=H.text.slice(W+q.length);if(H.text=$+X,t)for(var[Y,J]of ft.points(t))t[J]=ct.transform(Y,n);break;case"set_node":var{path:Q,properties:ee,newProperties:te}=n;if(0===Q.length)throw new Error("Cannot set properties on the root node!");var ne=tt.get(e,Q);for(var oe in te){if("children"===oe||"text"===oe)throw new Error('Cannot set the "'.concat(oe,'" property of nodes!'));var re=te[oe];null==re?delete ne[oe]:ne[oe]=re}for(var ie in ee)te.hasOwnProperty(ie)||delete ne[ie];break;case"set_selection":var{newProperties:ae}=n;if(null==ae)t=ae;else{if(null==t){if(!ft.isRange(ae))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(gt.stringify(ae)," when there is no current selection."));t=xt({},ae)}for(var se in ae){var le=ae[se];if(null==le){if("anchor"===se||"focus"===se)throw new Error('Cannot remove the "'.concat(se,'" selection property'));delete t[se]}else t[se]=le}}break;case"split_node":var{path:ce,position:ue,properties:de}=n;if(0===ce.length)throw new Error('Cannot apply a "split_node" operation at path ['.concat(ce,"] because the root node cannot be split."));var pe,fe=tt.get(e,ce),he=tt.parent(e,ce),me=ce[ce.length-1];if(Pt.isText(fe)){var ge=fe.text.slice(0,ue),ve=fe.text.slice(ue);fe.text=ge,pe=xt(xt({},de),{},{text:ve})}else{var ye=fe.children.slice(0,ue),be=fe.children.slice(ue);fe.children=ye,pe=xt(xt({},de),{},{children:be})}if(he.children.splice(me+1,0,pe),t)for(var[we,Se]of ft.points(t))t[Se]=ct.transform(we,n)}return t})(e,n,t)}finally{e.children=oe(e.children),e.selection=n?i(n)?oe(n):n:null}}},Ct=["text"],kt=["children"];function Ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function At(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ot(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Tt={insertNodes(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Xe.withoutNormalizing(e,(()=>{var{hanging:o=!1,voids:r=!1,mode:i="lowest"}=n,{at:a,match:s,select:l}=n;if(tt.isNode(t)&&(t=[t]),0!==t.length){var[c]=t;if(a||(a=e.selection?e.selection:e.children.length>0?Xe.end(e,[]):[0],l=!0),null==l&&(l=!1),ft.isRange(a))if(o||(a=Xe.unhangRange(e,a,{voids:r})),ft.isCollapsed(a))a=a.anchor;else{var[,u]=ft.edges(a),d=Xe.pointRef(e,u);zt.delete(e,{at:a}),a=d.unref()}if(ct.isPoint(a)){null==s&&(s=Pt.isText(c)?e=>Pt.isText(e):e.isInline(c)?t=>Pt.isText(t)||Xe.isInline(e,t):t=>Ve.isElement(t)&&Xe.isBlock(e,t));var[p]=Xe.nodes(e,{at:a.path,match:s,mode:i,voids:r});if(!p)return;var[,f]=p,h=Xe.pathRef(e,f),m=Xe.isEnd(e,a,f);zt.splitNodes(e,{at:a,match:s,mode:i,voids:r});var g=h.unref();a=m?it.next(g):g}var v=it.parent(a),y=a[a.length-1];if(r||!Xe.void(e,{at:v})){for(var b of t){var w=v.concat(y);y++,e.apply({type:"insert_node",path:w,node:b}),a=it.next(a)}if(a=it.previous(a),l){var S=Xe.end(e,a);S&&zt.select(e,S)}}}}))},liftNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Xe.withoutNormalizing(e,(()=>{var{at:n=e.selection,mode:o="lowest",voids:r=!1}=t,{match:i}=t;if(null==i&&(i=it.isPath(n)?Mt(e,n):t=>Ve.isElement(t)&&Xe.isBlock(e,t)),n){var a=Xe.nodes(e,{at:n,match:i,mode:o,voids:r}),s=Array.from(a,(t=>{var[,n]=t;return Xe.pathRef(e,n)}));for(var l of s){var c=l.unref();if(c.length<2)throw new Error("Cannot lift node at a path [".concat(c,"] because it has a depth of less than `2`."));var u=Xe.node(e,it.parent(c)),[d,p]=u,f=c[c.length-1],{length:h}=d.children;if(1===h){var m=it.next(p);zt.moveNodes(e,{at:c,to:m,voids:r}),zt.removeNodes(e,{at:p,voids:r})}else if(0===f)zt.moveNodes(e,{at:c,to:p,voids:r});else if(f===h-1){var g=it.next(p);zt.moveNodes(e,{at:c,to:g,voids:r})}else{var v=it.next(c),y=it.next(p);zt.splitNodes(e,{at:v,voids:r}),zt.moveNodes(e,{at:c,to:y,voids:r})}}}}))},mergeNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Xe.withoutNormalizing(e,(()=>{var{match:n,at:o=e.selection}=t,{hanging:r=!1,voids:i=!1,mode:a="lowest"}=t;if(o){if(null==n)if(it.isPath(o)){var[s]=Xe.parent(e,o);n=e=>s.children.includes(e)}else n=t=>Ve.isElement(t)&&Xe.isBlock(e,t);if(!r&&ft.isRange(o)&&(o=Xe.unhangRange(e,o,{voids:i})),ft.isRange(o))if(ft.isCollapsed(o))o=o.anchor;else{var[,l]=ft.edges(o),c=Xe.pointRef(e,l);zt.delete(e,{at:o}),o=c.unref(),null==t.at&&zt.select(e,o)}var[u]=Xe.nodes(e,{at:o,match:n,voids:i,mode:a}),d=Xe.previous(e,{at:o,match:n,voids:i,mode:a});if(u&&d){var[p,f]=u,[h,m]=d;if(0!==f.length&&0!==m.length){var g,v,y=it.next(m),b=it.common(f,m),w=it.isSibling(f,m),S=Array.from(Xe.levels(e,{at:f}),(e=>{var[t]=e;return t})).slice(b.length).slice(0,-1),P=Xe.above(e,{at:f,mode:"highest",match:t=>S.includes(t)&&It(e,t)}),E=P&&Xe.pathRef(e,P[1]);if(Pt.isText(p)&&Pt.isText(h)){var x=me(p,Ct);v=h.text.length,g=x}else{if(!Ve.isElement(p)||!Ve.isElement(h))throw new Error("Cannot merge the node at path [".concat(f,"] with the previous sibling because it is not the same kind: ").concat(gt.stringify(p)," ").concat(gt.stringify(h)));x=me(p,kt);v=h.children.length,g=x}w||zt.moveNodes(e,{at:f,to:y,voids:i}),E&&zt.removeNodes(e,{at:E.current,voids:i}),Ve.isElement(h)&&Xe.isEmpty(e,h)||Pt.isText(h)&&""===h.text&&0!==m[m.length-1]?zt.removeNodes(e,{at:m,voids:i}):e.apply({type:"merge_node",path:y,position:v,properties:g}),E&&E.unref()}}}}))},moveNodes(e,t){Xe.withoutNormalizing(e,(()=>{var{to:n,at:o=e.selection,mode:r="lowest",voids:i=!1}=t,{match:a}=t;if(o){null==a&&(a=it.isPath(o)?Mt(e,o):t=>Ve.isElement(t)&&Xe.isBlock(e,t));var s=Xe.pathRef(e,n),l=Xe.nodes(e,{at:o,match:a,mode:r,voids:i}),c=Array.from(l,(t=>{var[,n]=t;return Xe.pathRef(e,n)}));for(var u of c){var d=u.unref(),p=s.current;0!==d.length&&e.apply({type:"move_node",path:d,newPath:p}),s.current&&it.isSibling(p,d)&&it.isAfter(p,d)&&(s.current=it.next(s.current))}s.unref()}}))},removeNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Xe.withoutNormalizing(e,(()=>{var{hanging:n=!1,voids:o=!1,mode:r="lowest"}=t,{at:i=e.selection,match:a}=t;if(i){null==a&&(a=it.isPath(i)?Mt(e,i):t=>Ve.isElement(t)&&Xe.isBlock(e,t)),!n&&ft.isRange(i)&&(i=Xe.unhangRange(e,i,{voids:o}));var s=Xe.nodes(e,{at:i,match:a,mode:r,voids:o}),l=Array.from(s,(t=>{var[,n]=t;return Xe.pathRef(e,n)}));for(var c of l){var u=c.unref();if(u){var[d]=Xe.node(e,u);e.apply({type:"remove_node",path:u,node:d})}}}}))},setNodes(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Xe.withoutNormalizing(e,(()=>{var{match:o,at:r=e.selection,compare:i,merge:a}=n,{hanging:s=!1,mode:l="lowest",split:c=!1,voids:u=!1}=n;if(r){if(null==o&&(o=it.isPath(r)?Mt(e,r):t=>Ve.isElement(t)&&Xe.isBlock(e,t)),!s&&ft.isRange(r)&&(r=Xe.unhangRange(e,r,{voids:u})),c&&ft.isRange(r)){if(ft.isCollapsed(r)&&Xe.leaf(e,r.anchor)[0].text.length>0)return;var d=Xe.rangeRef(e,r,{affinity:"inward"}),[p,f]=ft.edges(r),h="lowest"===l?"lowest":"highest",m=Xe.isEnd(e,f,f.path);zt.splitNodes(e,{at:f,match:o,mode:h,voids:u,always:!m});var g=Xe.isStart(e,p,p.path);zt.splitNodes(e,{at:p,match:o,mode:h,voids:u,always:!g}),r=d.unref(),null==n.at&&zt.select(e,r)}for(var[v,y]of(i||(i=(e,t)=>e!==t),Xe.nodes(e,{at:r,match:o,mode:l,voids:u}))){var b={},w={};if(0!==y.length){var S=!1;for(var P in t)"children"!==P&&"text"!==P&&i(t[P],v[P])&&(S=!0,v.hasOwnProperty(P)&&(b[P]=v[P]),a?null!=t[P]&&(w[P]=a(v[P],t[P])):null!=t[P]&&(w[P]=t[P]));S&&e.apply({type:"set_node",path:y,properties:b,newProperties:w})}}}}))},splitNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Xe.withoutNormalizing(e,(()=>{var{mode:n="lowest",voids:o=!1}=t,{match:r,at:i=e.selection,height:a=0,always:s=!1}=t;if(null==r&&(r=t=>Ve.isElement(t)&&Xe.isBlock(e,t)),ft.isRange(i)&&(i=Ft(e,i)),it.isPath(i)){var l=i,c=Xe.point(e,l),[u]=Xe.parent(e,l);r=e=>e===u,a=c.path.length-l.length+1,i=c,s=!0}if(i){var d,p=Xe.pointRef(e,i,{affinity:"backward"});try{var[f]=Xe.nodes(e,{at:i,match:r,mode:n,voids:o});if(!f)return;var h=Xe.void(e,{at:i,mode:"highest"});if(!o&&h){var[m,g]=h;if(Ve.isElement(m)&&e.isInline(m)){var v=Xe.after(e,g);if(!v){var y=it.next(g);zt.insertNodes(e,{text:""},{at:y,voids:o}),v=Xe.point(e,y)}i=v,s=!0}a=i.path.length-g.length+1,s=!0}d=Xe.pointRef(e,i);var b=i.path.length-a,[,w]=f,S=i.path.slice(0,b),P=0===a?i.offset:i.path[b]+0;for(var[E,x]of Xe.levels(e,{at:S,reverse:!0,voids:o})){var D=!1;if(x.length<w.length||0===x.length||!o&&Ve.isElement(E)&&Xe.isVoid(e,E))break;var C=p.current,k=Xe.isEnd(e,C,x);if(s||!p||!Xe.isEdge(e,C,x)){D=!0;var O=tt.extractProps(E);e.apply({type:"split_node",path:x,position:P,properties:O})}P=x[x.length-1]+(D||k?1:0)}if(null==t.at){var A=d.current||Xe.end(e,[]);zt.select(e,A)}}finally{var T;p.unref(),null===(T=d)||void 0===T||T.unref()}}}))},unsetNodes(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Array.isArray(t)||(t=[t]);var o={};for(var r of t)o[r]=null;zt.setNodes(e,o,n)},unwrapNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Xe.withoutNormalizing(e,(()=>{var{mode:n="lowest",split:o=!1,voids:r=!1}=t,{at:i=e.selection,match:a}=t;if(i){null==a&&(a=it.isPath(i)?Mt(e,i):t=>Ve.isElement(t)&&Xe.isBlock(e,t)),it.isPath(i)&&(i=Xe.range(e,i));var s=ft.isRange(i)?Xe.rangeRef(e,i):null,l=Xe.nodes(e,{at:i,match:a,mode:n,voids:r}),c=Array.from(l,(t=>{var[,n]=t;return Xe.pathRef(e,n)})).reverse(),u=function(t){var n=t.unref(),[i]=Xe.node(e,n),a=Xe.range(e,n);o&&s&&(a=ft.intersection(s.current,a)),zt.liftNodes(e,{at:a,match:e=>Ve.isAncestor(i)&&i.children.includes(e),voids:r})};for(var d of c)u(d);s&&s.unref()}}))},wrapNodes(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Xe.withoutNormalizing(e,(()=>{var{mode:o="lowest",split:r=!1,voids:i=!1}=n,{match:a,at:s=e.selection}=n;if(s){if(null==a&&(a=it.isPath(s)?Mt(e,s):e.isInline(t)?t=>Ve.isElement(t)&&Xe.isInline(e,t)||Pt.isText(t):t=>Ve.isElement(t)&&Xe.isBlock(e,t)),r&&ft.isRange(s)){var[l,c]=ft.edges(s),u=Xe.rangeRef(e,s,{affinity:"inward"});zt.splitNodes(e,{at:c,match:a,voids:i}),zt.splitNodes(e,{at:l,match:a,voids:i}),s=u.unref(),null==n.at&&zt.select(e,s)}var d=Array.from(Xe.nodes(e,{at:s,match:e.isInline(t)?t=>Ve.isElement(t)&&Xe.isBlock(e,t):e=>Xe.isEditor(e),mode:"lowest",voids:i}));for(var[,p]of d){var f=ft.isRange(s)?ft.intersection(s,Xe.range(e,p)):s;if(f){var h=Array.from(Xe.nodes(e,{at:f,match:a,mode:o,voids:i}));if(h.length>0){var m=function(){var[n]=h,o=h[h.length-1],[,r]=n,[,a]=o;if(0===r.length&&0===a.length)return"continue";var s=it.equals(r,a)?it.parent(r):it.common(r,a),l=Xe.range(e,r,a),c=Xe.node(e,s),[u]=c,d=s.length+1,p=it.next(a.slice(0,d)),f=At(At({},t),{},{children:[]});zt.insertNodes(e,f,{at:p,voids:i}),zt.moveNodes(e,{at:l,match:e=>Ve.isAncestor(u)&&u.children.includes(e),to:p.concat(0),voids:i})}();if("continue"===m)continue}}}}}))}},It=(e,t)=>{if(Ve.isElement(t)){var n=t;return!!Xe.isVoid(e,t)||1===n.children.length&&It(e,n.children[0])}return!Xe.isEditor(t)},Ft=(e,t)=>{if(ft.isCollapsed(t))return t.anchor;var[,n]=ft.edges(t),o=Xe.pointRef(e,n);return zt.delete(e,{at:t}),o.unref()},Mt=(e,t)=>{var[n]=Xe.node(e,t);return e=>e===n};function _t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Nt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Rt={collapse(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{edge:n="anchor"}=t,{selection:o}=e;if(o)if("anchor"===n)zt.select(e,o.anchor);else if("focus"===n)zt.select(e,o.focus);else if("start"===n){var[r]=ft.edges(o);zt.select(e,r)}else if("end"===n){var[,i]=ft.edges(o);zt.select(e,i)}},deselect(e){var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},move(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{selection:n}=e,{distance:o=1,unit:r="character",reverse:i=!1}=t,{edge:a=null}=t;if(n){"start"===a&&(a=ft.isBackward(n)?"focus":"anchor"),"end"===a&&(a=ft.isBackward(n)?"anchor":"focus");var{anchor:s,focus:l}=n,c={distance:o,unit:r},u={};if(null==a||"anchor"===a){var d=i?Xe.before(e,s,c):Xe.after(e,s,c);d&&(u.anchor=d)}if(null==a||"focus"===a){var p=i?Xe.before(e,l,c):Xe.after(e,l,c);p&&(u.focus=p)}zt.setSelection(e,u)}},select(e,t){var{selection:n}=e;if(t=Xe.range(e,t),n)zt.setSelection(e,t);else{if(!ft.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(gt.stringify(t)));e.apply({type:"set_selection",properties:n,newProperties:t})}},setPoint(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{selection:o}=e,{edge:r="both"}=n;if(o){"start"===r&&(r=ft.isBackward(o)?"focus":"anchor"),"end"===r&&(r=ft.isBackward(o)?"anchor":"focus");var{anchor:i,focus:a}=o,s="anchor"===r?i:a;zt.setSelection(e,{["anchor"===r?"anchor":"focus"]:Nt(Nt({},s),t)})}},setSelection(e,t){var{selection:n}=e,o={},r={};if(n){for(var i in t)("anchor"===i&&null!=t.anchor&&!ct.equals(t.anchor,n.anchor)||"focus"===i&&null!=t.focus&&!ct.equals(t.focus,n.focus)||"anchor"!==i&&"focus"!==i&&t[i]!==n[i])&&(o[i]=n[i],r[i]=t[i]);Object.keys(o).length>0&&e.apply({type:"set_selection",properties:o,newProperties:r})}}},Lt={delete(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Xe.withoutNormalizing(e,(()=>{var{reverse:n=!1,unit:o="character",distance:r=1,voids:i=!1}=t,{at:a=e.selection,hanging:s=!1}=t;if(a){var l=!1;if(ft.isRange(a)&&ft.isCollapsed(a)&&(l=!0,a=a.anchor),ct.isPoint(a)){var c=Xe.void(e,{at:a,mode:"highest"});if(!i&&c){var[,u]=c;a=u}else{var d={unit:o,distance:r};a={anchor:a,focus:n?Xe.before(e,a,d)||Xe.start(e,[]):Xe.after(e,a,d)||Xe.end(e,[])},s=!0}}if(it.isPath(a))zt.removeNodes(e,{at:a,voids:i});else if(!ft.isCollapsed(a)){if(!s){var[,p]=ft.edges(a),f=Xe.end(e,[]);ct.equals(p,f)||(a=Xe.unhangRange(e,a,{voids:i}))}var[h,m]=ft.edges(a),g=Xe.above(e,{match:t=>Ve.isElement(t)&&Xe.isBlock(e,t),at:h,voids:i}),v=Xe.above(e,{match:t=>Ve.isElement(t)&&Xe.isBlock(e,t),at:m,voids:i}),y=g&&v&&!it.equals(g[1],v[1]),b=it.equals(h.path,m.path),w=i?null:Xe.void(e,{at:h,mode:"highest"}),S=i?null:Xe.void(e,{at:m,mode:"highest"});if(w){var P=Xe.before(e,h);P&&g&&it.isAncestor(g[1],P.path)&&(h=P)}if(S){var E=Xe.after(e,m);E&&v&&it.isAncestor(v[1],E.path)&&(m=E)}var x,D=[];for(var C of Xe.nodes(e,{at:a,voids:i})){var[k,O]=C;x&&0===it.compare(O,x)||(!i&&Ve.isElement(k)&&Xe.isVoid(e,k)||!it.isCommon(O,h.path)&&!it.isCommon(O,m.path))&&(D.push(C),x=O)}var A=Array.from(D,(t=>{var[,n]=t;return Xe.pathRef(e,n)})),T=Xe.pointRef(e,h),I=Xe.pointRef(e,m),F="";if(!b&&!w){var M=T.current,[_]=Xe.leaf(e,M),{path:N}=M,{offset:R}=h,L=_.text.slice(R);L.length>0&&(e.apply({type:"remove_text",path:N,offset:R,text:L}),F=L)}if(A.reverse().map((e=>e.unref())).filter((e=>null!==e)).forEach((t=>zt.removeNodes(e,{at:t,voids:i}))),!S){var B=I.current,[j]=Xe.leaf(e,B),{path:z}=B,K=b?h.offset:0,Z=j.text.slice(K,m.offset);Z.length>0&&(e.apply({type:"remove_text",path:z,offset:K,text:Z}),F=Z)}!b&&y&&I.current&&T.current&&zt.mergeNodes(e,{at:I.current,hanging:!0,voids:i}),l&&n&&"character"===o&&F.length>1&&F.match(/[\u0E00-\u0E7F]+/)&&zt.insertText(e,F.slice(0,F.length-r));var U=T.unref(),V=I.unref(),G=n?U||V:V||U;null==t.at&&G&&zt.select(e,G)}}}))},insertFragment(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Xe.withoutNormalizing(e,(()=>{var{hanging:o=!1,voids:r=!1}=n,{at:i=e.selection}=n;if(t.length&&i){if(ft.isRange(i))if(o||(i=Xe.unhangRange(e,i,{voids:r})),ft.isCollapsed(i))i=i.anchor;else{var[,a]=ft.edges(i);if(!r&&Xe.void(e,{at:a}))return;var s=Xe.pointRef(e,a);zt.delete(e,{at:i}),i=s.unref()}else it.isPath(i)&&(i=Xe.start(e,i));if(r||!Xe.void(e,{at:i})){var l=Xe.above(e,{at:i,match:t=>Ve.isElement(t)&&Xe.isInline(e,t),mode:"highest",voids:r});if(l){var[,c]=l;if(Xe.isEnd(e,i,c))i=Xe.after(e,c);else if(Xe.isStart(e,i,c)){i=Xe.before(e,c)}}var u=Xe.above(e,{match:t=>Ve.isElement(t)&&Xe.isBlock(e,t),at:i,voids:r}),[,d]=u,p=Xe.isStart(e,i,d),f=Xe.isEnd(e,i,d),h=p&&f,m=!p||p&&f,g=!f,[,v]=tt.first({children:t},[]),[,y]=tt.last({children:t},[]),b=[],w=t=>{var[n,o]=t;return!(0===o.length)&&(!!h||!(m&&it.isAncestor(o,v)&&Ve.isElement(n)&&!e.isVoid(n)&&!e.isInline(n))&&!(g&&it.isAncestor(o,y)&&Ve.isElement(n)&&!e.isVoid(n)&&!e.isInline(n)))};for(var S of tt.nodes({children:t},{pass:w}))w(S)&&b.push(S);var P=[],E=[],x=[],D=!0,C=!1;for(var[k]of b)Ve.isElement(k)&&!e.isInline(k)?(D=!1,C=!0,E.push(k)):D?P.push(k):x.push(k);var[O]=Xe.nodes(e,{at:i,match:t=>Pt.isText(t)||Xe.isInline(e,t),mode:"highest",voids:r}),[,A]=O,T=Xe.isStart(e,i,A),I=Xe.isEnd(e,i,A),F=Xe.pathRef(e,f&&!x.length?it.next(d):d),M=Xe.pathRef(e,I?it.next(A):A);zt.splitNodes(e,{at:i,match:t=>C?Ve.isElement(t)&&Xe.isBlock(e,t):Pt.isText(t)||Xe.isInline(e,t),mode:C?"lowest":"highest",always:C&&(!p||P.length>0)&&(!f||x.length>0),voids:r});var _,N=Xe.pathRef(e,!T||T&&I?it.next(A):A);if(zt.insertNodes(e,P,{at:N.current,match:t=>Pt.isText(t)||Xe.isInline(e,t),mode:"highest",voids:r}),h&&!P.length&&E.length&&!x.length&&zt.delete(e,{at:d,voids:r}),zt.insertNodes(e,E,{at:F.current,match:t=>Ve.isElement(t)&&Xe.isBlock(e,t),mode:"lowest",voids:r}),zt.insertNodes(e,x,{at:M.current,match:t=>Pt.isText(t)||Xe.isInline(e,t),mode:"highest",voids:r}),!n.at)if(x.length>0&&M.current?_=it.previous(M.current):E.length>0&&F.current?_=it.previous(F.current):N.current&&(_=it.previous(N.current)),_){var R=Xe.end(e,_);zt.select(e,R)}N.unref(),F.unref(),M.unref()}}}))},insertText(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Xe.withoutNormalizing(e,(()=>{var{voids:o=!1}=n,{at:r=e.selection}=n;if(r){if(it.isPath(r)&&(r=Xe.range(e,r)),ft.isRange(r))if(ft.isCollapsed(r))r=r.anchor;else{var i=ft.end(r);if(!o&&Xe.void(e,{at:i}))return;var a=ft.start(r),s=Xe.pointRef(e,a),l=Xe.pointRef(e,i);zt.delete(e,{at:r,voids:o});var c=s.unref(),u=l.unref();r=c||u,zt.setSelection(e,{anchor:r,focus:r})}if(o||!Xe.void(e,{at:r})){var{path:d,offset:p}=r;t.length>0&&e.apply({type:"insert_text",path:d,offset:p,text:t})}}}))}};function Bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function jt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bt(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var zt=jt(jt(jt(jt({},Dt),Tt),Rt),Lt)},12704:e=>{e.exports='<svg viewBox="0 0 16 5" fill="black" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="2" r="1.5" transform="rotate(-180 8 2)"></circle><circle cx="14.5" cy="2" r="1.5" transform="rotate(-180 14.5 2)"></circle><circle cx="1.5" cy="2" r="1.5" transform="rotate(-180 1.5 2)"></circle></svg>'},92982:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.1502 6C10.0121 6 9.90017 6.11193 9.90017 6.25V10.6V11.5V15.8832C9.90017 16.0076 9.99166 16.1131 10.1148 16.1307L11.0384 16.2626C11.013 16.5049 11 16.7509 11 17C11 17.3395 11.0242 17.6734 11.0709 18H4.80017C4.74495 18 4.70017 17.9552 4.70017 17.9V16.9358C4.70017 16.686 4.88445 16.4746 5.13185 16.4405L7.38433 16.1298C7.50803 16.1127 7.60017 16.007 7.60017 15.8821V11.5V10.6V6.25C7.60017 6.11193 7.48825 6 7.35017 6H3.7751C3.55291 6 3.35738 6.14662 3.29513 6.35991L2.9527 7.53315C2.92157 7.6398 2.8238 7.71311 2.71271 7.71311H1.21124C1.09655 7.71311 1.00536 7.61687 1.01153 7.50235L1.18743 4.23655C1.19458 4.1039 1.30422 4 1.43707 4H15.9633C16.0961 4 16.2058 4.1039 16.2129 4.23655L16.3888 7.50235C16.395 7.61687 16.3038 7.71311 16.1891 7.71311H14.6985C14.5824 7.71311 14.4815 7.63308 14.4551 7.51995L14.1904 6.38631C14.1375 6.16005 13.9358 6 13.7035 6H10.1502Z" fill="currentColor"></path><circle cx="18" cy="17" r="6" fill="currentColor" fill-opacity="0.25"></circle><path d="M18 20V17M18 14V17M18 17H21M18 17H15" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg>'},10713:e=>{e.exports='<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><path d="M20 12.043v17.204m8.602-8.602H11.398" stroke="currentColor" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round"></path><circle cx="20" cy="20" r="19" stroke="currentColor" stroke-width="2"></circle></svg>'},80525:e=>{e.exports='<svg width="31" height="31" viewBox="0 0 31 31" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.2708 10.3333C12.2708 9.26326 13.1383 8.39581 14.2083 8.39581H19.375L22.6041 11.625V20.6666C22.6041 21.7367 21.7367 22.6041 20.6666 22.6041H14.2083C13.1383 22.6041 12.2708 21.7367 12.2708 20.6666V10.3333Z" fill="white" fill-opacity="0.01" stroke="currentColor" stroke-width="1.29167"></path><path opacity="0.66" d="M19.7625 11.2375V10.6009L20.3991 11.2375L19.7625 11.2375Z" fill="currentColor" stroke="currentColor" stroke-width="1.29167"></path><path d="M12.2708 22.6041H11.625C10.5549 22.6041 9.6875 21.7367 9.6875 20.6666V10.3333C9.6875 9.26326 10.5549 8.39581 11.625 8.39581H12.2708" stroke="currentColor" stroke-width="1.29167" stroke-linecap="round"></path><path d="M9.68752 22.6041H9.04169C7.97164 22.6041 7.10419 21.7367 7.10419 20.6666V10.3333C7.10419 9.26326 7.97164 8.39581 9.04169 8.39581L9.68752 8.39581" stroke="currentColor" stroke-width="1.29167" stroke-linecap="round"></path></svg>'},38070:e=>{e.exports='<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path opacity=".5" d="M11.654 16.837c.023.052.079.082.143.075 2.558-.3 8.25-.415 7.207 1.759-1.042 2.173-13.647 1.349-14.392-.963-.72-2.237 4.035-2.703 5.288-2.706.068 0 .128-.052.147-.127.029-.11-.036-.22-.134-.223-1.601-.04-7.438.192-7.174 3.761.276 3.731 16.138 4.888 17.711 1.035 1.573-3.853-6.456-3.21-8.702-2.785-.084.022-.125.104-.094.174z" fill="currentColor" stroke="currentColor" stroke-width=".25"></path><path d="M12.535 13.81l-.354.353.354.354.354-.354-.354-.354zm-2.121-2.122l-.354-.354-.353.354.353.354.354-.354zm1.098-1.173l.474.159-.474-.159zm2.473 2.104l.158.475-.158-.475zm5.621-9.416l1.414 1.414.707-.707-1.414-1.414-.707.707zm-5.78 8.942l-.276.092.316.949.277-.092-.317-.95zm-1.84-1.471l.092-.277-.948-.316-.093.276.95.317zm1.173 1.805l-.978.977.708.707.977-.977-.707-.707zm-.27.977l-2.122-2.121-.707.707 2.121 2.121.708-.707zm-2.122-1.414l.978-.977-.708-.708-.977.978.707.707zM21.02 5.324l-6.216 6.217.707.707 6.216-6.217-.707-.707zM12.682 9.42L18.9 3.203l-.707-.707-6.217 6.216.707.708zm-1.645.937l.707.708a1 1 0 0 0 .242-.391l-.949-.317zm2.513 1.88a1 1 0 0 0-.391.242l.707.707-.316-.949zm.593.857a3.5 3.5 0 0 0 1.368-.846l-.707-.707a2.5 2.5 0 0 1-.978.604l.317.949zm-2.065-2.697a2.5 2.5 0 0 1 .604-.977l-.707-.708a3.5 3.5 0 0 0-.845 1.369l.948.316zm8.942-5.78a.5.5 0 0 1 0 .707l.707.707a1.5 1.5 0 0 0 0-2.121l-.707.707zm-.707-2.121a1.5 1.5 0 0 0-2.121 0l.707.707a.5.5 0 0 1 .707 0l.707-.707z" fill="currentColor"></path><path opacity=".33" d="M12.535 8.86l4.95-4.95 2.828 2.828-4.95 4.95-2.828-2.828z" fill="currentColor"></path><path d="M9.353 14.87a.694.694 0 0 1-.13-.8l1.19-2.382 2.122 2.121L10.154 15a.694.694 0 0 1-.8-.13z" fill="currentColor"></path></svg>'},15445:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_6395_19308)"><path d="M2.5 8H21.5" stroke="currentColor" stroke-linecap="round"></path><path d="M19 8L17.0024 3.33905C16.492 2.14793 15.0009 1.74935 13.9642 2.52688L13.2 3.1C12.4889 3.63333 11.5111 3.63333 10.8 3.1L10.0358 2.52688C8.99913 1.74935 7.50803 2.14793 6.99755 3.33904L5 8M13 10.5H6V11C6 12.3807 7.11929 13.5 8.5 13.5V13.5C9.88071 13.5 11 12.3807 11 11V10.5M13 10.5H18V11C18 12.3807 16.8807 13.5 15.5 13.5V13.5C14.1193 13.5 13 12.3807 13 11V10.5Z" stroke="currentColor"></path><path d="M3 20.5L6 19L4 16H12M21 20.5L18 19L20 16H12M12 16V21.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g><defs><clipPath id="clip0_6395_19308"><rect width="26" height="26" fill="white"></rect></clipPath></defs></svg>'},96447:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="path-1-inside-1_6542_233601" fill="white"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 5.93933L12.5303 6.46966L16.5303 10.4697C16.8232 10.7626 16.8232 11.2374 16.5303 11.5303C16.2374 11.8232 15.7626 11.8232 15.4697 11.5303L12.75 8.81065V17C12.75 17.4142 12.4142 17.75 12 17.75C11.5858 17.75 11.25 17.4142 11.25 17V8.81065L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303C7.17678 11.2374 7.17678 10.7626 7.46967 10.4697L11.4697 6.46966L12 5.93933Z"></path></mask><path fill-rule="evenodd" clip-rule="evenodd" d="M12 5.93933L12.5303 6.46966L16.5303 10.4697C16.8232 10.7626 16.8232 11.2374 16.5303 11.5303C16.2374 11.8232 15.7626 11.8232 15.4697 11.5303L12.75 8.81065V17C12.75 17.4142 12.4142 17.75 12 17.75C11.5858 17.75 11.25 17.4142 11.25 17V8.81065L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303C7.17678 11.2374 7.17678 10.7626 7.46967 10.4697L11.4697 6.46966L12 5.93933Z" fill="currentColor"></path><path d="M12.5303 6.46966L13.591 5.409L13.591 5.409L12.5303 6.46966ZM12 5.93933L13.0607 4.87867L12 3.81801L10.9393 4.87867L12 5.93933ZM16.5303 10.4697L15.4697 11.5303L15.4697 11.5303L16.5303 10.4697ZM16.5303 11.5303L15.4697 10.4697L15.4697 10.4697L16.5303 11.5303ZM15.4697 11.5303L14.409 12.591L14.409 12.591L15.4697 11.5303ZM12.75 8.81065L13.8107 7.74999L11.25 5.18933V8.81065H12.75ZM11.25 8.81065H12.75V5.18933L10.1893 7.74999L11.25 8.81065ZM8.53033 11.5303L9.59099 12.591L9.59099 12.591L8.53033 11.5303ZM7.46967 11.5303L6.40901 12.591L6.40901 12.591L7.46967 11.5303ZM7.46967 10.4697L6.40901 9.409L6.40901 9.409L7.46967 10.4697ZM11.4697 6.46966L10.409 5.409L10.409 5.409L11.4697 6.46966ZM13.591 5.409L13.0607 4.87867L10.9393 6.99999L11.4697 7.53032L13.591 5.409ZM17.591 9.409L13.591 5.409L11.4697 7.53032L15.4697 11.5303L17.591 9.409ZM17.591 12.591C18.4697 11.7123 18.4697 10.2877 17.591 9.409L15.4697 11.5303C15.1768 11.2374 15.1768 10.7626 15.4697 10.4697L17.591 12.591ZM14.409 12.591C15.2877 13.4697 16.7123 13.4697 17.591 12.591L15.4697 10.4697C15.7626 10.1768 16.2374 10.1768 16.5303 10.4697L14.409 12.591ZM11.6893 9.87131L14.409 12.591L16.5303 10.4697L13.8107 7.74999L11.6893 9.87131ZM14.25 17V8.81065H11.25V17H14.25ZM12 19.25C13.2426 19.25 14.25 18.2426 14.25 17H11.25C11.25 16.5858 11.5858 16.25 12 16.25V19.25ZM9.75 17C9.75 18.2426 10.7574 19.25 12 19.25V16.25C12.4142 16.25 12.75 16.5858 12.75 17H9.75ZM9.75 8.81065V17H12.75V8.81065H9.75ZM9.59099 12.591L12.3107 9.87131L10.1893 7.74999L7.46967 10.4697L9.59099 12.591ZM6.40901 12.591C7.28769 13.4697 8.71231 13.4697 9.59099 12.591L7.46967 10.4697C7.76256 10.1768 8.23744 10.1768 8.53033 10.4697L6.40901 12.591ZM6.40901 9.409C5.53033 10.2877 5.53033 11.7123 6.40901 12.591L8.53033 10.4697C8.82322 10.7626 8.82322 11.2374 8.53033 11.5303L6.40901 9.409ZM10.409 5.409L6.40901 9.409L8.53033 11.5303L12.5303 7.53032L10.409 5.409ZM10.9393 4.87867L10.409 5.409L12.5303 7.53032L13.0607 6.99999L10.9393 4.87867Z" fill="currentColor" mask="url(#path-1-inside-1_6542_233601)"></path></svg>'},42823:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M19.14 5.56L5.76 18.94a2.34 2.34 0 0 0-.7-.7L18.44 4.86l.7.7z" fill="currentColor"></path><path d="M5.25 20.5a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0zM17 2h5v5l-5-5z" fill="currentColor"></path></svg>'},13179:e=>{e.exports='<svg width="9" height="14" viewBox="0 0 9 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path id="Vector 527" d="M1 1L7 7L1 13" stroke="currentColor" stroke-width="2"></path></svg>'},6916:e=>{e.exports='<svg viewBox="0 0 24 24" width="24" height="24" xmlns="http://www.w3.org/2000/svg"><rect opacity=".25" x="8" y="8" width="14" height="14" rx="1.25" fill="currentColor"></rect><rect opacity=".5" x="2" y="2" width="14" height="14" rx="1.25" fill="currentColor"></rect><rect opacity=".33" x="2.5" y="2.5" width="13" height="13" rx=".75" fill="none" stroke="currentColor"></rect><path fill-rule="evenodd" clip-rule="evenodd" d="M16 8v6.75c0 .69-.56 1.25-1.25 1.25H8V9.25C8 8.56 8.56 8 9.25 8H16z" fill="currentColor"></path></svg>'},99604:e=>{e.exports='<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.906 12.265c0 1.57 0 3.105-.036 4.603l-1.37.146V18h5.206c4.53 0 5.662-1.845 5.662-3.36 0-1.645-1.096-2.74-3.818-3.07 2.393-.438 3.105-1.497 3.105-2.739C16.655 7.224 15.505 6 12.4 6H6.5v.986l1.37.146c.036 1.535.036 3.087.036 4.603v.53Zm3.69-5.206c1.425 0 2.1.64 2.1 1.991 0 1.443-.712 2.192-2.264 2.192h-.512c0-1.406 0-2.813.037-4.183h.639Zm-.055 5.151c1.808 0 2.685.73 2.685 2.393 0 1.552-.986 2.338-2.685 2.338h-.584c-.037-1.498-.037-3.014-.037-4.731h.621Z" fill="currentColor"></path></svg>'},39802:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.5 5v16.5l5.5-6.69 5.5 6.69V5A1.5 1.5 0 0 0 16 3.5H8A1.5 1.5 0 0 0 6.5 5z" fill="currentColor" stroke="currentColor" stroke-miterlimit="10"></path></svg>'},12568:e=>{e.exports='<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.34 2.5H3.66c-.64 0-1.16.52-1.16 1.16v10.68c0 .64.52 1.16 1.16 1.16h10.68c.64 0 1.16-.52 1.16-1.16V3.66c0-.64-.52-1.16-1.16-1.16z" fill="currentColor" fill-opacity=".01" stroke="currentColor" stroke-miterlimit="10"></path><path opacity=".2" d="M20.75 8c.69 0 1.25.56 1.25 1.25v11.5c0 .69-.56 1.25-1.25 1.25H9.25C8.56 22 8 21.44 8 20.75V17h6.5a2.5 2.5 0 0 0 2.5-2.5V8h3.75z" fill="currentColor"></path></svg>'},96810:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.5 5.99997V14" stroke="currentColor" stroke-linecap="round"></path><path d="M7.5 5.99997V14" stroke="currentColor" stroke-linecap="round"></path><path d="M13.5 5.99997V14" stroke="currentColor" stroke-linecap="round"></path><path opacity="0.5" d="M4.5 9.99997L4.5 14" stroke="currentColor" stroke-linecap="round"></path><path opacity="0.5" d="M10.5 9.99997L10.5 14" stroke="currentColor" stroke-linecap="round"></path><path opacity="0.5" d="M16.5 9.99997L16.5 14" stroke="currentColor" stroke-linecap="round"></path><path opacity="0.5" d="M22.5 9.99997L22.5 14" stroke="currentColor" stroke-linecap="round"></path><path d="M19.5 5.99997V14" stroke="currentColor" stroke-linecap="round"></path><path d="M8.41612 21L15.5839 21C15.7516 21 15.8448 20.806 15.74 20.675L12.1562 16.1952C12.0761 16.0951 11.9239 16.0951 11.8438 16.1952L8.25995 20.675C8.15519 20.806 8.24842 21 8.41612 21Z" fill="currentColor"></path></svg>'},40885:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 20C6 18.8954 5.10457 18 4 18C2.89543 18 2 18.8954 2 20C2 21.1046 2.89543 22 4 22C5.10457 22 6 21.1046 6 20Z" fill="currentColor"></path><path opacity="0.5" d="M13.5 16V19L4 20" stroke="currentColor" stroke-width="1.03" stroke-miterlimit="10"></path><path d="M21 1.5H6C5.17157 1.5 4.5 2.17157 4.5 3V13C4.5 13.8284 5.17157 14.5 6 14.5H21C21.8284 14.5 22.5 13.8284 22.5 13V3C22.5 2.17157 21.8284 1.5 21 1.5Z" stroke="currentColor" stroke-miterlimit="10"></path><path d="M18 6.36L16.49 6.45V5.7C16.49 5.47 16.42 5.36 16.18 5.36H14.56V10.77L15.41 10.82V12H11.63V10.86H12.18C12.43 10.86 12.49 10.76 12.49 10.47V5.36H10.81C10.57 5.36 10.51 5.48 10.51 5.68V6.45L9 6.36V4H18V6.36Z" fill="currentColor"></path></svg>'},64762:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 17l9-9H3z" fill="currentColor"></path></svg>'},58021:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 17l9-9H3z"></path></svg>'},28069:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.5 12.5l9 9v-18z"></path></svg>'},14341:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16.5 12.5l-9 9v-18z"></path></svg>'},7359:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8l9 9H3z"></path></svg>'},94457:e=>{e.exports='<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 8l4 4m0 0l-4 4m4-4H7" stroke="currentColor" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},33862:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="path-1-inside-1_4743_161911" fill="white"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM17.2537 9.80713C17.5466 9.51424 17.5466 9.03937 17.2537 8.74647C16.9608 8.45358 16.4859 8.45358 16.193 8.74647L10.277 14.6625L7.96488 12.3503C7.67199 12.0574 7.19711 12.0574 6.90422 12.3503C6.61133 12.6432 6.61133 13.1181 6.90422 13.411L9.7467 16.2534L10.277 16.7838L10.8074 16.2534L17.2537 9.80713Z"></path></mask><path fill-rule="evenodd" clip-rule="evenodd" d="M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM17.2537 9.80713C17.5466 9.51424 17.5466 9.03937 17.2537 8.74647C16.9608 8.45358 16.4859 8.45358 16.193 8.74647L10.277 14.6625L7.96488 12.3503C7.67199 12.0574 7.19711 12.0574 6.90422 12.3503C6.61133 12.6432 6.61133 13.1181 6.90422 13.411L9.7467 16.2534L10.277 16.7838L10.8074 16.2534L17.2537 9.80713Z" fill="currentColor"></path><path d="M17.2537 8.74647L18.3143 7.68582L18.3143 7.68581L17.2537 8.74647ZM17.2537 9.80713L18.3143 10.8678L18.3143 10.8678L17.2537 9.80713ZM16.193 8.74647L15.1323 7.68581L16.193 8.74647ZM10.277 14.6625L9.21637 15.7231L10.277 16.7838L11.3377 15.7231L10.277 14.6625ZM7.96488 12.3503L9.02554 11.2896L7.96488 12.3503ZM6.90422 12.3503L5.84356 11.2896L5.84356 11.2896L6.90422 12.3503ZM10.277 16.7838L9.21637 17.8444L10.277 18.9051L11.3377 17.8444L10.277 16.7838ZM10.8074 16.2534L11.868 17.3141L11.868 17.3141L10.8074 16.2534ZM21.5 12C21.5 17.2467 17.2467 21.5 12 21.5V24.5C18.9036 24.5 24.5 18.9036 24.5 12H21.5ZM12 2.5C17.2467 2.5 21.5 6.75329 21.5 12H24.5C24.5 5.09644 18.9036 -0.5 12 -0.5V2.5ZM2.5 12C2.5 6.75329 6.75329 2.5 12 2.5V-0.5C5.09644 -0.5 -0.5 5.09644 -0.5 12H2.5ZM12 21.5C6.75329 21.5 2.5 17.2467 2.5 12H-0.5C-0.5 18.9036 5.09644 24.5 12 24.5V21.5ZM16.193 9.80713C15.9001 9.51424 15.9001 9.03937 16.193 8.74648L18.3143 10.8678C19.193 9.98911 19.193 8.5645 18.3143 7.68582L16.193 9.80713ZM17.2537 9.80713C16.9608 10.1 16.4859 10.1 16.193 9.80713L18.3143 7.68581C17.4356 6.80713 16.011 6.80713 15.1323 7.68581L17.2537 9.80713ZM11.3377 15.7231L17.2537 9.80713L15.1323 7.68581L9.21637 13.6018L11.3377 15.7231ZM6.90422 13.411L9.21637 15.7231L11.3377 13.6018L9.02554 11.2896L6.90422 13.411ZM7.96488 13.411C7.67199 13.7039 7.19711 13.7039 6.90422 13.411L9.02554 11.2896C8.14686 10.411 6.72224 10.411 5.84356 11.2896L7.96488 13.411ZM7.96488 12.3503C8.25778 12.6432 8.25777 13.1181 7.96488 13.411L5.84356 11.2896C4.96488 12.1683 4.96488 13.5929 5.84356 14.4716L7.96488 12.3503ZM10.8074 15.1928L7.96488 12.3503L5.84356 14.4716L8.68604 17.3141L10.8074 15.1928ZM11.3377 15.7231L10.8074 15.1928L8.68604 17.3141L9.21637 17.8444L11.3377 15.7231ZM9.7467 15.1928L9.21637 15.7231L11.3377 17.8444L11.868 17.3141L9.7467 15.1928ZM16.193 8.74647L9.7467 15.1928L11.868 17.3141L18.3143 10.8678L16.193 8.74647Z" fill="currentColor" mask="url(#path-1-inside-1_4743_161911)"></path></svg>'},11379:e=>{e.exports='<svg width="10" height="10" viewBox="0 0 10 10" style="fill: none;" xmlns="http://www.w3.org/2000/svg"><path d="M1 5L3.5 8.5C3.5 8.5 5.5 5.5 9 1.5" stroke="currentColor" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path></svg>'},70190:e=>{e.exports='<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.5 5L3.5 8L9.5 2" stroke="currentColor" stroke-width="1.25"></path></svg>'},791:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6316 7.5H7.36842C6.88881 7.5 6.5 7.90294 6.5 8.4V15.6C6.5 16.0971 6.88881 16.5 7.36842 16.5H16.6316C17.1112 16.5 17.5 16.0971 17.5 15.6V8.4C17.5 7.90294 17.1112 7.5 16.6316 7.5Z" stroke="currentColor" stroke-miterlimit="10"></path><path opacity="0.5" d="M16 13V14.75C16 14.8881 15.8881 15 15.75 15H10.5L14 11L16 13Z" fill="currentColor"></path><path d="M10.1159 12.4609L8 15H13L10.8841 12.4609C10.6842 12.2211 10.3158 12.2211 10.1159 12.4609Z" fill="currentColor"></path><circle cx="9.5" cy="10.5" r="1" fill="currentColor"></circle><path d="M7 20.5H6.5C4.29086 20.5 2.5 18.7091 2.5 16.5V14M4.5 16L2.5 14M2.5 14L0.5 16" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M17 3.5H17.5C19.7091 3.5 21.5 5.29086 21.5 7.5V10M19.5 8L21.5 10M21.5 10L23.5 8" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},15708:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".1" d="M21.5 12a9.5 9.5 0 11-19 0 9.5 9.5 0 0119 0z" fill="currentColor" stroke="currentColor"></path><path d="M8.82 8.82l6.36 6.36m0-6.36l-6.36 6.36" stroke="currentColor" stroke-width="1.25" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},33374:e=>{e.exports='<svg width="22" height="23" viewBox="0 0 22 23" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="11" cy="11.1921" r="11" fill="currentColor"></circle><path d="M14.5355 7.72767L7.46447 14.7987M7.46447 7.72767L14.5355 14.7987" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>'},58054:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4.5 4.5l15 15m0-15l-15 15" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10"></path></svg>'},31466:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -4 24 20"><path d="M17 15h2.5a3.5 3.5 0 0 0 0-7h-.06a4 4 0 0 0-6-5A6 6 0 0 0 3 7a6.17 6.17 0 0 0 .37 2.07A3 3 0 0 0 4 15h3" fill="none" stroke="#000" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2"></path></svg>'},54278:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.78 20.49C14.7868 20.867 14.7174 21.2415 14.576 21.591C14.4346 21.9406 14.2239 22.2579 13.9569 22.524C13.6898 22.7902 13.3717 22.9996 13.0217 23.1399C12.6717 23.2801 12.297 23.3481 11.92 23.34C11.384 23.3384 10.8592 23.1867 10.405 22.9022C9.95077 22.6176 9.58536 22.2116 9.35005 21.73" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5.17006 5.93C4.84789 5.36808 4.72529 4.71369 4.82216 4.07325C4.91903 3.43281 5.22968 2.84398 5.70363 2.40248C6.17757 1.96098 6.78694 1.69278 7.43263 1.64149C8.07832 1.5902 8.72232 1.75886 9.26002 2.12001" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M18.68 17.92C19.0022 18.4819 19.1248 19.1363 19.0279 19.7768C18.931 20.4172 18.6204 21.006 18.1464 21.4475C17.6725 21.889 17.0631 22.1572 16.4174 22.2085C15.7717 22.2598 15.1277 22.0912 14.59 21.73" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.03994 10.11C2.40461 9.71248 1.94642 9.08586 1.76027 8.35989C1.57413 7.63393 1.67429 6.86419 2.03994 6.20999C2.31313 5.73089 2.71907 5.34102 3.20876 5.08731C3.69845 4.83359 4.251 4.72686 4.79995 4.78" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M20.78 13.73C21.3325 14.0668 21.755 14.5804 21.9789 15.1875C22.2028 15.7945 22.215 16.4594 22.0135 17.0742C21.812 17.6891 21.4086 18.2179 20.8689 18.5747C20.3291 18.9316 19.6847 19.0955 19.04 19.04" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.35993 14.78C2.98249 14.7868 2.60757 14.7175 2.25752 14.5761C1.90746 14.4348 1.58952 14.2244 1.32258 13.9574C1.05564 13.6905 0.845255 13.3725 0.703927 13.0224C0.562598 12.6724 0.493169 12.2975 0.499947 11.92C0.489554 11.3685 0.647758 10.827 0.953316 10.3678C1.25887 9.90854 1.69732 9.55345 2.21003 9.35001" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M20.49 9.03999C20.8669 9.03185 21.2418 9.09991 21.5918 9.24012C21.9418 9.38034 22.2599 9.58982 22.5269 9.85597C22.794 10.1221 23.0045 10.4395 23.146 10.789C23.2874 11.1385 23.3569 11.513 23.3501 11.89C23.3611 12.4429 23.202 12.986 22.8944 13.4456C22.5868 13.9053 22.1454 14.2593 21.63 14.46" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5.92999 18.68C5.36807 19.0022 4.71374 19.1248 4.0733 19.0279C3.43286 18.9311 2.8439 18.6204 2.4024 18.1465C1.96091 17.6725 1.69283 17.0631 1.64154 16.4174C1.59025 15.7718 1.75879 15.1277 2.11993 14.59" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.92 5.16002C18.5742 4.79437 19.344 4.69428 20.0699 4.88042C20.7959 5.06657 21.4225 5.5247 21.82 6.16002C22.0949 6.62979 22.2235 7.17078 22.1897 7.71398C22.1558 8.25718 21.961 8.77798 21.63 9.21001" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.12 20.77C9.72226 21.4079 9.09388 21.868 8.36556 22.0542C7.63724 22.2405 6.86519 22.1387 6.21004 21.77C5.73095 21.4968 5.34095 21.0909 5.08724 20.6012C4.83352 20.1115 4.72685 19.5589 4.77999 19.01" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M13.7299 3.03999C14.0547 2.46968 14.5659 2.02844 15.1774 1.7903C15.789 1.55216 16.464 1.53157 17.0889 1.73207C17.7139 1.93257 18.2508 2.34193 18.6097 2.89143C18.9686 3.44094 19.1276 4.09719 19.06 4.75002" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.03996 3.36002C9.03321 2.98343 9.10225 2.60931 9.24296 2.25993C9.38367 1.91055 9.59318 1.59301 9.85905 1.32621C10.1249 1.05941 10.4417 0.848823 10.7906 0.706887C11.1395 0.564952 11.5133 0.494617 11.8899 0.500039C12.4417 0.488223 12.9839 0.645775 13.4434 0.951516C13.9029 1.25726 14.2578 1.69646 14.46 2.21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg>'},16581:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.01313 16.2914C5.47557 16.289 4.94811 16.4372 4.49048 16.7192C4.03285 17.0013 3.66338 17.4059 3.42399 17.8872C3.1846 18.3685 3.08492 18.9073 3.13611 19.4424C3.1873 19.9776 3.38733 20.4876 3.71363 20.9148C4.03993 21.342 4.47936 21.6693 4.98216 21.8595C5.48496 22.0496 6.03103 22.0951 6.55837 21.9908C7.08572 21.8865 7.57324 21.6365 7.96576 21.2692C8.35828 20.9019 8.64002 20.432 8.77908 19.9128" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M4.38018 12.0037C3.99967 12.2724 3.68931 12.6286 3.47505 13.0423C3.26079 13.4559 3.14893 13.915 3.14893 14.3808C3.14893 14.8467 3.26079 15.3057 3.47505 15.7194C3.68931 16.1331 3.99967 16.4893 4.38018 16.758C4.86244 16.4436 5.42627 16.2775 6.00195 16.2803C5.42812 16.2901 4.86771 16.4552 4.38018 16.758" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M4.38018 7.23816C3.99962 7.50815 3.68923 7.86535 3.47505 8.2799C3.26088 8.69445 3.14921 9.15427 3.14921 9.62088C3.14921 10.0875 3.26088 10.5473 3.47505 10.9619C3.68923 11.3764 3.99962 11.7336 4.38018 12.0036C4.86245 11.6893 5.42627 11.5232 6.00195 11.526C5.42813 11.5358 4.86772 11.7008 4.38018 12.0036" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5.44653 6.81604C5.05525 6.89362 4.67976 7.03631 4.3357 7.23816" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.44587 6.29396C8.712 5.83089 8.84337 5.30269 8.82528 4.7689C8.8072 4.23512 8.64035 3.717 8.3435 3.273C8.04664 2.82901 7.63156 2.4768 7.1452 2.25611C6.65884 2.03542 6.12058 1.95503 5.59096 2.024C5.06134 2.09297 4.56153 2.30854 4.14791 2.64643C3.73429 2.98432 3.42336 3.43108 3.25011 3.93629C3.07686 4.4415 3.04817 4.98507 3.16739 5.50568C3.28661 6.0263 3.54888 6.50323 3.92472 6.8827" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M13.0002 6.96046C12.9562 6.49567 12.8014 6.0482 12.5488 5.65555C12.2963 5.2629 11.9532 4.93651 11.5485 4.70371C11.1438 4.4709 10.6893 4.33847 10.2229 4.31752C9.75649 4.29657 9.29191 4.38769 8.86798 4.58326C8.9018 5.15749 8.76666 5.72905 8.47922 6.2273C8.74787 5.72178 8.88175 5.15557 8.86798 4.58326" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.077 9.33763C17.0348 8.87321 16.8814 8.42578 16.6301 8.03296C16.3788 7.64015 16.0367 7.31348 15.6328 7.08048C15.2288 6.84747 14.7748 6.71493 14.3089 6.69405C13.843 6.67317 13.3789 6.76454 12.9558 6.96047C12.9799 7.5352 12.8413 8.10505 12.5559 8.60448C12.8284 8.1 12.9661 7.53376 12.9558 6.96047" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16.9104 10.4707C17.0239 10.1115 17.0802 9.73659 17.077 9.35986" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.0882 9.38208C17.6405 9.10632 18.2671 9.01628 18.8747 9.12535C19.4823 9.23443 20.0385 9.53679 20.4604 9.98743C20.8823 10.4381 21.1475 11.0129 21.2163 11.6264C21.2852 12.2399 21.1542 12.8592 20.8428 13.3922C20.4617 14.051 19.835 14.5319 19.1 14.7297C18.3651 14.9275 17.5818 14.826 16.9215 14.4475C16.5171 14.2129 16.1744 13.8855 15.9217 13.4922" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M13.0002 16.9579C13.4234 17.1539 13.8875 17.2452 14.3534 17.2244C14.8193 17.2035 15.2733 17.0709 15.6772 16.8379C16.0812 16.6049 16.4232 16.2783 16.6746 15.8855C16.9259 15.4926 17.0791 15.0452 17.1214 14.5807V14.5807" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.92344 19.3351C9.34662 19.531 9.81072 19.6224 10.2766 19.6015C10.7425 19.5807 11.1965 19.4482 11.6004 19.2151C12.0044 18.9821 12.3464 18.6554 12.5978 18.2626C12.8491 17.8698 13.0024 17.4224 13.0447 16.958C12.5314 16.698 12.1063 16.2922 11.8227 15.7916C12.1164 16.2842 12.539 16.6875 13.0447 16.958" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.02374 18.6242C8.28238 18.9092 8.58635 19.1494 8.92344 19.3351" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg>'},9304:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.7619 7.2381C21.5238 6.7619 22 5.80952 22 4.85714C22 3.2381 20.7619 2 19.1429 2C18.1905 2 17.2381 2.47619 16.7619 3.2381C17.0476 3.71429 17.2381 4.19048 17.2381 4.85714C17.2381 4.28571 17.0476 3.71429 16.7619 3.2381" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M20.7619 12C21.5238 11.5238 22 10.5714 22 9.61905C22 8.66667 21.5238 7.71429 20.7619 7.2381C20.2857 7.52381 19.8095 7.71429 19.1429 7.71429C19.7143 7.71429 20.2857 7.52381 20.7619 7.2381" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M20.7619 16.7619C21.5238 16.2857 22 15.3333 22 14.381C22 13.4286 21.5238 12.4762 20.7619 12C20.2857 12.2857 19.8095 12.4762 19.1429 12.4762C19.7143 12.4762 20.2857 12.2857 20.7619 12" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16.7619 20.7619C17.2381 21.5238 18.1905 22 19.1429 22C20.7619 22 22 20.7619 22 19.1429C22 18.1905 21.5238 17.2381 20.7619 16.7619C20.2857 17.0476 19.8095 17.2381 19.1429 17.2381C19.7143 17.2381 20.2857 17.0476 20.7619 16.7619" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 20.7619C12.4762 21.5238 13.4286 22 14.381 22C15.3333 22 16.2857 21.5238 16.7619 20.7619C16.4762 20.2857 16.2857 19.8095 16.2857 19.1429C16.2857 19.7143 16.4762 20.2857 16.7619 20.7619" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7.23808 20.7619C7.71427 21.5238 8.66665 22 9.61904 22C10.5714 22 11.5238 21.5238 12 20.7619C11.7143 20.2857 11.5238 19.8095 11.5238 19.1429C11.5238 19.7143 11.7143 20.2857 12 20.7619" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.2381 16.7619C2.47619 17.2381 2 18.1905 2 19.1429C2 20.7619 3.2381 22 4.85714 22C5.80952 22 6.7619 21.5238 7.2381 20.7619C6.95238 20.2857 6.7619 19.8095 6.7619 19.1429C6.7619 19.7143 6.95238 20.2857 7.2381 20.7619" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.2381 12C2.47619 12.4762 2 13.4286 2 14.381C2 15.3333 2.47619 16.2857 3.2381 16.7619C3.71429 16.4762 4.19048 16.2857 4.85714 16.2857C4.28571 16.2857 3.71429 16.4762 3.2381 16.7619" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.2381 7.2381C2.47619 7.71429 2 8.66667 2 9.61905C2 10.5714 2.47619 11.5238 3.2381 12C3.71429 11.7143 4.19048 11.5238 4.85714 11.5238C4.28571 11.5238 3.71429 11.7143 3.2381 12" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7.2381 3.2381C6.7619 2.47619 5.80952 2 4.85714 2C3.2381 2 2 3.2381 2 4.85714C2 5.80952 2.47619 6.7619 3.2381 7.2381C3.71429 6.95238 4.19048 6.7619 4.85714 6.7619C4.28571 6.7619 3.71429 6.95238 3.2381 7.2381" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 3.2381C11.5238 2.47619 10.5714 2 9.61904 2C8.66665 2 7.71427 2.47619 7.23808 3.2381C7.5238 3.71429 7.71427 4.19048 7.71427 4.85714C7.71427 4.28571 7.5238 3.71429 7.23808 3.2381" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16.7619 3.2381C16.2857 2.47619 15.3333 2 14.381 2C13.4286 2 12.4762 2.47619 12 3.2381C12.2857 3.71429 12.4762 4.19048 12.4762 4.85714C12.4762 4.28571 12.2857 3.71429 12 3.2381" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path></svg>'},13090:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21.5 9.5C21.5 6.18629 18.8137 3.5 15.5 3.5H8.5C5.18629 3.5 2.5 6.18629 2.5 9.5V10.5835C2.5 13.8511 5.14889 16.5 8.41647 16.5V16.5C8.46467 16.5 8.50524 16.5341 8.50917 16.5821C8.54902 17.0701 8.54809 19.5982 4.4 20.5H7.2C10.44 20.5 11.96 18.5444 13.22 16.5H15.5C18.8137 16.5 21.5 13.8137 21.5 10.5V9.5Z" fill="white" stroke="currentColor" stroke-miterlimit="10" stroke-linejoin="round"></path><g opacity="0.5"><circle cx="16" cy="10.0031" r="1" fill="currentColor"></circle><circle cx="12" cy="10.0031" r="1" fill="currentColor"></circle><circle cx="8" cy="10.0031" r="1" fill="currentColor"></circle></g></svg>'},49253:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.70999 20.043C2.23563 20.1867 1.93814 20.6563 2.0108 21.1466C2.08346 21.6369 2.50433 22 3 22H5C8.67626 22 11.6648 20.3659 13.3387 18H15C19.3523 18 23 14.3523 23 10C23 5.53845 19.343 2 15 2H9C4.65703 2 1 5.53845 1 10C1 13.2744 3.03653 16.1385 5.93307 17.3722C5.85607 17.7339 5.70549 18.0896 5.44536 18.4272C5.01951 18.9799 4.22249 19.5846 2.70999 20.043Z" class="PSPDFKit-Icon-CommentIndicator-Stroke-Shape"></path><path d="M2.70999 20.043C2.23563 20.1867 1.93814 20.6563 2.0108 21.1466C2.08346 21.6369 2.50433 22 3 22H5C8.67626 22 11.6648 20.3659 13.3387 18H15C19.3523 18 23 14.3523 23 10C23 5.53845 19.343 2 15 2H9C4.65703 2 1 5.53845 1 10C1 13.2744 3.03653 16.1385 5.93307 17.3722C5.85607 17.7339 5.70549 18.0896 5.44536 18.4272C5.01951 18.9799 4.22249 19.5846 2.70999 20.043Z" fill="#FAD40C" stroke="black" stroke-width="2" stroke-miterlimit="10" stroke-linejoin="round"></path><path opacity="0.5" fill-rule="evenodd" clip-rule="evenodd" d="M8.5 10C8.5 10.8284 7.82843 11.5 7 11.5C6.17157 11.5 5.5 10.8284 5.5 10C5.5 9.17157 6.17157 8.5 7 8.5C7.82843 8.5 8.5 9.17157 8.5 10ZM13.5 10C13.5 10.8284 12.8284 11.5 12 11.5C11.1716 11.5 10.5 10.8284 10.5 10C10.5 9.17157 11.1716 8.5 12 8.5C12.8284 8.5 13.5 9.17157 13.5 10ZM18.5 10C18.5 10.8284 17.8284 11.5 17 11.5C16.1716 11.5 15.5 10.8284 15.5 10C15.5 9.17157 16.1716 8.5 17 8.5C17.8284 8.5 18.5 9.17157 18.5 10Z" fill="black"></path></svg>'},112:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21.5 9.5C21.5 6.18629 18.8137 3.5 15.5 3.5H8.5C5.18629 3.5 2.5 6.18629 2.5 9.5V10.5835C2.5 13.8511 5.14889 16.5 8.41647 16.5V16.5C8.46467 16.5 8.50524 16.5341 8.50917 16.5821C8.54902 17.0701 8.54809 19.5982 4.4 20.5H7.2C10.44 20.5 11.96 18.5444 13.22 16.5H15.5C18.8137 16.5 21.5 13.8137 21.5 10.5V9.5Z" stroke="currentColor" stroke-miterlimit="10" stroke-linejoin="round"></path><g opacity="0.5"><circle cx="16" cy="10.0031" r="1" fill="currentColor"></circle><circle cx="12" cy="10.0031" r="1" fill="currentColor"></circle><circle cx="8" cy="10.0031" r="1" fill="currentColor"></circle></g></svg>'},53033:e=>{e.exports='<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M17.6027 11.7221C19.1743 13.0429 21.5227 12.964 23.0014 11.4853L14.5161 3C13.0374 4.4787 12.9585 6.82709 14.2793 8.39865L11.4402 11.2378L10.9806 10.7782C9.80901 9.6066 7.90951 9.6066 6.73794 10.7782L5.32373 12.1924C4.9332 12.5829 4.9332 13.2161 5.32373 13.6066L12.3948 20.6777C12.7853 21.0682 13.4185 21.0682 13.809 20.6777L15.2232 19.2635C16.3948 18.0919 16.3948 16.1924 15.2232 15.0208L14.7636 14.5612L17.6027 11.7221Z" fill="black"></path><path d="M23.0014 11.4853L23.3549 11.8388C23.5502 11.6436 23.5502 11.327 23.3549 11.1317L23.0014 11.4853ZM17.6027 11.7221L17.9244 11.3394C17.7259 11.1725 17.4326 11.1851 17.2492 11.3686L17.6027 11.7221ZM14.5161 3L14.8697 2.64645C14.6744 2.45118 14.3578 2.45118 14.1626 2.64645L14.5161 3ZM14.2793 8.39865L14.6328 8.7522C14.8162 8.56878 14.8289 8.27554 14.662 8.07695L14.2793 8.39865ZM11.4402 11.2378L11.0866 11.5913C11.1804 11.6851 11.3076 11.7378 11.4402 11.7378C11.5728 11.7378 11.6999 11.6851 11.7937 11.5913L11.4402 11.2378ZM5.32373 13.6066L4.97017 13.9602L5.32373 13.6066ZM12.3948 20.6777L12.7483 20.3241L12.3948 20.6777ZM15.2232 15.0208L15.5768 14.6673L15.2232 15.0208ZM14.7636 14.5612L14.4101 14.2077C14.3163 14.3014 14.2636 14.4286 14.2636 14.5612C14.2636 14.6938 14.3163 14.821 14.4101 14.9148L14.7636 14.5612ZM22.6478 11.1317C21.3542 12.4254 19.2992 12.4947 17.9244 11.3394L17.2811 12.1049C19.0495 13.5911 21.6912 13.5026 23.3549 11.8388L22.6478 11.1317ZM14.1626 3.35355L22.6478 11.8388L23.3549 11.1317L14.8697 2.64645L14.1626 3.35355ZM14.662 8.07695C13.5067 6.70224 13.576 4.64723 14.8697 3.35355L14.1626 2.64645C12.4988 4.31017 12.4103 6.95193 13.8965 8.72034L14.662 8.07695ZM13.9257 8.04509L11.0866 10.8842L11.7937 11.5913L14.6328 8.7522L13.9257 8.04509ZM11.7937 10.8842L11.3341 10.4246L10.627 11.1317L11.0866 11.5913L11.7937 10.8842ZM11.3341 10.4246C9.9673 9.05779 7.75122 9.05779 6.38439 10.4246L7.09149 11.1317C8.0678 10.1554 9.65072 10.1554 10.627 11.1317L11.3341 10.4246ZM6.38439 10.4246L4.97017 11.8388L5.67728 12.5459L7.09149 11.1317L6.38439 10.4246ZM4.97017 11.8388C4.38439 12.4246 4.38439 13.3744 4.97017 13.9602L5.67728 13.253C5.48202 13.0578 5.48202 12.7412 5.67728 12.5459L4.97017 11.8388ZM4.97017 13.9602L12.0412 21.0312L12.7483 20.3241L5.67728 13.253L4.97017 13.9602ZM12.0412 21.0312C12.627 21.617 13.5768 21.617 14.1626 21.0312L13.4555 20.3241C13.2602 20.5194 12.9436 20.5194 12.7483 20.3241L12.0412 21.0312ZM14.1626 21.0312L15.5768 19.617L14.8697 18.9099L13.4555 20.3241L14.1626 21.0312ZM15.5768 19.617C16.9436 18.2502 16.9436 16.0341 15.5768 14.6673L14.8697 15.3744C15.846 16.3507 15.846 17.9336 14.8697 18.9099L15.5768 19.617ZM15.5768 14.6673L15.1172 14.2077L14.4101 14.9148L14.8697 15.3744L15.5768 14.6673ZM15.1172 14.9148L17.9563 12.0757L17.2492 11.3686L14.4101 14.2077L15.1172 14.9148Z" fill="black"></path><path d="M9.95274 18.3018L3.65956 22.3408L7.69962 16.0487L9.95274 18.3018Z" fill="white" stroke="black"></path></svg>'},96373:e=>{e.exports='<svg width="84" height="84" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M40 42H0M84 42H44M42 84V44M42 40V0M3 12V0M81 72v12M72 3h11M12 81H1M12 3H1M72 81h11M81 12V0M3 72v12" stroke="#fff" stroke-width="6"></path><path d="M40 42H1M83 42H44M42 83V44M42 40V1M3 11V1M81 73v10M73 3h10M11 81H1M11 3H1M73 81h10M81 11V1M3 73v10" stroke="#000" stroke-width="4"></path></svg>'},51888:e=>{e.exports='<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g opacity=".66" fill="currentColor"><path d="M3 9V7h1v2H3ZM7 3h2v1H7V3ZM11 3h2v1h-2V3ZM15 3h2v1h-2V3ZM21 7v2h-1V7h1ZM3 13v-2h1v2H3ZM3 17v-2h1v2H3ZM9 21H7v-1h2v1ZM4 5V4h1V3H3v2h1ZM21 5h-1V4h-1V3h2v2ZM3 19h1v1h1v1H3v-2Z"></path></g><path d="M11.015 23.728a.694.694 0 0 1-.13-.8l1.19-2.382 2.122 2.121-2.381 1.19a.694.694 0 0 1-.801-.13Z" fill="currentColor"></path><path opacity=".25" d="m14.197 17.718 4.95-4.95 2.828 2.828-4.95 4.95-2.828-2.828Z" fill="currentColor"></path><path d="m23.036 13.121-1.415-1.414a1 1 0 0 0-1.414 0l-6.216 6.217a3 3 0 0 0-.725 1.172l-.092.277a.5.5 0 0 1-.121.196l-.978.977 2.122 2.121.977-.977a.5.5 0 0 1 .195-.12l.277-.093a3 3 0 0 0 1.173-.725l6.217-6.216a1 1 0 0 0 0-1.415Z" stroke="currentColor" stroke-linecap="round"></path><rect opacity=".5" x="7" y="7" width="10" height="2" rx="1" fill="currentColor"></rect><rect opacity=".5" x="7" y="11" width="10" height="2" rx="1" fill="currentColor"></rect><rect opacity=".5" x="7" y="15" width="6" height="2" rx="1" fill="currentColor"></rect></svg>'},25746:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6316 7.5H7.36842C6.88881 7.5 6.5 7.90294 6.5 8.4V15.6C6.5 16.0971 6.88881 16.5 7.36842 16.5H16.6316C17.1112 16.5 17.5 16.0971 17.5 15.6V8.4C17.5 7.90294 17.1112 7.5 16.6316 7.5Z" stroke="currentColor" stroke-miterlimit="10"></path><path opacity="0.5" d="M16 13V14.75C16 14.8881 15.8881 15 15.75 15H10.5L14 11L16 13Z" fill="currentColor"></path><path d="M10.1159 12.4609L8 15H13L10.8841 12.4609C10.6842 12.2211 10.3158 12.2211 10.1159 12.4609Z" fill="currentColor"></path><circle cx="9.5" cy="10.5" r="1" fill="currentColor"></circle><path d="M17 20.5H17.5C19.7091 20.5 21.5 18.7091 21.5 16.5V14M19.5 16L21.5 14M21.5 14L23.5 16" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M7 3.5H6.5C4.29086 3.5 2.5 5.29086 2.5 7.5V10M4.5 8L2.5 10M2.5 10L0.5 8" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},4587:e=>{e.exports='<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="path-1-inside-1_4743_161892" fill="white"><path fill-rule="evenodd" clip-rule="evenodd" d="M22 11C22 17.0751 17.0751 22 11 22C4.92487 22 0 17.0751 0 11C0 4.92487 4.92487 0 11 0C17.0751 0 22 4.92487 22 11ZM12.0607 11L15.5303 7.53033C15.8232 7.23744 15.8232 6.76256 15.5303 6.46967C15.2374 6.17678 14.7626 6.17678 14.4697 6.46967L11 9.93934L7.53033 6.46967C7.23744 6.17678 6.76256 6.17678 6.46967 6.46967C6.17678 6.76256 6.17678 7.23744 6.46967 7.53033L9.93934 11L6.46967 14.4697C6.17678 14.7626 6.17678 15.2374 6.46967 15.5303C6.76256 15.8232 7.23744 15.8232 7.53033 15.5303L11 12.0607L14.4697 15.5303C14.7626 15.8232 15.2374 15.8232 15.5303 15.5303C15.8232 15.2374 15.8232 14.7626 15.5303 14.4697L12.0607 11Z"></path></mask><path fill-rule="evenodd" clip-rule="evenodd" d="M22 11C22 17.0751 17.0751 22 11 22C4.92487 22 0 17.0751 0 11C0 4.92487 4.92487 0 11 0C17.0751 0 22 4.92487 22 11ZM12.0607 11L15.5303 7.53033C15.8232 7.23744 15.8232 6.76256 15.5303 6.46967C15.2374 6.17678 14.7626 6.17678 14.4697 6.46967L11 9.93934L7.53033 6.46967C7.23744 6.17678 6.76256 6.17678 6.46967 6.46967C6.17678 6.76256 6.17678 7.23744 6.46967 7.53033L9.93934 11L6.46967 14.4697C6.17678 14.7626 6.17678 15.2374 6.46967 15.5303C6.76256 15.8232 7.23744 15.8232 7.53033 15.5303L11 12.0607L14.4697 15.5303C14.7626 15.8232 15.2374 15.8232 15.5303 15.5303C15.8232 15.2374 15.8232 14.7626 15.5303 14.4697L12.0607 11Z" fill="currentColor"></path><path d="M15.5303 7.53033L16.591 8.59099L15.5303 7.53033ZM12.0607 11L11 9.93934L9.93934 11L11 12.0607L12.0607 11ZM15.5303 6.46967L16.591 5.40901V5.40901L15.5303 6.46967ZM14.4697 6.46967L13.409 5.40901L13.409 5.40901L14.4697 6.46967ZM11 9.93934L9.93934 11L11 12.0607L12.0607 11L11 9.93934ZM7.53033 6.46967L8.59099 5.40901L8.59099 5.40901L7.53033 6.46967ZM6.46967 6.46967L7.53033 7.53033L7.53033 7.53033L6.46967 6.46967ZM6.46967 7.53033L7.53033 6.46967V6.46967L6.46967 7.53033ZM9.93934 11L11 12.0607L12.0607 11L11 9.93934L9.93934 11ZM6.46967 14.4697L5.40901 13.409L5.40901 13.409L6.46967 14.4697ZM6.46967 15.5303L5.40901 16.591L5.40901 16.591L6.46967 15.5303ZM7.53033 15.5303L8.59099 16.591L8.59099 16.591L7.53033 15.5303ZM11 12.0607L12.0607 11L11 9.93934L9.93934 11L11 12.0607ZM14.4697 15.5303L13.409 16.591L13.409 16.591L14.4697 15.5303ZM15.5303 15.5303L16.591 16.591L16.591 16.591L15.5303 15.5303ZM15.5303 14.4697L16.591 13.409L16.591 13.409L15.5303 14.4697ZM11 23.5C17.9036 23.5 23.5 17.9036 23.5 11H20.5C20.5 16.2467 16.2467 20.5 11 20.5V23.5ZM-1.5 11C-1.5 17.9036 4.09644 23.5 11 23.5V20.5C5.75329 20.5 1.5 16.2467 1.5 11H-1.5ZM11 -1.5C4.09644 -1.5 -1.5 4.09644 -1.5 11H1.5C1.5 5.75329 5.75329 1.5 11 1.5V-1.5ZM23.5 11C23.5 4.09644 17.9036 -1.5 11 -1.5V1.5C16.2467 1.5 20.5 5.75329 20.5 11H23.5ZM14.4697 6.46967L11 9.93934L13.1213 12.0607L16.591 8.59099L14.4697 6.46967ZM14.4697 7.53033C14.1768 7.23744 14.1768 6.76256 14.4697 6.46967L16.591 8.59099C17.4697 7.71231 17.4697 6.28769 16.591 5.40901L14.4697 7.53033ZM15.5303 7.53033C15.2374 7.82322 14.7626 7.82322 14.4697 7.53033L16.591 5.40901C15.7123 4.53033 14.2877 4.53033 13.409 5.40901L15.5303 7.53033ZM12.0607 11L15.5303 7.53033L13.409 5.40901L9.93934 8.87868L12.0607 11ZM6.46967 7.53033L9.93934 11L12.0607 8.87868L8.59099 5.40901L6.46967 7.53033ZM7.53033 7.53033C7.23744 7.82323 6.76256 7.82322 6.46967 7.53033L8.59099 5.40901C7.71231 4.53033 6.28769 4.53033 5.40901 5.40901L7.53033 7.53033ZM7.53033 6.46967C7.82322 6.76256 7.82322 7.23744 7.53033 7.53033L5.40901 5.40901C4.53033 6.28769 4.53033 7.71231 5.40901 8.59099L7.53033 6.46967ZM11 9.93934L7.53033 6.46967L5.40901 8.59099L8.87868 12.0607L11 9.93934ZM8.87868 9.93934L5.40901 13.409L7.53033 15.5303L11 12.0607L8.87868 9.93934ZM5.40901 13.409C4.53033 14.2877 4.53033 15.7123 5.40901 16.591L7.53033 14.4697C7.82322 14.7626 7.82322 15.2374 7.53033 15.5303L5.40901 13.409ZM5.40901 16.591C6.28769 17.4697 7.71231 17.4697 8.59099 16.591L6.46967 14.4697C6.76256 14.1768 7.23744 14.1768 7.53033 14.4697L5.40901 16.591ZM8.59099 16.591L12.0607 13.1213L9.93934 11L6.46967 14.4697L8.59099 16.591ZM9.93934 13.1213L13.409 16.591L15.5303 14.4697L12.0607 11L9.93934 13.1213ZM13.409 16.591C14.2877 17.4697 15.7123 17.4697 16.591 16.591L14.4697 14.4697C14.7626 14.1768 15.2374 14.1768 15.5303 14.4697L13.409 16.591ZM16.591 16.591C17.4697 15.7123 17.4697 14.2877 16.591 13.409L14.4697 15.5303C14.1768 15.2374 14.1768 14.7626 14.4697 14.4697L16.591 16.591ZM16.591 13.409L13.1213 9.93934L11 12.0607L14.4697 15.5303L16.591 13.409Z" fill="currentColor" mask="url(#path-1-inside-1_4743_161892)"></path></svg>'},47013:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M21.8496 13.7374L20.8646 13.5648C20.9535 13.0573 21 12.5345 21 12C21 11.4655 20.9535 10.9427 20.8646 10.4352L21.8496 10.2626C21.9485 10.8269 22 11.4074 22 12C22 12.5926 21.9485 13.1731 21.8496 13.7374ZM21.3995 8.57885L20.4598 8.92095C20.0976 7.9259 19.5643 7.01207 18.895 6.21522L19.6607 5.57204C20.4039 6.45683 20.9966 7.47223 21.3995 8.57885ZM18.428 4.33932L17.7848 5.10504C16.9879 4.43571 16.0741 3.90244 15.0791 3.54019L15.4211 2.60052C16.5278 3.0034 17.5432 3.59613 18.428 4.33932ZM13.7374 2.15039L13.5648 3.13539C13.0573 3.04648 12.5345 3 12 3C11.4655 3 10.9427 3.04648 10.4352 3.13539L10.2626 2.15039C10.8269 2.05154 11.4074 2 12 2C12.5926 2 13.1731 2.05154 13.7374 2.15039ZM8.57885 2.60052L8.92095 3.54019C7.9259 3.90244 7.01207 4.43571 6.21522 5.10504L5.57204 4.33932C6.45683 3.59613 7.47223 3.0034 8.57885 2.60052ZM4.33932 5.57204C3.59613 6.45683 3.0034 7.47224 2.60052 8.57885L3.54019 8.92095C3.90244 7.9259 4.43571 7.01208 5.10504 6.21522L4.33932 5.57204ZM2.15039 10.2626C2.05154 10.8269 2 11.4074 2 12C2 12.5926 2.05154 13.1731 2.15039 13.7374L3.13539 13.5648C3.04648 13.0573 3 12.5345 3 12C3 11.4655 3.04648 10.9427 3.13539 10.4352L2.15039 10.2626ZM2.60052 15.4211L3.54019 15.0791C3.90244 16.0741 4.43571 16.9879 5.10504 17.7848L4.33932 18.428C3.59613 17.5432 3.0034 16.5278 2.60052 15.4211ZM5.57204 19.6607L6.21522 18.895C7.01208 19.5643 7.9259 20.0976 8.92095 20.4598L8.57885 21.3995C7.47224 20.9966 6.45683 20.4039 5.57204 19.6607ZM10.2626 21.8496L10.4352 20.8646C10.9427 20.9535 11.4655 21 12 21C12.5345 21 13.0573 20.9535 13.5648 20.8646L13.7374 21.8496C13.1731 21.9485 12.5926 22 12 22C11.4074 22 10.8269 21.9485 10.2626 21.8496ZM15.4211 21.3995L15.0791 20.4598C16.0741 20.0976 16.9879 19.5643 17.7848 18.895L18.428 19.6607C17.5432 20.4039 16.5278 20.9966 15.4211 21.3995ZM19.6607 18.428L18.895 17.7848C19.5643 16.9879 20.0976 16.0741 20.4598 15.0791L21.3995 15.4211C20.9966 16.5278 20.4039 17.5432 19.6607 18.428Z" fill="currentColor"></path></svg>'},68405:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 2.14508L5.90551 3.49818L5.41525 4.36975L4.5 3.85493V4.86793H3.5V2.14508ZM7.91809 4.63025L11.2388 6.49818L10.7486 7.36975L7.42783 5.50183L7.91809 4.63025ZM3.5 10.8679V7.13208H4.5V10.8679H3.5ZM13.2514 7.63025L16.5722 9.49818L16.0819 10.3698L12.7612 8.50183L13.2514 7.63025ZM18.5848 10.6303L21.0199 12L18.5848 13.3698L18.0945 12.4982L18.9801 12L18.0945 11.5018L18.5848 10.6303ZM3.5 16.8679V13.1321H4.5V16.8679H3.5ZM16.5722 14.5018L13.2514 16.3698L12.7612 15.4982L16.0819 13.6303L16.5722 14.5018ZM11.2388 17.5018L7.91809 19.3698L7.42783 18.4982L10.7486 16.6303L11.2388 17.5018ZM3.5 19.1321H4.5V20.1451L5.41525 19.6303L5.90551 20.5018L3.5 21.8549V19.1321Z" fill="currentColor"></path></svg>'},3508:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3 5V3H5V4H4V5H3ZM11 3H7V4H11V3ZM13 3V4H17V3H13ZM19 3V4H20V5H21V3H19ZM21 7H20V11H21V7ZM21 13H20V17H21V13ZM21 19H20V20H19V21H21V19ZM17 21V20H13V21H17ZM11 21V20H7V21H11ZM5 21V20H4V19H3V21H5ZM3 17H4V13H3V17ZM3 11H4V7H3V11Z" fill="currentColor"></path></svg>'},25725:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.858 4.578a.122.122 0 0 0 .031.172.431.431 0 0 1 .131.386c-.024.07-.141.094-.159.144-.046.088-1.148.989-1.112 1.06-.548-.366-3.068-2.465-3.49-1.2a4.239 4.239 0 0 0-1.958-.3 1.786 1.786 0 0 1-.253-.258 1.224 1.224 0 0 1-.023-.3c.289-.791 1.894-1.127 2.337-2.075.2-.5-.883-1.424-.778-.971.257.258.288.77.465.971.086.107-.018.191-.125.235A5.612 5.612 0 0 0 11.6 4.309a.856.856 0 0 0-.031.658c-.324.078-.653.23-.653.627a.4.4 0 0 0-.068.031C10.7 4.561 8.51 4.374 8.157 5.317q-.236-.442-.825-.12a1.156 1.156 0 0 1-.175-.285c0-.814 1.75-1.072 1.8-1.8a1.073 1.073 0 0 0-.261-.846q-.31-.158-.3.214a2.516 2.516 0 0 1 .358.614C8.955 3.377 6.483 4.4 6.94 5.39a4.588 4.588 0 0 0-1.551 1.551C4.4 6.484 3.364 8.946 3.095 8.75a2.516 2.516 0 0 1-.614-.358q-.348-.048-.214.3a1.073 1.073 0 0 0 .846.261c.727-.048.985-1.8 1.8-1.8a1.156 1.156 0 0 1 .285.175q-.322.589.12.825c-.958.359-.726 2.549.308 2.689a.4.4 0 0 0-.031.068c-.4 0-.548.329-.627.653a.856.856 0 0 0-.658.031 5.572 5.572 0 0 0-1.869 2.324c-.044.107-.128.211-.235.125-.2-.177-.713-.207-.971-.465a.2.2 0 0 0-.157.031c-.326.244.9.84 1.128.747.948-.443 1.285-2.047 2.075-2.337a1.224 1.224 0 0 1 .3.023 1.786 1.786 0 0 1 .258.253 4.239 4.239 0 0 0 .3 1.958c-1.258.419.876 3.007 1.2 3.49-.07-.035-.915 1.036-1.06 1.112-.05.018-.073.136-.144.159-.424.092-.217-.166-.475-.183a.126.126 0 0 0-.136.11.123.123 0 0 0 .112.133c.171.039.674.2.828.1a.433.433 0 0 0 .172-.308c.093-.37.95-.508.95-1.086.082-.631-.768-2.048-.942-2.545a13.243 13.243 0 0 0 2.3 2.7c-.071.226-.257.505-.3.736 0 .712 2.585 2.558 3.12 2.023a1.552 1.552 0 0 1 .044.7c.048.361.242.376.352.634a.187.187 0 0 1-.016.219 5.151 5.151 0 0 0-.428.517q-.088.268.2.2c.487-.421.739-2.135-.078-2.47a9.007 9.007 0 0 1-2.744-1.882.651.651 0 0 1 .253-.311 7.813 7.813 0 0 0 5.872 1.932c1.381-.154 4.457-.9 2.863-2.59a5.594 5.594 0 0 0 .574-.574c1.695 1.593 2.435-1.483 2.59-2.863a7.813 7.813 0 0 0-1.939-5.866.651.651 0 0 1 .311-.253A9.007 9.007 0 0 1 20.5 10.83c.337.823 2.045.564 2.47.078q.088-.268-.2-.2a5.151 5.151 0 0 0-.517.428.187.187 0 0 1-.219.016c-.258-.11-.274-.3-.634-.352a1.552 1.552 0 0 1-.7-.044c.529-.529-1.278-3.119-2.023-3.12-.231.046-.51.231-.736.3a13.3 13.3 0 0 0-2.7-2.3c.5.174 1.914 1.025 2.545.942.618 0 .691-.852 1.086-.95a.433.433 0 0 0 .308-.172c.1-.153-.062-.657-.1-.828q-.045-.172-.222-.06c-.042.067.042-.045 0 .01zM8.084 18.668v.031c-.016.031-.016-.026-.008-.055a.062.062 0 0 1 .008.024zm-1.575-3.324c-.651-.213-1.291-1.959-.335-2.006.834-.041 1.118 2.254.335 2.006-.303-.099.306.097 0 0zm7.712 4.146c-.77.37-1.936-.273-1-1.064.893-.758 1.881.646 1 1.064-.733.353.779-.371 0 0zm-2.433-3.269c-1.256 1.511-3.562.051-2.421-1.629 1.191-1.754 3.921-.164 2.421 1.629-.645.779.64-.764 0 .001zM9.955 9.956c-.687.687-2.335.417-1.368-.71-.624-.26.4-1.271.658-.658 1.084-.93 1.422.656.71 1.368zm9.534 4.266c-.39.819-1.936-.1-1.064-1 .779-.81 1.475.149 1.064 1-.37.778.353-.734.001 0zm-3.269-2.433c-1.793 1.5-3.384-1.23-1.629-2.421 1.68-1.141 3.14 1.165 1.629 2.421-.764.639.78-.645.001 0zm-.876-5.279c.223.7-1.93.535-2.006-.335-.09-1.035 1.814-.252 2.006.335.096.305-.099-.303 0 0zm3.363 1.566s0 .005-.008.008a.088.088 0 0 1-.055-.008.123.123 0 0 1 .062 0z"></path></svg>'},61019:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18 20.12L19 8.5H5l1 11.62a1.51 1.51 0 0 0 1.46 1.38h9.04a1.51 1.51 0 0 0 1.5-1.38zM8.5 5.5V4A1.5 1.5 0 0 1 10 2.5h4A1.5 1.5 0 0 1 15.5 4v1.5h-7z" fill="currentColor" fill-opacity=".01" stroke="currentColor" stroke-miterlimit="10"></path><path d="M20 8.5H4l.66-2a1.49 1.49 0 0 1 1.42-1h11.84a1.49 1.49 0 0 1 1.42 1l.66 2z" fill="currentColor" fill-opacity=".01" stroke="currentColor" stroke-linejoin="round"></path><path opacity=".5" d="M12.5 11h-1a.5.5 0 0 0-.5.5v7a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.5-.5zm3.1 8h-.52a.5.5 0 0 1-.49-.53l.46-7a.5.5 0 0 1 .5-.47h.52a.49.49 0 0 1 .49.53l-.46 7a.5.5 0 0 1-.5.47zm-7.2 0h.52a.5.5 0 0 0 .49-.53l-.46-7a.5.5 0 0 0-.5-.47h-.52a.49.49 0 0 0-.49.53l.46 7a.5.5 0 0 0 .5.47z" fill="currentColor"></path></svg>'},81950:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="8" stroke="currentColor" stroke-width="3"></circle><path fill-rule="evenodd" clip-rule="evenodd" d="M16.596 18.718L5.282 7.404l2.122-2.122 11.314 11.314-2.122 2.122z" fill="currentColor"></path></svg>'},96993:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10zm-10.4 3.461h-.001l-.675 1.071-.886-.905-3.56-3.64 1.43-1.399 2.715 2.776c.272-.372.621-.83 1.045-1.352a38.652 38.652 0 015.023-5.115l1.289 1.53a36.658 36.658 0 00-4.76 4.847c-.54.665-.95 1.218-1.223 1.602a18.934 18.934 0 00-.378.554l-.016.026-.004.005z" fill="currentColor"></path></svg>'},41400:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><line x1="0.5" y1="8" x2="0.5" y2="16" stroke="currentColor"></line><line x1="23.5" y1="8" x2="23.5" y2="16" stroke="currentColor"></line><line x1="21" y1="12" x2="3" y2="12" stroke="currentColor"></line><path d="M23 12L18.5 15.4641L18.5 8.5359L23 12Z" fill="currentColor"></path><path d="M1 12L5.5 8.5359L5.5 15.4641L1 12Z" fill="currentColor"></path></svg>'},12299:e=>{e.exports='<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><g opacity=".75"><path d="M13.5 15v1.5A1.5 1.5 0 0015 18h5.643a1.5 1.5 0 001.5-1.5V8.75L19.393 6H15a1.5 1.5 0 00-1.5 1.5V11" stroke="currentColor" stroke-miterlimit="10"></path><path opacity=".66" d="M21.75 8.907l-2.514-2.514v2.014a.5.5 0 00.5.5h2.014z" fill="currentColor"></path></g><g opacity=".75"><path d="M10.5 15v1.5A1.5 1.5 0 019 18H3.357a1.5 1.5 0 01-1.5-1.5v-9a1.5 1.5 0 011.5-1.5H7.75l2.75 2.75V11" stroke="currentColor" stroke-miterlimit="10"></path><path opacity=".66" d="M10.107 8.906L7.593 6.392v2.014a.5.5 0 00.5.5h2.014z" fill="currentColor"></path></g><path d="M6 13h12M16 15.5l2.5-2.5-2.5-2.5M8 10.5L5.5 13 8 15.5" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},3154:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3 6.5H4.5M17.5 21V7.25C17.5 6.83579 17.1642 6.5 16.75 6.5H8.5" stroke="currentColor" stroke-linecap="round"></path><path d="M21 17.5H19.5M6.5 3V16.75C6.5 17.1642 6.83579 17.5 7.25 17.5H15.5" stroke="currentColor" stroke-linecap="round"></path><path opacity="0.5" d="M19 5L5 19" stroke="currentColor" stroke-linecap="round"></path></svg>'},90385:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 21.5h9a1.5 1.5 0 001.5-1.5v-9L20 8.5h-2" stroke="currentColor" fill="none" stroke-miterlimit="2.366" stroke-dasharray="2 1" opacity=".33"></path><path d="M8.5 8.5H6L2.5 12v8A1.5 1.5 0 004 21.5h8.5v-6" stroke="currentColor" fill="none" stroke-miterlimit="10"></path><path opacity=".5" d="M3 12.2L6.2 9v2.7a.5.5 0 01-.5.5H3z" fill="currentColor"></path><path opacity=".25" d="M18.5 8l1 1v8a1.5 1.5 0 01-1.5 1.5H9.5l.5-1-.5-1H17a1.5 1.5 0 001.5-1.5V8z" fill="currentColor" stroke="currentColor" stroke-miterlimit="10"></path><path d="M8.5 2.5H15L18.5 6v8a1.5 1.5 0 01-1.5 1.5H8.5l.5-1-.5-1 .5-1-.5-1 .5-1-.5-1 .5-1-.5-1 .5-1-.5-1 .5-1-.5-1v-1z" stroke="currentColor" fill="none" stroke-miterlimit="10"></path><path opacity=".5" d="M18 6.2L14.8 3v2.7a.5.5 0 00.5.5H18z" fill="currentColor"></path></svg>'},8571:e=>{e.exports='<svg width="31" height="31" viewBox="-6 -6 37 37" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14 3.5L7 3.5C6.17157 3.5 5.5 4.17157 5.5 5V19C5.5 19.8284 6.17157 20.5 7 20.5H17C17.8284 20.5 18.5 19.8284 18.5 19V8L14 3.5Z" stroke="currentColor" stroke-miterlimit="10"></path><path opacity="0.66" d="M14.43 8.2H18L13.8 4V7.57C13.8022 7.73641 13.8693 7.89539 13.987 8.01307C14.1047 8.13075 14.2636 8.19782 14.43 8.2Z" fill="currentColor"></path></svg>'},14483:e=>{e.exports='<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="28.5" cy="28.5" r="3" fill="black" stroke="white"></circle><circle cx="5.99992" cy="5.99992" r="4.99992" fill="white"></circle><circle cx="5.99992" cy="5.99992" r="4.24992" stroke="#4537DE" stroke-width="1.5"></circle><g filter="url(#filter0_d_9235_307392)"><path fill-rule="evenodd" clip-rule="evenodd" d="M22.0852 19.2713C23.2183 17.0319 22.8204 14.35 20.8917 12.4213C18.9965 10.5262 16.6054 9.96035 14.0173 9.34793C11.4553 8.74167 8.70028 8.08975 6.04248 6.05731C8.07492 8.71512 8.72683 11.4702 9.33307 14.0322C9.94547 16.6203 10.5113 19.0115 12.4064 20.9066C14.3352 22.8354 17.0173 23.2332 19.2568 22.0999L21.5991 24.4421L24.4276 21.6137L22.0852 19.2713Z" fill="white"></path><path d="M22.0852 19.2713L21.4903 18.9704L21.2723 19.4013L21.6138 19.7427L22.0852 19.2713ZM14.0173 9.34793L14.1709 8.69918L14.0173 9.34793ZM6.04248 6.05731L6.44745 5.52774L5.51291 6.46228L6.04248 6.05731ZM9.33307 14.0322L9.98182 13.8787L9.33307 14.0322ZM19.2568 22.0999L19.7283 21.6285L19.3868 21.2869L18.9558 21.505L19.2568 22.0999ZM21.5991 24.4421L21.1277 24.9135L21.5991 25.3849L22.0705 24.9135L21.5991 24.4421ZM24.4276 21.6137L24.899 22.0851L25.3704 21.6137L24.899 21.1423L24.4276 21.6137ZM20.4203 12.8927C22.1507 14.6231 22.4899 16.9948 21.4903 18.9704L22.6801 19.5723C23.9466 17.0691 23.4901 14.077 21.3631 11.9499L20.4203 12.8927ZM13.8638 9.99668C16.4809 10.616 18.6795 11.1519 20.4203 12.8927L21.3631 11.9499C19.3136 9.90044 16.7299 9.30474 14.1709 8.69918L13.8638 9.99668ZM5.63751 6.58688C8.42122 8.7156 11.3074 9.39175 13.8638 9.99668L14.1709 8.69918C11.6032 8.0916 8.97935 7.4639 6.44745 5.52774L5.63751 6.58688ZM9.98182 13.8787C9.3769 11.3223 8.70077 8.43605 6.57205 5.65235L5.51291 6.46228C7.44907 8.99419 8.07675 11.6181 8.68432 14.1857L9.98182 13.8787ZM12.8778 20.4352C11.137 18.6944 10.6011 16.4958 9.98182 13.8787L8.68432 14.1857C9.28986 16.7448 9.88554 19.3285 11.935 21.378L12.8778 20.4352ZM18.9558 21.505C16.9802 22.5048 14.6083 22.1657 12.8778 20.4352L11.935 21.378C14.0622 23.5052 17.0545 23.9615 19.5579 22.6947L18.9558 21.505ZM22.0705 23.9707L19.7283 21.6285L18.7854 22.5713L21.1277 24.9135L22.0705 23.9707ZM23.9562 21.1423L21.1277 23.9707L22.0705 24.9135L24.899 22.0851L23.9562 21.1423ZM21.6138 19.7427L23.9562 22.0851L24.899 21.1423L22.5566 18.7999L21.6138 19.7427Z" fill="black"></path><path d="M6.74951 6.7644L15.9419 15.9568" stroke="black" stroke-width="1.33333"></path><circle cx="16.6492" cy="16.6639" r="2" transform="rotate(-45 16.6492 16.6639)" fill="black"></circle></g><defs><filter id="filter0_d_9235_307392" x="2.84603" y="4.63882" width="25.1912" height="25.1906" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1.77778"></feOffset><feGaussianBlur stdDeviation="1.33333"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_9235_307392"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_9235_307392" result="shape"></feBlend></filter></defs></svg>'},95919:e=>{e.exports='<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="5.99992" cy="5.99992" r="4.99992" fill="white"></circle><circle cx="5.99992" cy="5.99992" r="4.24992" stroke="#4537DE" stroke-width="1.5"></circle><g filter="url(#filter0_d_9235_307392)"><path fill-rule="evenodd" clip-rule="evenodd" d="M22.0852 19.2713C23.2183 17.0319 22.8204 14.35 20.8917 12.4213C18.9965 10.5262 16.6054 9.96035 14.0173 9.34793C11.4553 8.74167 8.70028 8.08975 6.04248 6.05731C8.07492 8.71512 8.72683 11.4702 9.33307 14.0322C9.94547 16.6203 10.5113 19.0115 12.4064 20.9066C14.3352 22.8354 17.0173 23.2332 19.2568 22.0999L21.5991 24.4421L24.4276 21.6137L22.0852 19.2713Z" fill="white"></path><path d="M22.0852 19.2713L21.4903 18.9704L21.2723 19.4013L21.6138 19.7427L22.0852 19.2713ZM14.0173 9.34793L14.1709 8.69918L14.0173 9.34793ZM6.04248 6.05731L6.44745 5.52774L5.51291 6.46228L6.04248 6.05731ZM9.33307 14.0322L9.98182 13.8787L9.33307 14.0322ZM19.2568 22.0999L19.7283 21.6285L19.3868 21.2869L18.9558 21.505L19.2568 22.0999ZM21.5991 24.4421L21.1277 24.9135L21.5991 25.3849L22.0705 24.9135L21.5991 24.4421ZM24.4276 21.6137L24.899 22.0851L25.3704 21.6137L24.899 21.1423L24.4276 21.6137ZM20.4203 12.8927C22.1507 14.6231 22.4899 16.9948 21.4903 18.9704L22.6801 19.5723C23.9466 17.0691 23.4901 14.077 21.3631 11.9499L20.4203 12.8927ZM13.8638 9.99668C16.4809 10.616 18.6795 11.1519 20.4203 12.8927L21.3631 11.9499C19.3136 9.90044 16.7299 9.30474 14.1709 8.69918L13.8638 9.99668ZM5.63751 6.58688C8.42122 8.7156 11.3074 9.39175 13.8638 9.99668L14.1709 8.69918C11.6032 8.0916 8.97935 7.4639 6.44745 5.52774L5.63751 6.58688ZM9.98182 13.8787C9.3769 11.3223 8.70077 8.43605 6.57205 5.65235L5.51291 6.46228C7.44907 8.99419 8.07675 11.6181 8.68432 14.1857L9.98182 13.8787ZM12.8778 20.4352C11.137 18.6944 10.6011 16.4958 9.98182 13.8787L8.68432 14.1857C9.28986 16.7448 9.88554 19.3285 11.935 21.378L12.8778 20.4352ZM18.9558 21.505C16.9802 22.5048 14.6083 22.1657 12.8778 20.4352L11.935 21.378C14.0622 23.5052 17.0545 23.9615 19.5579 22.6947L18.9558 21.505ZM22.0705 23.9707L19.7283 21.6285L18.7854 22.5713L21.1277 24.9135L22.0705 23.9707ZM23.9562 21.1423L21.1277 23.9707L22.0705 24.9135L24.899 22.0851L23.9562 21.1423ZM21.6138 19.7427L23.9562 22.0851L24.899 21.1423L22.5566 18.7999L21.6138 19.7427Z" fill="black"></path><path d="M6.74951 6.7644L15.9419 15.9568" stroke="black" stroke-width="1.33333"></path><circle cx="16.6492" cy="16.6639" r="2" transform="rotate(-45 16.6492 16.6639)" fill="black"></circle></g><defs><filter id="filter0_d_9235_307392" x="2.84603" y="4.63882" width="25.1912" height="25.1906" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1.77778"></feOffset><feGaussianBlur stdDeviation="1.33333"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_9235_307392"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_9235_307392" result="shape"></feBlend></filter></defs></svg>'},56735:e=>{e.exports='<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.74 9.304l-3.356 3.362a8.99 8.99 0 0 0-1.387 1.77c-.505.86-1.047 1.968-.693 2.322.354.354 1.462-.189 2.32-.694a8.987 8.987 0 0 0 1.772-1.386l3.356-3.324-2.012-2.05z" fill="currentColor"></path><path opacity=".75" d="M14.967 7.037l-1.296 1.296 2.012 2.012L16.98 9.05a.58.58 0 0 0 0-.806l-1.205-1.206a.58.58 0 0 0-.807 0z" fill="currentColor"></path></svg>'},80353:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14 3.5H7A1.5 1.5 0 0 0 5.5 5v14A1.5 1.5 0 0 0 7 20.5h10a1.5 1.5 0 0 0 1.5-1.5V8L14 3.5z" fill="currentColor" fill-opacity=".01" stroke="currentColor" stroke-miterlimit="10"></path><path opacity=".66" d="M14.496 8.216h3.514l-4.216-4.217v3.514a.712.712 0 0 0 .702.703z" fill="currentColor"></path><path d="M10.5 13v5m2.5-2.5H8" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},21092:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6.5H5A1.5 1.5 0 0 0 3.5 8v13A1.5 1.5 0 0 0 5 22.5h9a1.5 1.5 0 0 0 1.5-1.5V10L12 6.5z" fill="currentColor" fill-opacity=".01" stroke="currentColor" stroke-miterlimit="10"></path><path opacity=".66" d="M12.192 10.212h2.815L11.79 6.995V9.81a.402.402 0 0 0 .402.402z" fill="currentColor"></path><path opacity=".33" d="M9.5 4A1.5 1.5 0 0 1 11 2.5h7L21.5 6v11a1.5 1.5 0 0 1-1.5 1.5h-2" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path opacity=".2" d="M18.195 6.216h2.817l-3.219-3.219v2.816a.403.403 0 0 0 .402.403z" fill="currentColor"></path><path d="M8.5 15v5m2.5-2.5H6" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},1749:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 2.5H9A1.5 1.5 0 0 0 7.5 4v10A1.5 1.5 0 0 0 9 15.5h1m-4-13H5A1.5 1.5 0 0 0 3.5 4v10A1.5 1.5 0 0 0 5 15.5h1" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M18 2.5h-5A1.5 1.5 0 0 0 11.5 4v10a1.5 1.5 0 0 0 1.5 1.5h7a1.5 1.5 0 0 0 1.5-1.5V6L18 2.5z" fill="currentColor" fill-opacity=".01" stroke="currentColor" stroke-miterlimit="10"></path><path opacity=".66" d="M18.19 6.21h2.815l-3.217-3.216V5.81a.402.402 0 0 0 .402.402z" fill="currentColor"></path><path opacity=".66" d="M10 19.75l2.5-2.5m0 0l2.5 2.5m-2.5-2.5V23" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},56283:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".75" d="M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18z" fill="currentColor" fill-opacity=".01" stroke="currentColor" stroke-miterlimit="10"></path><path d="M11 16.24V16c0-.53.3-.92 1-.92s1 .39 1 .92v.24c0 .54-.31.93-1 .93s-1-.39-1-.93zm.26-2.49v-2.23c1.49-.07 2.35-.63 2.35-1.75v-.2a1.3 1.3 0 0 0-1.44-1.35 1.7 1.7 0 0 0-1.7 1.44l-1.33-.53a3 3 0 0 1 3.08-2.26 2.71 2.71 0 0 1 3 2.75 2.86 2.86 0 0 1-2.52 2.84v1.29h-1.44z" fill="currentColor"></path></svg>'},21289:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 2.5H9A1.5 1.5 0 0 0 7.5 4v10A1.5 1.5 0 0 0 9 15.5h1m-4-13H5A1.5 1.5 0 0 0 3.5 4v10A1.5 1.5 0 0 0 5 15.5h1" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M13 2.5h5L21.5 6v8a1.5 1.5 0 0 1-1.5 1.5h-7a1.5 1.5 0 0 1-1.5-1.5V4A1.5 1.5 0 0 1 13 2.5z" fill="currentColor" fill-opacity=".01" stroke="currentColor" stroke-miterlimit="10"></path><path opacity=".66" d="M18.201 6.212h2.812L17.8 3v2.812a.402.402 0 0 0 .401.401z" fill="currentColor"></path><path opacity=".66" d="M10 20.25l2.5 2.5m0 0l2.5-2.5m-2.5 2.5V17" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},92531:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.5 10C13.5 9.17157 14.1716 8.5 15 8.5H19L21.5 11V18C21.5 18.8284 20.8284 19.5 20 19.5H15C14.1716 19.5 13.5 18.8284 13.5 18V10Z" stroke="currentColor"></path><path opacity="0.66" d="M21 11.2L18.8 9V10.7C18.8 10.9761 19.0239 11.2 19.3 11.2H21Z" fill="currentColor"></path><g opacity="0.33"><path d="M2.5 10C2.5 9.17157 3.17157 8.5 4 8.5H8L10.5 11V18C10.5 18.8284 9.82843 19.5 9 19.5H4C3.17157 19.5 2.5 18.8284 2.5 18V10Z" stroke="currentColor" stroke-dasharray="2 1"></path></g><path opacity="0.66" d="M14.5 5.5L16.5 3.5M16.5 3.5L14.5 1.5M16.5 3.5L7.25 3.5C6.55964 3.5 6 4.05964 6 4.75L6 5.5" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},32560:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.5 16v3a1.5 1.5 0 0 0 1.5 1.5h10a1.5 1.5 0 0 0 1.5-1.5V8L17 3.5h-7A1.5 1.5 0 0 0 8.5 5v6m5.5 2.5H2.5M4 11l-2.5 2.5L4 16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10"></path><path fill="none" d="M0 0h24v24H0z"></path><path d="M17.25 8.5h4.25l-5-5v4.25a.76.76 0 0 0 .75.75z" opacity=".66"></path></svg>'},44390:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.5 11V8L11 3.5H4A1.5 1.5 0 0 0 2.5 5v14A1.5 1.5 0 0 0 4 20.5h10a1.5 1.5 0 0 0 1.5-1.5v-3" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10"></path><path d="M11.25 8.5h4.25l-5-5v4.25a.76.76 0 0 0 .75.75z" opacity=".66"></path><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" d="M10 13.5h11.5M20 16l2.5-2.5L20 11"></path><path fill="none" d="M0 0h24v24H0z"></path></svg>'},26368:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.5 8A1.5 1.5 0 0 1 11 6.5h4L17.5 9v7a1.5 1.5 0 0 1-1.5 1.5h-5A1.5 1.5 0 0 1 9.5 16V8z" stroke="currentColor"></path><path opacity=".66" d="M17 9.2L14.8 7v1.7a.5.5 0 0 0 .5.5H17z" fill="currentColor"></path><path d="M9.5 17.5H9A1.5 1.5 0 0 1 7.5 16V8A1.5 1.5 0 0 1 9 6.5h.5m-2 11H7A1.5 1.5 0 0 1 5.5 16V8A1.5 1.5 0 0 1 7 6.5h.5" stroke="currentColor" stroke-linecap="round"></path></svg>'},44740:e=>{e.exports='<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.75 11l3.5-3.5-3.5-3.5" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M16.5 7.5h-6a6 6 0 1 0 0 12" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"></path><path fill="currentColor" d="M12 19h-1v1h1z"></path><path opacity=".9" fill="currentColor" d="M13 19h-1v1h1z"></path><path opacity=".8" fill="currentColor" d="M14 19h-1v1h1z"></path><path opacity=".7" fill="currentColor" d="M15 19h-1v1h1z"></path><path opacity=".6" fill="currentColor" d="M16 19h-1v1h1z"></path><path opacity=".5" fill="currentColor" d="M17 19h-1v1h1z"></path><path opacity=".4" fill="currentColor" d="M18 19h-1v1h1z"></path><path opacity=".3" fill="currentColor" d="M19 19h-1v1h1z"></path><path opacity=".2" fill="currentColor" d="M20 19h-1v1h1z"></path><path opacity=".1" fill="currentColor" d="M21 19h-1v1h1z"></path></svg>'},50245:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14 3.5H7A1.5 1.5 0 0 0 5.5 5v14A1.5 1.5 0 0 0 7 20.5h10a1.5 1.5 0 0 0 1.5-1.5V8L14 3.5z" fill="currentColor" fill-opacity=".01" stroke="currentColor" stroke-miterlimit="10"></path><path opacity=".66" d="M14.493 8.215h3.513L13.79 3.999v3.513a.712.712 0 0 0 .703.703z" fill="currentColor"></path><path d="M13 15.5H8" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},50012:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g opacity=".33"><path d="M19.5 18.5h.5a1.5 1.5 0 0 0 1.5-1.5V8L18 4.5h-5A1.5 1.5 0 0 0 11.5 6v4.5" stroke="currentColor" stroke-linecap="round"></path><path opacity=".66" d="M17.795 5.004L21 8.209h-2.705a.5.5 0 0 1-.5-.5V5.004z" fill="currentColor"></path></g><path d="M5 22.5A1.5 1.5 0 0 1 3.5 21v-5L7 12.5h9a1.5 1.5 0 0 1 1.5 1.5v7a1.5 1.5 0 0 1-1.5 1.5H5z" fill="currentColor" fill-opacity=".01" stroke="currentColor"></path><path opacity=".66" d="M4.004 16.205L7.209 13v2.705a.5.5 0 0 1-.5.5H4.004z" fill="currentColor"></path><path d="M10 3.5h-.5a4 4 0 0 0-4 4V10m2-2l-2 2m0 0l-2-2" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},55902:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g opacity=".33"><path d="M12.5 10.5V8L9 4.5H4A1.5 1.5 0 0 0 2.5 6v11A1.5 1.5 0 0 0 4 18.5h.5" stroke="currentColor" stroke-linecap="round"></path><path opacity=".66" d="M8.795 5.004L12 8.209H9.295a.5.5 0 0 1-.5-.5V5.004z" fill="currentColor"></path></g><path d="M19 12.5a1.5 1.5 0 0 1 1.5 1.5v5L17 22.5H8A1.5 1.5 0 0 1 6.5 21v-7A1.5 1.5 0 0 1 8 12.5h11z" fill="currentColor" fill-opacity=".01" stroke="currentColor"></path><path opacity=".66" d="M19.996 18.795L16.791 22v-2.705a.5.5 0 0 1 .5-.5h2.705z" fill="currentColor"></path><path d="M14 3.5h.5a4 4 0 0 1 4 4V10m-2-2l2 2m0 0l2-2" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},88695:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.5 5.5H7A1.5 1.5 0 0 0 5.5 7v10A1.5 1.5 0 0 0 7 18.5h.5" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M10 5.5h5L18.5 9v8a1.5 1.5 0 0 1-1.5 1.5h-7A1.5 1.5 0 0 1 8.5 17V7A1.5 1.5 0 0 1 10 5.5z" fill="currentColor" fill-opacity=".01" stroke="currentColor" stroke-miterlimit="10"></path><path opacity=".66" d="M15.18 9.224h2.834l-3.238-3.238v2.833a.405.405 0 0 0 .405.405z" fill="currentColor"></path><path opacity=".5" d="M22 11h-1v2h1v-2zm0 4h-1v2h1v-2zM3 11H2v2h1v-2zm19-4h-1v2h1V7zM3 7H2v2h1V7zm0 8H2v2h1v-2zm14 6h-2v1h2v-1zm-4 0h-2v1h2v-1zm-4 0H7v1h2v-1zm8-19h-2v1h2V2zm-4 0h-2v1h2V2zM9 2H7v1h2V2z" fill="currentColor"></path><path d="M21.5 19v1a1.5 1.5 0 0 1-1.5 1.5h-1m0-19h1A1.5 1.5 0 0 1 21.5 4v1m-19 0V4A1.5 1.5 0 0 1 4 2.5h1m0 19H4A1.5 1.5 0 0 1 2.5 20v-1" stroke="currentColor" stroke-miterlimit="10"></path></svg>'},80606:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M22 11h-1v2h1v-2zm0 4h-1v2h1v-2zM3 11H2v2h1v-2zm19-4h-1v2h1V7zM3 7H2v2h1V7zm0 8H2v2h1v-2zm14 6h-2v1h2v-1zm-4 0h-2v1h2v-1zm-4 0H7v1h2v-1zm8-19h-2v1h2V2zm-4 0h-2v1h2V2zM9 2H7v1h2V2z" fill="currentColor"></path><path opacity=".33" d="M7.5 5.5H7A1.5 1.5 0 0 0 5.5 7v10A1.5 1.5 0 0 0 7 18.5h.5" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path opacity=".33" d="M10 5.5h5L18.5 9v8a1.5 1.5 0 0 1-1.5 1.5h-7A1.5 1.5 0 0 1 8.5 17V7A1.5 1.5 0 0 1 10 5.5z" fill="currentColor" fill-opacity=".01" stroke="currentColor" stroke-miterlimit="10"></path><path opacity=".2" d="M15.196 9.2h2.8l-3.2-3.2v2.8a.4.4 0 0 0 .4.4z" fill="currentColor"></path><path d="M21.5 19v1a1.5 1.5 0 0 1-1.5 1.5h-1m0-19h1A1.5 1.5 0 0 1 21.5 4v1m-19 0V4A1.5 1.5 0 0 1 4 2.5h1m0 19H4A1.5 1.5 0 0 1 2.5 20v-1" stroke="currentColor" stroke-miterlimit="10"></path></svg>'},92570:e=>{e.exports='<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.25 11l-3.5-3.5 3.5-3.5" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M7.5 7.5h6a6 6 0 1 1 0 12" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"></path><path fill="currentColor" d="M12 19h1v1h-1z"></path><path opacity=".9" fill="currentColor" d="M11 19h1v1h-1z"></path><path opacity=".8" fill="currentColor" d="M10 19h1v1h-1z"></path><path opacity=".7" fill="currentColor" d="M9 19h1v1H9z"></path><path opacity=".6" fill="currentColor" d="M8 19h1v1H8z"></path><path opacity=".5" fill="currentColor" d="M7 19h1v1H7z"></path><path opacity=".4" fill="currentColor" d="M6 19h1v1H6z"></path><path opacity=".3" fill="currentColor" d="M5 19h1v1H5z"></path><path opacity=".2" fill="currentColor" d="M4 19h1v1H4z"></path><path opacity=".1" fill="currentColor" d="M3 19h1v1H3z"></path></svg>'},9635:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="9.5" stroke="currentColor" stroke-linejoin="round"></circle><path opacity="0.5" d="M15.3282 3.15024L2.59807 10.5" stroke="currentColor"></path><path opacity="0.5" d="M2.77275 15.0179L19.2272 5.51794M4.77275 18.482L21.2272 8.98205M21.4019 13.5L8.60891 20.886" stroke="currentColor"></path></svg>'},88738:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M20.66 9.38a3 3 0 0 1 .84-.13h.06a10 10 0 0 0-6.81-6.81v.06a2.998 2.998 0 0 1-.13.84 9 9 0 0 1 6.04 6.04zm0 5.24a9 9 0 0 1-6 6c.083.272.127.555.13.84v.06a10 10 0 0 0 6.81-6.81h-.1a2.97 2.97 0 0 1-.84-.09zM9.25 2.44a10 10 0 0 0-6.81 6.81h.06a3 3 0 0 1 .84.13 9 9 0 0 1 6-6 3 3 0 0 1-.13-.84l.04-.1zM3.34 14.62a2.998 2.998 0 0 1-.84.13h-.06a10 10 0 0 0 6.81 6.81v-.06a3 3 0 0 1 .13-.84 9 9 0 0 1-6.04-6.04z" fill="currentColor"></path><path d="M13.75 2.5a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0zm9.5 9.5a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0zm-9.5 9.5a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0zM4.25 12a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0z" fill="currentColor"></path></svg>'},12804:e=>{e.exports='<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><g opacity=".75"><path d="M13.5 15v1.5A1.5 1.5 0 0015 18h5.643a1.5 1.5 0 001.5-1.5V8.75L19.393 6H15a1.5 1.5 0 00-1.5 1.5V11" stroke="currentColor" stroke-miterlimit="10"></path><path opacity=".66" d="M21.75 8.907l-2.514-2.514v2.014a.5.5 0 00.5.5h2.014z" fill="currentColor"></path></g><g opacity=".75"><path d="M10.5 15v1.5A1.5 1.5 0 019 18H3.357a1.5 1.5 0 01-1.5-1.5v-9a1.5 1.5 0 011.5-1.5H7.75l2.75 2.75V11" stroke="currentColor" stroke-miterlimit="10"></path><path opacity=".66" d="M10.107 8.906L7.593 6.392v2.014a.5.5 0 00.5.5h2.014z" fill="currentColor"></path></g><path d="M6 13h12M16 15.5l2.5-2.5-2.5-2.5M8 10.5L5.5 13 8 15.5" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},27836:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 17.5V19C3.5 19.8284 4.17157 20.5 5 20.5H20C20.8284 20.5 21.5 19.8284 21.5 19V17.5" stroke="currentColor" stroke-linecap="round"></path><path opacity="0.75" d="M12.5 16L12.1464 16.3536L12.5 16.7071L12.8536 16.3536L12.5 16ZM13 4C13 3.72386 12.7761 3.5 12.5 3.5C12.2239 3.5 12 3.72386 12 4H13ZM9.35355 12.1464C9.15829 11.9512 8.84171 11.9512 8.64645 12.1464C8.45118 12.3417 8.45118 12.6583 8.64645 12.8536L9.35355 12.1464ZM16.3536 12.8536C16.5488 12.6583 16.5488 12.3417 16.3536 12.1464C16.1583 11.9512 15.8417 11.9512 15.6464 12.1464L16.3536 12.8536ZM13 16V4H12V16H13ZM8.64645 12.8536L12.1464 16.3536L12.8536 15.6464L9.35355 12.1464L8.64645 12.8536ZM12.8536 16.3536L16.3536 12.8536L15.6464 12.1464L12.1464 15.6464L12.8536 16.3536Z" fill="currentColor"></path></svg>'},13475:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.33" d="M21.5 5.5H2.5C1.39543 5.5 0.5 6.39543 0.5 7.5V16.5C0.5 17.6046 1.39543 18.5 2.5 18.5H21.5C22.6046 18.5 23.5 17.6046 23.5 16.5V7.5C23.5 6.39543 22.6046 5.5 21.5 5.5Z" stroke="currentColor"></path><path d="M8.64419 15.112C10.3082 15.112 11.4362 13.76 11.4362 12.2C11.4362 10.64 10.3082 9.288 8.64419 9.288C6.98019 9.288 5.85219 10.64 5.85219 12.2C5.85219 13.76 6.98019 15.112 8.64419 15.112ZM8.64419 14.128C7.57219 14.128 6.97219 13.136 6.97219 12.2C6.97219 11.264 7.57219 10.272 8.64419 10.272C9.72419 10.272 10.3162 11.264 10.3162 12.2C10.3162 13.136 9.72419 14.128 8.64419 14.128ZM12.3889 15H13.5089V13.224L14.3649 12.344L16.0209 15H17.3089L15.1649 11.584L17.2529 9.4H15.9009L13.5089 11.84V9.4H12.3889V15Z" fill="currentColor"></path></svg>'},14852:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect opacity="0.33" x="4.5" y="4.5" width="15" height="15" rx="1.5" stroke="currentColor"></rect><path d="M8 11.5L11 14.5L16.5 9" stroke="currentColor" stroke-linecap="round"></path></svg>'},74964:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect opacity="0.33" x="0.5" y="5.5" width="23" height="13" rx="1.5" stroke="currentColor"></rect><path d="M20.4491 10H14.5509C14.3362 10 14.2214 10.253 14.3628 10.4146L17.3119 13.785C17.4115 13.8988 17.5885 13.8988 17.6881 13.785L20.6372 10.4146C20.7786 10.253 20.6638 10 20.4491 10Z" fill="currentColor"></path><path d="M4 8.5V15.5" stroke="currentColor" stroke-linecap="round"></path></svg>'},96748:e=>{e.exports='<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg"><g opacity="0.33"><path d="M4 4C2.61929 4 1.5 5.11929 1.5 6.5V19.5C1.5 20.8807 2.61929 22 4 22H20C21.3807 22 22.5 20.8807 22.5 19.5V6.5C22.5 5.11929 21.3807 4 20 4H4Z" stroke="currentColor"></path><path d="M2 9H22" stroke="currentColor"></path><path d="M6.5 6.5V1.5M17.5 6.5V1.5" stroke="currentColor" stroke-linecap="round"></path></g><circle cx="17.5" cy="18" r="1" fill="currentColor" stroke="currentColor"></circle><circle cx="17.5" cy="13" r="1" fill="currentColor" stroke="currentColor"></circle><circle cx="12" cy="18" r="1" fill="currentColor" stroke="currentColor"></circle><circle cx="12" cy="13" r="1" fill="currentColor" stroke="currentColor"></circle><circle cx="6.5" cy="18" r="1" fill="currentColor" stroke="currentColor"></circle></svg>'},38106:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect opacity="0.33" x="0.5" y="2.5" width="23" height="20" rx="1.5" stroke="currentColor"></rect><circle cx="5.5" cy="7.5" r="1.5" fill="currentColor"></circle><circle cx="5.5" cy="12.5" r="1.5" fill="currentColor"></circle><circle cx="5.5" cy="17.5" r="1.5" fill="currentColor"></circle><path d="M10.5 12.5H19.5M10.5 17.5H19.5M10.5 7.5H19.5" stroke="currentColor" stroke-linecap="round"></path></svg>'},65071:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle opacity="0.33" cx="12" cy="12" r="7.5" stroke="currentColor"></circle><circle cx="12" cy="12" r="3" fill="currentColor"></circle></svg>'},9190:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect opacity="0.33" x="0.5" y="5.5" width="23" height="13" rx="1.5" stroke="currentColor"></rect><path d="M3 11.6826C5.9381 10.2007 9.05319 9.05663 12.2891 8.06599C12.3921 8.02261 12.5061 8 12.6217 8C12.7373 8 12.8512 8.02261 12.9542 8.06599C13.3375 8.25241 13.4615 8.83032 13.5066 9.32433C13.8517 13.1136 13.098 16.9163 11.3084 20.4164C11.1155 20.8594 10.8335 21.2722 10.4741 21.6374C10.3284 21.7935 10.1266 21.9074 9.89774 21.9626C9.66885 22.0179 9.42465 22.0117 9.20026 21.945C8.52387 21.684 8.14058 20.7519 7.96021 19.9037C7.71327 18.9791 7.74813 18.0181 8.06167 17.1074C8.28872 16.6571 8.60495 16.2413 8.99735 15.877C10.9837 13.8816 13.4379 12.2392 16.2122 11.0487L17.2832 14.0035C17.3621 14.2272 17.4973 14.4882 17.6777 14.4695C17.8581 14.4509 17.8581 14.3484 17.9257 14.2552C18.8286 12.8303 19.5249 11.3223 20 9.76242" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg>'},78236:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect opacity="0.33" x="0.5" y="5.5" width="23" height="13" rx="1.5" stroke="currentColor"></rect><path d="M12 6C12 4.34315 10.6569 3 9 3" stroke="currentColor" stroke-linecap="round"></path><path d="M12 6C12 4.34315 13.3431 3 15 3" stroke="currentColor" stroke-linecap="round"></path><path d="M12 6V18" stroke="currentColor" stroke-linecap="round"></path><path d="M12 18C12 19.6569 13.3431 21 15 21" stroke="currentColor" stroke-linecap="round"></path><path d="M12 18C12 19.6569 10.6569 21 9 21" stroke="currentColor" stroke-linecap="round"></path><line x1="9.5" y1="12.25" x2="14.5" y2="12.25" stroke="currentColor" stroke-linecap="round"></line></svg>'},59601:e=>{e.exports='<svg viewBox="0 0 24 24" width="24" height="24" xmlns="http://www.w3.org/2000/svg"><path d="M2.6 11.1L9 17.5c.6.6 1.5.6 2.1 0l6-6h1.6c.4 0 .7-.5.4-.9l-8.9-8.9c-.1-.1-.3-.1-.4 0L2.6 8.9c-.6.6-.6 1.6 0 2.2z" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round" fill="none"></path><path d="M11.4 9.8a1.2 1.2 0 100-2.4 1.2 1.2 0 000 2.4z" fill="currentColor"></path><path d="M11.4 8.6L3.6 5.1" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path opacity=".66" d="M21.5 19.7c0 .8-.7 1.5-1.5 1.5s-1.5-.7-1.5-1.5.7-3.4 1.5-3.4 1.5 2.6 1.5 3.4z" fill="currentColor"></path><path opacity=".33" d="M3.5 12H16l-.7 1.1L10 18l-6.5-6z" fill="currentColor"></path></svg>'},40865:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18 3v18H6V3h12zm1-1H5v20h14V2z" fill="currentColor"></path><path opacity=".15" d="M1.25 1C.56 1 0 1.56 0 2.25v19.5C0 22.44.56 23 1.25 23h21.5c.69 0 1.25-.56 1.25-1.25V2.25C24 1.56 23.44 1 22.75 1H1.25zM19 22H5V2h14v20z" fill="currentColor"></path><rect opacity=".15" x=".5" y="1.5" width="23" height="21" rx=".75" fill="currentColor" fill-opacity=".01" stroke="currentColor"></rect></svg>'},21:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22 1v22h.75c.69 0 1.25-.56 1.25-1.25V2.25C24 1.56 23.44 1 22.75 1H22zM2 1h-.75C.56 1 0 1.56 0 2.25v19.5C0 22.44.56 23 1.25 23H2V1z" opacity=".15" fill="currentColor"></path><rect opacity=".15" x=".5" y="1.5" width="23" height="21" rx=".75" fill="currentColor" fill-opacity=".01" stroke="currentColor"></rect><path d="M3 1H2v22h1V1zm19 0h-1v22h1V1z" fill="currentColor"></path><path opacity=".15" d="M21 2V1H3v1h18zm0 21v-1H3v1h18z" fill="currentColor"></path></svg>'},89882:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.75" d="M8.9868 7.96429C8.9868 7.82621 9.09873 7.71429 9.2368 7.71429H12.6406C12.8433 7.71429 13.026 7.83669 13.1031 8.02419L13.2548 8.39343C13.2934 8.48718 13.3847 8.54838 13.4861 8.54838H13.8121C13.9226 8.54838 14.0121 8.45884 14.0121 8.34838V6.25C14.0121 6.11193 13.9002 6 13.7621 6H2.22339C2.08532 6 1.97339 6.11193 1.97339 6.25L1.97339 8.34838C1.97339 8.45884 2.06293 8.54838 2.17339 8.54838H2.51787C2.61158 8.54838 2.69741 8.49598 2.74024 8.41264L2.95957 7.98578C3.04521 7.81909 3.21689 7.71429 3.40429 7.71429H6.76538C6.90345 7.71429 7.01538 7.82621 7.01538 7.96429V11.6571V12.4286V16.5345C7.01538 16.6684 6.90987 16.7785 6.77608 16.7842L5.00825 16.86C4.74068 16.8715 4.52966 17.0917 4.52966 17.3595V17.9C4.52966 17.9552 4.57443 18 4.62966 18H11.2868C11.342 18 11.3868 17.9552 11.3868 17.9V17.3588C11.3868 17.0913 11.1762 16.8712 10.909 16.8593L9.22572 16.7846C9.09209 16.7786 8.9868 16.6686 8.9868 16.5348V12.4286V11.6571V7.96429Z" fill="currentColor"></path><path d="M21.5 8L19.5 6M19.5 6L17.5 8M19.5 6V18M19.5 18L21.5 16M19.5 18L17.5 16" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},20626:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13.92 9l-.45-2.17c-.16-.61-.29-.87-2.58-.87h-.45v9.88l2.11.58V18h-6.7v-2h1.93V5.9h-.43c-2.35 0-2.55.29-2.69.94L4.17 9h-2l.4-5H15.8v5z"></path><path d="M20.74 16l-.24-1.23c-.09-.4-.15-.56-1.16-.56H19v5.41l1.18.31V21h-4.13v-1.27h1.09v-5.51h-.32c-1 0-1.08.17-1.17.52L15.34 16H14l.24-3H22v3z"></path></svg>'},71043:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g data-name="icons"><path d="M18.88 4H5.12A5.13 5.13 0 0 0 0 9.12v5.76A5.13 5.13 0 0 0 5.12 20h13.76A5.13 5.13 0 0 0 24 14.88V9.12A5.13 5.13 0 0 0 18.88 4zM23 14.88A4.13 4.13 0 0 1 18.88 19H5.12A4.13 4.13 0 0 1 1 14.88V9.12A4.13 4.13 0 0 1 5.12 5h13.76A4.13 4.13 0 0 1 23 9.12z"></path><path d="M8.77 9a3 3 0 1 0 0 6 3 3 0 1 0 0-6zm0 5.22A2.15 2.15 0 0 1 6.62 12a2.15 2.15 0 1 1 4.29 0 2.14 2.14 0 0 1-2.14 2.22zm9.25-5.09h-1.11l-2.8 2.96V9.13h-.89v5.74h.89v-1.68l1.18-1.24 1.92 2.92h1.06l-2.38-3.54 2.13-2.2z"></path></g></svg>'},64610:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g data-name="icons"><path d="M19.21 19.21H4.79V4.79h11.4c.27-.26.54-.53.84-.79H4v16h16V8.06c-.28.25-.54.51-.79.78z"></path><path d="M7.84 10.05l-.74.67 5.29 5.91.26-.86a23 23 0 0 1 8.73-11.35l-.55-.84A23.86 23.86 0 0 0 12 14.67z"></path></g></svg>'},59257:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14 3.5H7C6.60218 3.5 6.22064 3.65804 5.93934 3.93934C5.65804 4.22064 5.5 4.60218 5.5 5V19C5.5 19.3978 5.65804 19.7794 5.93934 20.0607C6.22064 20.342 6.60218 20.5 7 20.5H17C17.3978 20.5 17.7794 20.342 18.0607 20.0607C18.342 19.7794 18.5 19.3978 18.5 19V8L14 3.5Z" stroke="currentColor" stroke-miterlimit="10"></path><path opacity="0.66" d="M14.4963 8.21571H18.01L13.7936 3.99933V7.51298C13.796 7.6986 13.8708 7.87594 14.0021 8.0072C14.1334 8.13847 14.3107 8.21328 14.4963 8.21571Z" fill="currentColor"></path><rect opacity="0.66" x="8.5" y="14.5" width="7" height="3" rx="0.5" stroke="currentColor"></rect><rect opacity="0.66" x="8.5" y="10.5" width="2" height="2" rx="1" stroke="currentColor"></rect><rect opacity="0.66" x="8.5" y="6.5" width="2" height="2" rx="1" stroke="currentColor"></rect></svg>'},42892:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g data-name="icons"><path d="M0 4v16h24V4zm23 15H1V5h6.7v.08a3.82 3.82 0 0 1-.44 4.36 1.9 1.9 0 0 0-.12-1.1 2.64 2.64 0 0 0-4.28-.94c-2.13 2.12 1.3 4 3.22 3.26.08 0 .14-.08.21-.11s0 .18-.08.28c-.58 1.55-2.13 3.41-1.28 5.2s2.56 2.06 4.29 1.55c.21-.06.79-.74.56-.67-3.22.95-4.9-1.62-3.82-4.53.26-.69.8-1.47 1.11-2.27A4.72 4.72 0 0 0 8.69 5H23zM6.43 10a2.87 2.87 0 0 1-.95.19 2.05 2.05 0 0 1-2.31-2.41c.06-1.22 2.11-.07 2.38.11A2 2 0 0 1 6.43 10z"></path><path d="M12.36 17.22a11 11 0 0 1 5.47-1.91 5 5 0 0 1 1.62.25l.32.1 3.11-6.82L19.08 5l-6.83 3.1.11.32c1.07 3.21-1.64 7.06-1.67 7.1l-.18.25 1.59 1.6zm5.78-7.45a1.2 1.2 0 0 0-1.85 1.51l-4.63 4.62-.18-.17c.61-.94 2.48-4.18 1.69-7.18l5.75-2.61L22 9l-2.61 5.75a6 6 0 0 0-1.54-.19 11.39 11.39 0 0 0-5.64 1.87l-.21-.17 4.63-4.63a1.2 1.2 0 0 0 1.5-1.86z"></path></g></svg>'},38492:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g data-name="icons"><path d="M2.79 9.54a3.17 3.17 0 0 1 3.26-1.87v7.7c0 .66-.3 1-1.38 1V17h4.69l.06-.5-.06-.11c-1.13 0-1.4-.36-1.4-1V7.67a3.16 3.16 0 0 1 3.26 1.87l.31-.1.06-.13L11.26 7h-8.5l-.34 2.31.05.13zM13 6h1v12h-1z"></path><path d="M0 4v16h24V4zm23 15H1V5h22z"></path></g></svg>'},18342:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.66" d="M20.5 3.5H3.5V20.5H20.5V3.5Z" stroke="currentColor" stroke-width="1.03" stroke-miterlimit="10"></path><path d="M17 11H11V17H17V11Z" stroke="currentColor" stroke-width="1.03" stroke-miterlimit="10"></path><path opacity="0.5" d="M13 7H7V13H10.5V10.5H13V7Z" fill="currentColor" stroke="currentColor" stroke-width="1.03" stroke-miterlimit="10"></path><path d="M5.5 20.5C5.5 19.3954 4.60457 18.5 3.5 18.5C2.39543 18.5 1.5 19.3954 1.5 20.5C1.5 21.6046 2.39543 22.5 3.5 22.5C4.60457 22.5 5.5 21.6046 5.5 20.5Z" fill="currentColor"></path><path d="M22.5 20.5C22.5 19.3954 21.6046 18.5 20.5 18.5C19.3954 18.5 18.5 19.3954 18.5 20.5C18.5 21.6046 19.3954 22.5 20.5 22.5C21.6046 22.5 22.5 21.6046 22.5 20.5Z" fill="currentColor"></path><path d="M22.5 3.5C22.5 2.39543 21.6046 1.5 20.5 1.5C19.3954 1.5 18.5 2.39543 18.5 3.5C18.5 4.60457 19.3954 5.5 20.5 5.5C21.6046 5.5 22.5 4.60457 22.5 3.5Z" fill="currentColor"></path><path d="M5.5 3.5C5.5 2.39543 4.60457 1.5 3.5 1.5C2.39543 1.5 1.5 2.39543 1.5 3.5C1.5 4.60457 2.39543 5.5 3.5 5.5C4.60457 5.5 5.5 4.60457 5.5 3.5Z" fill="currentColor"></path></svg>'},50618:e=>{e.exports='<svg width="16" height="15" viewBox="0 0 16 15" fill="none" xmlns="http://www.w3.org/2000/svg"><line x1="0.75" y1="1.44214" x2="15.25" y2="1.44214" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></line><line x1="0.75" y1="7.44214" x2="15.25" y2="7.44214" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></line><line x1="0.75" y1="13.4421" x2="15.25" y2="13.4421" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></line></svg>'},42534:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.5 3h-17A2.5 2.5 0 0 0 1 5.5v13A2.5 2.5 0 0 0 3.5 21h17a2.5 2.5 0 0 0 2.5-2.5v-13A2.5 2.5 0 0 0 20.5 3zm-2.69 15h-4.29v-1.35l.59-.08c.34 0 .45-.19.33-.56l-.51-1.42H9.82l-.65 1.93.92.05V18h-3.9v-1.35l.43-.06c.42-.05.51-.25.62-.56l2.92-8.5-.94-.1V6h3.93l3.74 10.5.92.07V18z" fill="currentColor"></path><path d="M11.86 7.97l-1.68 5.1h3.39l-1.66-5.1h-.05z" fill="currentColor"></path></svg>'},81385:e=>{e.exports='<svg viewBox="0 0 24 24" width="24" height="24" xmlns="http://www.w3.org/2000/svg"><path opacity=".25" d="M13.02 16.6l-4.96-4.95 3.05-6.86 8.76 8.77-6.85 3.04z" fill="currentColor"></path><path d="M12 2.81l-.46.47a3 3 0 00-.9 1.72 11.67 11.67 0 01-2.93 6.3l-1.77 1.77a1 1 0 000 1.41l4.25 4.24a1 1 0 001.41 0L13.37 17a11.64 11.64 0 016.34-3 3 3 0 001.68-.85l.46-.47" stroke="currentColor" stroke-miterlimit="10" fill="none" stroke-linecap="round"></path><path opacity=".33" d="M14.075 16.242L8.42 10.585l-.707.707 5.656 5.657.707-.707z" fill="currentColor"></path><path opacity=".66" d="M2.34 18.44l3.805-3.816 3.816 3.816-2.471 2.48a.89.89 0 01-1 .2l-3.92-1.58a.68.68 0 01-.414-.488.68.68 0 01.184-.612z" fill="currentColor"></path><path opacity=".66" d="M2.521 18.59h.001l3.628-3.64 3.463 3.463-2.295 2.303h0l-.004.004a.64.64 0 01-.719.144h0l-.007-.003-3.92-1.58h0l-.003-.001a.43.43 0 01-.259-.306.43.43 0 01.115-.384z" stroke="currentColor" fill="none" stroke-width=".5"></path><path opacity=".66" d="M2.17 18.73a.69.69 0 00.4.81l3.98 1.605a.874.874 0 00.65-.025 2.94 2.94 0 00-.9-2.71c-1.09-.83-2.71-.65-4.13.32z" fill="currentColor"></path></svg>'},32931:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 4.5H4A1.5 1.5 0 0 0 2.5 6v12A1.5 1.5 0 0 0 4 19.5h16a1.5 1.5 0 0 0 1.5-1.5V6A1.5 1.5 0 0 0 20 4.5z" stroke="currentColor" stroke-miterlimit="10"></path><path d="M4.84 18l3.65-3.64a.74.74 0 0 1 1 0L13.45 18H4.84zM7.16 7.39a1.66 1.66 0 1 1-.02 3.32 1.66 1.66 0 0 1 .02-3.32z" fill="currentColor"></path><path opacity=".5" d="M20 14.44v3.31a.25.25 0 0 1-.25.25h-6.3l-2.157-1.984 4.047-4.096a1.51 1.51 0 0 1 2.13 0L20 14.44z" fill="currentColor"></path></svg>'},46113:e=>{e.exports='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M16.5 8.99997C16.5 13.1421 13.1421 16.5 9 16.5C4.85786 16.5 1.5 13.1421 1.5 8.99997C1.5 4.85783 4.85786 1.49997 9 1.49997C13.1421 1.49997 16.5 4.85783 16.5 8.99997ZM9.92328 11.947V7.82272H6.96415V8.87572H8.38278V11.947H6.9154V13H11.2395V11.947H9.92328ZM9.6454 5.36084C9.4764 5.19509 9.25865 5.11222 8.99215 5.11222C8.7224 5.11222 8.5014 5.19509 8.32915 5.36084C8.16015 5.52659 8.07565 5.73297 8.07565 5.97997C8.07565 6.22697 8.16015 6.43497 8.32915 6.60397C8.5014 6.76972 8.7224 6.85259 8.99215 6.85259C9.25865 6.85259 9.4764 6.76972 9.6454 6.60397C9.8144 6.43497 9.8989 6.22697 9.8989 5.97997C9.8989 5.73297 9.8144 5.52659 9.6454 5.36084Z" fill="currentColor"></path></svg>'},5085:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g data-name="Layer 1" stroke="currentColor" stroke-miterlimit="10"><path d="M2.87 15.9l10.6-10.6a1.5 1.5 0 0 1 2.13 0l3.53 3.53a1.49 1.49 0 0 1 0 2.12L9.59 20.5H5.34L2.87 18a1.5 1.5 0 0 1 0-2.1z" fill="none"></path><path d="M8.88 9.89l4.59-4.59a1.5 1.5 0 0 1 2.13 0l3.53 3.53a1.49 1.49 0 0 1 0 2.12l-4.59 4.6z" opacity=".75"></path><path fill="none" stroke-linecap="round" opacity=".75" d="M7 20.5h6"></path><path fill="none" stroke-linecap="round" opacity=".33" d="M16 20.5h1"></path><path fill="none" stroke-linecap="round" opacity=".25" d="M20 20.5h1"></path></g></svg>'},84399:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path opacity=".75" d="M4.662 17.568l1.768 1.767-1.415 1.415a1 1 0 01-1.414 0l-.353-.354a1 1 0 010-1.414l1.414-1.414z" fill="currentColor"></path><path d="M11.88 2.93l-.71.7c-4.95 5-4.59 10.26-4.59 10.26L5 15.48a1.25 1.25 0 000 1.77L6.75 19a1.25 1.25 0 001.77 0l1.59-1.59s5.31.36 10.26-4.59l.7-.71" stroke="currentColor" fill="none" stroke-miterlimit="10" stroke-linecap="round"></path><path opacity=".33" d="M19.662 12.826l-8.485-8.485-1.414 1.414 8.485 8.485 1.414-1.414z" fill="currentColor"></path><path opacity=".5" d="M9.895 16.931l-2.829-2.828-.707.707 2.829 2.828.707-.707z" fill="currentColor"></path></svg>'},22171:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M2.85 8l1.27-1.32L6.74 9.3l5.15-5.13 1.26 1.27-6.41 6.39z" fill="currentColor"></path></svg>'},99082:e=>{e.exports='<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m10.458 6.734 1.68.197c-.258 1.54-.535 3.08-.83 4.621l-1.09 5.553-1.57.179L8.5 18h4.895l.147-.716-1.68-.197c.258-1.54.535-3.099.83-4.64l1.072-5.534 1.588-.179L15.5 6h-4.895l-.147.734Z" fill="currentColor"></path></svg>'},72483:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.58 3a.62.62 0 0 1 .61.52l.38 2.55a6.51 6.51 0 0 1 1.51.63l2.07-1.53a.63.63 0 0 1 .603-.073.6.6 0 0 1 .197.133l.82.82a.61.61 0 0 1 .06.8L17.3 8.92c.273.475.484.982.63 1.51l2.55.38a.62.62 0 0 1 .52.61v1.16a.62.62 0 0 1-.52.61l-2.55.38a6.51 6.51 0 0 1-.63 1.51l1.53 2.07a.61.61 0 0 1-.06.8l-.82.82a.6.6 0 0 1-.43.18.63.63 0 0 1-.37-.12l-2.07-1.53a6.51 6.51 0 0 1-1.51.63l-.38 2.55a.62.62 0 0 1-.61.52h-1.16a.62.62 0 0 1-.61-.52l-.38-2.55a6.51 6.51 0 0 1-1.51-.63l-2.07 1.53a.63.63 0 0 1-.603.074.6.6 0 0 1-.197-.134L5.23 18a.61.61 0 0 1-.06-.8l1.53-2.12a6.51 6.51 0 0 1-.63-1.51l-2.55-.38a.62.62 0 0 1-.52-.61v-1.16a.62.62 0 0 1 .52-.61l2.55-.38a6.51 6.51 0 0 1 .63-1.51L5.17 6.85a.61.61 0 0 1 .06-.8l.82-.82a.6.6 0 0 1 .43-.18.63.63 0 0 1 .37.12L8.92 6.7a6.51 6.51 0 0 1 1.51-.63l.38-2.55a.62.62 0 0 1 .61-.52h1.16zM12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7zM12.58 2h-1.16a1.63 1.63 0 0 0-1.6 1.38l-.29 1.93-.53.21-1.56-1.16a1.63 1.63 0 0 0-2.1.16l-.82.82a1.62 1.62 0 0 0-.16 2.1L5.52 9c-.07.17-.15.35-.21.52l-1.93.29A1.63 1.63 0 0 0 2 11.42v1.16a1.63 1.63 0 0 0 1.38 1.6l1.93.29c.06.17.14.35.21.52l-1.16 1.57a1.62 1.62 0 0 0 .16 2.1l.82.82a1.63 1.63 0 0 0 2.1.16L9 18.48l.52.21.29 1.93A1.63 1.63 0 0 0 11.42 22h1.16a1.63 1.63 0 0 0 1.6-1.38l.29-1.93.52-.21 1.57 1.16a1.63 1.63 0 0 0 2.1-.16l.82-.82a1.62 1.62 0 0 0 .16-2.1L18.48 15c.07-.17.15-.35.21-.52l1.93-.29A1.63 1.63 0 0 0 22 12.58v-1.16a1.63 1.63 0 0 0-1.38-1.6l-1.93-.29c-.06-.17-.14-.35-.21-.52l1.16-1.57a1.62 1.62 0 0 0-.16-2.1l-.82-.82a1.63 1.63 0 0 0-2.1-.16L15 5.52l-.52-.21-.29-1.93A1.63 1.63 0 0 0 12.58 2zM12 14.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z" fill="currentColor"></path></svg>'},49273:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".15" d="M1.25 1C.56 1 0 1.56 0 2.25v19.5C0 22.44.56 23 1.25 23h21.5c.69 0 1.25-.56 1.25-1.25V2.25C24 1.56 23.44 1 22.75 1H1.25zm15.5 5l-1.39-1.8 2 1.09a.28.28 0 0 0 .39-.13L18.61 3l.05 2.27a.28.28 0 0 0 .32.27l2.25-.3-1.94 1.18a.28.28 0 0 0-.08.41l1.4 1.8-2-1.09a.27.27 0 0 0-.39.13l-.86 2.11-.05-2.27a.281.281 0 0 0-.31-.27l-2.26.3 1.95-1.18a.28.28 0 0 0 .06-.36zm-1.978 6.264l2.132 2.145-1.443 1.488-2.144-2.203 1.455-1.43zM5.94 14.15l1.29 1.67-1.85-1a.271.271 0 0 0-.37.13l-.8 1.95v-2.11a.27.27 0 0 0-.3-.25l-2.09.28 1.81-1.09a.26.26 0 0 0 .07-.38l-1.3-1.67 1.86 1a.25.25 0 0 0 .36-.13l.8-1.95v2.11a.25.25 0 0 0 .29.25l2.09-.28L6 13.73a.25.25 0 0 0-.06.37v.05z" fill="currentColor"></path><path d="M15.64 11.81a1.27 1.27 0 0 0-1.77 0l-1.06 1.06a1.27 1.27 0 0 0 0 1.77L21.17 23h1.58c.69 0 1.25-.56 1.25-1.25v-1.58l-8.36-8.36zm-.18 4.07l-1.94-2a.24.24 0 0 1 0-.35l1.06-1.06a.24.24 0 0 1 .35 0l1.95 1.94-1.42 1.47z" fill="currentColor"></path><path opacity=".66" d="M10.18 17.14l.36.83a.74.74 0 0 0 .94.41l.86-.3a.16.16 0 0 1 .197.179.16.16 0 0 1-.047.091l-.68.6a.75.75 0 0 0-.1 1l.56.72a.16.16 0 0 1-.21.23l-.78-.47a.75.75 0 0 0-1 .23l-.51.75a.16.16 0 0 1-.29-.13l.2-.88a.75.75 0 0 0-.52-.89l-.87-.25a.16.16 0 0 1 0-.32l.9-.08a.73.73 0 0 0 .68-.77v-.9a.16.16 0 0 1 .31-.05z" fill="currentColor"></path><path d="M9.61 3.18L9.39 5.1a.64.64 0 0 0 .53.71l1.9.34a.21.21 0 0 1 0 .42L9.93 7a.65.65 0 0 0-.51.73l.27 1.91a.212.212 0 1 1-.4.14l-.95-1.73a.65.65 0 0 0-.85-.27l-1.73.85a.21.21 0 1 1-.26-.33l1.31-1.43A.65.65 0 0 0 6.8 6L5.45 4.59a.211.211 0 0 1 .25-.34l1.76.8a.64.64 0 0 0 .84-.29l.9-1.7a.22.22 0 0 1 .41.12z" fill="currentColor"></path><rect opacity=".15" x=".5" y="1.5" width="23" height="21" rx=".75" stroke="currentColor"></rect></svg>'},31019:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".15" d="M21 1v6H3V1H1.25C.56 1 0 1.56 0 2.25v19.5C0 22.44.56 23 1.25 23H3V8h18v15h1.75c.69 0 1.25-.56 1.25-1.25V2.25C24 1.56 23.44 1 22.75 1H21z" fill="currentColor"></path><rect opacity=".15" x=".5" y="1.5" width="23" height="21" rx=".75" stroke="currentColor"></rect><path opacity=".15" d="M20 2V1H4v1h16zm0 21v-1H4v1h16z" fill="currentColor"></path><path d="M3 1v6h18V1h-1v5H4V1H3zm18 22V8H3v15h1V9h16v14h1z" fill="currentColor"></path></svg>'},94342:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".15" d="M1.25 1C.56 1 0 1.56 0 2.25v19.5C0 22.44.56 23 1.25 23h21.5c.69 0 1.25-.56 1.25-1.25V2.25C24 1.56 23.44 1 22.75 1H1.25zM23 20H1V4h22v16z" fill="currentColor"></path><rect opacity=".15" x=".5" y="1.5" width="23" height="21" rx=".75" stroke="currentColor"></rect><path d="M22 5v14H2V5h20zm1-1H1v16h22V4z" fill="currentColor"></path><path opacity=".15" d="M12 5h-1v14h1V5z" fill="currentColor"></path><path opacity=".05" d="M13 5h-1v14h1V5z" fill="currentColor"></path></svg>'},9804:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".15" d="M1.25 1C.56 1 0 1.56 0 2.25v19.5C0 22.44.56 23 1.25 23h21.5c.69 0 1.25-.56 1.25-1.25V2.25C24 1.56 23.44 1 22.75 1H1.25zM19 22H5V2h14v20z" fill="currentColor"></path><rect opacity=".15" x=".5" y="1.5" width="23" height="21" rx=".75" stroke="currentColor"></rect><path d="M18 3v18H6V3h12zm1-1H5v20h14V2z" fill="currentColor"></path></svg>'},95179:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect opacity=".15" y="1" width="24" height="22" rx="1.25" fill="currentColor"></rect><rect opacity=".15" x=".5" y="1.5" width="23" height="21" rx=".75" stroke="currentColor"></rect><path d="M9 6.65l2.415-2.415a.05.05 0 0 1 .085.036v4.758a.05.05 0 0 1-.085.036L9 6.65z" fill="currentColor" stroke="currentColor" stroke-linecap="round"></path><path d="M12 19.5a6.5 6.5 0 1 0 0-13" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"></path><path opacity=".66" d="M8.641 18.566a6.532 6.532 0 0 1-2.214-2.219" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"></path><path opacity=".33" d="M5.5 13c0-.884.176-1.726.496-2.494" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"></path></svg>'},42138:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect opacity=".15" y="1" width="24" height="22" rx="1.25" fill="currentColor"></rect><rect opacity=".15" x=".5" y="1.5" width="23" height="21" rx=".75" stroke="currentColor"></rect><path d="M15 6.65l-2.415-2.415a.05.05 0 0 0-.085.036v4.758a.05.05 0 0 0 .085.036L15 6.65z" fill="currentColor" stroke="currentColor" stroke-linecap="round"></path><path d="M12 19.5a6.5 6.5 0 1 1 0-13" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"></path><path opacity=".66" d="M15.359 18.566a6.532 6.532 0 0 0 2.214-2.219" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"></path><path opacity=".33" d="M18.5 13a6.48 6.48 0 0 0-.496-2.494" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"></path></svg>'},81913:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="4.25" cy="17.5" r="0.75" transform="rotate(90 4.25 17.5)" fill="currentColor"></circle><path d="M4 17.5L20 17.5" stroke="currentColor" stroke-linecap="round" stroke-dasharray="0.01 1.99"></path><circle cx="19.75" cy="17.5" r="0.75" transform="rotate(90 19.75 17.5)" fill="currentColor"></circle><circle cx="4.25" cy="13.5" r="0.75" transform="rotate(90 4.25 13.5)" fill="currentColor"></circle><path d="M4 13.5L20 13.5" stroke="currentColor" stroke-dasharray="2 2"></path><circle cx="19.75" cy="13.5" r="0.75" transform="rotate(90 19.75 13.5)" fill="currentColor"></circle><circle cx="4.25" cy="9.5" r="0.75" transform="rotate(90 4.25 9.5)" fill="currentColor"></circle><path d="M4 9.5L20 9.5" stroke="currentColor" stroke-dasharray="6 2"></path><circle cx="19.75" cy="9.5" r="0.75" transform="rotate(90 19.75 9.5)" fill="currentColor"></circle><circle cx="4.24665" cy="5.49999" r="0.750358" transform="rotate(90 4.24665 5.49999)" fill="currentColor"></circle><path d="M4 5.5L20 5.5" stroke="currentColor"></path><circle cx="19.7514" cy="5.50001" r="0.74855" transform="rotate(90 19.7514 5.50001)" fill="currentColor"></circle></svg>'},62846:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3 16.5h18" stroke="currentColor" stroke-width="3"></path><path d="M3 11h18" stroke="currentColor" stroke-width="2"></path><path d="M3 6.5h18" stroke="currentColor"></path></svg>'},12396:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M18.94 5.76L5.76 18.94a2.34 2.34 0 0 0-.7-.7L18.24 5.06c.18.28.42.52.7.7z" fill="currentColor"></path><path d="M5.25 20.5a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0zm17-17a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0z" fill="currentColor"></path></svg>'},43725:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 15h2a7.09 7.09 0 0 1 .85-3.35l-1.75-1A9 9 0 0 0 3 15zm0 2h2v4H3zm2.41-8.13l1.47 1.36a6.89 6.89 0 0 1 2.91-1.87l-.63-1.9a9 9 0 0 0-3.75 2.41zM21 7l-6-4v3h-3.64l.14 2H15v3z"></path></svg>'},481:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6 21H4v-4h2zm0-6H4v-2a8.85 8.85 0 0 1 .28-2.23l1.94.5A6.67 6.67 0 0 0 6 13zm.85-5.35l-1.75-1a9.08 9.08 0 0 1 3-3.25l1.12 1.71a7 7 0 0 0-2.37 2.54zm3.94-3.29l-.63-1.9A9.08 9.08 0 0 1 13 4h1.43v2H13a6.87 6.87 0 0 0-2.21.36zM20.43 6h-4V4h4z"></path></svg>'},55676:e=>{e.exports='<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.1219 10.59C14.4482 10.9143 14.7071 11.2999 14.8837 11.7247C15.0604 12.1494 15.1513 12.6049 15.1513 13.065C15.1513 13.525 15.0604 13.9805 14.8837 14.4052C14.7071 14.83 14.4482 15.2156 14.1219 15.54L10.5919 19.07C10.2668 19.4038 9.87801 19.6691 9.44864 19.8503C9.01927 20.0315 8.55796 20.1248 8.09193 20.1248C7.6259 20.1248 7.16459 20.0315 6.73522 19.8503C6.30585 19.6691 5.91711 19.4038 5.59193 19.07C5.2581 18.7448 4.99277 18.356 4.81161 17.9267C4.63045 17.4973 4.53711 17.036 4.53711 16.57C4.53711 16.1039 4.63045 15.6426 4.81161 15.2133C4.99277 14.7839 5.2581 14.3951 5.59193 14.07L7.41193 12.35" stroke="currentColor" stroke-width="1.25" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M11.3019 13.4099C10.9756 13.0856 10.7167 12.7 10.5401 12.2752C10.3634 11.8505 10.2725 11.395 10.2725 10.9349C10.2725 10.4749 10.3634 10.0194 10.5401 9.59467C10.7167 9.16992 10.9756 8.78428 11.3019 8.45994L14.8319 4.92994C15.1571 4.59611 15.5458 4.33079 15.9752 4.14962C16.4045 3.96846 16.8658 3.87512 17.3319 3.87512C17.7979 3.87512 18.2592 3.96846 18.6886 4.14962C19.118 4.33079 19.5067 4.59611 19.8319 4.92994C20.1657 5.25512 20.431 5.64386 20.6122 6.07323C20.7934 6.50261 20.8867 6.96391 20.8867 7.42994C20.8867 7.89597 20.7934 8.35728 20.6122 8.78665C20.431 9.21603 20.1657 9.60477 19.8319 9.92994L18.0119 11.6499" stroke="currentColor" stroke-width="1.25" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},65883:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g stroke="currentColor" stroke-miterlimit="10"><path d="M7 9.5h10a1.5 1.5 0 011.5 1.5v8a1.5 1.5 0 01-1.5 1.5H7A1.5 1.5 0 015.5 19v-8A1.5 1.5 0 017 9.5z"></path><path d="M8 9V7a4 4 0 014-4h0a4 4 0 014 4v2" stroke-linecap="round" stroke-width="2" opacity=".75" fill="none"></path></g></svg>'},98790:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 2h1v1H8zM5 5h1v1H5zm0 2h1v1H5zm0 2h1v1H5zm5-7h1v1h-1zm2 0h1v1h-1zm2 0h1v1h-1zm2 0h1v1h-1zm2 0h1v1h-1zm-6 14h1v1h-1zm2 0h1v1h-1zm2 0h1v1h-1zm2 0h1v1h-1zm3-11h1v1h-1zm0 2h1v1h-1zm0 3h1V9h-1zm0 2h1v-1h-1zm0 2h1v-1h-1z" opacity=".5" fill="currentColor"></path><path d="M20 16.5h.5a1 1 0 0 0 1-1V15M20 2.5h.5a1 1 0 0 1 1 1V4M7 2.5h-.5a1 1 0 0 0-1 1V4" stroke="currentColor"></path><path opacity=".66" d="M12 18l3.536 3.535a.5.5 0 0 1 0 .708l-.354.353a.5.5 0 0 1-.707 0l-3.536-3.535L12 18z" fill="currentColor"></path><circle cx="7.5" cy="14.5" r="4.75" fill="currentColor" fill-opacity=".01" stroke="currentColor"></circle><g opacity=".5" fill="currentColor"><path d="M5 14h5v1H5z"></path><path d="M8 12v5H7v-5z"></path></g></svg>'},53383:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="measure-2"><path id="Rectangle 5620" d="M1 6.5H23C23.2761 6.5 23.5 6.72386 23.5 7V17C23.5 17.2761 23.2761 17.5 23 17.5H1C0.723858 17.5 0.5 17.2761 0.5 17V7C0.5 6.72386 0.723858 6.5 1 6.5Z" stroke="currentColor"></path><path id="Rectangle 5621" d="M6 7V11M9 7V13M12 7V11M15 7V13M18 7V11" stroke="currentColor" stroke-linecap="round"></path></g></svg>'},67620:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.5" d="M21 13V11H19V13H21Z" fill="currentColor"></path><path opacity="0.5" d="M21 17V15H19V17H21Z" fill="currentColor"></path><path opacity="0.5" d="M21 9V7H19V9H21Z" fill="currentColor"></path><path opacity="0.5" d="M5 13V11H3V13H5Z" fill="currentColor"></path><path opacity="0.5" d="M5 17V15H3V17H5Z" fill="currentColor"></path><path opacity="0.5" d="M5 9V7H3V9H5Z" fill="currentColor"></path><path d="M9 8.5L15 11.91L9 15.5V8.5Z" fill="currentColor"></path><path d="M20 4.5H4C3.17157 4.5 2.5 5.17157 2.5 6V18C2.5 18.8284 3.17157 19.5 4 19.5H20C20.8284 19.5 21.5 18.8284 21.5 18V6C21.5 5.17157 20.8284 4.5 20 4.5Z" stroke="currentColor" stroke-miterlimit="10"></path></svg>'},35122:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="7" y="7" width="9" height="10" rx="4.5" stroke="currentColor"></rect><path d="M16 7.5V14.5C16 15.8807 17.1193 17 18.5 17V17C19.8807 17 21 15.8807 21 14.5V10.7008C21 6.17163 17.3284 2.5 12.7992 2.5H11.5C6.2533 2.5 2 6.7533 2 12V12C2 17.2467 6.25329 21.5 11.5 21.5H17" stroke="currentColor" stroke-linecap="round"></path></svg>'},35487:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="12" r="2.25" fill="none" stroke="currentColor" stroke-miterlimit="10"></circle><circle cx="19" cy="12" r="2.25" fill="none" stroke="currentColor" stroke-miterlimit="10"></circle><circle cx="5" cy="12" r="2.25" fill="none" stroke="currentColor" stroke-miterlimit="10"></circle></svg>'},32356:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g opacity="0.5"><mask id="path-1-inside-1_4931_183716" fill="currentColor"><path d="M22 7H21V9H22V7Z"></path></mask><path d="M21 7V6H20V7H21ZM22 7H23V6H22V7ZM22 9V10H23V9H22ZM21 9H20V10H21V9ZM21 8H22V6H21V8ZM21 7V9H23V7H21ZM22 8H21V10H22V8ZM22 9V7H20V9H22Z" fill="currentColor" mask="url(#path-1-inside-1_4931_183716)"></path></g><path opacity="0.5" d="M22 11H21V13H22V11Z" fill="currentColor"></path><path opacity="0.5" d="M22 15H21V17H22V15Z" fill="currentColor"></path><path opacity="0.5" d="M3 7H2V9H3V7Z" fill="currentColor"></path><path opacity="0.5" d="M3 11H2V13H3V11Z" fill="currentColor"></path><path opacity="0.5" d="M3 15H2V17H3V15Z" fill="currentColor"></path><path opacity="0.5" d="M17 21H15V22H17V21Z" fill="currentColor"></path><path opacity="0.5" d="M13 21H11V22H13V21Z" fill="currentColor"></path><path opacity="0.5" d="M9 21H7V22H9V21Z" fill="currentColor"></path><path opacity="0.5" d="M17 2H15V3H17V2Z" fill="currentColor"></path><path opacity="0.5" d="M13 2H11V3H13V2Z" fill="currentColor"></path><path opacity="0.5" d="M9 2H7V3H9V2Z" fill="currentColor"></path><path d="M21.5 19V20C21.5 20.3978 21.342 20.7794 21.0607 21.0607C20.7794 21.342 20.3978 21.5 20 21.5H19" stroke="currentColor" stroke-miterlimit="10"></path><path d="M19 2.5H20C20.3978 2.5 20.7794 2.65804 21.0607 2.93934C21.342 3.22064 21.5 3.60218 21.5 4V5" stroke="currentColor" stroke-miterlimit="10"></path><path d="M2.5 5V4C2.5 3.60218 2.65804 3.22064 2.93934 2.93934C3.22064 2.65804 3.60218 2.5 4 2.5H5" stroke="currentColor" stroke-miterlimit="10"></path><path d="M5 21.5H4C3.60218 21.5 3.22064 21.342 2.93934 21.0607C2.65804 20.7794 2.5 20.3978 2.5 20V19" stroke="currentColor" stroke-miterlimit="10"></path></svg>'},58170:e=>{e.exports='<svg viewBox="0 0 24 24" width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.42464 3.12132L8.83885 1.70711C9.22938 1.31658 9.86254 1.31658 10.2531 1.70711L11.6673 3.12132C12.0578 3.51184 12.0578 4.14501 11.6673 4.53553L10.2531 5.94975M7.42464 3.12132L10.2531 5.94975M7.42464 3.12132L6.71753 3.82843M10.2531 5.94975L9.37439 6.82843M8.20281 8L4.59621 11.6066L1.41423 11.9602L1.76779 8.77817L5.54596 5" stroke="currentColor"></path><path d="M12.546 12L1.54596 1" stroke="currentColor"></path></svg>'},8893:e=>{e.exports='<svg viewBox="0 0 24 24" width="24" height="24" xmlns="http://www.w3.org/2000/svg"><path opacity=".1" d="M13.5 21h6a1.5 1.5 0 001.5-1.5v-6L13.5 21z" fill="currentColor"></path><path opacity=".66" d="M20.259 14.5H16a1.5 1.5 0 00-1.5 1.5v4.259a.1.1 0 00.17.07l5.66-5.658a.1.1 0 00-.071-.171z" fill="currentColor"></path><path d="M20 14.5l.354.354A.5.5 0 0020 14v.5zM14.5 20H14a.5.5 0 00.854.354L14.5 20zm1.5-5h4v-1h-4v1zm-1 5v-4h-1v4h1zm4.646-5.854l-5.5 5.5.708.708 5.5-5.5-.708-.708zM16 14a2 2 0 00-2 2h1a1 1 0 011-1v-1z" fill="currentColor"></path><path d="M19 4.5H5A1.5 1.5 0 003.5 6v13A1.5 1.5 0 005 20.5h8.379a1.5 1.5 0 001.06-.44l5.622-5.62a1.5 1.5 0 00.439-1.061V6A1.5 1.5 0 0019 4.5z" stroke="currentColor" fill="none" stroke-miterlimit="10"></path><path d="M8.5 7v5M11 9.5H6" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},52979:e=>{e.exports='<svg viewBox="0 0 24 24" width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0)"><g filter="url(#filter0_dd)"><path d="M5.5 1A1.5 1.5 0 004 2.5v12A1.5 1.5 0 005.5 16H9l3 4 3-4h3.5a1.5 1.5 0 001.5-1.5v-12A1.5 1.5 0 0018.5 1h-13z" fill="#FEE668"></path></g><path d="M7 11.25a.25.25 0 01.25-.25h6.375a.25.25 0 01.25.25v.5a.25.25 0 01-.25.25H7.25a.25.25 0 01-.25-.25v-.5zm0-2A.25.25 0 017.25 9h9.5a.25.25 0 01.25.25v.5a.25.25 0 01-.25.25h-9.5A.25.25 0 017 9.75v-.5zm0-2A.25.25 0 017.25 7h9.5a.25.25 0 01.25.25v.5a.25.25 0 01-.25.25h-9.5A.25.25 0 017 7.75v-.5zm0-2A.25.25 0 017.25 5h9.5a.25.25 0 01.25.25v.5a.25.25 0 01-.25.25h-9.5A.25.25 0 017 5.75v-.5z" fill="#000"></path></g><defs><clipPath id="clip0"><path fill="#fff" d="M0 0h24v24H0z"></path></clipPath><filter id="filter0_dd" x="0" y="-1" width="24" height="27" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy="2"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feColorMatrix values="0 0 0 0 0.166759 0 0 0 0 0.195057 0 0 0 0 0.231441 0 0 0 0.33 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"></feBlend><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy="2"></feOffset><feGaussianBlur stdDeviation="2"></feGaussianBlur><feColorMatrix values="0 0 0 0 0.168627 0 0 0 0 0.196078 0 0 0 0 0.231373 0 0 0 0.33 0"></feColorMatrix><feBlend in2="effect1_dropShadow" result="effect2_dropShadow"></feBlend><feBlend in="SourceGraphic" in2="effect2_dropShadow" result="shape"></feBlend></filter></defs></svg>'},38057:e=>{e.exports='<svg viewBox="0 0 24 24" width="24" height="24" xmlns="http://www.w3.org/2000/svg"><path opacity=".1" d="M13.5 21h6a1.5 1.5 0 001.5-1.5v-6L13.5 21z" fill="currentColor"></path><path opacity=".66" d="M20.259 14.5H16a1.5 1.5 0 00-1.5 1.5v4.259a.1.1 0 00.17.07l5.66-5.658a.1.1 0 00-.071-.171z" fill="currentColor"></path><path d="M20 14.5l.354.354A.5.5 0 0020 14v.5zM14.5 20H14a.5.5 0 00.854.354L14.5 20zm1.5-5h4v-1h-4v1zm-1 5v-4h-1v4h1zm4.646-5.854l-5.5 5.5.708.708 5.5-5.5-.708-.708zM16 14a2 2 0 00-2 2h1a1 1 0 011-1v-1zM7 9.25A.25.25 0 017.25 9h9.5a.25.25 0 01.25.25v.5a.25.25 0 01-.25.25h-9.5A.25.25 0 017 9.75v-.5zM7 12.25a.25.25 0 01.25-.25h9.5a.25.25 0 01.25.25v.5a.25.25 0 01-.25.25h-9.5a.25.25 0 01-.25-.25v-.5zM7 15.25a.25.25 0 01.25-.25h5.5a.25.25 0 01.25.25v.5a.25.25 0 01-.25.25h-5.5a.25.25 0 01-.25-.25v-.5z" fill="currentColor"></path><path d="M19 4.5H5A1.5 1.5 0 003.5 6v13A1.5 1.5 0 005 20.5h8.379a1.5 1.5 0 001.06-.44l5.622-5.62a1.5 1.5 0 00.439-1.061V6A1.5 1.5 0 0019 4.5z" stroke="currentColor" fill="none" stroke-miterlimit="10"></path></svg>'},82904:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path d="M18.7 34.51a1 1 0 0 1-1.62.45L1.4 21a1 1 0 0 1-.08-1.41L6 14.39a1 1 0 0 1 1.41-.08l7 6.18A62.8 62.8 0 0 1 25.82 4.82l2.47-2.48a1 1 0 0 1 1.41 0l4.95 4.95a1 1 0 0 1 0 1.41l-2.47 2.47c-9 9-11.85 18-11.88 18.13z"></path></svg>'},60605:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path d="M18 34a16 16 0 1 1 16-16 16 16 0 0 1-16 16zm0-24a8 8 0 1 0 8 8 8 8 0 0 0-8-8z"></path></svg>'},96280:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path d="M33 25.23a2 2 0 0 1-2 2h-7.23l-5 6.69a1 1 0 0 1-1.61 0l-5-6.69H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h26a2 2 0 0 1 2 2z" fill="currentColor"></path><path d="M8 9h20v2H8zm0 5h20v2H8zm0 5h20v2H8z" stroke="transparent" fill="#311b0d"></path></svg>'},36135:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path d="M33.12 8.54a1 1 0 0 0 0-1.41l-4.24-4.25a1 1 0 0 0-1.41 0L18 12.34 8.54 2.88a1 1 0 0 0-1.41 0L2.88 7.12a1 1 0 0 0 0 1.41L12.34 18l-9.46 9.46a1 1 0 0 0 0 1.41l4.24 4.24a1 1 0 0 0 1.41 0L18 23.66l9.46 9.46a1 1 0 0 0 1.41 0l4.24-4.24a1 1 0 0 0 0-1.41L23.66 18z"></path></svg>'},26003:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path d="M18 2a16 16 0 1 0 16 16A16 16 0 0 0 18 2zm2 26h-4v-4h4zm5.55-14.86c0 3.81-2.64 5.37-5.91 6L19.31 21h-3.06l-.69-4.86.15-.15c3.78-.15 5.25-1.14 5.25-2.73v-.06c0-1.35-1-2.13-2.76-2.13a6.18 6.18 0 0 0-4.5 2.07l-2.76-3a9.48 9.48 0 0 1 7.35-3.24c4.32 0 7.26 2.22 7.26 6.21z"></path></svg>'},52799:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path d="M33 25.71a1 1 0 0 0-1-1h-2A7.72 7.72 0 0 1 22.29 17v-2h5.54a1 1 0 0 0 .76-1.65L18.76 1.89a1 1 0 0 0-1.52 0L7.41 13.35A1 1 0 0 0 8.17 15h5.54v2A7.72 7.72 0 0 1 6 24.71H4a1 1 0 0 0-1 1v6.57a1 1 0 0 0 1 1h2A16.23 16.23 0 0 0 18 28a16.23 16.23 0 0 0 12 5.31h2a1 1 0 0 0 1-1z"></path></svg>'},59011:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path d="M31.87 5a10.67 10.67 0 0 0-17.95 9.9L1 27.81l.06 4.43 4.54 1.89 1.77-1.21.13-3.21 3.38.63.42-2.63 2.37-.3.83-3.07 3.89-.24L21 22.39l1 .56A10.67 10.67 0 0 0 31.87 5zm-2.64 6.34a2.61 2.61 0 1 1 0-3.7 2.61 2.61 0 0 1 0 3.69z"></path></svg>'},91756:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36">&gt;<path d="M21 18A11 11 0 0 0 32 7V3a1 1 0 0 0-1-1h-6a1 1 0 0 0-1 1v4a3 3 0 0 1-3 3h-9V4.07a1 1 0 0 0-1.74-.68l-8.64 9.43a1 1 0 0 0 0 1.35l8.64 9.43a1 1 0 0 0 1.74-.67V18zm-.43 10.52L17.29 24H14v10h3.45v-4.54L20.72 34H24V24h-3.43v4.52zM30.81 24h-4.95v10h3.75v-2.5h1.2c3.39 0 4.64-1.83 4.64-3.7S34.2 24 30.81 24zm-.22 4.85h-1v-2.11h1c.75 0 1.18.38 1.18 1.08s-.43 1.03-1.18 1.03z"></path></svg>'},81221:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path d="M33 3a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v28a1 1 0 0 0 1 1h15V18h14z"></path><path d="M21 32l12-12H21v12z"></path></svg>'},15170:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path d="M33 4a1 1 0 0 0-1-1H13a10 10 0 0 0 0 20v9a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1V7h2v25a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V7h3a1 1 0 0 0 1-1z"></path></svg>'},24748:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path d="M35.29 18.71a1 1 0 0 0 0-1.41L19.71 1.71a1 1 0 0 0-1.71.7V11H3a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h15v8.59a1 1 0 0 0 1.71.71z"></path></svg>'},70568:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path d="M2.89 34.55a1 1 0 0 1-1.32-1.38L10 18 1.57 2.83a1 1 0 0 1 1.32-1.38l31.32 15.66a1 1 0 0 1 0 1.79z"></path></svg>'},5971:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path d="M17.06 1.32a1 1 0 0 1 1.88 0l4.11 11.13 11.86.47a1 1 0 0 1 .58 1.78l-9.32 7.35 3.22 11.42a1 1 0 0 1-1.52 1.1L18 28l-9.87 6.59a1 1 0 0 1-1.52-1.1l3.22-11.43-9.32-7.35a1 1 0 0 1 .58-1.78l11.86-.47z"></path></svg>'},14496:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.32 19.69l-6.94-4.87a.5.5 0 0 1-.12-.7l.72-1a.5.5 0 0 1 .7-.12l5.91 4.15a.24.24 0 0 0 .36-.15 62.33 62.33 0 0 1 9.88-14.39.51.51 0 0 1 .72 0l.92.85a.5.5 0 0 1 0 .7 64.5 64.5 0 0 0-10 15 1.5 1.5 0 0 1-2.15.53z"></path></svg>'},24941:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 3a9 9 0 1 1-9 9 9 9 0 0 1 9-9m0-2a11 11 0 1 0 11 11A11 11 0 0 0 12 1z"></path></svg>'},91552:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21.5 2h-19A1.5 1.5 0 0 0 1 3.5v12A1.5 1.5 0 0 0 2.5 17H8l4 5 4-5h5.5a1.5 1.5 0 0 0 1.5-1.5v-12A1.5 1.5 0 0 0 21.5 2z" fill="none" stroke-miterlimit="10" stroke-width="2" stroke="currentColor"></path><path d="M4 12h11v1H4zm0-2h16v1H4zm0-2h16v1H4zm0-2h16v1H4z" opacity=".5"></path></svg>'},63581:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13.41 12l6.94-6.94a.5.5 0 0 0 0-.71l-.71-.71a.5.5 0 0 0-.71 0L12 10.59 5.06 3.65a.5.5 0 0 0-.71 0l-.71.71a.5.5 0 0 0 0 .71L10.59 12l-6.94 6.94a.5.5 0 0 0 0 .71l.71.71a.5.5 0 0 0 .71 0L12 13.41l6.94 6.94a.5.5 0 0 0 .71 0l.71-.71a.5.5 0 0 0 0-.71z"></path></svg>'},49697:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0zm0 22a10 10 0 1 1 10-10 10 10 0 0 1-10 10z"></path><path d="M12.31 5.18A12.67 12.67 0 0 0 8 6l.47 1.53a10.17 10.17 0 0 1 3.42-.63c1.95 0 3.12.79 3.12 2s-1.13 2-3.4 2c-.49 0-.94 0-1.51-.05l.13 3.42H12l.09-1.91h.05c3.19 0 5-1.42 5-3.62s-1.86-3.56-4.83-3.56zm-1.19 11.03a1.31 1.31 0 1 0 0 2.61 1.31 1.31 0 1 0 0-2.61z"></path></svg>'},25402:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M22.5 16H18a5 5 0 0 1-5-5V5l3.94 3.9a.5.5 0 0 0 .71 0l.71-.71a.5.5 0 0 0 0-.71l-5.3-5.29a1.5 1.5 0 0 0-2.12 0L5.65 7.48a.5.5 0 0 0 0 .71l.71.71a.5.5 0 0 0 .71 0L11 5v6a5 5 0 0 1-5 5H1.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5H6a7 7 0 0 0 6-3.41A7 7 0 0 0 18 18h4.5a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM12 4z"></path></svg>'},87065:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.41 5.91a1.68 1.68 0 1 0 1.19.49 1.67 1.67 0 0 0-1.19-.49z"></path><path d="M21.45 3.55A7.38 7.38 0 0 0 8.92 9.79l-7.78 7.78-.95.95.52 1.24 1 2.33.42 1 1.07.19 1.49.27.84.15.69-.5.85-.62.46-.34.21-.53.2-.5.12-.06.52-.25.86-.42.22-.93.94.17.74-.89L12 18l.45-.54v-.1h.21l1 .19.74-.74.8-.8a7.46 7.46 0 0 0 1 .07 7.38 7.38 0 0 0 5.21-12.6zm-1.41 9a5.34 5.34 0 0 1-3.8 1.57A5.45 5.45 0 0 1 15 14l-.49-.11-.35.35L13 15.46l-1-.18-1.53-.28v1.78l-.63.76-.84-.18-1.23-.52.17 1.16-.24 1-.52.25L6 19l.16 1.17-.29.83-.87.57-1.49-.27-.96-2.3 8.19-8.19.35-.35L11 10a5.38 5.38 0 1 1 9 2.58z"></path></svg>'},31924:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.14 18.73L11.52 15H10v7h1.86v-3.73L14.49 22H16v-7h-1.86v3.73zM19.86 15H17v7h2v-1.68h.87c1.84 0 2.92-1 2.92-2.68S21.7 15 19.86 15zm-.43 3.88H19v-2.44h.43c.88 0 1.29.33 1.29 1.2s-.43 1.24-1.3 1.24z"></path><path d="M4.41 12H14a7 7 0 0 0 7-7V1.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5V5a5 5 0 0 1-5 5H4.41l3.94-3.94a.5.5 0 0 0 0-.71l-.71-.71a.5.5 0 0 0-.71 0l-5.64 5.65a1 1 0 0 0 0 1.41l5.65 5.65a.5.5 0 0 0 .71 0l.71-.71a.5.5 0 0 0 0-.71z"></path></svg>'},92122:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21.5 0h-19A2.5 2.5 0 0 0 0 2.5v19A2.5 2.5 0 0 0 2.5 24H14a2 2 0 0 0 1.41-.59l8-8A2 2 0 0 0 24 14V2.5A2.5 2.5 0 0 0 21.5 0zm.5 14h-6.5a1.5 1.5 0 0 0-1.5 1.5V22H2.5a.5.5 0 0 1-.5-.5v-19a.5.5 0 0 1 .5-.5h19a.5.5 0 0 1 .5.5z"></path></svg>'},56481:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19.5 2H9.21a6.14 6.14 0 0 0-6.16 5.21A6 6 0 0 0 9 14h1v7.5a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5V4h2v17.5a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5V4h3.5a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5z"></path></svg>'},30757:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M22.35 10.94l-7.29-7.29a.5.5 0 0 0-.71 0l-.71.71a.5.5 0 0 0 0 .71L19.59 11H2.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h17.09l-5.94 5.94a.5.5 0 0 0 0 .71l.71.71a.5.5 0 0 0 .71 0l7.29-7.29a1.5 1.5 0 0 0-.01-2.13z"></path></svg>'},70207:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 3l18 9-18 9 5.21-9L3 3m0-2a2 2 0 0 0-1.73 3l4.63 8-4.63 8a2 2 0 0 0 2.63 2.79l18-9a2 2 0 0 0 0-3.58l-18-9A2 2 0 0 0 3 1z"></path></svg>'},91912:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 3a.25.25 0 0 1 .24.17L14.47 10h7.21a.25.25 0 0 1 .15.45L16 14.69l2.23 6.86a.25.25 0 0 1-.24.33.25.25 0 0 1-.15 0L12 17.59l-5.84 4.24a.25.25 0 0 1-.15 0 .25.25 0 0 1-.24-.33L8 14.69l-5.83-4.24a.25.25 0 0 1 .15-.45h7.21l2.23-6.86A.25.25 0 0 1 12 3m0-2a2.24 2.24 0 0 0-2.14 1.52L8.08 8H2.32A2.25 2.25 0 0 0 1 12.07l4.66 3.39-1.78 5.47a2.25 2.25 0 0 0 3.46 2.52L12 20.06l4.66 3.39a2.24 2.24 0 0 0 1.32.43 2.25 2.25 0 0 0 2.14-2.95l-1.78-5.48L23 12.07A2.25 2.25 0 0 0 21.68 8h-5.76l-1.78-5.48A2.24 2.24 0 0 0 12 1z"></path></svg>'},53491:e=>{e.exports='<svg viewBox="0 0 24 24" width="24" height="24" xmlns="http://www.w3.org/2000/svg"><rect opacity=".25" x="8" y="8" width="14" height="14" rx="1.25" fill="currentColor"></rect><rect opacity=".5" x="2" y="2" width="14" height="14" rx="1.25" fill="currentColor"></rect><rect opacity=".33" x="2.5" y="2.5" width="13" height="13" rx=".75" fill="none" stroke="currentColor"></rect></svg>'},22446:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M21.7 9.6c.4-1.3.3-2.1-.6-2.6-1.1-.6-2 0-2.4 1l-1 3.2-.3-.1c.4-1.9.9-3.9 1.1-5.8 0-.2-.1-1.3-1-1.7-1.3-.6-2.3 0-2.5 1.6-.2 1.3-.5 3.1-.8 4.8H14s-.1-6.2-.2-6.6c-.1-.4-.3-1.7-1.8-1.7s-1.95.85-1.9 1.6c.05.75.2 6.7.2 6.7h-.2c-.4-2.1-.9-3.5-1.4-5.3 0-.3-.6-1.9-2.4-1.1-1.3.6-1.1 1.6-1 2.1.1.5 1.7 5.6 2.1 8.2l-.4.2S4.8 11.2 3.5 11c-1.4-.1-2.9 2-1.4 3.2 1.5 1.2 4 6.8 5.5 7.4 1.7.7 3.2.2 4.7.3 1.5.1 2.9.4 4.3-.5s2.6-4.9 2.6-4.9c1-2.4 2.1-5.7 2.5-6.9z" fill="currentColor" fill-opacity=".01" stroke="currentColor" stroke-width="1.1" stroke-miterlimit="10" stroke-linejoin="round"></path></svg>'},66788:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10V2.14999L21 12L3.5 21.85V16" stroke="currentColor"></path><path d="M3.5 12L6.9641 16.5L0.0358979 16.5L3.5 12Z" fill="currentColor"></path><line x1="7" y1="10.5" y2="10.5" stroke="currentColor"></line></svg>'},88232:e=>{e.exports='<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="Checkbox"><path id="Vector 475" d="M11 6V11M11 16V11M11 11H16M11 11H6" stroke="#4636E3" stroke-width="2" stroke-linecap="round"></path></g></svg>'},48450:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.24513 2.56421L3.5 2.14508V3V21V21.8549L4.24513 21.4358L20.2451 12.4358L21.0199 12L20.2451 11.5642L4.24513 2.56421Z" stroke="currentColor"></path><path opacity="0.5" d="M16.8021 9.69165L3.45087 17.4" stroke="currentColor"></path><path opacity="0.5" d="M3.5 12.7528L12.7448 7.41527" stroke="currentColor"></path><path opacity="0.5" d="M3.5 8.13397L8.72148 5.11935" stroke="currentColor"></path></svg>'},62327:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M20.23 12.44l-1.92 6.33a2.77 2.77 0 0 1 1 .29l1.93-6.33a2.76 2.76 0 0 1-1.01-.29zm-.53-4.51l-5.27-4.15a2.36 2.36 0 0 1-.62.78l5.26 4.15c.156-.3.37-.565.63-.78zM8.7 21c.067.33.067.67 0 1h6.6a2.52 2.52 0 0 1 0-1H8.7zm1.49-16.44a2.36 2.36 0 0 1-.62-.78L4.3 7.93c.26.215.474.48.63.78l5.26-4.15zm-7.38 8.17l1.93 6.33a2.77 2.77 0 0 1 1-.29l-1.97-6.33c-.3.155-.625.253-.96.29z" fill="currentColor"></path><path d="M4.25 10a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0zm9.5-7.5a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0zm9.5 7.5a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0zm-3.5 11.5a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0zm-12 0a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0z" fill="currentColor"></path></svg>'},43070:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M17.27 15.33c.036.35.137.689.3 1L6.73 19.67a2.77 2.77 0 0 0-.3-1l10.84-3.34zm2.07-3a2.52 2.52 0 0 0-.91.42l-2.77-6.08c.33-.08.643-.222.92-.42l2.76 6.08z" fill="currentColor"></path><path d="M16.75 4a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0zm5 11a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0zm-16 5a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0z" fill="currentColor"></path></svg>'},77754:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle opacity="0.5" cx="12" cy="12" r="9.5" stroke="currentColor"></circle><path d="M12 12V8.99997M12 12H9M12 12H15M12 12V15" stroke="currentColor" stroke-linecap="round"></path><path d="M12 0.999969V3.99997M20 12H23M12 20V23M4 12H1" stroke="currentColor" stroke-linecap="round"></path></svg>'},54629:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22.5 9v9a1.5 1.5 0 01-1.5 1.5h-2.5v-2h-13v2H3A1.5 1.5 0 011.5 18V9A1.5 1.5 0 013 7.5h2.5v2h13v-2H21A1.5 1.5 0 0122.5 9z" stroke="currentColor" stroke-miterlimit="10" fill="none"></path><path opacity=".25" d="M22 15v3a1 1 0 01-1 1h-2v-2H5v2H3a1 1 0 01-1-1v-3h20z" fill="currentColor"></path><path opacity=".5" d="M19.5 13.5a1 1 0 100-2 1 1 0 000 2z" fill="currentColor"></path><path d="M18.5 18v3.5h-13V18M5.5 9V2.5h13V9" stroke="currentColor" fill="none"></path></svg>'},73940:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.5" d="M20.5 7.32501L3.5 16.675" stroke="currentColor"></path><path opacity="0.5" d="M20.5 11.325L3.81818 20.5" stroke="currentColor"></path><path opacity="0.5" d="M20.5 15.325L11 20.55" stroke="currentColor"></path><path opacity="0.5" d="M20.1818 3.5L3.5 12.675" stroke="currentColor"></path><path opacity="0.5" d="M3.5 8.67501L12.8895 3.5108" stroke="currentColor"></path><rect x="3.5" y="3.5" width="17" height="17" stroke="currentColor"></rect></svg>'},15350:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M20.5 6.25a2.73 2.73 0 0 1-.5 0V17.8a2.52 2.52 0 0 1 1 0V6.2a2.73 2.73 0 0 1-.5.05zM6.2 3a2.73 2.73 0 0 1 0 .5 2.73 2.73 0 0 1 0 .5h11.6a2.734 2.734 0 0 1-.05-.5c.001-.168.018-.335.05-.5H6.2zm0 17c.067.33.067.67 0 1h11.6a2.52 2.52 0 0 1 0-1H6.2zM3 6.2v11.6c.165-.032.332-.049.5-.05.168.001.335.018.5.05V6.2a2.73 2.73 0 0 1-.5 0 2.73 2.73 0 0 1-.5 0z" fill="currentColor"></path><path d="M5.25 20.5a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0zm17 0a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0zm-17-17a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0zm17 0a1.75 1.75 0 1 0-3.5 0 1.75 1.75 0 0 0 3.5 0z" fill="currentColor"></path></svg>'},73540:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g opacity=".5"><path fill="currentColor" d="M6 3h1v1H6zM3 6h1v1H3zM3 8h1v1H3zM3 10h1v1H3zM3 12h1v1H3zM3 14h1v1H3zM8 3h1v1H8zM10 3h1v1h-1zM12 3h1v1h-1zM14 3h1v1h-1zM16 3h1v1h-1zM6 17h1v1H6zM16 17h1v1h-1zM19 15h1v-1h-1z"></path><path d="M18 17.5h.5a1 1 0 001-1V16M5 17.5h-.5a1 1 0 01-1-1V16M18 3.5h.5a1 1 0 011 1V5M5 3.5h-.5a1 1 0 00-1 1V5" stroke="currentColor"></path></g><g opacity=".66" stroke="currentColor"><path d="M18 17.5h.5a1 1 0 001-1V16M5 17.5h-.5a1 1 0 01-1-1V16M18 3.5h.5a1 1 0 011 1V5M5 3.5h-.5a1 1 0 00-1 1V5"></path></g><path d="M13.107 12.1L2.854 22.355l10.606-3.536 3.182-3.182" stroke="currentColor"></path><path opacity=".33" d="M4.618 21.29l8.485-2.829 1.58-1.58-.688.688c-.466-.019-.861-.174-.861-.174l-6.912 2.29-1.604 1.605zM12.753 11.747l4.95-4.95 4.242 4.243-4.95 4.95-4.242-4.243z" fill="#currentColor"></path><path opacity=".33" d="M12.753 11.747l.707-.707 4.243 4.243-.707.707-4.243-4.243z" fill="currentColor"></path><path d="M21.267 3.94L12.4 12.808a2.5 2.5 0 000 3.535v0a2.5 2.5 0 003.535 0l5.334-5.334" stroke="currentColor" stroke-linecap="round"></path></svg>'},45013:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".75" d="M11.925 6.923C11.517 5.7 10.726 5.59 9.497 5.59H8.424v5.491c0 1.18.14 1.856 2.012 1.925v.992H4.61v-.992c1.804-.07 1.942-.745 1.942-1.925v-5.56H5.393c-1.218 0-1.997.199-2.358 1.402h-.969c.07-1.11.209-2.29.278-3.261h.76c.278.347.486.347 1.04.347h6.81c.555 0 .694-.07.971-.347h.723c0 .763.14 2.22.208 3.192l-.93.07z" fill="currentColor"></path><path d="M13.107 12.1L2.854 22.355l10.606-3.536 3.182-3.182" stroke="currentColor"></path><path opacity=".33" d="M4.618 21.29l8.485-2.829 1.58-1.58-.688.688c-.466-.019-.861-.174-.861-.174l-6.912 2.29-1.604 1.605zM12.753 11.747l4.95-4.95 4.242 4.243-4.95 4.95-4.242-4.243z" fill="currentColor"></path><path opacity=".33" d="M12.753 11.747l.707-.707 4.243 4.243-.707.707-4.243-4.243z" fill="currentColor"></path><path d="M21.267 3.94L12.4 12.808a2.5 2.5 0 000 3.535v0a2.5 2.5 0 003.535 0l5.334-5.334" stroke="currentColor" stroke-linecap="round"></path></svg>'},27879:e=>{e.exports='<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".75" fill-rule="evenodd" clip-rule="evenodd" d="M2.75 13a.75.75 0 00-.75.75v6.5c0 .414.336.75.75.75h18.5a.75.75 0 00.75-.75v-6.5a.75.75 0 00-.75-.75H2.75zM21 20h-1.241l-.561-1.55h-2.423L16.214 20H15l2.336-6h1.328L21 20zM9 20h1.214l.56-1.55h2.424l.56 1.55H15l-2.336-6h-1.328L9 20zm0 0l-2.336-6H5.336L3 20h1.214l.56-1.55h2.424l.56 1.55H9zm9.002-4.94h-.032l-.921 2.562h1.87l-.917-2.562zm-6.032 0h.032l.917 2.562h-1.87l.921-2.562zm-5.968 0H5.97l-.921 2.562h1.87l-.917-2.562zM6 3.75A.75.75 0 016.75 3h14.5a.75.75 0 01.75.75v6.5a.75.75 0 01-.75.75H6.75a.75.75 0 01-.75-.75v-6.5zM18.759 10H20l-2.336-6h-1.328L14 10l-2.336-6h-1.328L8 10h1.214l.56-1.55h2.424l.56 1.55h2.456l.56-1.55h2.424l.56 1.55zM16.97 5.06h.032l.917 2.562h-1.87l.921-2.562zm-5.968 0h-.032l-.921 2.562h1.87l-.917-2.562z" fill="currentColor"></path></svg>'},88682:e=>{e.exports='<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".75" d="M2 13.75a.75.75 0 01.75-.75h18.5a.75.75 0 01.75.75v6.5a.75.75 0 01-.75.75H2.75a.75.75 0 01-.75-.75v-6.5z" fill="currentColor"></path><path opacity=".75" fill-rule="evenodd" clip-rule="evenodd" d="M6 3.75A.75.75 0 016.75 3h14.5a.75.75 0 01.75.75v6.5a.75.75 0 01-.75.75H6.75a.75.75 0 01-.75-.75v-6.5zM18.759 10H20l-2.336-6h-1.328L14 10l-2.336-6h-1.328L8 10h1.214l.56-1.55h2.424l.56 1.55h2.456l.56-1.55h2.424l.56 1.55zM16.97 5.06h.032l.917 2.562h-1.87l.921-2.562zm-5.968 0h-.032l-.921 2.562h1.87l-.917-2.562z" fill="currentColor"></path></svg>'},1088:e=>{e.exports='<svg width="26" height="27" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.107 12.1L2.854 22.355l10.606-3.536 3.182-3.182" stroke="currentColor"></path><path opacity=".33" d="M4.618 21.29l8.485-2.829 1.58-1.58-.688.688c-.466-.019-.861-.174-.861-.174l-6.912 2.29-1.604 1.605zM12.753 11.747l4.95-4.95 4.242 4.243-4.95 4.95-4.242-4.243z" fill="currentColor"></path><path opacity=".33" d="M12.753 11.747l.707-.707 4.243 4.243-.707.707-4.243-4.243z" fill="currentColor"></path><path d="M21.267 3.94L12.4 12.808a2.5 2.5 0 000 3.535v0a2.5 2.5 0 003.535 0l5.334-5.334" stroke="currentColor" stroke-linecap="round"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M5.354 5.646a.5.5 0 10-.708.708L6.793 8.5l-2.147 2.146a.5.5 0 00.708.708L7.5 9.207l2.146 2.147a.5.5 0 00.708-.708L8.207 8.5l2.147-2.146a.5.5 0 00-.708-.708L7.5 7.793 5.354 5.646z" fill="currentColor"></path></svg>'},71980:e=>{e.exports='<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.75 11l3.5-3.5-3.5-3.5" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M16.5 7.5h-6a6 6 0 1 0 0 12" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"></path><path fill="currentColor" d="M12 19h-1v1h1z"></path><path opacity=".9" fill="currentColor" d="M13 19h-1v1h1z"></path><path opacity=".8" fill="currentColor" d="M14 19h-1v1h1z"></path><path opacity=".7" fill="currentColor" d="M15 19h-1v1h1z"></path><path opacity=".6" fill="currentColor" d="M16 19h-1v1h1z"></path><path opacity=".5" fill="currentColor" d="M17 19h-1v1h1z"></path><path opacity=".4" fill="currentColor" d="M18 19h-1v1h1z"></path><path opacity=".3" fill="currentColor" d="M19 19h-1v1h1z"></path><path opacity=".2" fill="currentColor" d="M20 19h-1v1h1z"></path><path opacity=".1" fill="currentColor" d="M21 19h-1v1h1z"></path></svg>'},23093:e=>{e.exports='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.00002 14.3333C11.4978 14.3333 14.3334 11.4978 14.3334 7.99996C14.3334 4.50216 11.4978 1.66663 8.00002 1.66663C4.50222 1.66663 1.66669 4.50216 1.66669 7.99996C1.66669 11.4978 4.50222 14.3333 8.00002 14.3333Z" fill="#D63960"></path><path d="M5.88 5.88L10.12 10.12M10.12 5.88L5.88 10.12" stroke="currentColor" strokeWidth="1.25" strokeMiterlimit="10" strokeLinecap="round"></path></svg>'},64377:e=>{e.exports='<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg" style="transform-origin: 50% 50%; transform: rotate(0deg); drop-shadow: 0px 1px 1.8px rgba(0, 0, 0, 0.6);"><path d="M5.35835 16.3487L6.81633 14.8503L8.28231 16.3188C11.9914 20.0341 18.0108 20.0367 21.723 16.3245L23.1905 14.857L24.6417 16.3487L25.5001 17.231L25.5001 16L25.5 11L25.5 10.5L25 10.5L20 10.5L18.768 10.5L19.6516 11.3586L21.0689 12.7359L19.6033 14.2016C17.0649 16.74 12.9493 16.74 10.4109 14.2016L8.9382 12.7289L10.3484 11.3586L11.2321 10.5H10L5 10.5L4.5 10.5L4.5 11L4.5 16L4.5 17.2308L5.35835 16.3487Z" fill="#202125" stroke="white"></path></svg>'},69695:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.5" d="M6 13H1V23H11V18" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path opacity="0.8" d="M8 8.99997V0.999969H23V16H15.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5 19L18.5 5.49997M18.5 5.49997H12.5M18.5 5.49997V11.5" stroke="currentColor" stroke-linecap="round"></path></svg>'},47591:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".75" d="M19.52 18.39L15 13.84 13.84 15l4.55 4.56a.51.51 0 0 0 .71 0l.42-.42a.51.51 0 0 0 0-.75z" fill="currentColor"></path><path d="M9.84 15.34a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11z" stroke="currentColor" stroke-miterlimit="10"></path></svg>'},93687:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M11.654 16.837c.023.052.079.082.143.075 2.558-.3 8.25-.415 7.207 1.759-1.042 2.173-13.647 1.349-14.392-.963-.72-2.237 4.035-2.703 5.288-2.706.068 0 .128-.052.147-.127.029-.11-.036-.22-.134-.223-1.601-.04-7.438.192-7.174 3.761.276 3.731 16.138 4.888 17.711 1.035 1.573-3.853-6.456-3.21-8.702-2.785-.084.022-.125.104-.094.174z" fill="currentColor" stroke="currentColor" stroke-width=".25"></path><path d="M12.535 13.81l-.354.353.354.354.354-.354-.354-.354zm-2.121-2.122l-.354-.354-.353.354.353.354.354-.354zm1.098-1.173l.474.159-.474-.159zm2.473 2.104l.158.475-.158-.475zm5.621-9.416l1.414 1.414.707-.707-1.414-1.414-.707.707zm-5.78 8.942l-.276.092.316.949.277-.092-.317-.95zm-1.84-1.471l.092-.277-.948-.316-.093.276.95.317zm1.173 1.805l-.978.977.708.707.977-.977-.707-.707zm-.27.977l-2.122-2.121-.707.707 2.121 2.121.708-.707zm-2.122-1.414l.978-.977-.708-.708-.977.978.707.707zM21.02 5.324l-6.216 6.217.707.707 6.216-6.217-.707-.707zM12.682 9.42L18.9 3.203l-.707-.707-6.217 6.216.707.708zm-1.645.937l.707.708a1 1 0 0 0 .242-.391l-.949-.317zm2.513 1.88a1 1 0 0 0-.391.242l.707.707-.316-.949zm.593.857a3.5 3.5 0 0 0 1.368-.846l-.707-.707a2.5 2.5 0 0 1-.978.604l.317.949zm-2.065-2.697a2.5 2.5 0 0 1 .604-.977l-.707-.708a3.5 3.5 0 0 0-.845 1.369l.948.316zm8.942-5.78a.5.5 0 0 1 0 .707l.707.707a1.5 1.5 0 0 0 0-2.121l-.707.707zm-.707-2.121a1.5 1.5 0 0 0-2.121 0l.707.707a.5.5 0 0 1 .707 0l.707-.707z" fill="currentColor"></path><path opacity=".33" d="M12.535 8.86l4.95-4.95 2.828 2.828-4.95 4.95-2.828-2.828z" fill="currentColor"></path><path d="M9.353 14.87a.694.694 0 0 1-.13-.8l1.19-2.382 2.122 2.121L10.154 15a.694.694 0 0 1-.8-.13z" fill="currentColor"></path></svg>'},81013:e=>{e.exports='<svg viewBox="0 0 24 24" width="24" height="24" xmlns="http://www.w3.org/2000/svg"><path d="M6.5 5.5v15l3.5-3 3.5 3v-15c0-1.1.9-2 2-2h-7c-1.1 0-2 .9-2 2z" stroke="currentColor" fill="none" stroke-miterlimit="10"></path><path d="M13.5 14.5H16a1.5 1.5 0 001.5-1.5V5.5c0-1.1-.927-2-2-2s-2 .9-2 2v9z" stroke="currentColor" fill="none" stroke-miterlimit="10"></path><path opacity=".5" fill-rule="evenodd" clip-rule="evenodd" d="M15.5 4c-.801 0-1.5.68-1.5 1.5V14h2a1 1 0 001-1V5.5c0-.82-.699-1.5-1.5-1.5z" fill="currentColor"></path></svg>'},40013:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".75" d="M20.2 5H7.8c-.5 0-.8-.3-.8-.7v-.5c0-.5.3-.8.8-.8h12.5c.4 0 .7.3.7.8v.5c0 .4-.3.7-.8.7zM7.8 13h12.5c.4 0 .8.3.8.8v.5c0 .4-.3.8-.8.8H7.8c-.5-.1-.8-.4-.8-.8v-.5c0-.5.3-.8.8-.8z" fill="currentColor"></path><path d="M4.2 5h-.5c-.4 0-.7-.3-.7-.7v-.5c0-.5.3-.8.7-.8h.5c.5 0 .8.3.8.8v.5c0 .4-.3.7-.8.7zm-.5 8h.5c.5 0 .8.3.8.7v.5c0 .5-.3.8-.8.8h-.5c-.4 0-.7-.3-.7-.7v-.5c0-.5.3-.8.7-.8z" fill="currentColor"></path><path opacity=".5" d="M7.5 16.5h11m-11-10h11m-11 2h11m0 2h-11m11 8h-11m11 2h-11" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},65297:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".33" d="M15 21.5h4m-14 0h4m6-11h4m-14 0h4" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M18.75 13.5h-3.5a.75.75 0 0 0-.75.75v4.5c0 .414.336.75.75.75h3.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 0 0-.75-.75zm-10 0h-3.5a.75.75 0 0 0-.75.75v4.5c0 .414.336.75.75.75h3.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 0 0-.75-.75zm10-11h-3.5a.75.75 0 0 0-.75.75v4.5c0 .414.336.75.75.75h3.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 0 0-.75-.75zm-10 0h-3.5a.75.75 0 0 0-.75.75v4.5c0 .414.336.75.75.75h3.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 0 0-.75-.75z" fill="currentColor" fill-opacity=".01" stroke="currentColor"></path></svg>'},17285:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2 17h20" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path opacity=".75" d="M1.4 7.79A10.51 10.51 0 0 1 4 6.17a89.034 89.034 0 0 1 8.31-3.54.88.88 0 0 1 .79 0c.44.27.59 1.1.65 1.8a34.32 34.32 0 0 1-2.59 15.83 6.171 6.171 0 0 1-1 1.75 1.29 1.29 0 0 1-1.49.44c-.8-.45-1.26-1.74-1.47-2.95a8.06 8.06 0 0 1 .12-4 5.57 5.57 0 0 1 1.11-1.76 27 27 0 0 1 8.51-6.89l1.26 4.21c.09.32.25.69.47.66.22-.03.21-.16.28-.3A28.432 28.432 0 0 0 21.4 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M2 14l3-3m-3 0l3 3" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},99071:e=>{e.exports='<svg width="31" height="31" viewBox="0 0 31 31" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.99994 10.3333C9.99994 9.26326 10.8674 8.39581 11.9374 8.39581H17.1041L20.3333 11.625V20.6666C20.3333 21.7367 19.4658 22.6041 18.3958 22.6041H11.9374C10.8674 22.6041 9.99994 21.7367 9.99994 20.6666V10.3333Z" fill="white" fill-opacity="0.01" stroke="currentColor" stroke-width="1.29167"></path><path opacity="0.66" d="M17.4916 11.2376V10.601L18.1283 11.2376L17.4916 11.2376Z" fill="currentColor" stroke="#3D424E" stroke-width="1.29167"></path></svg>'},3743:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.41 18v-1.06l.48-.08c.27 0 .4-.07.53-.45l3.24-9.16-.93-.11V6h3l3.88 10.81.93.05V18H14v-1.06l.62-.08c.28 0 .52-.16.36-.59l-.71-2H9.55l-.87 2.51.94.05V18H6.41zm3.48-4.85h4l-2-5.87-2 5.87zM18 22.9a2.82 2.82 0 0 1-2.27-1.26c-.37-.44-.48-.54-.74-.54s-.34.08-.73.54A2.83 2.83 0 0 1 12 22.9a2.83 2.83 0 0 1-2.27-1.26c-.38-.46-.49-.54-.73-.54s-.34.08-.73.54A2.83 2.83 0 0 1 6 22.9a2.83 2.83 0 0 1-2.27-1.26 4.65 4.65 0 0 0-.37-.41.9.9 0 0 1-.36-.7v-.13a1 1 0 0 1 1.52-.79c.277.222.528.473.75.75.38.46.48.54.73.54s.34-.08.73-.54A2.81 2.81 0 0 1 9 19.1a2.83 2.83 0 0 1 2.27 1.26c.39.46.49.54.73.54s.35-.08.73-.54A2.83 2.83 0 0 1 15 19.1a2.83 2.83 0 0 1 2.27 1.26c.37.44.48.54.74.54s.36-.1.73-.54a4.62 4.62 0 0 1 .62-.65 1 1 0 0 1 1.65.76.94.94 0 0 1-.33.74c-.15.127-.284.271-.4.43A2.85 2.85 0 0 1 18 22.9z" fill="currentColor"></path></svg>'},10524:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M4 20h16v1a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1z" fill="currentColor"></path><path opacity=".5" d="M4 21h16a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1zM14 9.5h-4c1.82 4.158-3 5.562-3 5.562v.77h10v-.77s-4.83-1.404-3-5.562z" fill="currentColor"></path><path d="M19.5 16.75s-2-.918-7.5-.918-7.5.917-7.5.917c-.613.273-1.02.819-1 1.486V19.5h17v-1.265c.005-.656-.395-1.218-1-1.486zM12 2.5C7.5 2.5 7.5 5.07 7.5 7c0 1.93 2.57 2.5 4.5 2.5 1.93 0 4.5-.57 4.5-2.5 0-1.93 0-4.5-4.5-4.5z" fill="currentColor" fill-opacity=".01" stroke="currentColor" stroke-miterlimit="10"></path></svg>'},17076:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="status_completed"><g id="Thick"><path id="Vector" opacity="0.15" d="M18.5 4H5.5C4.67157 4 4 4.67157 4 5.5V18.5C4 19.3284 4.67157 20 5.5 20H18.5C19.3284 20 20 19.3284 20 18.5V5.5C20 4.67157 19.3284 4 18.5 4Z" fill="#628D06"></path><path id="Vector_2" d="M10.94 16L7.81998 13.14C7.7228 13.0507 7.64417 12.9431 7.58856 12.8234C7.53295 12.7038 7.50146 12.5743 7.49589 12.4424C7.49032 12.3106 7.51077 12.1789 7.55609 12.055C7.6014 11.931 7.67068 11.8172 7.75998 11.72C7.94033 11.5237 8.19126 11.4072 8.45756 11.3959C8.58942 11.3903 8.72108 11.4108 8.84504 11.4561C8.96899 11.5014 9.0828 11.5707 9.17998 11.66L10.81 13.16L14.76 8.76C14.8425 8.6471 14.9477 8.55276 15.069 8.48306C15.1902 8.41336 15.3247 8.36986 15.4637 8.35536C15.6028 8.34087 15.7434 8.3557 15.8764 8.3989C16.0094 8.44211 16.1318 8.51272 16.2358 8.60618C16.3398 8.69965 16.4231 8.81388 16.4802 8.94151C16.5373 9.06915 16.567 9.20734 16.5674 9.34717C16.5678 9.487 16.5389 9.62535 16.4825 9.7533C16.4261 9.88126 16.3435 9.99596 16.24 10.09L10.94 16Z" fill="#628D06"></path></g></g></svg>'},40958:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".25" d="M6.41 18v-1.06l.48-.08c.27 0 .4-.07.53-.45l3.24-9.16-.93-.11V6h3l3.88 10.81.93.05V18H14v-1.06l.62-.08c.28 0 .52-.16.36-.59l-.71-2H9.55l-.87 2.51.94.05V18H6.41zm3.48-4.85h4l-2-5.87-2 5.87z" fill="currentColor"></path><path d="M21 10H3v2h18v-2z" fill="currentColor"></path></svg>'},35147:e=>{e.exports='<svg viewBox="0 0 24 24" width="24" height="24" xmlns="http://www.w3.org/2000/svg"><path opacity=".66" d="M21.545 20.16a1.5 1.5 0 01-3 0c0-.83.67-3.37 1.5-3.37s1.5 2.54 1.5 3.37z" fill="currentColor"></path><path d="M13.114 16.389l1.648-1.648-3.536-3.535L7.691 7.67 6.043 9.318a1.12 1.12 0 00-.021 1.563l5.508 5.508a1.12 1.12 0 001.584 0z" stroke="currentColor" stroke-width=".9" stroke-miterlimit="10" fill="none"></path><path d="M7.67 7.64s4.6-4.6 3.89-5.3l3.54 3.53L13 8l3.53-.7 4.25 4.24-.71 2.12s0-1.41-2.12-.71a8.77 8.77 0 00-3.19 1.77" stroke="currentColor" stroke-width=".9" stroke-linecap="round" stroke-linejoin="round" fill="none"></path><path d="M7.76 13.39L9 14.62 5.66 18.9a1.55 1.55 0 11-2.18-2.17l4.28-3.34zm.08-1.34l-.69.55-4.28 3.34a2.55 2.55 0 001.57 4.56 2.52 2.52 0 002-1l3.35-4.28.54-.7-.62-.62-1.24-1.22-.63-.63z" fill="currentColor"></path><path opacity=".33" d="M20.76 11.53l-4.25-4.24-2.07.41C15 9.5 16 10 17 10.5s-.752 1.44-1 3.18c.569-.285 1.327-.509 1.93-.71 2.12-.7 2.12.71 2.12.71l.71-2.15zM10.21 4.9C10.5 5.5 12 4 14 7l1.1-1.13-3.54-3.53c.34.33-.44 1.46-1.35 2.56z" fill="currentColor"></path></svg>'},33601:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9 16.5h6m-9-2h12m-11-2h10m-12-2h14m-13-2h12" stroke="currentColor"></path></svg>'},65908:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 15.5h6m-6-2h12m-12-2h10m-10-2h14m-14-2h12" stroke="currentColor"></path></svg>'},67858:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13 16.5h6m-12-2h12m-10-2h10m-14-2h14m-12-2h12" stroke="currentColor"></path></svg>'},23637:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14 12l-2.5 2.5m0 0L9 12m2.5 2.5v-10" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M4 19.5h15m-15-2h13" stroke="currentColor"></path></svg>'},17526:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14 19l-2.5-2.5m0 0L9 19m2.5-2.5v6" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M4 13.5h15m-15-2h13" stroke="currentColor"></path><path d="M14 6l-2.5 2.5m0 0L9 6m2.5 2.5v-6" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},1792:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14 12l-2.5-2.5m0 0L9 12m2.5-2.5v10" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M4 6.5h15m-15-2h13" stroke="currentColor"></path></svg>'},19587:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.137 5.25a.25.25 0 0 1 .25-.25h3.554a.5.5 0 0 1 .487.386l.264 1.134a.25.25 0 0 0 .244.193h1.49a.2.2 0 0 0 .2-.21l-.176-3.266A.25.25 0 0 0 17.2 3H2.675a.25.25 0 0 0-.25.237L2.25 6.502a.2.2 0 0 0 .2.211h1.5a.25.25 0 0 0 .24-.18l.342-1.173a.5.5 0 0 1 .48-.36h3.576a.25.25 0 0 1 .25.25v9.632a.25.25 0 0 1-.216.248l-2.253.31a.5.5 0 0 0-.431.496v.964a.1.1 0 0 0 .1.1h7.8a.1.1 0 0 0 .1-.1v-.966a.5.5 0 0 0-.43-.495l-2.156-.308a.25.25 0 0 1-.215-.248V5.25z" fill="currentColor"></path><path opacity=".2" d="M12.473 14.28l1.177.169a1.5 1.5 0 0 1 1.287 1.485v.966a1.1 1.1 0 0 1-1.1 1.1H8v2.75c0 .69.56 1.25 1.25 1.25h11.5c.69 0 1.25-.56 1.25-1.25V9.25C22 8.56 21.44 8 20.75 8h-8.277v6.28z" fill="currentColor"></path></svg>'},65788:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.5 3h-17A2.5 2.5 0 0 0 1 5.5v13A2.5 2.5 0 0 0 3.5 21h17a2.5 2.5 0 0 0 2.5-2.5v-13A2.5 2.5 0 0 0 20.5 3zm-2.69 15h-4.29v-1.35l.59-.08c.34 0 .45-.19.33-.56l-.51-1.42H9.82l-.65 1.93.92.05V18h-3.9v-1.35l.43-.06c.42-.05.51-.25.62-.56l2.92-8.5-.94-.1V6h3.93l3.74 10.5.92.07z"></path><path d="M11.86 7.97l-1.68 5.1h3.39l-1.66-5.1h-.05z"></path></svg>'},22203:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".33" d="M11 9.36H9.31c-.24 0-.3.12-.3.32v.77l-1.52-.09V8h9v2.36l-1.49.09V9.7c0-.23-.07-.34-.31-.34h-1.63v5.41l.85.05V16h-3.78v-1.14h.55c.25 0 .31-.1.31-.39L11 9.36z" fill="currentColor"></path><path d="M5.5 20.5a2 2 0 1 0-4 0 2 2 0 0 0 4 0zm17 0a2 2 0 1 0-4 0 2 2 0 0 0 4 0zm-17-17a2 2 0 1 0-4 0 2 2 0 0 0 4 0zm17 0a2 2 0 1 0-4 0 2 2 0 0 0 4 0z" fill="currentColor"></path><path opacity=".5" d="M20.5 3.5h-17v17h17v-17z" stroke="currentColor" stroke-width="1.03" stroke-miterlimit="10"></path></svg>'},80394:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 20H3v2h18v-2zM6.41 18v-1.06l.48-.08c.27 0 .4-.07.53-.45l3.24-9.16-.93-.11V6h3l3.88 10.81.93.05V18H14v-1.06l.62-.08c.28 0 .52-.16.36-.59l-.71-2H9.55l-.87 2.51.94.05V18H6.41zm3.48-4.85h4l-2-5.87-2 5.87z" fill="currentColor"></path></svg>'},10875:e=>{e.exports='<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.25 11l-3.5-3.5 3.5-3.5" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M7.5 7.5h6a6 6 0 1 1 0 12" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"></path><path fill="currentColor" d="M12 19h1v1h-1z"></path><path opacity=".9" fill="currentColor" d="M11 19h1v1h-1z"></path><path opacity=".8" fill="currentColor" d="M10 19h1v1h-1z"></path><path opacity=".7" fill="currentColor" d="M9 19h1v1H9z"></path><path opacity=".6" fill="currentColor" d="M8 19h1v1H8z"></path><path opacity=".5" fill="currentColor" d="M7 19h1v1H7z"></path><path opacity=".4" fill="currentColor" d="M6 19h1v1H6z"></path><path opacity=".3" fill="currentColor" d="M5 19h1v1H5z"></path><path opacity=".2" fill="currentColor" d="M4 19h1v1H4z"></path><path opacity=".1" fill="currentColor" d="M3 19h1v1H3z"></path></svg>'},74223:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.66" d="M20.5 7V20.5H3.5V3.5H17" stroke="currentColor" stroke-width="1.03" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M17 11H11V17H17V11Z" stroke="currentColor" stroke-width="1.03" stroke-miterlimit="10"></path><path opacity="0.5" d="M13 7H7V13H10.5V10.5H13V7Z" fill="currentColor" stroke="currentColor" stroke-width="1.03" stroke-miterlimit="10"></path><path d="M5.5 20.5C5.5 19.3954 4.60457 18.5 3.5 18.5C2.39543 18.5 1.5 19.3954 1.5 20.5C1.5 21.6046 2.39543 22.5 3.5 22.5C4.60457 22.5 5.5 21.6046 5.5 20.5Z" fill="currentColor"></path><path d="M22.5 20.5C22.5 19.3954 21.6046 18.5 20.5 18.5C19.3954 18.5 18.5 19.3954 18.5 20.5C18.5 21.6046 19.3954 22.5 20.5 22.5C21.6046 22.5 22.5 21.6046 22.5 20.5Z" fill="currentColor"></path><path d="M5.5 3.5C5.5 2.39543 4.60457 1.5 3.5 1.5C2.39543 1.5 1.5 2.39543 1.5 3.5C1.5 4.60457 2.39543 5.5 3.5 5.5C4.60457 5.5 5.5 4.60457 5.5 3.5Z" fill="currentColor"></path><path d="M18 1L23 6M23 1L18 6" stroke="currentColor" stroke-width="1.25" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},96242:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g stroke="currentColor" stroke-miterlimit="10"><path d="M7 12.5h10a1.5 1.5 0 011.5 1.5v8a1.5 1.5 0 01-1.5 1.5H7A1.5 1.5 0 015.5 22v-8A1.5 1.5 0 017 12.5z"></path><path d="M8 7.5v-2a4 4 0 014-4h0a4 4 0 014 4V12" stroke-linecap="round" stroke-width="2" opacity=".75" fill="none"></path></g></svg>'},96462:e=>{e.exports='<svg width="24" height="23" viewBox="0 0 24 23" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.7143 3.12296C11.2971 2.15311 12.7029 2.15312 13.2857 3.12296L23.6343 20.3441C24.2351 21.3439 23.515 22.6167 22.3486 22.6167H1.65139C0.484989 22.6167 -0.235114 21.3439 0.365672 20.3441L10.7143 3.12296Z" fill="#5E5CEB"></path><ellipse cx="12" cy="18.2163" rx="1.375" ry="1.35208" fill="white"></ellipse><path d="M11.25 15.2413H12.75L13.125 8.84961H10.875L11.25 15.2413Z" fill="white"></path></svg>'},32443:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 12C13.6575 12 15 10.6575 15 9C15 7.3425 13.6575 6 12 6C10.3425 6 9 7.3425 9 9C9 10.6575 10.3425 12 12 12ZM12 13.5C9.9975 13.5 6 14.505 6 16.5V18H18V16.5C18 14.505 14.0025 13.5 12 13.5Z" fill="currentColor"></path></svg>'},73986:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.206 3.057a1.5 1.5 0 00-2.55.007L.406 19.714A1.5 1.5 0 001.685 22h20.614a1.5 1.5 0 001.273-2.293L13.206 3.057zm-2.38 6.241h2.353l-.28 6.132H11.12l-.294-6.132zm-.083 8.666c0-.686.56-1.26 1.26-1.26.714 0 1.26.574 1.26 1.26 0 .7-.546 1.274-1.26 1.274-.7 0-1.26-.574-1.26-1.274z" fill="currentColor"></path></svg>'},78339:e=>{e.exports='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="warning-2"><path id="Vector 324" d="M7.42834 2.28608L0.605798 13.657C0.339189 14.1013 0.659264 14.6666 1.17746 14.6666H14.8225C15.3407 14.6666 15.6608 14.1013 15.3942 13.657L8.57166 2.28608C8.31273 1.85452 7.68727 1.85452 7.42834 2.28608Z" stroke="black" stroke-linecap="round"></path><path id="Vector 325" d="M8 6V9.33333" stroke="black" stroke-linecap="round"></path><circle id="Ellipse 1085" cx="7.99999" cy="11.6666" r="0.833333" fill="currentColor"></circle></g></svg>'},14896:e=>{e.exports='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16Z" fill="#EB7F00"></path><path d="M8 8.9V4" stroke="white" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M8 13C8.55228 13 9 12.5523 9 12C9 11.4477 8.55228 11 8 11C7.44772 11 7 11.4477 7 12C7 12.5523 7.44772 13 8 13Z" fill="white"></path></svg>'},95618:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6316 8.5H7.36842C6.88881 8.5 6.5 8.8134 6.5 9.2V14.8C6.5 15.1866 6.88881 15.5 7.36842 15.5H16.6316C17.1112 15.5 17.5 15.1866 17.5 14.8V9.2C17.5 8.8134 17.1112 8.5 16.6316 8.5Z" stroke="currentColor" stroke-miterlimit="10"></path><path d="M17 20.5H17.5C19.7091 20.5 21.5 18.7091 21.5 16.5V14M19.5 16L21.5 14M21.5 14L23.5 16" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M7 3.5H6.5C4.29086 3.5 2.5 5.29086 2.5 7.5V10M4.5 8L2.5 10M2.5 10L0.5 8" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},55426:e=>{e.exports='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6316 8.5H7.36842C6.88881 8.5 6.5 8.8134 6.5 9.2V14.8C6.5 15.1866 6.88881 15.5 7.36842 15.5H16.6316C17.1112 15.5 17.5 15.1866 17.5 14.8V9.2C17.5 8.8134 17.1112 8.5 16.6316 8.5Z" stroke="currentColor" stroke-miterlimit="10"></path><path d="M7 20.5H6.5C4.29086 20.5 2.5 18.7091 2.5 16.5V14M4.5 16L2.5 14M2.5 14L0.5 16" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M17 3.5H17.5C19.7091 3.5 21.5 5.29086 21.5 7.5V10M19.5 8L21.5 10M21.5 10L23.5 8" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"></path></svg>'},62660:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".66" d="M16.414 15l5.127 5.127a.75.75 0 0 1 0 1.06l-.354.354a.75.75 0 0 1-1.06 0L15 16.414 16.414 15z" fill="currentColor"></path><circle cx="9" cy="9" r="7.499" fill="currentColor" fill-opacity=".01" stroke="currentColor" stroke-width="1.1"></circle><g opacity=".5" fill="currentColor"><path d="M5 8.375h8v1.25H5z"></path><path d="M9.625 5v8h-1.25V5z"></path></g></svg>'},42762:e=>{e.exports='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".66" d="M16.414 15l5.127 5.127a.75.75 0 0 1 0 1.06l-.354.354a.75.75 0 0 1-1.06 0L15 16.414 16.414 15z" fill="currentColor"></path><circle cx="9" cy="9" r="7.5" fill="currentColor" fill-opacity=".01" stroke="currentColor" stroke-width="1.1"></circle><path fill="currentColor" d="M5 8.375h8v1.25H5z" opacity=".5"></path></svg>'},54670:(e,t,n)=>{"use strict";e.exports=n(60385)},60385:(e,t)=>{"use strict";function n(e,t){if(void 0===t&&(t=""),!e)throw Error(t)}var o=Object.keys(TextMetrics.prototype),r=o.includes("actualBoundingBoxAscent")&&o.includes("actualBoundingBoxDescent");function i(e,t,n){for(var o=0;o<t;++o)if(0!==e.data[n*t*4+4*o+3])return!1;return!0}t.default=function(e){var t=this;if(void 0===e&&(e=""),this.calculateBoundingBox=function(e){n(t.ctx),t.ctx.fillText(e,0,0);for(var o=t.ctx.canvas,r=o.width,a=t.ctx.getImageData(0,0,r,o.height),s=0,l=a.height;s<l&&i(a,r,s);)++s;for(;l-1>s&&i(a,r,l-1);)--l;return l-s},this.measureText=function(e,o){void 0===o&&(o=t.font),n(t.ctx),t.ctx.font=o;var i=t.ctx.measureText(e),a=i.width,s=r?i.actualBoundingBoxAscent+i.actualBoundingBoxDescent:t.calculateBoundingBox(e);return{width:Math.round(a),height:Math.round(s)}},this.clean=function(){t.canvasElem&&document.body.removeChild(t.canvasElem)},"OffscreenCanvas"in window&&"function"==typeof OffscreenCanvas){var o=new OffscreenCanvas(1e3,100);this.ctx=o.getContext("2d")}else this.canvasElem=document.createElement("canvas"),document.body.appendChild(this.canvasElem),this.ctx=this.canvasElem.getContext("2d"),n(this.ctx),this.ctx.canvas.width=1e3,this.ctx.canvas.height=1e3;this.font=e,n(this.ctx),this.ctx.font=e}},70655:(e,t,n)=>{"use strict";n.d(t,{ZT:()=>r,_T:()=>a,ev:()=>s,pi:()=>i});var o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};function a(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}Object.create;function s(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||t)}Object.create},34997:(e,t,n)=>{"use strict";function o(e){var t=new Error(e);return t.source="ulid",t}n.d(t,{SK:()=>p});var r="0123456789ABCDEFGHJKMNPQRSTVWXYZ",i=r.length,a=Math.pow(2,48)-1;function s(e){var t=Math.floor(e()*i);return t===i&&(t=i-1),r.charAt(t)}function l(e,t){if(isNaN(e))throw new Error(e+" must be a number");if(e>a)throw o("cannot encode time greater than "+a);if(e<0)throw o("time must be positive");if(!1===Number.isInteger(e))throw o("time must be an integer");for(var n=void 0,s="";t>0;t--)s=r.charAt(n=e%i)+s,e=(e-n)/i;return s}function c(e,t){for(var n="";e>0;e--)n=s(t)+n;return n}function u(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments[1];t||(t="undefined"!=typeof window?window:null);var r=t&&(t.crypto||t.msCrypto);if(r)return function(){var e=new Uint8Array(1);return r.getRandomValues(e),e[0]/255};try{var i=n(94788);return function(){return i.randomBytes(1).readUInt8()/255}}catch(e){}if(e){try{console.error("secure crypto unusable, falling back to insecure Math.random()!")}catch(e){}return function(){return Math.random()}}throw o("secure crypto unusable, insecure Math.random not allowed")}var d,p=(d||(d=u()),function(e){return isNaN(e)&&(e=Date.now()),l(e,10)+c(16,d)})},94788:()=>{},53250:(e,t,n)=>{"use strict";var o=n(67294);var r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=o.useState,a=o.useEffect,s=o.useLayoutEffect,l=o.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),o=i({inst:{value:n,getSnapshot:t}}),r=o[0].inst,u=o[1];return s((function(){r.value=n,r.getSnapshot=t,c(r)&&u({inst:r})}),[e,n,t]),a((function(){return c(r)&&u({inst:r}),e((function(){c(r)&&u({inst:r})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==o.useSyncExternalStore?o.useSyncExternalStore:u},50139:(e,t,n)=>{"use strict";var o=n(67294),r=n(61688);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useSyncExternalStore,s=o.useRef,l=o.useEffect,c=o.useMemo,u=o.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,o,r){var d=s(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=c((function(){function e(e){if(!l){if(l=!0,a=e,e=o(e),void 0!==r&&p.hasValue){var t=p.value;if(r(t,e))return s=t}return s=e}if(t=s,i(a,e))return t;var n=o(e);return void 0!==r&&r(t,n)?t:(a=e,s=n)}var a,s,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,o,r]);var f=a(e,d[0],d[1]);return l((function(){p.hasValue=!0,p.value=f}),[f]),u(f),f}},61688:(e,t,n)=>{"use strict";e.exports=n(53250)},52798:(e,t,n)=>{"use strict";e.exports=n(50139)},21614:(e,t,n)=>{"use strict";var o;n.d(t,{v4:()=>S});var r=new Uint8Array(16);function i(){if(!o&&!(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(r)}const a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const s=function(e){return"string"==typeof e&&a.test(e)};for(var l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));const u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};const d=function(e){if(!s(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};function p(e,t,n){function o(e,o,r,i){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof o&&(o=d(o)),16!==o.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var a=new Uint8Array(16+e.length);if(a.set(o),a.set(e,o.length),(a=n(a))[6]=15&a[6]|t,a[8]=63&a[8]|128,r){i=i||0;for(var s=0;s<16;++s)r[i+s]=a[s];return r}return u(a)}try{o.name=e}catch(e){}return o.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",o.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",o}function f(e){return 14+(e+64>>>9<<4)+1}function h(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function m(e,t,n,o,r,i){return h((a=h(h(t,e),h(o,i)))<<(s=r)|a>>>32-s,n);var a,s}function g(e,t,n,o,r,i,a){return m(t&n|~t&o,e,t,r,i,a)}function v(e,t,n,o,r,i,a){return m(t&o|n&~o,e,t,r,i,a)}function y(e,t,n,o,r,i,a){return m(t^n^o,e,t,r,i,a)}function b(e,t,n,o,r,i,a){return m(n^(t|~o),e,t,r,i,a)}const w=function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,o="0123456789abcdef",r=0;r<n;r+=8){var i=e[r>>5]>>>r%32&255,a=parseInt(o.charAt(i>>>4&15)+o.charAt(15&i),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[f(t)-1]=t;for(var n=1732584193,o=-271733879,r=-1732584194,i=271733878,a=0;a<e.length;a+=16){var s=n,l=o,c=r,u=i;n=g(n,o,r,i,e[a],7,-680876936),i=g(i,n,o,r,e[a+1],12,-389564586),r=g(r,i,n,o,e[a+2],17,606105819),o=g(o,r,i,n,e[a+3],22,-1044525330),n=g(n,o,r,i,e[a+4],7,-176418897),i=g(i,n,o,r,e[a+5],12,1200080426),r=g(r,i,n,o,e[a+6],17,-1473231341),o=g(o,r,i,n,e[a+7],22,-45705983),n=g(n,o,r,i,e[a+8],7,1770035416),i=g(i,n,o,r,e[a+9],12,-1958414417),r=g(r,i,n,o,e[a+10],17,-42063),o=g(o,r,i,n,e[a+11],22,-1990404162),n=g(n,o,r,i,e[a+12],7,1804603682),i=g(i,n,o,r,e[a+13],12,-40341101),r=g(r,i,n,o,e[a+14],17,-1502002290),n=v(n,o=g(o,r,i,n,e[a+15],22,1236535329),r,i,e[a+1],5,-165796510),i=v(i,n,o,r,e[a+6],9,-1069501632),r=v(r,i,n,o,e[a+11],14,643717713),o=v(o,r,i,n,e[a],20,-373897302),n=v(n,o,r,i,e[a+5],5,-701558691),i=v(i,n,o,r,e[a+10],9,38016083),r=v(r,i,n,o,e[a+15],14,-660478335),o=v(o,r,i,n,e[a+4],20,-405537848),n=v(n,o,r,i,e[a+9],5,568446438),i=v(i,n,o,r,e[a+14],9,-1019803690),r=v(r,i,n,o,e[a+3],14,-187363961),o=v(o,r,i,n,e[a+8],20,1163531501),n=v(n,o,r,i,e[a+13],5,-1444681467),i=v(i,n,o,r,e[a+2],9,-51403784),r=v(r,i,n,o,e[a+7],14,1735328473),n=y(n,o=v(o,r,i,n,e[a+12],20,-1926607734),r,i,e[a+5],4,-378558),i=y(i,n,o,r,e[a+8],11,-2022574463),r=y(r,i,n,o,e[a+11],16,1839030562),o=y(o,r,i,n,e[a+14],23,-35309556),n=y(n,o,r,i,e[a+1],4,-1530992060),i=y(i,n,o,r,e[a+4],11,1272893353),r=y(r,i,n,o,e[a+7],16,-155497632),o=y(o,r,i,n,e[a+10],23,-1094730640),n=y(n,o,r,i,e[a+13],4,681279174),i=y(i,n,o,r,e[a],11,-358537222),r=y(r,i,n,o,e[a+3],16,-722521979),o=y(o,r,i,n,e[a+6],23,76029189),n=y(n,o,r,i,e[a+9],4,-640364487),i=y(i,n,o,r,e[a+12],11,-421815835),r=y(r,i,n,o,e[a+15],16,530742520),n=b(n,o=y(o,r,i,n,e[a+2],23,-995338651),r,i,e[a],6,-198630844),i=b(i,n,o,r,e[a+7],10,1126891415),r=b(r,i,n,o,e[a+14],15,-1416354905),o=b(o,r,i,n,e[a+5],21,-57434055),n=b(n,o,r,i,e[a+12],6,1700485571),i=b(i,n,o,r,e[a+3],10,-1894986606),r=b(r,i,n,o,e[a+10],15,-1051523),o=b(o,r,i,n,e[a+1],21,-2054922799),n=b(n,o,r,i,e[a+8],6,1873313359),i=b(i,n,o,r,e[a+15],10,-30611744),r=b(r,i,n,o,e[a+6],15,-1560198380),o=b(o,r,i,n,e[a+13],21,1309151649),n=b(n,o,r,i,e[a+4],6,-145523070),i=b(i,n,o,r,e[a+11],10,-1120210379),r=b(r,i,n,o,e[a+2],15,718787259),o=b(o,r,i,n,e[a+9],21,-343485551),n=h(n,s),o=h(o,l),r=h(r,c),i=h(i,u)}return[n,o,r,i]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(f(t)),o=0;o<t;o+=8)n[o>>5]|=(255&e[o/8])<<o%32;return n}(e),8*e.length))};p("v3",48,w);const S=function(e,t,n){var o=(e=e||{}).random||(e.rng||i)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=o[r];return t}return u(o)};function P(e,t,n,o){switch(e){case 0:return t&n^~t&o;case 1:case 3:return t^n^o;case 2:return t&n^t&o^n&o}}function E(e,t){return e<<t|e>>>32-t}const x=function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var o=unescape(encodeURIComponent(e));e=[];for(var r=0;r<o.length;++r)e.push(o.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,a=Math.ceil(i/16),s=new Array(a),l=0;l<a;++l){for(var c=new Uint32Array(16),u=0;u<16;++u)c[u]=e[64*l+4*u]<<24|e[64*l+4*u+1]<<16|e[64*l+4*u+2]<<8|e[64*l+4*u+3];s[l]=c}s[a-1][14]=8*(e.length-1)/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=8*(e.length-1)&4294967295;for(var d=0;d<a;++d){for(var p=new Uint32Array(80),f=0;f<16;++f)p[f]=s[d][f];for(var h=16;h<80;++h)p[h]=E(p[h-3]^p[h-8]^p[h-14]^p[h-16],1);for(var m=n[0],g=n[1],v=n[2],y=n[3],b=n[4],w=0;w<80;++w){var S=Math.floor(w/20),x=E(m,5)+P(S,g,v,y)+b+t[S]+p[w]>>>0;b=y,y=v,v=E(g,30)>>>0,g=m,m=x}n[0]=n[0]+m>>>0,n[1]=n[1]+g>>>0,n[2]=n[2]+v>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+b>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]};p("v5",80,x)},57147:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DOMException:()=>D,Headers:()=>h,Request:()=>S,Response:()=>E,fetch:()=>C});var o="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==o&&o,r="URLSearchParams"in o,i="Symbol"in o&&"iterator"in Symbol,a="FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch(e){return!1}}(),s="FormData"in o,l="ArrayBuffer"in o;if(l)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&c.indexOf(Object.prototype.toString.call(e))>-1};function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function p(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function m(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function g(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function v(e){var t=new FileReader,n=g(t);return t.readAsArrayBuffer(e),n}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():l&&a&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=m(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=m(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(v)}),this.text=function(){var e,t,n,o=m(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=g(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),o=0;o<t.length;o++)n[o]=String.fromCharCode(t[o]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(P)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=d(e),t=p(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},h.prototype.delete=function(e){delete this.map[d(e)]},h.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},h.prototype.set=function(e,t){this.map[d(e)]=p(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},i&&(h.prototype[Symbol.iterator]=h.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function S(e,t){if(!(this instanceof S))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,o,r=(t=t||{}).body;if(e instanceof S){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(n=t.method||this.method||"GET",o=n.toUpperCase(),w.indexOf(o)>-1?o:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function P(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),o=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(o),decodeURIComponent(r))}})),t}function E(e,t){if(!(this instanceof E))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}S.prototype.clone=function(){return new S(this,{body:this._bodyInit})},b.call(S.prototype),b.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var x=[301,302,303,307,308];E.redirect=function(e,t){if(-1===x.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})};var D=o.DOMException;try{new D}catch(e){(D=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),D.prototype.constructor=D}function C(e,t){return new Promise((function(n,r){var i=new S(e,t);if(i.signal&&i.signal.aborted)return r(new D("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,o={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),o=n.shift().trim();if(o){var r=n.join(":").trim();t.append(o,r)}})),t)};o.url="responseURL"in s?s.responseURL:o.headers.get("X-Request-URL");var r="response"in s?s.response:s.responseText;setTimeout((function(){n(new E(r,o))}),0)},s.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},s.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},s.onabort=function(){setTimeout((function(){r(new D("Aborted","AbortError"))}),0)},s.open(i.method,function(e){try{return""===e&&o.location.href?o.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?s.withCredentials=!0:"omit"===i.credentials&&(s.withCredentials=!1),"responseType"in s&&(a?s.responseType="blob":l&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(s.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof h?i.headers.forEach((function(e,t){s.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){s.setRequestHeader(e,p(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&i.signal.removeEventListener("abort",c)}),s.send(void 0===i._bodyInit?null:i._bodyInit)}))}C.polyfill=!0,o.fetch||(o.fetch=C,o.Headers=h,o.Request=S,o.Response=E)},47167:(e,t,n)=>{e.exports=function(){return n(69855)('/*!\n * PSPDFKit for Web 2023.5.2 (https://pspdfkit.com/web)\n *\n * Copyright (c) 2016-2023 PSPDFKit GmbH. All rights reserved.\n *\n * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW\n * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.\n * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.\n * This notice may not be removed from this file.\n *\n * PSPDFKit uses several open source third-party components: https://pspdfkit.com/acknowledgements/web/\n */(()=>{var t={9662:(t,e,r)=>{var n=r(614),o=r(6330),i=TypeError;t.exports=function(t){if(n(t))return t;throw i(o(t)+" is not a function")}},9483:(t,e,r)=>{var n=r(4411),o=r(6330),i=TypeError;t.exports=function(t){if(n(t))return t;throw i(o(t)+" is not a constructor")}},6077:(t,e,r)=>{var n=r(614),o=String,i=TypeError;t.exports=function(t){if("object"==typeof t||n(t))return t;throw i("Can\'t set "+o(t)+" as a prototype")}},1223:(t,e,r)=>{var n=r(5112),o=r(30),i=r(3070).f,a=n("unscopables"),s=Array.prototype;null==s[a]&&i(s,a,{configurable:!0,value:o(null)}),t.exports=function(t){s[a][t]=!0}},1530:(t,e,r)=>{"use strict";var n=r(8710).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},5787:(t,e,r)=>{var n=r(7976),o=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw o("Incorrect invocation")}},9670:(t,e,r)=>{var n=r(111),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw i(o(t)+" is not an object")}},3013:t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7556:(t,e,r)=>{var n=r(7293);t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},260:(t,e,r)=>{"use strict";var n,o,i,a=r(3013),s=r(9781),c=r(7854),u=r(614),f=r(111),l=r(2597),p=r(648),d=r(6330),h=r(8880),g=r(8052),m=r(3070).f,y=r(7976),v=r(9518),b=r(7674),w=r(5112),x=r(9711),S=r(9909),_=S.enforce,O=S.get,E=c.Int8Array,I=E&&E.prototype,A=c.Uint8ClampedArray,F=A&&A.prototype,j=E&&v(E),P=I&&v(I),k=Object.prototype,T=c.TypeError,R=w("toStringTag"),B=x("TYPED_ARRAY_TAG"),D="TypedArrayConstructor",C=a&&!!b&&"Opera"!==p(c.opera),U=!1,L={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},N={BigInt64Array:8,BigUint64Array:8},M=function(t){var e=v(t);if(f(e)){var r=O(e);return r&&l(r,D)?r.TypedArrayConstructor:M(e)}},$=function(t){if(!f(t))return!1;var e=p(t);return l(L,e)||l(N,e)};for(n in L)(i=(o=c[n])&&o.prototype)?_(i).TypedArrayConstructor=o:C=!1;for(n in N)(i=(o=c[n])&&o.prototype)&&(_(i).TypedArrayConstructor=o);if((!C||!u(j)||j===Function.prototype)&&(j=function(){throw T("Incorrect invocation")},C))for(n in L)c[n]&&b(c[n],j);if((!C||!P||P===k)&&(P=j.prototype,C))for(n in L)c[n]&&b(c[n].prototype,P);if(C&&v(F)!==P&&b(F,P),s&&!l(P,R))for(n in U=!0,m(P,R,{get:function(){return f(this)?this[B]:void 0}}),L)c[n]&&h(c[n],B,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:C,TYPED_ARRAY_TAG:U&&B,aTypedArray:function(t){if($(t))return t;throw T("Target is not a typed array")},aTypedArrayConstructor:function(t){if(u(t)&&(!b||y(j,t)))return t;throw T(d(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,r,n){if(s){if(r)for(var o in L){var i=c[o];if(i&&l(i.prototype,t))try{delete i.prototype[t]}catch(r){try{i.prototype[t]=e}catch(t){}}}P[t]&&!r||g(P,t,r?e:C&&I[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,r){var n,o;if(s){if(b){if(r)for(n in L)if((o=c[n])&&l(o,t))try{delete o[t]}catch(t){}if(j[t]&&!r)return;try{return g(j,t,r?e:C&&j[t]||e)}catch(t){}}for(n in L)!(o=c[n])||o[t]&&!r||g(o,t,e)}},getTypedArrayConstructor:M,isView:function(t){if(!f(t))return!1;var e=p(t);return"DataView"===e||l(L,e)||l(N,e)},isTypedArray:$,TypedArray:j,TypedArrayPrototype:P}},1285:(t,e,r)=>{"use strict";var n=r(7908),o=r(1400),i=r(6244);t.exports=function(t){for(var e=n(this),r=i(e),a=arguments.length,s=o(a>1?arguments[1]:void 0,r),c=a>2?arguments[2]:void 0,u=void 0===c?r:o(c,r);u>s;)e[s++]=t;return e}},8457:(t,e,r)=>{"use strict";var n=r(9974),o=r(6916),i=r(7908),a=r(3411),s=r(7659),c=r(4411),u=r(6244),f=r(6135),l=r(4121),p=r(1246),d=Array;t.exports=function(t){var e=i(t),r=c(this),h=arguments.length,g=h>1?arguments[1]:void 0,m=void 0!==g;m&&(g=n(g,h>2?arguments[2]:void 0));var y,v,b,w,x,S,_=p(e),O=0;if(!_||this===d&&s(_))for(y=u(e),v=r?new this(y):d(y);y>O;O++)S=m?g(e[O],O):e[O],f(v,O,S);else for(x=(w=l(e,_)).next,v=r?new this:[];!(b=o(x,w)).done;O++)S=m?a(w,g,[b.value,O],!0):b.value,f(v,O,S);return v.length=O,v}},1318:(t,e,r)=>{var n=r(5656),o=r(1400),i=r(6244),a=function(t){return function(e,r,a){var s,c=n(e),u=i(c),f=o(a,u);if(t&&r!=r){for(;u>f;)if((s=c[f++])!=s)return!0}else for(;u>f;f++)if((t||f in c)&&c[f]===r)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},2092:(t,e,r)=>{var n=r(9974),o=r(1702),i=r(8361),a=r(7908),s=r(6244),c=r(5417),u=o([].push),f=function(t){var e=1==t,r=2==t,o=3==t,f=4==t,l=6==t,p=7==t,d=5==t||l;return function(h,g,m,y){for(var v,b,w=a(h),x=i(w),S=n(g,m),_=s(x),O=0,E=y||c,I=e?E(h,_):r||p?E(h,0):void 0;_>O;O++)if((d||O in x)&&(b=S(v=x[O],O,w),t))if(e)I[O]=b;else if(b)switch(t){case 3:return!0;case 5:return v;case 6:return O;case 2:u(I,v)}else switch(t){case 4:return!1;case 7:u(I,v)}return l?-1:o||f?f:I}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterReject:f(7)}},9341:(t,e,r)=>{"use strict";var n=r(7293);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){return 1},1)}))}},1589:(t,e,r)=>{var n=r(1400),o=r(6244),i=r(6135),a=Array,s=Math.max;t.exports=function(t,e,r){for(var c=o(t),u=n(e,c),f=n(void 0===r?c:r,c),l=a(s(f-u,0)),p=0;u<f;u++,p++)i(l,p,t[u]);return l.length=p,l}},206:(t,e,r)=>{var n=r(1702);t.exports=n([].slice)},4362:(t,e,r)=>{var n=r(1589),o=Math.floor,i=function(t,e){var r=t.length,c=o(r/2);return r<8?a(t,e):s(t,i(n(t,0,c),e),i(n(t,c),e),e)},a=function(t,e){for(var r,n,o=t.length,i=1;i<o;){for(n=i,r=t[i];n&&e(t[n-1],r)>0;)t[n]=t[--n];n!==i++&&(t[n]=r)}return t},s=function(t,e,r,n){for(var o=e.length,i=r.length,a=0,s=0;a<o||s<i;)t[a+s]=a<o&&s<i?n(e[a],r[s])<=0?e[a++]:r[s++]:a<o?e[a++]:r[s++];return t};t.exports=i},7475:(t,e,r)=>{var n=r(3157),o=r(4411),i=r(111),a=r(5112)("species"),s=Array;t.exports=function(t){var e;return n(t)&&(e=t.constructor,(o(e)&&(e===s||n(e.prototype))||i(e)&&null===(e=e[a]))&&(e=void 0)),void 0===e?s:e}},5417:(t,e,r)=>{var n=r(7475);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},3411:(t,e,r)=>{var n=r(9670),o=r(9212);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(e){o(t,"throw",e)}}},7072:(t,e,r)=>{var n=r(5112)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}},4326:(t,e,r)=>{var n=r(1702),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},648:(t,e,r)=>{var n=r(1694),o=r(614),i=r(4326),a=r(5112)("toStringTag"),s=Object,c="Arguments"==i(function(){return arguments}());t.exports=n?i:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=s(t),a))?r:c?i(e):"Object"==(n=i(e))&&o(e.callee)?"Arguments":n}},9320:(t,e,r)=>{"use strict";var n=r(1702),o=r(9190),i=r(2423).getWeakData,a=r(5787),s=r(9670),c=r(8554),u=r(111),f=r(408),l=r(2092),p=r(2597),d=r(9909),h=d.set,g=d.getterFor,m=l.find,y=l.findIndex,v=n([].splice),b=0,w=function(t){return t.frozen||(t.frozen=new x)},x=function(){this.entries=[]},S=function(t,e){return m(t.entries,(function(t){return t[0]===e}))};x.prototype={get:function(t){var e=S(this,t);if(e)return e[1]},has:function(t){return!!S(this,t)},set:function(t,e){var r=S(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=y(this.entries,(function(e){return e[0]===t}));return~e&&v(this.entries,e,1),!!~e}},t.exports={getConstructor:function(t,e,r,n){var l=t((function(t,o){a(t,d),h(t,{type:e,id:b++,frozen:void 0}),c(o)||f(o,t[n],{that:t,AS_ENTRIES:r})})),d=l.prototype,m=g(e),y=function(t,e,r){var n=m(t),o=i(s(e),!0);return!0===o?w(n).set(e,r):o[n.id]=r,t};return o(d,{delete:function(t){var e=m(this);if(!u(t))return!1;var r=i(t);return!0===r?w(e).delete(t):r&&p(r,e.id)&&delete r[e.id]},has:function(t){var e=m(this);if(!u(t))return!1;var r=i(t);return!0===r?w(e).has(t):r&&p(r,e.id)}}),o(d,r?{get:function(t){var e=m(this);if(u(t)){var r=i(t);return!0===r?w(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return y(this,t,e)}}:{add:function(t){return y(this,t,!0)}}),l}}},7710:(t,e,r)=>{"use strict";var n=r(2109),o=r(7854),i=r(1702),a=r(4705),s=r(8052),c=r(2423),u=r(408),f=r(5787),l=r(614),p=r(8554),d=r(111),h=r(7293),g=r(7072),m=r(8003),y=r(9587);t.exports=function(t,e,r){var v=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),w=v?"set":"add",x=o[t],S=x&&x.prototype,_=x,O={},E=function(t){var e=i(S[t]);s(S,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return b&&!d(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(a(t,!l(x)||!(b||S.forEach&&!h((function(){(new x).entries().next()})))))_=r.getConstructor(e,t,v,w),c.enable();else if(a(t,!0)){var I=new _,A=I[w](b?{}:-0,1)!=I,F=h((function(){I.has(1)})),j=g((function(t){new x(t)})),P=!b&&h((function(){for(var t=new x,e=5;e--;)t[w](e,e);return!t.has(-0)}));j||((_=e((function(t,e){f(t,S);var r=y(new x,t,_);return p(e)||u(e,r[w],{that:r,AS_ENTRIES:v}),r}))).prototype=S,S.constructor=_),(F||P)&&(E("delete"),E("has"),v&&E("get")),(P||A)&&E(w),b&&S.clear&&delete S.clear}return O[t]=_,n({global:!0,constructor:!0,forced:_!=x},O),m(_,t),b||r.setStrong(_,t,v),_}},9920:(t,e,r)=>{var n=r(2597),o=r(3887),i=r(1236),a=r(3070);t.exports=function(t,e,r){for(var s=o(e),c=a.f,u=i.f,f=0;f<s.length;f++){var l=s[f];n(t,l)||r&&n(r,l)||c(t,l,u(e,l))}}},4964:(t,e,r)=>{var n=r(5112)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},8544:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},6178:t=>{t.exports=function(t,e){return{value:t,done:e}}},8880:(t,e,r)=>{var n=r(9781),o=r(3070),i=r(9114);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:(t,e,r)=>{"use strict";var n=r(4948),o=r(3070),i=r(9114);t.exports=function(t,e,r){var a=n(e);a in t?o.f(t,a,i(0,r)):t[a]=r}},7045:(t,e,r)=>{var n=r(6339),o=r(3070);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),o.f(t,e,r)}},8052:(t,e,r)=>{var n=r(614),o=r(3070),i=r(6339),a=r(3072);t.exports=function(t,e,r,s){s||(s={});var c=s.enumerable,u=void 0!==s.name?s.name:e;if(n(r)&&i(r,u,s),s.global)c?t[e]=r:a(e,r);else{try{s.unsafe?t[e]&&(c=!0):delete t[e]}catch(t){}c?t[e]=r:o.f(t,e,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},9190:(t,e,r)=>{var n=r(8052);t.exports=function(t,e,r){for(var o in e)n(t,o,e[o],r);return t}},3072:(t,e,r)=>{var n=r(7854),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},5117:(t,e,r)=>{"use strict";var n=r(6330),o=TypeError;t.exports=function(t,e){if(!delete t[e])throw o("Cannot delete property "+n(e)+" of "+n(t))}},9781:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4154:t=>{var e="object"==typeof document&&document.all,r=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:r}},317:(t,e,r)=>{var n=r(7854),o=r(111),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},7207:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},8324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(t,e,r)=>{var n=r(317)("span").classList,o=n&&n.constructor&&n.constructor.prototype;t.exports=o===Object.prototype?void 0:o},8886:(t,e,r)=>{var n=r(8113).match(/firefox\\/(\\d+)/i);t.exports=!!n&&+n[1]},7871:(t,e,r)=>{var n=r(3823),o=r(5268);t.exports=!n&&!o&&"object"==typeof window&&"object"==typeof document},9363:t=>{t.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},3823:t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},256:(t,e,r)=>{var n=r(8113);t.exports=/MSIE|Trident/.test(n)},1528:(t,e,r)=>{var n=r(8113),o=r(7854);t.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==o.Pebble},6833:(t,e,r)=>{var n=r(8113);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},5268:(t,e,r)=>{var n=r(4326),o=r(7854);t.exports="process"==n(o.process)},1036:(t,e,r)=>{var n=r(8113);t.exports=/web0s(?!.*chrome)/i.test(n)},8113:(t,e,r)=>{var n=r(5005);t.exports=n("navigator","userAgent")||""},7392:(t,e,r)=>{var n,o,i=r(7854),a=r(8113),s=i.process,c=i.Deno,u=s&&s.versions||c&&c.version,f=u&&u.v8;f&&(o=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\\/(\\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\\/(\\d+)/))&&(o=+n[1]),t.exports=o},8008:(t,e,r)=>{var n=r(8113).match(/AppleWebKit\\/(\\d+)\\./);t.exports=!!n&&+n[1]},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,e,r)=>{var n=r(7854),o=r(1236).f,i=r(8880),a=r(8052),s=r(3072),c=r(9920),u=r(4705);t.exports=function(t,e){var r,f,l,p,d,h=t.target,g=t.global,m=t.stat;if(r=g?n:m?n[h]||s(h,{}):(n[h]||{}).prototype)for(f in e){if(p=e[f],l=t.dontCallGetSet?(d=o(r,f))&&d.value:r[f],!u(g?f:h+(m?".":"#")+f,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;c(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),a(r,f,p,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:(t,e,r)=>{"use strict";r(4916);var n=r(1470),o=r(8052),i=r(2261),a=r(7293),s=r(5112),c=r(8880),u=s("species"),f=RegExp.prototype;t.exports=function(t,e,r,l){var p=s(t),d=!a((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),h=d&&!a((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[u]=function(){return r},r.flags="",r[p]=/./[p]),r.exec=function(){return e=!0,null},r[p](""),!e}));if(!d||!h||r){var g=n(/./[p]),m=e(p,""[t],(function(t,e,r,o,a){var s=n(t),c=e.exec;return c===i||c===f.exec?d&&!a?{done:!0,value:g(e,r,o)}:{done:!0,value:s(r,e,o)}:{done:!1}}));o(String.prototype,t,m[0]),o(f,p,m[1])}l&&c(f[p],"sham",!0)}},6790:(t,e,r)=>{"use strict";var n=r(3157),o=r(6244),i=r(7207),a=r(9974),s=function(t,e,r,c,u,f,l,p){for(var d,h,g=u,m=0,y=!!l&&a(l,p);m<c;)m in r&&(d=y?y(r[m],m,e):r[m],f>0&&n(d)?(h=o(d),g=s(t,e,d,h,g,f-1)-1):(i(g+1),t[g]=d),g++),m++;return g};t.exports=s},6677:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},2104:(t,e,r)=>{var n=r(4374),o=Function.prototype,i=o.apply,a=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})},9974:(t,e,r)=>{var n=r(1470),o=r(9662),i=r(4374),a=n(n.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?a(t,e):function(){return t.apply(e,arguments)}}},4374:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},6916:(t,e,r)=>{var n=r(4374),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},6530:(t,e,r)=>{var n=r(9781),o=r(2597),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=o(i,"name"),c=s&&"something"===function(){}.name,u=s&&(!n||n&&a(i,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},1470:(t,e,r)=>{var n=r(4326),o=r(1702);t.exports=function(t){if("Function"===n(t))return o(t)}},1702:(t,e,r)=>{var n=r(4374),o=Function.prototype,i=o.call,a=n&&o.bind.bind(i,i);t.exports=n?a:function(t){return function(){return i.apply(t,arguments)}}},5005:(t,e,r)=>{var n=r(7854),o=r(614),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t]):n[t]&&n[t][e]}},1246:(t,e,r)=>{var n=r(648),o=r(8173),i=r(8554),a=r(7497),s=r(5112)("iterator");t.exports=function(t){if(!i(t))return o(t,s)||o(t,"@@iterator")||a[n(t)]}},4121:(t,e,r)=>{var n=r(6916),o=r(9662),i=r(9670),a=r(6330),s=r(1246),c=TypeError;t.exports=function(t,e){var r=arguments.length<2?s(t):e;if(o(r))return i(n(r,t));throw c(a(t)+" is not iterable")}},8173:(t,e,r)=>{var n=r(9662),o=r(8554);t.exports=function(t,e){var r=t[e];return o(r)?void 0:n(r)}},647:(t,e,r)=>{var n=r(1702),o=r(7908),i=Math.floor,a=n("".charAt),s=n("".replace),c=n("".slice),u=/\\$([$&\'`]|\\d{1,2}|<[^>]*>)/g,f=/\\$([$&\'`]|\\d{1,2})/g;t.exports=function(t,e,r,n,l,p){var d=r+t.length,h=n.length,g=f;return void 0!==l&&(l=o(l),g=u),s(p,g,(function(o,s){var u;switch(a(s,0)){case"$":return"$";case"&":return t;case"`":return c(e,0,r);case"\'":return c(e,d);case"<":u=l[c(s,1,-1)];break;default:var f=+s;if(0===f)return o;if(f>h){var p=i(f/10);return 0===p?o:p<=h?void 0===n[p-1]?a(s,1):n[p-1]+a(s,1):o}u=n[f-1]}return void 0===u?"":u}))}},7854:(t,e,r)=>{var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},2597:(t,e,r)=>{var n=r(1702),o=r(7908),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},3501:t=>{t.exports={}},842:(t,e,r)=>{var n=r(7854);t.exports=function(t,e){var r=n.console;r&&r.error&&(1==arguments.length?r.error(t):r.error(t,e))}},490:(t,e,r)=>{var n=r(5005);t.exports=n("document","documentElement")},4664:(t,e,r)=>{var n=r(9781),o=r(7293),i=r(317);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,r)=>{var n=r(1702),o=r(7293),i=r(4326),a=Object,s=n("".split);t.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?s(t,""):a(t)}:a},9587:(t,e,r)=>{var n=r(614),o=r(111),i=r(7674);t.exports=function(t,e,r){var a,s;return i&&n(a=e.constructor)&&a!==r&&o(s=a.prototype)&&s!==r.prototype&&i(t,s),t}},2788:(t,e,r)=>{var n=r(1702),o=r(614),i=r(5465),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},2423:(t,e,r)=>{var n=r(2109),o=r(1702),i=r(3501),a=r(111),s=r(2597),c=r(3070).f,u=r(8006),f=r(1156),l=r(2050),p=r(9711),d=r(6677),h=!1,g=p("meta"),m=0,y=function(t){c(t,g,{value:{objectID:"O"+m++,weakData:{}}})},v=t.exports={enable:function(){v.enable=function(){},h=!0;var t=u.f,e=o([].splice),r={};r[g]=1,t(r).length&&(u.f=function(r){for(var n=t(r),o=0,i=n.length;o<i;o++)if(n[o]===g){e(n,o,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:f.f}))},fastKey:function(t,e){if(!a(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!s(t,g)){if(!l(t))return"F";if(!e)return"E";y(t)}return t[g].objectID},getWeakData:function(t,e){if(!s(t,g)){if(!l(t))return!0;if(!e)return!1;y(t)}return t[g].weakData},onFreeze:function(t){return d&&h&&l(t)&&!s(t,g)&&y(t),t}};i[g]=!0},9909:(t,e,r)=>{var n,o,i,a=r(4811),s=r(7854),c=r(111),u=r(8880),f=r(2597),l=r(5465),p=r(6200),d=r(3501),h="Object already initialized",g=s.TypeError,m=s.WeakMap;if(a||l.state){var y=l.state||(l.state=new m);y.get=y.get,y.has=y.has,y.set=y.set,n=function(t,e){if(y.has(t))throw g(h);return e.facade=t,y.set(t,e),e},o=function(t){return y.get(t)||{}},i=function(t){return y.has(t)}}else{var v=p("state");d[v]=!0,n=function(t,e){if(f(t,v))throw g(h);return e.facade=t,u(t,v,e),e},o=function(t){return f(t,v)?t[v]:{}},i=function(t){return f(t,v)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!c(e)||(r=o(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return r}}}},7659:(t,e,r)=>{var n=r(5112),o=r(7497),i=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},3157:(t,e,r)=>{var n=r(4326);t.exports=Array.isArray||function(t){return"Array"==n(t)}},614:(t,e,r)=>{var n=r(4154),o=n.all;t.exports=n.IS_HTMLDDA?function(t){return"function"==typeof t||t===o}:function(t){return"function"==typeof t}},4411:(t,e,r)=>{var n=r(1702),o=r(7293),i=r(614),a=r(648),s=r(5005),c=r(2788),u=function(){},f=[],l=s("Reflect","construct"),p=/^\\s*(?:class|function)\\b/,d=n(p.exec),h=!p.exec(u),g=function(t){if(!i(t))return!1;try{return l(u,f,t),!0}catch(t){return!1}},m=function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!d(p,c(t))}catch(t){return!0}};m.sham=!0,t.exports=!l||o((function(){var t;return g(g.call)||!g(Object)||!g((function(){t=!0}))||t}))?m:g},5032:(t,e,r)=>{var n=r(2597);t.exports=function(t){return void 0!==t&&(n(t,"value")||n(t,"writable"))}},4705:(t,e,r)=>{var n=r(7293),o=r(614),i=/#|\\.prototype\\./,a=function(t,e){var r=c[s(t)];return r==f||r!=u&&(o(e)?n(e):!!e)},s=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},8554:t=>{t.exports=function(t){return null==t}},111:(t,e,r)=>{var n=r(614),o=r(4154),i=o.all;t.exports=o.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:n(t)||t===i}:function(t){return"object"==typeof t?null!==t:n(t)}},1913:t=>{t.exports=!1},7850:(t,e,r)=>{var n=r(111),o=r(4326),i=r(5112)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},2190:(t,e,r)=>{var n=r(5005),o=r(614),i=r(7976),a=r(3307),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return o(e)&&i(e.prototype,s(t))}},408:(t,e,r)=>{var n=r(9974),o=r(6916),i=r(9670),a=r(6330),s=r(7659),c=r(6244),u=r(7976),f=r(4121),l=r(1246),p=r(9212),d=TypeError,h=function(t,e){this.stopped=t,this.result=e},g=h.prototype;t.exports=function(t,e,r){var m,y,v,b,w,x,S,_=r&&r.that,O=!(!r||!r.AS_ENTRIES),E=!(!r||!r.IS_RECORD),I=!(!r||!r.IS_ITERATOR),A=!(!r||!r.INTERRUPTED),F=n(e,_),j=function(t){return m&&p(m,"normal",t),new h(!0,t)},P=function(t){return O?(i(t),A?F(t[0],t[1],j):F(t[0],t[1])):A?F(t,j):F(t)};if(E)m=t.iterator;else if(I)m=t;else{if(!(y=l(t)))throw d(a(t)+" is not iterable");if(s(y)){for(v=0,b=c(t);b>v;v++)if((w=P(t[v]))&&u(g,w))return w;return new h(!1)}m=f(t,y)}for(x=E?t.next:m.next;!(S=o(x,m)).done;){try{w=P(S.value)}catch(t){p(m,"throw",t)}if("object"==typeof w&&w&&u(g,w))return w}return new h(!1)}},9212:(t,e,r)=>{var n=r(6916),o=r(9670),i=r(8173);t.exports=function(t,e,r){var a,s;o(t);try{if(!(a=i(t,"return"))){if("throw"===e)throw r;return r}a=n(a,t)}catch(t){s=!0,a=t}if("throw"===e)throw r;if(s)throw a;return o(a),r}},3061:(t,e,r)=>{"use strict";var n=r(3383).IteratorPrototype,o=r(30),i=r(9114),a=r(8003),s=r(7497),c=function(){return this};t.exports=function(t,e,r,u){var f=e+" Iterator";return t.prototype=o(n,{next:i(+!u,r)}),a(t,f,!1,!0),s[f]=c,t}},1656:(t,e,r)=>{"use strict";var n=r(2109),o=r(6916),i=r(1913),a=r(6530),s=r(614),c=r(3061),u=r(9518),f=r(7674),l=r(8003),p=r(8880),d=r(8052),h=r(5112),g=r(7497),m=r(3383),y=a.PROPER,v=a.CONFIGURABLE,b=m.IteratorPrototype,w=m.BUGGY_SAFARI_ITERATORS,x=h("iterator"),S="keys",_="values",O="entries",E=function(){return this};t.exports=function(t,e,r,a,h,m,I){c(r,e,a);var A,F,j,P=function(t){if(t===h&&D)return D;if(!w&&t in R)return R[t];switch(t){case S:case _:case O:return function(){return new r(this,t)}}return function(){return new r(this)}},k=e+" Iterator",T=!1,R=t.prototype,B=R[x]||R["@@iterator"]||h&&R[h],D=!w&&B||P(h),C="Array"==e&&R.entries||B;if(C&&(A=u(C.call(new t)))!==Object.prototype&&A.next&&(i||u(A)===b||(f?f(A,b):s(A[x])||d(A,x,E)),l(A,k,!0,!0),i&&(g[k]=E)),y&&h==_&&B&&B.name!==_&&(!i&&v?p(R,"name",_):(T=!0,D=function(){return o(B,this)})),h)if(F={values:P(_),keys:m?D:P(S),entries:P(O)},I)for(j in F)(w||T||!(j in R))&&d(R,j,F[j]);else n({target:e,proto:!0,forced:w||T},F);return i&&!I||R[x]===D||d(R,x,D,{name:h}),g[e]=D,F}},3383:(t,e,r)=>{"use strict";var n,o,i,a=r(7293),s=r(614),c=r(111),u=r(30),f=r(9518),l=r(8052),p=r(5112),d=r(1913),h=p("iterator"),g=!1;[].keys&&("next"in(i=[].keys())?(o=f(f(i)))!==Object.prototype&&(n=o):g=!0),!c(n)||a((function(){var t={};return n[h].call(t)!==t}))?n={}:d&&(n=u(n)),s(n[h])||l(n,h,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:g}},7497:t=>{t.exports={}},6244:(t,e,r)=>{var n=r(7466);t.exports=function(t){return n(t.length)}},6339:(t,e,r)=>{var n=r(7293),o=r(614),i=r(2597),a=r(9781),s=r(6530).CONFIGURABLE,c=r(2788),u=r(9909),f=u.enforce,l=u.get,p=Object.defineProperty,d=a&&!n((function(){return 8!==p((function(){}),"length",{value:8}).length})),h=String(String).split("String"),g=t.exports=function(t,e,r){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\\(([^)]*)\\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!i(t,"name")||s&&t.name!==e)&&(a?p(t,"name",{value:e,configurable:!0}):t.name=e),d&&r&&i(r,"arity")&&t.length!==r.arity&&p(t,"length",{value:r.arity});try{r&&i(r,"constructor")&&r.constructor?a&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=f(t);return i(n,"source")||(n.source=h.join("string"==typeof e?e:"")),t};Function.prototype.toString=g((function(){return o(this)&&l(this).source||c(this)}),"toString")},4758:t=>{var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},5948:(t,e,r)=>{var n,o,i,a,s,c,u,f,l=r(7854),p=r(9974),d=r(1236).f,h=r(261).set,g=r(6833),m=r(1528),y=r(1036),v=r(5268),b=l.MutationObserver||l.WebKitMutationObserver,w=l.document,x=l.process,S=l.Promise,_=d(l,"queueMicrotask"),O=_&&_.value;O||(n=function(){var t,e;for(v&&(t=x.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},g||v||y||!b||!w?!m&&S&&S.resolve?((u=S.resolve(void 0)).constructor=S,f=p(u.then,u),a=function(){f(n)}):v?a=function(){x.nextTick(n)}:(h=p(h,l),a=function(){h(n)}):(s=!0,c=w.createTextNode(""),new b(n).observe(c,{characterData:!0}),a=function(){c.data=s=!s})),t.exports=O||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},8523:(t,e,r)=>{"use strict";var n=r(9662),o=TypeError,i=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw o("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new i(t)}},3929:(t,e,r)=>{var n=r(7850),o=TypeError;t.exports=function(t){if(n(t))throw o("The method doesn\'t accept regular expressions");return t}},2814:(t,e,r)=>{var n=r(7854),o=r(7293),i=r(1702),a=r(1340),s=r(3111).trim,c=r(1361),u=i("".charAt),f=n.parseFloat,l=n.Symbol,p=l&&l.iterator,d=1/f(c+"-0")!=-1/0||p&&!o((function(){f(Object(p))}));t.exports=d?function(t){var e=s(a(t)),r=f(e);return 0===r&&"-"==u(e,0)?-0:r}:f},3009:(t,e,r)=>{var n=r(7854),o=r(7293),i=r(1702),a=r(1340),s=r(3111).trim,c=r(1361),u=n.parseInt,f=n.Symbol,l=f&&f.iterator,p=/^[+-]?0x/i,d=i(p.exec),h=8!==u(c+"08")||22!==u(c+"0x16")||l&&!o((function(){u(Object(l))}));t.exports=h?function(t,e){var r=s(a(t));return u(r,e>>>0||(d(p,r)?16:10))}:u},1574:(t,e,r)=>{"use strict";var n=r(9781),o=r(1702),i=r(6916),a=r(7293),s=r(1956),c=r(5181),u=r(5296),f=r(7908),l=r(8361),p=Object.assign,d=Object.defineProperty,h=o([].concat);t.exports=!p||a((function(){if(n&&1!==p({b:1},p(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach((function(t){e[t]=t})),7!=p({},t)[r]||s(p({},e)).join("")!=o}))?function(t,e){for(var r=f(t),o=arguments.length,a=1,p=c.f,d=u.f;o>a;)for(var g,m=l(arguments[a++]),y=p?h(s(m),p(m)):s(m),v=y.length,b=0;v>b;)g=y[b++],n&&!i(d,m,g)||(r[g]=m[g]);return r}:p},30:(t,e,r)=>{var n,o=r(9670),i=r(6048),a=r(748),s=r(3501),c=r(490),u=r(317),f=r(6200),l=f("IE_PROTO"),p=function(){},d=function(t){return"<script>"+t+"</"+"script>"},h=function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e;g="undefined"!=typeof document?document.domain&&n?h(n):((e=u("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):h(n);for(var r=a.length;r--;)delete g.prototype[a[r]];return g()};s[l]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(p.prototype=o(t),r=new p,p.prototype=null,r[l]=t):r=g(),void 0===e?r:i.f(r,e)}},6048:(t,e,r)=>{var n=r(9781),o=r(3353),i=r(3070),a=r(9670),s=r(5656),c=r(1956);e.f=n&&!o?Object.defineProperties:function(t,e){a(t);for(var r,n=s(e),o=c(e),u=o.length,f=0;u>f;)i.f(t,r=o[f++],n[r]);return t}},3070:(t,e,r)=>{var n=r(9781),o=r(4664),i=r(3353),a=r(9670),s=r(4948),c=TypeError,u=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l="enumerable",p="configurable",d="writable";e.f=n?i?function(t,e,r){if(a(t),e=s(e),a(r),"function"==typeof t&&"prototype"===e&&"value"in r&&d in r&&!r.writable){var n=f(t,e);n&&n.writable&&(t[e]=r.value,r={configurable:p in r?r.configurable:n.configurable,enumerable:l in r?r.enumerable:n.enumerable,writable:!1})}return u(t,e,r)}:u:function(t,e,r){if(a(t),e=s(e),a(r),o)try{return u(t,e,r)}catch(t){}if("get"in r||"set"in r)throw c("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},1236:(t,e,r)=>{var n=r(9781),o=r(6916),i=r(5296),a=r(9114),s=r(5656),c=r(4948),u=r(2597),f=r(4664),l=Object.getOwnPropertyDescriptor;e.f=n?l:function(t,e){if(t=s(t),e=c(e),f)try{return l(t,e)}catch(t){}if(u(t,e))return a(!o(i.f,t,e),t[e])}},1156:(t,e,r)=>{var n=r(4326),o=r(5656),i=r(8006).f,a=r(1589),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"Window"==n(t)?function(t){try{return i(t)}catch(t){return a(s)}}(t):i(o(t))}},8006:(t,e,r)=>{var n=r(6324),o=r(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},5181:(t,e)=>{e.f=Object.getOwnPropertySymbols},9518:(t,e,r)=>{var n=r(2597),o=r(614),i=r(7908),a=r(6200),s=r(8544),c=a("IE_PROTO"),u=Object,f=u.prototype;t.exports=s?u.getPrototypeOf:function(t){var e=i(t);if(n(e,c))return e[c];var r=e.constructor;return o(r)&&e instanceof r?r.prototype:e instanceof u?f:null}},2050:(t,e,r)=>{var n=r(7293),o=r(111),i=r(4326),a=r(7556),s=Object.isExtensible,c=n((function(){s(1)}));t.exports=c||a?function(t){return!!o(t)&&((!a||"ArrayBuffer"!=i(t))&&(!s||s(t)))}:s},7976:(t,e,r)=>{var n=r(1702);t.exports=n({}.isPrototypeOf)},6324:(t,e,r)=>{var n=r(1702),o=r(2597),i=r(5656),a=r(1318).indexOf,s=r(3501),c=n([].push);t.exports=function(t,e){var r,n=i(t),u=0,f=[];for(r in n)!o(s,r)&&o(n,r)&&c(f,r);for(;e.length>u;)o(n,r=e[u++])&&(~a(f,r)||c(f,r));return f}},1956:(t,e,r)=>{var n=r(6324),o=r(748);t.exports=Object.keys||function(t){return n(t,o)}},5296:(t,e)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);e.f=o?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},7674:(t,e,r)=>{var n=r(1702),o=r(9670),i=r(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return o(r),i(n),e?t(r,n):r.__proto__=n,r}}():void 0)},2140:(t,e,r)=>{var n=r(6916),o=r(614),i=r(111),a=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&o(r=t.toString)&&!i(s=n(r,t)))return s;if(o(r=t.valueOf)&&!i(s=n(r,t)))return s;if("string"!==e&&o(r=t.toString)&&!i(s=n(r,t)))return s;throw a("Can\'t convert object to primitive value")}},3887:(t,e,r)=>{var n=r(5005),o=r(1702),i=r(8006),a=r(5181),s=r(9670),c=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(s(t)),r=a.f;return r?c(e,r(t)):e}},857:(t,e,r)=>{var n=r(7854);t.exports=n},2534:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},3702:(t,e,r)=>{var n=r(7854),o=r(2492),i=r(614),a=r(4705),s=r(2788),c=r(5112),u=r(7871),f=r(3823),l=r(1913),p=r(7392),d=o&&o.prototype,h=c("species"),g=!1,m=i(n.PromiseRejectionEvent),y=a("Promise",(function(){var t=s(o),e=t!==String(o);if(!e&&66===p)return!0;if(l&&(!d.catch||!d.finally))return!0;if(!p||p<51||!/native code/.test(t)){var r=new o((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[h]=n,!(g=r.then((function(){}))instanceof n))return!0}return!e&&(u||f)&&!m}));t.exports={CONSTRUCTOR:y,REJECTION_EVENT:m,SUBCLASSING:g}},2492:(t,e,r)=>{var n=r(7854);t.exports=n.Promise},9478:(t,e,r)=>{var n=r(9670),o=r(111),i=r(8523);t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var r=i.f(t);return(0,r.resolve)(e),r.promise}},612:(t,e,r)=>{var n=r(2492),o=r(7072),i=r(3702).CONSTRUCTOR;t.exports=i||!o((function(t){n.all(t).then(void 0,(function(){}))}))},2626:(t,e,r)=>{var n=r(3070).f;t.exports=function(t,e,r){r in t||n(t,r,{configurable:!0,get:function(){return e[r]},set:function(t){e[r]=t}})}},8572:t=>{var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}},t.exports=e},7651:(t,e,r)=>{var n=r(6916),o=r(9670),i=r(614),a=r(4326),s=r(2261),c=TypeError;t.exports=function(t,e){var r=t.exec;if(i(r)){var u=n(r,t,e);return null!==u&&o(u),u}if("RegExp"===a(t))return n(s,t,e);throw c("RegExp#exec called on incompatible receiver")}},2261:(t,e,r)=>{"use strict";var n,o,i=r(6916),a=r(1702),s=r(1340),c=r(7066),u=r(2999),f=r(2309),l=r(30),p=r(9909).get,d=r(9441),h=r(7168),g=f("native-string-replace",String.prototype.replace),m=RegExp.prototype.exec,y=m,v=a("".charAt),b=a("".indexOf),w=a("".replace),x=a("".slice),S=(o=/b*/g,i(m,n=/a/,"a"),i(m,o,"a"),0!==n.lastIndex||0!==o.lastIndex),_=u.BROKEN_CARET,O=void 0!==/()??/.exec("")[1];(S||O||_||d||h)&&(y=function(t){var e,r,n,o,a,u,f,d=this,h=p(d),E=s(t),I=h.raw;if(I)return I.lastIndex=d.lastIndex,e=i(y,I,E),d.lastIndex=I.lastIndex,e;var A=h.groups,F=_&&d.sticky,j=i(c,d),P=d.source,k=0,T=E;if(F&&(j=w(j,"y",""),-1===b(j,"g")&&(j+="g"),T=x(E,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\\n"!==v(E,d.lastIndex-1))&&(P="(?: "+P+")",T=" "+T,k++),r=new RegExp("^(?:"+P+")",j)),O&&(r=new RegExp("^"+P+"$(?!\\\\s)",j)),S&&(n=d.lastIndex),o=i(m,F?r:d,T),F?o?(o.input=x(o.input,k),o[0]=x(o[0],k),o.index=d.lastIndex,d.lastIndex+=o[0].length):d.lastIndex=0:S&&o&&(d.lastIndex=d.global?o.index+o[0].length:n),O&&o&&o.length>1&&i(g,o[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o&&A)for(o.groups=u=l(null),a=0;a<A.length;a++)u[(f=A[a])[0]]=o[f[1]];return o}),t.exports=y},7066:(t,e,r)=>{"use strict";var n=r(9670);t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},4706:(t,e,r)=>{var n=r(6916),o=r(2597),i=r(7976),a=r(7066),s=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in s||o(t,"flags")||!i(s,t)?e:n(a,t)}},2999:(t,e,r)=>{var n=r(7293),o=r(7854).RegExp,i=n((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),a=i||n((function(){return!o("a","y").sticky})),s=i||n((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:i}},9441:(t,e,r)=>{var n=r(7293),o=r(7854).RegExp;t.exports=n((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\\n")&&"s"===t.flags)}))},7168:(t,e,r)=>{var n=r(7293),o=r(7854).RegExp;t.exports=n((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},4488:(t,e,r)=>{var n=r(8554),o=TypeError;t.exports=function(t){if(n(t))throw o("Can\'t call method on "+t);return t}},1150:t=>{t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},7152:(t,e,r)=>{"use strict";var n,o=r(7854),i=r(2104),a=r(614),s=r(9363),c=r(8113),u=r(206),f=r(8053),l=o.Function,p=/MSIE .\\./.test(c)||s&&((n=o.Bun.version.split(".")).length<3||0==n[0]&&(n[1]<3||3==n[1]&&0==n[2]));t.exports=function(t,e){var r=e?2:1;return p?function(n,o){var s=f(arguments.length,1)>r,c=a(n)?n:l(n),p=s?u(arguments,r):[],d=s?function(){i(c,this,p)}:c;return e?t(d,o):t(d)}:t}},6340:(t,e,r)=>{"use strict";var n=r(5005),o=r(3070),i=r(5112),a=r(9781),s=i("species");t.exports=function(t){var e=n(t),r=o.f;a&&e&&!e[s]&&r(e,s,{configurable:!0,get:function(){return this}})}},8003:(t,e,r)=>{var n=r(3070).f,o=r(2597),i=r(5112)("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!o(t,i)&&n(t,i,{configurable:!0,value:e})}},6200:(t,e,r)=>{var n=r(2309),o=r(9711),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},5465:(t,e,r)=>{var n=r(7854),o=r(3072),i="__core-js_shared__",a=n[i]||o(i,{});t.exports=a},2309:(t,e,r)=>{var n=r(1913),o=r(5465);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.27.1",mode:n?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.27.1/LICENSE",source:"https://github.com/zloirock/core-js"})},6707:(t,e,r)=>{var n=r(9670),o=r(9483),i=r(8554),a=r(5112)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||i(r=n(s)[a])?e:o(r)}},8710:(t,e,r)=>{var n=r(1702),o=r(9303),i=r(1340),a=r(4488),s=n("".charAt),c=n("".charCodeAt),u=n("".slice),f=function(t){return function(e,r){var n,f,l=i(a(e)),p=o(r),d=l.length;return p<0||p>=d?t?"":void 0:(n=c(l,p))<55296||n>56319||p+1===d||(f=c(l,p+1))<56320||f>57343?t?s(l,p):n:t?u(l,p,p+2):f-56320+(n-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},3197:(t,e,r)=>{"use strict";var n=r(1702),o=2147483647,i=/[^\\0-\\u007E]/,a=/[.\\u3002\\uFF0E\\uFF61]/g,s="Overflow: input needs wider integers to process",c=RangeError,u=n(a.exec),f=Math.floor,l=String.fromCharCode,p=n("".charCodeAt),d=n([].join),h=n([].push),g=n("".replace),m=n("".split),y=n("".toLowerCase),v=function(t){return t+22+75*(t<26)},b=function(t,e,r){var n=0;for(t=r?f(t/700):t>>1,t+=f(t/e);t>455;)t=f(t/35),n+=36;return f(n+36*t/(t+38))},w=function(t){var e=[];t=function(t){for(var e=[],r=0,n=t.length;r<n;){var o=p(t,r++);if(o>=55296&&o<=56319&&r<n){var i=p(t,r++);56320==(64512&i)?h(e,((1023&o)<<10)+(1023&i)+65536):(h(e,o),r--)}else h(e,o)}return e}(t);var r,n,i=t.length,a=128,u=0,g=72;for(r=0;r<t.length;r++)(n=t[r])<128&&h(e,l(n));var m=e.length,y=m;for(m&&h(e,"-");y<i;){var w=o;for(r=0;r<t.length;r++)(n=t[r])>=a&&n<w&&(w=n);var x=y+1;if(w-a>f((o-u)/x))throw c(s);for(u+=(w-a)*x,a=w,r=0;r<t.length;r++){if((n=t[r])<a&&++u>o)throw c(s);if(n==a){for(var S=u,_=36;;){var O=_<=g?1:_>=g+26?26:_-g;if(S<O)break;var E=S-O,I=36-O;h(e,l(v(O+E%I))),S=f(E/I),_+=36}h(e,l(v(S))),g=b(u,x,y==m),u=0,y++}}u++,a++}return d(e,"")};t.exports=function(t){var e,r,n=[],o=m(g(y(t),a,"."),".");for(e=0;e<o.length;e++)r=o[e],h(n,u(i,r)?"xn--"+w(r):r);return d(n,".")}},8415:(t,e,r)=>{"use strict";var n=r(9303),o=r(1340),i=r(4488),a=RangeError;t.exports=function(t){var e=o(i(this)),r="",s=n(t);if(s<0||s==1/0)throw a("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(e+=e))1&s&&(r+=e);return r}},365:(t,e,r)=>{"use strict";var n=r(3111).end,o=r(6091);t.exports=o("trimEnd")?function(){return n(this)}:"".trimEnd},6091:(t,e,r)=>{var n=r(6530).PROPER,o=r(7293),i=r(1361);t.exports=function(t){return o((function(){return!!i[t]()||"…"!=="…"[t]()||n&&i[t].name!==t}))}},3217:(t,e,r)=>{"use strict";var n=r(3111).start,o=r(6091);t.exports=o("trimStart")?function(){return n(this)}:"".trimStart},3111:(t,e,r)=>{var n=r(1702),o=r(4488),i=r(1340),a=r(1361),s=n("".replace),c="["+a+"]",u=RegExp("^"+c+c+"*"),f=RegExp(c+c+"*$"),l=function(t){return function(e){var r=i(o(e));return 1&t&&(r=s(r,u,"")),2&t&&(r=s(r,f,"")),r}};t.exports={start:l(1),end:l(2),trim:l(3)}},6293:(t,e,r)=>{var n=r(7392),o=r(7293);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},261:(t,e,r)=>{var n,o,i,a,s=r(7854),c=r(2104),u=r(9974),f=r(614),l=r(2597),p=r(7293),d=r(490),h=r(206),g=r(317),m=r(8053),y=r(6833),v=r(5268),b=s.setImmediate,w=s.clearImmediate,x=s.process,S=s.Dispatch,_=s.Function,O=s.MessageChannel,E=s.String,I=0,A={},F="onreadystatechange";try{n=s.location}catch(t){}var j=function(t){if(l(A,t)){var e=A[t];delete A[t],e()}},P=function(t){return function(){j(t)}},k=function(t){j(t.data)},T=function(t){s.postMessage(E(t),n.protocol+"//"+n.host)};b&&w||(b=function(t){m(arguments.length,1);var e=f(t)?t:_(t),r=h(arguments,1);return A[++I]=function(){c(e,void 0,r)},o(I),I},w=function(t){delete A[t]},v?o=function(t){x.nextTick(P(t))}:S&&S.now?o=function(t){S.now(P(t))}:O&&!y?(a=(i=new O).port2,i.port1.onmessage=k,o=u(a.postMessage,a)):s.addEventListener&&f(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!p(T)?(o=T,s.addEventListener("message",k,!1)):o=F in g("script")?function(t){d.appendChild(g("script")).onreadystatechange=function(){d.removeChild(this),j(t)}}:function(t){setTimeout(P(t),0)}),t.exports={set:b,clear:w}},863:(t,e,r)=>{var n=r(1702);t.exports=n(1..valueOf)},1400:(t,e,r)=>{var n=r(9303),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},4599:(t,e,r)=>{var n=r(7593),o=TypeError;t.exports=function(t){var e=n(t,"number");if("number"==typeof e)throw o("Can\'t convert number to bigint");return BigInt(e)}},5656:(t,e,r)=>{var n=r(8361),o=r(4488);t.exports=function(t){return n(o(t))}},9303:(t,e,r)=>{var n=r(4758);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},7466:(t,e,r)=>{var n=r(9303),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},7908:(t,e,r)=>{var n=r(4488),o=Object;t.exports=function(t){return o(n(t))}},4590:(t,e,r)=>{var n=r(3002),o=RangeError;t.exports=function(t,e){var r=n(t);if(r%e)throw o("Wrong offset");return r}},3002:(t,e,r)=>{var n=r(9303),o=RangeError;t.exports=function(t){var e=n(t);if(e<0)throw o("The argument can\'t be less than 0");return e}},7593:(t,e,r)=>{var n=r(6916),o=r(111),i=r(2190),a=r(8173),s=r(2140),c=r(5112),u=TypeError,f=c("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var r,c=a(t,f);if(c){if(void 0===e&&(e="default"),r=n(c,t,e),!o(r)||i(r))return r;throw u("Can\'t convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},4948:(t,e,r)=>{var n=r(7593),o=r(2190);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},1694:(t,e,r)=>{var n={};n[r(5112)("toStringTag")]="z",t.exports="[object z]"===String(n)},1340:(t,e,r)=>{var n=r(648),o=String;t.exports=function(t){if("Symbol"===n(t))throw TypeError("Cannot convert a Symbol value to a string");return o(t)}},6330:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},9711:(t,e,r)=>{var n=r(1702),o=0,i=Math.random(),a=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},5143:(t,e,r)=>{var n=r(7293),o=r(5112),i=r(1913),a=o("iterator");t.exports=!n((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),i&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host}))},3307:(t,e,r)=>{var n=r(6293);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:(t,e,r)=>{var n=r(9781),o=r(7293);t.exports=n&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8053:t=>{var e=TypeError;t.exports=function(t,r){if(t<r)throw e("Not enough arguments");return t}},4811:(t,e,r)=>{var n=r(7854),o=r(614),i=n.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},6800:(t,e,r)=>{var n=r(857),o=r(2597),i=r(6061),a=r(3070).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},6061:(t,e,r)=>{var n=r(5112);e.f=n},5112:(t,e,r)=>{var n=r(7854),o=r(2309),i=r(2597),a=r(9711),s=r(6293),c=r(3307),u=o("wks"),f=n.Symbol,l=f&&f.for,p=c?f:f&&f.withoutSetter||a;t.exports=function(t){if(!i(u,t)||!s&&"string"!=typeof u[t]){var e="Symbol."+t;s&&i(f,t)?u[t]=f[t]:u[t]=c&&l?l(e):p(e)}return u[t]}},1361:t=>{t.exports="\\t\\n\\v\\f\\r    \\u2028\\u2029\\ufeff"},6535:(t,e,r)=>{"use strict";var n=r(2109),o=r(6790),i=r(9662),a=r(7908),s=r(6244),c=r(5417);n({target:"Array",proto:!0},{flatMap:function(t){var e,r=a(this),n=s(r);return i(t),(e=c(r,0)).length=o(e,r,r,n,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},4944:(t,e,r)=>{"use strict";var n=r(2109),o=r(6790),i=r(7908),a=r(6244),s=r(9303),c=r(5417);n({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=i(this),r=a(e),n=c(e,0);return n.length=o(n,e,e,r,0,void 0===t?1:s(t)),n}})},6992:(t,e,r)=>{"use strict";var n=r(5656),o=r(1223),i=r(7497),a=r(9909),s=r(3070).f,c=r(1656),u=r(6178),f=r(1913),l=r(9781),p="Array Iterator",d=a.set,h=a.getterFor(p);t.exports=c(Array,"Array",(function(t,e){d(this,{type:p,target:n(t),index:0,kind:e})}),(function(){var t=h(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,u(void 0,!0)):u("keys"==r?n:"values"==r?e[n]:[n,e[n]],!1)}),"values");var g=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!f&&l&&"values"!==g.name)try{s(g,"name",{value:"values"})}catch(t){}},2707:(t,e,r)=>{"use strict";var n=r(2109),o=r(1702),i=r(9662),a=r(7908),s=r(6244),c=r(5117),u=r(1340),f=r(7293),l=r(4362),p=r(9341),d=r(8886),h=r(256),g=r(7392),m=r(8008),y=[],v=o(y.sort),b=o(y.push),w=f((function(){y.sort(void 0)})),x=f((function(){y.sort(null)})),S=p("sort"),_=!f((function(){if(g)return g<70;if(!(d&&d>3)){if(h)return!0;if(m)return m<603;var t,e,r,n,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)y.push({k:e+n,v:r})}for(y.sort((function(t,e){return e.v-t.v})),n=0;n<y.length;n++)e=y[n].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));n({target:"Array",proto:!0,forced:w||!x||!S||!_},{sort:function(t){void 0!==t&&i(t);var e=a(this);if(_)return void 0===t?v(e):v(e,t);var r,n,o=[],f=s(e);for(n=0;n<f;n++)n in e&&b(o,e[n]);for(l(o,function(t){return function(e,r){return void 0===r?-1:void 0===e?1:void 0!==t?+t(e,r)||0:u(e)>u(r)?1:-1}}(t)),r=s(o),n=0;n<r;)e[n]=o[n++];for(;n<f;)c(e,n++);return e}})},9244:(t,e,r)=>{r(1223)("flatMap")},3792:(t,e,r)=>{r(1223)("flat")},1874:(t,e,r)=>{var n=r(2109),o=r(2814);n({target:"Number",stat:!0,forced:Number.parseFloat!=o},{parseFloat:o})},9494:(t,e,r)=>{var n=r(2109),o=r(3009);n({target:"Number",stat:!0,forced:Number.parseInt!=o},{parseInt:o})},6977:(t,e,r)=>{"use strict";var n=r(2109),o=r(1702),i=r(9303),a=r(863),s=r(8415),c=r(7293),u=RangeError,f=String,l=Math.floor,p=o(s),d=o("".slice),h=o(1..toFixed),g=function(t,e,r){return 0===e?r:e%2==1?g(t,e-1,r*t):g(t*t,e/2,r)},m=function(t,e,r){for(var n=-1,o=r;++n<6;)o+=e*t[n],t[n]=o%1e7,o=l(o/1e7)},y=function(t,e){for(var r=6,n=0;--r>=0;)n+=t[r],t[r]=l(n/e),n=n%e*1e7},v=function(t){for(var e=6,r="";--e>=0;)if(""!==r||0===e||0!==t[e]){var n=f(t[e]);r=""===r?n:r+p("0",7-n.length)+n}return r};n({target:"Number",proto:!0,forced:c((function(){return"0.000"!==h(8e-5,3)||"1"!==h(.9,0)||"1.25"!==h(1.255,2)||"1000000000000000128"!==h(0xde0b6b3a7640080,0)}))||!c((function(){h({})}))},{toFixed:function(t){var e,r,n,o,s=a(this),c=i(t),l=[0,0,0,0,0,0],h="",b="0";if(c<0||c>20)throw u("Incorrect fraction digits");if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return f(s);if(s<0&&(h="-",s=-s),s>1e-21)if(r=(e=function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e}(s*g(2,69,1))-69)<0?s*g(2,-e,1):s/g(2,e,1),r*=4503599627370496,(e=52-e)>0){for(m(l,0,r),n=c;n>=7;)m(l,1e7,0),n-=7;for(m(l,g(10,n,1),0),n=e-1;n>=23;)y(l,1<<23),n-=23;y(l,1<<n),m(l,1,1),y(l,2),b=v(l)}else m(l,0,r),m(l,1<<-e,0),b=v(l)+p("0",c);return b=c>0?h+((o=b.length)<=c?"0."+p("0",c-o)+b:d(b,0,o-c)+"."+d(b,o-c)):h+b}})},9601:(t,e,r)=>{var n=r(2109),o=r(1574);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},8559:(t,e,r)=>{var n=r(2109),o=r(408),i=r(6135);n({target:"Object",stat:!0},{fromEntries:function(t){var e={};return o(t,(function(t,r){i(e,t,r)}),{AS_ENTRIES:!0}),e}})},4678:(t,e,r)=>{var n=r(2109),o=r(2814);n({global:!0,forced:parseFloat!=o},{parseFloat:o})},1058:(t,e,r)=>{var n=r(2109),o=r(3009);n({global:!0,forced:parseInt!=o},{parseInt:o})},821:(t,e,r)=>{"use strict";var n=r(2109),o=r(6916),i=r(9662),a=r(8523),s=r(2534),c=r(408);n({target:"Promise",stat:!0,forced:r(612)},{all:function(t){var e=this,r=a.f(e),n=r.resolve,u=r.reject,f=s((function(){var r=i(e.resolve),a=[],s=0,f=1;c(t,(function(t){var i=s++,c=!1;f++,o(r,e,t).then((function(t){c||(c=!0,a[i]=t,--f||n(a))}),u)})),--f||n(a)}));return f.error&&u(f.value),r.promise}})},4164:(t,e,r)=>{"use strict";var n=r(2109),o=r(1913),i=r(3702).CONSTRUCTOR,a=r(2492),s=r(5005),c=r(614),u=r(8052),f=a&&a.prototype;if(n({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(t){return this.then(void 0,t)}}),!o&&c(a)){var l=s("Promise").prototype.catch;f.catch!==l&&u(f,"catch",l,{unsafe:!0})}},3401:(t,e,r)=>{"use strict";var n,o,i,a=r(2109),s=r(1913),c=r(5268),u=r(7854),f=r(6916),l=r(8052),p=r(7674),d=r(8003),h=r(6340),g=r(9662),m=r(614),y=r(111),v=r(5787),b=r(6707),w=r(261).set,x=r(5948),S=r(842),_=r(2534),O=r(8572),E=r(9909),I=r(2492),A=r(3702),F=r(8523),j="Promise",P=A.CONSTRUCTOR,k=A.REJECTION_EVENT,T=A.SUBCLASSING,R=E.getterFor(j),B=E.set,D=I&&I.prototype,C=I,U=D,L=u.TypeError,N=u.document,M=u.process,$=F.f,q=$,J=!!(N&&N.createEvent&&u.dispatchEvent),z="unhandledrejection",H=function(t){var e;return!(!y(t)||!m(e=t.then))&&e},W=function(t,e){var r,n,o,i=e.value,a=1==e.state,s=a?t.ok:t.fail,c=t.resolve,u=t.reject,l=t.domain;try{s?(a||(2===e.rejection&&Y(e),e.rejection=1),!0===s?r=i:(l&&l.enter(),r=s(i),l&&(l.exit(),o=!0)),r===t.promise?u(L("Promise-chain cycle")):(n=H(r))?f(n,r,c,u):c(r)):u(i)}catch(t){l&&!o&&l.exit(),u(t)}},V=function(t,e){t.notified||(t.notified=!0,x((function(){for(var r,n=t.reactions;r=n.get();)W(r,t);t.notified=!1,e&&!t.rejection&&K(t)})))},G=function(t,e,r){var n,o;J?((n=N.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),u.dispatchEvent(n)):n={promise:e,reason:r},!k&&(o=u["on"+t])?o(n):t===z&&S("Unhandled promise rejection",r)},K=function(t){f(w,u,(function(){var e,r=t.facade,n=t.value;if(X(t)&&(e=_((function(){c?M.emit("unhandledRejection",n,r):G(z,r,n)})),t.rejection=c||X(t)?2:1,e.error))throw e.value}))},X=function(t){return 1!==t.rejection&&!t.parent},Y=function(t){f(w,u,(function(){var e=t.facade;c?M.emit("rejectionHandled",e):G("rejectionhandled",e,t.value)}))},Q=function(t,e,r){return function(n){t(e,n,r)}},Z=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,V(t,!0))},tt=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw L("Promise can\'t be resolved itself");var n=H(e);n?x((function(){var r={done:!1};try{f(n,e,Q(tt,r,t),Q(Z,r,t))}catch(e){Z(r,e,t)}})):(t.value=e,t.state=1,V(t,!1))}catch(e){Z({done:!1},e,t)}}};if(P&&(U=(C=function(t){v(this,U),g(t),f(n,this);var e=R(this);try{t(Q(tt,e),Q(Z,e))}catch(t){Z(e,t)}}).prototype,(n=function(t){B(this,{type:j,done:!1,notified:!1,parent:!1,reactions:new O,rejection:!1,state:0,value:void 0})}).prototype=l(U,"then",(function(t,e){var r=R(this),n=$(b(this,C));return r.parent=!0,n.ok=!m(t)||t,n.fail=m(e)&&e,n.domain=c?M.domain:void 0,0==r.state?r.reactions.add(n):x((function(){W(n,r)})),n.promise})),o=function(){var t=new n,e=R(t);this.promise=t,this.resolve=Q(tt,e),this.reject=Q(Z,e)},F.f=$=function(t){return t===C||undefined===t?new o(t):q(t)},!s&&m(I)&&D!==Object.prototype)){i=D.then,T||l(D,"then",(function(t,e){var r=this;return new C((function(t,e){f(i,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete D.constructor}catch(t){}p&&p(D,U)}a({global:!0,constructor:!0,wrap:!0,forced:P},{Promise:C}),d(C,j,!1,!0),h(j)},7727:(t,e,r)=>{"use strict";var n=r(2109),o=r(1913),i=r(2492),a=r(7293),s=r(5005),c=r(614),u=r(6707),f=r(9478),l=r(8052),p=i&&i.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){p.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=u(this,s("Promise")),r=c(t);return this.then(r?function(r){return f(e,t()).then((function(){return r}))}:t,r?function(r){return f(e,t()).then((function(){throw r}))}:t)}}),!o&&c(i)){var d=s("Promise").prototype.finally;p.finally!==d&&l(p,"finally",d,{unsafe:!0})}},8674:(t,e,r)=>{r(3401),r(821),r(4164),r(6027),r(683),r(6294)},6027:(t,e,r)=>{"use strict";var n=r(2109),o=r(6916),i=r(9662),a=r(8523),s=r(2534),c=r(408);n({target:"Promise",stat:!0,forced:r(612)},{race:function(t){var e=this,r=a.f(e),n=r.reject,u=s((function(){var a=i(e.resolve);c(t,(function(t){o(a,e,t).then(r.resolve,n)}))}));return u.error&&n(u.value),r.promise}})},683:(t,e,r)=>{"use strict";var n=r(2109),o=r(6916),i=r(8523);n({target:"Promise",stat:!0,forced:r(3702).CONSTRUCTOR},{reject:function(t){var e=i.f(this);return o(e.reject,void 0,t),e.promise}})},6294:(t,e,r)=>{"use strict";var n=r(2109),o=r(5005),i=r(1913),a=r(2492),s=r(3702).CONSTRUCTOR,c=r(9478),u=o("Promise"),f=i&&!s;n({target:"Promise",stat:!0,forced:i||s},{resolve:function(t){return c(f&&this===u?a:this,t)}})},3593:(t,e,r)=>{var n=r(2109),o=r(6916),i=r(9670),a=r(111),s=r(5032),c=r(7293),u=r(3070),f=r(1236),l=r(9518),p=r(9114);n({target:"Reflect",stat:!0,forced:c((function(){var t=function(){},e=u.f(new t,"a",{configurable:!0});return!1!==Reflect.set(t.prototype,"a",1,e)}))},{set:function t(e,r,n){var c,d,h,g=arguments.length<4?e:arguments[3],m=f.f(i(e),r);if(!m){if(a(d=l(e)))return t(d,r,n,g);m=p(0)}if(s(m)){if(!1===m.writable||!a(g))return!1;if(c=f.f(g,r)){if(c.get||c.set||!1===c.writable)return!1;c.value=n,u.f(g,r,c)}else u.f(g,r,p(0,n))}else{if(void 0===(h=m.set))return!1;o(h,g,n)}return!0}})},4603:(t,e,r)=>{var n=r(9781),o=r(7854),i=r(1702),a=r(4705),s=r(9587),c=r(8880),u=r(8006).f,f=r(7976),l=r(7850),p=r(1340),d=r(4706),h=r(2999),g=r(2626),m=r(8052),y=r(7293),v=r(2597),b=r(9909).enforce,w=r(6340),x=r(5112),S=r(9441),_=r(7168),O=x("match"),E=o.RegExp,I=E.prototype,A=o.SyntaxError,F=i(I.exec),j=i("".charAt),P=i("".replace),k=i("".indexOf),T=i("".slice),R=/^\\?<[^\\s\\d!#%&*+<=>@^][^\\s!#%&*+<=>@^]*>/,B=/a/g,D=/a/g,C=new E(B)!==B,U=h.MISSED_STICKY,L=h.UNSUPPORTED_Y,N=n&&(!C||U||S||_||y((function(){return D[O]=!1,E(B)!=B||E(D)==D||"/a/i"!=E(B,"i")})));if(a("RegExp",N)){for(var M=function(t,e){var r,n,o,i,a,u,h=f(I,this),g=l(t),m=void 0===e,y=[],w=t;if(!h&&g&&m&&t.constructor===M)return t;if((g||f(I,t))&&(t=t.source,m&&(e=d(w))),t=void 0===t?"":p(t),e=void 0===e?"":p(e),w=t,S&&"dotAll"in B&&(n=!!e&&k(e,"s")>-1)&&(e=P(e,/s/g,"")),r=e,U&&"sticky"in B&&(o=!!e&&k(e,"y")>-1)&&L&&(e=P(e,/y/g,"")),_&&(i=function(t){for(var e,r=t.length,n=0,o="",i=[],a={},s=!1,c=!1,u=0,f="";n<=r;n++){if("\\\\"===(e=j(t,n)))e+=j(t,++n);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:F(R,T(t,n+1))&&(n+=2,c=!0),o+=e,u++;continue;case">"===e&&c:if(""===f||v(a,f))throw new A("Invalid capture group name");a[f]=!0,i[i.length]=[f,u],c=!1,f="";continue}c?f+=e:o+=e}return[o,i]}(t),t=i[0],y=i[1]),a=s(E(t,e),h?this:I,M),(n||o||y.length)&&(u=b(a),n&&(u.dotAll=!0,u.raw=M(function(t){for(var e,r=t.length,n=0,o="",i=!1;n<=r;n++)"\\\\"!==(e=j(t,n))?i||"."!==e?("["===e?i=!0:"]"===e&&(i=!1),o+=e):o+="[\\\\s\\\\S]":o+=e+j(t,++n);return o}(t),r)),o&&(u.sticky=!0),y.length&&(u.groups=y)),t!==w)try{c(a,"source",""===w?"(?:)":w)}catch(t){}return a},$=u(E),q=0;$.length>q;)g(M,E,$[q++]);I.constructor=M,M.prototype=I,m(o,"RegExp",M,{constructor:!0})}w("RegExp")},4916:(t,e,r)=>{"use strict";var n=r(2109),o=r(2261);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},2087:(t,e,r)=>{var n=r(7854),o=r(9781),i=r(7045),a=r(7066),s=r(7293),c=n.RegExp,u=c.prototype;o&&s((function(){var t=!0;try{c(".","d")}catch(e){t=!1}var e={},r="",n=t?"dgimsy":"gimsy",o=function(t,n){Object.defineProperty(e,t,{get:function(){return r+=n,!0}})},i={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in t&&(i.hasIndices="d"),i)o(a,i[a]);return Object.getOwnPropertyDescriptor(u,"flags").get.call(e)!==n||r!==n}))&&i(u,"flags",{configurable:!0,get:a})},9714:(t,e,r)=>{"use strict";var n=r(6530).PROPER,o=r(8052),i=r(9670),a=r(1340),s=r(7293),c=r(4706),u="toString",f=RegExp.prototype.toString,l=s((function(){return"/a/b"!=f.call({source:"a",flags:"b"})})),p=n&&f.name!=u;(l||p)&&o(RegExp.prototype,u,(function(){var t=i(this);return"/"+a(t.source)+"/"+a(c(t))}),{unsafe:!0})},7852:(t,e,r)=>{"use strict";var n,o=r(2109),i=r(1470),a=r(1236).f,s=r(7466),c=r(1340),u=r(3929),f=r(4488),l=r(4964),p=r(1913),d=i("".endsWith),h=i("".slice),g=Math.min,m=l("endsWith");o({target:"String",proto:!0,forced:!!(p||m||(n=a(String.prototype,"endsWith"),!n||n.writable))&&!m},{endsWith:function(t){var e=c(f(this));u(t);var r=arguments.length>1?arguments[1]:void 0,n=e.length,o=void 0===r?n:g(s(r),n),i=c(t);return d?d(e,i,o):h(e,o-i.length,o)===i}})},2023:(t,e,r)=>{"use strict";var n=r(2109),o=r(1702),i=r(3929),a=r(4488),s=r(1340),c=r(4964),u=o("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(t){return!!~u(s(a(this)),s(i(t)),arguments.length>1?arguments[1]:void 0)}})},8783:(t,e,r)=>{"use strict";var n=r(8710).charAt,o=r(1340),i=r(9909),a=r(1656),s=r(6178),c="String Iterator",u=i.set,f=i.getterFor(c);a(String,"String",(function(t){u(this,{type:c,string:o(t),index:0})}),(function(){var t,e=f(this),r=e.string,o=e.index;return o>=r.length?s(void 0,!0):(t=n(r,o),e.index+=t.length,s(t,!1))}))},4723:(t,e,r)=>{"use strict";var n=r(6916),o=r(7007),i=r(9670),a=r(8554),s=r(7466),c=r(1340),u=r(4488),f=r(8173),l=r(1530),p=r(7651);o("match",(function(t,e,r){return[function(e){var r=u(this),o=a(e)?void 0:f(e,t);return o?n(o,e,r):new RegExp(e)[t](c(r))},function(t){var n=i(this),o=c(t),a=r(e,n,o);if(a.done)return a.value;if(!n.global)return p(n,o);var u=n.unicode;n.lastIndex=0;for(var f,d=[],h=0;null!==(f=p(n,o));){var g=c(f[0]);d[h]=g,""===g&&(n.lastIndex=l(o,s(n.lastIndex),u)),h++}return 0===h?null:d}]}))},5306:(t,e,r)=>{"use strict";var n=r(2104),o=r(6916),i=r(1702),a=r(7007),s=r(7293),c=r(9670),u=r(614),f=r(8554),l=r(9303),p=r(7466),d=r(1340),h=r(4488),g=r(1530),m=r(8173),y=r(647),v=r(7651),b=r(5112)("replace"),w=Math.max,x=Math.min,S=i([].concat),_=i([].push),O=i("".indexOf),E=i("".slice),I="$0"==="a".replace(/./,"$0"),A=!!/./[b]&&""===/./[b]("a","$0");a("replace",(function(t,e,r){var i=A?"$":"$0";return[function(t,r){var n=h(this),i=f(t)?void 0:m(t,b);return i?o(i,t,n,r):o(e,d(n),t,r)},function(t,o){var a=c(this),s=d(t);if("string"==typeof o&&-1===O(o,i)&&-1===O(o,"$<")){var f=r(e,a,s,o);if(f.done)return f.value}var h=u(o);h||(o=d(o));var m=a.global;if(m){var b=a.unicode;a.lastIndex=0}for(var I=[];;){var A=v(a,s);if(null===A)break;if(_(I,A),!m)break;""===d(A[0])&&(a.lastIndex=g(s,p(a.lastIndex),b))}for(var F,j="",P=0,k=0;k<I.length;k++){for(var T=d((A=I[k])[0]),R=w(x(l(A.index),s.length),0),B=[],D=1;D<A.length;D++)_(B,void 0===(F=A[D])?F:String(F));var C=A.groups;if(h){var U=S([T],B,R,s);void 0!==C&&_(U,C);var L=d(n(o,void 0,U))}else L=y(T,s,R,B,C,o);R>=P&&(j+=E(s,P,R)+L,P=R+T.length)}return j+E(s,P)}]}),!!s((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!I||A)},4765:(t,e,r)=>{"use strict";var n=r(6916),o=r(7007),i=r(9670),a=r(8554),s=r(4488),c=r(1150),u=r(1340),f=r(8173),l=r(7651);o("search",(function(t,e,r){return[function(e){var r=s(this),o=a(e)?void 0:f(e,t);return o?n(o,e,r):new RegExp(e)[t](u(r))},function(t){var n=i(this),o=u(t),a=r(e,n,o);if(a.done)return a.value;var s=n.lastIndex;c(s,0)||(n.lastIndex=0);var f=l(n,o);return c(n.lastIndex,s)||(n.lastIndex=s),null===f?-1:f.index}]}))},3123:(t,e,r)=>{"use strict";var n=r(2104),o=r(6916),i=r(1702),a=r(7007),s=r(9670),c=r(8554),u=r(7850),f=r(4488),l=r(6707),p=r(1530),d=r(7466),h=r(1340),g=r(8173),m=r(1589),y=r(7651),v=r(2261),b=r(2999),w=r(7293),x=b.UNSUPPORTED_Y,S=4294967295,_=Math.min,O=[].push,E=i(/./.exec),I=i(O),A=i("".slice);a("split",(function(t,e,r){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var i=h(f(this)),a=void 0===r?S:r>>>0;if(0===a)return[];if(void 0===t)return[i];if(!u(t))return o(e,i,t,a);for(var s,c,l,p=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),g=0,y=new RegExp(t.source,d+"g");(s=o(v,y,i))&&!((c=y.lastIndex)>g&&(I(p,A(i,g,s.index)),s.length>1&&s.index<i.length&&n(O,p,m(s,1)),l=s[0].length,g=c,p.length>=a));)y.lastIndex===s.index&&y.lastIndex++;return g===i.length?!l&&E(y,"")||I(p,""):I(p,A(i,g)),p.length>a?m(p,0,a):p}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:o(e,this,t,r)}:e,[function(e,r){var n=f(this),a=c(e)?void 0:g(e,t);return a?o(a,e,n,r):o(i,h(n),e,r)},function(t,n){var o=s(this),a=h(t),c=r(i,o,a,n,i!==e);if(c.done)return c.value;var u=l(o,RegExp),f=o.unicode,g=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(x?"g":"y"),m=new u(x?"^(?:"+o.source+")":o,g),v=void 0===n?S:n>>>0;if(0===v)return[];if(0===a.length)return null===y(m,a)?[a]:[];for(var b=0,w=0,O=[];w<a.length;){m.lastIndex=x?0:w;var E,F=y(m,x?A(a,w):a);if(null===F||(E=_(d(m.lastIndex+(x?w:0)),a.length))===b)w=p(a,w,f);else{if(I(O,A(a,b,w)),O.length===v)return O;for(var j=1;j<=F.length-1;j++)if(I(O,F[j]),O.length===v)return O;w=b=E}}return I(O,A(a,b)),O}]}),!!w((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),x)},6755:(t,e,r)=>{"use strict";var n,o=r(2109),i=r(1470),a=r(1236).f,s=r(7466),c=r(1340),u=r(3929),f=r(4488),l=r(4964),p=r(1913),d=i("".startsWith),h=i("".slice),g=Math.min,m=l("startsWith");o({target:"String",proto:!0,forced:!!(p||m||(n=a(String.prototype,"startsWith"),!n||n.writable))&&!m},{startsWith:function(t){var e=c(f(this));u(t);var r=s(g(arguments.length>1?arguments[1]:void 0,e.length)),n=c(t);return d?d(e,n,r):h(e,r,r+n.length)===n}})},8702:(t,e,r)=>{r(3462);var n=r(2109),o=r(365);n({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==o},{trimEnd:o})},9967:(t,e,r)=>{var n=r(2109),o=r(3217);n({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==o},{trimLeft:o})},3462:(t,e,r)=>{var n=r(2109),o=r(365);n({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==o},{trimRight:o})},5674:(t,e,r)=>{r(9967);var n=r(2109),o=r(3217);n({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==o},{trimStart:o})},2443:(t,e,r)=>{r(6800)("asyncIterator")},1817:(t,e,r)=>{"use strict";var n=r(2109),o=r(9781),i=r(7854),a=r(1702),s=r(2597),c=r(614),u=r(7976),f=r(1340),l=r(3070).f,p=r(9920),d=i.Symbol,h=d&&d.prototype;if(o&&c(d)&&(!("description"in h)||void 0!==d().description)){var g={},m=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:f(arguments[0]),e=u(h,this)?new d(t):void 0===t?d():d(t);return""===t&&(g[e]=!0),e};p(m,d),m.prototype=h,h.constructor=m;var y="Symbol(test)"==String(d("test")),v=a(h.valueOf),b=a(h.toString),w=/^Symbol\\((.*)\\)[^)]+$/,x=a("".replace),S=a("".slice);l(h,"description",{configurable:!0,get:function(){var t=v(this);if(s(g,t))return"";var e=b(t),r=y?S(e,7,-1):x(e,w,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:m})}},9007:(t,e,r)=>{r(6800)("match")},3510:(t,e,r)=>{r(6800)("replace")},1840:(t,e,r)=>{r(6800)("search")},2159:(t,e,r)=>{r(6800)("split")},3105:(t,e,r)=>{"use strict";var n=r(260),o=r(1285),i=r(4599),a=r(648),s=r(6916),c=r(1702),u=r(7293),f=n.aTypedArray,l=n.exportTypedArrayMethod,p=c("".slice);l("fill",(function(t){var e=arguments.length;f(this);var r="Big"===p(a(this),0,3)?i(t):+t;return s(o,this,r,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),u((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t})))},4141:(t,e,r)=>{"use strict";var n=r(7854),o=r(6916),i=r(260),a=r(6244),s=r(4590),c=r(7908),u=r(7293),f=n.RangeError,l=n.Int8Array,p=l&&l.prototype,d=p&&p.set,h=i.aTypedArray,g=i.exportTypedArrayMethod,m=!u((function(){var t=new Uint8ClampedArray(2);return o(d,t,{length:1,0:3},1),3!==t[1]})),y=m&&i.NATIVE_ARRAY_BUFFER_VIEWS&&u((function(){var t=new l(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));g("set",(function(t){h(this);var e=s(arguments.length>1?arguments[1]:void 0,1),r=c(t);if(m)return o(d,this,r,e);var n=this.length,i=a(r),u=0;if(i+e>n)throw f("Wrong length");for(;u<i;)this[e+u]=r[u++]}),!m||y)},3824:(t,e,r)=>{"use strict";var n=r(7854),o=r(1470),i=r(7293),a=r(9662),s=r(4362),c=r(260),u=r(8886),f=r(256),l=r(7392),p=r(8008),d=c.aTypedArray,h=c.exportTypedArrayMethod,g=n.Uint16Array,m=g&&o(g.prototype.sort),y=!(!m||i((function(){m(new g(2),null)}))&&i((function(){m(new g(2),{})}))),v=!!m&&!i((function(){if(l)return l<74;if(u)return u<67;if(f)return!0;if(p)return p<602;var t,e,r=new g(516),n=Array(516);for(t=0;t<516;t++)e=t%4,r[t]=515-t,n[t]=t-2*e+3;for(m(r,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(r[t]!==n[t])return!0}));h("sort",(function(t){return void 0!==t&&a(t),v?m(this,t):s(d(this),function(t){return function(e,r){return void 0!==t?+t(e,r)||0:r!=r?-1:e!=e?1:0===e&&0===r?1/e>0&&1/r<0?1:-1:e>r}}(t))}),!v||y)},2974:(t,e,r)=>{"use strict";var n=r(7854),o=r(2104),i=r(260),a=r(7293),s=r(206),c=n.Int8Array,u=i.aTypedArray,f=i.exportTypedArrayMethod,l=[].toLocaleString,p=!!c&&a((function(){l.call(new c(1))}));f("toLocaleString",(function(){return o(l,p?s(u(this)):u(this),s(arguments))}),a((function(){return[1,2].toLocaleString()!=new c([1,2]).toLocaleString()}))||!a((function(){c.prototype.toLocaleString.call([1,2])})))},1202:(t,e,r)=>{"use strict";var n,o=r(6677),i=r(7854),a=r(1702),s=r(9190),c=r(2423),u=r(7710),f=r(9320),l=r(111),p=r(9909).enforce,d=r(7293),h=r(4811),g=Object,m=Array.isArray,y=g.isExtensible,v=g.isFrozen,b=g.isSealed,w=g.freeze,x=g.seal,S={},_={},O=!i.ActiveXObject&&"ActiveXObject"in i,E=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},I=u("WeakMap",E,f),A=I.prototype,F=a(A.set);if(h)if(O){n=f.getConstructor(E,"WeakMap",!0),c.enable();var j=a(A.delete),P=a(A.has),k=a(A.get);s(A,{delete:function(t){if(l(t)&&!y(t)){var e=p(this);return e.frozen||(e.frozen=new n),j(this,t)||e.frozen.delete(t)}return j(this,t)},has:function(t){if(l(t)&&!y(t)){var e=p(this);return e.frozen||(e.frozen=new n),P(this,t)||e.frozen.has(t)}return P(this,t)},get:function(t){if(l(t)&&!y(t)){var e=p(this);return e.frozen||(e.frozen=new n),P(this,t)?k(this,t):e.frozen.get(t)}return k(this,t)},set:function(t,e){if(l(t)&&!y(t)){var r=p(this);r.frozen||(r.frozen=new n),P(this,t)?F(this,t,e):r.frozen.set(t,e)}else F(this,t,e);return this}})}else o&&d((function(){var t=w([]);return F(new I,t,1),!v(t)}))&&s(A,{set:function(t,e){var r;return m(t)&&(v(t)?r=S:b(t)&&(r=_)),F(this,t,e),r==S&&w(t),r==_&&x(t),this}})},4129:(t,e,r)=>{r(1202)},1091:(t,e,r)=>{var n=r(2109),o=r(7854),i=r(261).clear;n({global:!0,bind:!0,enumerable:!0,forced:o.clearImmediate!==i},{clearImmediate:i})},3948:(t,e,r)=>{var n=r(7854),o=r(8324),i=r(8509),a=r(6992),s=r(8880),c=r(5112),u=c("iterator"),f=c("toStringTag"),l=a.values,p=function(t,e){if(t){if(t[u]!==l)try{s(t,u,l)}catch(e){t[u]=l}if(t[f]||s(t,f,e),o[e])for(var r in a)if(t[r]!==a[r])try{s(t,r,a[r])}catch(e){t[r]=a[r]}}};for(var d in o)p(n[d]&&n[d].prototype,d);p(i,"DOMTokenList")},4633:(t,e,r)=>{r(1091),r(2986)},5844:(t,e,r)=>{var n=r(2109),o=r(7854),i=r(5948),a=r(9662),s=r(8053),c=r(5268),u=o.process;n({global:!0,enumerable:!0,dontCallGetSet:!0},{queueMicrotask:function(t){s(arguments.length,1),a(t);var e=c&&u.domain;i(e?e.bind(t):t)}})},2986:(t,e,r)=>{var n=r(2109),o=r(7854),i=r(261).set,a=r(7152),s=o.setImmediate?a(i,!1):i;n({global:!0,bind:!0,enumerable:!0,forced:o.setImmediate!==s},{setImmediate:s})},5556:(t,e,r)=>{"use strict";r(6992);var n=r(2109),o=r(7854),i=r(6916),a=r(1702),s=r(9781),c=r(5143),u=r(8052),f=r(9190),l=r(8003),p=r(3061),d=r(9909),h=r(5787),g=r(614),m=r(2597),y=r(9974),v=r(648),b=r(9670),w=r(111),x=r(1340),S=r(30),_=r(9114),O=r(4121),E=r(1246),I=r(8053),A=r(5112),F=r(4362),j=A("iterator"),P="URLSearchParams",k="URLSearchParamsIterator",T=d.set,R=d.getterFor(P),B=d.getterFor(k),D=Object.getOwnPropertyDescriptor,C=function(t){if(!s)return o[t];var e=D(o,t);return e&&e.value},U=C("fetch"),L=C("Request"),N=C("Headers"),M=L&&L.prototype,$=N&&N.prototype,q=o.RegExp,J=o.TypeError,z=o.decodeURIComponent,H=o.encodeURIComponent,W=a("".charAt),V=a([].join),G=a([].push),K=a("".replace),X=a([].shift),Y=a([].splice),Q=a("".split),Z=a("".slice),tt=/\\+/g,et=Array(4),rt=function(t){return et[t-1]||(et[t-1]=q("((?:%[\\\\da-f]{2}){"+t+"})","gi"))},nt=function(t){try{return z(t)}catch(e){return t}},ot=function(t){var e=K(t,tt," "),r=4;try{return z(e)}catch(t){for(;r;)e=K(e,rt(r--),nt);return e}},it=/[!\'()~]|%20/g,at={"!":"%21","\'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},st=function(t){return at[t]},ct=function(t){return K(H(t),it,st)},ut=p((function(t,e){T(this,{type:k,iterator:O(R(t).entries),kind:e})}),"Iterator",(function(){var t=B(this),e=t.kind,r=t.iterator.next(),n=r.value;return r.done||(r.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),r}),!0),ft=function(t){this.entries=[],this.url=null,void 0!==t&&(w(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===W(t,0)?Z(t,1):t:x(t)))};ft.prototype={type:P,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,o,a,s,c,u=E(t);if(u)for(r=(e=O(t,u)).next;!(n=i(r,e)).done;){if(a=(o=O(b(n.value))).next,(s=i(a,o)).done||(c=i(a,o)).done||!i(a,o).done)throw J("Expected sequence with length 2");G(this.entries,{key:x(s.value),value:x(c.value)})}else for(var f in t)m(t,f)&&G(this.entries,{key:f,value:x(t[f])})},parseQuery:function(t){if(t)for(var e,r,n=Q(t,"&"),o=0;o<n.length;)(e=n[o++]).length&&(r=Q(e,"="),G(this.entries,{key:ot(X(r)),value:ot(V(r,"="))}))},serialize:function(){for(var t,e=this.entries,r=[],n=0;n<e.length;)t=e[n++],G(r,ct(t.key)+"="+ct(t.value));return V(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var lt=function(){h(this,pt);var t=arguments.length>0?arguments[0]:void 0;T(this,new ft(t))},pt=lt.prototype;if(f(pt,{append:function(t,e){I(arguments.length,2);var r=R(this);G(r.entries,{key:x(t),value:x(e)}),r.updateURL()},delete:function(t){I(arguments.length,1);for(var e=R(this),r=e.entries,n=x(t),o=0;o<r.length;)r[o].key===n?Y(r,o,1):o++;e.updateURL()},get:function(t){I(arguments.length,1);for(var e=R(this).entries,r=x(t),n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){I(arguments.length,1);for(var e=R(this).entries,r=x(t),n=[],o=0;o<e.length;o++)e[o].key===r&&G(n,e[o].value);return n},has:function(t){I(arguments.length,1);for(var e=R(this).entries,r=x(t),n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function(t,e){I(arguments.length,1);for(var r,n=R(this),o=n.entries,i=!1,a=x(t),s=x(e),c=0;c<o.length;c++)(r=o[c]).key===a&&(i?Y(o,c--,1):(i=!0,r.value=s));i||G(o,{key:a,value:s}),n.updateURL()},sort:function(){var t=R(this);F(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,r=R(this).entries,n=y(t,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((e=r[o++]).value,e.key,this)},keys:function(){return new ut(this,"keys")},values:function(){return new ut(this,"values")},entries:function(){return new ut(this,"entries")}},{enumerable:!0}),u(pt,j,pt.entries,{name:"entries"}),u(pt,"toString",(function(){return R(this).serialize()}),{enumerable:!0}),l(lt,P),n({global:!0,constructor:!0,forced:!c},{URLSearchParams:lt}),!c&&g(N)){var dt=a($.has),ht=a($.set),gt=function(t){if(w(t)){var e,r=t.body;if(v(r)===P)return e=t.headers?new N(t.headers):new N,dt(e,"content-type")||ht(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),S(t,{body:_(0,x(r)),headers:_(0,e)})}return t};if(g(U)&&n({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return U(t,arguments.length>1?gt(arguments[1]):{})}}),g(L)){var mt=function(t){return h(this,M),new L(t,arguments.length>1?gt(arguments[1]):{})};M.constructor=mt,mt.prototype=M,n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:mt})}}t.exports={URLSearchParams:lt,getState:R}},1637:(t,e,r)=>{r(5556)},8789:(t,e,r)=>{"use strict";r(8783);var n,o=r(2109),i=r(9781),a=r(5143),s=r(7854),c=r(9974),u=r(1702),f=r(8052),l=r(7045),p=r(5787),d=r(2597),h=r(1574),g=r(8457),m=r(1589),y=r(8710).codeAt,v=r(3197),b=r(1340),w=r(8003),x=r(8053),S=r(5556),_=r(9909),O=_.set,E=_.getterFor("URL"),I=S.URLSearchParams,A=S.getState,F=s.URL,j=s.TypeError,P=s.parseInt,k=Math.floor,T=Math.pow,R=u("".charAt),B=u(/./.exec),D=u([].join),C=u(1..toString),U=u([].pop),L=u([].push),N=u("".replace),M=u([].shift),$=u("".split),q=u("".slice),J=u("".toLowerCase),z=u([].unshift),H="Invalid scheme",W="Invalid host",V="Invalid port",G=/[a-z]/i,K=/[\\d+-.a-z]/i,X=/\\d/,Y=/^0x/i,Q=/^[0-7]+$/,Z=/^\\d+$/,tt=/^[\\da-f]+$/i,et=/[\\0\\t\\n\\r #%/:<>?@[\\\\\\]^|]/,rt=/[\\0\\t\\n\\r #/:<>?@[\\\\\\]^|]/,nt=/^[\\u0000-\\u0020]+|[\\u0000-\\u0020]+$/g,ot=/[\\t\\n\\r]/g,it=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)z(e,t%256),t=k(t/256);return D(e,".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,o=0,i=0;i<8;i++)0!==t[i]?(o>r&&(e=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(e=n,r=o),e}(t),r=0;r<8;r++)o&&0===t[r]||(o&&(o=!1),n===r?(e+=r?":":"::",o=!0):(e+=C(t[r],16),r<7&&(e+=":")));return"["+e+"]"}return t},at={},st=h({},at,{" ":1,\'"\':1,"<":1,">":1,"`":1}),ct=h({},st,{"#":1,"?":1,"{":1,"}":1}),ut=h({},ct,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\\\":1,"]":1,"^":1,"|":1}),ft=function(t,e){var r=y(t,0);return r>32&&r<127&&!d(e,t)?t:encodeURIComponent(t)},lt={ftp:21,file:null,http:80,https:443,ws:80,wss:443},pt=function(t,e){var r;return 2==t.length&&B(G,R(t,0))&&(":"==(r=R(t,1))||!e&&"|"==r)},dt=function(t){var e;return t.length>1&&pt(q(t,0,2))&&(2==t.length||"/"===(e=R(t,2))||"\\\\"===e||"?"===e||"#"===e)},ht=function(t){return"."===t||"%2e"===J(t)},gt={},mt={},yt={},vt={},bt={},wt={},xt={},St={},_t={},Ot={},Et={},It={},At={},Ft={},jt={},Pt={},kt={},Tt={},Rt={},Bt={},Dt={},Ct=function(t,e,r){var n,o,i,a=b(t);if(e){if(o=this.parse(a))throw j(o);this.searchParams=null}else{if(void 0!==r&&(n=new Ct(r,!0)),o=this.parse(a,null,n))throw j(o);(i=A(new I)).bindURL(this),this.searchParams=i}};Ct.prototype={type:"URL",parse:function(t,e,r){var o,i,a,s,c,u=this,f=e||gt,l=0,p="",h=!1,y=!1,v=!1;for(t=b(t),e||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,t=N(t,nt,"")),t=N(t,ot,""),o=g(t);l<=o.length;){switch(i=o[l],f){case gt:if(!i||!B(G,i)){if(e)return H;f=yt;continue}p+=J(i),f=mt;break;case mt:if(i&&(B(K,i)||"+"==i||"-"==i||"."==i))p+=J(i);else{if(":"!=i){if(e)return H;p="",f=yt,l=0;continue}if(e&&(u.isSpecial()!=d(lt,p)||"file"==p&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=p,e)return void(u.isSpecial()&&lt[u.scheme]==u.port&&(u.port=null));p="","file"==u.scheme?f=Ft:u.isSpecial()&&r&&r.scheme==u.scheme?f=vt:u.isSpecial()?f=St:"/"==o[l+1]?(f=bt,l++):(u.cannotBeABaseURL=!0,L(u.path,""),f=Rt)}break;case yt:if(!r||r.cannotBeABaseURL&&"#"!=i)return H;if(r.cannotBeABaseURL&&"#"==i){u.scheme=r.scheme,u.path=m(r.path),u.query=r.query,u.fragment="",u.cannotBeABaseURL=!0,f=Dt;break}f="file"==r.scheme?Ft:wt;continue;case vt:if("/"!=i||"/"!=o[l+1]){f=wt;continue}f=_t,l++;break;case bt:if("/"==i){f=Ot;break}f=Tt;continue;case wt:if(u.scheme=r.scheme,i==n)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=m(r.path),u.query=r.query;else if("/"==i||"\\\\"==i&&u.isSpecial())f=xt;else if("?"==i)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=m(r.path),u.query="",f=Bt;else{if("#"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=m(r.path),u.path.length--,f=Tt;continue}u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=m(r.path),u.query=r.query,u.fragment="",f=Dt}break;case xt:if(!u.isSpecial()||"/"!=i&&"\\\\"!=i){if("/"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,f=Tt;continue}f=Ot}else f=_t;break;case St:if(f=_t,"/"!=i||"/"!=R(p,l+1))continue;l++;break;case _t:if("/"!=i&&"\\\\"!=i){f=Ot;continue}break;case Ot:if("@"==i){h&&(p="%40"+p),h=!0,a=g(p);for(var w=0;w<a.length;w++){var x=a[w];if(":"!=x||v){var S=ft(x,ut);v?u.password+=S:u.username+=S}else v=!0}p=""}else if(i==n||"/"==i||"?"==i||"#"==i||"\\\\"==i&&u.isSpecial()){if(h&&""==p)return"Invalid authority";l-=g(p).length+1,p="",f=Et}else p+=i;break;case Et:case It:if(e&&"file"==u.scheme){f=Pt;continue}if(":"!=i||y){if(i==n||"/"==i||"?"==i||"#"==i||"\\\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==p)return W;if(e&&""==p&&(u.includesCredentials()||null!==u.port))return;if(s=u.parseHost(p))return s;if(p="",f=kt,e)return;continue}"["==i?y=!0:"]"==i&&(y=!1),p+=i}else{if(""==p)return W;if(s=u.parseHost(p))return s;if(p="",f=At,e==It)return}break;case At:if(!B(X,i)){if(i==n||"/"==i||"?"==i||"#"==i||"\\\\"==i&&u.isSpecial()||e){if(""!=p){var _=P(p,10);if(_>65535)return V;u.port=u.isSpecial()&&_===lt[u.scheme]?null:_,p=""}if(e)return;f=kt;continue}return V}p+=i;break;case Ft:if(u.scheme="file","/"==i||"\\\\"==i)f=jt;else{if(!r||"file"!=r.scheme){f=Tt;continue}if(i==n)u.host=r.host,u.path=m(r.path),u.query=r.query;else if("?"==i)u.host=r.host,u.path=m(r.path),u.query="",f=Bt;else{if("#"!=i){dt(D(m(o,l),""))||(u.host=r.host,u.path=m(r.path),u.shortenPath()),f=Tt;continue}u.host=r.host,u.path=m(r.path),u.query=r.query,u.fragment="",f=Dt}}break;case jt:if("/"==i||"\\\\"==i){f=Pt;break}r&&"file"==r.scheme&&!dt(D(m(o,l),""))&&(pt(r.path[0],!0)?L(u.path,r.path[0]):u.host=r.host),f=Tt;continue;case Pt:if(i==n||"/"==i||"\\\\"==i||"?"==i||"#"==i){if(!e&&pt(p))f=Tt;else if(""==p){if(u.host="",e)return;f=kt}else{if(s=u.parseHost(p))return s;if("localhost"==u.host&&(u.host=""),e)return;p="",f=kt}continue}p+=i;break;case kt:if(u.isSpecial()){if(f=Tt,"/"!=i&&"\\\\"!=i)continue}else if(e||"?"!=i)if(e||"#"!=i){if(i!=n&&(f=Tt,"/"!=i))continue}else u.fragment="",f=Dt;else u.query="",f=Bt;break;case Tt:if(i==n||"/"==i||"\\\\"==i&&u.isSpecial()||!e&&("?"==i||"#"==i)){if(".."===(c=J(c=p))||"%2e."===c||".%2e"===c||"%2e%2e"===c?(u.shortenPath(),"/"==i||"\\\\"==i&&u.isSpecial()||L(u.path,"")):ht(p)?"/"==i||"\\\\"==i&&u.isSpecial()||L(u.path,""):("file"==u.scheme&&!u.path.length&&pt(p)&&(u.host&&(u.host=""),p=R(p,0)+":"),L(u.path,p)),p="","file"==u.scheme&&(i==n||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)M(u.path);"?"==i?(u.query="",f=Bt):"#"==i&&(u.fragment="",f=Dt)}else p+=ft(i,ct);break;case Rt:"?"==i?(u.query="",f=Bt):"#"==i?(u.fragment="",f=Dt):i!=n&&(u.path[0]+=ft(i,at));break;case Bt:e||"#"!=i?i!=n&&("\'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":ft(i,at)):(u.fragment="",f=Dt);break;case Dt:i!=n&&(u.fragment+=ft(i,st))}l++}},parseHost:function(t){var e,r,n;if("["==R(t,0)){if("]"!=R(t,t.length-1))return W;if(e=function(t){var e,r,n,o,i,a,s,c=[0,0,0,0,0,0,0,0],u=0,f=null,l=0,p=function(){return R(t,l)};if(":"==p()){if(":"!=R(t,1))return;l+=2,f=++u}for(;p();){if(8==u)return;if(":"!=p()){for(e=r=0;r<4&&B(tt,p());)e=16*e+P(p(),16),l++,r++;if("."==p()){if(0==r)return;if(l-=r,u>6)return;for(n=0;p();){if(o=null,n>0){if(!("."==p()&&n<4))return;l++}if(!B(X,p()))return;for(;B(X,p());){if(i=P(p(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;l++}c[u]=256*c[u]+o,2!=++n&&4!=n||u++}if(4!=n)return;break}if(":"==p()){if(l++,!p())return}else if(p())return;c[u++]=e}else{if(null!==f)return;l++,f=++u}}if(null!==f)for(a=u-f,u=7;0!=u&&a>0;)s=c[u],c[u--]=c[f+a-1],c[f+--a]=s;else if(8!=u)return;return c}(q(t,1,-1)),!e)return W;this.host=e}else if(this.isSpecial()){if(t=v(t),B(et,t))return W;if(e=function(t){var e,r,n,o,i,a,s,c=$(t,".");if(c.length&&""==c[c.length-1]&&c.length--,(e=c.length)>4)return t;for(r=[],n=0;n<e;n++){if(""==(o=c[n]))return t;if(i=10,o.length>1&&"0"==R(o,0)&&(i=B(Y,o)?16:8,o=q(o,8==i?1:2)),""===o)a=0;else{if(!B(10==i?Z:8==i?Q:tt,o))return t;a=P(o,i)}L(r,a)}for(n=0;n<e;n++)if(a=r[n],n==e-1){if(a>=T(256,5-e))return null}else if(a>255)return null;for(s=U(r),n=0;n<r.length;n++)s+=r[n]*T(256,3-n);return s}(t),null===e)return W;this.host=e}else{if(B(rt,t))return W;for(e="",r=g(t),n=0;n<r.length;n++)e+=ft(r[n],at);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return d(lt,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"==this.scheme&&1==e&&pt(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,r=t.username,n=t.password,o=t.host,i=t.port,a=t.path,s=t.query,c=t.fragment,u=e+":";return null!==o?(u+="//",t.includesCredentials()&&(u+=r+(n?":"+n:"")+"@"),u+=it(o),null!==i&&(u+=":"+i)):"file"==e&&(u+="//"),u+=t.cannotBeABaseURL?a[0]:a.length?"/"+D(a,"/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},setHref:function(t){var e=this.parse(t);if(e)throw j(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"==t)try{return new Ut(t.path[0]).origin}catch(t){return"null"}return"file"!=t&&this.isSpecial()?t+"://"+it(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(b(t)+":",gt)},getUsername:function(){return this.username},setUsername:function(t){var e=g(b(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<e.length;r++)this.username+=ft(e[r],ut)}},getPassword:function(){return this.password},setPassword:function(t){var e=g(b(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<e.length;r++)this.password+=ft(e[r],ut)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?it(t):it(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,Et)},getHostname:function(){var t=this.host;return null===t?"":it(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,It)},getPort:function(){var t=this.port;return null===t?"":b(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""==(t=b(t))?this.port=null:this.parse(t,At))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+D(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,kt))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){""==(t=b(t))?this.query=null:("?"==R(t,0)&&(t=q(t,1)),this.query="",this.parse(t,Bt)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){""!=(t=b(t))?("#"==R(t,0)&&(t=q(t,1)),this.fragment="",this.parse(t,Dt)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Ut=function(t){var e=p(this,Lt),r=x(arguments.length,1)>1?arguments[1]:void 0,n=O(e,new Ct(t,!1,r));i||(e.href=n.serialize(),e.origin=n.getOrigin(),e.protocol=n.getProtocol(),e.username=n.getUsername(),e.password=n.getPassword(),e.host=n.getHost(),e.hostname=n.getHostname(),e.port=n.getPort(),e.pathname=n.getPathname(),e.search=n.getSearch(),e.searchParams=n.getSearchParams(),e.hash=n.getHash())},Lt=Ut.prototype,Nt=function(t,e){return{get:function(){return E(this)[t]()},set:e&&function(t){return E(this)[e](t)},configurable:!0,enumerable:!0}};if(i&&(l(Lt,"href",Nt("serialize","setHref")),l(Lt,"origin",Nt("getOrigin")),l(Lt,"protocol",Nt("getProtocol","setProtocol")),l(Lt,"username",Nt("getUsername","setUsername")),l(Lt,"password",Nt("getPassword","setPassword")),l(Lt,"host",Nt("getHost","setHost")),l(Lt,"hostname",Nt("getHostname","setHostname")),l(Lt,"port",Nt("getPort","setPort")),l(Lt,"pathname",Nt("getPathname","setPathname")),l(Lt,"search",Nt("getSearch","setSearch")),l(Lt,"searchParams",Nt("getSearchParams")),l(Lt,"hash",Nt("getHash","setHash"))),f(Lt,"toJSON",(function(){return E(this).serialize()}),{enumerable:!0}),f(Lt,"toString",(function(){return E(this).serialize()}),{enumerable:!0}),F){var Mt=F.createObjectURL,$t=F.revokeObjectURL;Mt&&f(Ut,"createObjectURL",c(Mt,F)),$t&&f(Ut,"revokeObjectURL",c($t,F))}w(Ut,"URL"),o({global:!0,constructor:!0,forced:!a,sham:!i},{URL:Ut})},285:(t,e,r)=>{r(8789)},3753:(t,e,r)=>{"use strict";var n=r(2109),o=r(6916);n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return o(URL.prototype.toString,this)}})},4301:(t,e,r)=>{r(7147),t.exports=self.fetch.bind(self)},6656:()=>{},7147:(t,e,r)=>{"use strict";r.r(e),r.d(e,{DOMException:()=>E,Headers:()=>h,Request:()=>x,Response:()=>_,fetch:()=>I});var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==n&&n,o="URLSearchParams"in n,i="Symbol"in n&&"iterator"in Symbol,a="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(t){return!1}}(),s="FormData"in n,c="ArrayBuffer"in n;if(c)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(t){return t&&u.indexOf(Object.prototype.toString.call(t))>-1};function l(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\\-#$%&\'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError(\'Invalid character in header field name: "\'+t+\'"\');return t.toLowerCase()}function p(t){return"string"!=typeof t&&(t=String(t)),t}function d(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return i&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function g(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function m(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function y(t){var e=new FileReader,r=m(e);return e.readAsArrayBuffer(t),r}function v(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:a&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:s&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:o&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():c&&a&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=v(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(t)||f(t))?this._bodyArrayBuffer=v(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var t=g(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var t=g(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(y)}),this.text=function(){var t,e,r,n=g(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=m(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(S)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(t,e){t=l(t),e=p(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},h.prototype.delete=function(t){delete this.map[l(t)]},h.prototype.get=function(t){return t=l(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(l(t))},h.prototype.set=function(t,e){this.map[l(t)]=p(e)},h.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},h.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),d(t)},h.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),d(t)},h.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),d(t)},i&&(h.prototype[Symbol.iterator]=h.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function x(t,e){if(!(this instanceof x))throw new TypeError(\'Please use the "new" operator, this DOM object constructor cannot be called as a function.\');var r,n,o=(e=e||{}).body;if(t instanceof x){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new h(e.headers)),this.method=(r=e.method||this.method||"GET",n=r.toUpperCase(),w.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function S(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\\+/g," "),o=r.join("=").replace(/\\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}})),e}function _(t,e){if(!(this instanceof _))throw new TypeError(\'Please use the "new" operator, this DOM object constructor cannot be called as a function.\');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}x.prototype.clone=function(){return new x(this,{body:this._bodyInit})},b.call(x.prototype),b.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},_.error=function(){var t=new _(null,{status:0,statusText:""});return t.type="error",t};var O=[301,302,303,307,308];_.redirect=function(t,e){if(-1===O.indexOf(e))throw new RangeError("Invalid status code");return new _(null,{status:e,headers:{location:t}})};var E=n.DOMException;try{new E}catch(t){(E=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack}).prototype=Object.create(Error.prototype),E.prototype.constructor=E}function I(t,e){return new Promise((function(r,o){var i=new x(t,e);if(i.signal&&i.signal.aborted)return o(new E("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var t,e,n={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new h,t.replace(/\\r?\\n[\\t ]+/g," ").split("\\r").map((function(t){return 0===t.indexOf("\\n")?t.substr(1,t.length):t})).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}})),e)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;setTimeout((function(){r(new _(o,n))}),0)},s.onerror=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},s.ontimeout=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},s.onabort=function(){setTimeout((function(){o(new E("Aborted","AbortError"))}),0)},s.open(i.method,function(t){try{return""===t&&n.location.href?n.location.href:t}catch(e){return t}}(i.url),!0),"include"===i.credentials?s.withCredentials=!0:"omit"===i.credentials&&(s.withCredentials=!1),"responseType"in s&&(a?s.responseType="blob":c&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(s.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof h?i.headers.forEach((function(t,e){s.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){s.setRequestHeader(t,p(e.headers[t]))})),i.signal&&(i.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&i.signal.removeEventListener("abort",u)}),s.send(void 0===i._bodyInit?null:i._bodyInit)}))}I.polyfill=!0,n.fetch||(n.fetch=I,n.Headers=h,n.Request=x,n.Response=_)},1117:t=>{t.exports="8707878492bc153a"},5349:t=>{t.exports="d1f8fd5b9fdcbc26"}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";r(1817),r(2443),r(9007),r(3510),r(1840),r(2159),r(4944),r(6535),r(2707),r(3792),r(9244),r(1874),r(9494),r(6977),r(9601),r(8559),r(4678),r(1058),r(8674),r(7727),r(3593),r(4603),r(4916),r(2087),r(9714),r(7852),r(2023),r(4723),r(5306),r(4765),r(3123),r(6755),r(8702),r(5674),r(3105),r(4141),r(3824),r(2974),r(4129),r(3948),r(4633),r(5844),r(285),r(3753),r(1637),r(4301);"object"==typeof window&&(window._babelPolyfill=!1);const t=function t(e){let r;return r=e instanceof Error?e:new Error(e),Object.setPrototypeOf(r,t.prototype),r};t.prototype=Object.create(Error.prototype,{name:{value:"PSPDFKitError",enumerable:!1}});const e=t;function n(t,r){if(!t)throw new e(`Assertion failed: ${r||"Condition not met"}\\n\\nFor further assistance, please go to: https://pspdfkit.com/support/request`)}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===o(e)?e:String(e)}function a(t,e,r){return(e=i(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t){console.log(t)}function c(){console.warn(...arguments)}function u(t){console.error(t)}["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",\'[tabindex]:not([tabindex^="-"])\'].join(",");new WeakMap;function f(t){return{name:t.name,scale:{unitFrom:t.scale.unitFrom,unitTo:t.scale.unitTo,from:Number(t.scale.fromValue),to:Number(t.scale.toValue)},precision:t.precision}}var l=r(1117),p=r.n(l),d=r(5349),h=r.n(d),g=r(6656),m=r.n(g);let y;y="object"==typeof process&&"object"==typeof process.versions&&void 0!==process.versions.node||"undefined"!=typeof window&&"Deno"in window||"undefined"!=typeof self&&"Deno"in self?m():function(t){return"object"==typeof window?new Promise(((e,r)=>{const o=document.createElement("script");o.type="text/javascript",o.async=!0,o.onload=()=>e(window.PSPDFModuleInit),o.onerror=r,o.src=t;const{documentElement:i}=document;n(i),i.appendChild(o)})):(self.importScripts(t),Promise.resolve(self.PSPDFModuleInit))};const v=y,b="pspdfkit-lib/",w=`${b}pspdfkit${"-"+h()}.wasm.js`,x=`${b}pspdfkit${"-"+p()}.wasm`;function S(t,e){let r;if("object"==typeof t){r=t.wasm;return{wasmBinaryFile:x,locateFile:t=>t,wasmBinary:r}}const n={wasmBinaryFile:t+x,locateFile:t=>t,wasmBinary:r};{const t=fetch(n.wasmBinaryFile,{credentials:"same-origin"}),r=12932027;t.then((t=>{const e=t.headers.get("content-length");return e&&parseInt(e)>=r&&c("The WASM binary file is being served without compression. Due to its size, it\'s recommended to configure the server so application/wasm files are served with compression.\\n\\nFind more details in our Standalone performance guides: https://pspdfkit.com/guides/web/best-practices/caching-on-the-web/#gzip-and-brotli"),t})).catch((t=>{throw new Error(`Failed to load WASM binary file: ${t}`)})),n.instantiateWasm=(r,o)=>((async()=>{s(`Start ${n.wasmBinaryFile} download.`);const i=Date.now();let a,c;const f=!e&&"function"==typeof WebAssembly.instantiateStreaming;function l(){return t.then((t=>{if(!t.ok)throw new Error(`Error loading ${n.wasmBinaryFile}: ${t.statusText}`);return t.arrayBuffer()})).then((t=>(c=Date.now(),s(`Download complete, took: ${c-i}ms`),WebAssembly.instantiate(new Uint8Array(t),r))))}a=f?WebAssembly.instantiateStreaming(t,r).then((t=>(c=Date.now(),s(`Download and Instantiation complete, took: ${Date.now()-i}ms`),t))).catch((t=>{if(/mime.*type/i.test(t.message))return u(t.message),null;throw t})):l();let p=await a;null===p&&(u("Streaming instantiation failed! Falling back to classic instantiation. This might result in slower initialization time therefore we highly recommend to follow the troubleshooting instructions in our guides to fix this error: https://pspdfkit.com/guides/web/current/troubleshooting/common-issues/#response-has-unsupported-mime-type-error."),p=await l()),!f&&c&&s(`Compilation and Instantiation complete, took: ${Date.now()-c}ms`),o(p.instance,p.module)})(),{})}return n}function _(t){t.PSPDFLoggingServices={error(t,e){u(`[${t}] ${e}`)},warn(t,e){c(`[${t}] ${e}`)},info(t,e){0},debug(t,e){0},trace(t,e){0}}}function O(t){const e=new FileReader;return new Promise(((r,n)=>{e.onerror=t=>{n(new Error(t))},e.onload=t=>{var e;r(new Uint8Array(null===(e=t.target)||void 0===e?void 0:e.result))},e.readAsArrayBuffer(t)}))}const E="text",I="documentA",A="documentB",F="result",j="Maui_Android",P="Maui_iOS",k="Maui_MacCatalyst",T="Maui_Windows",R="cms",B="cades",D="unableToShape",C="requiresMoreFonts";function U(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function L(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?U(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}const N="/create.pdf",M="/save.pdf",$="/embedded.pdf",q="WebAssembly module not loaded.";let J=null,z=!1,H=!1,W=null,V=[],G=null,K=null,X=null;const Y=new Set,Q="/fonts";let Z;const tt=new Set;function et(t){return null!=t&&null!=t.length&&0===t.length}const rt=["configurePDFJavaScriptSupport","closeDocument","setFormValues","openDocument","saveDocument","importXFDF","importInstantDocumentJSON"],nt={annotationsAndForms:"annotations_and_forms",assemble:"assemble",extract:"extract",extractAccessibility:"extract_accessibility",fillForms:"fill_forms",modification:"modification",printHighQuality:"print_high_quality",printing:"printing"};function ot(t){n(J,"WebAssembly module not loaded.");for(var e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];const i=r.map((t=>et(t)?JSON.stringify(t):t));rt.includes(t)&&yt();const a=J[t](...i)||\'{ "success": true }\',s=JSON.parse(a);if(!s.success)throw new Error(s.error);return s}function it(t){n(J,"WebAssembly module not loaded.");for(var e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];rt.includes(t)&&yt();const i=r.map((t=>et(t)?JSON.stringify(t):t)),a=J[t](...i);return a}const at=["run_pdf_formatting_scripts","run_pdf_javascript","set_form_values_get_script_changes","edit_document","prepare_sign","sign","on_keystroke_event","save_document"];function st(t){const e=new ArrayBuffer(2*t.length),r=new Uint16Array(e);for(let e=0,n=t.length;e<n;e++)r[e]=t.charCodeAt(e);return e}function ct(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;n(J,"WebAssembly module not loaded.");const o=JSON.stringify(L({type:t},e));let i;if(at.includes(t)&&yt(),r)try{const t="string"==typeof r?new Uint8Array(st(r)):new Uint8Array(r),e=J.allocateMemory(t.byteLength);try{J.HEAPU8.set(t,e.ptr);const r=J.memoryHandleToVector(e);try{i=J.dispatchCommandWithBinary(o,r)}finally{r.delete()}}finally{e.delete()}}catch(t){throw t}else i=J.dispatchCommand(o);if(i.hasError()){const e=new Error(i.getErrorMessage()||"There was an error while executing the command: "+t);throw i.delete(),e}const a=[];for(let t=0;t<i.getRepliesCount();t++)i.hasJSONReply(t)&&a.push(JSON.parse(i.getJSONReply(t))),i.hasBinaryReply(t)&&a.push(i.getBinaryReply(t).slice(0));return i.delete(),a}function ut(t){try{const e=(new TextDecoder).decode(t);return JSON.parse(e)}catch(t){throw t}}function ft(t,e){return`${t}/${e}.pdf`}async function lt(t,e){const r=Math.random().toString(36).slice(-5),o=await Promise.all(Object.entries(e).map((async e=>{let[n,o]=e;return t.forEach((t=>{"document"in t&&t.document===n&&"importDocument"===t.type?(!1===t.treatImportedDocumentAsOnePage&&(t.treatImportedDocumentAsOnePage=void 0),t.document=ft(r,n)):("dataFilePath"in t&&t.dataFilePath===n&&"applyInstantJson"===t.type||"dataFilePath"in t&&t.dataFilePath===n&&"applyXfdf"===t.type)&&(t.dataFilePath=ft(r,n))})),{basename:n,buffer:await O(o)}})));return o.forEach((t=>{!function(t,e,r){n(J,q),J.FS.analyzePath(t).exists||J.FS.mkdir(t),J.FS.writeFile(ft(t,e),r)}(r,t.basename,t.buffer)})),function(){o.forEach((t=>{!function(t,e){n(J,q),J.FS.unlink(ft(t,e))}(r,t.basename)}))}}function pt(){H=!0;const t=ot("configurePDFJavaScriptSupport",!0);return n(t.success,"An error occurred while executing the document level JavaScript."),t.changes||[]}function dt(t,e){let r;try{r=ct("edit_document",{save_path:e,operations:t})}catch(t){throw new Error(`Error applying operations to document: ${t.message}`)}return r}let ht,gt=null,mt=!1;function yt(){mt||(gt=null,ht=!1)}function vt(t){mt&&!t&&(mt=!1,gt&&wt(gt)),mt=t}function bt(){return null===gt&&(gt=ct("read_form_json_objects",{include_line_height_factor:!1}),ht=!1),gt}function wt(t){if(mt){if(null===t)throw mt=!1,new Error("Error enqueuing form JSON objects: form fields JSON is null.");return gt&&!ht&&(ht=!0),void(gt=t)}if(ht||!mt)try{yt(),ct("apply_form_json_objects",{form_fields_with_widgets:t})}catch(t){throw new Error("Error applying form JSON objects to /create.pdf: "+t.message)}}function xt(t,e,r,o,i,a){if(n("number"==typeof t.pageIndex,"Annotation must have a pageIndex"),!Y.has(t.pdfObjectId))try{n("number"==typeof t.pdfObjectId,"Cannot call renderAnnotation() for an annotation without pdfObjectId.");const e=ct("render_annotation",{page:t.pageIndex,annotation_id:t.pdfObjectId,format:i,bitmap_width:r,bitmap_height:o,appearance_stream_type:a||"normal"});if("bitmap"===i)return e[0];{const t=new Blob([e[0]],{type:`image/${i}`});return URL.createObjectURL(t)}}catch(t){return void 0}}const St={SharePoint:"SPO",Salesforce:"SF",[P]:"MauiIOS",[j]:"MauiAndroid",[k]:"MauiMacCatalyst",[T]:"MauiWindows",NodeJS:"NodeJS"};function _t(t,e){let{width:r,height:n}=e;return"webp"===t&&(r>16383||n>16383)?"png":t}function Ot(t){const e=[];for(let r=0;r<t.length;r++)e.push(nt[t[r]]);return e}function Et(t,e){return t.pdfObjectId===e.pdfObjectId}const It=new class{constructor(){a(this,"_pdfObjectIdsForIds",{}),a(this,"comparisonDocuments",{}),a(this,"lastOpenedComparisonDocument",null),a(this,"persistedOpenDocument",null)}loadNativeModule(t,e){let{disableWebAssemblyStreaming:r,enableAutomaticLinkExtraction:n,overrideMemoryLimit:o}=e;return K=Date.now(),z=n,W=o,function(t,e){let r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:globalThis;return new Promise((async i=>{r=S(t,e),"string"==typeof t&&(n=await v(`${t}${w}`)),s("Using WASM method"),_(o),i({nativeModule:await n(r)})}))}(t,r).then((t=>{let{nativeModule:e}=t;J=e;const r=ot("PSPDFKitVersion").version;if(1!==r)throw new Error(`Native version mismatch. Please update the dependencies. Expected 1 but got ${r}.`)}))}async load(t,r,o){let i,{mainThreadOrigin:a,customFonts:c,dynamicFonts:u,productId:f}=o;n(J,q);try{if(J.FS.analyzePath(Q).exists||J.FS.mkdir(Q),Z=c?"/fonts/custom-fonts":"",c&&!J.FS.analyzePath(Z).exists&&function(t,e){n(J,q),J.FS.analyzePath(e).exists||J.FS.mkdir(e),J.FS.mount(J.FS.filesystems.WORKERFS,{blobs:t},e)}(c,Z),i=J.initPSPDFKit(null==r?"":r,a,Q,"",f&&void 0!==St[f]?St[f]:""),u){const t=await async function(t){try{const r=await fetch(t).catch((r=>{throw new e(`Error fetching dynamic fonts file ${t}. ${r}`)}));if(200!==r.status)throw new e(`Error fetching dynamic fonts file ${t}. Status code: ${r.status}`);const n=await r.json().catch((r=>{throw new e(`Error parsing dynamic fonts file ${t}. ${r}`)}));return n}catch(t){throw t}}(u);ct("dynamic_font_loading/set_metadata_file",{metadata:t}),X=u.split("/").slice(0,-1).join("/")}}catch(t){throw t}const l=JSON.parse(i);if(K&&s(`Native initialization complete, took: ${Date.now()-K}ms`),!l.success)throw new Error("Failed to initialize PSPDFKit: "+l.error);return l}async openDocument(t,e,r){try{return n(J,q),null!==W&&ot("overrideMemoryLimit",W),G=e,J.FS.writeFile(N,new Uint8Array(t)),this.openAndReturnDocumentInfo(r)}finally{this._pdfObjectIdsForIds={}}}async getSuggestedLineHeightFactor(t,e){return ct("get_suggested_line_height_factor",{annotation_ids:[t],page:e})[0].line_height_factors[t.toString()]}async getAvailableFontFaces(t){var e;if(!t)return[];return null===(e=ct("get_available_font_faces")[0])||void 0===e?void 0:e.font_faces.reduce(((e,r)=>{const n=t.find((t=>t.name===r.path.replace(`${Z}/`,"")));return n?e.concat({readableName:r.fullName,name:n.name}):e}),[])}async setFontSubstitutions(t){try{ct("set_font_substitutions",{substitutions:t})}catch(t){throw new Error("Error setting fonts substitutions: "+t.message)}}async getClosestSnapPoint(t,e){return ct("get_closest_snap",{q:[t,e]})[0]}async configureSnapper(t){ct("configure_snapper",{page:t})}async reloadDocument(){try{return vt(!1),ot("closeDocument"),this.openAndReturnDocumentInfo()}finally{this._pdfObjectIdsForIds={}}}async openAndReturnDocumentInfo(t){ot("openDocument",N,JSON.stringify({password:G})),H&&pt(),ot("automaticLinkExtraction",z);const e=ot("getDocumentInfo").documentInfo;if(e.pageCount<=0)return e;let r=[];if("number"==typeof t){const n=await this.getPageInfo(t);for(let o=0;o<e.pageCount;o++){const e=L(L({},n),{},{pageIndex:o,pageLabel:t===o?n.pageLabel:String(o+1)});r.push(e)}}else r=await this.getAllPageInfos(e.pageCount);return e.pages=r,e}async getPageInfo(t){try{const e=ct("page_info",{query:"page_info",page:t});n(1===e.length,"expected page_info result to return 1 result when specifying index.");const r=(new TextDecoder).decode(e[0]);return JSON.parse(r).pageInfo}catch(e){return u(`Dimensional information for page ${t} unavailable, page will not be displayed.`),{height:0,matrix:[0,0,0,0,0,0],pageLabel:"",reverseMatrix:[0,0,0,0,0,0],transformedBBox:[0,0,0,0],untransformedBBox:[0,0,0,0],width:0,pageIndex:t,rawPdfBoxes:{bleedBox:null,cropBox:null,mediaBox:null,trimBox:null}}}}async preflightRenderAnnotationText(t,e,r){try{let n=ct("dynamic_font_loading/preflight_annotation",{text:r,annotation_id:t,page:e})[0];n.preflight_result===C&&(await this.addDynamicFonts(n.required_fonts),n=ct("dynamic_font_loading/preflight_annotation",{text:r,annotation_id:t,page:e})[0]),n.preflight_result===D?Y.add(t):Y.delete(t)}catch(e){u(`There was an error testing rendering for annotation ${t} of this text: ${r}`)}}async addDynamicFonts(t){let e=[];try{e=t.filter((t=>!tt.has(t)));!function(t){n(J,q),t.forEach((t=>{J.FS.analyzePath(`/fonts/${t.name}`).exists||J.FS.writeFile(`/fonts/${t.name}`,new Uint8Array(t.data))}))}((await Promise.all(e.map((t=>fetch(`${X}/${t}`).then((t=>t.arrayBuffer())))))).map(((t,r)=>({name:e[r],data:t})))),e.forEach((t=>{tt.add(t)}))}catch(t){e.forEach((t=>{tt.delete(t)})),u(`There was an error loading a font: ${t}`)}await ct("dynamic_font_loading/notify_fonts_added",{added_fonts:e.map((t=>({remote_file_path:t,local_file_name:t})))})}async getAllPageInfos(t){const e=[];try{const r=ct("page_info",{query:"page_info",page:"all"});n(r.length===t,"expected the same length of page info response to page count.");for(let t=0;t<r.length;t++){const n=(new TextDecoder).decode(r[t]),o=JSON.parse(n);e.push(o.pageInfo)}}catch(r){u("There was an error retrieving page information for all pages from core. Reverting to individual queries.");for(let r=0;r<t;r++)try{const t=ct("page_info",{query:"page_info",page:r});n(1===t.length,"expected page_info result to return 1 result when specifying index.");const o=(new TextDecoder).decode(t[0]),i=JSON.parse(o);e.push(i.pageInfo)}catch(t){u(`Dimensional information for page ${r} unavailable, page will not be displayed.`);const n={height:0,matrix:[0,0,0,0,0,0],pageLabel:"",reverseMatrix:[0,0,0,0,0,0],transformedBBox:[0,0,0,0],untransformedBBox:[0,0,0,0],width:0,pageIndex:r,rawPdfBoxes:{bleedBox:null,cropBox:null,mediaBox:null,trimBox:null}};e.push(n)}}return e}async enablePDFJavaScriptSupport(){return pt()}async runPDFFormattingScripts(t,e){let r;n(H,"PDF Formatting Scripts can only run after JavaScript is enabled.");try{r=ct("run_pdf_formatting_scripts",{form_fqns:t,only_if_no_ap_stream:e})}catch(t){throw new Error("An error occurred while executing the document level JavaScript formatting.\\n\\n"+t.message)}return r[0].changes||[]}async openDocumentAt(){throw new Error("Should never be called")}async getBookmarks(){const t=ct("get_bookmarks");return n(1===t.length,"expected only one response for getBookmarks"),t[0].bookmarks||[]}async getFormJSON(){return ot("getFormJSON").formJSON}async getFormValues(){return ot("getFormValues").formValues}async setFormValues(t){const e=bt();let r=!1;const n=[],o=e.map((e=>{const o=t.find((t=>t.name===e.formField.name));return o?o.value===e.value||Array.isArray(o.value)&&Array.isArray(e.value)&&o.value.every(((t,r)=>t===e.value[r]))?e:("string"==typeof o.value&&o.value.length>0?n.push({widgets:e.widgets,text:o.value}):e.widgets.forEach((t=>{"number"==typeof t.pdfObjectId&&Y.delete(t.pdfObjectId)})),r=!0,L(L({},e),{},{value:o.value})):e}));if(r){if(X)for(let t=0;t<n.length;t++){const e=n[t].widgets;for(let r=0;r<e.length;r++)await this.preflightAnnotation(e[r],e[r].pdfObjectId,n[t].text)}wt(o)}}async setFormFieldValue(t){await this.setFormValues([t])}async applyOperations(t,e){const r=await lt(t,e);dt(t,N),r()}async exportPDFWithOperations(t,e){const r=await lt(t,e);let o;n(J,q);try{dt(t,M),o=J.FS.readFile(M).buffer}catch(t){throw new Error("Error applying operations: "+t.message)}return r(),o}async getSignaturesInfo(){try{return ct("get_signatures",{certificate_check_time:"current_time"})[0]}catch(t){throw new Error(`Error getting signatures info: ${t.message}`)}}async getComments(){try{return ct("get_comments")}catch(t){throw new Error(`Error getting comments: ${t.message}`)}}async applyComments(t){try{return ct("apply_comments",{comments:t})}catch(t){throw new Error(`Error applying comments: ${t.message}`)}}async prepareSign(t,e,r,o,i,a,s){let c;try{c=ct("get_signatures",{certificate_check_time:"current_time"})[0];const t="not_signed"!==c.status;ot("saveDocument",M,!1,t,false,false,"pdf",!1),ot("openDocument",M,JSON.stringify({password:G}))}catch(t){throw new Error(`Error saving document backup for invisible signing: ${t}`)}try{const t=!r&&"not_signed"!==c.status;ot("saveDocument",N,r,t,false,false,"pdf",!1),r&&(ot("openDocument",N,JSON.stringify({password:G})),H&&pt())}catch(t){throw new Error(`Error saving document for invisible signing: ${t}`)}let u;try{u=ct("prepare_sign",{signer_data_source:L(L({},t),{},{field_name:o,position:i,appearance:a,type:"pspdfkit/signer-data-source"}),signature_metadata:L(L({},e),{},{type:"pspdfkit/signature-metadata"})},s)}catch(t){throw new Error(`Error preparing document for signing: ${t}`)}n(J,q);let f=null;return t&&(null==t?void 0:t.signatureType)!==R||(f=J.FS.readFile(u[0].result.file_contents).buffer),J.FS.unlink(u[0].result.file_contents),{file:u[0].result.file,hash:u[0].result.hash,signatureFormFieldName:u[0].result.signature_form_fqn,dataToBeSigned:u[0].result.data_to_be_signed,fileContents:f}}async getTimestampRequest(t,e){try{const[r]=ct("get_timestamp_http_request",{timestamp_authority_info:{url:e.url,authenticationInfo:{username:e.username,password:e.password}},data_to_timestamp:t});return{url:r.url,method:r.method,requestData:r.request_data,contentType:r.content_type,token:r.token,username:r.user,password:r.password}}catch(t){throw new Error(`Error getting timestamp request: ${t.message}`)}}async sign(t,e,r,n,o,i,a){let s;try{var c;let u;n===B&&Array.isArray(i)&&i.length>0&&(u=ct("create_signature",{signatureType:n,hash:r,signed_data:o,certificates:i,timestamp_response:a})),s=ct("sign",{password:G,save_path:N,file_path:t,signature_form_fqn:e,pkcs7_container:(null===(c=u)||void 0===c?void 0:c[0].result)||o}),ot("openDocument",N,JSON.stringify({password:G})),H&&pt()}catch(t){throw new Error(`Error signing document: ${t}`)}return s[0].result}async restoreToOriginalState(){try{ot("openDocument",M,JSON.stringify({password:G})),H&&pt();const t="not_signed"!==ct("get_signatures",{certificate_check_time:"current_time"})[0].status;ot("saveDocument",N,!1,t,!1,!1,"pdf",!1),ot("openDocument",N,JSON.stringify({password:G})),H&&pt()}catch(t){throw new Error(`Could not restore backup document: ${t}`)}}async evalFormValuesActions(t){const e=bt().reduce(((e,r)=>t.find((t=>{let{name:e}=t;return r.formField.name===e}))&&"pspdfkit/form-field/text"===r.formField.type?e.concat(r):e),[]);if(X)for(let n=0;n<e.length;n++){const o=e[n].widgets;for(let n=0;n<o.length;n++){var r;await this.preflightAnnotation(o[n],o[n].pdfObjectId,null===(r=t.find((t=>e[n].formField.name===t.name)))||void 0===r?void 0:r.value)}}const o=ct("set_form_values_get_script_changes",{form_values:t});return n(1===o.length,"expected only one response for evalFormValuesActions"),o[0].changes}async readFormJSONObjects(){return bt()}async setFormJSONUpdateBatchMode(t){await vt(t)}async evalScript(t,e){const r=ct("run_pdf_javascript",{pdf_javascript_contents:t,pdf_javascript_form_fqn:e});return n(1===r.length,"expected only one response for evalScript"),r[0].changes}async closeDocument(){try{return V=[],G=null,H=!1,gt=null,mt=!1,ht=!1,ot("closeDocument")}finally{this._pdfObjectIdsForIds={}}}async renderTile(t,e,r,o,i,a,s,c){n(J,q);const u=ct("render_tile",{render_annotations:Boolean(a||s),print_rendering:o,page:t,bitmap_width:r.width,bitmap_height:r.height,bitmap_x:r.left,bitmap_y:r.top,page_width:e.width,page_height:e.height,format:_t(c,{width:r.width,height:r.height}),render_text:i});if("bitmap"===c&&"OffscreenCanvas"in globalThis)return async function(t){let{buffer:e,width:r,height:o}=t;const i=await self.createImageBitmap(new ImageData(new Uint8ClampedArray(e),r,o),0,0,r,o),a=new OffscreenCanvas(r,o),s=a.getContext("bitmaprenderer");n(s),s.transferFromImageBitmap(i);const c=await a.convertToBlob(),u=URL.createObjectURL(c);return i.close(),u}({buffer:u[0],width:r.width,height:r.height});if("bitmap"===c)return u[0];{const t=new Blob([u[0]],{type:`image/${c}`});return URL.createObjectURL(t)}}async renderAnnotation(t,e,r,n,o,i){return xt(L(L({},t),{},{pdfObjectId:this._getPdfObjectIdForObject(t)}),e&&await O(e),r,n,o,i)}async renderPageAnnotations(t,e,r,n,o){return e.map(((e,i)=>xt({pdfObjectId:e,pageIndex:t},0,r[i],n[i],_t(o,{width:r[i],height:n[i]}))))}async renderDetachedAnnotation(t,e,r,o,i){n(J,q);const a=e?await O(e):null,s=e?e.type:null;let c,u;const f=new J.VectorUint8;try{if(null!=a)for(let t=0;t<a.byteLength;t++)f.push_back(a[t]);if(u=it("renderDetachedAnnotation",i,JSON.stringify(L(L({},t),{},{pdfObjectId:this._getPdfObjectIdForObject(t),pageIndex:0})),0,r,o,f,s||""),u.hasError()||1!==u.getRepliesCount()){const t=u.getErrorMessage(),e=u.getErrorReason();throw new Error(e+": "+t)}c=u.getBinaryReply(0).slice(0)}finally{f&&f.delete(),u&&u.delete()}return c}async loadCertificates(t){if(ct("load_certificates",{certificates:t}).length>0)throw new e("Internal error while loading certificates")}async getAttachment(t){let e,r,n;const o=await this.getEmbeddedFilesList(),i=null==o?void 0:o.map((t=>t.id)),a=null==i?void 0:i.includes(t);try{if(a)ct("extract_embedded_file",{id:t,file_path:$}),e=J.FS.readFile($).buffer;else{if(r=it("getAnnotationAttachment",t),r.hasError()||1!==r.getRepliesCount()){const t=r.getErrorMessage(),e=r.getErrorReason();throw new Error("Error fetching attachment: "+e+", "+t)}n=JSON.parse(r.getJSONReply(0)).encoding,e=r.getBinaryReply(0).slice(0)}}finally{var s;null!==(s=J.FS.analyzePath($))&&void 0!==s&&s.exists&&J.FS.unlink($),r&&r.delete()}return[e,n]}async textForPageIndex(t){return ot("textForPageIndex",t).textBlocks}async textContentTreeForPageIndex(t){return ct("get_content_tree",{pageIndex:t})}async annotationsForPageIndex(t){const e=ot("annotationsForPageIndex",t);return["rollover","down"].forEach((t=>{var r;null===(r=e.apstream_variants)||void 0===r||null===(r=r[t])||void 0===r||r.forEach((r=>{const n=e.annotations.find((t=>t.pdfObjectId===r));n?n[t]=!0:e.annotations.push({pdfObjectId:r,[t]:!0})}))})),e.annotations}async createAnnotation(t,e){n(J,q),n("number"==typeof t.pageIndex,"Annotation must have a pageIndex");const r=t.pdfObjectId,o=e?await O(e):null;let i;const a=new J.VectorUint8;try{if(null!=o)for(let t=0;t<o.byteLength;t++)a.push_back(o[t]);"pspdfkit/widget"===t.type&&(vt(!1),yt());const e=("pspdfkit/shape/ellipse"===t.type||"pspdfkit/shape/rectangle"===t.type)&&t.measurementScale?L(L({},t),{},{measurementBBox:t.bbox}):t;i=ot("createAnnotation",JSON.stringify(L(L({},e),{},{pdfObjectId:null})),a)}finally{a&&a.delete()}var s;("number"==typeof r&&"number"==typeof this._pdfObjectIdsForIds[r.toString()]&&delete this._pdfObjectIdsForIds[r.toString()],this._pdfObjectIdsForIds[t.id||i.pdfObjectId.toString()]=i.pdfObjectId,t&&"pspdfkit/text"===t.type&&X)&&await this.preflightAnnotation(t,i.pdfObjectId,null===(s=t.text)||void 0===s?void 0:s.value);return i.pdfObjectId}async updateAnnotation(t){const e=L(L({},t),{},{pdfObjectId:this._getPdfObjectIdForObject(t)});if(n(e.id,"Annotation must have an ID"),n("number"==typeof e.pageIndex,"Annotation must have a pageIndex"),"pspdfkit/widget"===e.type){const t=bt(),r="number"==typeof e.pdfObjectId?e.pdfObjectId.toString():e.id;wt(t.map((t=>t.formField.annotationIds.includes(r)||t.formField.annotationIds.includes(String(e.pdfObjectId))?L(L({},t),{},{widgets:t.widgets.map((t=>t.id===r||String(t.pdfObjectId)===r?e:t))}):t)))}else{var r;if(t&&"pspdfkit/text"===e.type&&X)await this.preflightAnnotation(t,e.pdfObjectId,null===(r=t.text)||void 0===r?void 0:r.value);ot("updateAnnotation",JSON.stringify(e),0,0)}}async deleteAnnotation(t){var e;if(t.APStreamCache&&await this.updateAnnotation(t),"pspdfkit/widget"===t.type)try{const e=t.id;wt(bt().map((r=>{if(r.formField.annotationIds.includes(e)||r.formField.annotationIds.includes(String(t.pdfObjectId))){let t;if(("pspdfkit/form-field/checkbox"===r.formField.type||"pspdfkit/form-field/radio"===r.formField.type)&&r.formField.options.length===r.formField.annotationIds.length){const n=r.formField.annotationIds.indexOf(e);t=r.formField.options.filter(((t,e)=>e!==n))}const n=r.widgets.filter((t=>e!==(t.id||String(t.pdfObjectId)))),o=r.formField.annotationIds.filter((t=>t!==e));return n.length>0&&o.length>0?L(L({},r),{},{formField:L(L({},r.formField),{},{annotationIds:o},t?{options:t}:null),widgets:n}):null}return r})).filter(Boolean))}catch(t){throw t}else try{ct("remove_annotations",{annotation_ids:[this._getPdfObjectIdForObject(t)]})}catch(e){c(`Removing annotation failed for annotation: ${JSON.stringify(t)}`)}delete this._pdfObjectIdsForIds[t.id||(null===(e=t.pdfObjectId)||void 0===e?void 0:e.toString())],Y.delete(t.pdfObjectId)}async createFormField(t,e){const r=bt().concat([{type:"pspdfkit/form-field-with-widgets",formField:t,widgets:e}]),n=mt;mt&&vt(!1),wt(r);const o=bt();n&&vt(!0);const i=o.find((e=>e.formField.name===t.name));if(!i)throw new Error(`Error creating new form field in /create.pdf: created form field not found. ${JSON.stringify({type:"pspdfkit/form-field-with-widgets",formField:t,widgets:e})}`);i.widgets.forEach((t=>{this._pdfObjectIdsForIds[t.id]=t.pdfObjectId})),"number"==typeof t.pdfObjectId&&"number"==typeof this._pdfObjectIdsForIds[t.pdfObjectId.toString()]&&delete this._pdfObjectIdsForIds[t.pdfObjectId.toString()],this._pdfObjectIdsForIds[t.id||i.formField.pdfObjectId.toString()]=i.formField.pdfObjectId}async updateFormField(t,e){let r=L(L({},t),{},{pdfObjectId:this._pdfObjectIdsForIds[t.id]||this._getPdfObjectIdForObject(t)});const n=bt(),o=n.find((t=>Et(t.formField,r)));if(!o)throw new Error(`Error updating form field with name "${t.name}" in /create.pdf: form field not found. ${JSON.stringify(n)}`);const i=o.formField.name!==t.name;let a=null;if(i&&"pspdfkit/form-field/radio"===r.type){const o=t.name,i=n.find((t=>t.formField.name===o));i&&"pspdfkit/form-field/radio"===i.formField.type&&(r=L(L({},r),{},{annotationIds:[...r.annotationIds,...i.formField.annotationIds],options:[...r.options,...i.formField.options]}),e=[...e,...i.widgets],a=i)}wt(n.map((n=>{if(a&&a.formField.pdfObjectId===n.formField.pdfObjectId)return null;if(Et(n.formField,r)){const o=L({type:"pspdfkit/form-field-with-widgets",formField:L(L({},n.formField),r),widgets:e.reduce(((t,e)=>[...t,L(L({},n.widgets.find((t=>t.id===e.id||t.pdfObjectId===e.pdfObjectId))),e)]),[])},void 0!==n.value?{value:n.value}:null);return t.flags||delete o.formField.flags,o}return n})).filter(Boolean));const s=bt().find((e=>e.formField.name===t.name));if(!s)throw new Error(`Error updating form field "${t.name}" in /create.pdf: updated form field not found. ${JSON.stringify({type:"pspdfkit/form-field-with-widgets",formField:t,widgets:e})}`);s.formField.pdfObjectId!==r.pdfObjectId&&(this._pdfObjectIdsForIds[r.id]=s.formField.pdfObjectId),null==o||o.widgets.forEach((t=>{e.some((e=>e.id===t.id))||delete this._pdfObjectIdsForIds[t.id]}))}async deleteFormField(t){const e=bt(),r=e.find((e=>e.formField.name===t.name));if(!r)return;wt(e.filter((e=>e.formField.name!==t.name)));const n=bt().find((e=>e.formField.name===t.name));if(n)throw new Error(`Error deleting form field with name "${t.name}" in /create.pdf: form field still present. ${JSON.stringify(n)}`);r.widgets.forEach((t=>{delete this._pdfObjectIdsForIds[t.id]}))}async deleteFormFieldValue(t){wt(bt().map((e=>e.formField.name===t?{formField:e.formField,widgets:e.widgets,type:e.type}:e)))}async preflightAnnotation(t,e,r){"pspdfkit/text"!==t.type&&"pspdfkit/widget"!==t.type||"number"==typeof e&&(r?await this.preflightRenderAnnotationText(e,t.pageIndex,r):Y.delete(e))}async createBookmark(t){try{ct("append_bookmarks",{bookmarks:[t]})}catch(t){throw new Error(`Error creating new bookmark in /create.pdf: ${t.message}`)}}async updateBookmark(t){try{var e;ct("remove_bookmarks",{bookmarkIds:[null!==(e=t.id)&&void 0!==e?e:t.pdfBookmarkId]}),ct("append_bookmarks",{bookmarks:[t]})}catch(t){throw new Error(`Error updating bookmark in /create.pdf: ${t.message}`)}}async deleteBookmark(t){try{ct("remove_bookmarks",{bookmarkIds:[t]})}catch(t){throw new Error(`Error deleting bookmark in /create.pdf: ${t.message}`)}}async getTextFromRects(t,e){return ot("getTextFromRects",t,JSON.stringify(e.map((t=>[t.left,t.top,t.width,t.height])))).text}async search(t,e,r,n){return ct("search",{query:t,start_index:e,limit:r,case_sensitive:n,search_type:arguments.length>4&&void 0!==arguments[4]?arguments[4]:E})}async parseXFDF(t,e){try{return ut(ct("convert_xfdf_to_instant_json",{ignore_page_rotation:e},t)[0])}catch(t){throw t}}async getEmbeddedFilesList(){return ct("list_embedded_files")[0].embeddedFiles||null}async getMeasurementSnappingPoints(t){const e=ct("get_snapping_points",{page:t});return e[0].snappingPoints?function(t){const e=[...t.endpoints,...t.intersections,...t.midpoints],r=[];for(let t=0;t<e.length;t+=2){const n=[e[t],e[t+1]];r.push(n)}return r.sort(((t,e)=>t[0]==e[0]?t[1]-e[1]:t[0]-e[0]))}(e[0].snappingPoints):null}async getSecondaryMeasurementUnit(){try{return ct("get_secondary_measurement_unit")[0]||null}catch(t){throw new Error(`Error getting secondary measurement: ${t.message}`)}}async compareDocuments(t){try{n(t.originalDocument.arrayBuffer,"Original document arrayBuffer is missing"),n(t.changedDocument.arrayBuffer,"Changed document arrayBuffer is missing"),J.FS.writeFile("documentA.pdf",new Uint8Array(t.originalDocument.arrayBuffer)),J.FS.writeFile("documentB.pdf",new Uint8Array(t.changedDocument.arrayBuffer));const e={originalDocument:L(L({},t.originalDocument),{},{filePath:"documentA.pdf"}),changedDocument:L(L({},t.changedDocument),{},{filePath:"documentB.pdf"}),comparisons:[t.comparisonOperation]};return ct("document_comparison",e)||null}catch(t){throw new Error(`Error comparing documents: ${t.message}`)}}async setSecondaryMeasurementUnit(t){try{ct("set_secondary_measurement_unit",t?{unitTo:null==t?void 0:t.unitTo,precision:null==t?void 0:t.precision}:null)}catch(t){c("Error setting secondary measurement unit")}}async getMeasurementScales(){try{return ct("get_measurement_content_formats")[0]||null}catch(t){throw new Error(`Error getting measurement scales: ${t.message}`)}}async removeMeasurementScale(t){try{ct("remove_measurement_content_format",{measurementContentFormat:f(t)})}catch(e){throw new Error(`Error removing ${t.name} measurement scale: ${e.message}`)}}async addMeasurementScale(t){try{ct("add_measurement_content_format",{measurementContentFormat:f(t)})}catch(e){throw new Error(`Error adding ${t.name} measurement scale: ${e.message}`)}}async getAnnotationsByScale(t){try{return ct("get_annotations_for_measurement_content_format",{measurementContentFormat:f(t)})||null}catch(t){throw t}}async exportFile(t,e,r,o,i,a,s){let c={mimeType:"application/pdf",extension:"pdf"};try{const n=ct("save_document",L({file_path:M,format:o,flatten_annotations:t,save_incrementally:e,apply_redactions:!1,save_for_printing:r,remove_all_annotations:i,preserve_change_tracker_state:a},s?{user_password:s.userPassword,owner_password:s.ownerPassword,document_permissions:Ot(s.documentPermissions)}:null))[0];n.format&&(c={mimeType:n.format.mime_type,extension:n.format.extension})}catch(t){throw new Error(`Error saving to /save.pdf: ${t.message}`)}n(J,q);return[J.FS.readFile(M).buffer,c]}async importXFDF(t,e,r){V.push({source:t,keepCurrentAnnotations:e}),e||function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.push("pspdfkit/widget"),ot("removeAllAnnotations",JSON.stringify(t),JSON.stringify(e))}(),ot("importXFDF",t,r)}async exportXFDF(t){return ot("exportXFDF",[],[],t).XFDF}async importInstantJSON(t){ot("importInstantDocumentJSON",JSON.stringify(t))}async exportInstantJSON(t){const e=mt;mt&&vt(!1);const r=ct("export_document_json","number"==typeof t?{version:{annotations:t}}:void 0);return e&&vt(!0),ut(r[0])}async getDocumentOutline(){const t=ct("get_outline");return n(1===t.length,"expected only one response for getDocumentOutline"),t[0].outline||[]}async setDocumentOutline(t){return ct("set_outline",{outline:t})}async getPageGlyphs(t){return ct("get_glyphs",{page:t})[0].glyphs||[]}async onKeystrokeEvent(t){const e=ct("on_keystroke_event",{pdf_javascript_event:t});n(1===e.length,"expected only one response for onKeystrokeEvent");const r=e[0].changes||[];return n(r.length>0&&4===r[0].change_type,"expected onKeystrokeEvent to return at least one JavaScript Event change."),r}async version(){return ot("PSPDFKitVersion").version}getImportedXFDF(){return V}async applyRedactions(){try{ot("saveDocument",N,!1,!1,!0,!1,"pdf",!1)}catch(t){throw new Error(`Error applying redactions and saving to /create.pdf: ${t.message}`)}}async clearAPStreamCache(){ot("clearAPStreamCache")}async setComparisonDocument(t,e){this.comparisonDocuments[t]=e||(await this.exportFile(!1,!1,!1,"pdf",!1,!1))[0]}async openComparisonDocument(t){return n(this.comparisonDocuments[t]),t===this.lastOpenedComparisonDocument||t===I&&null===this.lastOpenedComparisonDocument&&this.persistedOpenDocument instanceof ArrayBuffer?null:(this.lastOpenedComparisonDocument=t,this.openDocument(this.comparisonDocuments[t],this.persistedOpenDocument===t?this.persistedOpenDocumentPassword:void 0))}async documentCompareAndOpen(t){n(this.comparisonDocuments[I]&&this.comparisonDocuments[A],"One or both comparison input documents are missing.");const e=`${I}.pdf`,r=`${A}.pdf`;J.FS.writeFile(e,new Uint8Array(this.comparisonDocuments[I])),J.FS.writeFile(r,new Uint8Array(this.comparisonDocuments[A]));return ct("comparison",{documentA:{strokeColor:t.documentA.strokeColor,pageIndex:t.documentA.pageIndex,filePath:e},documentB:{strokeColor:t.documentB.strokeColor,pageIndex:t.documentB.pageIndex,filePath:r},options:L(L({},t.options),{},{outputFilePath:"output.pdf"})}),await this.closeDocument(),this.comparisonDocuments[F]=J.FS.readFile("output.pdf").buffer,this.lastOpenedComparisonDocument=F,this.openDocument(this.comparisonDocuments[F],void 0)}async persistOpenDocument(t){if(t)this.persistedOpenDocument=t;else try{this.persistedOpenDocument=(await this.exportFile(!1,!1,!1,"pdf",!1,!0))[0]}catch(t){throw new Error(`Error trying to persist a copy of the currently opened document: ${t.message}`)}this.persistedOpenDocumentPassword=G}async cleanupDocumentComparison(){n(this.persistedOpenDocument,"No persisted previous document key or array buffer is available.");const t=this.persistedOpenDocument instanceof ArrayBuffer?this.persistedOpenDocument:this.comparisonDocuments[this.persistedOpenDocument];n(t,"No persisted previous array buffer is available.");try{await this.closeDocument()}catch(t){throw new Error(`Error trying to close the current document: ${t.message}`)}const e=this.openDocument(t,this.persistedOpenDocumentPassword);return this.persistedOpenDocument=null,this.persistedOpenDocumentPassword=null,this.lastOpenedComparisonDocument=null,this.comparisonDocuments={},e}_getPdfObjectIdForObject(t){return"number"==typeof t.pdfObjectId?t.pdfObjectId:this._pdfObjectIdsForIds[t.id]}async contentEditorEnter(){ct("content_editing/enter")}async contentEditorExit(){ct("content_editing/exit")}async contentEditorGetTextBlocks(t){const e=ct("content_editing/get_text_blocks",{pageIndex:t});return n(1===e.length,"expected only one response for getTextBlocks"),e[0]}async contentEditorDetectParagraphs(t){const e=ct("content_editing/detect_paragraphs",{pageIndex:t});return n(1===e.length,"expected only one response for detectParagraphs"),e[0]}async contentEditorRenderTextBlock(t,e,r){const o=ct("content_editing/render_text_block",{textBlockId:t,renderTextBlockParams:e,externalControlState:r});return n(2===o.length,"expected only two responses for renderTextBlock. ArrayBuffer and Size info."),{imageBuffer:o[1],displayRect:o[0].displayRect}}async contentEditorSetTextBlockCursor(t,e,r,o){const i=ct("content_editing/set_cursor",{textBlockId:t,offset:e,selectText:r,externalControlState:o});return n(1===i.length,"expected only one response for setTextBlockCursor"),i[0]}async contentEditorMoveTextBlockCursor(t,e,r,o){const i=ct("content_editing/move_cursor",{textBlockId:t,movement:e,selectText:r,externalControlState:o});return n(1===i.length,"expected only one response for moveTextBlockCursor"),i[0]}async contentEditorInsertTextBlockString(t,e,r,o){const i=ct("content_editing/insert_text",{textBlockId:t,cluster:e,text:r,externalControlState:o});return n(1===i.length,"expected only one response for insertTextBlockString"),i[0]}async contentEditorInsertTextBlockContentRef(t,e,r,o){const i=ct("content_editing/insert_content_ref",{textBlockId:t,cluster:e,contentRef:r,externalControlState:o});return n(1===i.length,"expected only one response for contentEditorInsertTextBlockContentRef"),i[0]}async contentEditorCreateTextBlock(t){const e=ct("content_editing/create_text_block",{pageIndex:t});return n(1===e.length,"expected only one response for contentEditorCreateTextBlock"),e[0]}async contentEditorDeleteTextBlockRange(t,e,r){const o=ct("content_editing/delete_range",{textBlockId:t,range:e,externalControlState:r});return n(1===o.length,"expected only one response for deleteTextBlockRange"),o[0]}async contentEditorLayoutTextBlock(t,e,r,o){const i=ct("content_editing/layout",{textBlockId:t,cursor:e,selection:r,externalControlState:o});return n(1===i.length,"expected only one response for layoutTextBlock"),i[0]}async contentEditorDeleteTextBlockString(t,e,r){const o=ct("content_editing/delete_cluster",{textBlockId:t,direction:e,externalControlState:r});return n(1===o.length,"expected only one response for deleteTextBlockString"),o[0]}async contentEditorSetTextBlockSelection(t,e,r){const o=ct("content_editing/set_selection",{textBlockId:t,mode:e,externalControlState:r});return n(1===o.length,"expected only one response for setTextBlockSelection"),o[0]}async contentEditorSetTextBlockSelectionRange(t,e,r,o,i){const a=ct("content_editing/set_selection_range",{textBlockId:t,begin:e,end:r,mode:o,externalControlState:i});return n(1===a.length,"expected only one response for setTextBlockSelection"),a[0]}async contentEditorTextBlockUndo(t,e){const r=ct("content_editing/undo",{textBlockId:t,externalControlState:e});return n(1===r.length,"expected only one response for textBlockUndo"),r[0]}async contentEditorTextBlockRedo(t,e){const r=ct("content_editing/redo",{textBlockId:t,externalControlState:e});return n(1===r.length,"expected only one response for textBlockRedo"),r[0]}async contentEditorTextBlockRestore(t,e,r){const o=ct("content_editing/restore",{textBlockId:t,version:e,externalControlState:r});return n(1===o.length,"expected only one response for textBlockRestore"),o[0]}async contentEditorTextBlockApplyFormat(t,e,r,o){const i=ct("content_editing/apply_format",{textBlockId:t,range:e,formatModifications:r,externalControlState:o});return n(1===i.length,"expected only one response for textBlockApplyFormat"),i[0]}async contentEditorGetAvailableFaces(){const t=ct("content_editing/available_faces");return n(1===t.length,"expected only one response for available_faces"),t[0]}async contentEditorSave(t){let e;try{e=ct("content_editing/save_to_document",{path:N,textBlockSaveInfos:t})}catch(t){throw new Error(`Error saving to /save.pdf: ${t.message}`)}return e}async getOCGs(){return ct("ocg/get_ocgs")[0].ocgs}async getOCGVisibilityState(){return{visibleOCGIds:ct("ocg/get_visibility_state")[0].state.visible}}async setOCGVisibilityState(t){return ct("ocg/set_visibility_state",{state:{visible:t.visibleOCGIds}})}recycle(){}destroy(){}},At=self;At.global=At,At.module={},At.onmessage=async t=>{let e,r,{data:n}=t;try{const t=await It[n.action](...n.args);if(e={id:n.id,result:t},Array.isArray(t)){const e=t.filter((t=>t instanceof ArrayBuffer));e.length>0&&(r=e)}t instanceof ArrayBuffer&&(r=[t])}catch(t){const o=[...n.args].filter((t=>t instanceof ArrayBuffer));o.length>0&&(r=o),e={id:n.id,error:t.message||t.toString(),callArgs:n.args}}At.postMessage(e,r)}})()})();',null)}},69855:e=>{"use strict";var t=window.URL||window.webkitURL;e.exports=function(e,n){try{try{var o;try{(o=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(e),o=o.getBlob()}catch(t){o=new Blob([e])}return new Worker(t.createObjectURL(o))}catch(t){return new Worker("data:application/javascript,"+encodeURIComponent(e))}}catch(e){if(!n)throw Error("Inline worker is not supported");return new Worker(n)}}},87153:e=>{e.exports="48ce188268a233f4"},17938:e=>{e.exports="ba2e2d3f7c5061a9"},91117:e=>{e.exports="8707878492bc153a"},35349:e=>{e.exports="d1f8fd5b9fdcbc26"},9327:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var s in n)o.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},91435:(e,t,n)=>{var o={"./check.svg":82904,"./circle.svg":60605,"./comment.svg":96280,"./cross.svg":36135,"./help.svg":26003,"./insert.svg":52799,"./key.svg":59011,"./newParagraph.svg":91756,"./note.svg":81221,"./paragraph.svg":15170,"./rightArrow.svg":24748,"./rightPointer.svg":70568,"./star.svg":5971};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=91435},79230:(e,t,n)=>{var o={"./add-text-box.svg":92982,"./add.svg":10713,"./all-pages.svg":80525,"./annotate.svg":38070,"./anonymous.svg":15445,"./arrow-up.svg":96447,"./arrow.svg":42823,"./back.svg":13179,"./blend-mode.svg":6916,"./bold.svg":99604,"./bookmark-active.svg":39802,"./border-color.svg":12568,"./calibrate.svg":96810,"./callout.svg":40885,"./caret-down-variant.svg":64762,"./caret-down.svg":58021,"./caret-left.svg":28069,"./caret-right.svg":14341,"./caret-up.svg":7359,"./caret.svg":94457,"./check-circle.svg":33862,"./check.svg":11379,"./checkmark.svg":70190,"./clockwise.svg":791,"./close-button.svg":15708,"./close-circle.svg":33374,"./close.svg":58054,"./cloudy-border.svg":31466,"./cloudy-ellipse.svg":54278,"./cloudy-polygon.svg":16581,"./cloudy-rectangle.svg":9304,"./comment-filled.svg":13090,"./comment-indicator.svg":49253,"./comment.svg":112,"./compare-pin-drop-cursor.svg":53033,"./compare-select-point-indicator-black.svg":96373,"./content-editor.svg":51888,"./counterclockwise.svg":25746,"./cross-circle.svg":4587,"./dashed-ellipse.svg":47013,"./dashed-polygon.svg":68405,"./dashed-rectangle.svg":3508,"./debug.svg":25725,"./delete.svg":61019,"./digital-signatures/signature-error.svg":81950,"./digital-signatures/signature-valid.svg":96993,"./distance.svg":41400,"./document-comparison.svg":12299,"./document-crop.svg":3154,"./document-editor.svg":90385,"./document-page-portrait.svg":8571,"./drawing-closing-cursor.svg":14483,"./drawing-cursor.svg":95919,"./edit.svg":56735,"./editor/add.svg":80353,"./editor/duplicate.svg":21092,"./editor/extract.svg":1749,"./editor/help.svg":56283,"./editor/importDocument.svg":21289,"./editor/move.svg":92531,"./editor/moveLeft.svg":32560,"./editor/moveRight.svg":44390,"./editor/multiplePages.svg":26368,"./editor/redo.svg":44740,"./editor/remove.svg":50245,"./editor/rotateLeft.svg":50012,"./editor/rotateRight.svg":55902,"./editor/selectAll.svg":88695,"./editor/selectNone.svg":80606,"./editor/undo.svg":92570,"./ellipse-area.svg":9635,"./ellipse.svg":88738,"./exit-document-comparison.svg":12804,"./export-pdf.svg":27836,"./fd-button.svg":13475,"./fd-checkbox.svg":14852,"./fd-combobox.svg":74964,"./fd-date.svg":96748,"./fd-listbox.svg":38106,"./fd-radio.svg":65071,"./fd-signature.svg":9190,"./fd-text.svg":78236,"./fill-color.svg":59601,"./fit-page.svg":40865,"./fit-width.svg":21,"./font-size.svg":89882,"./font.svg":20626,"./form-button.svg":71043,"./form-checkbox.svg":64610,"./form-creator.svg":59257,"./form-signature.svg":42892,"./form-text.svg":38492,"./group.svg":18342,"./hamburger.svg":50618,"./highlight.svg":42534,"./highlighter.svg":81385,"./image.svg":32931,"./info.svg":46113,"./ink-eraser.svg":5085,"./ink.svg":84399,"./inpage-check-icon.svg":22171,"./italic.svg":99082,"./layout-config.svg":72483,"./layout-config/auto.svg":49273,"./layout-config/continuous.svg":31019,"./layout-config/double.svg":94342,"./layout-config/single.svg":9804,"./layout-config/view_rotate_left.svg":95179,"./layout-config/view_rotate_right.svg":42138,"./line-style.svg":81913,"./line-width.svg":62846,"./line.svg":12396,"./linecaps-dasharray.svg":43725,"./linestyle.svg":481,"./link.svg":55676,"./lock.svg":65883,"./marquee-zoom.svg":98790,"./measure.svg":53383,"./media.svg":67620,"./mention.svg":35122,"./more.svg":35487,"./multi-annotations-selection.svg":32356,"./not-editable.svg":58170,"./note-add.svg":8893,"./note-indicator.svg":52979,"./note.svg":38057,"./note/inline/check.svg":82904,"./note/inline/circle.svg":60605,"./note/inline/comment.svg":96280,"./note/inline/cross.svg":36135,"./note/inline/help.svg":26003,"./note/inline/insert.svg":52799,"./note/inline/key.svg":59011,"./note/inline/newParagraph.svg":91756,"./note/inline/note.svg":81221,"./note/inline/paragraph.svg":15170,"./note/inline/rightArrow.svg":24748,"./note/inline/rightPointer.svg":70568,"./note/inline/star.svg":5971,"./note/toolbar/check.svg":14496,"./note/toolbar/circle.svg":24941,"./note/toolbar/comment.svg":91552,"./note/toolbar/cross.svg":63581,"./note/toolbar/help.svg":49697,"./note/toolbar/insert.svg":25402,"./note/toolbar/key.svg":87065,"./note/toolbar/newParagraph.svg":31924,"./note/toolbar/note.svg":92122,"./note/toolbar/paragraph.svg":56481,"./note/toolbar/rightArrow.svg":30757,"./note/toolbar/rightPointer.svg":70207,"./note/toolbar/star.svg":91912,"./opacity.svg":53491,"./pan.svg":22446,"./perimeter.svg":66788,"./plus.svg":88232,"./polygon-area.svg":48450,"./polygon.svg":62327,"./polyline.svg":43070,"./precision.svg":77754,"./print.svg":54629,"./rectangle-area.svg":73940,"./rectangle.svg":15350,"./redact-rectangle.svg":73540,"./redact-text-highlighter.svg":45013,"./redaction-text-repeating.svg":27879,"./redaction-text-single.svg":88682,"./redaction.svg":1088,"./redo.svg":71980,"./remove-circled.svg":23093,"./rotate.svg":64377,"./scale.svg":69695,"./search.svg":47591,"./sidebar-annotations.svg":93687,"./sidebar-bookmarks.svg":81013,"./sidebar-document-outline.svg":40013,"./sidebar-thumbnails.svg":65297,"./signature.svg":17285,"./single-page.svg":99071,"./squiggle.svg":3743,"./stamp.svg":10524,"./status-completed.svg":17076,"./strikeout.svg":40958,"./stroke-color.svg":35147,"./text-align-horizontal-center.svg":33601,"./text-align-horizontal-left.svg":65908,"./text-align-horizontal-right.svg":67858,"./text-align-vertical-bottom.svg":23637,"./text-align-vertical-center.svg":17526,"./text-align-vertical-top.svg":1792,"./text-color.svg":19587,"./text-highlighter.svg":65788,"./text.svg":22203,"./underline.svg":80394,"./undo.svg":10875,"./ungroup.svg":74223,"./unlock.svg":96242,"./user-hint.svg":96462,"./user.svg":32443,"./warning-2.svg":73986,"./warning-3.svg":78339,"./warning.svg":14896,"./widget_ccw.svg":95618,"./widget_cw.svg":55426,"./zoom-in.svg":62660,"./zoom-out.svg":42762};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=79230},89457:(e,t,n)=>{var o={"./add-text-box.svg":92982,"./add.svg":10713,"./all-pages.svg":80525,"./annotate.svg":38070,"./anonymous.svg":15445,"./arrow-up.svg":96447,"./arrow.svg":42823,"./back.svg":13179,"./blend-mode.svg":6916,"./bold.svg":99604,"./bookmark-active.svg":39802,"./border-color.svg":12568,"./calibrate.svg":96810,"./callout.svg":40885,"./caret-down-variant.svg":64762,"./caret-down.svg":58021,"./caret-left.svg":28069,"./caret-right.svg":14341,"./caret-up.svg":7359,"./caret.svg":94457,"./check-circle.svg":33862,"./check.svg":11379,"./checkmark.svg":70190,"./clockwise.svg":791,"./close-button.svg":15708,"./close-circle.svg":33374,"./close.svg":58054,"./cloudy-border.svg":31466,"./cloudy-ellipse.svg":54278,"./cloudy-polygon.svg":16581,"./cloudy-rectangle.svg":9304,"./comment-filled.svg":13090,"./comment-indicator.svg":49253,"./comment.svg":112,"./compare-pin-drop-cursor.svg":53033,"./compare-select-point-indicator-black.svg":96373,"./content-editor.svg":51888,"./counterclockwise.svg":25746,"./cross-circle.svg":4587,"./dashed-ellipse.svg":47013,"./dashed-polygon.svg":68405,"./dashed-rectangle.svg":3508,"./debug.svg":25725,"./delete.svg":61019,"./digital-signatures/signature-error.svg":81950,"./digital-signatures/signature-valid.svg":96993,"./distance.svg":41400,"./document-comparison.svg":12299,"./document-crop.svg":3154,"./document-editor.svg":90385,"./document-page-portrait.svg":8571,"./drawing-closing-cursor.svg":14483,"./drawing-cursor.svg":95919,"./edit.svg":56735,"./editor/add.svg":80353,"./editor/duplicate.svg":21092,"./editor/extract.svg":1749,"./editor/help.svg":56283,"./editor/importDocument.svg":21289,"./editor/move.svg":92531,"./editor/moveLeft.svg":32560,"./editor/moveRight.svg":44390,"./editor/multiplePages.svg":26368,"./editor/redo.svg":44740,"./editor/remove.svg":50245,"./editor/rotateLeft.svg":50012,"./editor/rotateRight.svg":55902,"./editor/selectAll.svg":88695,"./editor/selectNone.svg":80606,"./editor/undo.svg":92570,"./ellipse-area.svg":9635,"./ellipse.svg":88738,"./exit-document-comparison.svg":12804,"./export-pdf.svg":27836,"./fd-button.svg":13475,"./fd-checkbox.svg":14852,"./fd-combobox.svg":74964,"./fd-date.svg":96748,"./fd-listbox.svg":38106,"./fd-radio.svg":65071,"./fd-signature.svg":9190,"./fd-text.svg":78236,"./fill-color.svg":59601,"./fit-page.svg":40865,"./fit-width.svg":21,"./font-size.svg":89882,"./font.svg":20626,"./form-button.svg":71043,"./form-checkbox.svg":64610,"./form-creator.svg":59257,"./form-signature.svg":42892,"./form-text.svg":38492,"./group.svg":18342,"./hamburger.svg":50618,"./highlight.svg":42534,"./highlighter.svg":81385,"./image.svg":32931,"./info.svg":46113,"./ink-eraser.svg":5085,"./ink.svg":84399,"./inpage-check-icon.svg":22171,"./italic.svg":99082,"./layout-config.svg":72483,"./layout-config/auto.svg":49273,"./layout-config/continuous.svg":31019,"./layout-config/double.svg":94342,"./layout-config/single.svg":9804,"./layout-config/view_rotate_left.svg":95179,"./layout-config/view_rotate_right.svg":42138,"./line-style.svg":81913,"./line-width.svg":62846,"./line.svg":12396,"./linecaps-dasharray.svg":43725,"./linestyle.svg":481,"./link.svg":55676,"./lock.svg":65883,"./marquee-zoom.svg":98790,"./measure.svg":53383,"./media.svg":67620,"./mention.svg":35122,"./more.svg":35487,"./multi-annotations-selection.svg":32356,"./not-editable.svg":58170,"./note-add.svg":8893,"./note-indicator.svg":52979,"./note.svg":38057,"./note/inline/check.svg":82904,"./note/inline/circle.svg":60605,"./note/inline/comment.svg":96280,"./note/inline/cross.svg":36135,"./note/inline/help.svg":26003,"./note/inline/insert.svg":52799,"./note/inline/key.svg":59011,"./note/inline/newParagraph.svg":91756,"./note/inline/note.svg":81221,"./note/inline/paragraph.svg":15170,"./note/inline/rightArrow.svg":24748,"./note/inline/rightPointer.svg":70568,"./note/inline/star.svg":5971,"./note/toolbar/check.svg":14496,"./note/toolbar/circle.svg":24941,"./note/toolbar/comment.svg":91552,"./note/toolbar/cross.svg":63581,"./note/toolbar/help.svg":49697,"./note/toolbar/insert.svg":25402,"./note/toolbar/key.svg":87065,"./note/toolbar/newParagraph.svg":31924,"./note/toolbar/note.svg":92122,"./note/toolbar/paragraph.svg":56481,"./note/toolbar/rightArrow.svg":30757,"./note/toolbar/rightPointer.svg":70207,"./note/toolbar/star.svg":91912,"./opacity.svg":53491,"./pan.svg":22446,"./perimeter.svg":66788,"./plus.svg":88232,"./polygon-area.svg":48450,"./polygon.svg":62327,"./polyline.svg":43070,"./precision.svg":77754,"./print.svg":54629,"./rectangle-area.svg":73940,"./rectangle.svg":15350,"./redact-rectangle.svg":73540,"./redact-text-highlighter.svg":45013,"./redaction-text-repeating.svg":27879,"./redaction-text-single.svg":88682,"./redaction.svg":1088,"./redo.svg":71980,"./remove-circled.svg":23093,"./rotate.svg":64377,"./scale.svg":69695,"./search.svg":47591,"./sidebar-annotations.svg":93687,"./sidebar-bookmarks.svg":81013,"./sidebar-document-outline.svg":40013,"./sidebar-thumbnails.svg":65297,"./signature.svg":17285,"./single-page.svg":99071,"./squiggle.svg":3743,"./stamp.svg":10524,"./status-completed.svg":17076,"./strikeout.svg":40958,"./stroke-color.svg":35147,"./text-align-horizontal-center.svg":33601,"./text-align-horizontal-left.svg":65908,"./text-align-horizontal-right.svg":67858,"./text-align-vertical-bottom.svg":23637,"./text-align-vertical-center.svg":17526,"./text-align-vertical-top.svg":1792,"./text-color.svg":19587,"./text-highlighter.svg":65788,"./text.svg":22203,"./underline.svg":80394,"./undo.svg":10875,"./ungroup.svg":74223,"./unlock.svg":96242,"./user-hint.svg":96462,"./user.svg":32443,"./warning-2.svg":73986,"./warning-3.svg":78339,"./warning.svg":14896,"./widget_ccw.svg":95618,"./widget_cw.svg":55426,"./zoom-in.svg":62660,"./zoom-out.svg":42762};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=89457},35982:(e,t,n)=>{var o={"./caret-down-variant.svg":64762,"./caret-down.svg":58021,"./caret-left.svg":28069,"./caret-right.svg":14341,"./caret-up.svg":7359};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=35982},58758:(e,t,n)=>{var o={"./text-align-horizontal-center.svg":33601,"./text-align-horizontal-left.svg":65908,"./text-align-horizontal-right.svg":67858};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=58758},29712:(e,t,n)=>{var o={"./text-align-vertical-bottom.svg":23637,"./text-align-vertical-center.svg":17526,"./text-align-vertical-top.svg":1792};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=29712},34988:(e,t,n)=>{var o;!function(r,i,a,s){"use strict";var l,c=["","webkit","Moz","MS","ms","o"],u=i.createElement("div"),d=Math.round,p=Math.abs,f=Date.now;function h(e,t,n){return setTimeout(S(e,n),t)}function m(e,t,n){return!!Array.isArray(e)&&(g(e,n[t],n),!0)}function g(e,t,n){var o;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==s)for(o=0;o<e.length;)t.call(n,e[o],o,e),o++;else for(o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o,e)}function v(e,t,n){var o="DEPRECATED METHOD: "+t+"\n"+n+" AT \n";return function(){var t=new Error("get-stack-trace"),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",i=r.console&&(r.console.warn||r.console.log);return i&&i.call(r.console,o,n),e.apply(this,arguments)}}l="function"!=typeof Object.assign?function(e){if(e===s||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var o=arguments[n];if(o!==s&&null!==o)for(var r in o)o.hasOwnProperty(r)&&(t[r]=o[r])}return t}:Object.assign;var y=v((function(e,t,n){for(var o=Object.keys(t),r=0;r<o.length;)(!n||n&&e[o[r]]===s)&&(e[o[r]]=t[o[r]]),r++;return e}),"extend","Use `assign`."),b=v((function(e,t){return y(e,t,!0)}),"merge","Use `assign`.");function w(e,t,n){var o,r=t.prototype;(o=e.prototype=Object.create(r)).constructor=e,o._super=r,n&&l(o,n)}function S(e,t){return function(){return e.apply(t,arguments)}}function P(e,t){return"function"==typeof e?e.apply(t&&t[0]||s,t):e}function E(e,t){return e===s?t:e}function x(e,t,n){g(O(t),(function(t){e.addEventListener(t,n,!1)}))}function D(e,t,n){g(O(t),(function(t){e.removeEventListener(t,n,!1)}))}function C(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function k(e,t){return e.indexOf(t)>-1}function O(e){return e.trim().split(/\s+/g)}function A(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var o=0;o<e.length;){if(n&&e[o][n]==t||!n&&e[o]===t)return o;o++}return-1}function T(e){return Array.prototype.slice.call(e,0)}function I(e,t,n){for(var o=[],r=[],i=0;i<e.length;){var a=t?e[i][t]:e[i];A(r,a)<0&&o.push(e[i]),r[i]=a,i++}return n&&(o=t?o.sort((function(e,n){return e[t]>n[t]})):o.sort()),o}function F(e,t){for(var n,o,r=t[0].toUpperCase()+t.slice(1),i=0;i<c.length;){if((o=(n=c[i])?n+r:t)in e)return o;i++}return s}var M=1;function _(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||r}var N="ontouchstart"in r,R=F(r,"PointerEvent")!==s,L=N&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),B="touch",j="mouse",z=24,K=["x","y"],Z=["clientX","clientY"];function U(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){P(e.options.enable,[e])&&n.handler(t)},this.init()}function V(e,t,n){var o=n.pointers.length,r=n.changedPointers.length,i=1&t&&o-r==0,a=12&t&&o-r==0;n.isFirst=!!i,n.isFinal=!!a,i&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,o=t.pointers,r=o.length;n.firstInput||(n.firstInput=G(t));r>1&&!n.firstMultiple?n.firstMultiple=G(t):1===r&&(n.firstMultiple=!1);var i=n.firstInput,a=n.firstMultiple,l=a?a.center:i.center,c=t.center=W(o);t.timeStamp=f(),t.deltaTime=t.timeStamp-i.timeStamp,t.angle=X(l,c),t.distance=$(l,c),function(e,t){var n=t.center,o=e.offsetDelta||{},r=e.prevDelta||{},i=e.prevInput||{};1!==t.eventType&&4!==i.eventType||(r=e.prevDelta={x:i.deltaX||0,y:i.deltaY||0},o=e.offsetDelta={x:n.x,y:n.y});t.deltaX=r.x+(n.x-o.x),t.deltaY=r.y+(n.y-o.y)}(n,t),t.offsetDirection=H(t.deltaX,t.deltaY);var u=q(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=u.x,t.overallVelocityY=u.y,t.overallVelocity=p(u.x)>p(u.y)?u.x:u.y,t.scale=a?(d=a.pointers,h=o,$(h[0],h[1],Z)/$(d[0],d[1],Z)):1,t.rotation=a?function(e,t){return X(t[1],t[0],Z)+X(e[1],e[0],Z)}(a.pointers,o):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,o,r,i,a=e.lastInterval||t,l=t.timeStamp-a.timeStamp;if(8!=t.eventType&&(l>25||a.velocity===s)){var c=t.deltaX-a.deltaX,u=t.deltaY-a.deltaY,d=q(l,c,u);o=d.x,r=d.y,n=p(d.x)>p(d.y)?d.x:d.y,i=H(c,u),e.lastInterval=t}else n=a.velocity,o=a.velocityX,r=a.velocityY,i=a.direction;t.velocity=n,t.velocityX=o,t.velocityY=r,t.direction=i}(n,t);var d,h;var m=e.element;C(t.srcEvent.target,m)&&(m=t.srcEvent.target);t.target=m}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function G(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:d(e.pointers[n].clientX),clientY:d(e.pointers[n].clientY)},n++;return{timeStamp:f(),pointers:t,center:W(t),deltaX:e.deltaX,deltaY:e.deltaY}}function W(e){var t=e.length;if(1===t)return{x:d(e[0].clientX),y:d(e[0].clientY)};for(var n=0,o=0,r=0;r<t;)n+=e[r].clientX,o+=e[r].clientY,r++;return{x:d(n/t),y:d(o/t)}}function q(e,t,n){return{x:t/e||0,y:n/e||0}}function H(e,t){return e===t?1:p(e)>=p(t)?e<0?2:4:t<0?8:16}function $(e,t,n){n||(n=K);var o=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return Math.sqrt(o*o+r*r)}function X(e,t,n){n||(n=K);var o=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return 180*Math.atan2(r,o)/Math.PI}U.prototype={handler:function(){},init:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(_(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&D(this.element,this.evEl,this.domHandler),this.evTarget&&D(this.target,this.evTarget,this.domHandler),this.evWin&&D(_(this.element),this.evWin,this.domHandler)}};var Y={mousedown:1,mousemove:2,mouseup:4},J="mousedown",Q="mousemove mouseup";function ee(){this.evEl=J,this.evWin=Q,this.pressed=!1,U.apply(this,arguments)}w(ee,U,{handler:function(e){var t=Y[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:j,srcEvent:e}))}});var te={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},ne={2:B,3:"pen",4:j,5:"kinect"},oe="pointerdown",re="pointermove pointerup pointercancel";function ie(){this.evEl=oe,this.evWin=re,U.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(oe="MSPointerDown",re="MSPointerMove MSPointerUp MSPointerCancel"),w(ie,U,{handler:function(e){var t=this.store,n=!1,o=e.type.toLowerCase().replace("ms",""),r=te[o],i=ne[e.pointerType]||e.pointerType,a=i==B,s=A(t,e.pointerId,"pointerId");1&r&&(0===e.button||a)?(e.isPrimary&&t.length>0&&(this.store=this.manager.session.pointerEvents=[]),s<0&&(t.push(e),s=t.length-1)):12&r&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(s,1))}});var ae={touchstart:1,touchmove:2,touchend:4,touchcancel:8},se="touchstart",le="touchstart touchmove touchend touchcancel";function ce(){this.evTarget=se,this.evWin=le,this.started=!1,U.apply(this,arguments)}function ue(e,t){var n=T(e.touches),o=T(e.changedTouches);return 12&t&&(n=I(n.concat(o),"identifier",!0)),[n,o]}w(ce,U,{handler:function(e){var t=ae[e.type];if(1===t&&(this.started=!0),this.started){var n=ue.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:B,srcEvent:e})}}});var de={touchstart:1,touchmove:2,touchend:4,touchcancel:8},pe="touchstart touchmove touchend touchcancel";function fe(){this.evTarget=pe,this.targetIds={},U.apply(this,arguments)}function he(e,t){var n=T(e.touches),o=this.targetIds;if(3&t&&1===n.length)return o[n[0].identifier]=!0,[n,n];var r,i,a=T(e.changedTouches),s=[],l=this.target;if(i=n.filter((function(e){return C(e.target,l)})),1===t)for(r=0;r<i.length;)o[i[r].identifier]=!0,r++;for(r=0;r<a.length;)o[a[r].identifier]&&s.push(a[r]),12&t&&delete o[a[r].identifier],r++;return s.length?[I(i.concat(s),"identifier",!0),s]:void 0}w(fe,U,{handler:function(e){var t=de[e.type],n=he.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:B,srcEvent:e})}});function me(){U.apply(this,arguments);var e=S(this.handler,this);this.touch=new fe(this.manager,e),this.mouse=new ee(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function ge(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,ve.call(this,t)):12&e&&ve.call(this,t)}function ve(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var o=this.lastTouches;setTimeout((function(){var e=o.indexOf(n);e>-1&&o.splice(e,1)}),2500)}}function ye(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,o=0;o<this.lastTouches.length;o++){var r=this.lastTouches[o],i=Math.abs(t-r.x),a=Math.abs(n-r.y);if(i<=25&&a<=25)return!0}return!1}w(me,U,{handler:function(e,t,n){var o=n.pointerType==B,r=n.pointerType==j;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(o)ge.call(this,t,n);else if(r&&ye.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var be=F(u.style,"touchAction"),we=be!==s,Se="compute",Pe="auto",Ee="manipulation",xe="none",De="pan-x",Ce="pan-y",ke=function(){if(!we)return!1;var e={},t=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){e[n]=!t||r.CSS.supports("touch-action",n)})),e}();function Oe(e,t){this.manager=e,this.set(t)}Oe.prototype={set:function(e){e==Se&&(e=this.compute()),we&&this.manager.element.style&&ke[e]&&(this.manager.element.style[be]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return g(this.manager.recognizers,(function(t){P(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(k(e,xe))return xe;var t=k(e,De),n=k(e,Ce);if(t&&n)return xe;if(t||n)return t?De:Ce;if(k(e,Ee))return Ee;return Pe}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var o=this.actions,r=k(o,xe)&&!ke.none,i=k(o,Ce)&&!ke["pan-y"],a=k(o,De)&&!ke["pan-x"];if(r){var s=1===e.pointers.length,l=e.distance<2,c=e.deltaTime<250;if(s&&l&&c)return}if(!a||!i)return r||i&&6&n||a&&n&z?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var Ae=32;function Te(e){this.options=l({},this.defaults,e||{}),this.id=M++,this.manager=null,this.options.enable=E(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Ie(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function Fe(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function Me(e,t){var n=t.manager;return n?n.get(e):e}function _e(){Te.apply(this,arguments)}function Ne(){_e.apply(this,arguments),this.pX=null,this.pY=null}function Re(){_e.apply(this,arguments)}function Le(){Te.apply(this,arguments),this._timer=null,this._input=null}function Be(){_e.apply(this,arguments)}function je(){_e.apply(this,arguments)}function ze(){Te.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Ke(e,t){return(t=t||{}).recognizers=E(t.recognizers,Ke.defaults.preset),new Ze(e,t)}Te.prototype={defaults:{},set:function(e){return l(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(m(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=Me(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return m(e,"dropRecognizeWith",this)||(e=Me(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(m(e,"requireFailure",this))return this;var t=this.requireFail;return-1===A(t,e=Me(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(m(e,"dropRequireFailure",this))return this;e=Me(e,this);var t=A(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function o(n){t.manager.emit(n,e)}n<8&&o(t.options.event+Ie(n)),o(t.options.event),e.additionalEvent&&o(e.additionalEvent),n>=8&&o(t.options.event+Ie(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=Ae},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},recognize:function(e){var t=l({},e);if(!P(this.options.enable,[this,t]))return this.reset(),void(this.state=Ae);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},w(_e,Te,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,o=6&t,r=this.attrTest(e);return o&&(8&n||!r)?16|t:o||r?4&n?8|t:2&t?4|t:2:Ae}}),w(Ne,_e,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push(Ce),e&z&&t.push(De),t},directionTest:function(e){var t=this.options,n=!0,o=e.distance,r=e.direction,i=e.deltaX,a=e.deltaY;return r&t.direction||(6&t.direction?(r=0===i?1:i<0?2:4,n=i!=this.pX,o=Math.abs(e.deltaX)):(r=0===a?1:a<0?8:16,n=a!=this.pY,o=Math.abs(e.deltaY))),e.direction=r,n&&o>t.threshold&&r&t.direction},attrTest:function(e){return _e.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Fe(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),w(Re,_e,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[xe]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),w(Le,Te,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Pe]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,o=e.distance<t.threshold,r=e.deltaTime>t.time;if(this._input=e,!o||!n||12&e.eventType&&!r)this.reset();else if(1&e.eventType)this.reset(),this._timer=h((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return Ae},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),w(Be,_e,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[xe]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),w(je,_e,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Ne.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:n&z&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&p(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=Fe(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),w(ze,Te,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ee]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,o=e.distance<t.threshold,r=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(o&&r&&n){if(4!=e.eventType)return this.failTimeout();var i=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||$(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&i?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=h((function(){this.state=8,this.tryEmit()}),t.interval,this),2):8}return Ae},failTimeout:function(){return this._timer=h((function(){this.state=Ae}),this.options.interval,this),Ae},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Ke.VERSION="2.0.7",Ke.defaults={domEvents:!1,touchAction:Se,enable:!0,inputTarget:null,inputClass:null,preset:[[Be,{enable:!1}],[Re,{enable:!1},["rotate"]],[je,{direction:6}],[Ne,{direction:6},["swipe"]],[ze],[ze,{event:"doubletap",taps:2},["tap"]],[Le]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Ze(e,t){var n;this.options=l({},Ke.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(R?ie:L?fe:N?me:ee))(n,V),this.touchAction=new Oe(this,this.options.touchAction),Ue(this,!0),g(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function Ue(e,t){var n,o=e.element;o.style&&(g(e.options.cssProps,(function(r,i){n=F(o.style,i),t?(e.oldCssProps[n]=o.style[n],o.style[n]=r):o.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}Ze.prototype={set:function(e){return l(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var o=this.recognizers,r=t.curRecognizer;(!r||r&&8&r.state)&&(r=t.curRecognizer=null);for(var i=0;i<o.length;)n=o[i],2===t.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(e),!r&&14&n.state&&(r=t.curRecognizer=n),i++}},get:function(e){if(e instanceof Te)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(m(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(m(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=A(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==s&&t!==s){var n=this.handlers;return g(O(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(e!==s){var n=this.handlers;return g(O(e),(function(e){t?n[e]&&n[e].splice(A(n[e],t),1):delete n[e]})),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var n=i.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var o=0;o<n.length;)n[o](t),o++}},destroy:function(){this.element&&Ue(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},l(Ke,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:Ae,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:z,DIRECTION_ALL:30,Manager:Ze,Input:U,TouchAction:Oe,TouchInput:fe,MouseInput:ee,PointerEventInput:ie,TouchMouseInput:me,SingleTouchInput:ce,Recognizer:Te,AttrRecognizer:_e,Tap:ze,Pan:Ne,Swipe:je,Pinch:Re,Rotate:Be,Press:Le,on:x,off:D,each:g,merge:b,extend:y,assign:l,inherit:w,bindFn:S,prefixed:F}),(void 0!==r?r:"undefined"!=typeof self?self:{}).Hammer=Ke,(o=function(){return Ke}.call(t,n,t,e))===s||(e.exports=o)}(window,document)}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={exports:{}};return r[e].call(n.exports,n,n.exports,a),n.exports}return a.m=r,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var r=Object.create(null);a.r(r);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>i[e]=()=>n[e]));return i.default=()=>n,a.d(r,i),r},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,n)=>(a.f[n](e,t),t)),[])),a.u=e=>"pspdfkit-lib/chunk-"+({157:"locale-hr",407:"locale-tr",473:"locale-es",517:"locale-pt",752:"localedata-da",1009:"locale-de",1063:"localedata-th",1077:"localedata-sk",1089:"localedata-ko",1139:"locale-da",1145:"localedata-fr",1168:"locale-ko",1252:"localedata-es",1277:"localedata-sl",1323:"locale-el",1385:"localedata-ru",1391:"locale-ms",1518:"localedata-ms",1843:"localedata-uk",1874:"locale-en",1882:"localedata-el",2279:"localedata-nb",2333:"server-instant",2727:"localedata-sv",2916:"locale-fr-CA",3005:"localedata-cs",3095:"locale-uk",3360:"locale-fr",3424:"localedata-it",3463:"locale-ja",3579:"locale-cs",3610:"standalone",4072:"localedata-zh",4099:"server-rest",4536:"lazy-e459d8bd",4728:"localedata-ja",4899:"locale-pl",4932:"localedata-pt",4966:"locale-nb-NO",5014:"localedata-en",5192:"localedata-id",5431:"locale-pt-PT",5528:"localedata-fi",5595:"locale-sl",5666:"locale-th",5677:"locale-nl",5747:"lazy-bd921099",6045:"locale-en-GB",6377:"server",6523:"localedata-pl",6530:"locale-sv",6678:"locale-zh-Hans",7050:"localedata-cy",7578:"locale-cy",7579:"locale-zh-Hant",8057:"locale-ru",8839:"locale-it",8869:"localedata-de",9384:"localedata-tr",9390:"locale-fi",9486:"localedata-nl",9677:"localedata-hr",9726:"locale-id",9971:"locale-sk"}[e]||e)+"-"+{157:"903b976e9cad18e6",407:"8b97d09c42078a26",473:"10bc29ef512b9227",517:"f364c942fabb6c5a",752:"2277a49bada5f415",1009:"f7400d38edccded8",1063:"69beaff1c2e3af7e",1077:"52704eb81d09ae89",1089:"4340d884ab33ceed",1139:"523c627899f0a2ee",1145:"693929b40bfd226b",1168:"4eaa81966e1329b9",1252:"c4336577aaa1ae3e",1277:"611885e0a3e66a66",1323:"8530738cb41c7cf7",1385:"90173defab18c4fb",1391:"5225048771b580af",1518:"2060de3dfdb95117",1620:"dcca73317a66fc4c",1843:"41ac716f712c86b9",1874:"24cb62dc4bad4487",1882:"060f52dc5fea36c6",2279:"58dd5b0bce58eb4d",2333:"0f2514df2c8be1d7",2727:"fed1d6c4bd1a1fec",2916:"a6a3ddfe0fc19822",3005:"c366085523db19e8",3095:"a7a5da33c16216d8",3360:"86a1faa95c54f884",3424:"eb799026cfabc61e",3463:"a9b6afff2ad0c00e",3579:"321ca440149ba7bf",3610:"816bbfab77174011",4072:"585229c41a8d5ec4",4099:"2b0596adba36dd22",4536:"879c3c5897deb3a4",4728:"abd9cf05b9ee281f",4899:"4445d1f4760cbfc5",4932:"54a5083c6fc30919",4966:"0e2fae0fb4e7acbe",5014:"117bd3cebba0cf2f",5192:"e98e6bc0ba4efb6c",5431:"afee4b28fc8aaf77",5528:"fa353fdab4828c43",5595:"f76abfcf13a75899",5666:"5854aa1a6778ac95",5677:"8719b7d930283a2d",5747:"1045f02e8a7baca1",6045:"4e3b84cb97e44b85",6377:"285e3bf0e27beb60",6523:"3e1b0525d48ab910",6530:"f31d2ff5af0bf5cc",6678:"86cb0781567a0a19",7050:"742139159bf11e72",7578:"b5c03bedc0b129e0",7579:"167b3461f8d87580",8057:"ec9f2b5cbbde6b12",8839:"81246aef5f129295",8869:"28a08e1b996b6870",9384:"6ea055f730cedd49",9390:"dad772a62cde4878",9486:"1a37147c1d7de33e",9677:"fe1fa56dd5867336",9726:"eaa366a690a1c61c",9859:"404d79cf3e74fbea",9971:"0695ab47210c3720"}[e]+".js",a.miniCssF=e=>{},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},o="PSPDFKit:",a.l=(e,t,r,i)=>{if(n[e])n[e].push(t);else{var s,l;if(void 0!==r)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==o+r){s=d;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",o+r),s.src=e),n[e]=[t];var p=(t,o)=>{s.onerror=s.onload=null,clearTimeout(f);var r=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),r&&r.forEach((e=>e(o))),t)return t(o)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),l&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.p="",(()=>{var e={1026:0};a.f.j=(t,n)=>{var o=a.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else{var r=new Promise(((n,r)=>o=e[t]=[n,r]));n.push(o[2]=r);var i=a.p+a.u(t),s=new Error;a.l(i,(n=>{if(a.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var r=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+i+")",s.name="ChunkLoadError",s.type=r,s.request=i,o[1](s)}}),"chunk-"+t,t)}};var t=(t,n)=>{var o,r,[i,s,l]=n,c=0;if(i.some((t=>0!==e[t]))){for(o in s)a.o(s,o)&&(a.m[o]=s[o]);if(l)l(a)}for(t&&t(n);c<i.length;c++)r=i[c],a.o(e,r)&&e[r]&&e[r][0](),e[r]=0},n=self.webpackChunkPSPDFKit=self.webpackChunkPSPDFKit||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),a.nc=void 0,a(3479)})()));