(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("html{body {#_viewerContainer_mt25w_1 {all: unset; --header-height: 50px; --footer-height: 50px; ._svg_mt25w_8 {width: 1.5rem; height: 1.5rem; cursor: pointer;} #_close_mt25w_1 {opacity: .4;} #_container_mt25w_1 {position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background-color: #000000e9; color: #fff; z-index: 10000; #_header_mt25w_65,#_controls_mt25w_1,#_footer_mt25w_1 {width: 100%; height: var(--header-height); display: flex; align-items: center; justify-content: space-between; padding: 0 1rem; position: absolute; z-index: 50000; background-color: #0000006e; transition: opacity .5s ease-in;} #_header_mt25w_65 {top: 0; #_headerContent_mt25w_1 {width: 100%; height: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 2rem; #_icons_mt25w_1 {display: flex; gap: 1rem;}}} ._headerHideControls_mt25w_65 {justify-content: flex-end !important; background-color: transparent !important; padding: 0 2rem !important; ._svg_mt25w_8 {width: 2.5rem; height: 2.5rem;}} #_main_mt25w_111 {all: unset; display: flex; justify-content: center; position: relative; width: 100%; z-index: 10000; overflow: scroll; &::-webkit-scrollbar {display: none;} img {all: unset; user-select: none; width: 100%; height: 100%; object-fit: contain; display: inline-block;} #_controls_mt25w_1 {position: fixed; top: 50%; padding: 0 2.25rem; background-color: transparent; div {color: #ffffff80;}}} ._mainHideControls_mt25w_111 {height: calc(100% - var(--header-height) - var(--footer-height)) !important;} #_footer_mt25w_1 {bottom: 0; justify-content: center;}}}}}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})(); (function(h,x){typeof exports=="object"&&typeof module<"u"?module.exports=x(require("react")):typeof define=="function"&&define.amd?define(["react"],x):(h=typeof globalThis<"u"?globalThis:h||self,h.index=x(h.React))})(this,function(h){"use strict";var pr=Object.defineProperty;var yr=(h,x,S)=>x in h?pr(h,x,{enumerable:!0,configurable:!0,writable:!0,value:S}):h[x]=S;var V=(h,x,S)=>(yr(h,typeof x!="symbol"?x+"":x,S),S);var x={exports:{}},S={};/** * @license React * react-jsx-runtime.production.min.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. */var te;function ke(){if(te)return S;te=1;var _=h,n=Symbol.for("react.element"),s=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,y=_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,w={key:!0,ref:!0,__self:!0,__source:!0};function O(o,E,R){var b,g={},k=null,$=null;R!==void 0&&(k=""+R),E.key!==void 0&&(k=""+E.key),E.ref!==void 0&&($=E.ref);for(b in E)l.call(E,b)&&!w.hasOwnProperty(b)&&(g[b]=E[b]);if(o&&o.defaultProps)for(b in E=o.defaultProps,E)g[b]===void 0&&(g[b]=E[b]);return{$$typeof:n,type:o,key:k,ref:$,props:g,_owner:y.current}}return S.Fragment=s,S.jsx=O,S.jsxs=O,S}var W={};/** * @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. */var ne;function Pe(){return ne||(ne=1,process.env.NODE_ENV!=="production"&&function(){var _=h,n=Symbol.for("react.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),o=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),$=Symbol.for("react.offscreen"),M=Symbol.iterator,Fe="@@iterator";function De(e){if(e===null||typeof e!="object")return null;var r=M&&e[M]||e[Fe];return typeof r=="function"?r:null}var F=_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),i=1;i=1&&m>=0&&u[v]!==j[m];)m--;for(;v>=1&&m>=0;v--,m--)if(u[v]!==j[m]){if(v!==1||m!==1)do if(v--,m--,m<0||u[v]!==j[m]){var T=` `+u[v].replace(" at new "," at ");return e.displayName&&T.includes("")&&(T=T.replace("",e.displayName)),typeof e=="function"&&H.set(e,T),T}while(v>=1&&m>=0);break}}}finally{G=!1,Z.current=d,Ue(),Error.prepareStackTrace=f}var L=e?e.displayName||e.name:"",Oe=L?Y(L):"";return typeof e=="function"&&H.set(e,Oe),Oe}function Ze(e,r,t){return pe(e,!1)}function Je(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function B(e,r,t){if(e==null)return"";if(typeof e=="function")return pe(e,Je(e));if(typeof e=="string")return Y(e);switch(e){case R:return Y("Suspense");case b:return Y("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case E:return Ze(e.render);case g:return B(e.type,r,t);case k:{var i=e,f=i._payload,d=i._init;try{return B(d(f),r,t)}catch{}}}return""}var U=Object.prototype.hasOwnProperty,ye={},we=F.ReactDebugCurrentFrame;function q(e){if(e){var r=e._owner,t=B(e.type,e._source,r?r.type:null);we.setExtraStackFrame(t)}else we.setExtraStackFrame(null)}function Ge(e,r,t,i,f){{var d=Function.call.bind(U);for(var c in e)if(d(e,c)){var u=void 0;try{if(typeof e[c]!="function"){var j=Error((i||"React class")+": "+t+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw j.name="Invariant Violation",j}u=e[c](r,c,i,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(v){u=v}u&&!(u instanceof Error)&&(q(f),C("%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).",i||"React class",t,c,typeof u),q(null)),u instanceof Error&&!(u.message in ye)&&(ye[u.message]=!0,q(f),C("Failed %s type: %s",t,u.message),q(null))}}}var Ke=Array.isArray;function K(e){return Ke(e)}function Xe(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Qe(e){try{return ge(e),!1}catch{return!0}}function ge(e){return""+e}function _e(e){if(Qe(e))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xe(e)),ge(e)}var N=F.ReactCurrentOwner,er={key:!0,ref:!0,__self:!0,__source:!0},Ee,be,X;X={};function rr(e){if(U.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function tr(e){if(U.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function nr(e,r){if(typeof e.ref=="string"&&N.current&&r&&N.current.stateNode!==r){var t=P(N.current.type);X[t]||(C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',P(N.current.type),e.ref),X[t]=!0)}}function ir(e,r){{var t=function(){Ee||(Ee=!0,C("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function or(e,r){{var t=function(){be||(be=!0,C("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var ar=function(e,r,t,i,f,d,c){var u={$$typeof:n,type:e,key:r,ref:t,props:c,_owner:d};return u._store={},Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:f}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u};function sr(e,r,t,i,f){{var d,c={},u=null,j=null;t!==void 0&&(_e(t),u=""+t),tr(r)&&(_e(r.key),u=""+r.key),rr(r)&&(j=r.ref,nr(r,f));for(d in r)U.call(r,d)&&!er.hasOwnProperty(d)&&(c[d]=r[d]);if(e&&e.defaultProps){var v=e.defaultProps;for(d in v)c[d]===void 0&&(c[d]=v[d])}if(u||j){var m=typeof e=="function"?e.displayName||e.name||"Unknown":e;u&&ir(c,m),j&&or(c,m)}return ar(e,u,j,f,i,N.current,c)}}var Q=F.ReactCurrentOwner,xe=F.ReactDebugCurrentFrame;function D(e){if(e){var r=e._owner,t=B(e.type,e._source,r?r.type:null);xe.setExtraStackFrame(t)}else xe.setExtraStackFrame(null)}var ee;ee=!1;function re(e){return typeof e=="object"&&e!==null&&e.$$typeof===n}function Ce(){{if(Q.current){var e=P(Q.current.type);if(e)return` Check the render method of \``+e+"`."}return""}}function lr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return` Check your code at `+r+":"+t+"."}return""}}var je={};function ur(e){{var r=Ce();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=` Check the top-level render call using <`+t+">.")}return r}}function Re(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ur(r);if(je[t])return;je[t]=!0;var i="";e&&e._owner&&e._owner!==Q.current&&(i=" It was passed a child from "+P(e._owner.type)+"."),D(e),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,i),D(null)}}function Te(e,r){{if(typeof e!="object")return;if(K(e))for(var t=0;t",u=" Did you accidentally export a JSX literal instead of a component?"):v=typeof e,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",v,u)}var m=sr(e,r,t,f,d);if(m==null)return m;if(c){var T=r.children;if(T!==void 0)if(i)if(K(T)){for(var L=0;L=this.defaultZoom){const l=document.getElementById(s);l&&l.setAttribute("style","align-items: unset")}if(n instanceof HTMLElement)n.style.width=`${this.width}%`,n.style.height=`${this.width}%`,n.style.objectFit="contain";else{const l=document.querySelector("[viewerid]");l instanceof HTMLElement&&(l.style.width=`${this.width}%`,l.style.height=`${this.width}%`,l.style.objectFit="contain")}}}zoomOut(n,s){if(!(this.width<=20)){if(this.width-=this.zoom,this.width<=this.defaultZoom){const l=document.getElementById(s);l&&l.setAttribute("style","align-items: center")}if(n instanceof HTMLElement)n.style.width=`${this.width}%`,n.style.height=`${this.width}%`;else{const l=document.querySelector("[viewerid]");l instanceof HTMLElement&&(l.style.width=`${this.width}%`,l.style.height=`${this.width}%`)}}}extend(n){if(!n)return;const s=document.querySelector(`[viewerid="${n}"]`);s&&(s==null||s.requestFullscreen(),s.setAttribute("style","object-fit: contain"),s&&document.fullscreenEnabled&&s.addEventListener("fullscreenchange",()=>{document.fullscreenElement||(s.setAttribute("style","object-fit: '' "),this.width=this.defaultZoom+this.zoom,this.zoomOut(s))}))}show(n){this.setShowViewer(!1),this.setImage({src:n.currentTarget.src,alt:n.currentTarget.alt,viewerid:n.currentTarget.getAttribute("viewerid")||""})}close(){this.setShowViewer(!0),this.width=this.defaultZoom}prevRigth(n,s){if(!Array.isArray(n)||n.length<1||!s)return;const l=n.find(({props:y})=>{const{viewerid:w}=y;return+s>=n.length?+w==1:+w==+s+1});if(l){const{src:y,alt:w,viewerid:O}=l.props;this.setImage({src:y,alt:w,viewerid:O}),this.width=this.defaultZoom+this.zoom,this.zoomOut(y)}}prevLeft(n,s){if(!Array.isArray(n)||n.length<1||!s)return;const l=n.find(({props:y})=>{const{viewerid:w}=y;return+s<=1?+w==n.length:+w===+s-1});if(l){const{src:y,alt:w,viewerid:O}=l.props;this.setImage({src:y,alt:w,viewerid:O}),this.width=this.defaultZoom+this.zoom,this.zoomOut(y)}}}const Ie=_=>a.jsx("img",{..._}),p={viewerContainer:"_viewerContainer_mt25w_1",svg:"_svg_mt25w_8",close:"_close_mt25w_1",container:"_container_mt25w_1",header:"_header_mt25w_65",controls:"_controls_mt25w_1",footer:"_footer_mt25w_1",headerContent:"_headerContent_mt25w_1",icons:"_icons_mt25w_1",headerHideControls:"_headerHideControls_mt25w_65",main:"_main_mt25w_111",mainHideControls:"_mainHideControls_mt25w_111"},ie=({style:_,controls:n,close:s})=>a.jsx("div",{className:` ${p.svg} ${!n&&_} `,onClick:()=>s(),children:a.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"100%",width:"100%",children:a.jsx("path",{d:"M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"})})}),$e=(_,n)=>h.Children.map(_,(s,l)=>{if(h.isValidElement(s)){const y=oe(s)||s;return h.cloneElement(y,{onClick:w=>n.show(w),viewerid:(l+1).toString(),key:l})}}),oe=_=>{if(h.isValidElement(_)){let n=null;return h.Children.forEach(_.props.children,s=>{const l=oe(s);l!==null&&l.type==="img"&&(n=l)}),n||(_.type==="img"?_:null)}return null};return _=>{const{controls:n,children:s,styles:l,className:y}=_,[w,O]=h.useState(!0),[o,E]=h.useState(),[R,b]=h.useState(!0),g=new Ae({setShowViewer:O,setImage:E});h.useEffect(()=>{n==null||n?b(!0):b(!1)},[n,o,s]);const[k,$]=h.useState();return h.useEffect(()=>{const M=$e(s,g);$(M)},[s]),a.jsxs("div",{id:p.viewerContainer,className:`${y}`,style:l,children:[w?null:a.jsxs("div",{id:p.container,children:[a.jsx("header",{id:p.header,className:`${!R&&p.headerHideControls}`,children:R?a.jsxs("div",{id:p.headerContent,children:[a.jsx("div",{children:a.jsxs("p",{children:[o&&(o==null?void 0:o.viewerid)," /"," ",Array.isArray(s)&&s.length]})}),a.jsxs("div",{id:p.icons,children:[a.jsx("div",{className:p.svg,onClick:()=>g.extend(o&&(o==null?void 0:o.viewerid)),children:a.jsxs("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"100%",width:"100%",children:[a.jsx("path",{fill:"none",d:"M0 0h24v24H0z"}),a.jsx("path",{d:"M15 3l2.3 2.3-2.89 2.87 1.42 1.42L18.7 6.7 21 9V3h-6zM3 9l2.3-2.3 2.87 2.89 1.42-1.42L6.7 5.3 9 3H3v6zm6 12l-2.3-2.3 2.89-2.87-1.42-1.42L5.3 17.3 3 15v6h6zm12-6l-2.3 2.3-2.87-2.89-1.42 1.42 2.89 2.87L15 21h6v-6z"})]})}),a.jsx("div",{className:p.svg,onClick:()=>g.zoomIn(o&&o,p.main),children:a.jsxs("svg",{stroke:"currentColor",fill:"none",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"100%",width:"100%",children:[a.jsx("circle",{cx:"11",cy:"11",r:"8"}),a.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}),a.jsx("line",{x1:"11",y1:"8",x2:"11",y2:"14"}),a.jsx("line",{x1:"8",y1:"11",x2:"14",y2:"11"})]})}),a.jsx("div",{className:p.svg,onClick:()=>g.zoomOut(o?o==null?void 0:o.viewerid:"",p.main),children:a.jsxs("svg",{stroke:"currentColor",fill:"none",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"100%",width:"100%",children:[a.jsx("circle",{cx:"11",cy:"11",r:"8"}),a.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}),a.jsx("line",{x1:"8",y1:"11",x2:"14",y2:"11"})]})}),a.jsx(ie,{controls:!0,close:()=>g.close()})]})]}):a.jsx(ie,{style:` ${p.close}`,controls:!1,close:()=>g.close()})}),a.jsxs("main",{id:`${p.main}`,className:`${R?p.mainHideControls:""}`,children:[a.jsx(Ie,{src:o&&(o==null?void 0:o.src),viewerid:o?o==null?void 0:o.viewerid:"",alt:o&&(o==null?void 0:o.alt)}),R&&a.jsxs("div",{id:p.controls,children:[a.jsx("div",{className:p.svg,id:"prev-left",onClick:()=>g.prevLeft(k,o?o.viewerid:void 0),children:a.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 16 16",height:"100%",width:"100%",children:a.jsx("path",{d:"M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0zm3.5 7.5a.5.5 0 0 1 0 1H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H11.5z"})})}),a.jsx("div",{id:"prev-rigth",className:p.svg,onClick:()=>g.prevRigth(k,o==null?void 0:o.viewerid),children:a.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 16 16",height:"100%",width:"100%",children:a.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zM4.5 7.5a.5.5 0 0 0 0 1h5.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3a.5.5 0 0 0 0-.708l-3-3a.5.5 0 1 0-.708.708L10.293 7.5H4.5z"})})})]})]}),R&&a.jsx("footer",{id:p.footer,children:a.jsx("p",{children:o&&(o==null?void 0:o.alt)})})]}),k]})}});