@byuckchon-frontend/utils 1.0.0 → 1.0.1

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.
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(s,m){typeof exports=="object"&&typeof module<"u"?m(exports):typeof define=="function"&&define.amd?define(["exports"],m):(s=typeof globalThis<"u"?globalThis:s||self,m(s.index={}))})(this,(function(s){"use strict";const m=()=>({formatPhoneNumber:n=>{const e=(n??"").replace(/\D/g,"");if(/^1[568]\d{7}$/.test(e))return e.replace(/^(\d{4})(\d{4})$/,"$1-$2");if(e.startsWith("02")){if(e.length===9)return e.replace(/^(\d{2})(\d{3})(\d{4})$/,"$1-$2-$3");if(e.length===10)return e.replace(/^(\d{2})(\d{4})(\d{4})$/,"$1-$2-$3")}if(/^0\d+/.test(e)){if(e.length===10)return e.replace(/^(\d{3})(\d{3})(\d{4})$/,"$1-$2-$3");if(e.length===11)return e.replace(/^(\d{3})(\d{4})(\d{4})$/,"$1-$2-$3")}return n},formatBizNumber:n=>{const e=(n??"").replace(/\D/g,"");return e.length===10?e.replace(/^(\d{3})(\d{2})(\d{5})$/,"$1-$2-$3"):e.length===13?e.replace(/^(\d{6})(\d{7})$/,"$1-$2"):String(n??"")},formatDate:n=>{if(!(n instanceof Date)||isNaN(n.getTime()))return"";const e=n.getHours(),r=n.getMinutes(),i=e<12?"오전":"오후",l=e%12===0?12:e%12;return`${i} ${l}시 ${r}분`},Masker:{maskName:n=>{const e=(n??"").trim(),r=[...e].length;if(r<=0)return"";if(r===1)return"*";if(r===2){const[f]=[...e];return`${f}*`}const i=[...e],l=i[0],a=i[r-1],o="*".repeat(r-2);return`${l}${o}${a}`},maskPhoneNumber:n=>{if(n.includes("-")){const a=n.split("-");if(a.length===3){const[o,f,g]=a;return`${o}-${"*".repeat(f.replace(/\D/g,"").length||4)}-${g}`}if(a.length===2){const[o,f]=a,g=f.replace(/\D/g,""),p=g.slice(-4),E=Math.max(1,g.length-p.length);return`${o}-${"*".repeat(E)}${p}`}return n}const e=n.replace(/\D/g,"");if(e.length<8)return n;const r=e.slice(0,3),i=e.slice(-4),l=Math.max(1,e.length-(r.length+i.length));return`${r}${"*".repeat(l)}${i}`}},commanizeData:n=>{const e=String(n??"").trim();if(!e)return"";const r=e.replace(/,/g,""),i=r.startsWith("-")?"-":"",l=r.replace(/^-/,""),[a,o]=l.split("."),f=a.replace(/\B(?=(\d{3})+(?!\d))/g,",");return i+f+(o!==void 0?`.${o}`:"")},decommanizeData:n=>n.replace(/,/g,"")}),x=/^[A-Za-z0-9]([A-Za-z0-9_.+-]*[A-Za-z0-9])?@[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?\.[A-Za-z]{2,}$/,z=/^010(\d{4})(\d{4})$/,b=/^(070|02|031|032|033|034|035|036|037|038|039|041|042|043|051|052|053|054|055|061|062|063|064|070|071|072)[0-9]{3,4}[0-9]{4}$/,D=/([0-9]{2}(0[1-9]|1[0-2])(0[1-9]|[1,2][0-9]|3[0,1]))/,A=/^(19[0-9][0-9]|20\d{2})(0[0-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])$/,v=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+~`\-={}[\]:;"'<>,.?/\\]).{10,}$/,R=/^d{2}([0]\d|[1][0-2])([0][1-9]|[1-2]\d|[3][0-1])[-]*[1-4]\d{6}$/,B=/^(?:[0-9]{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[1,2][0-9]|3[0,1]))-[1-8][0-9]{6}$/,N=/^https?:\/\/(?:[-\w.])+(?:\.[a-zA-Z]{2,})+(?::\d+)?(?:\/[^\s]*)?$/i,P=/\.(jpg|jpeg|png|gif|pdf|doc|docx|xls|xlsx|ppt|pptx|txt|zip|rar)$/i;function M(t){return x.test(t)}function Z(t){return z.test(t)}function j(t){return b.test(t)}function k(t){return D.test(t)}function y(t){return A.test(t)}function S(t){return v.test(t)}function w(t){return R.test(t)}function F(t){return B.test(t)}function T(t){const c=t.replace(/-/gi,"").split("").map(u=>parseInt(u,10));if(c.length===10){if(c.every(d=>d===0))return!1;const u=[1,3,7,1,3,7,1,3,5];let $=0;for(let d=0;d<9;d++)$+=u[d]*c[d];const h=(10-$%10)%10;return c[9]===h}return!1}function I(t){return N.test(t)}function W(t,c=10){const u=typeof t=="string"?t:t.name;return!(!P.test(u)||t instanceof File&&t.size/1048576>c)}const C={email:M,phone:Z,homePhone:j,birth6:k,birth8:y,password:S,juminAfter2020:F,juminBefore2020:w,corporateRegiNumber:T,url:I,file:W};s.FormatData=m,s.validate=C,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(k,H){typeof exports=="object"&&typeof module<"u"?H(exports):typeof define=="function"&&define.amd?define(["exports"],H):(k=typeof globalThis<"u"?globalThis:k||self,H(k.index={}))})(this,(function(k){"use strict";const H=(r,e={})=>{const{removeUndefined:t=!0,removeNull:n=!0,removeEmptyString:a=!0,removeEmptyArray:s=!0,removeEmptyObject:o=!0,normalizeNumbers:i=!1,normalizeBooleans:c=!1,normalizeNested:l=!1}=e,h=u=>{switch(!0){case(t&&u===void 0):return!0;case(n&&u===null):return!0;case(a&&u===""):return!0;case(s&&Array.isArray(u)&&u.length===0):return!0;case(o&&typeof u=="object"&&u!==null&&!Array.isArray(u)&&Object.keys(u).length===0):return!0;default:return!1}},m=u=>{if(typeof u=="object"&&u!==null){if(Array.isArray(u))return l?u.map(D=>m(D)).filter(D=>!h(D)):u;if(typeof u=="object")return l?H(u,e):u}if(typeof u=="string"){const D=u.trim();if(c){const T=D.toLowerCase();if(T==="true")return!0;if(T==="false")return!1}return D}return i&&typeof u=="number"?String(u):u};return Object.fromEntries(Object.entries(r).map(([u,D])=>[u,m(D)]).filter(([,u])=>!h(u)))};function _(){return typeof window>"u"||"Deno"in globalThis}function Ee(){return!_()}function S(){return _()?!1:/ipad|iphone/i.test(navigator.userAgent)}function ee(){return _()?!1:/Macintosh|MacIntel|MacPPC|Mac68K/.test(navigator.platform)}function te(){return _()?!1:/Android/i.test(navigator.userAgent)}function We(){return _()?!1:/MSIE|Trident/i.test(navigator.userAgent)}function ne(){return _()?!1:/KAKAOTALK/i.test(navigator.userAgent)}function z(){return _()?!1:S()?"ios":te()?"android":"web"}function $e(){const r=z();return r==="ios"||r==="android"}function Ne(){if(_())return"server";if(ne())return"kakao";const r=z();return r==="ios"||r==="android"?r:ee()?"macos":"web"}const Fe={isServer:_,isClient:Ee,isIOS:S,isAndroid:te,isMacOS:ee,isIE:We,isKakaoWebView:ne,isMobileWeb:$e,getOSByUserAgent:z,getPlatform:Ne},He=()=>({formatPhoneNumber:o=>{const i=(o??"").replace(/\D/g,"");if(/^1[568]\d{7}$/.test(i))return i.replace(/^(\d{4})(\d{4})$/,"$1-$2");if(i.startsWith("02")){if(i.length===9)return i.replace(/^(\d{2})(\d{3})(\d{4})$/,"$1-$2-$3");if(i.length===10)return i.replace(/^(\d{2})(\d{4})(\d{4})$/,"$1-$2-$3")}if(/^0\d+/.test(i)){if(i.length===10)return i.replace(/^(\d{3})(\d{3})(\d{4})$/,"$1-$2-$3");if(i.length===11)return i.replace(/^(\d{3})(\d{4})(\d{4})$/,"$1-$2-$3")}return o},formatBizNumber:o=>{const i=(o??"").replace(/\D/g,"");return i.length===10?i.replace(/^(\d{3})(\d{2})(\d{5})$/,"$1-$2-$3"):i.length===13?i.replace(/^(\d{6})(\d{7})$/,"$1-$2"):String(o??"")},formatDate:o=>{if(!(o instanceof Date)||isNaN(o.getTime()))return"";const i=o.getHours(),c=o.getMinutes(),l=i<12?"오전":"오후",h=i%12===0?12:i%12;return`${l} ${h}시 ${c}분`},Masker:{maskName:o=>{const i=(o??"").trim(),c=[...i].length;if(c<=0)return"";if(c===1)return"*";if(c===2){const[D]=[...i];return`${D}*`}const l=[...i],h=l[0],m=l[c-1],u="*".repeat(c-2);return`${h}${u}${m}`},maskPhoneNumber:o=>{if(o.includes("-")){const m=o.split("-");if(m.length===3){const[u,D,T]=m;return`${u}-${"*".repeat(D.replace(/\D/g,"").length||4)}-${T}`}if(m.length===2){const[u,D]=m,T=D.replace(/\D/g,""),F=T.slice(-4),f=Math.max(1,T.length-F.length);return`${u}-${"*".repeat(f)}${F}`}return o}const i=o.replace(/\D/g,"");if(i.length<8)return o;const c=i.slice(0,3),l=i.slice(-4),h=Math.max(1,i.length-(c.length+l.length));return`${c}${"*".repeat(h)}${l}`}},commanizeData:o=>{const i=String(o??"").trim();if(!i)return"";const c=i.replace(/,/g,""),l=c.startsWith("-")?"-":"",h=c.replace(/^-/,""),[m,u]=h.split("."),D=m.replace(/\B(?=(\d{3})+(?!\d))/g,",");return l+D+(u!==void 0?`.${u}`:"")},decommanizeData:o=>o.replace(/,/g,"")}),qe=/^[A-Za-z0-9]([A-Za-z0-9_.+-]*[A-Za-z0-9])?@[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?\.[A-Za-z]{2,}$/,Ie=/^010(\d{4})(\d{4})$/,Le=/^(070|02|031|032|033|034|035|036|037|038|039|041|042|043|051|052|053|054|055|061|062|063|064|070|071|072)[0-9]{3,4}[0-9]{4}$/,Ae=/([0-9]{2}(0[1-9]|1[0-2])(0[1-9]|[1,2][0-9]|3[0,1]))/,Ce=/^(19[0-9][0-9]|20\d{2})(0[0-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])$/,Re=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+~`\-={}[\]:;"'<>,.?/\\]).{10,}$/,Qe=/^d{2}([0]\d|[1][0-2])([0][1-9]|[1-2]\d|[3][0-1])[-]*[1-4]\d{6}$/,Be=/^(?:[0-9]{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[1,2][0-9]|3[0,1]))-[1-8][0-9]{6}$/,ze=/^https?:\/\/(?:[-\w.])+(?:\.[a-zA-Z]{2,})+(?::\d+)?(?:\/[^\s]*)?$/i,je=/\.(jpg|jpeg|png|gif|pdf|doc|docx|xls|xlsx|ppt|pptx|txt|zip|rar)$/i;function Xe(r){return qe.test(r)}function Ge(r){return Ie.test(r)}function Ve(r){return Le.test(r)}function Ze(r){return Ae.test(r)}function Ke(r){return Ce.test(r)}function Je(r){return Re.test(r)}function Ue(r){return Qe.test(r)}function Se(r){return Be.test(r)}function et(r){const e=r.replace(/-/gi,"").split("").map(t=>parseInt(t,10));if(e.length===10){if(e.every(s=>s===0))return!1;const t=[1,3,7,1,3,7,1,3,5];let n=0;for(let s=0;s<9;s++)n+=t[s]*e[s];const a=(10-n%10)%10;return e[9]===a}return!1}function tt(r){return ze.test(r)}function nt(r,e=10){const t=typeof r=="string"?r:r.name;return!(!je.test(t)||r instanceof File&&r.size/1048576>e)}const rt={email:Xe,phone:Ge,homePhone:Ve,birth6:Ze,birth8:Ke,password:Je,juminAfter2020:Se,juminBefore2020:Ue,corporateRegiNumber:et,url:tt,file:nt},re=6048e5,at=864e5,ae=6e4,se=36e5,st=1e3,oe=Symbol.for("constructDateFrom");function P(r,e){return typeof r=="function"?r(e):r&&typeof r=="object"&&oe in r?r[oe](e):r instanceof Date?new r.constructor(e):new Date(e)}function w(r,e){return P(e||r,r)}function ie(r,e,t){const n=w(r,t?.in);return isNaN(e)?P(t?.in||r,NaN):(e&&n.setDate(n.getDate()+e),n)}let ot={};function q(){return ot}function E(r,e){const t=q(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,a=w(r,e?.in),s=a.getDay(),o=(s<n?7:0)+s-n;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function I(r,e){return E(r,{...e,weekStartsOn:1})}function ce(r,e){const t=w(r,e?.in),n=t.getFullYear(),a=P(t,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const s=I(a),o=P(t,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const i=I(o);return t.getTime()>=s.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Q(r){const e=w(r),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+r-+t}function $(r,...e){const t=P.bind(null,r||e.find(n=>typeof n=="object"));return e.map(t)}function ue(r,e){const t=w(r,e?.in);return t.setHours(0,0,0,0),t}function de(r,e,t){const[n,a]=$(t?.in,r,e),s=ue(n),o=ue(a),i=+s-Q(s),c=+o-Q(o);return Math.round((i-c)/at)}function it(r,e){const t=ce(r,e),n=P(r,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),I(n)}function A(r,e){const t=+w(r)-+w(e);return t<0?-1:t>0?1:t}function ct(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function ut(r){return!(!ct(r)&&typeof r!="number"||isNaN(+w(r)))}function dt(r,e,t){const[n,a]=$(t?.in,r,e),s=n.getFullYear()-a.getFullYear(),o=n.getMonth()-a.getMonth();return s*12+o}function lt(r,e,t){const[n,a]=$(t?.in,r,e);return n.getFullYear()-a.getFullYear()}function le(r,e,t){const[n,a]=$(t?.in,r,e),s=fe(n,a),o=Math.abs(de(n,a));n.setDate(n.getDate()-s*o);const i=+(fe(n,a)===-s),c=s*(o-i);return c===0?0:c}function fe(r,e){const t=r.getFullYear()-e.getFullYear()||r.getMonth()-e.getMonth()||r.getDate()-e.getDate()||r.getHours()-e.getHours()||r.getMinutes()-e.getMinutes()||r.getSeconds()-e.getSeconds()||r.getMilliseconds()-e.getMilliseconds();return t<0?-1:t>0?1:t}function j(r){return e=>{const n=(r?Math[r]:Math.trunc)(e);return n===0?0:n}}function ft(r,e,t){const[n,a]=$(t?.in,r,e),s=(+n-+a)/se;return j(t?.roundingMethod)(s)}function ht(r,e){return+w(r)-+w(e)}function mt(r,e,t){const n=ht(r,e)/ae;return j(t?.roundingMethod)(n)}function wt(r,e){const t=w(r,e?.in);return t.setHours(23,59,59,999),t}function gt(r,e){const t=w(r,e?.in),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function yt(r,e){const t=w(r,e?.in);return+wt(t,e)==+gt(t,e)}function bt(r,e,t){const[n,a,s]=$(t?.in,r,r,e),o=A(a,s),i=Math.abs(dt(a,s));if(i<1)return 0;a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-o*i);let c=A(a,s)===-o;yt(n)&&i===1&&A(n,s)===1&&(c=!1);const l=o*(i-+c);return l===0?0:l}function pt(r,e,t){const n=le(r,e,t)/7;return j(t?.roundingMethod)(n)}function xt(r,e,t){const[n,a]=$(t?.in,r,e),s=A(n,a),o=Math.abs(lt(n,a));n.setFullYear(1584),a.setFullYear(1584);const i=A(n,a)===-s,c=s*(o-+i);return c===0?0:c}function Mt(r,e){const t=w(r,e?.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const Dt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Pt=(r,e,t)=>{let n;const a=Dt[r];return typeof a=="string"?n=a:e===1?n=a.one:n=a.other.replace("{{count}}",e.toString()),t?.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n};function X(r){return(e={})=>{const t=e.width?String(e.width):r.defaultWidth;return r.formats[t]||r.formats[r.defaultWidth]}}const Tt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},kt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ot={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Yt={date:X({formats:Tt,defaultWidth:"full"}),time:X({formats:kt,defaultWidth:"full"}),dateTime:X({formats:Ot,defaultWidth:"full"})},vt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},_t=(r,e,t,n)=>vt[r];function C(r){return(e,t)=>{const n=t?.context?String(t.context):"standalone";let a;if(n==="formatting"&&r.formattingValues){const o=r.defaultFormattingWidth||r.defaultWidth,i=t?.width?String(t.width):o;a=r.formattingValues[i]||r.formattingValues[o]}else{const o=r.defaultWidth,i=t?.width?String(t.width):r.defaultWidth;a=r.values[i]||r.values[o]}const s=r.argumentCallback?r.argumentCallback(e):e;return a[s]}}const Et={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Wt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},$t={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Nt={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ft={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Ht={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},qt={ordinalNumber:(r,e)=>{const t=Number(r),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},era:C({values:Et,defaultWidth:"wide"}),quarter:C({values:Wt,defaultWidth:"wide",argumentCallback:r=>r-1}),month:C({values:$t,defaultWidth:"wide"}),day:C({values:Nt,defaultWidth:"wide"}),dayPeriod:C({values:Ft,defaultWidth:"wide",formattingValues:Ht,defaultFormattingWidth:"wide"})};function R(r){return(e,t={})=>{const n=t.width,a=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth],s=e.match(a);if(!s)return null;const o=s[0],i=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],c=Array.isArray(i)?Lt(i,m=>m.test(o)):It(i,m=>m.test(o));let l;l=r.valueCallback?r.valueCallback(c):c,l=t.valueCallback?t.valueCallback(l):l;const h=e.slice(o.length);return{value:l,rest:h}}}function It(r,e){for(const t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&e(r[t]))return t}function Lt(r,e){for(let t=0;t<r.length;t++)if(e(r[t]))return t}function At(r){return(e,t={})=>{const n=e.match(r.matchPattern);if(!n)return null;const a=n[0],s=e.match(r.parsePattern);if(!s)return null;let o=r.valueCallback?r.valueCallback(s[0]):s[0];o=t.valueCallback?t.valueCallback(o):o;const i=e.slice(a.length);return{value:o,rest:i}}}const Ct=/^(\d+)(th|st|nd|rd)?/i,Rt=/\d+/i,Qt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Bt={any:[/^b/i,/^(a|c)/i]},zt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},jt={any:[/1/i,/2/i,/3/i,/4/i]},Xt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Gt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Vt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Zt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Kt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Jt={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ut={ordinalNumber:At({matchPattern:Ct,parsePattern:Rt,valueCallback:r=>parseInt(r,10)}),era:R({matchPatterns:Qt,defaultMatchWidth:"wide",parsePatterns:Bt,defaultParseWidth:"any"}),quarter:R({matchPatterns:zt,defaultMatchWidth:"wide",parsePatterns:jt,defaultParseWidth:"any",valueCallback:r=>r+1}),month:R({matchPatterns:Xt,defaultMatchWidth:"wide",parsePatterns:Gt,defaultParseWidth:"any"}),day:R({matchPatterns:Vt,defaultMatchWidth:"wide",parsePatterns:Zt,defaultParseWidth:"any"}),dayPeriod:R({matchPatterns:Kt,defaultMatchWidth:"any",parsePatterns:Jt,defaultParseWidth:"any"})},he={code:"en-US",formatDistance:Pt,formatLong:Yt,formatRelative:_t,localize:qt,match:Ut,options:{weekStartsOn:0,firstWeekContainsDate:1}};function St(r,e){const t=w(r,e?.in);return de(t,Mt(t))+1}function me(r,e){const t=w(r,e?.in),n=+I(t)-+it(t);return Math.round(n/re)+1}function G(r,e){const t=w(r,e?.in),n=t.getFullYear(),a=q(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,o=P(e?.in||r,0);o.setFullYear(n+1,0,s),o.setHours(0,0,0,0);const i=E(o,e),c=P(e?.in||r,0);c.setFullYear(n,0,s),c.setHours(0,0,0,0);const l=E(c,e);return+t>=+i?n+1:+t>=+l?n:n-1}function en(r,e){const t=q(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??t.firstWeekContainsDate??t.locale?.options?.firstWeekContainsDate??1,a=G(r,e),s=P(e?.in||r,0);return s.setFullYear(a,0,n),s.setHours(0,0,0,0),E(s,e)}function we(r,e){const t=w(r,e?.in),n=+E(t,e)-+en(t,e);return Math.round(n/re)+1}function d(r,e){const t=r<0?"-":"",n=Math.abs(r).toString().padStart(e,"0");return t+n}const W={y(r,e){const t=r.getFullYear(),n=t>0?t:1-t;return d(e==="yy"?n%100:n,e.length)},M(r,e){const t=r.getMonth();return e==="M"?String(t+1):d(t+1,2)},d(r,e){return d(r.getDate(),e.length)},a(r,e){const t=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(r,e){return d(r.getHours()%12||12,e.length)},H(r,e){return d(r.getHours(),e.length)},m(r,e){return d(r.getMinutes(),e.length)},s(r,e){return d(r.getSeconds(),e.length)},S(r,e){const t=e.length,n=r.getMilliseconds(),a=Math.trunc(n*Math.pow(10,t-3));return d(a,e.length)}},L={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ge={G:function(r,e,t){const n=r.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(r,e,t){if(e==="yo"){const n=r.getFullYear(),a=n>0?n:1-n;return t.ordinalNumber(a,{unit:"year"})}return W.y(r,e)},Y:function(r,e,t,n){const a=G(r,n),s=a>0?a:1-a;if(e==="YY"){const o=s%100;return d(o,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):d(s,e.length)},R:function(r,e){const t=ce(r);return d(t,e.length)},u:function(r,e){const t=r.getFullYear();return d(t,e.length)},Q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return d(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return d(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,e,t){const n=r.getMonth();switch(e){case"M":case"MM":return W.M(r,e);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(r,e,t){const n=r.getMonth();switch(e){case"L":return String(n+1);case"LL":return d(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(r,e,t,n){const a=we(r,n);return e==="wo"?t.ordinalNumber(a,{unit:"week"}):d(a,e.length)},I:function(r,e,t){const n=me(r);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):d(n,e.length)},d:function(r,e,t){return e==="do"?t.ordinalNumber(r.getDate(),{unit:"date"}):W.d(r,e)},D:function(r,e,t){const n=St(r);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):d(n,e.length)},E:function(r,e,t){const n=r.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(r,e,t,n){const a=r.getDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return d(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(a,{width:"short",context:"formatting"});case"eeee":default:return t.day(a,{width:"wide",context:"formatting"})}},c:function(r,e,t,n){const a=r.getDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return d(s,e.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(a,{width:"narrow",context:"standalone"});case"cccccc":return t.day(a,{width:"short",context:"standalone"});case"cccc":default:return t.day(a,{width:"wide",context:"standalone"})}},i:function(r,e,t){const n=r.getDay(),a=n===0?7:n;switch(e){case"i":return String(a);case"ii":return d(a,e.length);case"io":return t.ordinalNumber(a,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(r,e,t){const a=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(r,e,t){const n=r.getHours();let a;switch(n===12?a=L.noon:n===0?a=L.midnight:a=n/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(r,e,t){const n=r.getHours();let a;switch(n>=17?a=L.evening:n>=12?a=L.afternoon:n>=4?a=L.morning:a=L.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(r,e,t){if(e==="ho"){let n=r.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return W.h(r,e)},H:function(r,e,t){return e==="Ho"?t.ordinalNumber(r.getHours(),{unit:"hour"}):W.H(r,e)},K:function(r,e,t){const n=r.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):d(n,e.length)},k:function(r,e,t){let n=r.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):d(n,e.length)},m:function(r,e,t){return e==="mo"?t.ordinalNumber(r.getMinutes(),{unit:"minute"}):W.m(r,e)},s:function(r,e,t){return e==="so"?t.ordinalNumber(r.getSeconds(),{unit:"second"}):W.s(r,e)},S:function(r,e){return W.S(r,e)},X:function(r,e,t){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return be(n);case"XXXX":case"XX":return N(n);case"XXXXX":case"XXX":default:return N(n,":")}},x:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"x":return be(n);case"xxxx":case"xx":return N(n);case"xxxxx":case"xxx":default:return N(n,":")}},O:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+ye(n,":");case"OOOO":default:return"GMT"+N(n,":")}},z:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+ye(n,":");case"zzzz":default:return"GMT"+N(n,":")}},t:function(r,e,t){const n=Math.trunc(+r/1e3);return d(n,e.length)},T:function(r,e,t){return d(+r,e.length)}};function ye(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),a=Math.trunc(n/60),s=n%60;return s===0?t+String(a):t+String(a)+e+d(s,2)}function be(r,e){return r%60===0?(r>0?"-":"+")+d(Math.abs(r)/60,2):N(r,e)}function N(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),a=d(Math.trunc(n/60),2),s=d(n%60,2);return t+a+e+s}const pe=(r,e)=>{switch(r){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},xe=(r,e)=>{switch(r){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},V={p:xe,P:(r,e)=>{const t=r.match(/(P+)(p+)?/)||[],n=t[1],a=t[2];if(!a)return pe(r,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",pe(n,e)).replace("{{time}}",xe(a,e))}},tn=/^D+$/,nn=/^Y+$/,rn=["D","DD","YY","YYYY"];function Me(r){return tn.test(r)}function De(r){return nn.test(r)}function Z(r,e,t){const n=an(r,e,t);if(console.warn(n),rn.includes(r))throw new RangeError(n)}function an(r,e,t){const n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const sn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,on=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,cn=/^'([^]*?)'?$/,un=/''/g,dn=/[a-zA-Z]/;function ln(r,e,t){const n=q(),a=n.locale??he,s=n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=w(r,t?.in);if(!ut(i))throw new RangeError("Invalid time value");let c=e.match(on).map(h=>{const m=h[0];if(m==="p"||m==="P"){const u=V[m];return u(h,a.formatLong)}return h}).join("").match(sn).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const m=h[0];if(m==="'")return{isToken:!1,value:fn(h)};if(ge[m])return{isToken:!0,value:h};if(m.match(dn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:h}});a.localize.preprocessor&&(c=a.localize.preprocessor(i,c));const l={firstWeekContainsDate:s,weekStartsOn:o,locale:a};return c.map(h=>{if(!h.isToken)return h.value;const m=h.value;(De(m)||Me(m))&&Z(m,e,String(r));const u=ge[m[0]];return u(i,m,a.localize,l)}).join("")}function fn(r){const e=r.match(cn);return e?e[1].replace(un,"'"):r}function hn(r,e){const t=w(r,e?.in);if(isNaN(+t))throw new RangeError("Invalid time value");let n="",a="";const s="-",o=":";{const i=d(t.getDate(),2),c=d(t.getMonth()+1,2);n=`${d(t.getFullYear(),4)}${s}${c}${s}${i}`}{const i=t.getTimezoneOffset();if(i!==0){const D=Math.abs(i),T=d(Math.trunc(D/60),2),F=d(D%60,2);a=`${i<0?"+":"-"}${T}:${F}`}else a="Z";const c=d(t.getHours(),2),l=d(t.getMinutes(),2),h=d(t.getSeconds(),2),m=n===""?"":"T",u=[c,l,h].join(o);n=`${n}${m}${u}${a}`}return n}function mn(){return Object.assign({},q())}function wn(r,e){const t=w(r,e?.in).getDay();return t===0?7:t}function gn(r,e){return+w(r)>+w(e)}function yn(r,e){return+w(r)<+w(e)}function bn(r,e){const t=pn(e)?new e(0):P(e,0);return t.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),t.setHours(r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()),t}function pn(r){return typeof r=="function"&&r.prototype?.constructor===r}const xn=10;class Pe{subPriority=0;validate(e,t){return!0}}class Mn extends Pe{constructor(e,t,n,a,s){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=a,s&&(this.subPriority=s)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}}class Dn extends Pe{priority=xn;subPriority=-1;constructor(e,t){super(),this.context=e||(n=>P(t,n))}set(e,t){return t.timestampIsSet?e:P(e,bn(e,this.context))}}class g{run(e,t,n,a){const s=this.parse(e,t,n,a);return s?{setter:new Mn(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(e,t,n){return!0}}class Pn extends g{priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});case"GGGG":default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]}const x={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},O={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function M(r,e){return r&&{value:e(r.value),rest:r.rest}}function y(r,e){const t=e.match(r);return t?{value:parseInt(t[0],10),rest:e.slice(t[0].length)}:null}function Y(r,e){const t=e.match(r);if(!t)return null;if(t[0]==="Z")return{value:0,rest:e.slice(1)};const n=t[1]==="+"?1:-1,a=t[2]?parseInt(t[2],10):0,s=t[3]?parseInt(t[3],10):0,o=t[5]?parseInt(t[5],10):0;return{value:n*(a*se+s*ae+o*st),rest:e.slice(t[0].length)}}function Te(r){return y(x.anyDigitsSigned,r)}function b(r,e){switch(r){case 1:return y(x.singleDigit,e);case 2:return y(x.twoDigits,e);case 3:return y(x.threeDigits,e);case 4:return y(x.fourDigits,e);default:return y(new RegExp("^\\d{1,"+r+"}"),e)}}function B(r,e){switch(r){case 1:return y(x.singleDigitSigned,e);case 2:return y(x.twoDigitsSigned,e);case 3:return y(x.threeDigitsSigned,e);case 4:return y(x.fourDigitsSigned,e);default:return y(new RegExp("^-?\\d{1,"+r+"}"),e)}}function K(r){switch(r){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function ke(r,e){const t=e>0,n=t?e:1-e;let a;if(n<=50)a=r||100;else{const s=n+50,o=Math.trunc(s/100)*100,i=r>=s%100;a=r+o-(i?100:0)}return t?a:1-a}function Oe(r){return r%400===0||r%4===0&&r%100!==0}class Tn extends g{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){const a=s=>({year:s,isTwoDigitYear:t==="yy"});switch(t){case"y":return M(b(4,e),a);case"yo":return M(n.ordinalNumber(e,{unit:"year"}),a);default:return M(b(t.length,e),a)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){const a=e.getFullYear();if(n.isTwoDigitYear){const o=ke(n.year,a);return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}const s=!("era"in t)||t.era===1?n.year:1-n.year;return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}}class kn extends g{priority=130;parse(e,t,n){const a=s=>({year:s,isTwoDigitYear:t==="YY"});switch(t){case"Y":return M(b(4,e),a);case"Yo":return M(n.ordinalNumber(e,{unit:"year"}),a);default:return M(b(t.length,e),a)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,a){const s=G(e,a);if(n.isTwoDigitYear){const i=ke(n.year,s);return e.setFullYear(i,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),E(e,a)}const o=!("era"in t)||t.era===1?n.year:1-n.year;return e.setFullYear(o,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),E(e,a)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class On extends g{priority=130;parse(e,t){return B(t==="R"?4:t.length,e)}set(e,t,n){const a=P(e,0);return a.setFullYear(n,0,4),a.setHours(0,0,0,0),I(a)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Yn extends g{priority=130;parse(e,t){return B(t==="u"?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class vn extends g{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return b(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class _n extends g{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return b(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class En extends g{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){const a=s=>s-1;switch(t){case"M":return M(y(x.month,e),a);case"MM":return M(b(2,e),a);case"Mo":return M(n.ordinalNumber(e,{unit:"month"}),a);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}}class Wn extends g{priority=110;parse(e,t,n){const a=s=>s-1;switch(t){case"L":return M(y(x.month,e),a);case"LL":return M(b(2,e),a);case"Lo":return M(n.ordinalNumber(e,{unit:"month"}),a);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function $n(r,e,t){const n=w(r,t?.in),a=we(n,t)-e;return n.setDate(n.getDate()-a*7),w(n,t?.in)}class Nn extends g{priority=100;parse(e,t,n){switch(t){case"w":return y(x.week,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return b(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,a){return E($n(e,n,a),a)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Fn(r,e,t){const n=w(r,t?.in),a=me(n,t)-e;return n.setDate(n.getDate()-a*7),n}class Hn extends g{priority=100;parse(e,t,n){switch(t){case"I":return y(x.week,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return b(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return I(Fn(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const qn=[31,28,31,30,31,30,31,31,30,31,30,31],In=[31,29,31,30,31,30,31,31,30,31,30,31];class Ln extends g{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return y(x.date,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return b(t.length,e)}}validate(e,t){const n=e.getFullYear(),a=Oe(n),s=e.getMonth();return a?t>=1&&t<=In[s]:t>=1&&t<=qn[s]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class An extends g{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return y(x.dayOfYear,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return b(t.length,e)}}validate(e,t){const n=e.getFullYear();return Oe(n)?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function J(r,e,t){const n=q(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=w(r,t?.in),o=s.getDay(),c=(e%7+7)%7,l=7-a,h=e<0||e>6?e-(o+l)%7:(c+l)%7-(o+l)%7;return ie(s,h,t)}class Cn extends g{priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,a){return e=J(e,n,a),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class Rn extends g{priority=90;parse(e,t,n,a){const s=o=>{const i=Math.floor((o-1)/7)*7;return(o+a.weekStartsOn+6)%7+i};switch(t){case"e":case"ee":return M(b(t.length,e),s);case"eo":return M(n.ordinalNumber(e,{unit:"day"}),s);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,a){return e=J(e,n,a),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class Qn extends g{priority=90;parse(e,t,n,a){const s=o=>{const i=Math.floor((o-1)/7)*7;return(o+a.weekStartsOn+6)%7+i};switch(t){case"c":case"cc":return M(b(t.length,e),s);case"co":return M(n.ordinalNumber(e,{unit:"day"}),s);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,a){return e=J(e,n,a),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function Bn(r,e,t){const n=w(r,t?.in),a=wn(n,t),s=e-a;return ie(n,s,t)}class zn extends g{priority=90;parse(e,t,n){const a=s=>s===0?7:s;switch(t){case"i":case"ii":return b(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return M(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),a);case"iiiii":return M(n.day(e,{width:"narrow",context:"formatting"}),a);case"iiiiii":return M(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),a);case"iiii":default:return M(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),a)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return e=Bn(e,n),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class jn extends g{priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(K(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class Xn extends g{priority=80;parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(K(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class Gn extends g{priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(K(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class Vn extends g{priority=70;parse(e,t,n){switch(t){case"h":return y(x.hour12h,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return b(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const a=e.getHours()>=12;return a&&n<12?e.setHours(n+12,0,0,0):!a&&n===12?e.setHours(0,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]}class Zn extends g{priority=70;parse(e,t,n){switch(t){case"H":return y(x.hour23h,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return b(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]}class Kn extends g{priority=70;parse(e,t,n){switch(t){case"K":return y(x.hour11h,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return b(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]}class Jn extends g{priority=70;parse(e,t,n){switch(t){case"k":return y(x.hour24h,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return b(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){const a=n<=24?n%24:n;return e.setHours(a,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]}class Un extends g{priority=60;parse(e,t,n){switch(t){case"m":return y(x.minute,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return b(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]}class Sn extends g{priority=50;parse(e,t,n){switch(t){case"s":return y(x.second,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return b(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]}class er extends g{priority=30;parse(e,t){const n=a=>Math.trunc(a*Math.pow(10,-t.length+3));return M(b(t.length,e),n)}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]}class tr extends g{priority=10;parse(e,t){switch(t){case"X":return Y(O.basicOptionalMinutes,e);case"XX":return Y(O.basic,e);case"XXXX":return Y(O.basicOptionalSeconds,e);case"XXXXX":return Y(O.extendedOptionalSeconds,e);case"XXX":default:return Y(O.extended,e)}}set(e,t,n){return t.timestampIsSet?e:P(e,e.getTime()-Q(e)-n)}incompatibleTokens=["t","T","x"]}class nr extends g{priority=10;parse(e,t){switch(t){case"x":return Y(O.basicOptionalMinutes,e);case"xx":return Y(O.basic,e);case"xxxx":return Y(O.basicOptionalSeconds,e);case"xxxxx":return Y(O.extendedOptionalSeconds,e);case"xxx":default:return Y(O.extended,e)}}set(e,t,n){return t.timestampIsSet?e:P(e,e.getTime()-Q(e)-n)}incompatibleTokens=["t","T","X"]}class rr extends g{priority=40;parse(e){return Te(e)}set(e,t,n){return[P(e,n*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class ar extends g{priority=20;parse(e){return Te(e)}set(e,t,n){return[P(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}const sr={G:new Pn,y:new Tn,Y:new kn,R:new On,u:new Yn,Q:new vn,q:new _n,M:new En,L:new Wn,w:new Nn,I:new Hn,d:new Ln,D:new An,E:new Cn,e:new Rn,c:new Qn,i:new zn,a:new jn,b:new Xn,B:new Gn,h:new Vn,H:new Zn,K:new Kn,k:new Jn,m:new Un,s:new Sn,S:new er,X:new tr,x:new nr,t:new rr,T:new ar},or=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ir=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,cr=/^'([^]*?)'?$/,ur=/''/g,dr=/\S/,lr=/[a-zA-Z]/;function fr(r,e,t,n){const a=()=>P(t,NaN),s=mn(),o=s.locale??he,i=s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,c=s.weekStartsOn??s.locale?.options?.weekStartsOn??0;if(!e)return r?a():w(t,n?.in);const l={firstWeekContainsDate:i,weekStartsOn:c,locale:o},h=[new Dn(n?.in,t)],m=e.match(ir).map(f=>{const p=f[0];if(p in V){const v=V[p];return v(f,o.formatLong)}return f}).join("").match(or),u=[];for(let f of m){De(f)&&Z(f,e,r),Me(f)&&Z(f,e,r);const p=f[0],v=sr[p];if(v){const{incompatibleTokens:Ye}=v;if(Array.isArray(Ye)){const ve=u.find(_e=>Ye.includes(_e.token)||_e.token===p);if(ve)throw new RangeError(`The format string mustn't contain \`${ve.fullToken}\` and \`${f}\` at the same time`)}else if(v.incompatibleTokens==="*"&&u.length>0)throw new RangeError(`The format string mustn't contain \`${f}\` and any other token at the same time`);u.push({token:p,fullToken:f});const U=v.run(r,f,o.match,l);if(!U)return a();h.push(U.setter),r=U.rest}else{if(p.match(lr))throw new RangeError("Format string contains an unescaped latin alphabet character `"+p+"`");if(f==="''"?f="'":p==="'"&&(f=hr(f)),r.indexOf(f)===0)r=r.slice(f.length);else return a()}}if(r.length>0&&dr.test(r))return a();const D=h.map(f=>f.priority).sort((f,p)=>p-f).filter((f,p,v)=>v.indexOf(f)===p).map(f=>h.filter(p=>p.priority===f).sort((p,v)=>v.subPriority-p.subPriority)).map(f=>f[0]);let T=w(t,n?.in);if(isNaN(+T))return a();const F={};for(const f of D){if(!f.validate(T,l))return a();const p=f.set(T,F,l);Array.isArray(p)?(T=p[0],Object.assign(F,p[1])):T=p}return T}function hr(r){return r.match(cr)[1].replace(ur,"'")}const mr=Object.freeze(Object.defineProperty({__proto__:null,afterDate:(r,e)=>gn(r,e)?r:e,beforeDate:(r,e)=>yn(r,e)?r:e,formatDate:(r,e="yyyy-MM-dd")=>ln(r,e),parseDate:(r,e)=>fr(r,e??"yyyy-MM-dd",new Date),relativeTime:(r,e)=>{const t=new Date,n=t>=r,s={...{direction:n?"전":"후",seconds:n?"방금":"잠시",minutes:"분",hours:"시간",days:"일",weeks:"주",months:"개월",years:"년"},...e},o=[{diffFunc:mt,limit:60,label:s.minutes},{diffFunc:ft,limit:24,label:s.hours},{diffFunc:le,limit:7,label:s.days},{diffFunc:pt,limit:5,label:s.weeks},{diffFunc:bt,limit:12,label:s.months},{diffFunc:xt,limit:1/0,label:s.years}];for(const i of o){const c=Math.abs(i.diffFunc(t,r));if(c>=1&&c<i.limit)return`${c}${i.label} ${s.direction}`}return n?`${s.seconds} ${s.direction}`:`${s.seconds} ${s.direction}`},toISO:r=>hn(r),utcToKst:r=>new Date(r.getTime()+324e5)},Symbol.toStringTag,{value:"Module"}));k.FormatData=He,k.dateUtils=mr,k.filterParams=H,k.userAgent=Fe,k.validate=rt,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})}));
@@ -0,0 +1,14 @@
1
+ /** utc -> kst 시간 변환 함수 */
2
+ export declare const utcToKst: (utcDate: Date) => Date;
3
+ /** 날짜 형식 변환 함수 ( ex: yyyy-MM-dd ) */
4
+ export declare const formatDate: (date: Date, pattern?: string) => string;
5
+ /** 날짜 ISO 형식 변환 함수 */
6
+ export declare const toISO: (date: Date) => string;
7
+ /** 날짜 파싱 함수 */
8
+ export declare const parseDate: (date: string, pattern?: string) => Date;
9
+ /** 이전 날짜 반환 함수 */
10
+ export declare const beforeDate: (firstDate: Date, secondDate: Date) => Date;
11
+ /** 이후 날짜 반환 함수 */
12
+ export declare const afterDate: (firstDate: Date, secondDate: Date) => Date;
13
+ /** 현재 시간을 기준으로 상대 시간 반환 함수 */
14
+ export declare const relativeTime: (date: Date, labels?: Partial<Record<"direction" | "seconds" | "minutes" | "hours" | "days" | "weeks" | "months" | "years", string>>) => string;
@@ -0,0 +1,55 @@
1
+ export type FilterOptions = {
2
+ removeUndefined?: boolean;
3
+ removeNull?: boolean;
4
+ removeEmptyString?: boolean;
5
+ removeEmptyArray?: boolean;
6
+ removeEmptyObject?: boolean;
7
+ normalizeNumbers?: boolean;
8
+ normalizeBooleans?: boolean;
9
+ normalizeNested?: boolean;
10
+ };
11
+ /**
12
+ * 서버로 전달하는 params를 정제하는 함수
13
+ *
14
+ * undefined, null, 빈 문자열, 빈 배열, 빈 객체 등을 제거하고,
15
+ * 값의 타입을 정규화합니다.
16
+ * 문자열 값은 trim() 처리되며, trim 후 빈 문자열이 되면 제거됩니다.
17
+ * 숫자 0과 false는 유효한 값으로 간주하여 유지합니다.
18
+ *
19
+ * @param params - 정제할 파라미터 객체
20
+ * @param options - 필터링 및 정제 옵션 설정
21
+ * @param options.removeUndefined - undefined 값을 제거할지 여부 (기본값: true)
22
+ * @param options.removeNull - null 값을 제거할지 여부 (기본값: true)
23
+ * @param options.removeEmptyString - 빈 문자열을 제거할지 여부 (기본값: true)
24
+ * @param options.removeEmptyArray - 빈 배열을 제거할지 여부 (기본값: true)
25
+ * @param options.removeEmptyObject - 빈 객체를 제거할지 여부 (기본값: true)
26
+ * @param options.normalizeNumbers - 숫자를 문자열로 변환할지 여부 (기본값: false)
27
+ * @param options.normalizeBooleans - 불리언 문자열을 불리언으로 변환할지 여부 (기본값: false)
28
+ * @param options.normalizeNested - 중첩된 객체/배열도 정제할지 여부 (기본값: false)
29
+ * @returns 정제된 파라미터 객체
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * // 기본 사용 (제거만)
34
+ * const params = {
35
+ * name: "John",
36
+ * email: " ",
37
+ * age: 30,
38
+ * tags: [],
39
+ * active: false
40
+ * };
41
+ * const filtered = filterParams(params);
42
+ * // 결과: { name: "John", age: 30, active: false }
43
+ *
44
+ * // 숫자를 문자열로 변환
45
+ * const params2 = { id: 123, name: "John" };
46
+ * const filtered2 = filterParams(params2, { normalizeNumbers: true });
47
+ * // 결과: { id: "123", name: "John" }
48
+ *
49
+ * // 불리언 문자열을 불리언으로 변환
50
+ * const params3 = { active: "true", enabled: "false" };
51
+ * const filtered3 = filterParams(params3, { normalizeBooleans: true });
52
+ * // 결과: { active: true, enabled: false }
53
+ * ```
54
+ */
55
+ export declare const filterParams: (params: Record<string, unknown>, options?: FilterOptions) => Record<string, unknown>;
@@ -1,2 +1,5 @@
1
+ export * from './filterParams';
2
+ export * from './userAgent';
1
3
  export * from './formatData';
2
4
  export * from './validate';
5
+ export * as dateUtils from './DateUtils';
@@ -0,0 +1,23 @@
1
+ declare function isServer(): boolean;
2
+ declare function isClient(): boolean;
3
+ declare function isIOS(): boolean;
4
+ declare function isMacOS(): boolean;
5
+ declare function isAndroid(): boolean;
6
+ declare function isIE(): boolean;
7
+ declare function isKakaoWebView(): boolean;
8
+ declare function getOSByUserAgent(): false | "ios" | "android" | "web";
9
+ declare function isMobileWeb(): boolean;
10
+ declare function getPlatform(): "ios" | "android" | "web" | "server" | "kakao" | "macos";
11
+ export declare const userAgent: {
12
+ isServer: typeof isServer;
13
+ isClient: typeof isClient;
14
+ isIOS: typeof isIOS;
15
+ isAndroid: typeof isAndroid;
16
+ isMacOS: typeof isMacOS;
17
+ isIE: typeof isIE;
18
+ isKakaoWebView: typeof isKakaoWebView;
19
+ isMobileWeb: typeof isMobileWeb;
20
+ getOSByUserAgent: typeof getOSByUserAgent;
21
+ getPlatform: typeof getPlatform;
22
+ };
23
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byuckchon-frontend/utils",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.umd.js",