@stackshift-ui/blog 7.0.0-beta.0 → 7.0.0-beta.10
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/blog.d.ts +1 -0
- package/dist/blog.js +1 -1
- package/dist/blog.mjs +1 -1
- package/dist/blog_a.js +1 -1
- package/dist/blog_a.mjs +1 -1
- package/dist/blog_b.js +1 -1
- package/dist/blog_b.mjs +1 -1
- package/dist/blog_c.js +1 -1
- package/dist/blog_c.mjs +1 -1
- package/dist/blog_d.js +1 -1
- package/dist/blog_d.mjs +1 -1
- package/dist/chunk-F5644BXY.mjs +1 -0
- package/dist/chunk-HYWHEEUI.mjs +1 -0
- package/dist/chunk-LMUKVTZM.mjs +1 -0
- package/dist/chunk-YTGYR6N2.mjs +1 -0
- package/dist/chunk-YZPBCGXG.mjs +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +17 -17
- package/src/blog.tsx +9 -5
- package/src/blog_a.tsx +24 -21
- package/src/blog_b.tsx +22 -32
- package/src/blog_c.tsx +1 -5
- package/src/blog_d.tsx +13 -16
- package/dist/chunk-7K4AC7BM.mjs +0 -1
- package/dist/chunk-DK7SFSP5.mjs +0 -1
- package/dist/chunk-HBY4OOKD.mjs +0 -1
- package/dist/chunk-OH3LZBKF.mjs +0 -1
- package/dist/chunk-OSCI5VC3.mjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var Hf=Object.create;var te=Object.defineProperty;var $f=Object.getOwnPropertyDescriptor;var Ef=Object.getOwnPropertyNames;var zf=Object.getPrototypeOf,Lf=Object.prototype.hasOwnProperty;var a=(e,t)=>()=>(e&&(t=e(e=0)),t);var B=(e,t)=>{for(var r in t)te(e,r,{get:t[r],enumerable:!0})},Ze=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ef(t))!Lf.call(e,o)&&o!==r&&te(e,o,{get:()=>t[o],enumerable:!(n=$f(t,o))||n.enumerable});return e};var Ke=(e,t,r)=>(r=e!=null?Hf(zf(e)):{},Ze(t||!e||!e.__esModule?te(r,"default",{value:e,enumerable:!0}):r,e)),Rf=e=>Ze(te({},"__esModule",{value:!0}),e);var Af,Ju,re,et,Qf,tt,Zu,Bf,qf,Ku,xe,q=a(()=>{"use strict";Af=Math.pow(10,8)*24*60*60*1e3,Ju=-Af,re=6048e5,et=864e5,Qf=3600,tt=Qf*24,Zu=tt*7,Bf=tt*365.2425,qf=Bf/12,Ku=qf*3,xe=Symbol.for("constructDateFrom")});function p(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&xe in e?e[xe](t):e instanceof Date?new e.constructor(t):new Date(t)}var W=a(()=>{"use strict";q()});function b(e,t){return p(t||e,e)}var I=a(()=>{"use strict";W()});var rt=a(()=>{"use strict"});var at=a(()=>{"use strict"});var nt=a(()=>{"use strict"});var ot=a(()=>{"use strict"});var ft=a(()=>{"use strict"});var ut=a(()=>{"use strict"});var mt=a(()=>{"use strict"});var ct=a(()=>{"use strict"});var it=a(()=>{"use strict"});function F(){return jf}var jf,j=a(()=>{"use strict";jf={}});function N(e,t){var m,s,D,y,w,x,M,O;let r=F(),n=(O=(M=(y=(D=t==null?void 0:t.weekStartsOn)!=null?D:(s=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:s.weekStartsOn)!=null?y:r.weekStartsOn)!=null?M:(x=(w=r.locale)==null?void 0:w.options)==null?void 0:x.weekStartsOn)!=null?O:0,o=b(e,t==null?void 0:t.in),f=o.getDay(),u=(f<n?7:0)+f-n;return o.setDate(o.getDate()-u),o.setHours(0,0,0,0),o}var z=a(()=>{"use strict";j();I()});function H(e,t){return N(e,{...t,weekStartsOn:1})}var X=a(()=>{"use strict";z()});function ae(e,t){let r=b(e,t==null?void 0:t.in),n=r.getFullYear(),o=p(r,0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);let f=H(o),u=p(r,0);u.setFullYear(n,0,4),u.setHours(0,0,0,0);let m=H(u);return r.getTime()>=f.getTime()?n+1:r.getTime()>=m.getTime()?n:n-1}var ne=a(()=>{"use strict";W();X();I()});function he(e){let t=b(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}var lt=a(()=>{"use strict";I()});function dt(e,...t){let r=p.bind(null,e||t.find(n=>typeof n=="object"));return t.map(r)}var st=a(()=>{"use strict";W()});function ge(e,t){let r=b(e,t==null?void 0:t.in);return r.setHours(0,0,0,0),r}var De=a(()=>{"use strict";I()});function xt(e,t,r){let[n,o]=dt(r==null?void 0:r.in,e,t),f=ge(n),u=ge(o),m=+f-he(f),s=+u-he(u);return Math.round((m-s)/et)}var ye=a(()=>{"use strict";lt();st();q();De()});function ht(e,t){let r=ae(e,t),n=p((t==null?void 0:t.in)||e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),H(n)}var we=a(()=>{"use strict";W();ne();X()});var gt=a(()=>{"use strict"});var Dt=a(()=>{"use strict"});var yt=a(()=>{"use strict"});var wt=a(()=>{"use strict"});var bt=a(()=>{"use strict"});var Mt=a(()=>{"use strict"});var Ot=a(()=>{"use strict"});var kt=a(()=>{"use strict"});var St=a(()=>{"use strict"});var pt=a(()=>{"use strict"});var vt=a(()=>{"use strict"});var It=a(()=>{"use strict"});var Tt=a(()=>{"use strict"});var Nt=a(()=>{"use strict"});var Yt=a(()=>{"use strict"});var Wt=a(()=>{"use strict"});var Ft=a(()=>{"use strict"});var Pt=a(()=>{"use strict"});function _t(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}var be=a(()=>{"use strict"});function Ct(e){return!(!_t(e)&&typeof e!="number"||isNaN(+b(e)))}var Me=a(()=>{"use strict";be();I()});var Ht=a(()=>{"use strict"});var $t=a(()=>{"use strict"});var Et=a(()=>{"use strict"});var zt=a(()=>{"use strict"});var Lt=a(()=>{"use strict"});var Rt=a(()=>{"use strict"});var At=a(()=>{"use strict"});var Qt=a(()=>{"use strict"});var Bt=a(()=>{"use strict"});var qt=a(()=>{"use strict"});var jt=a(()=>{"use strict"});var Xt=a(()=>{"use strict"});var Ut=a(()=>{"use strict"});var Vt=a(()=>{"use strict"});var Gt=a(()=>{"use strict"});var Jt=a(()=>{"use strict"});var Zt=a(()=>{"use strict"});var Kt=a(()=>{"use strict"});var er=a(()=>{"use strict"});var tr=a(()=>{"use strict"});var rr=a(()=>{"use strict"});var ar=a(()=>{"use strict"});var nr=a(()=>{"use strict"});var or=a(()=>{"use strict"});var fr=a(()=>{"use strict"});var ur=a(()=>{"use strict"});var mr=a(()=>{"use strict"});var cr=a(()=>{"use strict"});var ir=a(()=>{"use strict"});var lr=a(()=>{"use strict"});var dr=a(()=>{"use strict"});var sr=a(()=>{"use strict"});var xr=a(()=>{"use strict"});function hr(e,t){let r=b(e,t==null?void 0:t.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}var Oe=a(()=>{"use strict";I()});var gr=a(()=>{"use strict"});var Dr=a(()=>{"use strict"});var yr=a(()=>{"use strict"});var wr=a(()=>{"use strict"});var br=a(()=>{"use strict"});var Mr=a(()=>{"use strict"});var Or=a(()=>{"use strict"});var kr=a(()=>{"use strict"});var Sr=a(()=>{"use strict"});var pr=a(()=>{"use strict"});var vr=a(()=>{"use strict"});var Ir=a(()=>{"use strict"});var Tr=a(()=>{"use strict"});var Xf,Nr,Yr=a(()=>{"use strict";Xf={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"}},Nr=(e,t,r)=>{let n,o=Xf[e];return typeof o=="string"?n=o:t===1?n=o.one:n=o.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n}});function oe(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var Wr=a(()=>{"use strict"});var Uf,Vf,Gf,Fr,Pr=a(()=>{"use strict";Wr();Uf={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Vf={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Gf={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Fr={date:oe({formats:Uf,defaultWidth:"full"}),time:oe({formats:Vf,defaultWidth:"full"}),dateTime:oe({formats:Gf,defaultWidth:"full"})}});var Jf,_r,Cr=a(()=>{"use strict";Jf={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},_r=(e,t,r,n)=>Jf[e]});function L(e){return(t,r)=>{let n=r!=null&&r.context?String(r.context):"standalone",o;if(n==="formatting"&&e.formattingValues){let u=e.defaultFormattingWidth||e.defaultWidth,m=r!=null&&r.width?String(r.width):u;o=e.formattingValues[m]||e.formattingValues[u]}else{let u=e.defaultWidth,m=r!=null&&r.width?String(r.width):e.defaultWidth;o=e.values[m]||e.values[u]}let f=e.argumentCallback?e.argumentCallback(t):t;return o[f]}}var Hr=a(()=>{"use strict"});var Zf,Kf,eu,tu,ru,au,nu,$r,Er=a(()=>{"use strict";Hr();Zf={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Kf={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eu={narrow:["Ye","F","M","A","M","Ye","Ye","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"]},tu={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"]},ru={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"}},au={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"}},nu=(e,t)=>{let r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},$r={ordinalNumber:nu,era:L({values:Zf,defaultWidth:"wide"}),quarter:L({values:Kf,defaultWidth:"wide",argumentCallback:e=>e-1}),month:L({values:eu,defaultWidth:"wide"}),day:L({values:tu,defaultWidth:"wide"}),dayPeriod:L({values:ru,defaultWidth:"wide",formattingValues:au,defaultFormattingWidth:"wide"})}});function R(e){return(t,r={})=>{let n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],f=t.match(o);if(!f)return null;let u=f[0],m=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(m)?fu(m,w=>w.test(u)):ou(m,w=>w.test(u)),D;D=e.valueCallback?e.valueCallback(s):s,D=r.valueCallback?r.valueCallback(D):D;let y=t.slice(u.length);return{value:D,rest:y}}}function ou(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function fu(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}var zr=a(()=>{"use strict"});function Lr(e){return(t,r={})=>{let n=t.match(e.matchPattern);if(!n)return null;let o=n[0],f=t.match(e.parsePattern);if(!f)return null;let u=e.valueCallback?e.valueCallback(f[0]):f[0];u=r.valueCallback?r.valueCallback(u):u;let m=t.slice(o.length);return{value:u,rest:m}}}var Rr=a(()=>{"use strict"});var uu,mu,cu,iu,lu,du,su,xu,hu,gu,Du,yu,Ar,Qr=a(()=>{"use strict";zr();Rr();uu=/^(\d+)(th|st|nd|rd)?/i,mu=/\d+/i,cu={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},iu={any:[/^b/i,/^(a|c)/i]},lu={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},du={any:[/1/i,/2/i,/3/i,/4/i]},su={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},xu={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]},hu={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},gu={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]},Du={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},yu={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}},Ar={ordinalNumber:Lr({matchPattern:uu,parsePattern:mu,valueCallback:e=>parseInt(e,10)}),era:R({matchPatterns:cu,defaultMatchWidth:"wide",parsePatterns:iu,defaultParseWidth:"any"}),quarter:R({matchPatterns:lu,defaultMatchWidth:"wide",parsePatterns:du,defaultParseWidth:"any",valueCallback:e=>e+1}),month:R({matchPatterns:su,defaultMatchWidth:"wide",parsePatterns:xu,defaultParseWidth:"any"}),day:R({matchPatterns:hu,defaultMatchWidth:"wide",parsePatterns:gu,defaultParseWidth:"any"}),dayPeriod:R({matchPatterns:Du,defaultMatchWidth:"any",parsePatterns:yu,defaultParseWidth:"any"})}});var ke,Br=a(()=>{"use strict";Yr();Pr();Cr();Er();Qr();ke={code:"en-US",formatDistance:Nr,formatLong:Fr,formatRelative:_r,localize:$r,match:Ar,options:{weekStartsOn:0,firstWeekContainsDate:1}}});var qr=a(()=>{"use strict";Br()});function jr(e,t){let r=b(e,t==null?void 0:t.in);return xt(r,hr(r))+1}var Se=a(()=>{"use strict";ye();Oe();I()});function Xr(e,t){let r=b(e,t==null?void 0:t.in),n=+H(r)-+ht(r);return Math.round(n/re)+1}var pe=a(()=>{"use strict";q();X();we();I()});function fe(e,t){var y,w,x,M,O,_,C,E;let r=b(e,t==null?void 0:t.in),n=r.getFullYear(),o=F(),f=(E=(C=(M=(x=t==null?void 0:t.firstWeekContainsDate)!=null?x:(w=(y=t==null?void 0:t.locale)==null?void 0:y.options)==null?void 0:w.firstWeekContainsDate)!=null?M:o.firstWeekContainsDate)!=null?C:(_=(O=o.locale)==null?void 0:O.options)==null?void 0:_.firstWeekContainsDate)!=null?E:1,u=p((t==null?void 0:t.in)||e,0);u.setFullYear(n+1,0,f),u.setHours(0,0,0,0);let m=N(u,t),s=p((t==null?void 0:t.in)||e,0);s.setFullYear(n,0,f),s.setHours(0,0,0,0);let D=N(s,t);return+r>=+m?n+1:+r>=+D?n:n-1}var ue=a(()=>{"use strict";j();W();z();I()});function Ur(e,t){var m,s,D,y,w,x,M,O;let r=F(),n=(O=(M=(y=(D=t==null?void 0:t.firstWeekContainsDate)!=null?D:(s=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:s.firstWeekContainsDate)!=null?y:r.firstWeekContainsDate)!=null?M:(x=(w=r.locale)==null?void 0:w.options)==null?void 0:x.firstWeekContainsDate)!=null?O:1,o=fe(e,t),f=p((t==null?void 0:t.in)||e,0);return f.setFullYear(o,0,n),f.setHours(0,0,0,0),N(f,t)}var ve=a(()=>{"use strict";j();W();ue();z()});function Vr(e,t){let r=b(e,t==null?void 0:t.in),n=+N(r,t)-+Ur(r,t);return Math.round(n/re)+1}var Ie=a(()=>{"use strict";q();z();ve();I()});function h(e,t){let r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}var Te=a(()=>{"use strict"});var Y,Gr=a(()=>{"use strict";Te();Y={y(e,t){let r=e.getFullYear(),n=r>0?r:1-r;return h(t==="yy"?n%100:n,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):h(r+1,2)},d(e,t){return h(e.getDate(),t.length)},a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return h(e.getHours()%12||12,t.length)},H(e,t){return h(e.getHours(),t.length)},m(e,t){return h(e.getMinutes(),t.length)},s(e,t){return h(e.getSeconds(),t.length)},S(e,t){let r=t.length,n=e.getMilliseconds(),o=Math.trunc(n*Math.pow(10,r-3));return h(o,t.length)}}});function Jr(e,t=""){let r=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),f=n%60;return f===0?r+String(o):r+String(o)+t+h(f,2)}function Zr(e,t){return e%60===0?(e>0?"-":"+")+h(Math.abs(e)/60,2):$(e,t)}function $(e,t=""){let r=e>0?"-":"+",n=Math.abs(e),o=h(Math.trunc(n/60),2),f=h(n%60,2);return r+o+t+f}var A,Ne,Kr=a(()=>{"use strict";Se();pe();ne();Ie();ue();Te();Gr();A={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ne={Ye:function(e,t,r){let n=e.getFullYear()>0?1:0;switch(t){case"Ye":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let n=e.getFullYear(),o=n>0?n:1-n;return r.ordinalNumber(o,{unit:"year"})}return Y.y(e,t)},Y:function(e,t,r,n){let o=fe(e,n),f=o>0?o:1-o;if(t==="YY"){let u=f%100;return h(u,2)}return t==="Yo"?r.ordinalNumber(f,{unit:"year"}):h(f,t.length)},R:function(e,t){let r=ae(e);return h(r,t.length)},u:function(e,t){let r=e.getFullYear();return h(r,t.length)},Q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return h(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return h(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){let n=e.getMonth();switch(t){case"M":case"MM":return Y.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){let n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return h(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){let o=Vr(e,n);return t==="wo"?r.ordinalNumber(o,{unit:"week"}):h(o,t.length)},I:function(e,t,r){let n=Xr(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):h(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Y.d(e,t)},D:function(e,t,r){let n=jr(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):h(n,t.length)},E:function(e,t,r){let n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){let o=e.getDay(),f=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(f);case"ee":return h(f,2);case"eo":return r.ordinalNumber(f,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){let o=e.getDay(),f=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(f);case"cc":return h(f,t.length);case"co":return r.ordinalNumber(f,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){let n=e.getDay(),o=n===0?7:n;switch(t){case"i":return String(o);case"ii":return h(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){let o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,r){let n=e.getHours(),o;switch(n===12?o=A.noon:n===0?o=A.midnight:o=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,r){let n=e.getHours(),o;switch(n>=17?o=A.evening:n>=12?o=A.afternoon:n>=4?o=A.morning:o=A.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Y.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Y.H(e,t)},Ye:function(e,t,r){let n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):h(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):h(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Y.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Y.s(e,t)},S:function(e,t){return Y.S(e,t)},X:function(e,t,r){let n=e.getTimezoneOffset();if(n===0)return"V";switch(t){case"X":return Zr(n);case"XXXX":case"XX":return $(n);case"XXXXX":case"XXX":default:return $(n,":")}},x:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"x":return Zr(n);case"xxxx":case"xx":return $(n);case"xxxxx":case"xxx":default:return $(n,":")}},O:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Jr(n,":");case"OOOO":default:return"GMT"+$(n,":")}},z:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Jr(n,":");case"zzzz":default:return"GMT"+$(n,":")}},t:function(e,t,r){let n=Math.trunc(+e/1e3);return h(n,t.length)},T:function(e,t,r){return h(+e,t.length)}}});var ea,ta,wu,ra,aa=a(()=>{"use strict";ea=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},ta=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},wu=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],n=r[1],o=r[2];if(!o)return ea(e,t);let f;switch(n){case"P":f=t.dateTime({width:"short"});break;case"PP":f=t.dateTime({width:"medium"});break;case"PPP":f=t.dateTime({width:"long"});break;case"PPPP":default:f=t.dateTime({width:"full"});break}return f.replace("{{date}}",ea(n,t)).replace("{{time}}",ta(o,t))},ra={p:ta,P:wu}});function na(e){return bu.test(e)}function oa(e){return Mu.test(e)}function fa(e,t,r){let n=ku(e,t,r);if(console.warn(n),Ou.includes(e))throw new RangeError(n)}function ku(e,t,r){let n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var bu,Mu,Ou,ua=a(()=>{"use strict";bu=/^D+$/,Mu=/^Y+$/,Ou=["D","DD","YY","YYYY"]});function P(e,t,r){var y,w,x,M,O,_,C,E,i,k,T,qe,je,Xe,Ue,Ve,Ge,Je;let n=F(),o=(w=(y=r==null?void 0:r.locale)!=null?y:n.locale)!=null?w:ke,f=(k=(i=(_=(O=r==null?void 0:r.firstWeekContainsDate)!=null?O:(M=(x=r==null?void 0:r.locale)==null?void 0:x.options)==null?void 0:M.firstWeekContainsDate)!=null?_:n.firstWeekContainsDate)!=null?i:(E=(C=n.locale)==null?void 0:C.options)==null?void 0:E.firstWeekContainsDate)!=null?k:1,u=(Je=(Ge=(Xe=(je=r==null?void 0:r.weekStartsOn)!=null?je:(qe=(T=r==null?void 0:r.locale)==null?void 0:T.options)==null?void 0:qe.weekStartsOn)!=null?Xe:n.weekStartsOn)!=null?Ge:(Ve=(Ue=n.locale)==null?void 0:Ue.options)==null?void 0:Ve.weekStartsOn)!=null?Je:0,m=b(e,r==null?void 0:r.in);if(!Ct(m))throw new RangeError("Invalid time value");let s=t.match(pu).map(v=>{let S=v[0];if(S==="p"||S==="P"){let se=ra[S];return se(v,o.formatLong)}return v}).join("").match(Su).map(v=>{if(v==="''")return{isToken:!1,value:"'"};let S=v[0];if(S==="'")return{isToken:!1,value:Nu(v)};if(Ne[S])return{isToken:!0,value:v};if(S.match(Tu))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");return{isToken:!1,value:v}});o.localize.preprocessor&&(s=o.localize.preprocessor(m,s));let D={firstWeekContainsDate:f,weekStartsOn:u,locale:o};return s.map(v=>{if(!v.isToken)return v.value;let S=v.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&oa(S)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&na(S))&&fa(S,t,String(e));let se=Ne[S[0]];return se(m,S,o.localize,D)}).join("")}function Nu(e){let t=e.match(vu);return t?t[1].replace(Iu,"'"):e}var Su,pu,vu,Iu,Tu,ma=a(()=>{"use strict";qr();j();Kr();aa();ua();Me();I();Su=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pu=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,vu=/^'([^]*?)'?$/,Iu=/''/g,Tu=/[a-zA-V]/});var ca=a(()=>{"use strict"});var ia=a(()=>{"use strict"});var la=a(()=>{"use strict"});var da=a(()=>{"use strict"});var sa=a(()=>{"use strict"});var xa=a(()=>{"use strict"});var ha=a(()=>{"use strict"});var ga=a(()=>{"use strict"});var Da=a(()=>{"use strict"});var ya=a(()=>{"use strict"});var wa=a(()=>{"use strict"});var ba=a(()=>{"use strict"});var Ma=a(()=>{"use strict"});var Oa=a(()=>{"use strict"});var ka=a(()=>{"use strict"});var Sa=a(()=>{"use strict"});var pa=a(()=>{"use strict"});var va=a(()=>{"use strict"});var Ia=a(()=>{"use strict"});var Ta=a(()=>{"use strict"});var Na=a(()=>{"use strict"});var Ya=a(()=>{"use strict"});var Wa=a(()=>{"use strict"});var Fa=a(()=>{"use strict"});var Pa=a(()=>{"use strict"});var _a=a(()=>{"use strict"});var Ca=a(()=>{"use strict"});var Ha=a(()=>{"use strict"});var $a=a(()=>{"use strict"});var Ea=a(()=>{"use strict"});var za=a(()=>{"use strict"});var La=a(()=>{"use strict"});var Ra=a(()=>{"use strict"});var Aa=a(()=>{"use strict"});var Qa=a(()=>{"use strict"});var Ba=a(()=>{"use strict"});var qa=a(()=>{"use strict"});var ja=a(()=>{"use strict"});var Xa=a(()=>{"use strict"});var Ua=a(()=>{"use strict"});var Va=a(()=>{"use strict"});var Ga=a(()=>{"use strict"});var Ja=a(()=>{"use strict"});var Za=a(()=>{"use strict"});var Ka=a(()=>{"use strict"});var en=a(()=>{"use strict"});var tn=a(()=>{"use strict"});var rn=a(()=>{"use strict"});var an=a(()=>{"use strict"});var nn=a(()=>{"use strict"});var on=a(()=>{"use strict"});var fn=a(()=>{"use strict"});var un=a(()=>{"use strict"});var mn=a(()=>{"use strict"});var cn=a(()=>{"use strict"});var ln=a(()=>{"use strict"});var dn=a(()=>{"use strict"});var sn=a(()=>{"use strict"});var xn=a(()=>{"use strict"});var hn=a(()=>{"use strict"});var gn=a(()=>{"use strict"});var Dn=a(()=>{"use strict"});var yn=a(()=>{"use strict"});var wn=a(()=>{"use strict"});var bn=a(()=>{"use strict"});var Mn=a(()=>{"use strict"});var On=a(()=>{"use strict"});var kn=a(()=>{"use strict"});var Sn=a(()=>{"use strict"});var pn=a(()=>{"use strict"});var vn=a(()=>{"use strict"});var In=a(()=>{"use strict"});var Tn=a(()=>{"use strict"});var Nn=a(()=>{"use strict"});var Yn=a(()=>{"use strict"});var Wn=a(()=>{"use strict"});var Fn=a(()=>{"use strict"});var Pn=a(()=>{"use strict"});var _n=a(()=>{"use strict"});var Cn=a(()=>{"use strict"});var Hn=a(()=>{"use strict"});var $n=a(()=>{"use strict"});var En=a(()=>{"use strict"});var zn=a(()=>{"use strict"});var Ln=a(()=>{"use strict"});var Rn=a(()=>{"use strict"});var An=a(()=>{"use strict"});var Qn=a(()=>{"use strict"});var Bn=a(()=>{"use strict"});var qn=a(()=>{"use strict"});var jn=a(()=>{"use strict"});var Xn=a(()=>{"use strict"});var Un=a(()=>{"use strict"});var Vn=a(()=>{"use strict"});var Gn=a(()=>{"use strict"});var Jn=a(()=>{"use strict"});var Zn=a(()=>{"use strict"});var Kn=a(()=>{"use strict"});var eo=a(()=>{"use strict"});var to=a(()=>{"use strict"});var ro=a(()=>{"use strict"});var ao=a(()=>{"use strict"});var no=a(()=>{"use strict"});var oo=a(()=>{"use strict"});var fo=a(()=>{"use strict"});var uo=a(()=>{"use strict"});var mo=a(()=>{"use strict"});var co=a(()=>{"use strict"});var io=a(()=>{"use strict"});var lo=a(()=>{"use strict"});var so=a(()=>{"use strict"});var xo=a(()=>{"use strict"});var ho=a(()=>{"use strict"});var go=a(()=>{"use strict"});var Do=a(()=>{"use strict"});var yo=a(()=>{"use strict"});var wo=a(()=>{"use strict"});var bo=a(()=>{"use strict"});var Mo=a(()=>{"use strict"});var Oo=a(()=>{"use strict"});var ko=a(()=>{"use strict"});var So=a(()=>{"use strict"});var po=a(()=>{"use strict"});var vo=a(()=>{"use strict"});var Io=a(()=>{"use strict"});var To=a(()=>{"use strict"});var No=a(()=>{"use strict"});var Yo=a(()=>{"use strict"});var Wo=a(()=>{"use strict"});var Fo=a(()=>{"use strict"});var Po=a(()=>{"use strict"});var _o=a(()=>{"use strict"});var Co=a(()=>{"use strict"});var Ho=a(()=>{"use strict"});var $o=a(()=>{"use strict"});var Eo=a(()=>{"use strict"});var zo=a(()=>{"use strict"});var Lo=a(()=>{"use strict"});var Ro=a(()=>{"use strict"});var Ao=a(()=>{"use strict"});var Qo=a(()=>{"use strict"});var Bo=a(()=>{"use strict"});var qo=a(()=>{"use strict"});var jo=a(()=>{"use strict"});var Xo=a(()=>{"use strict"});var Uo=a(()=>{"use strict"});var Vo=a(()=>{"use strict"});var Go=a(()=>{"use strict"});var Jo=a(()=>{"use strict"});var Zo=a(()=>{"use strict"});var Ko=a(()=>{"use strict"});var ef=a(()=>{"use strict"});var tf=a(()=>{"use strict"});var rf=a(()=>{"use strict"});var af=a(()=>{"use strict"});var U=a(()=>{"use strict";nt();mt();rt();it();Dt();ct();yt();at();wt();bt();Mt();Ot();kt();vt();It();Tt();Nt();Yt();W();Wt();Ft();Ht();ye();$t();Et();zt();Rt();At();Qt();Bt();qt();Xt();Ut();Vt();Kt();er();tr();rr();ar();nr();or();fr();ur();cr();ir();lr();sr();gr();Dr();Gt();yr();wr();Mr();Or();kr();Jt();Sr();pr();vr();Ir();br();xr();Tr();ma();ca();ia();la();da();sa();xa();ha();ga();Da();ya();wa();ba();Ma();Oa();Se();ka();pa();va();Ia();Ta();Na();pe();ne();Ya();Wa();Fa();Pa();_a();Lt();Ca();Ha();$a();Ie();Ea();ue();La();Ra();Aa();Qa();Ba();qa();ja();Xa();Ua();Va();Ga();be();Ja();Za();Ka();en();tn();Zt();Sa();mn();cn();ln();Pt();sn();hn();gn();yn();wn();bn();On();xn();kn();ot();ft();Sn();pn();vn();In();Tn();Nn();Yn();Wn();Fn();Pn();_n();Cn();Me();Hn();ut();$n();zn();Ln();An();Qn();za();Bn();Rn();qn();jn();St();Xn();Un();Vn();Gn();pt();Jn();Zn();Kn();eo();to();ro();ao();no();oo();fo();uo();mo();co();un();io();lo();so();xo();ho();go();Do();yo();wo();bo();Mo();Oo();ko();So();po();vo();Io();No();Yo();on();Wo();Fo();Po();fn();nn();gt();_o();Co();To();Ho();$o();an();Eo();zo();De();Lo();dn();X();we();Dn();dr();mr();Mn();Ro();Ao();z();ve();Oe();Qo();qo();jo();En();Xo();jt();Uo();Vo();Bo();Go();Jo();Zo();Ko();I();rn();ef();tf();rf();af()});var lf={};B(lf,{Blog_A:()=>We,default:()=>We});function We({subtitle:e,title:t,posts:r,primaryButton:n}){return(0,d.jsx)(cf.Section,{className:"py-20 bg-background",children:(0,d.jsxs)(of.Container,{maxWidth:1280,children:[(0,d.jsx)(Yu,{subtitle:e,title:t}),(0,d.jsx)(Wu,{posts:r}),(0,d.jsx)(Fu,{primaryButton:n})]})})}function Yu({subtitle:e,title:t}){return(0,d.jsxs)("div",{className:"mb-16 text-center",children:[e?(0,d.jsx)(Ye.Text,{weight:"bold",className:"text-secondary",children:e}):null,t?(0,d.jsx)(ff.Heading,{fontSize:"3xl",children:t}):null]})}function Wu({posts:e}){var n,o,f,u;if(!e)return null;let t=6,r=0;return(0,d.jsxs)(V.Flex,{gap:4,className:"flex-col lg:flex-row",children:[(0,d.jsxs)("div",{className:"w-full space-y-5 lg:w-1/2",children:[(n=e==null?void 0:e.slice(r,r+1))==null?void 0:n.map((m,s)=>(0,d.jsx)(me,{post:m},s)),(0,d.jsx)(V.Flex,{gap:4,className:"flex-col lg:flex-row",children:(o=e==null?void 0:e.slice(r+1,r+3))==null?void 0:o.map((m,s)=>(0,d.jsx)(me,{post:m},s))})]}),(0,d.jsxs)("div",{className:"w-full space-y-5 lg:w-1/2",children:[(0,d.jsx)(V.Flex,{gap:4,className:"flex-col lg:flex-row",children:(f=e==null?void 0:e.slice(r+3,r+5))==null?void 0:f.map((m,s)=>(0,d.jsx)(me,{post:m},s))}),(u=e==null?void 0:e.slice(r+5,t))==null?void 0:u.map((m,s)=>(0,d.jsx)(me,{post:m},s))]})]})}function me({post:e,key:t}){var r,n,o,f;return(0,d.jsxs)("div",{className:"relative w-full h-64 rounded",children:[e!=null&&e.mainImage?(0,d.jsx)(uf.Image,{className:"relative object-cover w-full h-full overflow-hidden rounded-md",src:`${e==null?void 0:e.mainImage}`,alt:(r=e==null?void 0:e.alt)!=null?r:`blog-variantA-image-${t}`,sizes:"(min-width: 1540px) 740px, (min-width: 1280px) 612px, (min-width: 1040px) 484px, (min-width: 780px) 736px, (min-width: 680px) 608px, calc(94.44vw - 15px)"}):null,(0,d.jsx)("div",{className:"absolute inset-0 bg-gray-900 rounded-md opacity-75"}),(0,d.jsxs)("div",{className:"absolute inset-0 flex flex-col items-start p-6",children:[e!=null&&e.categories?(0,d.jsx)("div",{className:"absolute flex left-5 top-5",children:(n=e==null?void 0:e.categories)==null?void 0:n.map((u,m)=>(0,d.jsx)("span",{className:"px-3 py-1 mb-auto mr-3 text-sm font-bold uppercase bg-white rounded-full text-primary",children:u==null?void 0:u.title},m))}):null,(0,d.jsxs)(V.Flex,{align:"center",className:"mt-auto",children:[(0,d.jsx)("span",{className:"mt-auto text-sm text-gray-500",children:e!=null&&e.publishedAt?P(new Date(e==null?void 0:e.publishedAt),"dd MMM, yyyy"):""}),(e==null?void 0:e.authors)&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"mx-2 w-1 h-1 bg-gray-500 rounded-full"}),(0,d.jsx)("div",{className:"flex mt-auto text-sm text-gray-500",children:(o=e==null?void 0:e.authors)==null?void 0:o.map((u,m,{length:s})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Ye.Text,{className:"italic",fontSize:"sm",children:u==null?void 0:u.name}),m+1!==s?(0,d.jsx)("span",{children:"\xA0,\xA0"}):null]}))})]})]}),e!=null&&e.title?(0,d.jsx)(mf.Link,{className:"text-lg font-bold text-white transform hover:scale-110 hover:text-secondary motion-reduce:transform-none",href:`/${e==null?void 0:e.link}`,children:((f=e==null?void 0:e.title)==null?void 0:f.length)>40?(e==null?void 0:e.title.substring(0,40))+"...":e==null?void 0:e.title}):null]})]})}function Fu({primaryButton:e}){return e!=null&&e.label?(0,d.jsx)("div",{className:"mt-10 text-center",children:(0,d.jsx)(nf.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label})}):null}var nf,of,V,ff,uf,mf,cf,Ye,d,Fe=a(()=>{"use strict";nf=require("@stackshift-ui/button"),of=require("@stackshift-ui/container"),V=require("@stackshift-ui/flex"),ff=require("@stackshift-ui/heading"),uf=require("@stackshift-ui/image"),mf=require("@stackshift-ui/link"),cf=require("@stackshift-ui/section"),Ye=require("@stackshift-ui/text");U();d=require("react/jsx-runtime")});var ce,ie,Pe=a(()=>{"use strict";ce=Ke(require("react")),ie=e=>{let[t,r]=ce.default.useState(!1),n=ce.default.useCallback(o=>{o.matches?r(!0):r(!1)},[]);return ce.default.useEffect(()=>{let o=window.matchMedia(`(max-width: ${e}px)`);return o.addEventListener("change",n),o.matches&&r(!0),()=>o.removeEventListener("change",n)},[]),t}});var Df={};B(Df,{Blog_B:()=>He,default:()=>He});function He({subtitle:e,title:t,posts:r,primaryButton:n}){return(0,l.jsx)(cf.Section,{className:"py-20 bg-background",children:(0,l.jsxs)(of.Container,{maxWidth:1280,children:[(0,l.jsx)(Pu,{subtitle:e,title:t}),(0,l.jsx)(_u,{posts:r,count:0,blogsPerPage:5}),(0,l.jsx)(Hu,{primaryButton:n})]})})}function Pu({subtitle:e,title:t}){return(0,l.jsxs)("div",{className:"w-full mb-16 text-center",children:[e?(0,l.jsx)(Ye.Text,{weight:"bold",className:"text-secondary",children:e}):null,t?(0,l.jsx)(ff.Heading,{fontSize:"3xl",children:t}):null]})}function _u({posts:e,count:t,blogsPerPage:r}){return(0,l.jsxs)(V.Flex,{wrap:!0,justify:"center",className:"mb-16",gap:4,children:[(0,l.jsx)("div",{className:"w-full lg:w-[45%]",children:e==null?void 0:e.slice(t,t+1).map((n,o)=>(0,l.jsx)(df,{size:"lg",post:n},o))}),(0,l.jsx)(V.Flex,{wrap:!0,className:"w-full lg:w-[45%]",gap:4,children:e==null?void 0:e.slice(t+1,r).map((n,o)=>(0,l.jsx)("div",{className:"w-full lg:basis-[45%]",children:(0,l.jsx)(df,{post:n,size:"sm"},o)},o))})]})}function df({post:e,size:t,key:r}){var o;let n=ie("1024");return(0,l.jsxs)("div",{className:"overflow-hidden rounded-md shadow",children:[e!=null&&e.mainImage?(0,l.jsx)(Cu,{post:e,size:t,breakpoints:n},r):null,(0,l.jsxs)("div",{className:"p-6 bg-white flex flex-col justify-between",style:{height:"295px"},children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)(V.Flex,{align:"center",children:[e!=null&&e.publishedAt?(0,l.jsx)(Ye.Text,{muted:!0,className:"text-sm",children:P(new Date(e.publishedAt)," dd MMM, yyyy")}):null,(e==null?void 0:e.authors)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"mx-2 w-1 h-1 bg-gray-500 rounded-full"}),(0,l.jsx)("div",{className:"flex mt-auto text-sm text-gray-500",children:(o=e==null?void 0:e.authors)==null?void 0:o.map((f,u,{length:m})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ye.Text,{className:"italic",fontSize:"sm",children:f==null?void 0:f.name}),u+1!==m?(0,l.jsx)("span",{children:"\xA0,\xA0"}):null]}))})]})]}),e!=null&&e.title?(0,l.jsx)(ff.Heading,{type:"h4",className:"my-2",children:e.title.length>25?`${e.title.substring(0,25)}...`:e.title}):null,e!=null&&e.excerpt?(0,l.jsx)(Ye.Text,{muted:!0,className:"mb-6 text-justify",children:e.excerpt.length>41?`${e.excerpt.substring(0,41)}...`:e.excerpt}):null]}),e!=null&&e.link?(0,l.jsx)(mf.Link,{"aria-label":"View Blog Post",className:"font-bold text-primary hover:text-secondary",href:`/${e==null?void 0:e.link}`,children:"View Blog Post"}):null]})]})}function Cu({post:e,size:t,breakpoints:r,key:n}){var o;return(0,l.jsx)(l.Fragment,{children:r?(0,l.jsx)(uf.Image,{className:"object-cover w-full overflow-hidden",src:`${e.mainImage}`,sizes:"100vw",style:{width:"100%",height:"auto",objectFit:"cover"},width:271,height:248,alt:(o=e==null?void 0:e.mainImage)!=null?o:`blog-variantB-image-${n}`}):(0,l.jsx)("div",{className:`${t==="lg"?"h-[44.5rem]":"h-[12.5rem]"}`,children:(0,l.jsx)(uf.Image,{className:"object-cover w-full overflow-hidden rounded-t-md",src:`${e.mainImage}`,sizes:"100vw",style:{width:"100%",height:"100%",objectFit:"cover"},width:271,height:248,alt:`blog-variantB-image-${e.title}`})})})}function Hu({primaryButton:e}){return e!=null&&e.label?(0,l.jsx)("div",{className:"text-center",children:(0,l.jsx)(sf.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label})}):null}var sf,of,V,ff,uf,mf,cf,Ye,l,$e=a(()=>{"use strict";sf=require("@stackshift-ui/button");U();Pe();l=require("react/jsx-runtime")});var Sf={};B(Sf,{Blog_C:()=>Le,default:()=>Le});function Le({subtitle:e,title:t,posts:r,primaryButton:n}){return(0,g.jsx)(cf.Section,{className:"py-20 bg-background",children:(0,g.jsxs)(of.Container,{maxWidth:1280,children:[(0,g.jsxs)(V.Flex,{align:"center",justify:"between",className:"flex-col mb-16 md:flex-row",gap:5,children:[(0,g.jsx)($u,{subtitle:e,title:t}),(0,g.jsx)(Lu,{primaryButton:n})]}),(0,g.jsx)(Eu,{posts:r,blogsPerPage:3})]})})}function $u({subtitle:e,title:t}){return(0,g.jsxs)("div",{className:"flex flex-col gap-3 text-center md:text-left",children:[e?(0,g.jsx)(Ye.Text,{weight:"bold",className:"text-primary",children:e}):null,t?(0,g.jsx)(ff.Heading,{fontSize:"3xl",children:t}):null]})}function Eu({posts:e,blogsPerPage:t}){var r;return e?(0,g.jsx)("div",{children:(r=e==null?void 0:e.slice(0,t))==null?void 0:r.map((n,o)=>(0,g.jsx)("div",{className:"flex flex-wrap mb-8 overflow-hidden rounded-md shadow",children:(0,g.jsx)(zu,{post:n,className:`${o%2===0?"flex-row":"flex-row-reverse"}`},o)},o))}):null}function zu({post:e,className:t,key:r}){var f,u,m,s,D,y,w;let o=ie("1100")?70:200;return(0,g.jsxs)(V.Flex,{wrap:!0,className:`bg-white overflow-hidden rounded-lg shadow w-full ${t}`,children:[(e==null?void 0:e.mainImage)&&(0,g.jsx)(uf.Image,{className:"object-cover w-full h-auto rounded-l lg:w-1/2",src:`${e==null?void 0:e.mainImage}`,sizes:"100vw",width:554,height:416,alt:(f=e==null?void 0:e.alt)!=null?f:`blog-variantC-image-${r}`}),(0,g.jsxs)("div",{className:"w-full px-6 py-6 rounded-r lg:w-1/2 lg:pt-10",children:[(0,g.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3",children:[(e==null?void 0:e.categories)&&((u=e==null?void 0:e.categories)==null?void 0:u.map((x,M)=>(0,g.jsx)(yf.Badge,{className:"bg-secondary rounded-global w-fit",children:x==null?void 0:x.title},M))),(e==null?void 0:e.publishedAt)&&(0,g.jsx)(Ye.Text,{muted:!0,className:"m-1",children:P(new Date(e==null?void 0:e.publishedAt)," dd MMM, yyyy")})]}),(e==null?void 0:e.title)&&(0,g.jsx)(ff.Heading,{className:"my-4 text-xl lg:text-3xl",children:((m=e==null?void 0:e.title)==null?void 0:m.length)>40?((s=e==null?void 0:e.title)==null?void 0:s.substring(0,40))+"...":e==null?void 0:e.title}),(e==null?void 0:e.authors)&&(0,g.jsxs)("div",{className:"flex mb-10 flex-wrap",children:[(0,g.jsx)("span",{className:"italic text-primary",children:"By\xA0"}),(D=e==null?void 0:e.authors)==null?void 0:D.map((x,M,{length:O})=>(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(Ye.Text,{className:"italic text-primary",children:x==null?void 0:x.name}),M+1!==O?(0,g.jsx)("span",{children:"\xA0,\xA0"}):null]}))]}),(e==null?void 0:e.excerpt)&&(0,g.jsx)(Ye.Text,{muted:!0,className:"mb-6 leading-loose lg:text-justify",children:((y=e==null?void 0:e.excerpt)==null?void 0:y.length)>o?((w=e==null?void 0:e.excerpt)==null?void 0:w.substring(0,o))+"...":e==null?void 0:e.excerpt}),(e==null?void 0:e.link)&&(0,g.jsx)(mf.Link,{"aria-label":"View Blog Post",className:"font-bold text-primary hover:text-primary-foreground",href:`/${e==null?void 0:e.link}`,children:"View Blog Post"})]})]})}function Lu({primaryButton:e}){return e!=null&&e.label?(0,g.jsx)(wf.Button,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,className:"inline-flex flex-wrap text-center bg-primary text-sm sm:text-base px-6 py-3 rounded-global",children:e==null?void 0:e.label}):null}var yf,wf,of,V,ff,uf,mf,cf,Ye,g,Re=a(()=>{"use strict";yf=require("@stackshift-ui/badge"),wf=require("@stackshift-ui/button");U();Pe();g=require("react/jsx-runtime")});var Pf={};B(Pf,{Blog_D:()=>Qe,default:()=>Qe});function Qe({subtitle:e,title:t,posts:r}){let[n,o]=Q.default.useState("All"),[f,u]=Q.default.useState(1),[m,s]=Q.default.useState(""),D=6;Q.default.useEffect(()=>{u(1)},[n]);let y=(r!=null?r:[]).flatMap(i=>{var k;return((k=i==null?void 0:i.categories)!=null?k:[]).map(T=>({category:T==null?void 0:T.title,title:i==null?void 0:i.title,slug:i==null?void 0:i.slug,excerpt:i==null?void 0:i.excerpt,publishedAt:i==null?void 0:i.publishedAt,mainImage:i==null?void 0:i.mainImage,authors:i==null?void 0:i.authors}))}),w=y==null?void 0:y.reduce((i,k)=>{let T=k==null?void 0:k.category;return i.indexOf(T)===-1&&i.push(T),i},[]),x=n==="All"?r==null?void 0:r.filter(i=>{var k;return(k=i==null?void 0:i.title)==null?void 0:k.toLowerCase().includes(m.toLowerCase())}):y.filter(i=>{var k;return(i==null?void 0:i.category)===n&&((k=i==null?void 0:i.title)==null?void 0:k.toLowerCase().includes(m.toLowerCase()))}),M=f*D,O=M-D,_=x==null?void 0:x.slice(O,M),C=i=>u(i);return(0,c.jsx)(cf.Section,{className:"py-20 bg-background",children:(0,c.jsxs)(of.Container,{maxWidth:1280,children:[(0,c.jsx)(Au,{subtitle:e,title:t}),(0,c.jsx)(Qu,{handleSearchChange:i=>{s(i.target.value),o("All"),u(1)}}),(0,c.jsxs)(V.Flex,{wrap:!0,children:[(0,c.jsx)(Bu,{categories:w,activeTab:n,setActiveTab:o}),(x==null?void 0:x.length)===0?(0,c.jsx)(Ru,{}):(0,c.jsx)(qu,{currentPosts:_,activeTab:n,blogsPerPage:D})]}),(0,c.jsx)(ju,{blogsPerPage:D,totalBlogs:x==null?void 0:x.length,paginate:C,currentPage:f})]})})}function Ru({message:e="No post available."}){return(0,c.jsx)("div",{className:"w-full px-3 lg:w-3/4 font-medium text-lg",children:e})}function Au({subtitle:e,title:t}){return(0,c.jsxs)("div",{className:"w-full mb-16",children:[e?(0,c.jsx)(Ye.Text,{weight:"bold",className:"text-secondary",children:e}):null,t?(0,c.jsx)(ff.Heading,{fontSize:"3xl",children:t}):null]})}function Qu({handleSearchChange:e}){return(0,c.jsxs)("div",{className:"relative mb-5 w-full lg:w-1/4",children:[(0,c.jsx)(Yf.Input,{type:"text","aria-label":"Search, find any question you want to ask...",className:"w-full bg-white border rounded-global font-heading focus:border-gray-500 focus:outline-none",placeholder:"Search posts...",onChange:e}),(0,c.jsx)(de.Button,{as:"button",variant:"unstyled",ariaLabel:"Search button",className:"absolute right-0 top-0 h-full px-3 bg-white border-r rounded-global text-primary flex items-center",children:(0,c.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})})]})}function Bu({categories:e,activeTab:t,setActiveTab:r}){return(0,c.jsx)(If.Card,{className:"w-full px-3 mb-8 bg-white lg:mb-0 lg:w-1/4",borderRadius:"md",children:e&&(0,c.jsxs)(Q.default.Fragment,{children:[(0,c.jsx)(ff.Heading,{type:"h3",muted:!0,weight:"bold",className:"mb-4 text-base uppercase lg:text-base",children:"Topics"}),(0,c.jsxs)("ul",{children:[(e==null?void 0:e.length)>1&&(0,c.jsx)(pf,{activeTab:t,setActiveTab:r,category:"All"}),e==null?void 0:e.map((n,o)=>(0,c.jsx)(pf,{activeTab:t,setActiveTab:r,category:n},o))]})]})})}function pf({key:e,activeTab:t,setActiveTab:r,category:n}){return(0,c.jsx)("li",{children:(0,c.jsx)(de.Button,{as:"button",variant:"unstyled",ariaLabel:"Show all blog posts",className:`mb-4 block ${n?"block":"hidden"} px-3 py-2 hover:bg-secondary-foreground focus:outline-none w-full text-left rounded ${t===n?"font-bold text-primary focus:outline-none bg-secondary-foreground":null}`,onClick:()=>r(n),children:n})},e)}function qu({currentPosts:e,activeTab:t,blogsPerPage:r}){var n;return e?(0,c.jsx)("div",{className:"w-full px-3 lg:w-3/4",children:t==="All"?e==null?void 0:e.map((o,f)=>(0,c.jsx)(vf,{post:o},f)):(n=e==null?void 0:e.slice(0,r))==null?void 0:n.map((o,f)=>(0,c.jsx)(vf,{post:o},f))}):null}function vf({post:e}){var t,r,n,o;return e?(0,c.jsxs)(V.Flex,{wrap:!0,className:"mb-8 lg:mb-6 bg-white shadow rounded-lg",children:[(0,c.jsx)("div",{className:"w-full h-full mb-4 lg:mb-0 lg:w-1/4",children:(0,c.jsx)(uf.Image,{className:"object-cover w-full h-full overflow-hidden rounded",src:`${e==null?void 0:e.mainImage}`,sizes:"100vw",width:188,height:129,alt:(t=e==null?void 0:e.alt)!=null?t:`blog-variantD-image-${e==null?void 0:e.title}`})}),(0,c.jsxs)("div",{className:"w-full px-3 py-2 lg:w-3/4",children:[(e==null?void 0:e.title)&&(0,c.jsx)(mf.Link,{"aria-label":e==null?void 0:e.title,className:"mb-1 text-2xl font-bold hover:text-secondary font-heading",href:`/${(r=e==null?void 0:e.link)!=null?r:"page-not-added"}`,children:(e==null?void 0:e.title.length)>25?((n=e==null?void 0:e.title)==null?void 0:n.substring(0,25))+"...":e==null?void 0:e.title}),(0,c.jsxs)(V.Flex,{wrap:!0,align:"center",gap:1,className:"mb-2 text-sm",children:[e!=null&&e.authors?(o=e==null?void 0:e.authors)==null?void 0:o.map((f,u,{length:m})=>(0,c.jsxs)(V.Flex,{children:[(0,c.jsx)(Ye.Text,{className:"text-primary",children:f==null?void 0:f.name}),u+1!==m?(0,c.jsx)("span",{children:"\xA0,\xA0"}):null]},u)):null,e!=null&&e.publishedAt&&(e!=null&&e.authors)?(0,c.jsx)("span",{className:"mx-2 text-gray-500",children:"\u2022"}):null,e!=null&&e.publishedAt?(0,c.jsx)(Ye.Text,{muted:!0,children:P(new Date(e==null?void 0:e.publishedAt)," dd MMM, yyyy")}):null]}),e!=null&&e.excerpt?(0,c.jsx)(Ye.Text,{muted:!0,children:(e==null?void 0:e.excerpt.length)>60?(e==null?void 0:e.excerpt.substring(0,60))+"...":e==null?void 0:e.excerpt}):null]})]}):null}function ju({blogsPerPage:e,totalBlogs:t,paginate:r,currentPage:n}){if(!e)return null;let o=[];for(let f=1;f<=Math.ceil(t/e);f++)o.push(f);return(0,c.jsx)("nav",{className:"mt-4","aria-label":"Pagination",children:(0,c.jsx)("ul",{className:"flex space-x-2 justify-end mr-5",children:o.map(f=>(0,c.jsx)(de.Button,{variant:"unstyled",as:"button",ariaLabel:`Page ${f}`,className:`${n===f?"bg-secondary-foreground text-gray-500":"bg-white hover:bg-secondary-foreground hover:text-gray-500"} text-primary font-medium py-2 px-4 border border-primary rounded-global focus:outline-none`,onClick:()=>r(f),children:f},f))})})}var de,If,of,V,ff,uf,Yf,mf,cf,Ye,Q,c,Be=a(()=>{"use strict";de=require("@stackshift-ui/button"),If=require("@stackshift-ui/card"),Yf=require("@stackshift-ui/input");U();Q=Ke(require("react")),c=require("react/jsx-runtime")});var Vu={};B(Vu,{Blog:()=>_f,Blog_A:()=>We,Blog_B:()=>He,Blog_C:()=>Le,Blog_D:()=>Qe});module.exports=Rf(Vu);var ee=require("react"),Xu={variant_a:(0,ee.lazy)(()=>Promise.resolve().then(()=>(Fe(),lf))),variant_b:(0,ee.lazy)(()=>Promise.resolve().then(()=>($e(),Df))),variant_c:(0,ee.lazy)(()=>Promise.resolve().then(()=>(Re(),Sf))),variant_d:(0,ee.lazy)(()=>Promise.resolve().then(()=>(Be(),Pf)))},Uu="Blog",_f=({data:e})=>{var o,f,u,m,s,D,y,w,x;let t=e==null?void 0:e.variant,r=t&&Xu[t],n={subtitle:(f=(o=e==null?void 0:e.variants)==null?void 0:o.subtitle)!=null?f:void 0,title:(m=(u=e==null?void 0:e.variants)==null?void 0:u.title)!=null?m:void 0,posts:(y=((s=e==null?void 0:e.variants)==null?void 0:s.posts)||((D=e==null?void 0:e.variants)==null?void 0:D.blogPosts))!=null?y:void 0,primaryButton:(x=(w=e==null?void 0:e.variants)==null?void 0:w.primaryButton)!=null?x:void 0};return r?(0,c.jsx)(r,{...n}):null};_f.displayName=Uu;Fe();$e();Re();Be();0&&(module.exports={Blog,Blog_A,Blog_B,Blog_C,Blog_D});
|
|
2
|
+
"use strict";var Yt=Object.create;var X=Object.defineProperty;var It=Object.getOwnPropertyDescriptor;var Lt=Object.getOwnPropertyNames;var Et=Object.getPrototypeOf,At=Object.prototype.hasOwnProperty;var Bt=(e,t)=>{for(var r in t)X(e,r,{get:t[r],enumerable:!0})},Fe=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Lt(t))!At.call(e,a)&&a!==r&&X(e,a,{get:()=>t[a],enumerable:!(n=It(t,a))||n.enumerable});return e};var Ye=(e,t,r)=>(r=e!=null?Yt(Et(e)):{},Fe(t||!e||!e.__esModule?X(r,"default",{value:e,enumerable:!0}):r,e)),Ht=e=>Fe(X({},"__esModule",{value:!0}),e);var Vr={};Bt(Vr,{Blog:()=>Wt,Blog_A:()=>ee,Blog_B:()=>ae,Blog_C:()=>le,Blog_D:()=>ue});module.exports=Ht(Vr);var it=require("@stackshift-ui/button"),ot=require("@stackshift-ui/container"),E=require("@stackshift-ui/flex"),lt=require("@stackshift-ui/heading"),ct=require("@stackshift-ui/image"),be=require("@stackshift-ui/link"),ut=require("@stackshift-ui/section"),K=require("@stackshift-ui/text");var qt=Math.pow(10,8)*24*60*60*1e3,Gr=-qt,G=6048e5,Ie=864e5;var Rt=3600;var Le=Rt*24,pr=Le*7,_t=Le*365.2425,Qt=_t/12,Jr=Qt*3,se=Symbol.for("constructDateFrom");function N(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&se in e?e[se](t):e instanceof Date?new e.constructor(t):new Date(t)}function y(e,t){return N(t||e,e)}var $t={};function C(){return $t}function T(e,t){var l,d,b,x,w,g,v,P;let r=C(),n=(P=(v=(x=(b=t==null?void 0:t.weekStartsOn)!=null?b:(d=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:d.weekStartsOn)!=null?x:r.weekStartsOn)!=null?v:(g=(w=r.locale)==null?void 0:w.options)==null?void 0:g.weekStartsOn)!=null?P:0,a=y(e,t==null?void 0:t.in),i=a.getDay(),o=(i<n?7:0)+i-n;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function I(e,t){return T(e,{...t,weekStartsOn:1})}function p(e,t){let r=y(e,t==null?void 0:t.in),n=r.getFullYear(),a=N(r,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);let i=I(a),o=N(r,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);let l=I(o);return r.getTime()>=i.getTime()?n+1:r.getTime()>=l.getTime()?n:n-1}function de(e){let t=y(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Ee(e,...t){let r=N.bind(null,e||t.find(n=>typeof n=="object"));return t.map(r)}function fe(e,t){let r=y(e,t==null?void 0:t.in);return r.setHours(0,0,0,0),r}function Ae(e,t,r){let[n,a]=Ee(r==null?void 0:r.in,e,t),i=fe(n),o=fe(a),l=+i-de(i),d=+o-de(o);return Math.round((l-d)/Ie)}function Be(e,t){let r=p(e,t),n=N((t==null?void 0:t.in)||e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),I(n)}function He(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function qe(e){return!(!He(e)&&typeof e!="number"||isNaN(+y(e)))}function Re(e,t){let r=y(e,t==null?void 0:t.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}var jt={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"}},_e=(e,t,r)=>{let n,a=jt[e];return typeof a=="string"?n=a:t===1?n=a.one:n=a.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function J(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var zt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Vt={full:"h:mm:ss a zzzz",long:"h:mm:ss a K",medium:"h:mm:ss a",short:"h:mm a"},Xt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Qe={date:J({formats:zt,defaultWidth:"full"}),time:J({formats:Vt,defaultWidth:"full"}),dateTime:J({formats:Xt,defaultWidth:"full"})};var Gt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$e=(e,t,r,n)=>Gt[e];function B(e){return(t,r)=>{let n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&e.formattingValues){let o=e.defaultFormattingWidth||e.defaultWidth,l=r!=null&&r.width?String(r.width):o;a=e.formattingValues[l]||e.formattingValues[o]}else{let o=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[l]||e.values[o]}let i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}var pt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Jt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ut={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"]},Zt={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"]},Kt={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"}},er={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"}},tr=(e,t)=>{let r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},je={ordinalNumber:tr,era:B({values:pt,defaultWidth:"wide"}),quarter:B({values:Jt,defaultWidth:"wide",argumentCallback:e=>e-1}),month:B({values:Ut,defaultWidth:"wide"}),day:B({values:Zt,defaultWidth:"wide"}),dayPeriod:B({values:Kt,defaultWidth:"wide",formattingValues:er,defaultFormattingWidth:"wide"})};function H(e){return(t,r={})=>{let n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;let o=i[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(l)?nr(l,w=>w.test(o)):rr(l,w=>w.test(o)),b;b=e.valueCallback?e.valueCallback(d):d,b=r.valueCallback?r.valueCallback(b):b;let x=t.slice(o.length);return{value:b,rest:x}}}function rr(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function nr(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function ze(e){return(t,r={})=>{let n=t.match(e.matchPattern);if(!n)return null;let a=n[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;let l=t.slice(a.length);return{value:o,rest:l}}}var ar=/^(\d+)(th|st|nd|rd)?/i,ir=/\d+/i,or={narrow:/^(b|a)/i,abbreviated:/^(b\.?\m?m\.?|b\.?\m?m\.?\m?e\.?|a\.?\m?d\.?|m\.?\m?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},lr={any:[/^b/i,/^(a|m)/i]},cr={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ur={any:[/1/i,/2/i,/3/i,/4/i]},mr={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},sr={narrow:[/^E/i,/^m/i,/^m/i,/^a/i,/^m/i,/^E/i,/^E/i,/^a/i,/^m/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^m/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^m/i,/^o/i,/^n/i,/^d/i]},dr={narrow:/^[smtwf]/i,short:/^(su|mo|tu|lt|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},fr={narrow:[/^m/i,/^m/i,/^t/i,/^w/i,/^t/i,/^m/i,/^m/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^m/i,/^sa/i]},gr={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\m?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},hr={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}},Ve={ordinalNumber:ze({matchPattern:ar,parsePattern:ir,valueCallback:e=>parseInt(e,10)}),era:H({matchPatterns:or,defaultMatchWidth:"wide",parsePatterns:lr,defaultParseWidth:"any"}),quarter:H({matchPatterns:cr,defaultMatchWidth:"wide",parsePatterns:ur,defaultParseWidth:"any",valueCallback:e=>e+1}),month:H({matchPatterns:mr,defaultMatchWidth:"wide",parsePatterns:sr,defaultParseWidth:"any"}),day:H({matchPatterns:dr,defaultMatchWidth:"wide",parsePatterns:fr,defaultParseWidth:"any"}),dayPeriod:H({matchPatterns:gr,defaultMatchWidth:"any",parsePatterns:hr,defaultParseWidth:"any"})};var ge={code:"en-US",formatDistance:_e,formatLong:Qe,formatRelative:$e,localize:je,match:Ve,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Xe(e,t){let r=y(e,t==null?void 0:t.in);return Ae(r,Re(r))+1}function Ge(e,t){let r=y(e,t==null?void 0:t.in),n=+I(r)-+Be(r);return Math.round(n/G)+1}function U(e,t){var x,w,g,v,P,F,Y,A;let r=y(e,t==null?void 0:t.in),n=r.getFullYear(),a=C(),i=(A=(Y=(v=(g=t==null?void 0:t.firstWeekContainsDate)!=null?g:(w=(x=t==null?void 0:t.locale)==null?void 0:x.options)==null?void 0:w.firstWeekContainsDate)!=null?v:a.firstWeekContainsDate)!=null?Y:(F=(P=a.locale)==null?void 0:P.options)==null?void 0:F.firstWeekContainsDate)!=null?A:1,o=N((t==null?void 0:t.in)||e,0);o.setFullYear(n+1,0,i),o.setHours(0,0,0,0);let l=T(o,t),d=N((t==null?void 0:t.in)||e,0);d.setFullYear(n,0,i),d.setHours(0,0,0,0);let b=T(d,t);return+r>=+l?n+1:+r>=+b?n:n-1}function pe(e,t){var l,d,b,x,w,g,v,P;let r=C(),n=(P=(v=(x=(b=t==null?void 0:t.firstWeekContainsDate)!=null?b:(d=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:d.firstWeekContainsDate)!=null?x:r.firstWeekContainsDate)!=null?v:(g=(w=r.locale)==null?void 0:w.options)==null?void 0:g.firstWeekContainsDate)!=null?P:1,a=U(e,t),i=N((t==null?void 0:t.in)||e,0);return i.setFullYear(a,0,n),i.setHours(0,0,0,0),T(i,t)}function Je(e,t){let r=y(e,t==null?void 0:t.in),n=+T(r,t)-+pe(r,t);return Math.round(n/G)+1}function h(e,t){let r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}var D={y(e,t){let r=e.getFullYear(),n=r>0?r:1-r;return h(t==="yy"?n%100:n,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):h(r+1,2)},d(e,t){return h(e.getDate(),t.length)},a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return h(e.getHours()%12||12,t.length)},H(e,t){return h(e.getHours(),t.length)},m(e,t){return h(e.getMinutes(),t.length)},m(e,t){return h(e.getSeconds(),t.length)},S(e,t){let r=t.length,n=e.getMilliseconds(),a=Math.trunc(n*Math.pow(10,r-3));return h(a,t.length)}};var q={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},he={G:function(e,t,r){let n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let n=e.getFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return D.y(e,t)},Y:function(e,t,r,n){let a=U(e,n),i=a>0?a:1-a;if(t==="YY"){let o=i%100;return h(o,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):h(i,t.length)},R:function(e,t){let r=p(e);return h(r,t.length)},u:function(e,t){let r=e.getFullYear();return h(r,t.length)},K:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"K":return String(n);case"QQ":return h(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return h(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){let n=e.getMonth();switch(t){case"M":case"MM":return D.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){let n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return h(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){let a=Je(e,n);return t==="wo"?r.ordinalNumber(a,{unit:"week"}):h(a,t.length)},I:function(e,t,r){let n=Ge(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):h(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):D.d(e,t)},D:function(e,t,r){let n=Xe(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):h(n,t.length)},E:function(e,t,r){let n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){let a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return h(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},m:function(e,t,r,n){let a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"m":return String(i);case"cc":return h(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){let n=e.getDay(),a=n===0?7:n;switch(t){case"i":return String(a);case"ii":return h(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){let a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,r){let n=e.getHours(),a;switch(n===12?a=q.noon:n===0?a=q.midnight:a=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){let n=e.getHours(),a;switch(n>=17?a=q.evening:n>=12?a=q.afternoon:n>=4?a=q.morning:a=q.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return D.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):D.H(e,t)},K:function(e,t,r){let n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):h(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):h(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):D.m(e,t)},m:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):D.m(e,t)},S:function(e,t){return D.S(e,t)},X:function(e,t,r){let n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return Ze(n);case"XXXX":case"XX":return L(n);case"XXXXX":case"XXX":default:return L(n,":")}},x:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"x":return Ze(n);case"xxxx":case"xx":return L(n);case"xxxxx":case"xxx":default:return L(n,":")}},O:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ue(n,":");case"OOOO":default:return"GMT"+L(n,":")}},K:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"K":case"zz":case"zzz":return"GMT"+Ue(n,":");case"zzzz":default:return"GMT"+L(n,":")}},t:function(e,t,r){let n=Math.trunc(+e/1e3);return h(n,t.length)},T:function(e,t,r){return h(+e,t.length)}};function Ue(e,t=""){let r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),i=n%60;return i===0?r+String(a):r+String(a)+t+h(i,2)}function Ze(e,t){return e%60===0?(e>0?"-":"+")+h(Math.abs(e)/60,2):L(e,t)}function L(e,t=""){let r=e>0?"-":"+",n=Math.abs(e),a=h(Math.trunc(n/60),2),i=h(n%60,2);return r+a+t+i}var Ke=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},et=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},br=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return Ke(e,t);let i;switch(n){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Ke(n,t)).replace("{{time}}",et(a,t))},tt={p:et,P:br};var xr=/^D+$/,wr=/^Y+$/,yr=["D","DD","YY","YYYY"];function rt(e){return xr.test(e)}function nt(e){return wr.test(e)}function at(e,t,r){let n=vr(e,t,r);if(console.warn(n),yr.includes(e))throw new RangeError(n)}function vr(e,t,r){let n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var Pr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,kr=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Mr=/^'([^]*?)'?$/,Nr=/''/g,Or=/[a-zA-Z]/;function W(e,t,r){var x,w,g,v,P,F,Y,A,u,k,S,Ne,Oe,Se,Te,De,Ce,We;let n=C(),a=(w=(x=r==null?void 0:r.locale)!=null?x:n.locale)!=null?w:ge,i=(k=(u=(F=(P=r==null?void 0:r.firstWeekContainsDate)!=null?P:(v=(g=r==null?void 0:r.locale)==null?void 0:g.options)==null?void 0:v.firstWeekContainsDate)!=null?F:n.firstWeekContainsDate)!=null?u:(A=(Y=n.locale)==null?void 0:Y.options)==null?void 0:A.firstWeekContainsDate)!=null?k:1,o=(We=(Ce=(Se=(Oe=r==null?void 0:r.weekStartsOn)!=null?Oe:(Ne=(S=r==null?void 0:r.locale)==null?void 0:S.options)==null?void 0:Ne.weekStartsOn)!=null?Se:n.weekStartsOn)!=null?Ce:(De=(Te=n.locale)==null?void 0:Te.options)==null?void 0:De.weekStartsOn)!=null?We:0,l=y(e,r==null?void 0:r.in);if(!qe(l))throw new RangeError("Invalid time value");let d=t.match(kr).map(O=>{let M=O[0];if(M==="p"||M==="P"){let me=tt[M];return me(O,a.formatLong)}return O}).join("").match(Pr).map(O=>{if(O==="''")return{isToken:!1,value:"'"};let M=O[0];if(M==="'")return{isToken:!1,value:Sr(O)};if(he[M])return{isToken:!0,value:O};if(M.match(Or))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");return{isToken:!1,value:O}});a.localize.preprocessor&&(d=a.localize.preprocessor(l,d));let b={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return d.map(O=>{if(!O.isToken)return O.value;let M=O.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&nt(M)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&rt(M))&&at(M,t,String(e));let me=he[M[0]];return me(l,M,a.localize,b)}).join("")}function Sr(e){let t=e.match(Mr);return t?t[1].replace(Nr,"'"):e}var mt=require("@stackshift-ui/badge"),R=require("@stackshift-ui/card"),st=require("@stackshift-ui/system"),m=require("react/jsx-runtime");function ee({subtitle:e,title:t,posts:r,primaryButton:n}){return(0,m.jsx)(ut.Section,{className:"py-20 bg-background",children:(0,m.jsxs)(ot.Container,{maxWidth:1280,children:[(0,m.jsx)(Tr,{subtitle:e,title:t}),(0,m.jsx)(Dr,{posts:r}),(0,m.jsx)(Cr,{primaryButton:n})]})})}function Tr({subtitle:e,title:t}){return(0,m.jsxs)("div",{className:"mb-16 text-center",children:[e?(0,m.jsx)(K.Text,{weight:"bold",className:"text-secondary",children:e}):null,t?(0,m.jsx)(lt.Heading,{fontSize:"3xl",children:t}):null]})}function Dr({posts:e}){var n,a,i,o;if(!e)return null;let t=6,r=0;return(0,m.jsxs)(E.Flex,{gap:4,className:"flex-col lg:flex-row",children:[(0,m.jsxs)("div",{className:"w-full space-y-5 lg:w-1/2",children:[(n=e==null?void 0:e.slice(r,r+1))==null?void 0:n.map((l,d)=>(0,m.jsx)(Z,{post:l},d)),(0,m.jsx)(E.Flex,{gap:4,className:"flex-col lg:flex-row",children:(a=e==null?void 0:e.slice(r+1,r+3))==null?void 0:a.map((l,d)=>(0,m.jsx)(Z,{post:l},d))})]}),(0,m.jsxs)("div",{className:"w-full space-y-5 lg:w-1/2",children:[(0,m.jsx)(E.Flex,{gap:4,className:"flex-col lg:flex-row",children:(i=e==null?void 0:e.slice(r+3,r+5))==null?void 0:i.map((l,d)=>(0,m.jsx)(Z,{post:l},d))}),(o=e==null?void 0:e.slice(r+5,t))==null?void 0:o.map((l,d)=>(0,m.jsx)(Z,{post:l},d))]})]})}function Z({post:e,key:t}){var r,n,a;return(0,m.jsxs)(R.Card,{className:"relative w-full h-64 rounded",children:[e!=null&&e.mainImage?(0,m.jsx)(ct.Image,{className:"relative object-cover w-full h-full overflow-hidden rounded-md",src:`${e==null?void 0:e.mainImage}`,alt:(r=e==null?void 0:e.alt)!=null?r:`blog-variantA-image-${t}`,sizes:"(min-width: 1540px) 740px, (min-width: 1280px) 612px, (min-width: 1040px) 484px, (min-width: 780px) 736px, (min-width: 680px) 608px, calc(94.44vw - 15px)"}):null,(0,m.jsx)("div",{className:"absolute inset-0 bg-gray-900 rounded-md opacity-75"}),(0,m.jsxs)(R.CardContent,{className:"absolute inset-0 flex flex-col items-start p-6",children:[e!=null&&e.categories?(0,m.jsx)(E.Flex,{gap:2,className:"absolute left-5 top-5",children:(n=e==null?void 0:e.categories)==null?void 0:n.map((i,o)=>(0,m.jsx)(mt.Badge,{children:i==null?void 0:i.title},o))}):null,(0,m.jsxs)(E.Flex,{align:"center",className:"mt-auto",children:[(0,m.jsx)("span",{className:"mt-auto text-sm text-gray-300",children:e!=null&&e.publishedAt?W(new Date(e==null?void 0:e.publishedAt),"dd MMM, yyyy"):""}),(e==null?void 0:e.authors)&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{className:"mx-2 w-1 h-1 bg-gray-300 rounded-full"}),(0,m.jsx)(E.Flex,{className:"mt-auto text-sm text-gray-300",children:(a=e==null?void 0:e.authors)==null?void 0:a.map((i,o,{length:l})=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(K.Text,{className:"italic",fontSize:"sm",children:i==null?void 0:i.name}),o+1!==l?(0,m.jsx)("span",{children:"\xA0,\xA0"}):null]}))})]})]}),e!=null&&e.title?(0,m.jsx)(R.CardTitle,{className:"text-lg font-bold text-white transform hover:text-secondary motion-reduce:transform-none",children:(0,m.jsx)(be.Link,{href:`/${e==null?void 0:e.link}`,className:"line-clamp-2",children:e==null?void 0:e.title})}):null,(e==null?void 0:e.excerpt)&&(0,m.jsx)(K.Text,{className:"text-white/70 line-clamp-2",fontSize:"sm",children:e==null?void 0:e.excerpt})]})]})}function Cr({primaryButton:e}){if(!(e!=null&&e.label))return null;let t=(0,st.buildSanityLink)(e);return(0,m.jsx)("div",{className:"text-center mt-10",children:(0,m.jsx)(it.Button,{"aria-label":e==null?void 0:e.label,asChild:!0,children:(0,m.jsx)(be.Link,{href:t.href,target:t.target,rel:t.rel,"aria-label":e==null?void 0:e.label,children:e==null?void 0:e.label})})})}var te=Ye(require("react")),re=e=>{let[t,r]=te.default.useState(!1),n=te.default.useCallback(a=>{a.matches?r(!0):r(!1)},[]);return te.default.useEffect(()=>{let a=window.matchMedia(`(max-width: ${e}px)`);return a.addEventListener("change",n),a.matches&&r(!0),()=>a.removeEventListener("change",n)},[]),t};function ae({subtitle:e,title:t,posts:r,primaryButton:n}){return(0,m.jsx)(ut.Section,{className:"py-20 bg-background",children:(0,m.jsxs)(ot.Container,{maxWidth:1280,children:[(0,m.jsx)(Wr,{subtitle:e,title:t}),(0,m.jsx)(Fr,{posts:r,count:0,blogsPerPage:5}),(0,m.jsx)(Ir,{primaryButton:n})]})})}function Wr({subtitle:e,title:t}){return(0,m.jsxs)("div",{className:"w-full mb-16 text-center",children:[e?(0,m.jsx)($.Text,{weight:"bold",className:"text-secondary",children:e}):null,t?(0,m.jsx)(lt.Heading,{fontSize:"3xl",children:t}):null]})}function Fr({posts:e,count:t,blogsPerPage:r}){return(0,m.jsxs)(E.Flex,{wrap:!0,justify:"center",className:"mb-16",gap:4,children:[(0,m.jsx)("div",{className:"w-full lg:w-[40%]",children:e==null?void 0:e.slice(t,t+1).map((n,a)=>(0,m.jsx)(dt,{size:"lg",post:n},a))}),(0,m.jsx)(E.Flex,{wrap:!0,className:"w-full lg:w-[50%]",gap:4,children:e==null?void 0:e.slice(t+1,r).map((n,a)=>(0,m.jsx)("div",{className:"w-full lg:basis-[45%]",children:(0,m.jsx)(dt,{post:n,size:"sm"},a)},a))})]})}function dt({post:e,size:t,key:r}){var a;let n=re("1024");return(0,m.jsxs)(R.Card,{className:"overflow-hidden rounded-md shadow",children:[e!=null&&e.mainImage?(0,m.jsx)(Yr,{post:e,size:t,breakpoints:n},r):null,(0,m.jsxs)(E.Flex,{direction:"col",className:"bg-white justify-between",style:{height:"295px"},children:[(0,m.jsxs)(R.CardContent,{className:"p-4",children:[e!=null&&e.publishedAt?(0,m.jsx)($.Text,{muted:!0,className:"text-sm",children:W(new Date(e.publishedAt)," dd MMM, yyyy")}):null,e!=null&&e.title?(0,m.jsx)(lt.Heading,{type:"h4",className:"line-clamp-3 !text-2xl",children:e.title}):null,(e==null?void 0:e.authors)&&(0,m.jsx)(E.Flex,{className:"mt-auto text-sm text-gray-500",children:(a=e==null?void 0:e.authors)==null?void 0:a.map((i,o,{length:l})=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)($.Text,{className:"italic",fontSize:"sm",children:i==null?void 0:i.name}),o+1!==l?(0,m.jsx)("span",{children:"\xA0,\xA0"}):null]}))}),e!=null&&e.excerpt?(0,m.jsx)($.Text,{muted:!0,className:"my-2 text-justify line-clamp-3",children:e.excerpt}):null]}),e!=null&&e.link?(0,m.jsx)(be.Link,{"aria-label":"View Blog Post",className:"font-bold text-primary hover:text-secondary px-4 pb-4",href:`/${e==null?void 0:e.link}`,children:"View Blog Post"}):null]})]})}function Yr({post:e,size:t,breakpoints:r,key:n}){var a;return r?(0,m.jsx)(ct.Image,{className:"object-cover w-full overflow-hidden",src:`${e.mainImage}`,sizes:"100vw",style:{width:"100%",height:"auto",objectFit:"cover"},width:271,height:248,alt:(a=e==null?void 0:e.mainImage)!=null?a:`blog-variantB-image-${n}`}):(0,m.jsx)("div",{className:`${t==="lg"?"h-[44.5rem]":"h-[12.5rem]"}`,children:(0,m.jsx)(ct.Image,{className:"object-cover w-full overflow-hidden rounded-t-md",src:`${e.mainImage}`,sizes:"100vw",style:{width:"100%",height:"100%",objectFit:"cover"},width:271,height:248,alt:`blog-variantB-image-${e.title}`})})}function Ir({primaryButton:e}){if(!(e!=null&&e.label))return null;let t=(0,st.buildSanityLink)(e);return(0,m.jsx)("div",{className:"text-center",children:(0,m.jsx)(it.Button,{"aria-label":e==null?void 0:e.label,asChild:!0,children:(0,m.jsx)(be.Link,{href:t.href,target:t.target,rel:t.rel,"aria-label":e==null?void 0:e.label,children:e==null?void 0:e.label})})})}function le({subtitle:e,title:t,posts:r,primaryButton:n}){return(0,m.jsx)(ut.Section,{className:"py-20 bg-background",children:(0,m.jsxs)(ot.Container,{maxWidth:1280,children:[(0,m.jsxs)(E.Flex,{align:"center",justify:"between",className:"flex-col mb-16 md:flex-row",gap:5,children:[(0,m.jsx)(Lr,{subtitle:e,title:t}),(0,m.jsx)(Br,{primaryButton:n})]}),(0,m.jsx)(Er,{posts:r,blogsPerPage:3})]})})}function Lr({subtitle:e,title:t}){return(0,m.jsxs)("div",{className:"flex flex-col gap-3 text-center md:text-left",children:[e?(0,m.jsx)(K.Text,{weight:"bold",className:"text-primary",children:e}):null,t?(0,m.jsx)(lt.Heading,{fontSize:"3xl",children:t}):null]})}function Er({posts:e,blogsPerPage:t}){var r;return e?(0,m.jsx)("div",{children:(r=e==null?void 0:e.slice(0,t))==null?void 0:r.map((n,a)=>(0,m.jsx)("div",{className:"flex flex-wrap mb-8 overflow-hidden rounded-md shadow",children:(0,m.jsx)(Ar,{post:n,className:`${a%2===0?"flex-row":"flex-row-reverse"}`},a)},a))}):null}function Ar({post:e,className:t,key:r}){var i,o,l,d,b,x,w;let a=re("1100")?70:200;return(0,m.jsxs)(R.Card,{className:`flex flex-wrap bg-white overflow-hidden rounded-lg shadow w-full ${t}`,children:[(e==null?void 0:e.mainImage)&&(0,m.jsx)(ct.Image,{className:"object-cover w-full h-auto rounded-l lg:w-1/2",src:`${e==null?void 0:e.mainImage}`,sizes:"100vw",width:554,height:416,alt:(i=e==null?void 0:e.alt)!=null?i:`blog-variantC-image-${r}`}),(0,m.jsxs)(R.CardContent,{className:"w-full px-6 py-6 rounded-r lg:w-1/2 lg:pt-10",children:[(0,m.jsxs)(E.Flex,{className:"flex-col sm:flex-row sm:items-center gap-3",children:[(e==null?void 0:e.categories)&&((o=e==null?void 0:e.categories)==null?void 0:o.map((g,v)=>(0,m.jsx)(mt.Badge,{className:"bg-secondary rounded-global w-fit",children:g==null?void 0:g.title},v))),(e==null?void 0:e.publishedAt)&&(0,m.jsx)(K.Text,{muted:!0,className:"m-1",children:W(new Date(e==null?void 0:e.publishedAt)," dd MMM, yyyy")})]}),(e==null?void 0:e.title)&&(0,m.jsx)(lt.Heading,{className:"my-4 text-xl lg:text-3xl",children:((l=e==null?void 0:e.title)==null?void 0:l.length)>40?((d=e==null?void 0:e.title)==null?void 0:d.substring(0,40))+"...":e==null?void 0:e.title}),(e==null?void 0:e.authors)&&(0,m.jsxs)(E.Flex,{wrap:!0,className:"mb-10",children:[(0,m.jsx)("span",{className:"italic text-primary",children:"By\xA0"}),(b=e==null?void 0:e.authors)==null?void 0:b.map((g,v,{length:P})=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(K.Text,{className:"italic text-primary",children:g==null?void 0:g.name}),v+1!==P?(0,m.jsx)("span",{children:"\xA0,\xA0"}):null]}))]}),(e==null?void 0:e.excerpt)&&(0,m.jsx)(K.Text,{muted:!0,className:"mb-6 leading-loose lg:text-justify",children:((x=e==null?void 0:e.excerpt)==null?void 0:x.length)>a?((w=e==null?void 0:e.excerpt)==null?void 0:w.substring(0,a))+"...":e==null?void 0:e.excerpt}),(e==null?void 0:e.link)&&(0,m.jsx)(be.Link,{"aria-label":"View Blog Post",className:"font-bold text-primary hover:text-secondary",href:`/${e==null?void 0:e.link}`,children:"View Blog Post"})]})]})}function Br({primaryButton:e}){if(!(e!=null&&e.label))return null;let t=(0,st.buildSanityLink)(e);return(0,m.jsx)("div",{className:"text-center",children:(0,m.jsx)(it.Button,{"aria-label":e==null?void 0:e.label,asChild:!0,children:(0,m.jsx)(be.Link,{href:t.href,target:t.target,rel:t.rel,"aria-label":e==null?void 0:e.label,children:e==null?void 0:e.label})})})}var Tt=require("@stackshift-ui/input");var _=Ye(require("react"));function ue({subtitle:e,title:t,posts:r}){let[n,a]=_.default.useState("All"),[i,o]=_.default.useState(1),[l,d]=_.default.useState(""),b=6;_.default.useEffect(()=>{o(1)},[n]);let x=(r!=null?r:[]).flatMap(u=>{var k;return((k=u==null?void 0:u.categories)!=null?k:[]).map(S=>({category:S==null?void 0:S.title,title:u==null?void 0:u.title,slug:u==null?void 0:u.slug,excerpt:u==null?void 0:u.excerpt,publishedAt:u==null?void 0:u.publishedAt,mainImage:u==null?void 0:u.mainImage,authors:u==null?void 0:u.authors}))}),w=x==null?void 0:x.reduce((u,k)=>{let S=k==null?void 0:k.category;return u.indexOf(S)===-1&&u.push(S),u},[]),g=n==="All"?r==null?void 0:r.filter(u=>{var k;return(k=u==null?void 0:u.title)==null?void 0:k.toLowerCase().includes(l.toLowerCase())}):x.filter(u=>{var k;return(u==null?void 0:u.category)===n&&((k=u==null?void 0:u.title)==null?void 0:k.toLowerCase().includes(l.toLowerCase()))}),v=i*b,P=v-b,F=g==null?void 0:g.slice(P,v),Y=u=>o(u);return(0,m.jsx)(ut.Section,{className:"py-20 bg-background",children:(0,m.jsxs)(ot.Container,{maxWidth:1280,children:[(0,m.jsx)(qr,{subtitle:e,title:t}),(0,m.jsx)(Rr,{handleSearchChange:u=>{d(u.target.value),a("All"),o(1)}}),(0,m.jsxs)(E.Flex,{wrap:!0,children:[(0,m.jsx)(_r,{categories:w,activeTab:n,setActiveTab:a}),(g==null?void 0:g.length)===0?(0,m.jsx)(Hr,{}):(0,m.jsx)(Qr,{currentPosts:F,activeTab:n,blogsPerPage:b})]}),(0,m.jsx)($r,{blogsPerPage:b,totalBlogs:g==null?void 0:g.length,paginate:Y,currentPage:i})]})})}function Hr({message:e="No post available."}){return(0,m.jsx)(K.Text,{className:"w-full px-3 lg:w-3/4 font-medium text-lg",children:e})}function qr({subtitle:e,title:t}){return(0,m.jsxs)("div",{className:"w-full mb-16",children:[e?(0,m.jsx)(K.Text,{weight:"bold",className:"text-secondary",children:e}):null,t?(0,m.jsx)(lt.Heading,{fontSize:"3xl",children:t}):null]})}function Rr({handleSearchChange:e}){return(0,m.jsxs)("div",{className:"relative mb-5 w-full lg:w-1/4",children:[(0,m.jsx)(Tt.Input,{type:"text","aria-label":"Search, find any question you want to ask...",className:"w-full bg-white border rounded-global font-heading focus:border-gray-500 focus:outline-none",placeholder:"Search posts...",onChange:e}),(0,m.jsx)(it.Button,{variant:"unstyled","aria-label":"Search button",className:"absolute right-0 top-0 h-full px-3 border-r rounded-global text-primary flex items-center",children:(0,m.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,m.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})})]})}function _r({categories:e,activeTab:t,setActiveTab:r}){return(0,m.jsx)(R.Card,{className:"w-full p-3 mb-8 bg-white lg:mb-0 lg:w-1/4 rounded-md",children:e&&(0,m.jsxs)(_.default.Fragment,{children:[(0,m.jsx)(lt.Heading,{type:"h3",muted:!0,weight:"bold",className:"mb-4 text-base uppercase lg:text-base",children:"Topics"}),(0,m.jsxs)("ul",{children:[(e==null?void 0:e.length)>1&&(0,m.jsx)(Mt,{activeTab:t,setActiveTab:r,category:"All"}),e==null?void 0:e.map((n,a)=>(0,m.jsx)(Mt,{activeTab:t,setActiveTab:r,category:n},a))]})]})})}function Mt({key:e,activeTab:t,setActiveTab:r,category:n}){return(0,m.jsx)("li",{children:(0,m.jsx)(it.Button,{variant:"unstyled","aria-label":"Show all blog posts",className:`mb-4 block ${n?"block":"hidden"} px-3 py-2 hover:bg-secondary-foreground focus:outline-none w-full text-left rounded ${t===n?"font-bold text-primary focus:outline-none bg-secondary-foreground":null}`,onClick:()=>r(n),children:n})},e)}function Qr({currentPosts:e,activeTab:t,blogsPerPage:r}){var n;return e?(0,m.jsx)("div",{className:"w-full px-3 lg:w-3/4",children:t==="All"?e==null?void 0:e.map((a,i)=>(0,m.jsx)(Nt,{post:a},i)):(n=e==null?void 0:e.slice(0,r))==null?void 0:n.map((a,i)=>(0,m.jsx)(Nt,{post:a},i))}):null}function Nt({post:e}){var t,r,n;return e?(0,m.jsxs)(R.Card,{className:"flex flex-wrap mb-8 lg:mb-6 bg-white shadow rounded-lg",children:[(0,m.jsx)("div",{className:"w-full h-full mb-4 lg:mb-0 lg:w-1/4",children:(0,m.jsx)(ct.Image,{className:"object-cover w-full h-full overflow-hidden rounded-l",src:`${e==null?void 0:e.mainImage}`,sizes:"100vw",width:188,height:129,alt:(t=e==null?void 0:e.alt)!=null?t:`blog-variantD-image-${e==null?void 0:e.title}`})}),(0,m.jsxs)(R.CardContent,{className:"w-full px-3 py-2 lg:w-3/4",children:[e!=null&&e.publishedAt?(0,m.jsx)(K.Text,{muted:!0,children:W(new Date(e==null?void 0:e.publishedAt)," dd MMM, yyyy")}):null,(e==null?void 0:e.title)&&(0,m.jsx)(be.Link,{"aria-label":e==null?void 0:e.title,className:"mb-1 text-2xl font-bold hover:text-secondary font-heading line-clamp-3 sm:line-clamp-1",href:`/${(r=e==null?void 0:e.link)!=null?r:"page-not-added"}`,children:e==null?void 0:e.title}),e!=null&&e.authors?(0,m.jsx)(E.Flex,{align:"center",children:(n=e==null?void 0:e.authors)==null?void 0:n.map((a,i,{length:o})=>(0,m.jsxs)(K.Text,{className:"text-primary",children:[a==null?void 0:a.name,i+1!==o?(0,m.jsx)("span",{children:"\xA0,\xA0"}):null]}))}):null,e!=null&&e.excerpt?(0,m.jsx)(K.Text,{muted:!0,className:"line-clamp-6 sm:line-clamp-3",children:e==null?void 0:e.excerpt}):null]})]}):null}function $r({blogsPerPage:e,totalBlogs:t,paginate:r,currentPage:n}){if(!e)return null;let a=[];for(let i=1;i<=Math.ceil(t/e);i++)a.push(i);return(0,m.jsx)("nav",{className:"mt-4","aria-label":"Pagination",children:(0,m.jsx)("ul",{className:"flex space-x-2 justify-end mr-5",children:a.map(i=>(0,m.jsx)(it.Button,{variant:"unstyled","aria-label":`Page ${i}`,className:`${n===i?"bg-secondary-foreground text-gray-500":"bg-white hover:bg-secondary-foreground hover:text-gray-500"} text-primary font-medium py-2 px-4 border border-primary rounded-global focus:outline-none`,onClick:()=>r(i),children:i},i))})})}var jr={variant_a:ee,variant_b:ae,variant_c:le,variant_d:ue},zr="Blog",Wt=({data:e})=>{var a,i,o,l,d,b,x,w,g;let t=e==null?void 0:e.variant,r=t&&jr[t],n={subtitle:(i=(a=e==null?void 0:e.variants)==null?void 0:a.subtitle)!=null?i:void 0,title:(l=(o=e==null?void 0:e.variants)==null?void 0:o.title)!=null?l:void 0,posts:(x=((d=e==null?void 0:e.variants)==null?void 0:d.posts)||((b=e==null?void 0:e.variants)==null?void 0:b.blogPosts))!=null?x:void 0,primaryButton:(g=(w=e==null?void 0:e.variants)==null?void 0:w.primaryButton)!=null?g:void 0};return r?(0,m.jsx)(r,{...n}):null};Wt.displayName=zr;0&&(module.exports={Blog,Blog_A,Blog_B,Blog_C,Blog_D});
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a as f}from"./chunk-
|
|
2
|
+
"use strict";import{a as f}from"./chunk-YTGYR6N2.mjs";import{a as o}from"./chunk-LMUKVTZM.mjs";import{a as r}from"./chunk-YZPBCGXG.mjs";import{a as e}from"./chunk-HYWHEEUI.mjs";import"./chunk-TMLYY2AQ.mjs";import{a as t}from"./chunk-F5644BXY.mjs";import"./chunk-PC6NMI3O.mjs";export{f as Blog,o as Blog_A,r as Blog_B,e as Blog_C,t as Blog_D};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/blog",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "7.0.0-beta.
|
|
4
|
+
"version": "7.0.0-beta.10",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -30,27 +30,27 @@
|
|
|
30
30
|
"typescript": "^5.6.2",
|
|
31
31
|
"vite-tsconfig-paths": "^5.0.1",
|
|
32
32
|
"vitest": "^2.1.1",
|
|
33
|
-
"@stackshift-ui/
|
|
34
|
-
"@stackshift-ui/
|
|
33
|
+
"@stackshift-ui/typescript-config": "6.0.10",
|
|
34
|
+
"@stackshift-ui/eslint-config": "6.0.10"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"classnames": "^2.5.1",
|
|
38
|
-
"@stackshift-ui/button": "
|
|
39
|
-
"@stackshift-ui/
|
|
40
|
-
"@stackshift-ui/
|
|
41
|
-
"@stackshift-ui/
|
|
42
|
-
"@stackshift-ui/
|
|
43
|
-
"@stackshift-ui/
|
|
44
|
-
"@stackshift-ui/
|
|
45
|
-
"@stackshift-ui/
|
|
46
|
-
"@stackshift-ui/
|
|
47
|
-
"@stackshift-ui/
|
|
48
|
-
"@stackshift-ui/
|
|
49
|
-
"@stackshift-ui/
|
|
50
|
-
"@stackshift-ui/
|
|
38
|
+
"@stackshift-ui/button": "7.0.0-beta.9",
|
|
39
|
+
"@stackshift-ui/flex": "7.0.0-beta.7",
|
|
40
|
+
"@stackshift-ui/image": "7.0.0-beta.8",
|
|
41
|
+
"@stackshift-ui/input": "7.0.0-beta.7",
|
|
42
|
+
"@stackshift-ui/section": "7.0.0-beta.7",
|
|
43
|
+
"@stackshift-ui/link": "7.0.0-beta.7",
|
|
44
|
+
"@stackshift-ui/heading": "7.0.0-beta.7",
|
|
45
|
+
"@stackshift-ui/scripts": "7.0.0-beta.6",
|
|
46
|
+
"@stackshift-ui/system": "7.0.0-beta.7",
|
|
47
|
+
"@stackshift-ui/text": "7.0.0-beta.7",
|
|
48
|
+
"@stackshift-ui/container": "7.0.0-beta.7",
|
|
49
|
+
"@stackshift-ui/card": "7.0.0-beta.7",
|
|
50
|
+
"@stackshift-ui/badge": "7.0.0-beta.7"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@stackshift-ui/system": ">=
|
|
53
|
+
"@stackshift-ui/system": ">=7.0.0-beta.7",
|
|
54
54
|
"@types/react": "16.8 - 19",
|
|
55
55
|
"next": "10 - 14",
|
|
56
56
|
"react": "16.8 - 19",
|
package/src/blog.tsx
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { BlogPost, LabeledRoute, SectionsProps } from "./types";
|
|
3
|
+
import BlogA from "./blog_a";
|
|
4
|
+
import BlogB from "./blog_b";
|
|
5
|
+
import BlogC from "./blog_c";
|
|
6
|
+
import BlogD from "./blog_d";
|
|
3
7
|
|
|
4
8
|
const Variants = {
|
|
5
|
-
variant_a:
|
|
6
|
-
variant_b:
|
|
7
|
-
variant_c:
|
|
8
|
-
variant_d:
|
|
9
|
+
variant_a: BlogA,
|
|
10
|
+
variant_b: BlogB,
|
|
11
|
+
variant_c: BlogC,
|
|
12
|
+
variant_d: BlogD,
|
|
9
13
|
};
|
|
10
14
|
|
|
11
15
|
export interface BlogProps {
|
package/src/blog_a.tsx
CHANGED
|
@@ -48,23 +48,25 @@ function BlogPosts({ posts }: { posts?: BlogPost[] }) {
|
|
|
48
48
|
return (
|
|
49
49
|
<Flex gap={4} className="flex-col lg:flex-row">
|
|
50
50
|
<div className="w-full space-y-5 lg:w-1/2">
|
|
51
|
-
{posts?.slice(count, count + 1)?.map((post, key) =>
|
|
51
|
+
{posts?.slice(count, count + 1)?.map((post, key) => (
|
|
52
|
+
<BlogItem post={post} key={key} />
|
|
53
|
+
))}
|
|
52
54
|
<Flex gap={4} className="flex-col lg:flex-row">
|
|
53
|
-
{posts
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
{posts?.slice(count + 1, count + 3)?.map((post, key) => (
|
|
56
|
+
<BlogItem post={post} key={key} />
|
|
57
|
+
))}
|
|
56
58
|
</Flex>
|
|
57
59
|
</div>
|
|
58
60
|
|
|
59
61
|
<div className="w-full space-y-5 lg:w-1/2">
|
|
60
62
|
<Flex gap={4} className="flex-col lg:flex-row">
|
|
61
|
-
{posts
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
{posts?.slice(count + 3, count + 5)?.map((post, key) => (
|
|
64
|
+
<BlogItem post={post} key={key} />
|
|
65
|
+
))}
|
|
64
66
|
</Flex>
|
|
65
|
-
{posts
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
{posts?.slice(count + 5, blogsPerPage)?.map((post, key) => (
|
|
68
|
+
<BlogItem post={post} key={key} />
|
|
69
|
+
))}
|
|
68
70
|
</div>
|
|
69
71
|
</Flex>
|
|
70
72
|
);
|
|
@@ -94,14 +96,14 @@ function BlogItem({ post, key }: { post?: BlogPost; key: number }) {
|
|
|
94
96
|
) : null}
|
|
95
97
|
|
|
96
98
|
<Flex align="center" className="mt-auto">
|
|
97
|
-
<span className="mt-auto text-sm text-gray-
|
|
99
|
+
<span className="mt-auto text-sm text-gray-300">
|
|
98
100
|
{post?.publishedAt ? format(new Date(post?.publishedAt), "dd MMM, yyyy") : ""}
|
|
99
101
|
</span>
|
|
100
102
|
|
|
101
103
|
{post?.authors && (
|
|
102
104
|
<>
|
|
103
|
-
<span className="mx-2 w-1 h-1 bg-gray-
|
|
104
|
-
<Flex className="mt-auto text-sm text-gray-
|
|
105
|
+
<span className="mx-2 w-1 h-1 bg-gray-300 rounded-full" />
|
|
106
|
+
<Flex className="mt-auto text-sm text-gray-300">
|
|
105
107
|
{post?.authors?.map((author, index, { length }) => (
|
|
106
108
|
<>
|
|
107
109
|
<Text className="italic" fontSize="sm">
|
|
@@ -116,12 +118,17 @@ function BlogItem({ post, key }: { post?: BlogPost; key: number }) {
|
|
|
116
118
|
</Flex>
|
|
117
119
|
|
|
118
120
|
{post?.title ? (
|
|
119
|
-
<CardTitle className="text-lg font-bold text-white transform hover:
|
|
120
|
-
<Link href={`/${post?.link}`}>
|
|
121
|
-
{post?.title
|
|
121
|
+
<CardTitle className="text-lg font-bold text-white transform hover:text-secondary motion-reduce:transform-none">
|
|
122
|
+
<Link href={`/${post?.link}`} className="line-clamp-2">
|
|
123
|
+
{post?.title}
|
|
122
124
|
</Link>
|
|
123
125
|
</CardTitle>
|
|
124
126
|
) : null}
|
|
127
|
+
{post?.excerpt && (
|
|
128
|
+
<Text className="text-white/70 line-clamp-2" fontSize="sm">
|
|
129
|
+
{post?.excerpt}
|
|
130
|
+
</Text>
|
|
131
|
+
)}
|
|
125
132
|
</CardContent>
|
|
126
133
|
</Card>
|
|
127
134
|
);
|
|
@@ -130,11 +137,7 @@ function BlogItem({ post, key }: { post?: BlogPost; key: number }) {
|
|
|
130
137
|
function PrimaryButton({ primaryButton }: { primaryButton?: LabeledRoute }) {
|
|
131
138
|
if (!primaryButton?.label) return null;
|
|
132
139
|
|
|
133
|
-
const link = buildSanityLink(
|
|
134
|
-
type: primaryButton?.type ?? "",
|
|
135
|
-
internalLink: primaryButton?.internalLink ?? "",
|
|
136
|
-
externalLink: primaryButton?.externalLink ?? "",
|
|
137
|
-
});
|
|
140
|
+
const link = buildSanityLink(primaryButton);
|
|
138
141
|
|
|
139
142
|
return (
|
|
140
143
|
<div className="text-center mt-10">
|
package/src/blog_b.tsx
CHANGED
|
@@ -52,12 +52,12 @@ function BlogPosts({
|
|
|
52
52
|
}) {
|
|
53
53
|
return (
|
|
54
54
|
<Flex wrap justify="center" className="mb-16" gap={4}>
|
|
55
|
-
<div className="w-full lg:w-[
|
|
55
|
+
<div className="w-full lg:w-[40%]">
|
|
56
56
|
{posts
|
|
57
57
|
?.slice(count, count + 1)
|
|
58
58
|
.map((post, key) => <BlogItem size="lg" post={post} key={key} />)}
|
|
59
59
|
</div>
|
|
60
|
-
<Flex wrap className="w-full lg:w-[
|
|
60
|
+
<Flex wrap className="w-full lg:w-[50%]" gap={4}>
|
|
61
61
|
{posts?.slice(count + 1, blogsPerPage).map((post, key) => (
|
|
62
62
|
<div className="w-full lg:basis-[45%]" key={key}>
|
|
63
63
|
<BlogItem post={post} size="sm" key={key} />
|
|
@@ -78,36 +78,30 @@ function BlogItem({ post, size, key }: { post: BlogPost; size?: string; key: num
|
|
|
78
78
|
) : null}
|
|
79
79
|
<Flex direction="col" className="bg-white justify-between" style={{ height: "295px" }}>
|
|
80
80
|
<CardContent className="p-4">
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
) : null}
|
|
87
|
-
{post?.authors && (
|
|
88
|
-
<>
|
|
89
|
-
<span className="mx-2 w-1 h-1 bg-gray-500 rounded-full" />
|
|
90
|
-
<Flex className="mt-auto text-sm text-gray-500">
|
|
91
|
-
{post?.authors?.map((author, index, { length }) => (
|
|
92
|
-
<>
|
|
93
|
-
<Text className="italic" fontSize="sm">
|
|
94
|
-
{author?.name}
|
|
95
|
-
</Text>
|
|
96
|
-
{index + 1 !== length ? <span> , </span> : null}
|
|
97
|
-
</>
|
|
98
|
-
))}
|
|
99
|
-
</Flex>
|
|
100
|
-
</>
|
|
101
|
-
)}
|
|
102
|
-
</Flex>
|
|
103
|
-
|
|
81
|
+
{post?.publishedAt ? (
|
|
82
|
+
<Text muted className="text-sm">
|
|
83
|
+
{format(new Date(post.publishedAt), " dd MMM, yyyy")}
|
|
84
|
+
</Text>
|
|
85
|
+
) : null}
|
|
104
86
|
{post?.title ? (
|
|
105
|
-
<Heading type="h4" className="
|
|
87
|
+
<Heading type="h4" className="line-clamp-3 !text-2xl">
|
|
106
88
|
{post.title}
|
|
107
89
|
</Heading>
|
|
108
90
|
) : null}
|
|
91
|
+
{post?.authors && (
|
|
92
|
+
<Flex className="mt-auto text-sm text-gray-500">
|
|
93
|
+
{post?.authors?.map((author, index, { length }) => (
|
|
94
|
+
<>
|
|
95
|
+
<Text className="italic" fontSize="sm">
|
|
96
|
+
{author?.name}
|
|
97
|
+
</Text>
|
|
98
|
+
{index + 1 !== length ? <span> , </span> : null}
|
|
99
|
+
</>
|
|
100
|
+
))}
|
|
101
|
+
</Flex>
|
|
102
|
+
)}
|
|
109
103
|
{post?.excerpt ? (
|
|
110
|
-
<Text muted className="
|
|
104
|
+
<Text muted className="my-2 text-justify line-clamp-3">
|
|
111
105
|
{post.excerpt}
|
|
112
106
|
</Text>
|
|
113
107
|
) : null}
|
|
@@ -164,11 +158,7 @@ function ImageContainer({
|
|
|
164
158
|
function PrimaryButton({ primaryButton }: { primaryButton?: LabeledRoute }) {
|
|
165
159
|
if (!primaryButton?.label) return null;
|
|
166
160
|
|
|
167
|
-
const link = buildSanityLink(
|
|
168
|
-
type: primaryButton?.type ?? "",
|
|
169
|
-
internalLink: primaryButton?.internalLink ?? "",
|
|
170
|
-
externalLink: primaryButton?.externalLink ?? "",
|
|
171
|
-
});
|
|
161
|
+
const link = buildSanityLink(primaryButton);
|
|
172
162
|
|
|
173
163
|
return (
|
|
174
164
|
<div className="text-center">
|
package/src/blog_c.tsx
CHANGED
|
@@ -131,11 +131,7 @@ function BlogItem({ post, className, key }: { key: number; post: BlogPost; class
|
|
|
131
131
|
function PrimaryButton({ primaryButton }: { primaryButton?: LabeledRoute }) {
|
|
132
132
|
if (!primaryButton?.label) return null;
|
|
133
133
|
|
|
134
|
-
const link = buildSanityLink(
|
|
135
|
-
type: primaryButton?.type ?? "",
|
|
136
|
-
internalLink: primaryButton?.internalLink ?? "",
|
|
137
|
-
externalLink: primaryButton?.externalLink ?? "",
|
|
138
|
-
});
|
|
134
|
+
const link = buildSanityLink(primaryButton);
|
|
139
135
|
|
|
140
136
|
return (
|
|
141
137
|
<div className="text-center">
|
package/src/blog_d.tsx
CHANGED
|
@@ -273,6 +273,9 @@ function PostItem({ post }: { post?: BlogPost }) {
|
|
|
273
273
|
/>
|
|
274
274
|
</div>
|
|
275
275
|
<CardContent className="w-full px-3 py-2 lg:w-3/4">
|
|
276
|
+
{post?.publishedAt ? (
|
|
277
|
+
<Text muted>{format(new Date(post?.publishedAt), " dd MMM, yyyy")}</Text>
|
|
278
|
+
) : null}
|
|
276
279
|
{post?.title && (
|
|
277
280
|
<Link
|
|
278
281
|
aria-label={post?.title}
|
|
@@ -281,22 +284,16 @@ function PostItem({ post }: { post?: BlogPost }) {
|
|
|
281
284
|
{post?.title}
|
|
282
285
|
</Link>
|
|
283
286
|
)}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
<span className="mx-2 text-gray-500">•</span>
|
|
295
|
-
) : null}
|
|
296
|
-
{post?.publishedAt ? (
|
|
297
|
-
<Text muted>{format(new Date(post?.publishedAt), " dd MMM, yyyy")}</Text>
|
|
298
|
-
) : null}
|
|
299
|
-
</Flex>
|
|
287
|
+
{post?.authors ? (
|
|
288
|
+
<Flex align="center">
|
|
289
|
+
{post?.authors?.map((author, index, { length }) => (
|
|
290
|
+
<Text className="text-primary">
|
|
291
|
+
{author?.name}
|
|
292
|
+
{index + 1 !== length ? <span> , </span> : null}
|
|
293
|
+
</Text>
|
|
294
|
+
))}
|
|
295
|
+
</Flex>
|
|
296
|
+
) : null}
|
|
300
297
|
{post?.excerpt ? (
|
|
301
298
|
<Text muted className="line-clamp-6 sm:line-clamp-3">
|
|
302
299
|
{post?.excerpt}
|
package/dist/chunk-7K4AC7BM.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as P}from"./chunk-PC6NMI3O.mjs";import{Button as w}from"@stackshift-ui/button";import{Card as I}from"@stackshift-ui/card";import{Container as M}from"@stackshift-ui/container";import{Flex as v}from"@stackshift-ui/flex";import{Heading as C}from"@stackshift-ui/heading";import{Image as F}from"@stackshift-ui/image";import{Input as $}from"@stackshift-ui/input";import{Link as E}from"@stackshift-ui/link";import{Section as H}from"@stackshift-ui/section";import{Text as y}from"@stackshift-ui/text";import f from"react";import{jsx as n,jsxs as c}from"react/jsx-runtime";function R({subtitle:e,title:t,posts:i}){let[l,u]=f.useState("All"),[r,d]=f.useState(1),[h,k]=f.useState(""),o=6;f.useEffect(()=>{d(1)},[l]);let x=(i!=null?i:[]).flatMap(a=>{var g;return((g=a==null?void 0:a.categories)!=null?g:[]).map(b=>({category:b==null?void 0:b.title,title:a==null?void 0:a.title,slug:a==null?void 0:a.slug,excerpt:a==null?void 0:a.excerpt,publishedAt:a==null?void 0:a.publishedAt,mainImage:a==null?void 0:a.mainImage,authors:a==null?void 0:a.authors}))}),B=x==null?void 0:x.reduce((a,g)=>{let b=g==null?void 0:g.category;return a.indexOf(b)===-1&&a.push(b),a},[]),m=l==="All"?i==null?void 0:i.filter(a=>{var g;return(g=a==null?void 0:a.title)==null?void 0:g.toLowerCase().includes(h.toLowerCase())}):x.filter(a=>{var g;return(a==null?void 0:a.category)===l&&((g=a==null?void 0:a.title)==null?void 0:g.toLowerCase().includes(h.toLowerCase()))}),N=r*o,S=N-o,A=m==null?void 0:m.slice(S,N),L=a=>d(a);return n(H,{className:"py-20 bg-background",children:c(M,{maxWidth:1280,children:[n(D,{subtitle:e,title:t}),n(O,{handleSearchChange:a=>{k(a.target.value),u("All"),d(1)}}),c(v,{wrap:!0,children:[n(j,{categories:B,activeTab:l,setActiveTab:u}),(m==null?void 0:m.length)===0?n(z,{}):n(Q,{currentPosts:A,activeTab:l,blogsPerPage:o})]}),n(W,{blogsPerPage:o,totalBlogs:m==null?void 0:m.length,paginate:L,currentPage:r})]})})}function z({message:e="No post available."}){return n("div",{className:"w-full px-3 lg:w-3/4 font-medium text-lg",children:e})}function D({subtitle:e,title:t}){return c("div",{className:"w-full mb-16",children:[e?n(y,{weight:"bold",className:"text-secondary",children:e}):null,t?n(C,{fontSize:"3xl",children:t}):null]})}function O({handleSearchChange:e}){return c("div",{className:"relative mb-5 w-full lg:w-1/4",children:[n($,{type:"text","aria-label":"Search, find any question you want to ask...",className:"w-full bg-white border rounded-global font-heading focus:border-gray-500 focus:outline-none",placeholder:"Search posts...",onChange:e}),n(w,{as:"button",variant:"unstyled",ariaLabel:"Search button",className:"absolute right-0 top-0 h-full px-3 bg-white border-r rounded-global text-primary flex items-center",children:n("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:n("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})})]})}function j({categories:e,activeTab:t,setActiveTab:i}){return n(I,{className:"w-full px-3 mb-8 bg-white lg:mb-0 lg:w-1/4",borderRadius:"md",children:e&&c(f.Fragment,{children:[n(C,{type:"h3",muted:!0,weight:"bold",className:"mb-4 text-base uppercase lg:text-base",children:"Topics"}),c("ul",{children:[(e==null?void 0:e.length)>1&&n(T,{activeTab:t,setActiveTab:i,category:"All"}),e==null?void 0:e.map((l,u)=>n(T,{activeTab:t,setActiveTab:i,category:l},u))]})]})})}function T({key:e,activeTab:t,setActiveTab:i,category:l}){return n("li",{children:n(w,{as:"button",variant:"unstyled",ariaLabel:"Show all blog posts",className:`mb-4 block ${l?"block":"hidden"} px-3 py-2 hover:bg-secondary-foreground focus:outline-none w-full text-left rounded ${t===l?"font-bold text-primary focus:outline-none bg-secondary-foreground":null}`,onClick:()=>i(l),children:l})},e)}function Q({currentPosts:e,activeTab:t,blogsPerPage:i}){var l;return e?n("div",{className:"w-full px-3 lg:w-3/4",children:t==="All"?e==null?void 0:e.map((u,r)=>n(s,{post:u},r)):(l=e==null?void 0:e.slice(0,i))==null?void 0:l.map((u,r)=>n(s,{post:u},r))}):null}function s({post:e}){var t,i,l,u;return e?c(v,{wrap:!0,className:"mb-8 lg:mb-6 bg-white shadow rounded-lg",children:[n("div",{className:"w-full h-full mb-4 lg:mb-0 lg:w-1/4",children:n(F,{className:"object-cover w-full h-full overflow-hidden rounded",src:`${e==null?void 0:e.mainImage}`,sizes:"100vw",width:188,height:129,alt:(t=e==null?void 0:e.alt)!=null?t:`blog-variantD-image-${e==null?void 0:e.title}`})}),c("div",{className:"w-full px-3 py-2 lg:w-3/4",children:[(e==null?void 0:e.title)&&n(E,{"aria-label":e==null?void 0:e.title,className:"mb-1 text-2xl font-bold hover:text-secondary font-heading",href:`/${(i=e==null?void 0:e.link)!=null?i:"page-not-added"}`,children:(e==null?void 0:e.title.length)>25?((l=e==null?void 0:e.title)==null?void 0:l.substring(0,25))+"...":e==null?void 0:e.title}),c(v,{wrap:!0,align:"center",gap:1,className:"mb-2 text-sm",children:[e!=null&&e.authors?(u=e==null?void 0:e.authors)==null?void 0:u.map((r,d,{length:h})=>c(v,{children:[n(y,{className:"text-primary",children:r==null?void 0:r.name}),d+1!==h?n("span",{children:"\xA0,\xA0"}):null]},d)):null,e!=null&&e.publishedAt&&(e!=null&&e.authors)?n("span",{className:"mx-2 text-gray-500",children:"\u2022"}):null,e!=null&&e.publishedAt?n(y,{muted:!0,children:P(new Date(e==null?void 0:e.publishedAt)," dd MMM, yyyy")}):null]}),e!=null&&e.excerpt?n(y,{muted:!0,children:(e==null?void 0:e.excerpt.length)>60?(e==null?void 0:e.excerpt.substring(0,60))+"...":e==null?void 0:e.excerpt}):null]})]}):null}function W({blogsPerPage:e,totalBlogs:t,paginate:i,currentPage:l}){if(!e)return null;let u=[];for(let r=1;r<=Math.ceil(t/e);r++)u.push(r);return n("nav",{className:"mt-4","aria-label":"Pagination",children:n("ul",{className:"flex space-x-2 justify-end mr-5",children:u.map(r=>n(w,{variant:"unstyled",as:"button",ariaLabel:`Page ${r}`,className:`${l===r?"bg-secondary-foreground text-gray-500":"bg-white hover:bg-secondary-foreground hover:text-gray-500"} text-primary font-medium py-2 px-4 border border-primary rounded-global focus:outline-none`,onClick:()=>i(r),children:r},r))})})}export{R as a};
|
package/dist/chunk-DK7SFSP5.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as b}from"./chunk-TMLYY2AQ.mjs";import{a as s}from"./chunk-PC6NMI3O.mjs";import{Button as h}from"@stackshift-ui/button";import{Container as w}from"@stackshift-ui/container";import{Flex as c}from"@stackshift-ui/flex";import{Heading as o}from"@stackshift-ui/heading";import{Image as u}from"@stackshift-ui/image";import{Link as N}from"@stackshift-ui/link";import{Section as P}from"@stackshift-ui/section";import{Text as g}from"@stackshift-ui/text";import{Fragment as d,jsx as l,jsxs as r}from"react/jsx-runtime";function k({subtitle:e,title:i,posts:m,primaryButton:n}){return l(P,{className:"py-20 bg-background",children:r(w,{maxWidth:1280,children:[l(y,{subtitle:e,title:i}),l(z,{posts:m,count:0,blogsPerPage:5}),l(I,{primaryButton:n})]})})}function y({subtitle:e,title:i}){return r("div",{className:"w-full mb-16 text-center",children:[e?l(g,{weight:"bold",className:"text-secondary",children:e}):null,i?l(o,{fontSize:"3xl",children:i}):null]})}function z({posts:e,count:i,blogsPerPage:m}){return r(c,{wrap:!0,justify:"center",className:"mb-16",gap:4,children:[l("div",{className:"w-full lg:w-[45%]",children:e==null?void 0:e.slice(i,i+1).map((n,a)=>l(f,{size:"lg",post:n},a))}),l(c,{wrap:!0,className:"w-full lg:w-[45%]",gap:4,children:e==null?void 0:e.slice(i+1,m).map((n,a)=>l("div",{className:"w-full lg:basis-[45%]",children:l(f,{post:n,size:"sm"},a)},a))})]})}function f({post:e,size:i,key:m}){var a;let n=b("1024");return r("div",{className:"overflow-hidden rounded-md shadow",children:[e!=null&&e.mainImage?l($,{post:e,size:i,breakpoints:n},m):null,r("div",{className:"p-6 bg-white flex flex-col justify-between",style:{height:"295px"},children:[r("div",{children:[r(c,{align:"center",children:[e!=null&&e.publishedAt?l(g,{muted:!0,className:"text-sm",children:s(new Date(e.publishedAt)," dd MMM, yyyy")}):null,(e==null?void 0:e.authors)&&r(d,{children:[l("span",{className:"mx-2 w-1 h-1 bg-gray-500 rounded-full"}),l("div",{className:"flex mt-auto text-sm text-gray-500",children:(a=e==null?void 0:e.authors)==null?void 0:a.map((t,v,{length:x})=>r(d,{children:[l(g,{className:"italic",fontSize:"sm",children:t==null?void 0:t.name}),v+1!==x?l("span",{children:"\xA0,\xA0"}):null]}))})]})]}),e!=null&&e.title?l(o,{type:"h4",className:"my-2",children:e.title.length>25?`${e.title.substring(0,25)}...`:e.title}):null,e!=null&&e.excerpt?l(g,{muted:!0,className:"mb-6 text-justify",children:e.excerpt.length>41?`${e.excerpt.substring(0,41)}...`:e.excerpt}):null]}),e!=null&&e.link?l(N,{"aria-label":"View Blog Post",className:"font-bold text-primary hover:text-secondary",href:`/${e==null?void 0:e.link}`,children:"View Blog Post"}):null]})]})}function $({post:e,size:i,breakpoints:m,key:n}){var a;return l(d,{children:m?l(u,{className:"object-cover w-full overflow-hidden",src:`${e.mainImage}`,sizes:"100vw",style:{width:"100%",height:"auto",objectFit:"cover"},width:271,height:248,alt:(a=e==null?void 0:e.mainImage)!=null?a:`blog-variantB-image-${n}`}):l("div",{className:`${i==="lg"?"h-[44.5rem]":"h-[12.5rem]"}`,children:l(u,{className:"object-cover w-full overflow-hidden rounded-t-md",src:`${e.mainImage}`,sizes:"100vw",style:{width:"100%",height:"100%",objectFit:"cover"},width:271,height:248,alt:`blog-variantB-image-${e.title}`})})})}function I({primaryButton:e}){return e!=null&&e.label?l("div",{className:"text-center",children:l(h,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,children:e==null?void 0:e.label})}):null}export{k as a};
|
package/dist/chunk-HBY4OOKD.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as P}from"./chunk-TMLYY2AQ.mjs";import{a as v}from"./chunk-PC6NMI3O.mjs";import{Badge as L}from"@stackshift-ui/badge";import{Button as y}from"@stackshift-ui/button";import{Container as $}from"@stackshift-ui/container";import{Flex as h}from"@stackshift-ui/flex";import{Heading as k}from"@stackshift-ui/heading";import{Image as C}from"@stackshift-ui/image";import{Link as I}from"@stackshift-ui/link";import{Section as M}from"@stackshift-ui/section";import{Text as g}from"@stackshift-ui/text";import{Fragment as R,jsx as l,jsxs as i}from"react/jsx-runtime";function S({subtitle:e,title:a,posts:m,primaryButton:d}){return l(M,{className:"py-20 bg-background",children:i($,{maxWidth:1280,children:[i(h,{align:"center",justify:"between",className:"flex-col mb-16 md:flex-row",gap:5,children:[l(A,{subtitle:e,title:a}),l(H,{primaryButton:d})]}),l(B,{posts:m,blogsPerPage:3})]})})}function A({subtitle:e,title:a}){return i("div",{className:"flex flex-col gap-3 text-center md:text-left",children:[e?l(g,{weight:"bold",className:"text-primary",children:e}):null,a?l(k,{fontSize:"3xl",children:a}):null]})}function B({posts:e,blogsPerPage:a}){var m;return e?l("div",{children:(m=e==null?void 0:e.slice(0,a))==null?void 0:m.map((d,r)=>l("div",{className:"flex flex-wrap mb-8 overflow-hidden rounded-md shadow",children:l(F,{post:d,className:`${r%2===0?"flex-row":"flex-row-reverse"}`},r)},r))}):null}function F({post:e,className:a,key:m}){var x,c,b,u,w,t,N;let r=P("1100")?70:200;return i(h,{wrap:!0,className:`bg-white overflow-hidden rounded-lg shadow w-full ${a}`,children:[(e==null?void 0:e.mainImage)&&l(C,{className:"object-cover w-full h-auto rounded-l lg:w-1/2",src:`${e==null?void 0:e.mainImage}`,sizes:"100vw",width:554,height:416,alt:(x=e==null?void 0:e.alt)!=null?x:`blog-variantC-image-${m}`}),i("div",{className:"w-full px-6 py-6 rounded-r lg:w-1/2 lg:pt-10",children:[i("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3",children:[(e==null?void 0:e.categories)&&((c=e==null?void 0:e.categories)==null?void 0:c.map((n,f)=>l(L,{className:"bg-secondary rounded-global w-fit",children:n==null?void 0:n.title},f))),(e==null?void 0:e.publishedAt)&&l(g,{muted:!0,className:"m-1",children:v(new Date(e==null?void 0:e.publishedAt)," dd MMM, yyyy")})]}),(e==null?void 0:e.title)&&l(k,{className:"my-4 text-xl lg:text-3xl",children:((b=e==null?void 0:e.title)==null?void 0:b.length)>40?((u=e==null?void 0:e.title)==null?void 0:u.substring(0,40))+"...":e==null?void 0:e.title}),(e==null?void 0:e.authors)&&i("div",{className:"flex mb-10 flex-wrap",children:[l("span",{className:"italic text-primary",children:"By\xA0"}),(w=e==null?void 0:e.authors)==null?void 0:w.map((n,f,{length:T})=>i(R,{children:[l(g,{className:"italic text-primary",children:n==null?void 0:n.name}),f+1!==T?l("span",{children:"\xA0,\xA0"}):null]}))]}),(e==null?void 0:e.excerpt)&&l(g,{muted:!0,className:"mb-6 leading-loose lg:text-justify",children:((t=e==null?void 0:e.excerpt)==null?void 0:t.length)>r?((N=e==null?void 0:e.excerpt)==null?void 0:N.substring(0,r))+"...":e==null?void 0:e.excerpt}),(e==null?void 0:e.link)&&l(I,{"aria-label":"View Blog Post",className:"font-bold text-primary hover:text-primary-foreground",href:`/${e==null?void 0:e.link}`,children:"View Blog Post"})]})]})}function H({primaryButton:e}){return e!=null&&e.label?l(y,{as:"link",link:e,ariaLabel:e==null?void 0:e.label,className:"inline-flex flex-wrap text-center bg-primary text-sm sm:text-base px-6 py-3 rounded-global",children:e==null?void 0:e.label}):null}export{S as a};
|