pdf-annotator-react
Version:
A React component library for PDF annotation
10 lines • 88.3 kB
JavaScript
import e,{useMemo as t,useRef as r,useState as n,useCallback as o,useEffect as a,forwardRef as i,createElement as c,useImperativeHandle as s}from"react";import*as l from"pdfjs-dist";!function(e,t){void 0===t&&(t={});var r=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.-bottom-1{bottom:-.25rem}.-top-10{top:-2.5rem}.left-0{left:0}.left-1\\/2{left:50%}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.z-50{z-index:50}.mx-1{margin-left:.25rem;margin-right:.25rem}.mb-1{margin-bottom:.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-2\\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-2{height:.5rem}.h-4{height:1rem}.h-8{height:2rem}.h-full{height:100%}.max-h-40{max-height:10rem}.max-h-\\[100px\\]{max-height:100px}.max-h-\\[150px\\]{max-height:150px}.max-h-\\[160px\\]{max-height:160px}.max-h-\\[180px\\]{max-height:180px}.max-h-\\[90vh\\]{max-height:90vh}.min-h-\\[100px\\]{min-height:100px}.min-h-\\[150px\\]{min-height:150px}.min-h-\\[40px\\]{min-height:40px}.min-h-\\[5rem\\]{min-height:5rem}.min-h-\\[80px\\]{min-height:80px}.min-h-full{min-height:100%}.w-1\\/2{width:50%}.w-2{width:.5rem}.w-4{width:1rem}.w-64{width:16rem}.w-\\[360px\\]{width:360px}.w-\\[600px\\]{width:600px}.w-auto{width:auto}.w-full{width:100%}.min-w-\\[250px\\]{min-width:250px}.min-w-\\[300px\\]{min-width:300px}.max-w-\\[120px\\]{max-width:120px}.max-w-\\[200px\\]{max-width:200px}.max-w-md{max-width:28rem}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.rotate-45{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-45{--tw-rotate:45deg}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.resize{resize:both}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;white-space:nowrap}.text-ellipsis,.truncate{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-bl-md{border-bottom-left-radius:.375rem}.border{border-width:1px}.border-0{border-width:0}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.p-0{padding:0}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-4{padding-bottom:1rem;padding-top:1rem}.pl-3{padding-left:.75rem}.pr-10{padding-right:2.5rem}.text-left{text-align:left}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.opacity-50{opacity:.5}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px rgba(0,0,0,.1)) drop-shadow(0 1px 1px rgba(0,0,0,.06))}.drop-shadow,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-shadow{transition-duration:.15s;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.last\\:mb-0:last-child{margin-bottom:0}.hover\\:bg-blue-200:hover{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity,1))}.hover\\:bg-blue-50:hover{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.hover\\:bg-blue-600:hover{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.hover\\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.hover\\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.hover\\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\\:bg-red-200:hover{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}.hover\\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\\:text-red-500:hover{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}@media (min-width:640px){.sm\\:block{display:block}.sm\\:inline{display:inline}.sm\\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.sm\\:px-4{padding-left:1rem;padding-right:1rem}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:768px){.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:w-48{width:12rem}.md\\:w-auto{width:auto}.md\\:flex-row{flex-direction:row}.md\\:flex-wrap{flex-wrap:wrap}.md\\:items-center{align-items:center}.md\\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.md\\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}}',{insertAt:"top"});var d=function(){return d=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)};function u(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function c(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}s((n=n.apply(e,t||[])).next())}))}function p(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}}function h(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var f,g={exports:{}},m={};var x,b={};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/"production"===process.env.NODE_ENV?g.exports=function(){if(f)return m;f=1;var t=e,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var c,s={},l=null,d=null;for(c in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(d=t.ref),t)o.call(t,c)&&!i.hasOwnProperty(c)&&(s[c]=t[c]);if(e&&e.defaultProps)for(c in t=e.defaultProps)void 0===s[c]&&(s[c]=t[c]);return{$$typeof:r,type:e,key:l,ref:d,props:s,_owner:a.current}}return m.Fragment=n,m.jsx=c,m.jsxs=c,m}():g.exports=(x||(x=1,"production"!==process.env.NODE_ENV&&function(){var t,r=e,n=Symbol.for("react.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),m=Symbol.iterator,x=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];!function(e,t,r){var n=x.ReactDebugCurrentFrame.getStackAddendum();""!==n&&(t+="%s",r=r.concat([n]));var o=r.map((function(e){return String(e)}));o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}("error",e,r)}function y(e){return e.displayName||"Context"}function v(e){if(null==e)return null;if("number"==typeof e.tag&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case a:return"Fragment";case o:return"Portal";case c:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case p:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case l:return y(e)+".Consumer";case s:return y(e._context)+".Provider";case d:return function(e,t,r){var n=e.displayName;if(n)return n;var o=t.displayName||t.name||"";return""!==o?r+"("+o+")":r}(e,e.render,"ForwardRef");case h:var t=e.displayName||null;return null!==t?t:v(e.type)||"Memo";case f:var r=e,n=r._payload,g=r._init;try{return v(g(n))}catch(e){return null}}return null}t=Symbol.for("react.module.reference");var j,N,k,C,E,T,I,O=Object.assign,A=0;function S(){}S.__reactDisabledLog=!0;var L,M=x.ReactCurrentDispatcher;function z(e,t,r){if(void 0===L)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);L=n&&n[1]||""}return"\n"+L+e}var R,P=!1,D="function"==typeof WeakMap?WeakMap:Map;function H(e,t){if(!e||P)return"";var r,n=R.get(e);if(void 0!==n)return n;P=!0;var o,a=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=M.current,M.current=null,function(){if(0===A){j=console.log,N=console.info,k=console.warn,C=console.error,E=console.group,T=console.groupCollapsed,I=console.groupEnd;var e={configurable:!0,enumerable:!0,value:S,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}A++}();try{if(t){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(i,[])}catch(e){r=e}Reflect.construct(e,[],i)}else{try{i.call()}catch(e){r=e}e.call(i.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var c=t.stack.split("\n"),s=r.stack.split("\n"),l=c.length-1,d=s.length-1;l>=1&&d>=0&&c[l]!==s[d];)d--;for(;l>=1&&d>=0;l--,d--)if(c[l]!==s[d]){if(1!==l||1!==d)do{if(l--,--d<0||c[l]!==s[d]){var u="\n"+c[l].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),"function"==typeof e&&R.set(e,u),u}}while(l>=1&&d>=0);break}}}finally{P=!1,M.current=o,function(){if(0==--A){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:O({},e,{value:j}),info:O({},e,{value:N}),warn:O({},e,{value:k}),error:O({},e,{value:C}),group:O({},e,{value:E}),groupCollapsed:O({},e,{value:T}),groupEnd:O({},e,{value:I})})}A<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=a}var p=e?e.displayName||e.name:"",h=p?z(p):"";return"function"==typeof e&&R.set(e,h),h}function G(e,t,r){if(null==e)return"";if("function"==typeof e)return H(e,!(!(n=e.prototype)||!n.isReactComponent));var n;if("string"==typeof e)return z(e);switch(e){case u:return z("Suspense");case p:return z("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case d:return H(e.render,!1);case h:return G(e.type,t,r);case f:var o=e,a=o._payload,i=o._init;try{return G(i(a),t,r)}catch(e){}}return""}R=new D;var _=Object.prototype.hasOwnProperty,W={},U=x.ReactDebugCurrentFrame;function F(e){if(e){var t=e._owner,r=G(e.type,e._source,t?t.type:null);U.setExtraStackFrame(r)}else U.setExtraStackFrame(null)}var B=Array.isArray;function $(e){return B(e)}function V(e){return""+e}function X(e){if(function(e){try{return V(e),!1}catch(e){return!0}}(e))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),V(e)}var Y,K,q=x.ReactCurrentOwner,J={key:!0,ref:!0,__self:!0,__source:!0};function Z(e,t,r,o,a){var i,c={},s=null,l=null;for(i in void 0!==r&&(X(r),s=""+r),function(e){if(_.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(X(t.key),s=""+t.key),function(e){if(_.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(l=t.ref,function(e){"string"==typeof e.ref&&q.current}(t)),t)_.call(t,i)&&!J.hasOwnProperty(i)&&(c[i]=t[i]);if(e&&e.defaultProps){var d=e.defaultProps;for(i in d)void 0===c[i]&&(c[i]=d[i])}if(s||l){var u="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var r=function(){Y||(Y=!0,w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}(c,u),l&&function(e,t){var r=function(){K||(K=!0,w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}(c,u)}return function(e,t,r,o,a,i,c){var s={$$typeof:n,type:e,key:t,ref:r,props:c,_owner:i,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,l,a,o,q.current,c)}var Q,ee=x.ReactCurrentOwner,te=x.ReactDebugCurrentFrame;function re(e){if(e){var t=e._owner,r=G(e.type,e._source,t?t.type:null);te.setExtraStackFrame(r)}else te.setExtraStackFrame(null)}function ne(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function oe(){if(ee.current){var e=v(ee.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}Q=!1;var ae={};function ie(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var r=function(e){var t=oe();if(!t){var r="string"==typeof e?e:e.displayName||e.name;r&&(t="\n\nCheck the top-level render call using <"+r+">.")}return t}(t);if(!ae[r]){ae[r]=!0;var n="";e&&e._owner&&e._owner!==ee.current&&(n=" It was passed a child from "+v(e._owner.type)+"."),re(e),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),re(null)}}}function ce(e,t){if("object"==typeof e)if($(e))for(var r=0;r<e.length;r++){var n=e[r];ne(n)&&ie(n,t)}else if(ne(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=m&&e[m]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var a,i=o.call(e);!(a=i.next()).done;)ne(a.value)&&ie(a.value,t)}}function se(e){var t,r=e.type;if(null!=r&&"string"!=typeof r){if("function"==typeof r)t=r.propTypes;else{if("object"!=typeof r||r.$$typeof!==d&&r.$$typeof!==h)return;t=r.propTypes}if(t){var n=v(r);!function(e,t,r,n,o){var a=Function.call.bind(_);for(var i in e)if(a(e,i)){var c=void 0;try{if("function"!=typeof e[i]){var s=Error((n||"React class")+": "+r+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}c=e[i](t,i,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){c=e}!c||c instanceof Error||(F(o),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,i,typeof c),F(null)),c instanceof Error&&!(c.message in W)&&(W[c.message]=!0,F(o),w("Failed %s type: %s",r,c.message),F(null))}}(t,e.props,"prop",n,e)}else void 0===r.PropTypes||Q||(Q=!0,w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",v(r)||"Unknown"));"function"!=typeof r.getDefaultProps||r.getDefaultProps.isReactClassApproved||w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}var le={};function de(e,r,o,m,x,b){var y=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===c||e===i||e===u||e===p||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===s||e.$$typeof===l||e.$$typeof===d||e.$$typeof===t||void 0!==e.getModuleId)}(e);if(!y){var j,N="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(N+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),N+=oe(),null===e?j="null":$(e)?j="array":void 0!==e&&e.$$typeof===n?(j="<"+(v(e.type)||"Unknown")+" />",N=" Did you accidentally export a JSX literal instead of a component?"):j=typeof e,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",j,N)}var k=Z(e,r,o,x,b);if(null==k)return k;if(y){var C=r.children;if(void 0!==C)if(m)if($(C)){for(var E=0;E<C.length;E++)ce(C[E],e);Object.freeze&&Object.freeze(C)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ce(C,e)}if(_.call(r,"key")){var T=v(e),I=Object.keys(r).filter((function(e){return"key"!==e})),O=I.length>0?"{key: someKey, "+I.join(": ..., ")+": ...}":"{key: someKey}";le[T+O]||(w('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',O,T,I.length>0?"{"+I.join(": ..., ")+": ...}":"{}",T),le[T+O]=!0)}return e===a?function(e){for(var t=Object.keys(e.props),r=0;r<t.length;r++){var n=t[r];if("children"!==n&&"key"!==n){re(e),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),re(null);break}}null!==e.ref&&(re(e),w("Invalid attribute `ref` supplied to `React.Fragment`."),re(null))}(k):se(k),k}var ue=function(e,t,r){return de(e,t,r,!1)},pe=function(e,t,r){return de(e,t,r,!0)};b.Fragment=a,b.jsx=ue,b.jsxs=pe}()),b);var w,y,v=g.exports;!function(e){e.HIGHLIGHT="highlight",e.UNDERLINE="underline",e.STRIKEOUT="strikeout",e.RECTANGLE="rectangle",e.DRAWING="drawing",e.HIGHLIGHTING="highlighting",e.TEXT="text",e.COMMENT="comment",e.PIN="pin"}(w||(w={})),function(e){e.NONE="none",e.HIGHLIGHT="highlight",e.UNDERLINE="underline",e.STRIKEOUT="strikeout",e.RECTANGLE="rectangle",e.DRAWING="drawing",e.HIGHLIGHTING="highlighting",e.TEXT="text",e.COMMENT="comment",e.PIN="pin"}(y||(y={}));var j=function(e,t,r,n,o){return void 0===r&&(r=""),void 0===n&&(n="rgba(255, 0, 0, 0.5)"),{id:Math.random().toString(36).substring(2,11),type:e,rect:t,pageIndex:t.pageIndex,color:n,content:r,createdAt:new Date,category:o}},N=function(e,t,r){if(t)return t.color;switch(e){case w.HIGHLIGHT:return"rgba(255, 255, 0, 0.3)";case w.UNDERLINE:return"rgba(0, 100, 255, 0.7)";case w.STRIKEOUT:return"rgba(255, 0, 0, 0.5)";case w.RECTANGLE:return"rgba(255, 0, 0, 0.3)";case w.DRAWING:case w.HIGHLIGHTING:return"rgba(255, 0, 0, 0.7)";case w.TEXT:return"rgba(0, 0, 0, 1)";case w.COMMENT:return"rgba(255, 255, 0, 0.7)";case w.PIN:return"rgba(249, 115, 22, 0.7)";default:return"rgba(0, 0, 0, 1)"}},k=function(e){switch(e){case y.HIGHLIGHT:return w.HIGHLIGHT;case y.UNDERLINE:return w.UNDERLINE;case y.STRIKEOUT:return w.STRIKEOUT;case y.RECTANGLE:return w.RECTANGLE;case y.DRAWING:return w.DRAWING;case y.HIGHLIGHTING:return w.HIGHLIGHTING;case y.TEXT:return w.TEXT;case y.COMMENT:return w.COMMENT;case y.PIN:return w.PIN;default:return w.HIGHLIGHT}},C=function(e,t,r){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),width:Math.abs(t.x-e.x),height:Math.abs(t.y-e.y),pageIndex:r}},E=function(e){if(0===e.length)return"";for(var t="M ".concat(e[0].x," ").concat(e[0].y),r=1;r<e.length;r++)t+=" L ".concat(e[r].x," ").concat(e[r].y);return t},T={1:"#FF5733",2:"#33FF57",3:"#3357FF",4:"#F333FF",5:"#FF33F3",0:"#777777"},I=function(e){return e?e.color?e.color:T[e.category]||T[0]:T[0]},O=function(e){if(!e)return"Sem categoria";if(e.displayName)return e.displayName;switch(e.category){case 1:return"Competência 1";case 2:return"Competência 2";case 3:return"Competência 3";case 4:return"Competência 4";case 5:return"Competência 5";default:return"Competência ".concat(e.category)}},A=function(e){var t=e.map((function(e){return d(d({},e),{createdAt:e.createdAt.toISOString(),updatedAt:e.updatedAt?e.updatedAt.toISOString():void 0})}));return JSON.stringify(t)},S={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},L=e.createContext&&e.createContext(S),M=["attr","size","title"];function z(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},R.apply(this,arguments)}function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){H(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function H(e,t,r){var n;return(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?n:n+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G(t){return t&&t.map(((t,r)=>e.createElement(t.tag,D({key:r},t.attr),G(t.child))))}function _(t){return r=>e.createElement(W,R({attr:D({},t.attr)},r),G(t.child))}function W(t){var r=r=>{var n,{attr:o,size:a,title:i}=t,c=z(t,M),s=a||r.size||"1em";return r.className&&(n=r.className),t.className&&(n=(n?n+" ":"")+t.className),e.createElement("svg",R({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,o,c,{className:n,style:D(D({color:t.color||r.color},r.style),t.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),i&&e.createElement("title",null,i),t.children)};return void 0!==L?e.createElement(L.Consumer,null,(e=>r(e))):r(S)}function U(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 112v288m144-144H112"},child:[]}]})(e)}function F(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 112v288m144-144H112"},child:[]}]})(e)}function B(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M244 400 100 256l144-144M120 256h292"},child:[]}]})(e)}function $(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M416 128 192 384l-96-96"},child:[]}]})(e)}function V(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M328 112 184 256l144 144"},child:[]}]})(e)}function X(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"m184 112 144 144-144 144"},child:[]}]})(e)}function Y(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m289.94 256 95-95A24 24 0 0 0 351 127l-95 95-95-95a24 24 0 0 0-34 34l95 95-95 95a24 24 0 1 0 34 34l95-95 95 95a24 24 0 0 0 34-34z"},child:[]}]})(e)}function K(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M432 320V144a32 32 0 0 0-32-32h0a32 32 0 0 0-32 32v112m0 0V80a32 32 0 0 0-32-32h0a32 32 0 0 0-32 32v160m-64 1V96a32 32 0 0 0-32-32h0a32 32 0 0 0-32 32v224m128-80V48a32 32 0 0 0-32-32h0a32 32 0 0 0-32 32v192"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M432 320c0 117.4-64 176-152 176s-123.71-39.6-144-88L83.33 264c-6.66-18.05-3.64-34.79 11.87-43.6h0c15.52-8.82 35.91-4.28 44.31 11.68L176 320"},child:[]}]})(e)}function q(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 56C145.72 56 56 145.72 56 256s89.72 200 200 200 200-89.72 200-200S366.28 56 256 56zm0 82a26 26 0 1 1-26 26 26 26 0 0 1 26-26zm48 226h-88a16 16 0 0 1 0-32h28v-88h-16a16 16 0 0 1 0-32h32a16 16 0 0 1 16 16v104h28a16 16 0 0 1 0 32z"},child:[]}]})(e)}function J(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M80 160h352M80 256h352M80 352h352"},child:[]}]})(e)}function Z(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"44",d:"M358.62 129.28 86.49 402.08 70 442l39.92-16.49 272.8-272.13-24.1-24.1zm54.45-54.44-11.79 11.78 24.1 24.1 11.79-11.79a16.51 16.51 0 0 0 0-23.34l-.75-.75a16.51 16.51 0 0 0-23.35 0z"},child:[]}]})(e)}function Q(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M400 256H112"},child:[]}]})(e)}function ee(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M400 256H112"},child:[]}]})(e)}function te(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m465.94 119.76-73.7-73.7A47.68 47.68 0 0 0 358.3 32H96a64 64 0 0 0-64 64v320a64 64 0 0 0 64 64h320a64 64 0 0 0 64-64V153.7a47.68 47.68 0 0 0-14.06-33.94zM120 112h176a8 8 0 0 1 8 8v48a8 8 0 0 1-8 8H120a8 8 0 0 1-8-8v-48a8 8 0 0 1 8-8zm139.75 319.91a80 80 0 1 1 76.16-76.16 80.06 80.06 0 0 1-76.16 76.16z"},child:[]},{tag:"circle",attr:{cx:"256",cy:"352",r:"48"},child:[]}]})(e)}function re(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",d:"M296 64h-80a7.91 7.91 0 0 0-8 8v24h96V72a7.91 7.91 0 0 0-8-8z"},child:[]},{tag:"path",attr:{d:"M432 96h-96V72a40 40 0 0 0-40-40h-80a40 40 0 0 0-40 40v24H80a16 16 0 0 0 0 32h17l19 304.92c1.42 26.85 22 47.08 48 47.08h184c26.13 0 46.3-19.78 48-47l19-305h17a16 16 0 0 0 0-32zM192.57 416H192a16 16 0 0 1-16-15.43l-8-224a16 16 0 1 1 32-1.14l8 224A16 16 0 0 1 192.57 416zM272 400a16 16 0 0 1-32 0V176a16 16 0 0 1 32 0zm32-304h-96V72a7.91 7.91 0 0 1 8-8h80a7.91 7.91 0 0 1 8 8zm32 304.57A16 16 0 0 1 320 416h-.58A16 16 0 0 1 304 399.43l8-224a16 16 0 1 1 32 1.14z"},child:[]}]})(e)}function ne(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},child:[]}]})(e)}function oe(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M93.95 290.03A327.038 327.038 0 0 0 .17 485.11l-.03.23c-1.7 15.28 11.21 28.2 26.49 26.51a327.02 327.02 0 0 0 195.34-93.8l75.4-75.4-128.02-128.02-75.4 75.4zM485.49 26.51c-35.35-35.35-92.67-35.35-128.02 0l-21.76 21.76-36.56-36.55c-15.62-15.62-40.95-15.62-56.56 0L138.47 115.84c-6.25 6.25-6.25 16.38 0 22.63l22.62 22.62c6.25 6.25 16.38 6.25 22.63 0l87.15-87.15 19.59 19.59L191.98 192 320 320.02l165.49-165.49c35.35-35.35 35.35-92.66 0-128.02z"},child:[]}]})(e)}function ae(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"},child:[]}]})(e)}function ie(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"},child:[]}]})(e)}function ce(e){return _({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z"},child:[]}]})(e)}function se(e){return _({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 224H293.9l-87.17-26.83A43.55 43.55 0 0 1 219.55 112h66.79A49.89 49.89 0 0 1 331 139.58a16 16 0 0 0 21.46 7.15l42.94-21.47a16 16 0 0 0 7.16-21.46l-.53-1A128 128 0 0 0 287.51 32h-68a123.68 123.68 0 0 0-123 135.64c2 20.89 10.1 39.83 21.78 56.36H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h480a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm-180.24 96A43 43 0 0 1 336 356.45 43.59 43.59 0 0 1 292.45 400h-66.79A49.89 49.89 0 0 1 181 372.42a16 16 0 0 0-21.46-7.15l-42.94 21.47a16 16 0 0 0-7.16 21.46l.53 1A128 128 0 0 0 224.49 480h68a123.68 123.68 0 0 0 123-135.64 114.25 114.25 0 0 0-5.34-24.36z"},child:[]}]})(e)}var le=function(e){var r=e.annotations,n=e.pageIndex;e.scale;var o=e.onAnnotationClick,a=e.activeDrawingPoints,i=void 0===a?[]:a,c=e.isDrawing,s=void 0!==c&&c,l=e.drawingColor,u=void 0===l?"rgba(255, 0, 0, 0.7)":l,p=e.drawingThickness,h=e.selectedAnnotation,f=void 0===h?null:h,g=e.currentMode,m=void 0===g?y.DRAWING:g,x=e.startPoint,b=void 0===x?null:x,j=e.originalWidth,N=void 0===j?0:j,k=e.originalHeight,C=void 0===k?0:k,T=t((function(){return r.filter((function(e){return e.pageIndex===n}))}),[r,n]),I=function(e){return 0===N||0===C?e:{x:e.x*N,y:e.y*C}},O=function(e){return e.map((function(e){return I(e)}))},A=function(e){return e.color?e.color:"#f97316"},S=function(e){return(null==f?void 0:f.id)===e.id},L=function(){if(void 0!==p)return p;switch(m){case y.DRAWING:return 4;case y.HIGHLIGHTING:return 10;case y.RECTANGLE:default:return 2}},M="0 0 ".concat(N," ").concat(C);return v.jsx("div",{className:"absolute top-0 left-0 w-full h-full pointer-events-none",style:{transformOrigin:"top left"},children:v.jsxs("svg",{width:"100%",height:"100%",viewBox:M,preserveAspectRatio:"xMinYMin meet",className:"absolute top-0 left-0 pointer-events-none",children:[T.map((function(e){var t=e.id,r=e.type,n=e.rect,a=e.color,i=e.points,c=e.thickness,s=function(e){return 0===N||0===C?e:{x:e.x*N,y:e.y*C,width:e.width*N,height:e.height*C}}(n),l=function(e){if(S(e))switch(e.type){case w.HIGHLIGHTING:return{strokeWidth:8,opacity:.9,filter:"drop-shadow(0 3px 6px rgba(2, 51, 129, 0.7))"};case w.RECTANGLE:case w.UNDERLINE:case w.STRIKEOUT:case w.DRAWING:case w.TEXT:case w.COMMENT:case w.PIN:return{strokeWidth:8,filter:"drop-shadow(0 3px 6px rgba(2, 51, 129, 0.7))"};default:return{}}return{}}(e);switch(r){case w.HIGHLIGHT:return v.jsx("rect",d({x:s.x,y:s.y,width:s.width,height:s.height,fill:a,onClick:function(t){return null==o?void 0:o(e,t)},className:"cursor-pointer pointer-events-auto annotation","data-annotation-id":t,"data-annotation-type":r},l),t);case w.UNDERLINE:return v.jsx("line",d({x1:s.x,y1:s.y+s.height,x2:s.x+s.width,y2:s.y+s.height,stroke:a,strokeWidth:c||2,onClick:function(t){return null==o?void 0:o(e,t)},className:"cursor-pointer pointer-events-auto annotation","data-annotation-id":t,"data-annotation-type":r},l),t);case w.STRIKEOUT:return v.jsx("line",d({x1:s.x,y1:s.y+s.height/2,x2:s.x+s.width,y2:s.y+s.height/2,stroke:a,strokeWidth:c||2,onClick:function(t){return null==o?void 0:o(e,t)},className:"cursor-pointer pointer-events-auto annotation","data-annotation-id":t,"data-annotation-type":r},l),t);case w.RECTANGLE:return v.jsx("rect",d({x:s.x,y:s.y,width:s.width,height:s.height,stroke:a,strokeWidth:c||2,fill:"none",onClick:function(t){return null==o?void 0:o(e,t)},className:"cursor-pointer pointer-events-auto annotation","data-annotation-id":t,"data-annotation-type":r},l),t);case w.DRAWING:if(!i||i.length<2)return null;var u=O(i),p=E(u);return v.jsx("path",d({d:p,stroke:a,strokeWidth:c||4,fill:"none",onClick:function(t){return null==o?void 0:o(e,t)},className:"cursor-pointer pointer-events-auto annotation","data-annotation-id":t,"data-annotation-type":r},l),t);case w.HIGHLIGHTING:if(!i||i.length<2)return null;var h=O(i),f=E(h);return v.jsx("path",d({d:f,stroke:a,strokeWidth:c||20,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",opacity:.6,onClick:function(t){return null==o?void 0:o(e,t)},className:"cursor-pointer pointer-events-auto annotation","data-annotation-id":t,"data-annotation-type":r},l),t);case w.TEXT:return v.jsx("foreignObject",{x:s.x,y:s.y,width:s.width||150,height:s.height||50,onClick:function(t){return null==o?void 0:o(e,t)},className:"cursor-pointer pointer-events-auto annotation","data-annotation-id":t,"data-annotation-type":r,style:l,children:v.jsx("div",{className:"p-1.5 font-sans text-xs",style:d({color:a||"#000"},S(e)?{backgroundColor:"rgba(59, 130, 246, 0.1)"}:{}),children:e.content||""})},t);case w.COMMENT:return v.jsxs("g",{onClick:function(t){return null==o?void 0:o(e,t)},className:"cursor-pointer pointer-events-auto annotation","data-annotation-id":t,"data-annotation-type":r,style:l,children:[v.jsx("circle",{cx:s.x,cy:s.y,r:10,fill:a||"#FFC107"}),v.jsx("foreignObject",{x:s.x-7,y:s.y-7,width:14,height:14,style:{overflow:"visible"},children:v.jsx("div",{className:"flex items-center justify-center w-full h-full text-white",children:v.jsx(ne,{size:10})})})]},t);case w.PIN:var g=I({x:n.x,y:n.y});return v.jsxs("g",{transform:"translate(".concat(g.x,", ").concat(g.y,")"),onClick:function(t){return null==o?void 0:o(e,t)},className:"cursor-pointer pointer-events-auto annotation","data-annotation-id":t,"data-annotation-type":r,style:l,children:[v.jsx("circle",{cx:0,cy:0,r:12,fill:A(e),opacity:.7}),v.jsx("foreignObject",{x:-10,y:-10,width:20,height:20,className:"flex items-center justify-center",children:v.jsx("div",{className:"flex items-center justify-center w-full h-full",children:e.tags&&e.tags.length>0&&"alert"===e.tags[0].tipo?v.jsx(ne,{className:"text-white"}):v.jsx(q,{className:"text-white"})})})]},t);default:return null}})),s&&i.length>1&&v.jsx("path",{d:E(O(i)),stroke:u,strokeWidth:L(),fill:"none",pointerEvents:"none"}),m===y.RECTANGLE&&b&&v.jsx("rect",{x:I(b).x,y:I(b).y,width:0,height:0,stroke:u,strokeWidth:L(),fill:"none",pointerEvents:"none"})]})})},de=function(e){var t=e.pdfDocument,i=e.pageNumber,c=e.scale,s=e.annotations,l=e.onAnnotationClick,d=e.onPointerDown,h=e.onPointerMove,f=e.onPointerUp,g=e.onCommentAdd,m=e.onTextClick,x=e.activeDrawingPoints,b=void 0===x?[]:x,w=e.isDrawing,j=void 0!==w&&w,N=e.drawingColor,k=e.drawingThickness,C=e.selectedAnnotation,E=void 0===C?null:C,T=e.currentMode,I=void 0===T?y.NONE:T,O=e.startPoint,A=void 0===O?null:O,S=e.forceRotation,L=void 0===S?null:S,M=r(null),z=r(null),R=n(0);R[0];var P=R[1],D=n(0),H=D[0],G=D[1],_=n(!1),W=_[0],U=_[1],F=r(null),B=n({width:0,height:0});B[0];var $=B[1],V=n({width:0,height:0});V[0];var X=V[1],Y=r(null),K=n({width:0