@ienlab/react-library 0.14.2-beta.3 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require(`react`),u=require(`motion/react`),d=require(`react/jsx-runtime`),f=require(`react-i18next`),p=require(`firebase/firestore`),m=require(`zustand/react`),h=require(`i18next`);h=c(h,1);function g({placeholder:e,src:t,onLoadError:n,...r}){let[i,a]=(0,l.useState)(()=>{if(typeof window>`u`||!t)return!1;let e=new Image;return e.src=t,e.complete&&e.naturalWidth>0}),[o,s]=(0,l.useState)(t);return o!==t&&(s(t),a(!1)),(0,l.useEffect)(()=>{if(!t)return;let e=new Image;return e.src=t,e.onload=()=>a(!0),e.onerror=e=>{n?n(e):console.error(`CrossfadeImage: Failed to load image`,t)},e.complete&&e.naturalWidth>0&&e.onload(new Event(`load`)),()=>{e.onload=null,e.onerror=null}},[t,n]),(0,d.jsx)(u.AnimatePresence,{children:i&&t?(0,d.jsx)(u.motion.img,{src:t,...r,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},style:{...r.style}},`loaded-image`):(0,d.jsx)(u.motion.div,{initial:{opacity:1},transition:{duration:.3},style:{...r.style},children:e??(0,d.jsx)(`div`,{className:`w-full h-full bg-sidebar`})},`placeholder`)})}var _=({children:e})=>(0,d.jsx)(`div`,{children:e}),v=e=>(0,d.jsx)(`label`,{...e}),y=({children:e})=>(0,d.jsx)(`p`,{children:e}),b=e=>(0,d.jsx)(`input`,{...e}),x=({children:e,...t})=>(0,d.jsx)(`div`,{...t,children:e}),S=e=>null,C=({children:e,...t})=>(0,d.jsx)(`div`,{...t,children:e}),w=({children:e,type:t=`button`,...n})=>(0,d.jsx)(`button`,{type:t,...n,children:e}),T=({className:e})=>(0,d.jsx)(`span`,{className:e,children:`×`}),E=[`ko`,`en`],D=class{url=``;file=null;constructor(e={}){Object.assign(this,e)}isBlobUrl(){return this.url.startsWith(`blob:`)}revokeIfNeeded(){this.file&&this.isBlobUrl()&&URL.revokeObjectURL(this.url)}},O={wrapper:{display:`flex`,flexDirection:`column`,gap:`1rem`},trigger:{display:`block`,cursor:`pointer`},card:{position:`relative`,overflow:`hidden`,borderRadius:`1.5rem`,border:`1px solid #e5e7eb`,backgroundColor:`#ffffff`,transition:`background-color 160ms ease, box-shadow 160ms ease`},frame:{position:`relative`,width:`100%`,aspectRatio:`16 / 9`},imageLayer:{position:`absolute`,inset:0,padding:`1.5rem`},imageBox:{margin:`0 auto`,maxWidth:`100%`,maxHeight:`100%`},image:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`},empty:{display:`flex`,width:`100%`,height:`100%`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:`1rem`,color:`#6b7280`,textAlign:`center`,padding:`1rem`,boxSizing:`border-box`},badge:{borderRadius:`1rem`,backgroundColor:`#f3f4f6`,padding:`0.75rem 1rem`,fontSize:`0.875rem`,lineHeight:1.2,color:`#111827`},hint:{margin:0,fontSize:`0.875rem`,lineHeight:1.4},overlay:{pointerEvents:`none`,position:`absolute`,inset:0,borderRadius:`inherit`,boxShadow:`inset 0 0 0 0 rgba(59, 130, 246, 0)`,transition:`box-shadow 160ms ease`}};function k({id:e,label:t,uploadHintText:n,descriptionText:r,value:i,onChange:a,aspectRatio:o=`1 / 1`,accept:s=`image/*`,components:c}){let{t:u}=(0,f.useTranslation)(),p=c?.Field??_,m=c?.FieldLabel??v,h=c?.FieldDescription??y,x=c?.Input??b,S={...O.imageBox,aspectRatio:o},[C,w]=(0,l.useState)(!1);return(0,d.jsxs)(p,{children:[(0,d.jsx)(m,{htmlFor:e,children:t}),(0,d.jsxs)(`div`,{style:O.wrapper,children:[(0,d.jsx)(`label`,{htmlFor:e,style:{...O.trigger,backgroundColor:C?`#f9fafb`:`#ffffff`},onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:(0,d.jsxs)(`div`,{style:O.card,children:[(0,d.jsx)(`div`,{style:O.frame,children:i.url?(0,d.jsx)(`div`,{style:O.imageLayer,children:(0,d.jsx)(`div`,{style:S,children:(0,d.jsx)(g,{src:i.url,className:``,alt:t,style:O.image})})}):(0,d.jsxs)(`div`,{style:O.empty,children:[(0,d.jsx)(`div`,{style:O.badge,children:u(`libs:add_assets`)}),(0,d.jsx)(`p`,{style:O.hint,children:n})]})}),(0,d.jsx)(`div`,{style:{...O.overlay,boxShadow:C?`inset 0 0 0 2px rgba(59, 130, 246, 0.16)`:`inset 0 0 0 0 rgba(59, 130, 246, 0)`}})]})}),(0,d.jsx)(x,{id:e,type:`file`,accept:s,onChange:e=>{let t=e.target.files?.[0];t&&(i.revokeIfNeeded(),a(new D({file:t,url:URL.createObjectURL(t)})),e.currentTarget.value=``)},style:{display:`none`}}),(0,d.jsx)(h,{children:r})]})]})}var A={wrapper:{display:`flex`,flexDirection:`column`,gap:`0.75rem`},outerBox:{borderRadius:`1.5rem`,border:`1px solid #e5e7eb`,backgroundColor:`#ffffff`,overflow:`hidden`},scrollArea:{width:`100%`,overflowX:`auto`,overflowY:`hidden`,whiteSpace:`nowrap`},list:{display:`flex`,width:`max-content`,gap:`1rem`,padding:`1rem`},item:{position:`relative`,flexShrink:0},card:{position:`relative`,width:`15rem`,overflow:`hidden`,borderRadius:`0.75rem`,padding:0,backgroundColor:`#ffffff`,border:`1px solid #e5e7eb`,boxSizing:`border-box`},cardInner:{position:`relative`,width:`100%`,height:`100%`},image:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`},removeButton:{position:`absolute`,right:`1rem`,bottom:`1rem`,borderRadius:`9999px`,boxShadow:`0 1px 3px rgba(0, 0, 0, 0.12)`},uploadLabel:{display:`block`,flexShrink:0,cursor:`pointer`},uploadCard:{width:`15rem`,overflow:`hidden`,borderRadius:`0.75rem`,padding:0,border:`1px dashed #d1d5db`,backgroundColor:`#ffffff`,boxSizing:`border-box`,transition:`background-color 160ms ease`},uploadCardInner:{display:`flex`,width:`100%`,height:`100%`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:`1rem`,color:`#6b7280`,textAlign:`center`,padding:`1rem`,boxSizing:`border-box`},badge:{borderRadius:`1rem`,backgroundColor:`#f3f4f6`,padding:`0.75rem 1rem`,fontSize:`0.875rem`,lineHeight:1.2,color:`#111827`},hint:{margin:0,fontSize:`0.875rem`,lineHeight:1.4},description:{marginTop:`0.25rem`},hiddenInput:{display:`none`},scrollBar:{marginLeft:`1rem`,marginRight:`1rem`}};function j({id:e,label:t,descriptionText:n,uploadHintText:r,items:i,onChange:a,aspectRatio:o=`1 / 1`,accept:s=`image/*`,components:c}){let{t:l}=(0,f.useTranslation)(),p=c?.Field??_,m=c?.FieldLabel??v,h=c?.FieldDescription??y,E=c?.Input??b,O=c?.ScrollArea??x,k=c?.ScrollBar??S,j=c?.Card??C,M=c?.Button??w,N=c?.CloseIcon??T,P=e=>{e.revokeIfNeeded(),a(i.filter(t=>t!==e))},F=e=>{!e||e.length===0||a([...i,...Array.from(e).map(e=>new D({file:e,url:URL.createObjectURL(e)}))])},I={...A.card,aspectRatio:o},L={...A.uploadCard,aspectRatio:o};return(0,d.jsxs)(p,{children:[(0,d.jsx)(m,{htmlFor:e,children:t}),(0,d.jsxs)(`div`,{style:A.wrapper,children:[(0,d.jsxs)(`div`,{style:A.outerBox,children:[(0,d.jsxs)(O,{style:A.scrollArea,children:[(0,d.jsxs)(u.Reorder.Group,{axis:`x`,values:i,onReorder:a,layoutScroll:!0,style:A.list,children:[i.map(e=>(0,d.jsx)(u.Reorder.Item,{value:e,style:A.item,children:(0,d.jsx)(j,{style:I,children:(0,d.jsxs)(`div`,{style:A.cardInner,children:[(0,d.jsx)(g,{src:e.url,className:``,alt:t,style:A.image,draggable:!1}),(0,d.jsx)(M,{type:`button`,style:A.removeButton,onClick:()=>P(e),children:(0,d.jsx)(N,{})})]})})},e.url)),(0,d.jsx)(`label`,{htmlFor:e,style:A.uploadLabel,children:(0,d.jsx)(j,{style:L,onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#f9fafb`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`},children:(0,d.jsxs)(`div`,{style:A.uploadCardInner,children:[(0,d.jsx)(`div`,{style:A.badge,children:l(`libs:add_assets`)}),(0,d.jsx)(`p`,{style:A.hint,children:r})]})})})]}),(0,d.jsx)(k,{orientation:`horizontal`,style:A.scrollBar})]}),(0,d.jsx)(E,{id:e,type:`file`,accept:s,multiple:!0,onChange:e=>{F(e.target.files),e.currentTarget.value=``},style:A.hiddenInput})]}),(0,d.jsx)(`div`,{style:A.description,children:(0,d.jsx)(h,{children:n})})]})]})}function M(e){return{...e.data(),id:e.id}}async function N(e,t,n,r){let i=r.filter(e=>!!(e&&!n.has(e.path)));for(let r=0;r<i.length;r+=30){let a=i.slice(r,r+30);(await(0,p.getDocs)((0,p.query)(e,(0,p.where)((0,p.documentId)(),`in`,a.map(e=>e.id))))).forEach(e=>{let r=t(e);n.set(e.ref.path,r)})}}async function P(e,t,n){let r=n.filter(e=>!!(e&&!t.has(e.path)));await Promise.all(r.map(async n=>{let r=e(await(0,p.getDoc)(n));t.set(n.path,r)}))}function F(e={}){let{cache:t=!0,includeMetadataChanges:n}=e;return{listenOptions:{includeMetadataChanges:n??!t},cache:t}}function I(e,t){return t!==!1||!e}function L(e,t,n={}){let{listenOptions:r,cache:i}=F(n),{onError:a}=n;return e.type,(0,p.onSnapshot)(e,r,e=>{I(e.metadata.fromCache,i)&&t(e)},a)}function R(){if(typeof window>`u`)return`pc`;let e=navigator.userAgent,t=navigator.platform,n=/Android/i.test(e),r=/iPhone|iPad|iPod/i.test(e)||t===`MacIntel`&&navigator.maxTouchPoints>1;return n?`android`:r?`ios`:`pc`}function z(e){let t=(0,l.createContext)(null);function n({children:n,...r}){let[i]=(0,l.useState)(()=>e(r));return(0,d.jsx)(t.Provider,{value:i,children:n})}function r(e){let n=(0,l.useContext)(t);if(!n)throw Error(`Provider가 필요합니다.`);return(0,m.useStore)(n,e)}let i=new Map;return{Provider:n,useStore:r,use:new Proxy({},{get:(e,t)=>(i.has(t)||i.set(t,()=>r(e=>e[t])),i.get(t))})}}var B=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),V=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(B()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_ko=r(n.dayjs)})(e,(function(e){"use strict";function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`ko`,weekdays:`일요일_월요일_화요일_수요일_목요일_금요일_토요일`.split(`_`),weekdaysShort:`일_월_화_수_목_금_토`.split(`_`),weekdaysMin:`일_월_화_수_목_금_토`.split(`_`),months:`1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월`.split(`_`),monthsShort:`1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월`.split(`_`),ordinal:function(e){return e+`일`},formats:{LT:`A h:mm`,LTS:`A h:mm:ss`,L:`YYYY.MM.DD.`,LL:`YYYY년 MMMM D일`,LLL:`YYYY년 MMMM D일 A h:mm`,LLLL:`YYYY년 MMMM D일 dddd A h:mm`,l:`YYYY.MM.DD.`,ll:`YYYY년 MMMM D일`,lll:`YYYY년 MMMM D일 A h:mm`,llll:`YYYY년 MMMM D일 dddd A h:mm`},meridiem:function(e){return e<12?`오전`:`오후`},relativeTime:{future:`%s 후`,past:`%s 전`,s:`몇 초`,m:`1분`,mm:`%d분`,h:`한 시간`,hh:`%d시간`,d:`하루`,dd:`%d일`,M:`한 달`,MM:`%d달`,y:`일 년`,yy:`%d년`}};return n.default.locale(r,null,!0),r}))})),H=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_en=r()})(e,(function(){"use strict";return{name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}}}))})),U=c(B(),1);V(),H();function W(e,t,n){let r=(0,U.default)(e);return!e||!r.isValid()?``:r.format(n(t))}function G(){let{t:e}=(0,f.useTranslation)();return(0,l.useMemo)(()=>({basicDateTimeFormat:(t,n)=>W(t,n,e),dateTimeFormat:t=>W(t,`libs:datetime.date_time_format`,e),dateFormat:t=>W(t,`libs:datetime.date_format`,e),timeFormat:t=>W(t,`libs:datetime.time_format`,e)}),[e])}function K(e){let t=(0,U.default)(e);return t.isValid()?t.format(`YYYYMMDD`):``}function q(e){let t=(0,U.default)(e);return t.isValid()?t.format(`HH:mm`):``}var J=e=>{let t=e?.split(`-`)[0]===`ko`?`ko`:`en`;U.default.locale(t)};h.default.isInitialized&&J(h.default.resolvedLanguage||h.default.language),h.default.on(`languageChanged`,J);var Y=()=>({updateAt:(0,p.serverTimestamp)(),delete:!0}),X=()=>({updateAt:(0,p.serverTimestamp)(),delete:!1});function Z(e){switch(e){case`auth/user-not-found`:return`libs:auth.errors.user_not_found`;case`auth/wrong-password`:return`libs:auth.errors.wrong_password`;case`auth/invalid-credential`:return`libs:auth.errors.invalid_credential`;case`auth/invalid-email`:return`libs:auth.errors.invalid_email`;case`auth/user-disabled`:return`libs:auth.errors.user_disabled`;case`auth/too-many-requests`:return`libs:auth.errors.too_many_requests`;case`auth/network-request-failed`:return`libs:auth.errors.network_request_failed`;case`auth/timeout`:return`libs:auth.errors.timeout`;case`auth/email-already-in-use`:return`libs:auth.errors.email_already_in_use`;case`auth/weak-password`:return`libs:auth.errors.weak_password`;case`auth/requires-recent-login`:return`libs:auth.errors.requires_recent_login`;case`auth/user-token-expired`:return`libs:auth.errors.user_token_expired`;case`auth/popup-blocked`:return`libs:auth.errors.popup_blocked`;case`auth/popup-closed-by-user`:return`libs:auth.errors.popup_closed_by_user`;case`auth/operation-not-allowed`:return`libs:auth.errors.operation_not_allowed`;case`auth/web-storage-unsupported`:return`libs:auth.errors.web_storage_unsupported`;case`auth/unauthorized-domain`:return`libs:auth.errors.unauthorized_domain`;default:return`libs:auth.errors.default`}}var Q={auth:{errors:{invalid_credential:`이메일 또는 비밀번호를 다시 확인해 주세요.`,wrong_password:`이메일 또는 비밀번호를 다시 확인해 주세요.`,user_not_found:`입력한 정보와 일치하는 계정을 찾을 수 없어요.`,invalid_email:`이메일 형식을 확인해 주세요.`,email_already_in_use:`이미 가입된 이메일이에요. 로그인하거나 다른 이메일을 사용해 주세요.`,weak_password:`비밀번호는 6자 이상으로 입력해 주세요.`,user_disabled:`이 계정은 현재 사용할 수 없어요. 관리자에게 문의해 주세요.`,too_many_requests:`시도가 너무 많아요. 잠시 후 다시 시도해 주세요.`,network_request_failed:`인터넷 연결을 확인한 뒤 다시 시도해 주세요.`,timeout:`응답이 지연되고 있어요. 잠시 후 다시 시도해 주세요.`,requires_recent_login:`보안을 위해 다시 로그인해 주세요.`,user_token_expired:`로그인 시간이 만료되었어요. 다시 로그인해 주세요.`,operation_not_allowed:`현재 사용할 수 없는 로그인 방식이에요.`,account_exists_with_different_credential:`이미 다른 로그인 방식으로 가입된 이메일이에요. 기존 방식으로 로그인해 주세요.`,popup_blocked:`로그인 창이 차단되었어요. 팝업 허용 후 다시 시도해 주세요.`,popup_closed_by_user:`로그인 창이 닫혀서 로그인이 완료되지 않았어요.`,web_storage_unsupported:`현재 브라우저 설정에서는 로그인을 진행할 수 없어요.`,unauthorized_domain:`현재 접속한 도메인에서는 로그인을 사용할 수 없어요.`,internal_error:`문제가 발생했어요. 잠시 후 다시 시도해 주세요.`,default:`로그인 중 문제가 발생했어요. 잠시 후 다시 시도해 주세요.`}},unknown_error_occurred:`알 수 없는 오류가 발생했습니다.`,datetime:{date_format:`YYYY년 M월 D일`,date_time_format:`YYYY년 M월 D일 A h:mm:ss`,time_format:`A h:mm:ss`},add_assets:`애셋 추가`},$={auth:{errors:{invalid_credential:`Please check your email or password.`,wrong_password:`Please check your email or password.`,user_not_found:`We couldn’t find an account matching that information.`,invalid_email:`Please check your email format.`,email_already_in_use:`This email is already registered. Sign in or use a different email.`,weak_password:`Your password must be at least 6 characters long.`,user_disabled:`This account is currently unavailable. Please contact support.`,too_many_requests:`Too many attempts. Please try again later.`,network_request_failed:`Check your internet connection and try again.`,timeout:`The request is taking too long. Please try again.`,requires_recent_login:`For security reasons, please sign in again.`,user_token_expired:`Your session has expired. Please sign in again.`,operation_not_allowed:`This sign-in method is currently unavailable.`,account_exists_with_different_credential:`This email is already linked to another sign-in method. Please use that method to sign in.`,popup_blocked:`The sign-in window was blocked. Please allow pop-ups and try again.`,popup_closed_by_user:`The sign-in window was closed before completion.`,web_storage_unsupported:`Sign-in is not available with your current browser settings.`,unauthorized_domain:`Sign-in is not available on this domain.`,internal_error:`Something went wrong. Please try again later.`,default:`We couldn’t complete the sign-in. Please try again later.`}},unknown_error_occurred:`Unknown error occurred.`,datetime:{date_format:`MMMM D, YYYY`,date_time_format:`MMMM D, YYYY h:mm:ss A`,time_format:`h:mm:ss A`},add_assets:`Add Assets`};function ee(e){e.hasResourceBundle(`ko`,`libs`)||e.addResourceBundle(`ko`,`libs`,Q,!0,!1),e.hasResourceBundle(`en`,`libs`)||e.addResourceBundle(`en`,`libs`,$,!0,!1)}var te={Info:{Soft:{"--normal-bg":`color-mix(in oklab, light-dark(var(--color-sky-600), var(--color-sky-400)) 10%, var(--background))`,"--normal-text":`light-dark(var(--color-sky-600), var(--color-sky-400))`,"--normal-border":`light-dark(var(--color-sky-600), var(--color-sky-400))`},Outline:{"--normal-bg":`var(--background)`,"--normal-text":`light-dark(var(--color-sky-600), var(--color-sky-400))`,"--normal-border":`light-dark(var(--color-sky-600), var(--color-sky-400))`},Solid:{"--normal-bg":`light-dark(var(--color-sky-600), var(--color-sky-400))`,"--normal-text":`var(--color-white)`,"--normal-border":`light-dark(var(--color-sky-600), var(--color-sky-400))`}},Success:{Soft:{"--normal-bg":`color-mix(in oklab, light-dark(var(--color-green-600), var(--color-green-400)) 10%, var(--background))`,"--normal-text":`light-dark(var(--color-green-600), var(--color-green-400))`,"--normal-border":`light-dark(var(--color-green-600), var(--color-green-400))`},Outline:{"--normal-bg":`var(--background)`,"--normal-text":`light-dark(var(--color-green-600), var(--color-green-400))`,"--normal-border":`light-dark(var(--color-green-600), var(--color-green-400))`},Solid:{"--normal-bg":`light-dark(var(--color-green-600), var(--color-green-400))`,"--normal-text":`var(--color-white)`,"--normal-border":`light-dark(var(--color-green-600), var(--color-green-400))`}},Warning:{Soft:{"--normal-bg":`color-mix(in oklab, light-dark(var(--color-amber-600), var(--color-amber-400)) 10%, var(--background))`,"--normal-text":`light-dark(var(--color-amber-600), var(--color-amber-400))`,"--normal-border":`light-dark(var(--color-amber-600), var(--color-amber-400))`},Outline:{"--normal-bg":`var(--background)`,"--normal-text":`light-dark(var(--color-amber-600), var(--color-amber-400))`,"--normal-border":`light-dark(var(--color-amber-600), var(--color-amber-400))`},Solid:{"--normal-bg":`light-dark(var(--color-amber-600), var(--color-amber-400))`,"--normal-text":`var(--color-white)`,"--normal-border":`light-dark(var(--color-amber-600), var(--color-amber-400))`}},Destructive:{Soft:{"--normal-bg":`color-mix(in oklab, var(--destructive) 10%, var(--background))`,"--normal-text":`var(--destructive)`,"--normal-border":`var(--destructive)`},Outline:{"--normal-bg":`var(--background)`,"--normal-text":`var(--destructive)`,"--normal-border":`var(--destructive)`},Solid:{"--normal-bg":`light-dark(var(--destructive), color-mix(in oklab, var(--destructive) 60%, var(--background)))`,"--normal-text":`var(--color-white)`,"--normal-border":`transparent`}}};exports.CrossfadeImage=g,exports.ImageUploadField=k,exports.ImageUploadItem=D,exports.ImageUploadSortableField=j,exports.SUPPORTED_LOCALES=E,exports.ToastCSS=te,exports.createZustandContext=z,exports.dateIdFormat=K,exports.deleteItem=Y,exports.fetchItems=N,exports.fetchItemsByOne=P,exports.getAuthErrorKey=Z,exports.getPlatformType=R,exports.getSnapshots=L,exports.initIenlabI18n=ee,exports.snapshotToData=M,exports.time24Format=q,exports.undeleteItem=X,exports.useDateTimeFormatters=G;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require(`react`),u=require(`motion/react`),d=require(`react/jsx-runtime`),f=require(`react-i18next`),p=require(`firebase/firestore`),m=require(`zustand/react`),h=require(`i18next`);h=c(h,1);let g=require(`firebase/storage`);function _({placeholder:e,src:t,onLoadError:n,...r}){let[i,a]=(0,l.useState)(()=>{if(typeof window>`u`||!t)return!1;let e=new Image;return e.src=t,e.complete&&e.naturalWidth>0}),[o,s]=(0,l.useState)(t);return o!==t&&(s(t),a(!1)),(0,l.useEffect)(()=>{if(!t)return;let e=new Image;return e.src=t,e.onload=()=>a(!0),e.onerror=e=>{n?n(e):console.error(`CrossfadeImage: Failed to load image`,t)},e.complete&&e.naturalWidth>0&&e.onload(new Event(`load`)),()=>{e.onload=null,e.onerror=null}},[t,n]),(0,d.jsx)(u.AnimatePresence,{children:i&&t?(0,d.jsx)(u.motion.img,{src:t,...r,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},style:{...r.style}},`loaded-image`):(0,d.jsx)(u.motion.div,{initial:{opacity:1},transition:{duration:.3},style:{...r.style},children:e??(0,d.jsx)(`div`,{className:`w-full h-full bg-sidebar`})},`placeholder`)})}var v=({children:e})=>(0,d.jsx)(`div`,{children:e}),y=e=>(0,d.jsx)(`label`,{...e}),b=({children:e})=>(0,d.jsx)(`p`,{children:e}),x=e=>(0,d.jsx)(`input`,{...e}),S=({children:e,...t})=>(0,d.jsx)(`div`,{...t,children:e}),C=e=>null,w=({children:e,...t})=>(0,d.jsx)(`div`,{...t,children:e}),T=({children:e,type:t=`button`,...n})=>(0,d.jsx)(`button`,{type:t,...n,children:e}),E=({className:e})=>(0,d.jsx)(`span`,{className:e,children:`×`}),D=[`ko`,`en`],O=class{url=``;file=null;constructor(e={}){Object.assign(this,e)}isBlobUrl(){return this.url.startsWith(`blob:`)}revokeIfNeeded(){this.file&&this.isBlobUrl()&&URL.revokeObjectURL(this.url)}get isEmpty(){return!this.file&&!this.url}},k={wrapper:{display:`flex`,flexDirection:`column`,gap:`1rem`},trigger:{display:`block`,cursor:`pointer`},card:{position:`relative`,overflow:`hidden`,borderRadius:`1.5rem`,border:`1px solid #e5e7eb`,backgroundColor:`#ffffff`,transition:`background-color 160ms ease, box-shadow 160ms ease`},frame:{position:`relative`,width:`100%`,aspectRatio:`16 / 9`},imageLayer:{position:`absolute`,inset:0,padding:`1.5rem`},imageBox:{margin:`0 auto`,maxWidth:`100%`,maxHeight:`100%`},image:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`},empty:{display:`flex`,width:`100%`,height:`100%`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:`1rem`,color:`#6b7280`,textAlign:`center`,padding:`1rem`,boxSizing:`border-box`},badge:{borderRadius:`1rem`,backgroundColor:`#f3f4f6`,padding:`0.75rem 1rem`,fontSize:`0.875rem`,lineHeight:1.2,color:`#111827`},hint:{margin:0,fontSize:`0.875rem`,lineHeight:1.4},overlay:{pointerEvents:`none`,position:`absolute`,inset:0,borderRadius:`inherit`,boxShadow:`inset 0 0 0 0 rgba(59, 130, 246, 0)`,transition:`box-shadow 160ms ease`}};function A({id:e,label:t,uploadHintText:n,descriptionText:r,value:i,onChange:a,aspectRatio:o=`1 / 1`,accept:s=`image/*`,components:c}){let{t:u}=(0,f.useTranslation)(),p=c?.Field??v,m=c?.FieldLabel??y,h=c?.FieldDescription??b,g=c?.Input??x,S={...k.imageBox,aspectRatio:o},[C,w]=(0,l.useState)(!1);return(0,d.jsxs)(p,{children:[(0,d.jsx)(m,{htmlFor:e,children:t}),(0,d.jsxs)(`div`,{style:k.wrapper,children:[(0,d.jsx)(`label`,{htmlFor:e,style:{...k.trigger,backgroundColor:C?`#f9fafb`:`#ffffff`},onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:(0,d.jsxs)(`div`,{style:k.card,children:[(0,d.jsx)(`div`,{style:k.frame,children:i.url?(0,d.jsx)(`div`,{style:k.imageLayer,children:(0,d.jsx)(`div`,{style:S,children:(0,d.jsx)(_,{src:i.url,className:``,alt:t,style:k.image})})}):(0,d.jsxs)(`div`,{style:k.empty,children:[(0,d.jsx)(`div`,{style:k.badge,children:u(`libs:add_assets`)}),(0,d.jsx)(`p`,{style:k.hint,children:n})]})}),(0,d.jsx)(`div`,{style:{...k.overlay,boxShadow:C?`inset 0 0 0 2px rgba(59, 130, 246, 0.16)`:`inset 0 0 0 0 rgba(59, 130, 246, 0)`}})]})}),(0,d.jsx)(g,{id:e,type:`file`,accept:s,onChange:e=>{let t=e.target.files?.[0];t&&(i.revokeIfNeeded(),a(new O({file:t,url:URL.createObjectURL(t)})),e.currentTarget.value=``)},style:{display:`none`}}),(0,d.jsx)(h,{children:r})]})]})}var j={wrapper:{display:`flex`,flexDirection:`column`,gap:`0.75rem`},outerBox:{borderRadius:`1.5rem`,border:`1px solid #e5e7eb`,backgroundColor:`#ffffff`,overflow:`hidden`},scrollArea:{width:`100%`,overflowX:`auto`,overflowY:`hidden`,whiteSpace:`nowrap`},list:{display:`flex`,width:`max-content`,gap:`1rem`,padding:`1rem`},item:{position:`relative`,flexShrink:0},card:{position:`relative`,width:`15rem`,overflow:`hidden`,borderRadius:`0.75rem`,padding:0,backgroundColor:`#ffffff`,border:`1px solid #e5e7eb`,boxSizing:`border-box`},cardInner:{position:`relative`,width:`100%`,height:`100%`},image:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`},removeButton:{position:`absolute`,right:`1rem`,bottom:`1rem`,borderRadius:`9999px`,boxShadow:`0 1px 3px rgba(0, 0, 0, 0.12)`},uploadLabel:{display:`block`,flexShrink:0,cursor:`pointer`},uploadCard:{width:`15rem`,overflow:`hidden`,borderRadius:`0.75rem`,padding:0,border:`1px dashed #d1d5db`,backgroundColor:`#ffffff`,boxSizing:`border-box`,transition:`background-color 160ms ease`},uploadCardInner:{display:`flex`,width:`100%`,height:`100%`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:`1rem`,color:`#6b7280`,textAlign:`center`,padding:`1rem`,boxSizing:`border-box`},badge:{borderRadius:`1rem`,backgroundColor:`#f3f4f6`,padding:`0.75rem 1rem`,fontSize:`0.875rem`,lineHeight:1.2,color:`#111827`},hint:{margin:0,fontSize:`0.875rem`,lineHeight:1.4},description:{marginTop:`0.25rem`},hiddenInput:{display:`none`},scrollBar:{marginLeft:`1rem`,marginRight:`1rem`}};function M({id:e,label:t,descriptionText:n,uploadHintText:r,items:i,onChange:a,aspectRatio:o=`1 / 1`,accept:s=`image/*`,components:c}){let{t:l}=(0,f.useTranslation)(),p=c?.Field??v,m=c?.FieldLabel??y,h=c?.FieldDescription??b,g=c?.Input??x,D=c?.ScrollArea??S,k=c?.ScrollBar??C,A=c?.Card??w,M=c?.Button??T,N=c?.CloseIcon??E,P=e=>{e.revokeIfNeeded(),a(i.filter(t=>t!==e))},F=e=>{!e||e.length===0||a([...i,...Array.from(e).map(e=>new O({file:e,url:URL.createObjectURL(e)}))])},I={...j.card,aspectRatio:o},L={...j.uploadCard,aspectRatio:o};return(0,d.jsxs)(p,{children:[(0,d.jsx)(m,{htmlFor:e,children:t}),(0,d.jsxs)(`div`,{style:j.wrapper,children:[(0,d.jsxs)(`div`,{style:j.outerBox,children:[(0,d.jsxs)(D,{style:j.scrollArea,children:[(0,d.jsxs)(u.Reorder.Group,{axis:`x`,values:i,onReorder:a,layoutScroll:!0,style:j.list,children:[i.map(e=>(0,d.jsx)(u.Reorder.Item,{value:e,style:j.item,children:(0,d.jsx)(A,{style:I,children:(0,d.jsxs)(`div`,{style:j.cardInner,children:[(0,d.jsx)(_,{src:e.url,className:``,alt:t,style:j.image,draggable:!1}),(0,d.jsx)(M,{type:`button`,style:j.removeButton,onClick:()=>P(e),children:(0,d.jsx)(N,{})})]})})},e.url)),(0,d.jsx)(`label`,{htmlFor:e,style:j.uploadLabel,children:(0,d.jsx)(A,{style:L,onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#f9fafb`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`},children:(0,d.jsxs)(`div`,{style:j.uploadCardInner,children:[(0,d.jsx)(`div`,{style:j.badge,children:l(`libs:add_assets`)}),(0,d.jsx)(`p`,{style:j.hint,children:r})]})})})]}),(0,d.jsx)(k,{orientation:`horizontal`,style:j.scrollBar})]}),(0,d.jsx)(g,{id:e,type:`file`,accept:s,multiple:!0,onChange:e=>{F(e.target.files),e.currentTarget.value=``},style:j.hiddenInput})]}),(0,d.jsx)(`div`,{style:j.description,children:(0,d.jsx)(h,{children:n})})]})]})}function N(e){return{...e.data(),id:e.id}}async function P(e,t,n,r){let i=r.filter(e=>!!(e&&!n.has(e.path)));for(let r=0;r<i.length;r+=30){let a=i.slice(r,r+30);(await(0,p.getDocs)((0,p.query)(e,(0,p.where)((0,p.documentId)(),`in`,a.map(e=>e.id))))).forEach(e=>{let r=t(e);n.set(e.ref.path,r)})}}async function F(e,t,n){let r=n.filter(e=>!!(e&&!t.has(e.path)));await Promise.all(r.map(async n=>{let r=e(await(0,p.getDoc)(n));t.set(n.path,r)}))}function I(e={}){let{cache:t=!0,includeMetadataChanges:n}=e;return{listenOptions:{includeMetadataChanges:n??!t},cache:t}}function L(e,t){return t!==!1||!e}function R(e,t,n={}){let{listenOptions:r,cache:i}=I(n),{onError:a}=n;return e.type,(0,p.onSnapshot)(e,r,e=>{L(e.metadata.fromCache,i)&&t(e)},a)}function z(){if(typeof window>`u`)return`pc`;let e=navigator.userAgent,t=navigator.platform,n=/Android/i.test(e),r=/iPhone|iPad|iPod/i.test(e)||t===`MacIntel`&&navigator.maxTouchPoints>1;return n?`android`:r?`ios`:`pc`}function B(e){let t=(0,l.createContext)(null);function n({children:n,...r}){let[i]=(0,l.useState)(()=>e(r));return(0,d.jsx)(t.Provider,{value:i,children:n})}function r(e){let n=(0,l.useContext)(t);if(!n)throw Error(`Provider가 필요합니다.`);return(0,m.useStore)(n,e)}let i=new Map;return{Provider:n,useStore:r,use:new Proxy({},{get:(e,t)=>(i.has(t)||i.set(t,()=>r(e=>e[t])),i.get(t))})}}var V=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),H=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(V()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_ko=r(n.dayjs)})(e,(function(e){"use strict";function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`ko`,weekdays:`일요일_월요일_화요일_수요일_목요일_금요일_토요일`.split(`_`),weekdaysShort:`일_월_화_수_목_금_토`.split(`_`),weekdaysMin:`일_월_화_수_목_금_토`.split(`_`),months:`1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월`.split(`_`),monthsShort:`1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월`.split(`_`),ordinal:function(e){return e+`일`},formats:{LT:`A h:mm`,LTS:`A h:mm:ss`,L:`YYYY.MM.DD.`,LL:`YYYY년 MMMM D일`,LLL:`YYYY년 MMMM D일 A h:mm`,LLLL:`YYYY년 MMMM D일 dddd A h:mm`,l:`YYYY.MM.DD.`,ll:`YYYY년 MMMM D일`,lll:`YYYY년 MMMM D일 A h:mm`,llll:`YYYY년 MMMM D일 dddd A h:mm`},meridiem:function(e){return e<12?`오전`:`오후`},relativeTime:{future:`%s 후`,past:`%s 전`,s:`몇 초`,m:`1분`,mm:`%d분`,h:`한 시간`,hh:`%d시간`,d:`하루`,dd:`%d일`,M:`한 달`,MM:`%d달`,y:`일 년`,yy:`%d년`}};return n.default.locale(r,null,!0),r}))})),U=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_en=r()})(e,(function(){"use strict";return{name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}}}))})),W=c(V(),1);H(),U();function G(e,t,n){let r=(0,W.default)(e);return!e||!r.isValid()?``:r.format(n(t))}function K(){let{t:e}=(0,f.useTranslation)();return(0,l.useMemo)(()=>({basicDateTimeFormat:(t,n)=>G(t,n,e),dateTimeFormat:t=>G(t,`libs:datetime.date_time_format`,e),dateFormat:t=>G(t,`libs:datetime.date_format`,e),timeFormat:t=>G(t,`libs:datetime.time_format`,e)}),[e])}function q(e){let t=(0,W.default)(e);return t.isValid()?t.format(`YYYYMMDD`):``}function J(e){let t=(0,W.default)(e);return t.isValid()?t.format(`HH:mm`):``}var Y=e=>{let t=e?.split(`-`)[0]===`ko`?`ko`:`en`;W.default.locale(t)};h.default.isInitialized&&Y(h.default.resolvedLanguage||h.default.language),h.default.on(`languageChanged`,Y);function X(e){let t=e.lastIndexOf(`.`);return t===-1?``:e.substring(t+1)}async function Z(e,t,n){if(!n.file)return n.url;try{let r=X(n.file.name);return await(0,g.getDownloadURL)((await(0,g.uploadBytes)((0,g.ref)(e,r?t+`.`+r:t),n.file,{contentType:n.file.type})).ref)}catch(e){throw console.error(`Firebase image upload failed:`,e),e}}var Q=()=>({updateAt:(0,p.serverTimestamp)(),delete:!0}),$=()=>({updateAt:(0,p.serverTimestamp)(),delete:!1});function ee(e){switch(e){case`auth/user-not-found`:return`libs:auth.errors.user_not_found`;case`auth/wrong-password`:return`libs:auth.errors.wrong_password`;case`auth/invalid-credential`:return`libs:auth.errors.invalid_credential`;case`auth/invalid-email`:return`libs:auth.errors.invalid_email`;case`auth/user-disabled`:return`libs:auth.errors.user_disabled`;case`auth/too-many-requests`:return`libs:auth.errors.too_many_requests`;case`auth/network-request-failed`:return`libs:auth.errors.network_request_failed`;case`auth/timeout`:return`libs:auth.errors.timeout`;case`auth/email-already-in-use`:return`libs:auth.errors.email_already_in_use`;case`auth/weak-password`:return`libs:auth.errors.weak_password`;case`auth/requires-recent-login`:return`libs:auth.errors.requires_recent_login`;case`auth/user-token-expired`:return`libs:auth.errors.user_token_expired`;case`auth/popup-blocked`:return`libs:auth.errors.popup_blocked`;case`auth/popup-closed-by-user`:return`libs:auth.errors.popup_closed_by_user`;case`auth/operation-not-allowed`:return`libs:auth.errors.operation_not_allowed`;case`auth/web-storage-unsupported`:return`libs:auth.errors.web_storage_unsupported`;case`auth/unauthorized-domain`:return`libs:auth.errors.unauthorized_domain`;default:return`libs:auth.errors.default`}}var te={auth:{errors:{invalid_credential:`이메일 또는 비밀번호를 다시 확인해 주세요.`,wrong_password:`이메일 또는 비밀번호를 다시 확인해 주세요.`,user_not_found:`입력한 정보와 일치하는 계정을 찾을 수 없어요.`,invalid_email:`이메일 형식을 확인해 주세요.`,email_already_in_use:`이미 가입된 이메일이에요. 로그인하거나 다른 이메일을 사용해 주세요.`,weak_password:`비밀번호는 6자 이상으로 입력해 주세요.`,user_disabled:`이 계정은 현재 사용할 수 없어요. 관리자에게 문의해 주세요.`,too_many_requests:`시도가 너무 많아요. 잠시 후 다시 시도해 주세요.`,network_request_failed:`인터넷 연결을 확인한 뒤 다시 시도해 주세요.`,timeout:`응답이 지연되고 있어요. 잠시 후 다시 시도해 주세요.`,requires_recent_login:`보안을 위해 다시 로그인해 주세요.`,user_token_expired:`로그인 시간이 만료되었어요. 다시 로그인해 주세요.`,operation_not_allowed:`현재 사용할 수 없는 로그인 방식이에요.`,account_exists_with_different_credential:`이미 다른 로그인 방식으로 가입된 이메일이에요. 기존 방식으로 로그인해 주세요.`,popup_blocked:`로그인 창이 차단되었어요. 팝업 허용 후 다시 시도해 주세요.`,popup_closed_by_user:`로그인 창이 닫혀서 로그인이 완료되지 않았어요.`,web_storage_unsupported:`현재 브라우저 설정에서는 로그인을 진행할 수 없어요.`,unauthorized_domain:`현재 접속한 도메인에서는 로그인을 사용할 수 없어요.`,internal_error:`문제가 발생했어요. 잠시 후 다시 시도해 주세요.`,default:`로그인 중 문제가 발생했어요. 잠시 후 다시 시도해 주세요.`}},unknown_error_occurred:`알 수 없는 오류가 발생했습니다.`,datetime:{date_format:`YYYY년 M월 D일`,date_time_format:`YYYY년 M월 D일 A h:mm:ss`,time_format:`A h:mm:ss`},add_assets:`애셋 추가`},ne={auth:{errors:{invalid_credential:`Please check your email or password.`,wrong_password:`Please check your email or password.`,user_not_found:`We couldn’t find an account matching that information.`,invalid_email:`Please check your email format.`,email_already_in_use:`This email is already registered. Sign in or use a different email.`,weak_password:`Your password must be at least 6 characters long.`,user_disabled:`This account is currently unavailable. Please contact support.`,too_many_requests:`Too many attempts. Please try again later.`,network_request_failed:`Check your internet connection and try again.`,timeout:`The request is taking too long. Please try again.`,requires_recent_login:`For security reasons, please sign in again.`,user_token_expired:`Your session has expired. Please sign in again.`,operation_not_allowed:`This sign-in method is currently unavailable.`,account_exists_with_different_credential:`This email is already linked to another sign-in method. Please use that method to sign in.`,popup_blocked:`The sign-in window was blocked. Please allow pop-ups and try again.`,popup_closed_by_user:`The sign-in window was closed before completion.`,web_storage_unsupported:`Sign-in is not available with your current browser settings.`,unauthorized_domain:`Sign-in is not available on this domain.`,internal_error:`Something went wrong. Please try again later.`,default:`We couldn’t complete the sign-in. Please try again later.`}},unknown_error_occurred:`Unknown error occurred.`,datetime:{date_format:`MMMM D, YYYY`,date_time_format:`MMMM D, YYYY h:mm:ss A`,time_format:`h:mm:ss A`},add_assets:`Add Assets`};function re(e){e.hasResourceBundle(`ko`,`libs`)||e.addResourceBundle(`ko`,`libs`,te,!0,!1),e.hasResourceBundle(`en`,`libs`)||e.addResourceBundle(`en`,`libs`,ne,!0,!1)}var ie={Info:{Soft:{"--normal-bg":`color-mix(in oklab, light-dark(var(--color-sky-600), var(--color-sky-400)) 10%, var(--background))`,"--normal-text":`light-dark(var(--color-sky-600), var(--color-sky-400))`,"--normal-border":`light-dark(var(--color-sky-600), var(--color-sky-400))`},Outline:{"--normal-bg":`var(--background)`,"--normal-text":`light-dark(var(--color-sky-600), var(--color-sky-400))`,"--normal-border":`light-dark(var(--color-sky-600), var(--color-sky-400))`},Solid:{"--normal-bg":`light-dark(var(--color-sky-600), var(--color-sky-400))`,"--normal-text":`var(--color-white)`,"--normal-border":`light-dark(var(--color-sky-600), var(--color-sky-400))`}},Success:{Soft:{"--normal-bg":`color-mix(in oklab, light-dark(var(--color-green-600), var(--color-green-400)) 10%, var(--background))`,"--normal-text":`light-dark(var(--color-green-600), var(--color-green-400))`,"--normal-border":`light-dark(var(--color-green-600), var(--color-green-400))`},Outline:{"--normal-bg":`var(--background)`,"--normal-text":`light-dark(var(--color-green-600), var(--color-green-400))`,"--normal-border":`light-dark(var(--color-green-600), var(--color-green-400))`},Solid:{"--normal-bg":`light-dark(var(--color-green-600), var(--color-green-400))`,"--normal-text":`var(--color-white)`,"--normal-border":`light-dark(var(--color-green-600), var(--color-green-400))`}},Warning:{Soft:{"--normal-bg":`color-mix(in oklab, light-dark(var(--color-amber-600), var(--color-amber-400)) 10%, var(--background))`,"--normal-text":`light-dark(var(--color-amber-600), var(--color-amber-400))`,"--normal-border":`light-dark(var(--color-amber-600), var(--color-amber-400))`},Outline:{"--normal-bg":`var(--background)`,"--normal-text":`light-dark(var(--color-amber-600), var(--color-amber-400))`,"--normal-border":`light-dark(var(--color-amber-600), var(--color-amber-400))`},Solid:{"--normal-bg":`light-dark(var(--color-amber-600), var(--color-amber-400))`,"--normal-text":`var(--color-white)`,"--normal-border":`light-dark(var(--color-amber-600), var(--color-amber-400))`}},Destructive:{Soft:{"--normal-bg":`color-mix(in oklab, var(--destructive) 10%, var(--background))`,"--normal-text":`var(--destructive)`,"--normal-border":`var(--destructive)`},Outline:{"--normal-bg":`var(--background)`,"--normal-text":`var(--destructive)`,"--normal-border":`var(--destructive)`},Solid:{"--normal-bg":`light-dark(var(--destructive), color-mix(in oklab, var(--destructive) 60%, var(--background)))`,"--normal-text":`var(--color-white)`,"--normal-border":`transparent`}}};exports.CrossfadeImage=_,exports.ImageUploadField=A,exports.ImageUploadItem=O,exports.ImageUploadSortableField=M,exports.SUPPORTED_LOCALES=D,exports.ToastCSS=ie,exports.createZustandContext=B,exports.dateIdFormat=q,exports.deleteItem=Q,exports.fetchItems=P,exports.fetchItemsByOne=F,exports.getAuthErrorKey=ee,exports.getFileExtension=X,exports.getPlatformType=z,exports.getSnapshots=R,exports.initIenlabI18n=re,exports.snapshotToData=N,exports.time24Format=J,exports.undeleteItem=$,exports.uploadImage=Z,exports.useDateTimeFormatters=K;
@@ -5,20 +5,21 @@ import { useTranslation as u } from "react-i18next";
5
5
  import { documentId as d, getDoc as f, getDocs as p, onSnapshot as m, query as h, serverTimestamp as g, where as _ } from "firebase/firestore";
6
6
  import { useStore as v } from "zustand/react";
7
7
  import y from "i18next";
8
+ import { getDownloadURL as b, ref as x, uploadBytes as S } from "firebase/storage";
8
9
  //#region \0rolldown/runtime.js
9
- var b = Object.create, x = Object.defineProperty, S = Object.getOwnPropertyDescriptor, C = Object.getOwnPropertyNames, w = Object.getPrototypeOf, T = Object.prototype.hasOwnProperty, E = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), D = (e, t, n, r) => {
10
- if (t && typeof t == "object" || typeof t == "function") for (var i = C(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !T.call(e, s) && s !== n && x(e, s, {
10
+ var C = Object.create, w = Object.defineProperty, T = Object.getOwnPropertyDescriptor, E = Object.getOwnPropertyNames, D = Object.getPrototypeOf, O = Object.prototype.hasOwnProperty, k = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), A = (e, t, n, r) => {
11
+ if (t && typeof t == "object" || typeof t == "function") for (var i = E(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !O.call(e, s) && s !== n && w(e, s, {
11
12
  get: ((e) => t[e]).bind(null, s),
12
- enumerable: !(r = S(t, s)) || r.enumerable
13
+ enumerable: !(r = T(t, s)) || r.enumerable
13
14
  });
14
15
  return e;
15
- }, ee = (e, t, n) => (n = e == null ? {} : b(w(e)), D(t || !e || !e.__esModule ? x(n, "default", {
16
+ }, ee = (e, t, n) => (n = e == null ? {} : C(D(e)), A(t || !e || !e.__esModule ? w(n, "default", {
16
17
  value: e,
17
18
  enumerable: !0
18
19
  }) : n, e));
19
20
  //#endregion
20
21
  //#region src/components/image/CrossfadeImage.tsx
21
- function O({ placeholder: e, src: t, onLoadError: r, ...o }) {
22
+ function j({ placeholder: e, src: t, onLoadError: r, ...o }) {
22
23
  let [l, u] = i(() => {
23
24
  if (typeof window > "u" || !t) return !1;
24
25
  let e = new Image();
@@ -48,20 +49,20 @@ function O({ placeholder: e, src: t, onLoadError: r, ...o }) {
48
49
  }
49
50
  //#endregion
50
51
  //#region src/types/image.tsx
51
- var k = ({ children: e }) => /* @__PURE__ */ c("div", { children: e }), A = (e) => /* @__PURE__ */ c("label", { ...e }), j = ({ children: e }) => /* @__PURE__ */ c("p", { children: e }), M = (e) => /* @__PURE__ */ c("input", { ...e }), N = ({ children: e, ...t }) => /* @__PURE__ */ c("div", {
52
+ var M = ({ children: e }) => /* @__PURE__ */ c("div", { children: e }), N = (e) => /* @__PURE__ */ c("label", { ...e }), P = ({ children: e }) => /* @__PURE__ */ c("p", { children: e }), F = (e) => /* @__PURE__ */ c("input", { ...e }), I = ({ children: e, ...t }) => /* @__PURE__ */ c("div", {
52
53
  ...t,
53
54
  children: e
54
- }), P = (e) => null, F = ({ children: e, ...t }) => /* @__PURE__ */ c("div", {
55
+ }), L = (e) => null, te = ({ children: e, ...t }) => /* @__PURE__ */ c("div", {
55
56
  ...t,
56
57
  children: e
57
- }), te = ({ children: e, type: t = "button", ...n }) => /* @__PURE__ */ c("button", {
58
+ }), ne = ({ children: e, type: t = "button", ...n }) => /* @__PURE__ */ c("button", {
58
59
  type: t,
59
60
  ...n,
60
61
  children: e
61
- }), ne = ({ className: e }) => /* @__PURE__ */ c("span", {
62
+ }), re = ({ className: e }) => /* @__PURE__ */ c("span", {
62
63
  className: e,
63
64
  children: "×"
64
- }), re = ["ko", "en"], I = class {
65
+ }), ie = ["ko", "en"], R = class {
65
66
  url = "";
66
67
  file = null;
67
68
  constructor(e = {}) {
@@ -73,7 +74,10 @@ var k = ({ children: e }) => /* @__PURE__ */ c("div", { children: e }), A = (e)
73
74
  revokeIfNeeded() {
74
75
  this.file && this.isBlobUrl() && URL.revokeObjectURL(this.url);
75
76
  }
76
- }, L = {
77
+ get isEmpty() {
78
+ return !this.file && !this.url;
79
+ }
80
+ }, z = {
77
81
  wrapper: {
78
82
  display: "flex",
79
83
  flexDirection: "column",
@@ -147,52 +151,52 @@ var k = ({ children: e }) => /* @__PURE__ */ c("div", { children: e }), A = (e)
147
151
  transition: "box-shadow 160ms ease"
148
152
  }
149
153
  };
150
- function R({ id: e, label: t, uploadHintText: n, descriptionText: r, value: a, onChange: o, aspectRatio: s = "1 / 1", accept: d = "image/*", components: f }) {
151
- let { t: p } = u(), m = f?.Field ?? k, h = f?.FieldLabel ?? A, g = f?.FieldDescription ?? j, _ = f?.Input ?? M, v = {
152
- ...L.imageBox,
154
+ function B({ id: e, label: t, uploadHintText: n, descriptionText: r, value: a, onChange: o, aspectRatio: s = "1 / 1", accept: d = "image/*", components: f }) {
155
+ let { t: p } = u(), m = f?.Field ?? M, h = f?.FieldLabel ?? N, g = f?.FieldDescription ?? P, _ = f?.Input ?? F, v = {
156
+ ...z.imageBox,
153
157
  aspectRatio: s
154
158
  }, [y, b] = i(!1);
155
159
  return /* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c(h, {
156
160
  htmlFor: e,
157
161
  children: t
158
162
  }), /* @__PURE__ */ l("div", {
159
- style: L.wrapper,
163
+ style: z.wrapper,
160
164
  children: [
161
165
  /* @__PURE__ */ c("label", {
162
166
  htmlFor: e,
163
167
  style: {
164
- ...L.trigger,
168
+ ...z.trigger,
165
169
  backgroundColor: y ? "#f9fafb" : "#ffffff"
166
170
  },
167
171
  onMouseEnter: () => b(!0),
168
172
  onMouseLeave: () => b(!1),
169
173
  children: /* @__PURE__ */ l("div", {
170
- style: L.card,
174
+ style: z.card,
171
175
  children: [/* @__PURE__ */ c("div", {
172
- style: L.frame,
176
+ style: z.frame,
173
177
  children: a.url ? /* @__PURE__ */ c("div", {
174
- style: L.imageLayer,
178
+ style: z.imageLayer,
175
179
  children: /* @__PURE__ */ c("div", {
176
180
  style: v,
177
- children: /* @__PURE__ */ c(O, {
181
+ children: /* @__PURE__ */ c(j, {
178
182
  src: a.url,
179
183
  className: "",
180
184
  alt: t,
181
- style: L.image
185
+ style: z.image
182
186
  })
183
187
  })
184
188
  }) : /* @__PURE__ */ l("div", {
185
- style: L.empty,
189
+ style: z.empty,
186
190
  children: [/* @__PURE__ */ c("div", {
187
- style: L.badge,
191
+ style: z.badge,
188
192
  children: p("libs:add_assets")
189
193
  }), /* @__PURE__ */ c("p", {
190
- style: L.hint,
194
+ style: z.hint,
191
195
  children: n
192
196
  })]
193
197
  })
194
198
  }), /* @__PURE__ */ c("div", { style: {
195
- ...L.overlay,
199
+ ...z.overlay,
196
200
  boxShadow: y ? "inset 0 0 0 2px rgba(59, 130, 246, 0.16)" : "inset 0 0 0 0 rgba(59, 130, 246, 0)"
197
201
  } })]
198
202
  })
@@ -203,7 +207,7 @@ function R({ id: e, label: t, uploadHintText: n, descriptionText: r, value: a, o
203
207
  accept: d,
204
208
  onChange: (e) => {
205
209
  let t = e.target.files?.[0];
206
- t && (a.revokeIfNeeded(), o(new I({
210
+ t && (a.revokeIfNeeded(), o(new R({
207
211
  file: t,
208
212
  url: URL.createObjectURL(t)
209
213
  })), e.currentTarget.value = "");
@@ -216,7 +220,7 @@ function R({ id: e, label: t, uploadHintText: n, descriptionText: r, value: a, o
216
220
  }
217
221
  //#endregion
218
222
  //#region src/components/image/ImageUploadSortableField.tsx
219
- var z = {
223
+ var V = {
220
224
  wrapper: {
221
225
  display: "flex",
222
226
  flexDirection: "column",
@@ -320,52 +324,52 @@ var z = {
320
324
  marginRight: "1rem"
321
325
  }
322
326
  };
323
- function B({ id: e, label: t, descriptionText: n, uploadHintText: r, items: i, onChange: a, aspectRatio: s = "1 / 1", accept: d = "image/*", components: f }) {
324
- let { t: p } = u(), m = f?.Field ?? k, h = f?.FieldLabel ?? A, g = f?.FieldDescription ?? j, _ = f?.Input ?? M, v = f?.ScrollArea ?? N, y = f?.ScrollBar ?? P, b = f?.Card ?? F, x = f?.Button ?? te, S = f?.CloseIcon ?? ne, C = (e) => {
327
+ function H({ id: e, label: t, descriptionText: n, uploadHintText: r, items: i, onChange: a, aspectRatio: s = "1 / 1", accept: d = "image/*", components: f }) {
328
+ let { t: p } = u(), m = f?.Field ?? M, h = f?.FieldLabel ?? N, g = f?.FieldDescription ?? P, _ = f?.Input ?? F, v = f?.ScrollArea ?? I, y = f?.ScrollBar ?? L, b = f?.Card ?? te, x = f?.Button ?? ne, S = f?.CloseIcon ?? re, C = (e) => {
325
329
  e.revokeIfNeeded(), a(i.filter((t) => t !== e));
326
330
  }, w = (e) => {
327
- !e || e.length === 0 || a([...i, ...Array.from(e).map((e) => new I({
331
+ !e || e.length === 0 || a([...i, ...Array.from(e).map((e) => new R({
328
332
  file: e,
329
333
  url: URL.createObjectURL(e)
330
334
  }))]);
331
335
  }, T = {
332
- ...z.card,
336
+ ...V.card,
333
337
  aspectRatio: s
334
338
  }, E = {
335
- ...z.uploadCard,
339
+ ...V.uploadCard,
336
340
  aspectRatio: s
337
341
  };
338
342
  return /* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c(h, {
339
343
  htmlFor: e,
340
344
  children: t
341
345
  }), /* @__PURE__ */ l("div", {
342
- style: z.wrapper,
346
+ style: V.wrapper,
343
347
  children: [/* @__PURE__ */ l("div", {
344
- style: z.outerBox,
348
+ style: V.outerBox,
345
349
  children: [/* @__PURE__ */ l(v, {
346
- style: z.scrollArea,
350
+ style: V.scrollArea,
347
351
  children: [/* @__PURE__ */ l(o.Group, {
348
352
  axis: "x",
349
353
  values: i,
350
354
  onReorder: a,
351
355
  layoutScroll: !0,
352
- style: z.list,
356
+ style: V.list,
353
357
  children: [i.map((e) => /* @__PURE__ */ c(o.Item, {
354
358
  value: e,
355
- style: z.item,
359
+ style: V.item,
356
360
  children: /* @__PURE__ */ c(b, {
357
361
  style: T,
358
362
  children: /* @__PURE__ */ l("div", {
359
- style: z.cardInner,
360
- children: [/* @__PURE__ */ c(O, {
363
+ style: V.cardInner,
364
+ children: [/* @__PURE__ */ c(j, {
361
365
  src: e.url,
362
366
  className: "",
363
367
  alt: t,
364
- style: z.image,
368
+ style: V.image,
365
369
  draggable: !1
366
370
  }), /* @__PURE__ */ c(x, {
367
371
  type: "button",
368
- style: z.removeButton,
372
+ style: V.removeButton,
369
373
  onClick: () => C(e),
370
374
  children: /* @__PURE__ */ c(S, {})
371
375
  })]
@@ -373,7 +377,7 @@ function B({ id: e, label: t, descriptionText: n, uploadHintText: r, items: i, o
373
377
  })
374
378
  }, e.url)), /* @__PURE__ */ c("label", {
375
379
  htmlFor: e,
376
- style: z.uploadLabel,
380
+ style: V.uploadLabel,
377
381
  children: /* @__PURE__ */ c(b, {
378
382
  style: E,
379
383
  onMouseEnter: (e) => {
@@ -383,12 +387,12 @@ function B({ id: e, label: t, descriptionText: n, uploadHintText: r, items: i, o
383
387
  e.currentTarget.style.backgroundColor = "#ffffff";
384
388
  },
385
389
  children: /* @__PURE__ */ l("div", {
386
- style: z.uploadCardInner,
390
+ style: V.uploadCardInner,
387
391
  children: [/* @__PURE__ */ c("div", {
388
- style: z.badge,
392
+ style: V.badge,
389
393
  children: p("libs:add_assets")
390
394
  }), /* @__PURE__ */ c("p", {
391
- style: z.hint,
395
+ style: V.hint,
392
396
  children: r
393
397
  })]
394
398
  })
@@ -396,7 +400,7 @@ function B({ id: e, label: t, descriptionText: n, uploadHintText: r, items: i, o
396
400
  })]
397
401
  }), /* @__PURE__ */ c(y, {
398
402
  orientation: "horizontal",
399
- style: z.scrollBar
403
+ style: V.scrollBar
400
404
  })]
401
405
  }), /* @__PURE__ */ c(_, {
402
406
  id: e,
@@ -406,23 +410,23 @@ function B({ id: e, label: t, descriptionText: n, uploadHintText: r, items: i, o
406
410
  onChange: (e) => {
407
411
  w(e.target.files), e.currentTarget.value = "";
408
412
  },
409
- style: z.hiddenInput
413
+ style: V.hiddenInput
410
414
  })]
411
415
  }), /* @__PURE__ */ c("div", {
412
- style: z.description,
416
+ style: V.description,
413
417
  children: /* @__PURE__ */ c(g, { children: n })
414
418
  })]
415
419
  })] });
416
420
  }
417
421
  //#endregion
418
422
  //#region src/utils/firestore.ts
419
- function V(e) {
423
+ function U(e) {
420
424
  return {
421
425
  ...e.data(),
422
426
  id: e.id
423
427
  };
424
428
  }
425
- async function H(e, t, n, r) {
429
+ async function W(e, t, n, r) {
426
430
  let i = r.filter((e) => !!(e && !n.has(e.path)));
427
431
  for (let r = 0; r < i.length; r += 30) {
428
432
  let a = i.slice(r, r + 30);
@@ -432,39 +436,39 @@ async function H(e, t, n, r) {
432
436
  });
433
437
  }
434
438
  }
435
- async function U(e, t, n) {
439
+ async function G(e, t, n) {
436
440
  let r = n.filter((e) => !!(e && !t.has(e.path)));
437
441
  await Promise.all(r.map(async (n) => {
438
442
  let r = e(await f(n));
439
443
  t.set(n.path, r);
440
444
  }));
441
445
  }
442
- function W(e = {}) {
446
+ function K(e = {}) {
443
447
  let { cache: t = !0, includeMetadataChanges: n } = e;
444
448
  return {
445
449
  listenOptions: { includeMetadataChanges: n ?? !t },
446
450
  cache: t
447
451
  };
448
452
  }
449
- function G(e, t) {
453
+ function q(e, t) {
450
454
  return t !== !1 || !e;
451
455
  }
452
- function K(e, t, n = {}) {
453
- let { listenOptions: r, cache: i } = W(n), { onError: a } = n;
456
+ function J(e, t, n = {}) {
457
+ let { listenOptions: r, cache: i } = K(n), { onError: a } = n;
454
458
  return e.type, m(e, r, (e) => {
455
- G(e.metadata.fromCache, i) && t(e);
459
+ q(e.metadata.fromCache, i) && t(e);
456
460
  }, a);
457
461
  }
458
462
  //#endregion
459
463
  //#region src/utils/platform.ts
460
- function q() {
464
+ function ae() {
461
465
  if (typeof window > "u") return "pc";
462
466
  let e = navigator.userAgent, t = navigator.platform, n = /Android/i.test(e), r = /iPhone|iPad|iPod/i.test(e) || t === "MacIntel" && navigator.maxTouchPoints > 1;
463
467
  return n ? "android" : r ? "ios" : "pc";
464
468
  }
465
469
  //#endregion
466
470
  //#region src/utils/zustand.tsx
467
- function J(n) {
471
+ function oe(n) {
468
472
  let r = e(null);
469
473
  function a({ children: e, ...t }) {
470
474
  let [a] = i(() => n(t));
@@ -487,7 +491,7 @@ function J(n) {
487
491
  }
488
492
  //#endregion
489
493
  //#region node_modules/dayjs/dayjs.min.js
490
- var Y = /* @__PURE__ */ E(((e, t) => {
494
+ var Y = /* @__PURE__ */ k(((e, t) => {
491
495
  (function(n, r) {
492
496
  typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs = r();
493
497
  })(e, (function() {
@@ -781,7 +785,7 @@ var Y = /* @__PURE__ */ E(((e, t) => {
781
785
  return w(1e3 * e);
782
786
  }, w.en = b[y], w.Ls = b, w.p = {}, w;
783
787
  }));
784
- })), ie = /* @__PURE__ */ E(((e, t) => {
788
+ })), se = /* @__PURE__ */ k(((e, t) => {
785
789
  (function(n, r) {
786
790
  typeof e == "object" && t !== void 0 ? t.exports = r(Y()) : typeof define == "function" && define.amd ? define(["dayjs"], r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_locale_ko = r(n.dayjs);
787
791
  })(e, (function(e) {
@@ -831,7 +835,7 @@ var Y = /* @__PURE__ */ E(((e, t) => {
831
835
  };
832
836
  return n.default.locale(r, null, !0), r;
833
837
  }));
834
- })), ae = /* @__PURE__ */ E(((e, t) => {
838
+ })), ce = /* @__PURE__ */ k(((e, t) => {
835
839
  (function(n, r) {
836
840
  typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_locale_en = r();
837
841
  })(e, (function() {
@@ -851,12 +855,12 @@ var Y = /* @__PURE__ */ E(((e, t) => {
851
855
  };
852
856
  }));
853
857
  })), X = /* @__PURE__ */ ee(Y(), 1);
854
- ie(), ae();
858
+ se(), ce();
855
859
  function Z(e, t, n) {
856
860
  let r = (0, X.default)(e);
857
861
  return !e || !r.isValid() ? "" : r.format(n(t));
858
862
  }
859
- function oe() {
863
+ function le() {
860
864
  let { t: e } = u();
861
865
  return r(() => ({
862
866
  basicDateTimeFormat: (t, n) => Z(t, n, e),
@@ -865,11 +869,11 @@ function oe() {
865
869
  timeFormat: (t) => Z(t, "libs:datetime.time_format", e)
866
870
  }), [e]);
867
871
  }
868
- function se(e) {
872
+ function ue(e) {
869
873
  let t = (0, X.default)(e);
870
874
  return t.isValid() ? t.format("YYYYMMDD") : "";
871
875
  }
872
- function ce(e) {
876
+ function de(e) {
873
877
  let t = (0, X.default)(e);
874
878
  return t.isValid() ? t.format("HH:mm") : "";
875
879
  }
@@ -879,17 +883,34 @@ var Q = (e) => {
879
883
  };
880
884
  y.isInitialized && Q(y.resolvedLanguage || y.language), y.on("languageChanged", Q);
881
885
  //#endregion
886
+ //#region src/utils/file.ts
887
+ function $(e) {
888
+ let t = e.lastIndexOf(".");
889
+ return t === -1 ? "" : e.substring(t + 1);
890
+ }
891
+ //#endregion
892
+ //#region src/utils/fb-storage.ts
893
+ async function fe(e, t, n) {
894
+ if (!n.file) return n.url;
895
+ try {
896
+ let r = $(n.file.name);
897
+ return await b((await S(x(e, r ? t + "." + r : t), n.file, { contentType: n.file.type })).ref);
898
+ } catch (e) {
899
+ throw console.error("Firebase image upload failed:", e), e;
900
+ }
901
+ }
902
+ //#endregion
882
903
  //#region src/constant/firestore.ts
883
- var le = () => ({
904
+ var pe = () => ({
884
905
  updateAt: g(),
885
906
  delete: !0
886
- }), $ = () => ({
907
+ }), me = () => ({
887
908
  updateAt: g(),
888
909
  delete: !1
889
910
  });
890
911
  //#endregion
891
912
  //#region src/constant/auth.ts
892
- function ue(e) {
913
+ function he(e) {
893
914
  switch (e) {
894
915
  case "auth/user-not-found": return "libs:auth.errors.user_not_found";
895
916
  case "auth/wrong-password": return "libs:auth.errors.wrong_password";
@@ -911,7 +932,7 @@ function ue(e) {
911
932
  default: return "libs:auth.errors.default";
912
933
  }
913
934
  }
914
- var de = {
935
+ var ge = {
915
936
  auth: { errors: {
916
937
  invalid_credential: "이메일 또는 비밀번호를 다시 확인해 주세요.",
917
938
  wrong_password: "이메일 또는 비밀번호를 다시 확인해 주세요.",
@@ -941,7 +962,7 @@ var de = {
941
962
  time_format: "A h:mm:ss"
942
963
  },
943
964
  add_assets: "애셋 추가"
944
- }, fe = {
965
+ }, _e = {
945
966
  auth: { errors: {
946
967
  invalid_credential: "Please check your email or password.",
947
968
  wrong_password: "Please check your email or password.",
@@ -974,12 +995,12 @@ var de = {
974
995
  };
975
996
  //#endregion
976
997
  //#region src/locales/i18n.ts
977
- function pe(e) {
978
- e.hasResourceBundle("ko", "libs") || e.addResourceBundle("ko", "libs", de, !0, !1), e.hasResourceBundle("en", "libs") || e.addResourceBundle("en", "libs", fe, !0, !1);
998
+ function ve(e) {
999
+ e.hasResourceBundle("ko", "libs") || e.addResourceBundle("ko", "libs", ge, !0, !1), e.hasResourceBundle("en", "libs") || e.addResourceBundle("en", "libs", _e, !0, !1);
979
1000
  }
980
1001
  //#endregion
981
1002
  //#region src/css/toast.ts
982
- var me = {
1003
+ var ye = {
983
1004
  Info: {
984
1005
  Soft: {
985
1006
  "--normal-bg": "color-mix(in oklab, light-dark(var(--color-sky-600), var(--color-sky-400)) 10%, var(--background))",
@@ -1050,4 +1071,4 @@ var me = {
1050
1071
  }
1051
1072
  };
1052
1073
  //#endregion
1053
- export { O as CrossfadeImage, R as ImageUploadField, I as ImageUploadItem, B as ImageUploadSortableField, re as SUPPORTED_LOCALES, me as ToastCSS, J as createZustandContext, se as dateIdFormat, le as deleteItem, H as fetchItems, U as fetchItemsByOne, ue as getAuthErrorKey, q as getPlatformType, K as getSnapshots, pe as initIenlabI18n, V as snapshotToData, ce as time24Format, $ as undeleteItem, oe as useDateTimeFormatters };
1074
+ export { j as CrossfadeImage, B as ImageUploadField, R as ImageUploadItem, H as ImageUploadSortableField, ie as SUPPORTED_LOCALES, ye as ToastCSS, oe as createZustandContext, ue as dateIdFormat, pe as deleteItem, W as fetchItems, G as fetchItemsByOne, he as getAuthErrorKey, $ as getFileExtension, ae as getPlatformType, J as getSnapshots, ve as initIenlabI18n, U as snapshotToData, de as time24Format, me as undeleteItem, fe as uploadImage, le as useDateTimeFormatters };
@@ -4,5 +4,6 @@ export declare class ImageUploadItem {
4
4
  constructor(partial?: Partial<ImageUploadItem>);
5
5
  isBlobUrl(): boolean;
6
6
  revokeIfNeeded(): void;
7
+ get isEmpty(): boolean;
7
8
  }
8
9
  //# sourceMappingURL=file.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/types/file.ts"],"names":[],"mappings":"AAAA,qBAAa,eAAe;IAC1B,GAAG,EAAE,MAAM,CAAK;IAChB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAO;gBAEZ,OAAO,GAAE,OAAO,CAAC,eAAe,CAAM;IAIlD,SAAS;IAIT,cAAc;CAKf"}
1
+ {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/types/file.ts"],"names":[],"mappings":"AAAA,qBAAa,eAAe;IAC1B,GAAG,EAAE,MAAM,CAAK;IAChB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAO;gBAEZ,OAAO,GAAE,OAAO,CAAC,eAAe,CAAM;IAIlD,SAAS;IAIT,cAAc;IAMd,IAAI,OAAO,YAEV;CACF"}
@@ -0,0 +1,10 @@
1
+ import { FirebaseStorage } from 'firebase/storage';
2
+ import { ImageUploadItem } from '../types';
3
+ /**
4
+ * @param storage Firebase Storage 객체
5
+ * @param path 확장자를 제외한 파일 경로 및 이름
6
+ * @param item 업로드할 이미지
7
+ * @return 업로드된 이미지의 URL
8
+ */
9
+ export declare function uploadImage(storage: FirebaseStorage, path: string, item: ImageUploadItem): Promise<string>;
10
+ //# sourceMappingURL=fb-storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fb-storage.d.ts","sourceRoot":"","sources":["../../src/utils/fb-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwD,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC9G,OAAO,EAAC,eAAe,EAAC,MAAM,UAAU,CAAC;AAGzC;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,mBAa9F"}
@@ -0,0 +1,2 @@
1
+ export declare function getFileExtension(fileName: string): string;
2
+ //# sourceMappingURL=file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/utils/file.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGzD"}
@@ -3,4 +3,6 @@ export * from './array';
3
3
  export * from './platform';
4
4
  export * from './zustand';
5
5
  export * from './datetime';
6
+ export * from './file';
7
+ export * from './fb-storage';
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ienlab/react-library",
3
- "version": "0.14.2-beta.3",
3
+ "version": "0.15.0",
4
4
  "description": "My React component library",
5
5
  "main": "./dist/my-library.cjs.js",
6
6
  "module": "./dist/my-library.es.js",