!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="351d7324-40fd-48ba-a056-2900f3bba095",e._sentryDebugIdIdentifier="sentry-dbid-351d7324-40fd-48ba-a056-2900f3bba095")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[75691],{24081:function(e,t,n){n.d(t,{H:function(){return h},Z:function(){return v}});var a=n(11527),r=n(45924);let h="●";function v(e){let{className:t,...n}=e;return(0,a.jsxs)("div",{...n,className:(0,r.default)("inline-flex flex-row gap-2",t),children:[(0,a.jsx)("span",{className:"animate-pulse [animation-delay:-0.3s]",children:h}),(0,a.jsx)("span",{className:"animate-pulse [animation-delay:-0.5s]",children:h}),(0,a.jsx)("span",{className:"animate-pulse",children:h})]})}},75505:function(e,t,n){n.d(t,{Z:function(){return d}});var a=n(11527),r=n(85739),h=n.n(r),v=n(61623),l=n(10249),s=n(66028);let i={en:"en_US"};var o=n(65145),m=n(9564),c=n(54605);function d(e){var t;let{favicon:n,appManifest:r,breadcrumbs:d,title:u,description:Z,keywords:x,image:p,rss:f,baseUrl:g="https://chatbotkit.com",thisUrl:b="",locales:y="auto"}=e,j=(0,c.Z)();return b=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=(0,c.Z)();return(0,o.HQ)(t||a.asPath,e,n).replace(/\/index$/,"/").replace(/^\/landing/,"/")}(g,b,{noQuery:!0,noFragment:!0}),null==d||d.length,u||(0,l.ZK)("* missing title at ".concat(b)),Z||(0,l.ZK)("* missing description at ".concat(b)),Array.isArray(x)&&(x=Array.from(new Set(x)).join(",")),x=null==x?void 0:x.toLowerCase(),p=new URL(p||"/card",b).toString(),y=("auto"===y?j.locales:y)||[],(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(h(),{children:[(0,a.jsx)("meta",{name:"generator",content:"ChatBotKit"}),n?(0,a.jsx)("link",{rel:"icon",href:j.normalizeHref(n)}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/apple-touch-icon.png"}),(0,a.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/favicon-16x16.png"}),(0,a.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/favicon-32x32.png"})]}),r?(0,a.jsx)("link",{rel:"manifest",href:r||"/site.webmanifest"}):null,j.locale!==j.defaultLocale?(0,a.jsx)("link",{rel:"canonical",href:(0,o.n2)(b,"/".concat(j.locale))}):(0,a.jsx)("link",{rel:"canonical",href:b}),y.length>1?(0,a.jsx)(a.Fragment,{children:y.map(e=>{let t=new URL(b);return j.defaultLocale!==e&&(t.pathname="/".concat(e).concat(t.pathname)),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("link",{rel:"alternate",href:t.toString(),hrefLang:e},e),j.defaultLocale===e?(0,a.jsx)("link",{rel:"alternate",href:t.toString(),hrefLang:"x-default"}):null]})})}):null,s.Go||s.G?(0,a.jsx)("meta",{name:"robots",content:"noindex"}):(0,a.jsx)("meta",{name:"robots",content:"index,follow"}),u?(0,a.jsx)("title",{children:u}):null,Z?(0,a.jsx)("meta",{name:"description",content:Z}):null,x?(0,a.jsx)("meta",{name:"keywords",content:x}):null,(0,a.jsx)("meta",{property:"image",content:p}),(0,a.jsx)("meta",{itemProp:"image",content:p}),(0,a.jsx)("meta",{property:"og:locale",content:t=i[t=(t=j.locale||j.defaultLocale||"en").replace(/-/g,"_")]||t}),(0,a.jsx)("meta",{property:"og:site_name",content:new URL(b).hostname}),(0,a.jsx)("meta",{property:"og:type",content:"website"}),(0,a.jsx)("meta",{property:"og:url",content:b}),u?(0,a.jsx)("meta",{property:"og:title",content:u}):null,Z?(0,a.jsx)("meta",{property:"og:description",content:Z}):null,(0,a.jsx)("meta",{property:"og:image",content:p}),(0,a.jsx)("meta",{name:"twitter:site",content:"@chatbotkit"}),(0,a.jsx)("meta",{name:"twitter:creator",content:"@chatbotkit"}),u?(0,a.jsx)("meta",{name:"twitter:title",content:u}):null,Z?(0,a.jsx)("meta",{name:"twitter:description",content:Z}):null,(0,a.jsx)("meta",{name:"twitter:image",content:p}),(0,a.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),f?(0,a.jsx)("link",{rel:"alternate",type:"application/rss+xml",title:f.title,href:f.href}):null,(0,a.jsx)("meta",{name:"last-modified",content:(0,v.CD)().toISOString()})]}),(0,a.jsx)(m.Z,{data:{"@context":"https://schema.org","@type":"WebPage",name:u,description:Z,url:b,image:{"@type":"ImageObject",url:p}}})]})}},9564:function(e,t,n){n.d(t,{Z:function(){return v}});var a=n(11527),r=n(85739),h=n.n(r);function v(e){let{data:t}=e;return(0,a.jsx)(h(),{children:(0,a.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(t)}})})}},78788:function(e,t,n){n.d(t,{P3:function(){return j},X6:function(){return b},Xc:function(){return f},ZP:function(){return w}});var a=n(11527),r=n(50959),h=n(36276),v=n(34676),l=n(59042),s=n(24081),i=n(75505),o=n(1225),m=n(54605),c=n(38021),d=n(19376),u=n(64528),Z=n(57174),x=n(19689),p=n(94513);let f=(0,r.createContext)();function g(e){let{disabled:t}=e,n=(0,m.Z)(),[h,v]=(0,r.useState)(!1);function l(){t||v(!1)}return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",onClick:function(){t||v(!0)},disabled:t,className:"focus:outline-none disabled:opacity-20 disabled:pointer-events-none p-2 hover:bg-gray-200 dark:hover:bg-gray-800 rounded-md",children:(0,a.jsx)(u.Z,{height:"16px",width:"16px"})}),(0,a.jsx)(c.u,{appear:!0,show:h,as:r.Fragment,children:(0,a.jsxs)(d.V,{as:"div",className:"relative z-50",onClose:l,children:[(0,a.jsx)(c.u.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,a.jsx)("div",{className:"fixed inset-0 bg-black dark:bg-white bg-opacity-25"})}),(0,a.jsx)("div",{className:"fixed inset-0 overflow-y-auto",children:(0,a.jsx)("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:(0,a.jsx)(c.u.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:(0,a.jsxs)(d.V.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-lg bg-white dark:bg-black text-left align-middle shadow-xl transition-all",children:[(0,a.jsx)(d.V.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900 dark:text-gray-100 px-6 pt-6",children:"Are you sure you want to continue?"}),(0,a.jsx)("div",{className:"mt-2 px-6",children:(0,a.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-500",children:"Your changes will be lost."})}),(0,a.jsxs)("div",{className:"mt-6 flex items-center space-x-2 border-t border-gray-100 dark:border-gray-900 px-6 py-4",children:[(0,a.jsx)("button",{type:"button",onClick:l,className:"plain-button flex-2",children:"Dismiss"}),(0,a.jsx)("button",{type:"button",className:"danger-button flex-1",onClick:()=>n.replace("/overview"),children:"Continue without save"})]})]})})})})]})})]})}function b(e){let{title:t,description:n}=e,{loading:h}=(0,r.useContext)(f);return(0,a.jsxs)("div",{className:"bg-white dark:bg-black border-b border-gray-100 dark:border-gray-900 mb-10 md:mb-0 py-10 md:py-8 flex flex-col justify-center items-start lg:bg-transparent w-full px-8 md:px-0",children:[(0,a.jsx)("h2",{className:"text-xl lg:text-2xl mb-1 lg:mb-2 font-medium",children:h?"Creating your chatbot \uD83E\uDD17":t}),(0,a.jsx)("p",{className:"text-xs lg:text-sm text-gray-500 dark:text-gray-500",children:h?(0,a.jsx)("span",{className:"block mb-4",children:"We are setting up your chatbot settings. Stay tight!"}):n})]})}function y(e){var t,n,h,v,l;let{title:s,description:i,disabled:o}=e,c=(0,m.Z)(),{currentTemplate:d}=(0,r.useContext)(f),u=(null==d?void 0:d.steps)?null==d?void 0:null===(t=d.steps)||void 0===t?void 0:t.indexOf(c.pathname):0;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("aside",{className:"hidden fixed top-0 h-full left-0 min-w-[30rem] max-w-[30rem] bg-gray-50 dark:bg-gray-950 border-r border-gray-200 dark:border-gray-800 overflow-hidden px-10 py-10 lg:flex flex-col justify-between",children:[(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"587.106",height:"945.001",viewBox:"0 0 587.106 945.001",className:"absolute left-0 top-0",children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:"linear-gradient",x1:"0.5",x2:"0.5",y2:"1",gradientUnits:"objectBoundingBox",children:[(0,a.jsx)("stop",{offset:"0",stopColor:"#fafafa",stopOpacity:"0"}),(0,a.jsx)("stop",{offset:"0.478",stopColor:"#b2b2b2",stopOpacity:"0.314"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#fafafa",stopOpacity:"0"})]})}),(0,a.jsx)("path",{id:"Subtraction_30","data-name":"Subtraction 30",d:"M4601.605,1973h-40v-39.581h40V1973Zm141.5-4.947h-1v-37.108h-45v37.108h-1v-37.108h-45v37.108h-1v-37.108h-45v37.108h-1v-37.108h-45v37.108h-1v-37.108h-45v37.108h-1v-37.108h-45v37.108h-1v-37.108h-45v37.108h-1v-37.108h-45v37.108h-1v-37.108h-45v37.108h-1v-37.108h-45v37.108h-1v-37.108h-45v37.108h-1v-37.108H4202v-.99h34.105v-44.529H4202v-.99h34.105v-44.531H4202v-.99h34.105V1794.39H4202v-.99h34.105v-44.529H4202v-.99h34.105v-44.529H4202v-.988h34.105v-44.529H4202v-.988h34.105v-44.532H4202v-.99h34.105V1566.8H4202v-.99h34.105V1521.28H4202v-.99h34.105v-44.528H4202v-.991h34.105v-44.528H4202v-.99h34.105v-44.531H4202v-.99h34.105v-44.528H4202v-.99h34.105v-44.531H4202v-.988h34.105V1248.17H4202v-.99h34.105v-44.529H4202v-.991h34.105v-44.528H4202v-.99h34.105v-44.529H4202v-.988h34.105V1066.1H4202v-.99h34.105V1028h1v37.106h45V1028h1v37.106h45V1028h1v37.106h45V1028h1v37.106h45V1028h1v37.106h45V1028h1v37.106h45V1028h1v37.106h45V1028h1v37.106h45V1028h1v37.106h45V1028h1v37.106h45V1028h1v37.106h45V1028h1v37.106h45V1028h1v.494H4789v939.063h.106v.494h-1v-37.108h-45v37.108Zm0-82.627h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm506-45.52v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm506-45.517v44.527h45V1794.39Zm-46,0v44.527h45V1794.39Zm-46,0v44.527h45V1794.39Zm-46,0v44.527h45V1794.39Zm-46,0v44.527h45V1794.39Zm-46,0v44.527h45V1794.39Zm-46,0v44.527h45V1794.39Zm-46,0v44.527h45V1794.39Zm-46,0v44.527h45V1794.39Zm-46,0v44.527h45V1794.39Zm-46,0v44.527h45V1794.39Zm-46,0v44.527h45V1794.39Zm506-45.519V1793.4h45v-44.529Zm-46,0V1793.4h45v-44.529Zm-46,0V1793.4h45v-44.529Zm-46,0V1793.4h45v-44.529Zm-46,0V1793.4h45v-44.529Zm-46,0V1793.4h45v-44.529Zm-46,0V1793.4h45v-44.529Zm-46,0V1793.4h45v-44.529Zm-46,0V1793.4h45v-44.529Zm-46,0V1793.4h45v-44.529Zm-46,0V1793.4h45v-44.529Zm-46,0V1793.4h45v-44.529Zm506-45.519h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm-46,0h0v44.529h45v-44.529Zm506-45.517v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm506-45.52v44.532h45v-44.532Zm-46,0v44.532h45v-44.532Zm-46,0v44.532h45v-44.532Zm-46,0v44.532h45v-44.532Zm-46,0v44.532h45v-44.532Zm-46,0v44.532h45v-44.532Zm-46,0v44.532h45v-44.532Zm-46,0v44.532h45v-44.532Zm-46,0v44.532h45v-44.532Zm-46,0v44.532h45v-44.532Zm-46,0v44.532h45v-44.532Zm-46,0v44.532h45v-44.532Zm506-45.519h0v44.529h45V1566.8Zm-46,0h0v44.529h45V1566.8Zm-46,0h0v44.529h45V1566.8Zm-46,0h0v44.529h45V1566.8Zm-46,0h0v44.529h45V1566.8Zm-46,0h0v44.529h45V1566.8Zm-46,0h0v44.529h45V1566.8Zm-46,0h0v44.529h45V1566.8Zm-46,0h0v44.529h45V1566.8Zm-46,0h0v44.529h45V1566.8Zm-46,0h0v44.529h45V1566.8Zm-46,0h0v44.529h45V1566.8Zm506-45.517v44.527h45V1521.28Zm-46,0v44.527h45V1521.28Zm-46,0v44.527h45V1521.28Zm-46,0v44.527h45V1521.28Zm-46,0v44.527h45V1521.28Zm-46,0v44.527h45V1521.28Zm-46,0v44.527h45V1521.28Zm-46,0v44.527h45V1521.28Zm-46,0v44.527h45V1521.28Zm-46,0v44.527h45V1521.28Zm-46,0v44.527h45V1521.28Zm-46,0v44.527h45V1521.28Zm506-45.517v44.528h45v-44.528h-45Zm-46,0v44.528h45v-44.528h-45Zm-46,0v44.528h45v-44.528h-45Zm-46,0v44.528h45v-44.528h-45Zm-46,0v44.528h45v-44.528h-45Zm-46,0v44.528h45v-44.528h-45Zm-46,0v44.528h45v-44.528h-45Zm-46,0v44.528h45v-44.528h-45Zm-46,0v44.528h45v-44.528h-45Zm-46,0v44.528h45v-44.528h-45Zm-46,0v44.528h45v-44.528h-45Zm-46,0v44.528h45v-44.528h-45Zm506-45.518v44.527h45v-44.528Zm-46,0v44.527h45v-44.528Zm-46,0v44.527h45v-44.528Zm-46,0v44.527h45v-44.528Zm-46,0v44.527h45v-44.528Zm-46,0v44.527h45v-44.528Zm-46,0v44.527h45v-44.528Zm-46,0v44.527h45v-44.528Zm-46,0v44.527h45v-44.528Zm-46,0v44.527h45v-44.528Zm-46,0v44.527h45v-44.528Zm-46,0v44.527h45v-44.528Zm506-45.52v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm506-45.517v44.527h45v-44.528h-45Zm-46,0v44.527h45v-44.528h-45Zm-46,0v44.527h45v-44.528h-45Zm-46,0v44.527h45v-44.528h-45Zm-46,0v44.527h45v-44.528h-45Zm-46,0v44.527h45v-44.528h-45Zm-46,0v44.527h45v-44.528h-45Zm-46,0v44.527h45v-44.528h-45Zm-46,0v44.527h45v-44.528h-45Zm-46,0v44.527h45v-44.528h-45Zm-46,0v44.527h45v-44.528h-45Zm-46,0v44.527h45v-44.528h-45Zm506-45.52v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm-46,0v44.53h45v-44.531Zm506-45.517V1292.7h45V1248.17Zm-46,0V1292.7h45V1248.17Zm-46,0V1292.7h45V1248.17Zm-46,0V1292.7h45V1248.17Zm-46,0V1292.7h45V1248.17Zm-46,0V1292.7h45V1248.17Zm-46,0V1292.7h45V1248.17Zm-46,0V1292.7h45V1248.17Zm-46,0V1292.7h45V1248.17Zm-46,0V1292.7h45V1248.17Zm-46,0V1292.7h45V1248.17Zm-46,0V1292.7h45V1248.17Zm506-45.519v44.529h45v-44.529h-45Zm-46,0v44.529h45v-44.529h-45Zm-46,0v44.529h45v-44.529h-45Zm-46,0v44.529h45v-44.529h-45Zm-46,0v44.529h45v-44.529h-45Zm-46,0v44.529h45v-44.529h-45Zm-46,0v44.529h45v-44.529h-45Zm-46,0v44.529h45v-44.529h-45Zm-46,0v44.529h45v-44.529h-45Zm-46,0v44.529h45v-44.529h-45Zm-46,0v44.529h45v-44.529h-45Zm-46,0v44.529h45v-44.529h-45Zm506-45.519v44.528h45v-44.528Zm-46,0v44.528h45v-44.528Zm-46,0v44.528h45v-44.528Zm-46,0v44.528h45v-44.528Zm-46,0v44.528h45v-44.528Zm-46,0v44.528h45v-44.528Zm-46,0v44.528h45v-44.528Zm-46,0v44.528h45v-44.528Zm-46,0v44.528h45v-44.528Zm-46,0v44.528h45v-44.528Zm-46,0v44.528h45v-44.528Zm-46,0v44.528h45v-44.528Zm506-45.519v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm-46,0v44.529h45v-44.529Zm506-45.518h0v44.53h45V1066.1Zm-46,0h0v44.53h45V1066.1Zm-46,0h0v44.53h45V1066.1Zm-46,0h0v44.53h45V1066.1Zm-46,0h0v44.53h45V1066.1Zm-46,0h0v44.53h45V1066.1Zm-46,0h0v44.53h45V1066.1Zm-46,0h0v44.53h45V1066.1Zm-46,0h0v44.53h45V1066.1Zm-46,0h0v44.53h45V1066.1Zm-46,0h0v44.53h45V1066.1Zm-46,0h0v44.53h45V1066.1Zm180.5,542.758h-40v-39.581h40v39.581Zm230-318.628h-40v-39.581h40v39.581Z",transform:"translate(-4202 -1028)",fill:"url(#linear-gradient)"})]}),(0,a.jsxs)("div",{className:"relative z-10 flex items-center space-x-3 -ml-2",children:["/new/success"!==c.pathname?(0,a.jsx)(g,{disabled:o}):(0,a.jsx)(Z.Z,{height:"32px",width:"32px",color:"#0d9488"}),(0,a.jsx)("p",{className:"text-sm",children:"/new/success"===c.pathname?"You are ready!":"Create a chatbot (Step ".concat(u+1," of ").concat((null==d?void 0:d.steps)?d.steps.length:"\uD83E\uDD14",")")})]}),(0,a.jsxs)("div",{className:"relative z-10",children:["/new/success"!==c.pathname&&(0,a.jsxs)("p",{className:"".concat(o&&"opacity-20"," text-xs text-gray-500 dark:text-gray-500 font-bold font-mono mb-6 uppercase tracking-widest"),children:["Step ",u+1]}),(0,a.jsx)("h1",{className:"".concat(o&&"opacity-20"," text-4xl mb-2"),children:s}),(0,a.jsx)("p",{className:"".concat(o&&"opacity-20"," text-sm max-w-md text-gray-500 dark:text-gray-500"),children:i}),(0,a.jsx)("div",{style:{gridTemplateColumns:"repeat(".concat((null==d?void 0:null===(n=d.steps)||void 0===n?void 0:n.length)+1,", minmax(0, 1fr))")},className:"".concat(o&&"opacity-20"," grid grid-cols-6 gap-4 mt-12"),children:[...Array((null==d?void 0:null===(h=d.steps)||void 0===h?void 0:h.length)||5).keys()].map(e=>(0,a.jsx)("div",{className:"".concat(e+1<=u+1?"bg-gray-500 dark:bg-gray-500":"bg-gray-200 dark:bg-gray-800"," ").concat(u+1===e+1?"col-span-2":"col-span-1"," rounded-full h-2")},e))})]})]}),(0,a.jsxs)("div",{className:"fixed w-full left-0 px-8 z-40 top-0 bg-white flex items-center justify-between space-x-6 py-4 lg:hidden border-b border-gray-100 dark:border-gray-900",children:[(0,a.jsxs)("div",{className:"relative z-10 flex items-center space-x-3 -ml-2",children:["/new/success"!==c.pathname?(0,a.jsx)(g,{disabled:o}):(0,a.jsx)(Z.Z,{height:"32px",width:"32px",color:"#0d9488"}),(0,a.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-500",children:"/new/success"===c.pathname?"You are ready!":"Create a chatbot"})]}),"/new/success"!==c.pathname&&(0,a.jsx)("div",{style:{gridTemplateColumns:"repeat(".concat((null==d?void 0:null===(v=d.steps)||void 0===v?void 0:v.length)||1,", minmax(0, 1fr))")},className:"grid gap-2",children:[...Array((null==d?void 0:null===(l=d.steps)||void 0===l?void 0:l.length)||1).keys()].map((e,t)=>(0,a.jsx)("div",{className:"".concat(e+1<=u+1?"bg-white dark:bg-black border border-indigo-400 dark:border-indigo-600 text-indigo-600 font-semibold ring ring-indigo-50":"bg-gray-100 dark:bg-gray-900 opacity-40"," col-span-1 h-8 w-8 uppercase rounded-lg flex items-center justify-center text-[0.6rem] font-mono tracking-widest"),children:t+1},e))})]})]})}function j(e){var t,n;let{disabled:h}=e,v=(0,m.Z)(),{currentTemplate:l,loading:i,handleSubmit:o,form:c}=(0,r.useContext)(f),d=null==l?void 0:null===(t=l.steps)||void 0===t?void 0:t.indexOf(v.pathname),u=(null==l?void 0:null===(n=l.steps)||void 0===n?void 0:n.length)-1===d;return(0,a.jsxs)("div",{className:"fixed bottom-0 left-0 lg:relative z-20 flex items-stretch lg:flex-row justify-between mt-10 w-full py-4 lg:py-0 px-6 lg:px-0 border-t border-gray-100 dark:border-gray-900 lg:border-transparent lg:pb-20 gap-3 bg-white dark:bg-black",children:["/new"!==v.pathname&&(0,a.jsxs)("button",{className:"plain-button justify-center flex items-center",type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),v.replace(l.steps[d-1])},disabled:i,children:[(0,a.jsx)(x.Z,{color:"",height:"14px",width:"14px",className:"mr-1 -ml-1"}),"Previous"]}),(0,a.jsx)("button",{className:"indigo-button lg:ml-auto flex items-center justify-center flex-1",type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),(!c||c.checkValidity())&&(u?o():v.replace(l.steps[d+1]))},disabled:h||i,children:u?i?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(s.Z,{})}):"Create":(0,a.jsxs)(a.Fragment,{children:["Next Step",(0,a.jsx)(p.Z,{color:"",height:"14px",width:"14px",className:"ml-1 -mr-1"})]})})]})}function w(e){let{breadcrumbs:t,title:n,description:c,keywords:d,image:u,children:Z}=e,x=(0,m.Z)(),{code:p,fetch:g}=(0,o.Z)({loadingMessage:!0,failureMessage:!0}),[b,j]=(0,r.useState)({});(0,r.useEffect)(()=>{},[b]);let[w,V]=(0,r.useState)({});(0,r.useEffect)(()=>{},[w]);let[k,N]=(0,r.useState)({});(0,r.useEffect)(()=>{j(k.options||{}),V(k.values||{})},[k]);let C=!("/new"!==x.pathname&&!k.templateId);(0,r.useEffect)(()=>{C||x.push("/new?".concat(new URLSearchParams({...x.query,template:x.pathname.split("/")[2]}).toString()))},[C,x]);let D=(0,r.useRef)(),[H,S]=(0,r.useState)(!1),L=(0,r.useCallback)(async function(){S(!0);try{await k.task({options:b,setOptions:j,values:w,setValues:V,fetch:g})}catch(e){h.ZP.error(e.message||"Generic error"),S(!1),await (0,v.Xs)(e);return}x.replace("/new/success")},[k,g,b,x,w]),M=(0,r.useMemo)(()=>({currentTemplate:k,setCurrentTemplate:N,options:b,setOptions:j,values:w,setValues:V,loading:H,setLoading:S,handleSubmit:L,form:D.current}),[k,b,w,H,L]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Z,{breadcrumbs:t||["ChatBotKit"],title:n,description:c,keywords:d,image:u}),(0,a.jsxs)(f.Provider,{value:M,children:[(0,a.jsx)(l.Z,{code:p}),C?(0,a.jsxs)("main",{className:"relative bg-white dark:bg-black flex h-screen items-stretch",children:[(0,a.jsx)("div",{className:"hidden lg:block min-w-[30rem] max-w-[30rem]"}),(0,a.jsx)("div",{className:"md:w-[50rem] w-full mx-auto mt-0 lg:mt-32 md:px-8",children:(0,a.jsxs)("div",{className:"pt-16 w-full lg:pt-0 pb-[10rem] md:pb-0",children:[(0,a.jsx)(y,{title:n,description:c}),(0,a.jsx)("form",{ref:D,onSubmit:e=>e.preventDefault(),children:Z})]})})]}):(0,a.jsx)("main",{className:"flex items-center space-x-4 h-screen justify-center flex-col space-y-4",children:(0,a.jsx)(s.Z,{})})]})]})}},19689:function(e,t,n){var a=n(50959);let r=a.forwardRef(function(e,t){let{title:n,titleId:r,...h}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":r},h),n?a.createElement("title",{id:r},n):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"}))});t.Z=r},94513:function(e,t,n){var a=n(50959);let r=a.forwardRef(function(e,t){let{title:n,titleId:r,...h}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":r},h),n?a.createElement("title",{id:r},n):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"}))});t.Z=r},57174:function(e,t,n){var a=n(50959);let r=a.forwardRef(function(e,t){let{title:n,titleId:r,...h}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":r},h),n?a.createElement("title",{id:r},n):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=r},64528:function(e,t,n){var a=n(50959);let r=a.forwardRef(function(e,t){let{title:n,titleId:r,...h}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:t,"aria-labelledby":r},h),n?a.createElement("title",{id:r},n):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});t.Z=r},61623:function(e,t,n){n.d(t,{CD:function(){return r},LU:function(){return i},PY:function(){return v},QS:function(){return h},Sy:function(){return l},cp:function(){return a},vj:function(){return s}});let a=Math.round(Date.now()/864e5);function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=new Date(e);return t.setHours(0,0,0,0),t}function h(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=new Date(e);return t.setDate(t.getDate()+1),t.setHours(0,0,0,0),t}function v(e,t){e=new Date(e);let n=6e4*t;return new Date(Math.round(e.getTime()/n)*n)}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{numeric:"auto",style:"long"};e=new Date(e).getTime();let n=new Intl.RelativeTimeFormat("en-US",t),a=e-Date.now();for(let[e,t]of Object.entries({year:3154e7,month:2628e6,week:6048e5,day:864e5,hour:36e5,minute:6e4,second:1e3})){let r=a/t,h=a>0?Math.floor(r):Math.ceil(r);if(Math.abs(h)>=1||"second"===e)return n.format(h,e)}return"now"}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",weekday:"short",day:"numeric",hour:"numeric",minute:"numeric"})}function i(e){return e<0&&(e=-e),Object.entries({day:Math.floor(e/864e5),hour:Math.floor(e/36e5)%24,minute:Math.floor(e/6e4)%60,second:Math.floor(e/1e3)%60,millisecond:Math.floor(e)%1e3}).filter(e=>0!==e[1]).map(e=>{let[t,n]=e;return"".concat(n," ").concat(t).concat(1!==n?"s":"")}).join(", ")}},72680:function(e,t,n){n.d(t,{ZP:function(){return a}});let a=globalThis.fetch||(()=>{throw Error("[node-fetch-native] Failed to fetch: `globalThis.fetch` is not available!")})}}]);