(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5884,4964],{6803:function(t){var e;e=function(){function t(){return(t=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=Array(e);n=t.length?{done:!0}:{done:!1,value:t[n++]}};throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=t[Symbol.iterator]()).next.bind(n)}(i);!(n=r()).done;){var o=n.value,a=o[0],l=o[1];if(t===a||t===l)return a}return t}(a)]=n[a]);return new s(this,t({baseUrl:r},o))},u.image=function(t){return this.withOptions({source:t})},u.dataset=function(t){return this.withOptions({dataset:t})},u.projectId=function(t){return this.withOptions({projectId:t})},u.bg=function(t){return this.withOptions({bg:t})},u.dpr=function(t){return this.withOptions({dpr:t})},u.width=function(t){return this.withOptions({width:t})},u.height=function(t){return this.withOptions({height:t})},u.focalPoint=function(t,e){return this.withOptions({focalPoint:{x:t,y:e}})},u.maxWidth=function(t){return this.withOptions({maxWidth:t})},u.minWidth=function(t){return this.withOptions({minWidth:t})},u.maxHeight=function(t){return this.withOptions({maxHeight:t})},u.minHeight=function(t){return this.withOptions({minHeight:t})},u.size=function(t,e){return this.withOptions({width:t,height:e})},u.blur=function(t){return this.withOptions({blur:t})},u.sharpen=function(t){return this.withOptions({sharpen:t})},u.rect=function(t,e,n,r){return this.withOptions({rect:{left:t,top:e,width:n,height:r}})},u.format=function(t){return this.withOptions({format:t})},u.invert=function(t){return this.withOptions({invert:t})},u.orientation=function(t){return this.withOptions({orientation:t})},u.quality=function(t){return this.withOptions({quality:t})},u.forceDownload=function(t){return this.withOptions({download:t})},u.flipHorizontal=function(){return this.withOptions({flipHorizontal:!0})},u.flipVertical=function(){return this.withOptions({flipVertical:!0})},u.ignoreImageParams=function(){return this.withOptions({ignoreImageParams:!0})},u.fit=function(t){if(-1===o.indexOf(t))throw Error('Invalid fit mode "'+t+'"');return this.withOptions({fit:t})},u.crop=function(t){if(-1===a.indexOf(t))throw Error('Invalid crop mode "'+t+'"');return this.withOptions({crop:t})},u.saturation=function(t){return this.withOptions({saturation:t})},u.auto=function(t){if(-1===l.indexOf(t))throw Error('Invalid auto mode "'+t+'"');return this.withOptions({auto:t})},u.pad=function(t){return this.withOptions({pad:t})},u.url=function(){return function(e){var o=t({},e||{}),a=o.source;delete o.source;var l=function(e){var n;if(!e)return null;if("string"==typeof e&&/^https?:\/\//.test(""+e))n={asset:{_ref:r(e)}};else if("string"==typeof e)n={asset:{_ref:e}};else if(e&&"string"==typeof e._ref)n={asset:e};else if(e&&"string"==typeof e._id)n={asset:{_ref:e._id||""}};else if(e&&e.asset&&"string"==typeof e.asset.url)n={asset:{_ref:r(e.asset.url)}};else{if("object"!=typeof e.asset)return null;n=e}return e.crop&&(n.crop=e.crop),e.hotspot&&(n.hotspot=e.hotspot),function(e){if(e.crop&&e.hotspot)return e;var n=t({},e);return n.crop||(n.crop={left:0,top:0,bottom:0,right:0}),n.hotspot||(n.hotspot={x:.5,y:.5,height:1,width:1}),n}(n)}(a);if(!l)return null;var s=function(t){var e=t.split("-"),r=e[1],i=e[2],o=e[3];if(!r||!i||!o)throw Error("Malformed asset _ref '"+t+"'. Expected an id like \""+n+'".');var a=i.split("x"),l=a[0],s=a[1],u=+l,c=+s;if(!(isFinite(u)&&isFinite(c)))throw Error("Malformed asset _ref '"+t+"'. Expected an id like \""+n+'".');return{id:r,width:u,height:c,format:o}}(l.asset._ref||l.asset._id||""),u=Math.round(l.crop.left*s.width),c=Math.round(l.crop.top*s.height),d={left:u,top:c,width:Math.round(s.width-l.crop.right*s.width-u),height:Math.round(s.height-l.crop.bottom*s.height-c)},h=l.hotspot.height*s.height/2,f=l.hotspot.width*s.width/2,m=l.hotspot.x*s.width,p=l.hotspot.y*s.height;return o.rect||o.focalPoint||o.ignoreImageParams||o.crop||(o=t(t({},o),function(t,e){var n,r=e.width,i=e.height;if(!(r&&i))return{width:r,height:i,rect:t.crop};var o=t.crop,a=t.hotspot,l=r/i;if(o.width/o.height>l){var s=o.height,u=s*l,c=o.top,d=(a.right-a.left)/2+a.left-u/2;do.left+o.width&&(d=o.left+o.width-u),n={left:Math.round(d),top:Math.round(c),width:Math.round(u),height:Math.round(s)}}else{var h=o.width,f=h/l,m=o.left,p=(a.bottom-a.top)/2+a.top-f/2;po.top+o.height&&(p=o.top+o.height-f),n={left:Math.max(0,Math.floor(m)),top:Math.max(0,Math.floor(p)),width:Math.round(h),height:Math.round(f)}}return{width:r,height:i,rect:n}}({crop:d,hotspot:{left:m-f,top:p-h,right:m+f,bottom:p+h}},o))),function(t){var e=t.baseUrl||"https://cdn.sanity.io",n=t.asset.id+"-"+t.asset.width+"x"+t.asset.height+"."+t.asset.format,r=e+"/images/"+t.projectId+"/"+t.dataset+"/"+n,o=[];if(t.rect){var a=t.rect,l=a.left,s=a.top,u=a.width,c=a.height;(0!==l||0!==s||c!==t.asset.height||u!==t.asset.width)&&o.push("rect="+l+","+s+","+u+","+c)}t.bg&&o.push("bg="+t.bg),t.focalPoint&&(o.push("fp-x="+t.focalPoint.x),o.push("fp-y="+t.focalPoint.y));var d=[t.flipHorizontal&&"h",t.flipVertical&&"v"].filter(Boolean).join("");return(d&&o.push("flip="+d),i.forEach(function(e){var n=e[0],r=e[1];void 0!==t[n]?o.push(r+"="+encodeURIComponent(t[n])):void 0!==t[r]&&o.push(r+"="+encodeURIComponent(t[r]))}),0===o.length)?r:r+"?"+o.join("&")}(t(t({},o),{},{asset:s}))}(this.options)},u.toString=function(){return this.url()},s}();return function(t){if(t&&"object"==typeof t.clientConfig){var e=t.clientConfig,n=e.apiHost,r=e.projectId,i=e.dataset;return new s(null,{baseUrl:(n||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:r,dataset:i})}return new s(null,t)}},t.exports=e()},12870:function(t){"use strict";t.exports=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r0&&w(function(t){return t-1})},type:"button",children:(0,i.jsx)(a.JO$,{icon:(0,i.jsx)(o.q,{}),size:"1.5em"})}),(0,i.jsx)("div",{className:"flex h-full w-full overflow-hidden",children:(0,i.jsxs)("div",{className:s()(f().content),onTransitionEnd:function(){return O()},style:{"--cardCount":l.length+2,"--transformValue":x,transition:j?void 0:"none","--curtainGradient":null===(e=(0,d.b)(null!=n?n:"white"))||void 0===e?void 0:e.bgVar},children:[N,null==l?void 0:l.map(function(t,e){return(0,i.jsx)(c.Z,{hideLogos:g,card:t,font:m,themeColor:v,themeColorMode:p},e)}),k]})}),(0,i.jsx)("button",{"aria-label":"Next testimonial",className:f().right,onClick:function(){x1&&n<2:i=Math.round((r=Math.round(e))*n);break;case n>=2&&n<=5.5:r=Math.round((i=Math.round(1.25*t))/n);break;case n>5.5&&n<=8:r=Math.round((i=Math.round(1.5*t))/n);break;case n>8&&n<=10:r=Math.round(1.8*e),i=Math.round(2*t);break;case n>10:i=Math.round((r=Math.round(.75*e))*n)}return{width:i,height:r}},i=function(t,e,n){var r,i;switch(!0){case n<1:i=Math.round((r=Math.round(1.5*e))*n);break;case 1===n:i=r=1.25*e;break;case n>1&&n<=2.5:i=Math.round((r=Math.round(1.25*e))*n);break;case n>2.5&&n<=3.5:i=Math.round((r=Math.round(1.3*e))*n);break;case n>3.5&&n<=5.5:i=Math.round((r=e)*n);break;case n>5.5&&n<=8:r=Math.round((i=Math.round(1.2*t))/n);break;case n>8&&n<=8.5:case n>8.5:r=Math.round((i=Math.round(1.5*t))/n)}return{width:i,height:r}},o=function(t,e,n){var r,i;switch(!0){case n<1:r=Math.round(e/n),i=Math.round(1.5*t);break;case 1===n:r=e,i=t;break;case n>1&&n<=4:i=Math.round((r=e)*n);break;case n>4&&n<=5.5:i=Math.round((r=Math.round(1.25*e))*n);break;case n>5.5&&n<=8:i=Math.round((r=Math.round(1.5*e))*n);break;case n>8:r=Math.round(1.8*e),i=Math.round(2*t)}return{width:i,height:r}},a=function(t,e,n){var r,i;switch(!0){case n<1:r=e/n,i=1.5*t;break;case 1===n:r=e,i=t;break;case n>1&&n<=6.5:i=Math.round((r=e)*n);break;case n>6.5&&n<=8:i=Math.round((r=Math.round(1.2*e))*n);break;case n>8&&n<=10:r=Math.round(1.8*e),i=Math.round(2*t);break;case n>10:i=Math.round((r=Math.round(1.2*e))*n)}return{width:i,height:r}},l=function(t,e,n){var r,i;switch(!0){case n<1:r=Math.round(e/n),i=Math.round(1.5*t);break;case 1===n:r=e,i=t;break;case n>1&&n<=2.5:i=Math.round((r=e)*n);break;case n>2.5&&n<=5.5:i=Math.round((r=Math.round(1.25*e))*n);break;case n>5.5&&n<=8:r=Math.round(1.5*e),i=Math.round(1.5*t);break;case n>8:r=Math.round(1.8*e),i=Math.round(2*t)}return{width:i,height:r}},s=function(t,e,n){var r,i;switch(!0){case n<1:i=Math.round((r=Math.round(1.5*e))*n);break;case 1===n:i=r=1.25*e;break;case n>1&&n<=2.5:i=Math.round((r=Math.round(1.25*e))*n);break;case n>2.5&&n<=3.5:i=Math.round((r=Math.round(1.3*e))*n);break;case n>3.5&&n<=5.5:i=Math.round((r=e)*n);break;case n>5.5&&n<=8:r=Math.round((i=Math.round(1.2*t))/n);break;case n>8&&n<=8.5:case n>8.5:r=Math.round((i=Math.round(1.5*t))/n)}return{width:i,height:r}};function u(t,e,n){switch(n.type){case"horizontal-optimized":return r(t,e,n.aspectRatio);case"normalized":return o(t,e,null==n?void 0:n.aspectRatio);case"normalized-horizontal":return a(t,e,null==n?void 0:n.aspectRatio);case"homepage-carousel":return i(t,e,null==n?void 0:n.aspectRatio);case"normalized-square":return l(t,e,null==n?void 0:n.aspectRatio);default:return s(t,e,null==n?void 0:n.aspectRatio)}}},61204:function(t,e,n){"use strict";n.d(e,{l:function(){return s}});var r=n(82729),i=n(12870),o=n.n(i),a=n(9818);function l(){var t=(0,r._)(["\n byline-> {\n ...,\n avatar {\n altText,\n ","\n }\n }\n"]);return l=function(){return t},t}var s=o()(l(),a.i)},9818:function(t,e,n){"use strict";n.d(e,{i:function(){return a}});var r=n(82729),i=n(12870);function o(){var t=(0,r._)(["\n asset-> {\n url,\n metadata {\n dimensions {\n height,\n width,\n aspectRatio\n }\n }\n }\n"]);return o=function(){return t},t}var a=n.n(i)()(o())},77331:function(t,e,n){"use strict";n.d(e,{k:function(){return s}});var r=n(82729),i=n(12870),o=n.n(i),a=n(9818);function l(){var t=(0,r._)(["\n image {\n altText,\n ","\n }\n"]);return l=function(){return t},t}var s=o()(l(),a.i)},84143:function(t,e,n){"use strict";n.r(e),n.d(e,{__N_SSG:function(){return T},default:function(){return E}});var r=n(24043),i=n(85893),o=n(74356),a=n(82729),l=n(34764),s=n(61204),u=n(77331);function c(){var t=(0,a._)(["\n{\n 'webinarsList': *[_type == \"webinarsList\"] | order(webinarDate asc) {\n webinarRegistrationUrl,\n ondemandUrl,\n webinarDate,\n webinarLabel,\n title,\n upcomingWebinarImage {\n asset\n },\n hosts {\n list[]-> {\n name,\n avatar {\n asset\n }\n }\n }\n },\n 'webinarsPage': *[_type == \"webinarsPage\"][0] {\n meta,\n heroHeadline,\n heroParagraph,\n upcomingWebinarsHeadline,\n upcomingWebinarsParagraph,\n ondemandWebinarsHeadline,\n ondemandWebinarsParagraph,\n testimonialsHeader,\n testimonials[]-> {\n ...,\n logo-> {\n ","\n },\n ","\n },\n endOfPageModule-> {\n cta,\n heading,\n ...,\n },\n }\n}\n"]);return c=function(){return t},t}var d=(0,l.Z)(c(),u.k,s.l),h=n(83741),f=n(25675),m=n.n(f),p=n(55118);new Intl.DateTimeFormat("en-US",{dateStyle:"long"});var g=function(t){return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})},v=function(t){return new Date(t).toLocaleTimeString("en-US",{hour:"numeric",hour12:!0,timeZone:"America/Los_Angeles"})},b=function(t){return new Date(t).toLocaleTimeString("en-US",{hour:"numeric",hour12:!0,timeZone:"America/New_York"})},x=n(68545);function w(t){var e,n=t.upcomingWebinar,r=t.heroHeadline,o=t.heroParagraph,a=new Date,l=(null==n?void 0:null===(e=n.upcomingWebinarImage)||void 0===e?void 0:e.asset)?(0,p.ZP)(null==n?void 0:n.upcomingWebinarImage.asset).url():void 0,s=new Date(null==n?void 0:n.webinarDate),u=g(s),c=new Date(s.getTime()+36e5).getTime()-a.getTime()<36e5,d="".concat(v(null==n?void 0:n.webinarDate)," PT | ").concat(b(null==n?void 0:n.webinarDate))+" ET";return(0,i.jsx)("header",{className:"".concat(n?"py-fluid-md bg-gradient-to-r from-white via-thd-color-blue-20 to-thd-color-blue-20":"py-fluid-sm bg-thd-color-blue-20"),children:(0,i.jsx)("div",{className:"thd-container-max ",children:(0,i.jsxs)("div",{className:"flex flex-wrap ".concat(n?"justify-between":"justify-center"," items-center"),children:[(0,i.jsxs)("div",{className:"mb-24 lg:mb-0 ".concat(n?"lg:w-3/12":"text-center lg:w-4/12"),children:[(0,i.jsx)("h1",{className:"text-5xl md:text-7xl font-medium text-thd-color-black tracking-tighter mb-lg",children:null!=r?r:"Webinars"}),(0,i.jsx)("p",{className:"text-xl text-thd-color-black leading-normal",children:null!=o?o:"Tune in to webinars live, or watch them on-demand. Our monthly webinar series spotlights Loom experts, partners, and friends."})]}),n&&(0,i.jsx)("div",{className:"lg:w-8/12 ",children:(0,i.jsx)("div",{className:"bg-white thd-shadow lg:shadow-none thd-rounded-int p-24 xl:p-40",children:(0,i.jsxs)("div",{className:"flex items-center flex-wrap -mx-12 xl:-mx-24",children:[(0,i.jsx)("div",{className:"w-full lg:w-7/12 px-12 xl:px-24 mb-24 lg:mb-0",children:l&&(0,i.jsx)("div",{children:(0,i.jsx)(m(),{src:l,alt:null==n?void 0:n.title,width:600,height:400,className:"rounded-md w-full"})})}),(0,i.jsxs)("div",{className:"w-ful lg:w-5/12 px-12 xl:px-24",children:[(0,i.jsx)(x.DRh,{className:"text-xs mb-18 uppercase font-medium\n ".concat(c?"bg-thd-color-green-20 text-thd-color-black":"bg-thd-color-blue-20 text-thd-color-black"),children:c?"In Progress":"Upcoming"}),(0,i.jsx)("h2",{className:"text-thd-color-black tracking-tighter text-3xl md:text-4xl font-medium mb-md",children:null==n?void 0:n.title}),(0,i.jsxs)("p",{className:"uppercase text-sm mb-lg text-thd-color-black font-medium",children:[u," ",d]}),n.webinarRegistrationUrl&&(0,i.jsx)(h.Z,{buttonType:"primary",color:"primary-dark",cta:{copy:"".concat(c?"Join in progress webinar":"Register Now"),link:n.webinarRegistrationUrl},size:"lg",type:"primary",icon:"arrow-right",iconPosition:"right",iconGap:"gap-[.5em]"})]})]})})})]})})})}var y=n(31267),j={"blue-20":{pillBgColor:"bg-thd-color-blue-80",bgColor:"bg-thd-color-blue-20",textColor:"text-thd-color-blue-90",dateTextColor:"text-thd-color-blue-90"},"blue-60":{pillBgColor:"bg-thd-color-blue-80",bgColor:"bg-thd-color-blue-60",textColor:"text-thd-color-blue-10",dateTextColor:"text-thd-color-blue-20"},"blue-80":{pillBgColor:"bg-thd-color-blue-70",bgColor:"bg-thd-color-blue-80",textColor:"text-thd-color-blue-10",dateTextColor:"text-thd-color-blue-20"}};function M(t){var e=t.webinar,n=function(t){switch(t){case"Speaker Notes":default:return"blue-20";case"Loom 101":return"blue-60";case"Atlassian Webinar":return"blue-80"}}(e.webinarLabel),r=g(null==e?void 0:e.webinarDate),o="".concat(v(null==e?void 0:e.webinarDate)," PT | ").concat(b(null==e?void 0:e.webinarDate)," ET"),a=new Date,l=new Date(e.webinarDate)c}),E=T[0],D=T.slice(1),P=h.filter(function(t){return new Date(t.webinarDate)0&&(0,i.jsx)("section",{className:"py-fluid-sm lg:py-fluid-md",children:(0,i.jsxs)("div",{className:"thd-container-max",children:[b&&(0,i.jsx)(N,{headline:b,paragraph:x}),(0,i.jsx)(k,{webinars:D})]})}),P.length>0&&(0,i.jsx)("section",{id:"on-demand",className:"py-fluid-sm lg:py-fluid-md scroll-my-100 ".concat(D.length>0&&"bg-thd-color-blue-10"),children:(0,i.jsxs)("div",{className:"thd-container-max",children:[g&&(0,i.jsx)(N,{headline:g,paragraph:v}),(0,i.jsx)(k,{webinars:U})]})}),(0,i.jsx)("section",{className:"pt-fluid-sm lg:pt-fluid-md",children:(0,i.jsx)("div",{className:"thd-container-max",children:(0,i.jsx)(N,{headline:j})})}),M&&(0,i.jsx)(_.Z,{bgVar:"white",cards:M}),(null==y?void 0:y.cta)&&(0,i.jsx)(C.Z,{cta:null==y?void 0:y.cta,heading:null==y?void 0:y.heading})]})}},69524:function(t){t.exports={container:"ThreadTestimonialCarousel_container__3hu57",left:"ThreadTestimonialCarousel_left__ioRt3",right:"ThreadTestimonialCarousel_right__9bhB0",content:"ThreadTestimonialCarousel_content__ODboU",avatar:"ThreadTestimonialCarousel_avatar__3d3SV"}},40275:function(t,e,n){"use strict";let r;n.d(e,{Kx:function(){return m},T:function(){return f},o_:function(){return p}});var i=n(67294);let o=new Uint8Array(16),a=[];for(let t=0;t<256;++t)a.push((t+256).toString(16).slice(1));var l={randomUUID:"u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let s=["channel/disconnect","channel/response","channel/heartbeat"],u=["handshake/syn","handshake/syn-ack","handshake/ack"],c=t=>s.some(e=>e===t),d=t=>u.some(e=>e===t),h=({data:t={}})=>"object"==typeof t&&null!==t&&!Array.isArray(t)&&!("domain"in t)&&["id","type","from","to"].every(e=>e in t)&&t.type.startsWith("handshake/");function f(t,e,n){let[s,u]=(0,i.useState)(),[f,m]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(window.self===window.top&&!window.opener)return;let t=function(t){let e=window.self!==window.top||window.opener,n={buffer:[],id:null,origin:null,source:null,status:"connecting"};function i(e,i){if(d(e)||c(e)||"connecting"!==n.status&&"reconnecting"!==n.status){if(n.id&&n.origin&&n.source){let s={connectionId:n.id,data:i,domain:"sanity/channels",from:t.id,id:function(t,e,n){if(l.randomUUID&&!t)return l.randomUUID();let i=(t=t||{}).random||(t.rng||function(){if(!r&&!(r="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)})();return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(t,e=0){return a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]}(i)}(),to:t.connectTo,type:e};try{n.source.postMessage(s,{targetOrigin:n.origin})}catch{throw Error(`Failed to postMessage '${s.id}' on '${t.id}'`)}}}else n.buffer.push({type:e,data:i})}function s(e){if(h(e))console.error("Visual editing package mismatch detected! Please ensure you are using the latest version of Sanity Studio and any packages listed here:\nhttps://github.com/sanity-io/visual-editing");else if(function(e){let{data:n}=e;return"sanity/channels"===n.domain&&n.to===t.id&&n.from===t.connectTo&&"channel/response"!==n.type}(e)){let{data:t}=e;if(n.origin&&e.origin!==n.origin)return;if(e.source&&n.source!==e.source&&(n.source=e.source),d(t.type)&&t.data){if("handshake/syn"===t.type)return n.origin=e.origin,n.id=t.data.id,m("connecting"),void i("handshake/syn-ack",{id:n.id});if("handshake/ack"===t.type&&t.data.id===n.id)return void m("connected")}else if(t.connectionId===n.id&&e.origin===n.origin){if("channel/disconnect"===t.type)return void m("disconnected");{let e=[t.type,t.data];u.forEach(t=>{t(...e)}),i("channel/response",{responseTo:t.id})}return}}}let u=new Set,f=new Set;function m(t){n.status=t,f.forEach(e=>{e(t)}),"connected"===t&&function(){let t=[...n.buffer];n.buffer.splice(0,n.buffer.length),t.forEach(({type:t,data:e})=>{i(t,e)})}()}return window.addEventListener("message",s,!1),m("connecting"),{destroy:function(){["disconnected"].includes(n.status)||m("disconnected"),u.clear(),f.clear(),window.removeEventListener("message",s,!1)},inFrame:e,send:function(t,e){i(t,e)},subscribe:function(t){return u.add(t),()=>u.delete(t)},onStatusUpdate:function(t){return f.add(t),()=>f.delete(t)}}}({id:"preview-kit",connectTo:"presentation"});t.onStatusUpdate(t=>{"connected"===t?m(!0):"disconnected"===t&&m(!1)});let e=setTimeout(()=>u(t),0);return()=>{clearTimeout(e),t.destroy(),u(void 0)}},[n,e]);let p=JSON.stringify(Array.from(t.keys()));(0,i.useEffect)(()=>{"[]"!==p&&s&&f&&s.send("preview-kit/documents",{projectId:e,dataset:n,perspective:"previewDrafts",documents:Array.from(t.values())})},[p,s,f,n,t,e])}function m(t){let e=(0,i.useMemo)(()=>JSON.stringify(t||{}),[t]);return(0,i.useMemo)(()=>JSON.parse(e),[e])}function p(t){let{refreshInterval:e}=t,n=function(){let[t,e]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e(navigator.onLine);let t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t),window.addEventListener("offline",n),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}},[]);let n=(0,i.useSyncExternalStore)(g,()=>document.visibilityState,()=>"hidden");return!t||"hidden"===n}(),[r,o]=(0,i.useState)("hit"),a=(0,i.useCallback)(()=>(o("inflight"),()=>o("hit")),[]);return(0,i.useEffect)(()=>{if(!e||"hit"!==r)return;let t=setTimeout(()=>o("stale"),e);return()=>clearTimeout(t)},[e,r]),(0,i.useEffect)(()=>{if("hit"!==r)return;let t=()=>o("stale");return window.addEventListener("focus",t),()=>window.removeEventListener("focus",t)},[e,r]),(0,i.useEffect)(()=>{n&&"hit"===r&&o("stale"),n||"stale"!==r||o("refresh")},[n,r]),[r,a]}function g(t){return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)}},80684:function(t,e,n){"use strict";n.d(e,{d:function(){return r}});let r=(0,n(67294).createContext)(null)},74356:function(t,e,n){"use strict";n.d(e,{Ji:function(){return v},yR:function(){return g}});var r,i,o=n(40275),a=n(67294),l=n(80684),s="u">typeof Element,u="function"==typeof Map,c="function"==typeof Set,d="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView,h=(r=function(t,e){try{return function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){var r,i,o,a;if(e.constructor!==n.constructor)return!1;if(Array.isArray(e)){if((r=e.length)!=n.length)return!1;for(i=r;0!=i--;)if(!t(e[i],n[i]))return!1;return!0}if(u&&e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(a=e.entries();!(i=a.next()).done;)if(!n.has(i.value[0]))return!1;for(a=e.entries();!(i=a.next()).done;)if(!t(i.value[1],n.get(i.value[0])))return!1;return!0}if(c&&e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(a=e.entries();!(i=a.next()).done;)if(!n.has(i.value[0]))return!1;return!0}if(d&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){if((r=e.length)!=n.length)return!1;for(i=r;0!=i--;)if(e[i]!==n[i])return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof n.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof n.toString)return e.toString()===n.toString();if((r=(o=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;if(s&&e instanceof Element)return!1;for(i=r;0!=i--;)if(("_owner"!==o[i]&&"__v"!==o[i]&&"__o"!==o[i]||!e.$$typeof)&&!t(e[o[i]],n[o[i]]))return!1;return!0}return e!=e&&n!=n}(t,e)}catch(t){if((t.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw t}}).__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r,f={exports:{}},m={};f.exports=function(){if(i)return m;i=1;var t="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},e=a.useSyncExternalStore,n=a.useRef,r=a.useEffect,o=a.useMemo,l=a.useDebugValue;return m.useSyncExternalStoreWithSelector=function(i,a,s,u,c){var d=n(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;var f=e(i,(d=o(function(){function e(e){if(!i){if(i=!0,n=e,e=u(e),void 0!==c&&h.hasValue){var o=h.value;if(c(o,e))return r=o}return r=e}if(o=r,t(n,e))return o;var a=u(e);return void 0!==c&&c(o,a)?o:(n=e,r=a)}var n,r,i=!1,o=void 0===s?null:s;return[function(){return e(a())},null===o?void 0:function(){return e(o())}]},[a,s,u,c]))[0],d[1]);return r(function(){h.hasValue=!0,h.value=f},[f]),l(f),f},m}();var p=f.exports;function g(t,e,n,r){let{isEqual:i=h}=r||{},s=(0,a.useContext)(l.d),u=(0,o.Kx)(n),c=(0,a.useMemo)(()=>({subscribe:()=>()=>{},getSnapshot:()=>t}),[t]),d=(0,a.useMemo)(()=>(null==s?void 0:s(t,e,u))||{subscribe:()=>()=>{},getSnapshot:()=>t},[s,t,u,e]),[f]=(0,a.useState)(()=>{if(void 0===t)throw Error("initialSnapshot can't be undefined, if you don't want an initial value use null instead");try{return JSON.parse(JSON.stringify(t))}catch(e){return console.warn("Failed to deep clone initialSnapshot, this is likely an error and an indication that the snapshot isn't JSON serializable",{initialSnapshot:t,error:e}),t}}),m=(0,a.useCallback)(()=>f,[f]),g=(0,a.useCallback)(t=>t,[]),v=p.useSyncExternalStoreWithSelector((null==d?void 0:d.subscribe)||c.subscribe,(null==d?void 0:d.getSnapshot)||c.getSnapshot,m,g,i),b=null!==s;return[v,b&&f===v,b]}let v=(0,a.lazy)(()=>n.e(6166).then(n.bind(n,46166)))},34764:function(t,e,n){"use strict";function r(t,...e){let n=t.length-1;return t.slice(0,n).reduce((t,n,r)=>t+n+e[r],"")+t[n]}n.d(e,{Z:function(){return r}})}},function(t){t.O(0,[3050,7017,4582,5675,7979,8037,2888,9774,179],function(){return t(t.s=56749)}),_N_E=t.O()}]);