(function(L,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],P):(L=typeof globalThis<"u"?globalThis:L||self,P(L["react-lightbox-pack"]={},L.React))})(this,function(L,P){"use strict";function Pe(d){const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(d){for(const b in d)if(b!=="default"){const _=Object.getOwnPropertyDescriptor(d,b);Object.defineProperty(x,b,_.get?_:{enumerable:!0,get:()=>d[b]})}}return x.default=d,Object.freeze(x)}const j=Pe(P);var q={exports:{}},$={};/** * @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 ae;function ke(){if(ae)return $;ae=1;var d=P,x=Symbol.for("react.element"),b=Symbol.for("react.fragment"),_=Object.prototype.hasOwnProperty,D=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,F={key:!0,ref:!0,__self:!0,__source:!0};function O(w,u,E){var v,f={},m=null,S=null;E!==void 0&&(m=""+E),u.key!==void 0&&(m=""+u.key),u.ref!==void 0&&(S=u.ref);for(v in u)_.call(u,v)&&!F.hasOwnProperty(v)&&(f[v]=u[v]);if(w&&w.defaultProps)for(v in u=w.defaultProps,u)f[v]===void 0&&(f[v]=u[v]);return{$$typeof:x,type:w,key:m,ref:S,props:f,_owner:D.current}}return $.Fragment=b,$.jsx=O,$.jsxs=O,$}var Y={};/** * @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 oe;function Ae(){return oe||(oe=1,process.env.NODE_ENV!=="production"&&function(){var d=P,x=Symbol.for("react.element"),b=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),w=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),S=Symbol.for("react.offscreen"),ie=Symbol.iterator,Me="@@iterator";function $e(e){if(e===null||typeof e!="object")return null;var r=ie&&e[ie]||e[Me];return typeof r=="function"?r:null}var B=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n=1&&c>=0&&a[l]!==g[c];)c--;for(;l>=1&&c>=0;l--,c--)if(a[l]!==g[c]){if(l!==1||c!==1)do if(l--,c--,c<0||a[l]!==g[c]){var R=` `+a[l].replace(" at new "," at ");return e.displayName&&R.includes("")&&(R=R.replace("",e.displayName)),typeof e=="function"&&H.set(e,R),R}while(l>=1&&c>=0);break}}}finally{X=!1,K.current=s,Ke(),Error.prepareStackTrace=i}var M=e?e.displayName||e.name:"",A=M?z(M):"";return typeof e=="function"&&H.set(e,A),A}function Xe(e,r,t){return be(e,!1)}function Ze(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function I(e,r,t){if(e==null)return"";if(typeof e=="function")return be(e,Ze(e));if(typeof e=="string")return z(e);switch(e){case E:return z("Suspense");case v:return z("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case u:return Xe(e.render);case f:return I(e.type,r,t);case m:{var n=e,i=n._payload,s=n._init;try{return I(s(i),r,t)}catch{}}}return""}var V=Object.prototype.hasOwnProperty,me={},ye=B.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,t=I(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(t)}else ye.setExtraStackFrame(null)}function Qe(e,r,t,n,i){{var s=Function.call.bind(V);for(var o in e)if(s(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var g=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(l){a=l}a&&!(a instanceof Error)&&(J(i),h("%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",t,o,typeof a),J(null)),a instanceof Error&&!(a.message in me)&&(me[a.message]=!0,J(i),h("Failed %s type: %s",t,a.message),J(null))}}}var er=Array.isArray;function Z(e){return er(e)}function rr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function tr(e){try{return _e(e),!1}catch{return!0}}function _e(e){return""+e}function Ee(e){if(tr(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",rr(e)),_e(e)}var U=B.ReactCurrentOwner,nr={key:!0,ref:!0,__self:!0,__source:!0},Re,xe,Q;Q={};function ar(e){if(V.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function or(e){if(V.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ir(e,r){if(typeof e.ref=="string"&&U.current&&r&&U.current.stateNode!==r){var t=C(U.current.type);Q[t]||(h('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',C(U.current.type),e.ref),Q[t]=!0)}}function sr(e,r){{var t=function(){Re||(Re=!0,h("%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 ur(e,r){{var t=function(){xe||(xe=!0,h("%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 lr=function(e,r,t,n,i,s,o){var a={$$typeof:x,type:e,key:r,ref:t,props:o,_owner:s};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function cr(e,r,t,n,i){{var s,o={},a=null,g=null;t!==void 0&&(Ee(t),a=""+t),or(r)&&(Ee(r.key),a=""+r.key),ar(r)&&(g=r.ref,ir(r,i));for(s in r)V.call(r,s)&&!nr.hasOwnProperty(s)&&(o[s]=r[s]);if(e&&e.defaultProps){var l=e.defaultProps;for(s in l)o[s]===void 0&&(o[s]=l[s])}if(a||g){var c=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&sr(o,c),g&&ur(o,c)}return lr(e,a,g,i,n,U.current,o)}}var ee=B.ReactCurrentOwner,we=B.ReactDebugCurrentFrame;function W(e){if(e){var r=e._owner,t=I(e.type,e._source,r?r.type:null);we.setExtraStackFrame(t)}else we.setExtraStackFrame(null)}var re;re=!1;function te(e){return typeof e=="object"&&e!==null&&e.$$typeof===x}function Ce(){{if(ee.current){var e=C(ee.current.type);if(e)return` Check the render method of \``+e+"`."}return""}}function fr(e){return""}var je={};function dr(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 Te(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=dr(r);if(je[t])return;je[t]=!0;var n="";e&&e._owner&&e._owner!==ee.current&&(n=" It was passed a child from "+C(e._owner.type)+"."),W(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),W(null)}}function Oe(e,r){{if(typeof e!="object")return;if(Z(e))for(var t=0;t",a=" Did you accidentally export a JSX literal instead of a component?"):l=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",l,a)}var c=cr(e,r,t,i,s);if(c==null)return c;if(o){var R=r.children;if(R!==void 0)if(n)if(Z(R)){for(var M=0;M0?"{key: someKey, "+y.join(": ..., ")+": ...}":"{key: someKey}";if(!Se[A+ne]){var yr=y.length>0?"{"+y.join(": ..., ")+": ...}":"{}";h(`A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`,ne,A,yr,A),Se[A+ne]=!0}}return e===_?hr(c):vr(c),c}}function pr(e,r,t){return Le(e,r,t,!0)}function gr(e,r,t){return Le(e,r,t,!1)}var br=gr,mr=pr;Y.Fragment=_,Y.jsx=br,Y.jsxs=mr}()),Y}process.env.NODE_ENV==="production"?q.exports=ke():q.exports=Ae();var p=q.exports;const T={reactLightboxContainer:"_reactLightboxContainer_13dme_1",reactLightboxCloseButtonContainer:"_reactLightboxCloseButtonContainer_13dme_25",reactLightboxCloseButton:"_reactLightboxCloseButton_13dme_25",reactLightboxButton:"_reactLightboxButton_13dme_47",reactLightboxArrowRight:"_reactLightboxArrowRight_13dme_64",reactLightboxArrowLeft:"_reactLightboxArrowLeft_13dme_69"},De=d=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#000000",...d},j.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),j.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"})),Fe=d=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#000000",...d},j.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),j.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})),Be=d=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#000000",...d},j.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),j.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"})),We=({state:d,event:x,data:b,dataArr:_,imageWidth:D="50vw",imageHeight:F="60vh",thumbnailHeight:O=50,thumbnailWidth:w=50,setImageIndex:u,imageIndex:E})=>{if(d){const v=f=>{const m=b.length-1;switch(f){case"next":E>=m?u(0):u(S=>S+1);break;case"prev":E<=0?u(m):u(S=>S-1);break;default:u(0)}};return p.jsxs("div",{className:T.reactLightboxContainer,children:[p.jsx("div",{className:T.reactLightboxCloseButtonContainer,children:p.jsx("button",{className:T.reactLightboxCloseButton,onClick:()=>{x(!1,E),u(0)},children:p.jsx(Be,{fill:"#fff"})})}),p.jsxs("div",{className:T.reactLightboxArea,children:[p.jsx("img",{src:b[E].image,alt:b[E].title,style:{maxHeight:F,maxWidth:D}}),p.jsx("div",{className:T.reactLightboxArrowRight,children:p.jsx("button",{className:T.reactLightboxButton,onClick:()=>v("next"),children:p.jsx(De,{})})}),p.jsx("div",{className:T.reactLightboxArrowLeft,children:p.jsx("button",{className:T.reactLightboxButton,onClick:()=>v("prev"),children:p.jsx(Fe,{})})})]}),p.jsxs("div",{style:{position:"fixed",bottom:"10px",display:"flex",flexDirection:"row"},children:[b&&b.map((f,m)=>p.jsx("img",{src:f.image,alt:f.title,height:O,width:w,style:{objectFit:"cover",margin:"0 0.5rem",borderRadius:"0.2rem"},onClick:()=>u(m)},f.id)),_&&_.map((f,m)=>p.jsx("img",{src:f,alt:f,height:O,width:w,style:{objectFit:"cover",margin:"0 0.5rem",borderRadius:"0.2rem"},onClick:()=>u(m)},f))]})]})}return null};L.LightBox=We,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});