import{t as e}from"./rolldown-runtime.BB3S47xo.mjs";import{A as t,B as n,C as r,E as i,F as a,H as o,L as s,N as c,P as l,V as u,_ as d,a as f,c as p,i as m,k as h,l as g,o as _,w as ee,x as te,y as v}from"./react.UZZKdtaS.mjs";import{C as y,N as b,h as x,n as S,t as C}from"./motion.B1SDLVbr.mjs";import{Dt as w,T,Tt as ne,Y as re,Z as E,bt as ie,c as D,j as O}from"./framer.Ypvh2MRC.mjs";function k(e){return p(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 256 256`,width:e.width,height:e.height,style:{...e.style,color:e.color},children:p(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`,fill:`currentColor`})})}function A(e){return g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 256 256`,...e,children:[p(`rect`,{width:`256`,height:`256`,fill:`none`}),p(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,130.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32L139.31,128Z`,fill:`currentColor`})]})}function ae(e){return g(`div`,{style:{position:`relative`,...e.style},children:[p(y.div,{animate:{rotate:360},transition:{ease:`linear`,duration:1,repeat:1/0},style:{borderRadius:100,backgroundImage:`conic-gradient(from 270deg, transparent 0%, ${e.color} 100%)`,width:`100%`,height:`100%`}}),p(`div`,{style:{backgroundColor:e.backgroundColor,borderRadius:100,position:`absolute`,top:3,left:3,bottom:3,right:3}})]})}var j=e((()=>{_(),C()}));function M(e){this.ready=new Promise((e,t)=>{var n=o.indexedDB.open(location.origin);n.onupgradeneeded=e=>{this.db=e.target.result,this.db.createObjectStore(`store`)},n.onsuccess=t=>{this.db=t.target.result,e()},n.onerror=e=>{this.db=e.target.result,t(e)}})}var oe=e((()=>{n(),M.prototype.get=function(e){return this.ready.then(()=>new Promise((t,n)=>{var r=this.getStore().get(e);r.onsuccess=e=>t(e.target.result),r.onerror=n}))},M.prototype.getStore=function(){return this.db.transaction([`store`],`readwrite`).objectStore(`store`)},M.prototype.set=function(e,t){return this.ready.then(()=>new Promise((n,r)=>{var i=this.getStore().put(t,e);i.onsuccess=n,i.onerror=r}))},M.prototype.delete=function(e,t){o.indexedDB.deleteDatabase(location.origin)}}));async function N(e,t,n=new M(`cache`)){let r=e;await n.set(r,t)}async function se(e,t=new M(`cache`)){let n=e;return await t.get(n)||null}var ce=e((()=>{oe()})),le=e((()=>{ce()}));function P(e){return!e||e===`default`}function F(e){return P(e)?pe:`${pe}-${e}`}function I(e){return P(e)?me:`${me}-${e}`}async function ue(e,t){let n=I(e),r=F(e),[i,a]=await Promise.all([se(n),se(r)]);return a?{status:t&&i?.indexHash===t?`fresh`:`stale`,searchIndex:a,indexHash:i?.indexHash}:{status:`miss`}}function de(e,t,n){N(F(e),t);let r={version:fe,timestamp:Date.now(),indexHash:n};N(I(e),r)}var fe,pe,me,L=e((()=>{le(),fe=1,pe=`searchIndexCache`,me=`searchCacheMetadata`})),he,ge=e((()=>{he={"/":{version:1,title:`Example Search Result`,description:`Description of search result.`,keywords:``,h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],p:[],url:`/example-url/`,codeblock:[]},"/example-1":{version:1,title:`Publish your Site to Search`,description:`Try Site Search to instantly search your Framer site content.`,keywords:``,h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],p:[],url:`/example-url/1/`,codeblock:[]},"/example-2":{version:1,title:`Customise your Site Search`,description:`Personalize everything from corner radius, to icon weight.`,keywords:``,h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],p:[],url:`/example-url/2/`,codeblock:[]}}})),R,_e,ve,z,B=e((()=>{R=new Uint32Array(65536),_e=(e,t)=>{let n=e.length,r=t.length,i=1<{let n=t.length,r=e.length,i=[],a=[],o=Math.ceil(n/32),s=Math.ceil(r/32);for(let e=0;e>>e&1,c=i[e/32|0]>>>e&1,l=n|o,u=((n|c)&s)+s^s|n|c,d=o|~(u|s),f=s&u;d>>>31^r&&(a[e/32|0]^=1<>>31^c&&(i[e/32|0]^=1<>>e&1,s=i[e/32|0]>>>e&1,c=n|l,d=((n|s)&u)+u^u|n|s,f=l|~(d|u),m=u&d;p+=f>>>r-1&1,p-=m>>>r-1&1,f>>>31^o&&(a[e/32|0]^=1<>>31^s&&(i[e/32|0]^=1<{if(e.lengtht?r+`…`:r}function xe(e){return Object.keys(e).length===0}function H(e){function t(...e){console.log(Date.now(),...e)}function n(e){console.time(e)}function r(e){console.timeEnd(e)}function i(){}return e?{log:t,time:n,timeEnd:r}:{log:i,time:i,timeEnd:i}}function Se(e){return e.inputFont?.fontFamily?e.inputFont.fontFamily:e.titleFont?.fontFamily?e.titleFont.fontFamily:e.subtitleFont?.fontFamily?e.subtitleFont.fontFamily:G}function U(e){return`${e}Animation`}function Ce(){let e=De?.querySelector(ke);if(e)return e.getAttribute(`content`)}function we(e,t){if(!t)return e;let n=`/${t}`;if(e.startsWith(n))return e.slice(n.length)}function Te(e){if(`scheduler`in o){let t={priority:e?`user-blocking`:`user-visible`};if(`yield`in scheduler)return scheduler.yield(t);if(`postTask`in scheduler)return scheduler.postTask(()=>{},t)}return e?Promise.resolve():new Promise(e=>{setTimeout(e,0)})}var W,Ee,G,De,Oe,ke,Ae,K=e((()=>{n(),W=(()=>{try{return o!==void 0&&o.localStorage.__framerDebugSearch===`true`}catch{}})(),Ee=/[A-Z]{2,}|[A-Z][a-z]+|[a-z]+|[A-Z]\d*|\d+/gu,G=`"Inter", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"`,De=typeof document<`u`?document:null,Oe=o===void 0?null:o,ke=`meta[name="framer-search-index"]`,Ae=()=>Ce()===`limit-reached`})),je,Me,Ne,Pe=e((()=>{E(),C(),i(),qe(),L(),B(),K(),{log:je,time:Me,timeEnd:Ne}=H(W),(()=>{try{let e=RegExp(`[\\s.,;!?\\p{P}\\p{Z}]+(?{n(),(function(e){var t=e.isTouch=()=>`ontouchstart`in o||u.maxTouchPoints>0,n=e.isChrome=()=>u.userAgent.toLowerCase().includes(`chrome/`),r=e.isWebKit=()=>u.userAgent.toLowerCase().includes(`applewebkit/`),i=e.isSafari=()=>r()&&!n();e.isSafariDesktop=()=>i()&&!t(),e.isWindows=()=>/Win/.test(u.platform),e.isMacOS=()=>/Mac/.test(u.platform)})(q||={})})),Fe,Ie=e((()=>{i(),J(),Fe=(e,n)=>{let r=t(null);return l(t=>{if(!q.isSafari())return e(t);let i=n||r,{clientX:a,clientY:o}=t,s=i.current;if(i.current={x:a,y:o},s&&(s.x!==a||s.y!==o))return e(t)},[n,e])}}));function Le(e,t,{offsetTop:n,offsetBottom:r}){let i=e.getBoundingClientRect(),a=t.getBoundingClientRect();if(i.topa.bottom){let e=a.top-i.top,o=t.scrollTop-e-n,s=i.bottom-a.bottom,c=t.scrollTop+s+r;t.scrollTop=Math.min(o,c)}}var Re=e((()=>{})),ze,Be,Ve,He,Ue,We,Ge,Ke,qe=e((()=>{n(),_(),Pe(),i(),J(),C(),j(),K(),Ie(),E(),(function(e){e.Icon=`icon`,e.Text=`text`,e.None=`none`})(ze||={}),(function(e){e.None=`none`,e.FullWidth=`fullWidth`,e.Contained=`contained`})(Be||={}),(function(e){e.H1=`h1`,e.Title=`title`})(Ve||={}),(function(e){e.Description=`description`,e.Path=`path`})(He||={}),(function(e){e.FullWidth=`fullWidth`,e.Contained=`contained`})(Ue||={}),(function(e){e.Sidebar=`Sidebar`,e.FixedTop=`FixedTop`,e.QuickMenu=`QuickMenu`})(We||={}),(function(e){e.Icon=`icon`,e.Text=`text`})(Ge||={}),(function(e){e.Default=`default`,e.Custom=`custom`})(Ke||={})})),Je,Ye,Xe,Ze=e((()=>{E(),C(),i(),qe(),L(),B(),K(),{log:Je,time:Ye,timeEnd:Xe}=H(W),(()=>{try{let e=RegExp(`[\\s.,;!?\\p{P}\\p{Z}]+(?{n(),_(),Ze(),i(),J(),C(),j(),K(),Ie(),E(),(function(e){e.Icon=`icon`,e.Text=`text`,e.None=`none`})(Qe||={}),(function(e){e.None=`none`,e.FullWidth=`fullWidth`,e.Contained=`contained`})($e||={}),(function(e){e.H1=`h1`,e.Title=`title`})(et||={}),(function(e){e.Description=`description`,e.Path=`path`})(tt||={}),(function(e){e.FullWidth=`fullWidth`,e.Contained=`contained`})(nt||={}),(function(e){e.Sidebar=`Sidebar`,e.FixedTop=`FixedTop`,e.QuickMenu=`QuickMenu`})(rt||={}),(function(e){e.Icon=`icon`,e.Text=`text`})(it||={}),(function(e){e.Default=`default`,e.Custom=`custom`})(at||={})})),st,ct,lt,ut=e((()=>{E(),C(),i(),ot(),L(),B(),K(),{log:st,time:ct,timeEnd:lt}=H(W),(()=>{try{let e=RegExp(`[\\s.,;!?\\p{P}\\p{Z}]+(?{n(),_(),ut(),i(),J(),C(),j(),K(),Ie(),E(),(function(e){e.Icon=`icon`,e.Text=`text`,e.None=`none`})(dt||={}),(function(e){e.None=`none`,e.FullWidth=`fullWidth`,e.Contained=`contained`})(ft||={}),(function(e){e.H1=`h1`,e.Title=`title`})(pt||={}),(function(e){e.Description=`description`,e.Path=`path`})(mt||={}),(function(e){e.FullWidth=`fullWidth`,e.Contained=`contained`})(ht||={}),(function(e){e.Sidebar=`Sidebar`,e.FixedTop=`FixedTop`,e.QuickMenu=`QuickMenu`})(gt||={}),(function(e){e.Icon=`icon`,e.Text=`text`})(_t||={}),(function(e){e.Default=`default`,e.Custom=`custom`})(vt||={})}));function bt(e){return e.split(It)}function xt(e){let t=bt(e).filter(e=>e.trim()&&e.length>0);return new Set(t)}function St(e){return Array.isArray(e)?e.map(St):e.normalize(`NFD`).replace(Lt,``).toLowerCase()}function Ct(e){let t=Rt.get(e);if(t)return t;let n=wt(e);return Rt.set(e,n),n}function wt(e){let t={};for(let n in e)if(e.hasOwnProperty(n)){let r=e[n];if(typeof r==`string`){t[n]=St(r);continue}if(Array.isArray(r)){t[n]=St(r);continue}t[n]=r}return t}function Tt(e,t,n){let r={...e};return tr.end&&(r.end=n),r}function Et(e,t,n,r){let i=0,a={title:{start:1/0,end:0},description:{start:1/0,end:0}},o=xt(e.url);if(o.has(t)&&(i+=10),n.size===1&&o.size===1&&o.values().next().value===t&&(i+=i*5),i>0){let t=e.url.split(`/`).length;i+=x(10-t,0,t)}let s=xt(e.title);s.has(t)&&(i+=10);let c=e.title.indexOf(t);c!==-1&&(i+=10,a.title=Tt(a.title,c,c+t.length)),z(e.title,r)<=2&&(i+=i*10);for(let e of s)z(t,e)<=2&&(i+=10);let l=[...e.h1,...e.h2,...e.h3,...e.h4,...e.h5,...e.h6];for(let e of l){let n=xt(e);z(e,r)<=2&&(i+=i*10),e.startsWith(t)&&(i+=10),n.has(t)&&(i+=10),e.includes(t)&&(i+=1);for(let e of n)z(t,e)<=2&&(i+=1)}let u=e.description.indexOf(t);u!==-1&&(i+=10,a.description=Tt(a.description,u,u+t.length));for(let n of e.p)n.includes(t)&&(i+=.5);for(let n of e.codeblock)z(n,r)<=2&&(i*=10),n.includes(r)&&(i+=10),n.includes(t)&&(i+=.5);return{score:i,match:a}}function Dt(e,t){let n=Ct(e),r=xt(t),i=0;for(let e of r){let{score:a}=Et(n,e,r,t);i+=a}return i}function Ot(e,t,n){let[r,i]=s(null),[,o]=v();return a(()=>{let r=new AbortController;return kt(e,t,n,r.signal).then(e=>{r.signal.aborted||o(()=>{i(e)})}).catch(e=>{e.name!==`AbortError`&&console.error(`Search failed:`,e)}),()=>{r.abort()}},[e,t]),{results:r??[]}}async function kt(e,t,n,r){let i=Oe?.location.pathname;Pt(`query`);let a=St(t),o=[],s=Object.values(e),c=performance.now()+zt;async function l(){performance.now()>=c&&(await Te(),c=performance.now()+zt)}for(let e=0;e=c&&(await l(),c=performance.now()+zt),r?.aborted)return[];let t=s[e],u=Dt(t,a);if(u>(n.minimumScore||0)&&(!i||t.url!==i)){let e=t.h1.length&&t.h1[0],r=n?.titleType===pt.Title?t.title:e||t.title;o.push({url:t.url,title:r,description:t.description,body:[...t.p,t.codeblock].join(` `),score:u})}}return await l(),r?.aborted||(o.sort((e,t)=>t.score-e.score),Ft(`query`),await l(),r?.aborted)?[]:o.slice(0,20)}function At(e,t,n){let r={},i=t.includes(`:`),a=t.split(`:`)[0],o=a.length>1?a:``;for(let t in e)we(t,n).startsWith(o)&&(i&&t.length<=o.length||(r[t]=e[t]));return r}function jt(e,t){let[n,r]=s({}),[i,o]=s(`loading`),{results:c}=Ot(n,e,t),{activeLocale:l}=ie(),u=l?.id;function d(e,n={ignoreScope:!1}){let i=e;t.urlScope&&!n.ignoreScope&&(i=At(e,t.urlScope,l?.slug),Y(`Using URL scope`,t.urlScope)),r(i)}return a(()=>{async function e(){o(`loading`);let e=Mt(`framer-search-index`);if(!e){o(`no-meta-tag-found`),d(he,{ignoreScope:!0}),Y(`No meta tag found`);return}let t=await ue(u,e);if(t.status===`fresh`){d(t.searchIndex),o(`success`),Y(`Using fresh cached index`);return}t.status===`stale`&&(d(t.searchIndex),o(`loading-with-cache`),Y(`Using stale cached index while loading a fresh one`));let n=Nt(e,u),r=await fetch(n);if(r.ok){let t=await r.json();d(t),de(u,t,e),o(`success`),Y(`Using downloaded index`);return}if(!(r.status===403||r.status===404))throw Error(r.statusText);Y(`Index not found`);let i=Mt(`framer-search-index-fallback`);if(!i){t.status===`miss`?(o(`pending-index-generation`),Y(`No fallback, no cache`)):(o(`success`),Y(`No fallback, using cache`));return}if(t.status===`stale`&&t.indexHash===i){o(`success`),Y(`Using cached fallback index`);return}let a=Nt(i,u),s=await fetch(a);if(s.ok){let e=await s.json();d(e),de(u,e,i),o(`success`),Y(`Using downloaded fallback index`);return}t.status===`miss`?(o(`pending-index-generation`),Y(`Fallback failed, no cache`)):(o(`success`),Y(`Fallback failed, using cache`))}e().catch(e=>{o(`error`),Y(`Failed to load search index`,e)})},[u]),Y({status:i,results:c}),{results:c,status:i}}function Mt(e){return De?.querySelector(`meta[name="${e}"]`)?.getAttribute(`content`)}function Nt(e,t){return P(t)?e:e.replace(`.json`,`-${t}.json`)}var Y,Pt,Ft,It,Lt,Rt,zt,Bt=e((()=>{E(),C(),i(),yt(),L(),ge(),B(),K(),{log:Y,time:Pt,timeEnd:Ft}=H(W),It=(()=>{try{let e=RegExp(`[\\s.,;!?\\p{P}\\p{Z}]+(?e.stopPropagation(),children:[e===`QuickMenu`&&p(Ut,{onClick:r}),p(y.div,{initial:u,animate:{opacity:1,scale:1,x:0,y:0,rotate:0},transition:u?u.transition:void 0,exit:{opacity:0,transition:{duration:0}},style:c,children:i})]})}function Gt({layoutType:e,theme:t,children:n,heightIsStatic:r,heightTransition:i,heightDeps:a}){let o={willChange:`transform`,backgroundColor:t.backgroundColor,color:t.foregroundColor,borderRadius:e===`QuickMenu`?t.borderRadius:0,width:`100%`,display:`flex`,flexDirection:`column`,overflow:`hidden`,boxShadow:e===`Sidebar`?void 0:t.shadow,maxHeight:e===`QuickMenu`?`min(${Xt}px, calc(100vh - 30px))`:void 0},[s,c]=b();return ee(()=>{if(e!==`QuickMenu`||r)return;let t=s.current.offsetHeight;s.current.style.height=`auto`;let n=s.current.offsetHeight;s.current.style.height=t+`px`,c(s.current,{height:[t,n]},i)},a),p(`div`,{ref:s,role:`dialog`,className:e===`FixedTop`?`__framer-max-height-80dvh`:void 0,style:o,children:n})}function Kt({status:e,layoutType:t,theme:n}){let r=Math.floor(n?n.horizontalSpacing*Zt:0),i={...an,userSelect:`none`,fontFamily:Se(n),paddingLeft:n&&n.horizontalSpacing,paddingRight:n&&n.horizontalSpacing,fontWeight:500,lineHeight:`calc(${n.inputFontSize} * 2)`,paddingTop:r,paddingBottom:r,...n.titleFont,zIndex:n.zIndex+1,maxWidth:t===`FixedTop`?`none`:n.width,width:t===`FixedTop`?`calc(100% - ${r*2}px`:`100%`,boxShadow:t!==`Sidebar`&&an.boxShadow,borderRadius:t!==`Sidebar`&&n.borderRadius};return e===`no-meta-tag-found`?p(`div`,{style:i,children:t===`FixedTop`?`Preview Mode`:`Preview Mode. Publish your Site to Search.`}):e===`pending-index-generation`?p(`div`,{style:i,children:`Site is being indexed`}):null}function qt(e,t){switch(e){case`Sidebar`:return{...cn,width:t.width};case`FixedTop`:return ln;case`QuickMenu`:return{...un,width:t.width}}}function Jt(e){let{layoutType:n,theme:r,urlScope:i,inputOptions:c,backdropOptions:u,modalOptions:d,resultOptions:f,onDismiss:m}=e,{activeLocale:_}=ie();_?.id;let ee=_?.slug,te=t(),v=t(),y=t(),[b,S]=s({index:0,scroll:!0}),C=t(null),[w,T]=s(q.isTouch),[E,D]=s(``),O=h(E),{results:k,status:A}=jt(O,{minimumScore:0,urlScope:i,titleType:f.titleType}),ae=k[b.index],j=Math.floor(r?r.horizontalSpacing*Zt:0);a(()=>{S({index:0,scroll:!0})},[O]);let M=l((e,t)=>{e.pointerType===`touch`&&(T(!0),S({index:t,scroll:!1}))},[]),oe=l((e,t)=>{S(e=>e.index===t?e:{index:t,scroll:!1})},[]),N=ne(),se=l(async e=>{if(A!==`no-meta-tag-found`)try{let{routeId:t,pathVariables:n}=re(N.routes,e),r=N.getRoute?.(t);m(),await r?.page?.preload?.(),N.navigate?.(t,null,n,!1)}catch{o.location.href=e}},[A]),ce=e=>{let t=k.length-1;switch(e.code){case`ArrowUp`:if(e.preventDefault(),w){T(!1);break}S(e=>({index:x(0,t,e.index-1),scroll:!0}));break;case`ArrowDown`:if(e.preventDefault(),w){T(!1);break}S(e=>({index:x(0,t,e.index+1),scroll:!0}));break;case`Escape`:break;case`Enter`:ae&&se(ae.url);break;default:e.stopPropagation()}},le=k.length===0&&O.length>1&&A!==`loading`,P=!!((O.length>0&&k.length>0||le)&&A!==`loading`&&e.inputOptions&&e.inputOptions.dividerType!==`none`),F=!!(e.resultOptions&&e.resultOptions.itemType===`contained`),I=F?r.spacing:10,ue=P&&F?I+r.gapBetweenResults*2:0;return a(()=>{if(!b.scroll)return;let e=v.current;e&&Le(e,y.current,{offsetTop:P&&F?ue:0,offsetBottom:F?I:0})},[b]),g(Wt,{layoutType:n,modalOptions:d,theme:r,onKeyDown:ce,onDismiss:m,children:[g(Gt,{layoutType:n,theme:r,heightIsStatic:d.heightIsStatic,heightTransition:d.heightTransition,heightDeps:[k.length,le],children:[p(Qt,{autofocus:!0,ref:te,onChange:D,value:E,theme:r,status:A,iconType:c.iconOptions.iconType,placeholder:c.placeholderOptions.placeholderText,clearButtonType:c?c.clearButtonType:void 0,clearButtonText:c.clearButtonText}),P&&p(Ht,{theme:r,type:c.dividerType}),p(rn,{ref:y,theme:r,children:g(`ul`,{"aria-live":`polite`,style:{display:`flex`,flexDirection:`column`,width:`calc(100% - ${r.scrollBarWidth}px)`,padding:0,paddingTop:ue,paddingBottom:k.length&&F?I:0,gap:r.gapBetweenResults,margin:0},children:[k.map((t,n)=>{let i=n===b.index;return p(tn,{ref:i?v:null,index:n,result:t,prevMousePositionRef:C,selected:!w&&i,type:e.resultOptions.itemType,subtitleType:e.resultOptions.subtitleOptions.subtitleType,theme:r,localeSlug:ee,onMouseMove:oe,onPointerDown:M,onNavigateTo:se},t.url)}),le&&p(`li`,{style:{paddingTop:j-ue,paddingBottom:j,lineHeight:`2em`,paddingLeft:r&&r.horizontalSpacing,paddingRight:r&&r.horizontalSpacing,height:`100%`},children:p(`h3`,{style:{...on,textAlign:`center`,lineHeight:`calc(${r.inputFontSize} * 2)`,color:r.subtitleColor,...r.titleFont},children:`No results`})})]})})]}),p(Kt,{status:A,layoutType:n,theme:r})]})}var Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un,X,Z,dn,fn,pn,Q,mn,$,hn=e((()=>{n(),_(),Bt(),i(),J(),C(),j(),K(),Ie(),Re(),E(),Yt=120,Xt=496,Zt=.6,Qt=d(function(e,n){let{value:i=``,status:o,autofocus:c,theme:l,placeholder:u,iconType:d,clearButtonType:f,onChange:m}=e,[h,_]=s(i),[ee,v]=s(!1),y=t();te(n,()=>y.current),r.useLayoutEffect(()=>()=>{let e=y.current;!e||e!==document.activeElement||e.blur()},[]);let b=()=>{y.current&&y.current.focus()},x=()=>{_(``)};a(()=>{m(h)},[h]),h.length;let S=h.length>0&&f&&f!==`none`,C=Math.floor(l?l.horizontalSpacing*Zt:0),w=d===`custom`&&l.inputIconImage?p(`img`,{alt:`icon alongside the Site Search input`,src:l.inputIconImage.src,width:l.inputIconSize,height:l.inputIconSize,decoding:`async`}):p(k,{color:l.inputIconColor,width:l.inputIconSize,height:l.inputIconSize});return g(`div`,{role:`search`,style:{...$t,fontFamily:Se(l),paddingLeft:l&&l.horizontalSpacing,paddingRight:l&&l.horizontalSpacing,gap:12,paddingTop:C,paddingBottom:C,touchAction:`none`},onClick:b,children:[p(`div`,{style:{flexShrink:0,display:`flex`},children:o===`loading`&&h?p(ae,{color:l.inputIconColor,backgroundColor:l.backgroundColor,style:{height:l&&l.inputIconSize,width:l&&l.inputIconSize}}):w}),p(`input`,{ref:y,spellCheck:!1,autoFocus:c,style:{...en,WebkitTapHighlightColor:`rgba(0,0,0,0)`,color:l.foregroundColor,lineHeight:`2em`,verticalAlign:`baseline`,...l.titleFont,...l.inputFont,fontSize:l.inputFontSize,"--framer-search-placeholder-color":l.placeholderColor},onFocus:()=>{let e=document.documentElement.scrollTop;document.documentElement.scrollTop=e},placeholder:u,value:h,onChange:()=>_(y.current.value)}),S&&p(Vt,{theme:l,type:e.clearButtonType,text:e.clearButtonText,onClick:x})]})}),$t={display:`inline-flex`,alignItems:`center`,flexShrink:0},en={outline:`none`,border:`none`,background:`transparent`,fontWeight:500,height:`2em`,padding:0,width:`100%`},tn=r.memo(r.forwardRef(function(e,t){let{index:n,result:r,prevMousePositionRef:i,type:a=`contained`,subtitleType:o=`path`,selected:s=!1,theme:l,localeSlug:u,style:d,onMouseMove:f,onPointerDown:m,onNavigateTo:h}=e,{url:_,title:ee,score:te}=r,v=c(()=>we(_,u),[_,u]),y=Fe(e=>f(e,n),i),b=a===`contained`,S=b?x(0,1/0,l.borderRadius-l.spacing):0,C=o===`path`?v:be(r.description,Yt);return p(`a`,{ref:t,style:{textDecoration:`none`},href:r.url,onClick:e=>{e.preventDefault(),h(r.url)},onMouseMove:y,onMouseDown:e=>{e.preventDefault()},onPointerDown:e=>m(e,n),children:g(`li`,{style:{...sn,...d,paddingTop:b?12:16,paddingBottom:b?12:16,color:l.foregroundColor,position:`relative`,paddingLeft:l&&l.horizontalSpacing,paddingRight:l&&l.horizontalSpacing},children:[p(`div`,{style:{backgroundColor:l.foregroundColor,position:`absolute`,opacity:s?.06:0,borderRadius:S,left:l&&b?l.spacing:0,right:l&&b?l.spacing:0,top:0,bottom:0}}),g(`div`,{style:{display:`flex`,flexDirection:`column`,overflow:`hidden`,gap:4},children:[p(`h3`,{style:{...on,...l.titleFont,lineHeight:`1.4em`},children:ee}),g(`p`,{style:{margin:0,color:l.subtitleColor,...l.subtitleFont,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,lineHeight:`1.4em`},children:[W?te:``,` `,C]})]})]},r.url)})})),nn={display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`flex-start`,gap:15,overflow:`visible`},rn=r.forwardRef(function({theme:e,children:t},n){let i=q.isTouch(),[a,o]=r.useState(!0);return r.useEffect(()=>{if(!i)return;let e=n.current;e&&o(e.scrollHeight>e.clientHeight)}),p(`div`,{ref:n,style:{width:`calc(100% + ${e.scrollBarWidth}px)`,overflowY:`scroll`,overflowX:`hidden`,overscrollBehavior:`contain`,touchAction:a?void 0:`none`,marginTop:-1},children:t})}),an={backgroundColor:`#B5B5B5`,color:`#FFF`,boxShadow:`0px 20px 40px 0px rgba(0, 0, 0, 0.25)`,fontFamily:`inherit`,textAlign:`center`,fontSize:13,padding:`8px 0`},on={textOverflow:`ellipsis`,maxWidth:`100%`,overflow:`hidden`,fontWeight:500,whiteSpace:`nowrap`,flex:1,margin:0},sn={padding:`16px 20px`,listStyle:`none`,fontWeight:500},cn={left:0,width:500},ln={top:0,width:`100%`},un={width:500},(function(e){e.Icon=`icon`,e.Text=`text`,e.None=`none`})(X||={}),(function(e){e.None=`none`,e.FullWidth=`fullWidth`,e.Contained=`contained`})(Z||={}),(function(e){e.H1=`h1`,e.Title=`title`})(dn||={}),(function(e){e.Description=`description`,e.Path=`path`})(fn||={}),(function(e){e.FullWidth=`fullWidth`,e.Contained=`contained`})(pn||={}),(function(e){e.Sidebar=`Sidebar`,e.FixedTop=`FixedTop`,e.QuickMenu=`QuickMenu`})(Q||={}),(function(e){e.Icon=`icon`,e.Text=`text`})(mn||={}),(function(e){e.Default=`default`,e.Custom=`custom`})($||={})}));function gn(){return o===void 0?{width:0,height:0}:{width:o.innerWidth,height:o.innerHeight}}function _n(e){let[t,n]=s(()=>e(gn()));return a(()=>{let t=()=>n(e(gn()));return o.addEventListener(`resize`,t),()=>{o.removeEventListener(`resize`,t)}},[]),t}var vn=e((()=>{n(),i()}));function yn(e,t=`none`){if(!e)return t;let{x:n,y:r,blur:i,color:a,spread:o}=e;return`${n}px ${r}px ${i}px ${o}px ${a}`}var bn,xn,Sn,Cn,wn,Tn,En,Dn=e((()=>{n(),_(),f(),i(),C(),j(),E(),hn(),vn(),K(),J(),(function(e){e.icon=`Icon`,e.input=`Input`})(bn||={}),xn=d(function(e,t){let{layoutType:n,theme:r,onDismiss:i}=e;return a(()=>{let e=e=>{e.code===`Escape`&&(e.stopPropagation(),i())},t=e=>{e.pointerType===`touch`&&(e.target instanceof Element&&e.target.closest(`[role=search]`)||document.activeElement instanceof HTMLInputElement&&document.activeElement.blur())};return o.addEventListener(`keydown`,e),o.addEventListener(`pointerdown`,t,{capture:!0}),document.body.classList.add(wn),()=>{o.removeEventListener(`keydown`,e),o.removeEventListener(`pointerdown`,t,{capture:!0}),document.body.classList.remove(wn)}},[]),m(g(`div`,{ref:t,className:`__framer-search-modal-container`,role:`presentation`,style:{...Sn,zIndex:e.backdropOptions.zIndex,justifyContent:n===Q.Sidebar?`flex-start`:`center`},onClick:i,children:[p(y.div,{role:`presentation`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{duration:0}},transition:r.overlayTransition,style:{top:0,left:0,right:0,bottom:0,width:`100%`,height:`100%`,boxSizing:`border-box`,position:`absolute`,touchAction:`none`,backgroundColor:e.backdropOptions.backgroundColor}}),p(Jt,{urlScope:e.urlScope,layoutType:n,inputOptions:e.inputOptions,resultOptions:e.resultOptions,modalOptions:e.modalOptions,backdropOptions:e.backdropOptions,theme:e.theme,onDismiss:i})]}),document.body)}),Sn={width:`100%`,boxSizing:`border-box`,willChange:`transform`,position:`fixed`,display:`flex`,alignItems:`flex-start`,top:0,left:0,right:0,bottom:0},Cn={height:`100%`,display:`flex`,borderRadius:10,cursor:`inherit`,overflow:`hidden`},wn=`__framer-overflow-hidden`,Tn=w(function(e){let n=t(null),[r,i]=s(!1),[o,c]=s(!1),[l,u]=s(!1),[d]=s(()=>T.current()===T.canvas);a(()=>{c(Ae()),u(q.isSafari()&&q.isTouch())},[]);let f=e.inputOptions?.inputFont?.fontSize?e.inputOptions.inputFont.fontSize:`16px`,m=l?`max(16px, ${f})`:f,h=_n(t=>t.width{e.preventDefault(),e.stopPropagation(),!o&&i(!0)};return g(`div`,{style:{...Cn,...e.style,pointerEvents:o?`none`:`auto`,opacity:o?.4:1},children:[p(`button`,{"aria-label":`Search Icon`,style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`none`,cursor:`inherit`,color:`inherit`,border:`none`,borderRadius:10,padding:0},onClick:ee,children:e.iconType===$.Custom&&_.entryIconImage?p(`img`,{alt:`icon entry point for Site Search`,src:_.entryIconImage.src,width:_.entryIconSize,height:_.entryIconSize}):p(k,{color:_.entryIconColor,width:_.entryIconSize,height:_.entryIconSize})}),p(S,{children:r&&!d&&p(xn,{ref:n,layoutType:h,urlScope:e.urlScope,inputOptions:e.inputOptions,resultOptions:e.resultOptions,backdropOptions:e.backdropOptions,modalOptions:e.modalOptions,theme:_,onDismiss:()=>i(!1)})})]})},[` @keyframes __framer-blink-input { 0% { opacity: 0; } 100% { opacity: 1; } } .__framer-search-modal-container input:focus { animation: __framer-blink-input 0.01s; } `,` .__framer-search-modal-container input::placeholder, .__framer-search-modal-container input::-webkit-input-placeholder { color: var(--framer-search-placeholder-color, #999999); opacity: 1; } `,` .__framer-search-modal-container { height: 100vh; height: 100dvh; } .__framer-search-modal-container .__framer-max-height-80dvh { max-height: 80vh; max-height: 80dvh; } `,` body.${wn} { overflow: hidden; }`,` button.__framer-search-clear-button { position: relative; } button.__framer-search-clear-button::after { content: ""; position: absolute; top: -10px; right: -10px; bottom: -10px; left: -10px; }`],`framer-lib-search`),En=Tn,O(Tn,{urlScope:{title:`Scope`,type:D.PageScope},iconType:{title:`Icon`,type:D.Enum,options:Object.values($),optionTitles:Object.values($).map(V),displaySegmentedControl:!0},iconColor:{title:`Color`,type:D.Color,defaultValue:`#333`,hidden:e=>e.iconType===$.Custom},iconImage:{title:`File`,type:D.ResponsiveImage,allowedFileTypes:[`jpg`,`png`,`svg`],hidden:e=>e.iconType===$.Default},iconSize:{title:`Size`,type:D.Number,displayStepper:!0,defaultValue:24},inputOptions:{title:`Input`,type:D.Object,buttonTitle:`Icon, Styles`,controls:{iconOptions:{title:`Icon`,type:D.Object,buttonTitle:`Color, Size`,controls:{iconType:{title:`Icon`,type:D.Enum,options:Object.values($),optionTitles:Object.values($).map(V),displaySegmentedControl:!0},iconColor:{title:`Color`,type:D.Color,defaultValue:`rgba(0, 0, 0, 0.45)`,hidden:({iconType:e})=>e===$.Custom},iconImage:{title:`File`,type:D.ResponsiveImage,allowedFileTypes:[`jpg`,`png`,`svg`],hidden:({iconType:e})=>e===$.Default},iconSize:{title:`Icon Size`,type:D.Number,displayStepper:!0,defaultValue:18,min:0,max:100}}},inputFont:{title:`Font`,type:D.Font,displayFontSize:!0},textColor:{title:`Color`,type:D.Color,defaultValue:`#333`},placeholderOptions:{title:`Placeholder`,type:D.Object,buttonTitle:`Color, Text`,controls:{placeholderText:{title:`Text`,type:D.String,defaultValue:`Search...`},placeholderColor:{title:`Color`,type:D.Color,defaultValue:`rgba(0,0,0,0.4)`}}},dividerType:{title:`Divider`,type:D.Enum,options:Object.values(Z),optionTitles:Object.keys(Z).map(V),defaultValue:Z.FullWidth},clearButtonType:{title:`Clear Type`,type:D.Enum,options:Object.values(X),optionTitles:Object.keys(X).map(V),defaultValue:X.Icon},clearButtonText:{title:`Clear Text`,type:D.String,defaultValue:`Clear`,hidden:e=>e.clearButtonType!==X.Text}}},modalOptions:{title:`Modal`,buttonTitle:`Layout, Width`,type:D.Object,controls:{layoutType:{title:`Layout`,type:D.Enum,options:Object.keys(Q),optionTitles:Object.values(Q).map(V),defaultValue:Q.QuickMenu},width:{title:`Width`,type:D.Number,defaultValue:500,min:200,max:1e3,displayStepper:!0,step:5,hidden:e=>e.layoutType===Q.FixedTop},top:{title:`Top`,type:D.Number,defaultValue:0,min:0,max:1e3,displayStepper:!0,hidden:e=>e.layoutType!==Q.FixedTop},heightIsStatic:{title:`Height`,type:D.Boolean,enabledTitle:`Instant`,disabledTitle:`Animate`,hidden:({layoutType:e})=>e!==Q.QuickMenu},heightTransition:{title:`Type`,type:D.Transition,defaultValue:{type:`spring`,stiffness:800,damping:60},hidden:({heightIsStatic:e,layoutType:t})=>t!==Q.QuickMenu||e},borderRadius:{title:`Radius`,type:D.Number,defaultValue:16,displayStepper:!0,min:0,hidden:({layoutType:e})=>e!==Q.QuickMenu},shadow:{buttonTitle:`Options`,type:D.Object,defaultValue:{x:0,y:20,blur:40,spread:0,color:`rgba(0,0,0,0.2)`},controls:{color:{type:D.Color,defaultValue:`rgba(0,0,0,0.2)`},x:{type:D.Number,defaultValue:0},y:{type:D.Number,defaultValue:20},blur:{type:D.Number,defaultValue:40},spread:{type:D.Number,defaultValue:0}}},backgroundColor:{title:`Background`,type:D.Color,defaultValue:`#FFF`},[U(Q.QuickMenu)]:{title:`Animation`,type:D.Object,icon:`effect`,hidden:({layoutType:e})=>e!==Q.QuickMenu,optional:!0,buttonTitle:`Options`,controls:{opacity:{type:D.Number,defaultValue:.5,step:.1,min:0,max:1},scale:{type:D.Number,defaultValue:.75,step:.1,min:0,max:2},x:{type:D.Number,defaultValue:0,min:-500,max:500},y:{type:D.Number,defaultValue:0,min:-500,max:500},transition:{type:D.Transition}}},[U(Q.FixedTop)]:{title:`Animation`,type:D.Object,icon:`effect`,buttonTitle:`Options`,hidden:({layoutType:e})=>e!==Q.FixedTop,optional:!0,controls:{opacity:{type:D.Number,defaultValue:.8,step:.1,min:0,max:1},y:{type:D.Number,defaultValue:0,min:-100,max:100},transition:{type:D.Transition}}},[U(Q.Sidebar)]:{title:`Animation`,type:D.Object,icon:`effect`,buttonTitle:`Options`,hidden:({layoutType:e})=>e!==Q.Sidebar,optional:!0,controls:{opacity:{type:D.Number,defaultValue:.8,step:.1,min:0,max:1},x:{type:D.Number,defaultValue:0,min:-1e3,max:1e3},transition:{type:D.Transition}}}}},resultOptions:{title:`Results`,buttonTitle:`Fonts, Style`,type:D.Object,defaultValue:{},controls:{itemType:{title:`Style`,type:D.Enum,options:Object.values(pn),optionTitles:Object.keys(pn).map(V),defaultValue:pn.FullWidth},titleFont:{title:`Title`,type:D.Font,defaultValue:{fontSize:15},displayFontSize:!0},titleColor:{title:`Color`,type:D.Color,defaultValue:`#333`},titleType:{title:`Content`,type:D.Enum,options:Object.values(dn),optionTitles:Object.keys(dn).map(V),defaultValue:dn.H1,displaySegmentedControl:!0},subtitleOptions:{type:D.Object,title:`Subtitle`,buttonTitle:`Font, Content`,controls:{subtitleFont:{title:`Font`,type:D.Font,defaultValue:{fontSize:13},displayFontSize:!0},subtitleColor:{title:`Color`,type:D.Color,defaultValue:`rgba(0, 0, 0, 0.4)`},subtitleType:{title:`Content`,type:D.Enum,options:Object.values(fn),optionTitles:Object.keys(fn).map(V),defaultValue:fn.Path}}}}},backdropOptions:{title:`Backdrop`,type:D.Object,buttonTitle:`Color, Z Index`,controls:{backgroundColor:{title:`Color`,type:D.Color,defaultValue:`rgba(0, 0, 0, 0.8)`},zIndex:{title:`Z Index`,type:D.Number,defaultValue:10,displayStepper:!0,min:0,max:10},transition:{type:D.Transition}}}}),Tn.displayName=`Search`}));export{Dn as n,En as t}; //# sourceMappingURL=Search.COC98zp6.mjs.map