PageSourceSearch

https://bankrot.gov.by/assets/requirement-form-BuHvi_Y0.js

js bankrot.gov.by collected 2026-10-02 04:00:23 UTC 147,328 bytes, 13 lines download raw bytes

1import{j as d}from"./jsx-runtime-D_zvdyIk.js";import{r as T,u as to,f as eo}from"./createLucideIcon-CiWnlb16.js";import{d as no,c as so}from"./addLoader-p8WLB-bt.js";import{hl as Jt,mf as io,hm as G,h$ as Wn,mg as ro,ho as oo,a as an,e as tt,mh as Mt,l7 as ao,gE as lo,fN as M,mi as yt,bb as co,mj as uo,mk as di,ml as ho,mm as fo,mn as mo,mo as po,mp as go,mq as yo,mr as Kn,ms as Qt,mt as xo,mu as vo,L as bo,mv as To,mw as Co,mx as wo,my as Po,mz as So,mA as Ao,mB as jo}from"./loginCallback-DUlVA6A0.js";import{B as ce}from"./index-CQOuJFSK.js";/* empty css                 */import{a as It}from"./Select-YNaQnfBW.js";import{E as Q}from"./ErrorMessage-BzkwuuEb.js";import{C as kt}from"./creditorTypes-B9YPhGF4.js";import{u as hi}from"./notistack.esm-h7EINNRQ.js";import{C as Vo}from"./CustomToolTip-BQH2lGNu.js";import{P as Do}from"./Person-CoHVHeCH.js";import{E as fi}from"./ExpandMore-MZCJ7VMj.js";import{C as mi}from"./Collapse-CjKK4Wtk.js";import{W as pi,C as zn}from"./WarningAmber-B5dmzcjX.js";import{A as Mo}from"./AddCircleOutline-DVh1t9gS.js";import{D as gi}from"./DeleteOutline-CMp1eq1T.js";import{E as Eo}from"./Edit-8thwdvew.js";import"./config.release-CKeoGYk7.js";import"./Tooltip-DqudYRkP.js";import"./TransitionGroupContext-BqazGbpp.js";import"./useSlot-C7WZeYvg.js";import"./useControlled-BlpSYMej.js";import"./useId-DUHkaswp.js";import"./utils-CrHD0CeB.js";const Ro=t=>Jt({debtor:Jt({id:oo(),value:G()},"Выберите должника").refine(e=>e!=null&&e.id>0,{message:"Выберите должника"}),receiptClaimsDate:G().min(1,"Укажите дату поступления"),requirementNumber:G().trim().min(1,"Введите номер требования"),creditorName:G().trim().min(1,"Введите наименование кредитора"),creditorCredentials:G().trim().min(1,"Введите данные"),creditorAddress:G().trim().min(1,"Укажите почтовый адрес"),creditorTel:G().trim().min(1,"Укажите телефон"),email:G().trim().min(1,"Укажите email").pipe(ro("Некорректный email")),bankAccounts:Wn(Jt({paymentAccount:G().trim().min(1,"Укажите расчётный счёт"),bankName:G().trim().min(1,"Укажите наименование банка"),bankBic:G().trim().min(1,"Укажите БИК")})).optional(),grounds:Wn(Jt({supportingDocuments:G().trim().min(1,"Введите данные")})).min(1,"Добавьте хотя бы одно требование"),commentOnChange:G().refine(e=>t?e.trim().length>0:!0,{message:"Укажите причину изменений"})}),No=t=>({debtor:t.debtor??null,receiptClaimsDate:t.receiptClaimsDate??"",requirementNumber:t.requirementNumber??"",creditorName:t.creditorName??"",creditorCredentials:t.creditorCredentials??"",creditorAddress:t.creditorAddress??"",creditorTel:t.creditorTel??"",email:t.email??"",bankAccounts:t.bankAccounts??[],grounds:t.grounds??[],commentOnChange:t.commentOnChange??""}),ko=(t,e)=>{const n=Ro(e).safeParse(No(t));return n.success?{ok:!0,errors:{}}:{ok:!1,errors:io(n.error).properties??{}}},ln=(t,e)=>t?.[e]?.errors?.[0],yi=(t,e,n,s)=>t?.[e]?.items?.[n]?.properties?.[s]?.errors?.[0],xi=(t,e)=>!!t?.[e],Lo=an(d.jsx("path",{d:"M4 10h3v7H4zm6.5 0h3v7h-3zM2 19h20v3H2zm15-9h3v7h-3zm-5-9L2 6v2h20V6z"}),"AccountBalance"),Fo=an(d.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),vi=an(d.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),_n="w-full px-4 py-3 bg-white border rounded-lg text-sm text-[#334e68] placeholder-gray-400 focus:outline-none focus:ring-4 transition-all disabled:bg-gray-50",At={normal:`${_n} border-[#c0d1e3] focus:ring-[#2aa3d0]/15 focus:border-[#2aa3d0]`,error:`${_n} border-[#e12d39] bg-[rgba(225,45,57,0.02)] focus:ring-[rgba(225,45,57,0.15)] focus:border-[#e12d39]`},ue={normal:"block text-[0.8rem] text-[#437891] uppercase my-[0.6rem] tracking-wide",error:"block text-[0.8rem] text-[#e12d39] uppercase my-[0.6rem] tracking-wide"},it=t=>
1t?At.error:At.normal,ct=t=>t?ue.error:ue.normal,Hn={sectionTitleClasses:"flex font-bold text-[1rem] items-center gap-2 text-[color:var(--page-content-title)] text-base font-semibold !mb-[15px] !mt-[15px]",dividerClasses:"h-px w-full bg-[#e0e9f1] my-8"},Bo=({receiptClaimsDate:t,requirementNumber:e,debtor:n,onChange:s})=>{const i=tt(Mt),o=tt(ao),r=l=>ln(i,l),a=T.useMemo(()=>Object.entries(o).sort(([l],[u])=>Number(u)-Number(l)).map(([l,u])=>({label:Number(l)===lo.Active?"Активные":"Завершенные",options:u.map(c=>({value:c.id,label:c.value}))})),[o]);return d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[d.jsxs("div",{id:"field-container-debtor",className:"flex flex-col gap-1",children:[d.jsx(It,{options:a,label:"Должник",value:n?.id?{value:n.id,label:n.value}:null,placeholder:"Выберите должника...",onChange:l=>{M(yt("debtor")),s({debtor:l?{id:l.value,value:l.label}:null})}}),d.jsx(Q,{message:r("debtor")})]}),d.jsxs("div",{id:"field-container-receiptClaimsDate",className:"flex flex-col",children:[d.jsx(co,{label:"Дата поступления требований",className:it(r("receiptClaimsDate")),selected:t?new Date(t):null,dateFormat:"dd-MM-yyyy",onChange:l=>{M(yt("receiptClaimsDate")),s({receiptClaimsDate:l?.toDateString()})},isError:!!r("receiptClaimsDate")}),d.jsx(Q,{message:r("receiptClaimsDate")})]}),d.jsxs("div",{id:"field-container-requirementNumber",className:"flex flex-col",children:[d.jsx("label",{className:ct(r("requirementNumber")),children:"Номер требования"}),d.jsx("input",{type:"text",className:it(r("requirementNumber")),value:e??"",onChange:l=>{M(yt("requirementNumber")),s({requirementNumber:l.target.value})},placeholder:"Номер входящего документа..."}),d.jsx(Q,{message:r("requirementNumber")})]})]})},Gn=["creditorName","creditorCredentials","creditorAddress","creditorTel","email"],Io=({onSearch:t,tooltipMessage:e})=>{const[n,s]=T.useState(!1),i=async r=>{if(r.preventDefault(),!n){s(!0);try{await t?.()}finally{s(!1)}}},o=d.jsx("button",{type:"button",onClick:i,disabled:n,className:"absolute right-2 top-1/2 -translate-y-1/2 p-2 rounded-md text-[var(--table-links-color)] transition-all duration-200 hover:text-[var(--green_500)] disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",children:n?d.jsxs("svg",{className:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[d.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),d.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})});return e?d.jsx(Vo,{message:e,children:o}):o},Oo=({defaultExpand:t,creditorType:e,creditorName:n,creditorCredentials:s,creditorAddress:i,creditorTel:o,email:r,onChange:a})=>{const[l,u]=T.useState(t),{enqueueSnackbar:c}=hi(),h=tt(Mt),f=m=>ln(h,m),p=Gn.some(m=>!!f(m)),y=(m,x)=>{f(m)&&M(yt(m)),a({[m]:x})},v=async()=>{s||c("Введите унп",{variant:"info",anchorOrigin:{vertical:"top",horizontal:"right"}});const m=await M(uo({creditorName:n,creditorCredentials:s})).unwrap();if(m.name==null){c("Поиск не дал результатов",{variant:"info",anchorOrigin:{vertical:"top",horizontal:"right"}});return}Gn.forEach(x=>M(yt(x))),M(yt("creditorType")),a({creditorName:m.name,creditorCredentials:s,creditorAddress:m.address,creditorType:m.creditorType??387,creditorTel:m.phoneNumbers,email:m.email})};return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"grid grid-cols-[90%_10%] cursor-pointer select-none rounded-lg px-2 py-1 transition-colors hover:bg-[#f7fafd]",onClick:()=>u(!l),children:[d.jsxs("div",{className:"grid grid-cols-[auto_1fr] items-center gap-3",children:[d.jsxs("h3",{className:`flex items-center gap-2 text-[1rem] font-semibold !my-[15px] ${p?"text-[#e12d39]":"text-[color:var(--page-content-title)]"}`,children:[d.jsx(Do,{fontSize:"small",className:p?"text-[#e12d39]":"text-[#2aa3d0]"}),"Данные кредитора",p&&!l&&d.jsx("span",{className:"ml-1 text-xs font-medium normal-case tracking-normal text-[#e12d39]",children:"— заполните обязательные поля"})]}),!l&&!p&&d.jsxs("span",{className:"font-bold text-sm text-[#627d98] truncate",children:["(",n,")"]})]}),d.jsx("div",{className:"flex justify-end items-center text-[#627d98]",children:l?d.jsx(vi,{}):d.jsx(fi,{})})]}),d.jsxs(mi,{in:l,timeout:"auto",unmountOnExit:!0,children:[d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[2fr_1.2fr] gap-8",children:[d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx(It,{options:Object.entries(kt).map(([m,x])=>
1({value:Number(m),label:x.label})),label:"Тип кредитора",value:e?{value:e,label:kt[e]?.label}:null,isClearable:!1,isSearchable:!1,placeholder:"Выберите тип кредитора...",onChange:m=>a({creditorType:m?.value})}),d.jsxs("div",{id:"field-container-creditorName",children:[d.jsx("label",{className:ct(f("creditorName")),children:kt[e]?.creditorNameField}),d.jsx("input",{type:"text",className:it(f("creditorName")),placeholder:"Введите наименование...",value:n||"",onChange:m=>y("creditorName",m.target.value)}),d.jsx(Q,{message:f("creditorName")})]}),d.jsxs("div",{id:"field-container-creditorCredentials",className:"mt-2",children:[d.jsx("label",{className:ct(f("creditorCredentials")),children:kt[e]?.creditorCredentialsField}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:"text",className:`${it(f("creditorCredentials"))} ${s&&!f("creditorCredentials")?"pr-10":""}`,placeholder:"Введите унп...",value:s||"",onChange:m=>y("creditorCredentials",m.target.value)}),d.jsx(Io,{onSearch:v,tooltipMessage:"Поиск по ранее добавленным кредиторам"})]}),d.jsx(Q,{message:f("creditorCredentials")})]})]}),d.jsxs("div",{className:"flex items-start gap-4 bg-[#fff9f0] border border-[rgba(255,159,28,0.3)] border-l-4 border-l-[#ff9f1c] rounded-lg p-5 h-[100%]",children:[d.jsx("div",{className:"text-[#f2994a] mt-0.5 shrink-0",children:d.jsx(pi,{fontSize:"medium"})}),d.jsxs("div",{children:[d.jsx("h4",{className:"mt-0 mb-2 text-[#f2994a]/90 text-[0.9rem] font-bold",children:"Важная информация"}),d.jsxs("p",{className:"mt-0 mb-2 text-[0.8rem] leading-normal text-[#334e68]",children:["Данные поля ",d.jsxs("strong",{children:['"',kt[e]?.creditorCredentialsField,'"']})," являются",d.jsx("strong",{children:" уникальным идентификатором кредитора"})," в системе."]}),d.jsx("p",{className:"m-0 text-[0.8rem] leading-normal text-[#334e68]",children:"Пожалуйста, внимательно проверяйте корректность вносимой информации во избежание дублирования записей."})]})]})]}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mt-4",children:[d.jsxs("div",{id:"field-container-creditorAddress",children:[d.jsx("label",{className:ct(f("creditorAddress")),children:"Почтовый адрес"}),d.jsx("input",{type:"text",placeholder:"Индекс, город, улица...",className:it(f("creditorAddress")),value:i||"",onChange:m=>y("creditorAddress",m.target.value)}),d.jsx(Q,{message:f("creditorAddress")})]}),d.jsxs("div",{id:"field-container-creditorTel",children:[d.jsx("label",{className:ct(f("creditorTel")),children:"Номера телефонов"}),d.jsx("input",{type:"text",placeholder:"+375...",className:it(f("creditorTel")),value:o||"",onChange:m=>y("creditorTel",m.target.value)}),d.jsx(Q,{message:f("creditorTel")})]}),d.jsxs("div",{id:"field-container-email",children:[d.jsx("label",{className:ct(f("email")),children:"Адрес электронной почты"}),d.jsx("input",{type:"email",placeholder:"[email protected]",className:it(f("email")),value:r||"",onChange:m=>y("email",m.target.value)}),d.jsx(Q,{message:f("email")})]})]}),d.jsx("div",{className:"h-px w-full bg-[#e0e9f1] my-8"})]})]})},Uo=({bankAccounts:t,onChange:e,onAdd:n,onRemove:s})=>{const[i,o]=T.useState(!1),r=tt(Mt),a=xi(r,"bankAccounts");return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"grid grid-cols-[90%_10%] cursor-pointer select-none rounded-lg px-2 py-1 transition-colors hover:bg-[#f7fafd]",onClick:()=>o(!i),children:[d.jsxs("h3",{className:`flex items-center gap-2 text-[1rem] font-semibold !my-[15px] ${a?"text-[#e12d39]":"text-[color:var(--page-content-title)]"}`,children:[d.jsx(Lo,{fontSize:"small",className:a?"text-[#e12d39]":"text-[#2aa3d0]"}),"Банковские счета (",t?.length??0,")",a&&!i&&d.jsx("span",{className:"ml-1 text-xs font-medium normal-case tracking-normal text-[#e12d39]",children:"— заполните обязательные поля"})]}),d.jsx("div",{className:"flex justify-end items-center text-[#627d98]",children:i?d.jsx(vi,{}):d.jsx(fi,{})})]}),d.jsxs(mi,{in:i,timeout:"auto",unmountOnExit:!0,children:[t.length===0&&d.jsx("div",{className:"text-center p-8 text-[#627d98] italic bg-[#fafafa] border border-dashed border-[#c0d1e3] rounded-lg mb-4",children:"Счета не добавлены"}),t.map((l,u)=>d.jsx(Wo,{bankAccount:l,index:u,onChange:e,onRemove:s},l.id??u)),d.jsx("div",{className:"flex justify-center mt-2",children:d.jsxs("button",{type:"button",onClick:n,className:"button cr-button",children:[d.jsx(Mo,{fontSize:"small"})," Добавить банковский счёт"]})})]})]})},$o=[{key:"paymentAccount",label:"Расчётный счёт",placeholder:"BY12AKBB0000000000000000",flex:"flex-[2]"},{key:"bankName",label:"Наименование банка",placeholder:"Беларусбанк",flex:"flex-[2]"},{key:"bankBic",label:"БИК",placeholder:"AKBBBY2X",flex:"flex-[1]"}],Wo=({bankAccount:t,index:e,onChange:n,onRemove:s})=>{const i=tt(Mt),o=a=>yi(i,"bankAccounts",e,a),r=a=>M(di({arrayKey:"bankAccounts",index:e,field:a}));return d.jsxs("div",{className:"bg-white border border-[#e0e9f1] rounded-lg overflow-hidden mb-4 shadow-sm",children:[d.jsxs("div",{className:"bg-[#f9fafb] px-6 py-3 flex justify-between items-center border-b border-[#e0e9f1]",children:[d.jsxs("span",{className:"font-bold text-sm text-[#334e68]",children:["Счёт #",e+1]}),d.jsx("button",{type:"button",onClick:()=>s(e),title:"Удалить счёт",className:"cr-icon-btn cr-icon-btn--danger",children:d.jsx(gi,{fontSize:"small"})})]}),d.jsxs("div",{className:"p-6 flex flex-col md:flex-row gap-6 items-start",children:[d.jsxs("div",{className:"shrink-0",children:[d.jsx("label",{className:`${ue.normal} cursor-pointer`,htmlFor:`resident_${e}`,children:"Резидент"}),d.jsx("div",{className:"flex items-center justify-center h-[46px]",children:d.jsx("input",{id:`resident_${e}`,type:"checkbox",className:"w-5 h-5 cursor-pointer accent-[#2a86b3]",checked:t.isResident,onChange:a=>n(e,{isResident:a.target.checked})})})]}),$o.map(({key:a,label:l,placeholder:u,flex:c})=>d.jsxs("div",{className:c,children:[d.jsx("label",{className:ct(o(a)),htmlFor:`${a}_${e}`,children:l}),d.jsx("input",{id:`${a}_${e}`,type:"text",placeholder:u,className:it(o(a)),value:t[a],onChange:h=>{r(a),n(e,{[a]:h.target.value})}}),d.jsx(Q,{message:o(a)})]},a))]})]})},Yn={1:{label:"Требование признано"},2:{label:"Требование не признано"},3:{label:"Требование кредитора признано частично"},4:{label:"Требования кредитора поданы с нарушением установленных требований, требуется устранение недостатков"},5:{label:"Требование кредитора, предъявленные по истечении срока, установленного пунктом 1 статьи 70 настоящего Закона, но возникшие до дня открытия конкурсного производства (нет решения о восстановлении пропущенных сроков)"}},cn=T.createContext({});function un(t){const e=T.useRef(null);return e.current===null&&(e.current=t()),e.current}const dn=typeof window<"u",bi=dn?T.useLayoutEffect:T.useEffect,ye=T.createContext(null);function hn(t,e){t.indexOf(e)===-1&&t.push(e)}function fn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const rt=(t,e,n)=>n>e?e:n<t?t:n;let mn=()=>{};const ot={},Ti=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Ci(t){return typeof t=="object"&&t!==null}const wi=t=>/^0[^.\s]+$/u.test(t);function pn(t){let e;return()=>(e===void 0&&(e=t()),e)}const q=t=>t,Ko=(t,e)=>n=>e(t(n)),Yt=(...t)=>t.reduce(Ko),Kt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class gn{constructor(){this.subscriptions=[]}add(e){return hn(this.subscriptions,e),()=>fn(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const et=t=>t*1e3,X=t=>t/1e3;function Pi(t,e){return e?t*(1e3/e):0}const Si=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,zo=1e-7,_o=12;function Ho(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Si(r,s,i)-t,o>0?n=r:e=r;
vendor: 26,141 bytes, line 1
1while(Math.abs(o)>zo&&++a<_o);return r}function Xt(t,e,n,s){if(t===e&&n===s)return q;const i=o=>Ho(o,0,1,t,n);return o=>o===0||o===1?o:Si(i(o),e,s)}const Ai=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ji=t=>e=>1-t(1-e),Vi=Xt(.33,1.53,.69,.99),yn=ji(Vi),Di=Ai(yn),Mi=t=>(t*=2)<1?.5*yn(t):.5*(2-Math.pow(2,-10*(t-1))),xn=t=>1-Math.sin(Math.acos(t)),Ei=ji(xn),Ri=Ai(xn),Go=Xt(.42,0,1,1),Yo=Xt(0,0,.58,1),Ni=Xt(.42,0,.58,1),Xo=t=>Array.isArray(t)&&typeof t[0]!="number",ki=t=>Array.isArray(t)&&typeof t[0]=="number",qo={linear:q,easeIn:Go,easeInOut:Ni,easeOut:Yo,circIn:xn,circInOut:Ri,circOut:Ei,backIn:yn,backInOut:Di,backOut:Vi,anticipate:Mi},Zo=t=>typeof t=="string",Xn=t=>{if(ki(t)){mn(t.length===4);const[e,n,s,i]=t;return Xt(e,n,s,i)}else if(Zo(t))return qo[t];return t},te=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Jo(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,h=!1,f=!1)=>{const y=f&&i?n:s;return h&&r.add(c),y.has(c)||y.add(c),c},cancel:c=>{s.delete(c),r.delete(c)},process:c=>{if(a=c,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,u.process(c))}};return u}const Qo=40;function Li(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=te.reduce((b,j)=>(b[j]=Jo(o),b),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:f,render:p,postRender:y}=r,v=()=>{const b=ot.useManualTiming?i.timestamp:performance.now();n=!1,ot.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(b-i.timestamp,Qo),1)),i.timestamp=b,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),p.process(i),y.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(v))},m=()=>{n=!0,s=!0,i.isProcessing||t(v)};return{schedule:te.reduce((b,j)=>{const P=r[j];return b[j]=(V,D=!1,A=!1)=>(n||m(),P.schedule(V,D,A)),b},{}),cancel:b=>{for(let j=0;j<te.length;j++)r[te[j]].cancel(b)},state:i,steps:r}}const{schedule:L,cancel:ut,state:$,steps:Te}=Li(typeof requestAnimationFrame<"u"?requestAnimationFrame:q,!0);let re;function ta(){re=void 0}const _={now:()=>(re===void 0&&_.set($.isProcessing||ot.useManualTiming?$.timestamp:performance.now()),re),set:t=>{re=t,queueMicrotask(ta)}},Fi=t=>e=>typeof e=="string"&&e.startsWith(t),Bi=Fi("--"),ea=Fi("var(--"),vn=t=>ea(t)?na.test(t.split("/*")[0].trim()):!1,na=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Et={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},zt={...Et,transform:t=>rt(0,1,t)},ee={...Et,default:1},Ot=t=>Math.round(t*1e5)/1e5,bn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sa(t){return t==null}const ia=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Tn=(t,e)=>n=>!!(typeof n=="string"&&ia.test(n)&&n.startsWith(t)||e&&!sa(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ii=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(bn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},ra=t=>rt(0,255,t),Ce={...Et,transform:t=>Math.round(ra(t))},pt={test:Tn("rgb","red"),parse:Ii("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Ce.transform(t)+", "+Ce.transform(e)+", "+Ce.transform(n)+", "+Ot(zt.transform(s))+")"};function oa(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ie={test:Tn("#"),parse:oa,transform:pt.transform},qt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),lt=qt("deg"),nt=qt("%"),S=qt("px"),aa=qt("vh"),la=qt("vw"),qn={...nt,parse:t=>nt.parse(t)/100,transform:t=>nt.transform(t*100)},Tt={test:Tn("hsl","hue"),parse:Ii("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+nt.transform(Ot(e))+", "+nt.transform(Ot(n))+", "+Ot(zt.transform(s))+")"},I={test:t=>pt.test(t)||Ie.test(t)||Tt.test(t),parse:t=>pt.test(t)?pt.parse(t):Tt.test(t)?Tt.parse(t):Ie.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?pt.transform(t):Tt.transform(t),getAnimatableNone:t=>{const e=I.parse(t);return e.alpha=0,I.transform(e)}},ca=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ua(t){return isNaN(t)&&typeof t=="string"&&(t.match(bn)?.length||0)+(t.match(ca)?.length||0)>0}const Oi="number",Ui="color",da="var",ha="var(",Zn="${}",fa=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function _t(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(fa,l=>(I.test(l)?(s.color.push(o),i.push(Ui),n.push(I.parse(l))):l.startsWith(ha)?(s.var.push(o),i.push(da),n.push(l)):(s.number.push(o),i.push(Oi),n.push(parseFloat(l))),++o,Zn)).split(Zn);return{values:n,split:a,indexes:s,types:i}}function $i(t){return _t(t).values}function Wi(t){const{split:e,types:n}=_t(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===Oi?o+=Ot(i[r]):a===Ui?o+=I.transform(i[r]):o+=i[r]}return o}}const ma=t=>typeof t=="number"?0:I.test(t)?I.getAnimatableNone(t):t;function pa(t){const e=$i(t);return Wi(t)(e.map(ma))}const dt={test:ua,parse:$i,createTransformer:Wi,getAnimatableNone:pa};function we(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function ga({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=we(l,a,t+1/3),o=we(l,a,t),r=we(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function de(t,e){return n=>n>0?e:t}const F=(t,e,n)=>t+(e-t)*n,Pe=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ya=[Ie,pt,Tt],xa=t=>ya.find(e=>e.test(t));function Jn(t){const e=xa(t);if(!e)return!1;let n=e.parse(t);return e===Tt&&(n=ga(n)),n}const Qn=(t,e)=>{const n=Jn(t),s=Jn(e);if(!n||!s)return de(t,e);const i={...n};return o=>(i.red=Pe(n.red,s.red,o),i.green=Pe(n.green,s.green,o),i.blue=Pe(n.blue,s.blue,o),i.alpha=F(n.alpha,s.alpha,o),pt.transform(i))},Oe=new Set(["none","hidden"]);function va(t,e){return Oe.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ba(t,e){return n=>F(t,e,n)}function Cn(t){return typeof t=="number"?ba:typeof t=="string"?vn(t)?de:I.test(t)?Qn:wa:Array.isArray(t)?Ki:typeof t=="object"?I.test(t)?Qn:Ta:de}function Ki(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>Cn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function Ta(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Cn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function Ca(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const wa=(t,e)=>{const n=dt.createTransformer(e),s=_t(t),i=_t(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Oe.has(t)&&!i.values.length||Oe.has(e)&&!s.values.length?va(t,e):Yt(Ki(Ca(s,i),i.values),n):de(t,e)};function zi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?F(t,e,n):Cn(t)(t,e)}const Pa=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>L.update(e,n),stop:()=>ut(e),now:()=>$.isProcessing?$.timestamp:_.now()}},_i=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},he=2e4;function wn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<he;)e+=n,s=t.next(e);return e>=he?1/0:e}function Sa(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(wn(s),he);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:X(i)}}const Aa=5;function Hi(t,e,n){const s=Math.max(e-Aa,0);return Pi(n-t(s),e-s)}const B={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Se=.001;function ja({duration:t=B.duration,bounce:e=B.bounce,velocity:n=B.velocity,mass:s=B.mass}){let i,o,r=1-e;r=rt(B.minDamping,B.maxDamping,r),t=rt(B.minDuration,B.maxDuration,X(t)),r<1?(i=u=>{const c=u*r,h=c*t,f=c-n,p=Ue(u,r),y=Math.exp(-h);return Se-f/p*y},o=u=>{const h=u*r*t,f=h*n+n,p=Math.pow(r,2)*Math.pow(u,2)*t,y=Math.exp(-h),v=Ue(Math.pow(u,2),r);return(-i(u)+Se>0?-1:1)*((f-p)*y)/v}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-Se+c*h},o=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=Da(i,o,a);if(t=et(t),isNaN(l))return{stiffness:B.stiffness,damping:B.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const Va=12;function Da(t,e,n){let s=n;for(let i=1;i<Va;i++)s=s-t(s)/e(s);return s}function Ue(t,e){return t*Math.sqrt(1-e*e)}const Ma=["duration","bounce"],Ea=["stiffness","damping","mass"];function ts(t,e){return e.some(n=>t[n]!==void 0)}function Ra(t){let e={velocity:B.velocity,stiffness:B.stiffness,damping:B.damping,mass:B.mass,isResolvedFromDuration:!1,...t};if(!ts(t,Ea)&&ts(t,Ma))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*rt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:B.mass,stiffness:i,damping:o}}else{const n=ja(t);e={...e,...n,mass:B.mass},e.isResolvedFromDuration=!0}return e}function fe(t=B.visualDuration,e=B.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:p}=Ra({...n,velocity:-X(n.velocity||0)}),y=f||0,v=u/(2*Math.sqrt(l*c)),m=r-o,x=X(Math.sqrt(l/c)),C=Math.abs(m)<5;s||(s=C?B.restSpeed.granular:B.restSpeed.default),i||(i=C?B.restDelta.granular:B.restDelta.default);let b;if(v<1){const P=Ue(x,v);b=V=>{const D=Math.exp(-v*x*V);return r-D*((y+v*x*m)/P*Math.sin(P*V)+m*Math.cos(P*V))}}else if(v===1)b=P=>r-Math.exp(-x*P)*(m+(y+x*m)*P);else{const P=x*Math.sqrt(v*v-1);b=V=>{const D=Math.exp(-v*x*V),A=Math.min(P*V,300);return r-D*((y+v*x*m)*Math.sinh(A)+P*m*Math.cosh(A))/P}}const j={calculatedDuration:p&&h||null,next:P=>{const V=b(P);if(p)a.done=P>=h;else{let D=P===0?y:0;v<1&&(D=P===0?et(y):Hi(b,P,V));const A=Math.abs(D)<=s,N=Math.abs(r-V)<=i;a.done=A&&N}return a.value=a.done?r:V,a},toString:()=>{const P=Math.min(wn(j),he),V=_i(D=>j.next(P*D).value,P,30);return P+"ms "+V},toTransition:()=>{}};return j}fe.applyToOptions=t=>{const e=Sa(t,100,fe);return t.ease=e.ease,t.duration=et(e.duration),t.type="keyframes",t};function $e({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},p=A=>a!==void 0&&A<a||l!==void 0&&A>l,y=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let v=n*e;const m=h+v,x=r===void 0?m:r(m);x!==m&&(v=x-h);const C=A=>-v*Math.exp(-A/s),b=A=>x+C(A),j=A=>{const N=C(A),R=b(A);f.done=Math.abs(N)<=u,f.value=f.done?x:R};let P,V;const D=A=>{p(f.value)&&(P=A,V=fe({keyframes:[f.value,y(f.value)],velocity:Hi(b,A,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return D(0),{calculatedDuration:null,next:A=>{let N=!1;return!V&&P===void 0&&(N=!0,j(A),D(A)),P!==void 0&&A>=P?V.next(A-P):(!N&&j(A),f)}}}function Na(t,e,n){const s=[],i=n||ot.mix||zi,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||q:e;a=Yt(l,a)}s.push(a)}return s}function ka(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(mn(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Na(e,s,i),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=Kt(t[h],t[h+1],c);return a[h](f)};return n?c=>u(rt(t[0],t[o-1],c)):u}function La(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Kt(0,e,s);t.push(F(n,1,i))}}function Fa(t){const e=[0];return La(e,t.length-1),e}function Ba(t,e){return t.map(n=>n*e)}function Ia(t,e){return t.map(()=>e||Ni).splice(0,t.length-1)}function Ut({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Xo(s)?s.map(Xn):Xn(s),o={done:!1,value:e[0]},r=Ba(n&&n.length===e.length?n:Fa(e),t),a=ka(r,e,{ease:Array.isArray(i)?i:Ia(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Oa=t=>t!==null;function Pn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Oa),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Ua={decay:$e,inertia:$e,tween:Ut,keyframes:Ut,spring:fe};function Gi(t){typeof t.type=="string"&&(t.type=Ua[t.type])}class Sn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const $a=t=>t/100;class An extends Sn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==_.now()&&this.tick(_.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Gi(e);const{type:n=Ut,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||Ut;l!==Ut&&typeof a[0]!="number"&&(this.mixKeyframes=Yt($a,zi(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=wn(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:p,type:y,onUpdate:v,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const x=this.currentTime-u*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?x<0:x>i;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let b=this.currentTime,j=s;if(h){const A=Math.min(this.currentTime,i)/a;let N=Math.floor(A),R=A%1;!R&&A>=1&&(R=1),R===1&&N--,N=Math.min(N,h+1),!!(N%2)&&(f==="reverse"?(R=1-R,p&&(R-=p/a)):f==="mirror"&&(j=r)),b=rt(0,1,R)*a}const P=C?{done:!1,value:c[0]}:j.next(b);o&&(P.value=o(P.value));let{done:V}=P;!C&&l!==null&&(V=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return D&&y!==$e&&(P.value=Pn(c,this.options,m,this.speed)),v&&v(P.value),D&&this.finish(),P}then(e,n){return this.finished.then(e,n)}get duration(){return X(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+X(e)}get time(){return X(this.currentTime)}set time(e){e=et(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(_.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=X(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Pa,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(_.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Wa(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const gt=t=>t*180/Math.PI,We=t=>{const e=gt(Math.atan2(t[1],t[0]));return Ke(e)},Ka={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:We,rotateZ:We,skewX:t=>gt(Math.atan(t[1])),skewY:t=>gt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ke=t=>(t=t%360,t<0&&(t+=360),t),es=We,ns=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ss=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),za={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ns,scaleY:ss,scale:t=>(ns(t)+ss(t))/2,rotateX:t=>Ke(gt(Math.atan2(t[6],t[5]))),rotateY:t=>Ke(gt(Math.atan2(-t[2],t[0]))),rotateZ:es,rotate:es,skewX:t=>gt(Math.atan(t[4])),skewY:t=>gt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function ze(t){return t.includes("scale")?1:0}function _e(t,e){if(!t||t==="none")return ze(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=za,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Ka,i=a}if(!i)return ze(e);const o=s[e],r=i[1].split(",").map(Ha);return typeof o=="function"?o(r):r[o]}const _a=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return _e(n,e)};function Ha(t){return parseFloat(t.trim())}const Rt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nt=new Set(Rt),is=t=>t===Et||t===S,Ga=new Set(["x","y","z"]),Ya=Rt.filter(t=>!Ga.has(t));function Xa(t){const e=[];return Ya.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const xt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>_e(e,"x"),y:(t,{transform:e})=>_e(e,"y")};xt.translateX=xt.x;xt.translateY=xt.y;const vt=new Set;let He=!1,Ge=!1,Ye=!1;function Yi(){if(Ge){const t=Array.from(vt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Xa(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ge=!1,He=!1,vt.forEach(t=>t.complete(Ye)),vt.clear()}function Xi(){vt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ge=!0)})}function qa(){Ye=!0,Xi(),Yi(),Ye=!1}class jn{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(vt.add(this),He||(He=!0,L.read(Xi),L.resolveKeyframes(Yi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}Wa(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),vt.delete(this)}cancel(){this.state==="scheduled"&&(vt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Za=t=>t.startsWith("--");function Ja(t,e,n){Za(e)?t.style.setProperty(e,n):t.style[e]=n}const Qa=pn(()=>window.ScrollTimeline!==void 0),tl={};function el(t,e){const n=pn(t);return()=>tl[e]??n()}const qi=el(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Bt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,rs={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Bt([0,.65,.55,1]),circOut:Bt([.55,0,1,.45]),backIn:Bt([.31,.01,.66,-.59]),backOut:Bt([.33,1.53,.69,.99])};function Zi(t,e){if(t)return typeof t=="function"?qi()?_i(t,e):"ease-out":ki(t)?Bt(t):Array.isArray(t)?t.map(n=>Zi(n,e)||rs.easeOut):rs[t]}function nl(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=Zi(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function Ji(t){return typeof t=="function"&&"applyToOptions"in t}function sl({type:t,...e}){return Ji(t)&&qi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class il extends Sn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,mn(typeof e.type!="string");const u=sl(e);this.animation=nl(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Pn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Ja(n,s,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return X(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+X(e)}get time(){return X(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=et(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Qa()?(this.animation.timeline=e,q):n(this)}}const Qi={anticipate:Mi,backInOut:Di,circInOut:Ri};function rl(t){return t in Qi}function ol(t){typeof t.ease=="string"&&rl(t.ease)&&(t.ease=Qi[t.ease])}const os=10;class al extends il{constructor(e){ol(e),Gi(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new An({...r,autoplay:!1}),l=et(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-os).value,a.sample(l).value,os),a.stop()}}const as=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(dt.test(t)||t==="0")&&!t.startsWith("url("));function ll(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function cl(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=as(i,e),a=as(o,e);return!r||!a?!1:ll(t)||(n==="spring"||Ji(n))&&s}function Xe(t){t.duration=0,t.type="keyframes"}const ul=new Set(["opacity","clipPath","filter","transform"]),dl=pn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function hl(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return dl()&&n&&ul.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const fl=40;class ml extends Sn{constructor({autoplay:e=!0,delay:n=0,type:s="
1keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=_.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...h},p=c?.KeyframeResolver||jn;this.keyframeResolver=new p(a,(y,v,m)=>this.onKeyframesResolved(y,v,f,!m),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=_.now(),cl(e,o,r,a)||((ot.instantAnimations||!l)&&c?.(Pn(e,s,n)),e[0]=e[e.length-1],Xe(s),s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>fl?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},p=!u&&hl(f)?new al({...f,element:f.motionValue.owner.current}):new An(f);p.finished.then(()=>this.notifyFinished()).catch(q),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),qa()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const pl=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function gl(t){const e=pl.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function tr(t,e,n=1){const[s,i]=gl(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Ti(r)?parseFloat(r):r}return vn(i)?tr(i,e,n+1):i}function Vn(t,e){return t?.[e]??t?.default??t}const er=new Set(["width","height","top","left","right","bottom",...Rt]),yl={test:t=>t==="auto",parse:t=>t},nr=t=>e=>e.test(t),sr=[Et,S,nt,lt,la,aa,yl],ls=t=>sr.find(nr(t));function xl(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||wi(t):!0}const vl=new Set(["brightness","contrast","saturate","opacity"]);function bl(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(bn)||[];if(!s)return t;const i=n.replace(s,"");let o=vl.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Tl=/\b([a-z-]*)\(.*?\)/gu,qe={...dt,getAnimatableNone:t=>{const e=t.match(Tl);return e?e.map(bl).join(" "):t}},cs={...Et,transform:Math.round},Cl={rotate:lt,rotateX:lt,rotateY:lt,rotateZ:lt,scale:ee,scaleX:ee,scaleY:ee,scaleZ:ee,skew:lt,skewX:lt,skewY:lt,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:zt,originX:qn,originY:qn,originZ:S},Dn={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,radius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,top:S,right:S,bottom:S,left:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,backgroundPositionX:S,backgroundPositionY:S,...Cl,zIndex:cs,fillOpacity:zt,strokeOpacity:zt,numOctaves:cs},wl={...Dn,color:I,backgroundColor:I,outlineColor:I,fill:I,stroke:I,borderColor:I,borderTopColor:I,borderRightColor:I,borderBottomColor:I,borderLeftColor:I,filter:qe,WebkitFilter:qe},ir=t=>wl[t];function rr(t,e){let n=ir(t);return n!==qe&&(n=dt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}
vendor: 10,413 bytes, lines 1-9
1const Pl=new Set(["auto","none","0"]);function Sl(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Pl.has(o)&&_t(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=rr(n,i)}class Al extends jn{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),vn(u))){const c=tr(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!er.has(s)||e.length!==2)return;const[i,o]=e,r=ls(i),a=ls(o);if(r!==a)if(is(r)&&is(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else xt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||xl(e[i]))&&s.push(i);s.length&&Sl(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=xt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=xt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function jl(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const or=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function ar(t){return Ci(t)&&"offsetHeight"in t}const us=30,Vl=t=>!isNaN(parseFloat(t));class Dl{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=_.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=_.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Vl(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new gn);const s=this.events[e].add(n);return e==="change"?()=>{s(),L.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=_.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>us)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,us);return Pi(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Vt(t,e){return new Dl(t,e)}const{schedule:Mn}=Li(queueMicrotask,!1),J={x:!1,y:!1};function lr(){return J.x||J.y}function Ml(t){return t==="x"||t==="y"?J[t]?null:(J[t]=!0,()=>{J[t]=!1}):J.x||J.y?null:(J.x=J.y=!0,()=>{J.x=J.y=!1})}function cr(t,e){const n=jl(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function ds(t){return!(t.pointerType==="touch"||lr())}function El(t,e,n={}){const[s,i,o]=cr(t,n),r=a=>{if(!ds(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=h=>{ds(h)&&(u(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const ur=(t,e)=>e?t===e?!0:ur(t,e.parentElement):!1,En=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Rl=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Nl(t){return Rl.has(t.tagName)||t.tabIndex!==-1}const oe=new WeakSet;function hs(t){return e=>{e.key==="Enter"&&t(e)}}function Ae(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const kl=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=hs(()=>{if(oe.has(n))return;Ae(n,"down");const i=hs(()=>{Ae(n,"up")}),o=()=>Ae(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function fs(t){return En(t)&&!lr()}function Ll(t,e,n={}){const[s,i,o]=cr(t,n),r=a=>{const l=a.currentTarget;if(!fs(a))return;oe.add(l);const u=e(l,a),c=(p,y)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),oe.has(l)&&oe.delete(l),fs(p)&&typeof u=="function"&&u(p,{success:y})},h=p=>{c(p,l===window||l===document||n.useGlobalTarget||ur(l,p.target))},f=p=>{c(p,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),ar(a)&&(a.addEventListener("focus",u=>kl(u,i)),!Nl(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function dr(t){return Ci(t)&&"ownerSVGElement"in t}function Fl(t){return dr(t)&&t.tagName==="svg"}const W=t=>!!(t&&t.getVelocity),Bl=[...sr,I,dt],Il=t=>Bl.find(nr(t)),Rn=T.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function ms(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Ol(...t){return e=>{let n=!1;const s=t.map(i=>{const o=ms(i,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<s.length;i++){const o=s[i];typeof o=="function"?o():ms(t[i],null)}}}}function Ul(...t){return T.useCallback(Ol(...t),t)}class $l extends T.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=ar(s)&&s.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Wl({children:t,isPresent:e,anchorX:n,root:s}){const i=T.useId(),o=T.useRef(null),r=T.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=T.useContext(Rn),l=Ul(o,t?.ref);return T.useInsertionEffect(()=>{const{width:u,height:c,top:h,left:f,right:p}=r.current;if(e||!o.current||!u||!c)return;const y=n==="left"?`left: ${f}`:`right: ${p}`;o.current.dataset.motionPopId=i;const v=document.createElement("style");a&&(v.nonce=a);const m=s??document.head;return m.appendChild(v),v.sheet&&v.sheet.insertRule(`
2          [data-motion-pop-id="${i}"] {
3            position: absolute !important;
4            width: ${u}px !important;
5            height: ${c}px !important;
6            ${y}px !important;
7            top: ${h}px !important;
8          }
9        `),()=>{m.contains(v)&&m.removeChild(v)}},[e]),d.jsx($l,{isPresent:e,childRef:o,sizeRef:r,children:T.cloneElement(t,{ref:l})})}const Kl=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const u=un(zl),c=T.useId();let h=!0,f=T.useMemo(()=>(h=!1,{id:c,initial:e,isPresent:n,custom:i,onExitComplete:p=>{u.set(p,!0);for(const y of u.values())if(!y)return;s&&s()},register:p=>(u.set(p,!1),()=>u.delete(p))}),[n,u,s]);return o&&h&&(f={...f}),T.useMemo(()=>{u.forEach((p,y)=>u.set(y,!1))},[n]),T.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),r==="popLayout"&&(t=d.jsx(Wl,{isPresent:n,anchorX:a,root:l,children:t})),d.jsx(ye.Provider,{value:f,children:t})};function zl(){return new Map}function hr(t=!0){const e=T.useContext(ye);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=T.useId();T.useEffect(()=>{if(t)return i(o)},[t]);const r=T.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const ne=t=>t.key||"";function ps(t){const e=[];return T.Children.forEach(t,n=>{T.isValidElement(n)&&e.push(n)}),e}const _l=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[u,c]=hr(r),h=T.useMemo(()=>ps(t),[t]),f=r&&!u?[]:h.map(ne),p=T.useRef(!0),y=T.useRef(h),v=un(()=>new Map),[m,x]=T.useState(h),[C,b]=T.useState(h);bi(()=>{p.current=!1,y.current=h;for(let V=0;V<C.length;V++){const D=ne(C[V]);f.includes(D)?v.delete(D):v.get(D)!==!0&&v.set(D,!1)}},[C,f.length,f.join("-")]);const j=[];if(h!==m){let V=[...h];for(let D=0;D<C.length;D++){const A=C[D],N=ne(A);f.includes(N)||(V.splice(D,0,A),j.push(A))}return o==="wait"&&j.length&&(V=j),b(ps(V)),x(h),null}const{forceRender:P}=T.useContext(cn);return d.jsx(d.Fragment,{children:C.map(V=>{const D=ne(V),A=r&&!u?!1:h===C||f.includes(D),N=()=>{if(v.has(D))v.set(D,!0);else return;let R=!0;v.forEach(H=>{H||(R=!1)}),R&&(P?.(),b(y.current),r&&c?.(),s&&s())};return d.jsx(Kl,{isPresent:A,initial:!p.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:A?void 0:N,anch
vendor: 5,037 bytes, line 9
9orX:a,children:V},D)})})},fr=T.createContext({strict:!1}),gs={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Dt={};for(const t in gs)Dt[t]={isEnabled:e=>gs[t].some(n=>!!e[n])};function Hl(t){for(const e in t)Dt[e]={...Dt[e],...t[e]}}const Gl=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function me(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Gl.has(t)}let mr=t=>!me(t);function Yl(t){typeof t=="function"&&(mr=e=>e.startsWith("on")?!me(e):t(e))}try{Yl(require("@emotion/is-prop-valid").default)}catch{}function Xl(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(mr(i)||n===!0&&me(i)||!e&&!me(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const xe=T.createContext({});function ve(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ht(t){return typeof t=="string"||Array.isArray(t)}const Nn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],kn=["initial",...Nn];function be(t){return ve(t.animate)||kn.some(e=>Ht(t[e]))}function pr(t){return!!(be(t)||t.variants)}function ql(t,e){if(be(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Ht(n)?n:void 0,animate:Ht(s)?s:void 0}}return t.inherit!==!1?e:{}}function Zl(t){const{initial:e,animate:n}=ql(t,T.useContext(xe));return T.useMemo(()=>({initial:e,animate:n}),[ys(e),ys(n)])}function ys(t){return Array.isArray(t)?t.join(" "):t}function xs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Lt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(S.test(t))t=parseFloat(t);else return t;const n=xs(t,e.target.x),s=xs(t,e.target.y);return`${n}% ${s}%`}},Jl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=dt.parse(t);if(i.length>5)return s;const o=dt.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const u=F(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}},Ze={borderRadius:{...Lt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Lt,borderTopRightRadius:Lt,borderBottomLeftRadius:Lt,borderBottomRightRadius:Lt,boxShadow:Jl};function gr(t,{layout:e,layoutId:n}){return Nt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ze[t]||t==="opacity")}const Ql={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tc=Rt.length;function ec(t,e,n){let s="",i=!0;for(let o=0;o<tc;o++){const r=Rt[o],a=t[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=or(a,Dn[r]);if(!l){i=!1;const c=Ql[r]||r;s+=`${c}(${u}) `}n&&(e[r]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Ln(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const u=e[l];if(Nt.has(l)){r=!0;continue}else if(Bi(l)){i[l]=u;continue}else{const c=or(u,Dn[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(e.transform||(r||n?s.transform=ec(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;s.transformOrigin=`${l} ${u} ${c}`}}const Fn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yr(t,e,n){for(const s in e)!W(e[s])&&!gr(s,n)&&(t[s]=e[s])}function nc({transformTemplate:t},e){return T.useMemo(()=>{const n=Fn();return Ln(n,e,t),Object.assign({},n.vars,n.style)},[e])}function sc(t,e){const n=t.style||{},s={};return yr(s,n,t),Object.assign(s,nc(t,e)),s}function ic(t,e){const n={},s=sc(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const rc={offset:"stroke-dashoffset",array:"stroke-dasharray"},oc={offset:"strokeDashoffset",array:"strokeDasharray"};function ac(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?rc:oc;t[o.offset]=S.transform(-s);const r=S.transform(e),a=S.transform(n);t[o.array]=`${r} ${a}`}function xr(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a}
9,l,u,c){if(Ln(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&ac(h,i,o,r,!1)}const vr=()=>({...Fn(),attrs:{}}),br=t=>typeof t=="string"&&t.toLowerCase()==="svg";function lc(t,e,n,s){const i=T.useMemo(()=>{const o=vr();return xr(o,e,br(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};yr(o,t.style,t),i.style={...o,...i.style}}return i}const cc=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Bn(t){return typeof t!="string"||t.includes("-")?!1:!!(cc.indexOf(t)>-1||/[A-Z]/u.test(t))}function uc(t,e,n,{latestValues:s},i,o=!1){const a=(Bn(t)?lc:ic)(e,s,i,t),l=Xl(e,typeof t=="string",o),u=t!==T.Fragment?{...l,...a,ref:n}:{},{children:c}=e,h=T.useMemo(()=>W(c)?c.get():c,[c]);return T.createElement(t,{...u,children:h})}function vs(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function In(t,e,n,s){if(typeof e=="function"){const[i,o]=vs(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=vs(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function ae(t){return W(t)?t.get():t}function dc({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:hc(n,s,i,t),renderState:e()}}function hc(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=ae(o[f]);let{initial:r,animate:a}=t;const l=be(t),u=pr(t);e&&u&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const h=c?a:r;if(h&&typeof h!="boolean"&&!ve(h)){const f=Array.isArray(h)?h:[h];for(let p=0;p<f.length;p++){const y=In(t,f[p]);if(y){const{transitionEnd:v,transition:m,...x}=y;for(const C in x){let b=x[C];if(Array.isArray(b)){const j=c?b.length-1:0;b=b[j]}b!==null&&(i[C]=b)}for(const C in v)i[C]=v[C]}}}return i}const Tr=t=>(e,n)=>{const s=T.useContext(xe),i=T.useContext(ye),o=()=>dc(t,e,s,i);return n?o():un(o)};function On(t,e,n){const{style:s}=t,i={};for(const o in s)(W(s[o])||e.style&&W(e.style[o])||gr(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=s[o]);return i}const fc=Tr({scrapeMotionValuesFromProps:On,createRenderState:Fn});function Cr(t,e,n){const s=On(t,e,n);for(const i in t)if(W(t[i])||W(e[i])){const o=Rt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const mc=Tr({scrapeMotionValuesFromProps:Cr,createRenderState:vr}),pc=Symbol.for("motionComponentSymbol");function Ct(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function gc(t,e,n){return T.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):Ct(n)&&(n.current=s))},[e])}const Un=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yc="framerAppearId",wr="data-"+Un(yc),Pr=T.createContext({});function xc(t,e,n,s,i){const{visualElement:o}=T.useContext(xe),r=T.useContext(fr),a=T.useContext(ye),l=T.useContext(Rn).reducedMotion,u=T.useRef(null);s=s||r.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,h=T.useContext(Pr);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&vc(u.current,n,i,h);const f=T.useRef(!1);T.useInsertionEffect(()=>{c&&f.current&&c.update(n,a)});const p=n[wr],y=T.useRef(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return bi(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),y.current&&c.animationState&&c.animationState.animateChanges())}),T.useEffect(()=>{c&&(!y.current&&c.animationState&&c.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),y.current=!1),c.enteringChildren=void 0)}),c}function vc(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Sr(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Ct(a),visualElement:t,animationType:typeof o=="str
9ing"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function Sr(t){if(t)return t.options.allowProjection!==!1?t.projection:Sr(t.parent)}function je(t,{forwardMotionProps:e=!1}={},n,s){n&&Hl(n);const i=Bn(t)?mc:fc;function o(a,l){let u;const c={...T.useContext(Rn),...a,layoutId:bc(a)},{isStatic:h}=c,f=Zl(a),p=i(a,h);if(!h&&dn){Tc();const y=Cc(c);u=y.MeasureLayout,f.visualElement=xc(t,p,c,s,y.ProjectionNode)}return d.jsxs(xe.Provider,{value:f,children:[u&&f.visualElement?d.jsx(u,{visualElement:f.visualElement,...c}):null,uc(t,a,gc(p,f.visualElement,l),p,h,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=T.forwardRef(o);return r[pc]=t,r}function bc({layoutId:t}){const e=T.useContext(cn).id;return e&&t!==void 0?e+"-"+t:t}function Tc(t,e){T.useContext(fr).strict}function Cc(t){const{drag:e,layout:n}=Dt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function wc(t,e){if(typeof Proxy>"u")return je;const n=new Map,s=(o,r)=>je(o,r,t,e),i=(o,r)=>s(o,r);return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,je(r,void 0,t,e)),n.get(r))})}function Ar({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Pc({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Sc(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Ve(t){return t===void 0||t===1}function Je({scale:t,scaleX:e,scaleY:n}){return!Ve(t)||!Ve(e)||!Ve(n)}function mt(t){return Je(t)||jr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function jr(t){return bs(t.x)||bs(t.y)}function bs(t){return t&&t!=="0%"}function pe(t,e,n){const s=t-n,i=e*s;return n+i}function Ts(t,e,n,s,i){return i!==void 0&&(t=pe(t,i,s)),pe(t,n,s)+e}function Qe(t,e=0,n=1,s,i){t.min=Ts(t.min,e,n,s,i),t.max=Ts(t.max,e,n,s,i)}function Vr(t,{x:e,y:n}){Qe(t.x,e.translate,e.scale,e.originPoint),Qe(t.y,n.translate,n.scale,n.originPoint)}const Cs=.999999999999,ws=1.0000000000001;function Ac(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Pt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Vr(t,r)),s&&mt(o.latestValues)&&Pt(t,o.latestValues))}e.x<ws&&e.x>Cs&&(e.x=1),e.y<ws&&e.y>Cs&&(e.y=1)}function wt(t,e){t.min=t.min+e,t.max=t.max+e}function Ps(t,e,n,s,i=.5){const o=F(t.min,t.max,i);Qe(t,e,n,o,s)}function Pt(t,e){Ps(t.x,e.x,e.scaleX,e.scale,e.originX),Ps(t.y,e.y,e.scaleY,e.scale,e.originY)}function Dr(t,e){return Ar(Sc(t.getBoundingClientRect(),e))}function jc(t,e,n){const s=Dr(t,n),{scroll:i}=e;return i&&(wt(s.x,i.offset.x),wt(s.y,i.offset.y)),s}const Ss=()=>({translate:0,scale:1,origin:0,originPoint:0}),St=()=>({x:Ss(),y:Ss()}),As=()=>({min:0,max:0}),O=()=>({x:As(),y:As()}),tn={current:null},Mr={current:!1};function Vc(){if(Mr.current=!0,!!dn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>tn.current=t.matches;t.addEventListener("change",e),e()}else tn.current=!1}const Dc=new WeakMap;function Mc(t,e,n){for(const s in e){const i=e[s],o=n[s];if(W(i))t.addValue(s,i);else if(W(o))t.addValue(s,Vt(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,Vt(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const js=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ec{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=jn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=_.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,L.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=be(n),this.isVariantNode=pr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const p=h[f];l[f]!==void 0&&W(p)&&p.set(l[f])}}mount(e){this.current=e,Dc.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
vendor: 29,313 bytes, line 9
9h((n,s)=>this.bindToMotionValue(s,n)),Mr.current||Vc(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:tn.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ut(this.notifyUpdate),ut(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=Nt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&L.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Dt){const n=Dt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):O()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<js.length;s++){const i=js[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Mc(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Vt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Ti(s)||wi(s))?s=parseFloat(s):!Il(s)&&dt.test(n)&&(s=rr(e,n)),this.setBaseTarget(e,W(s)?s.get():s)),W(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=In(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!W(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new gn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Mn.render(this.render)}}class Er extends Ec{constructor(){super(...arguments),this.KeyframeResolver=Al}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;W(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Rr(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function Rc(t){return window.getComputedStyle(t)}class Nc extends Er{constructor(){super(...arguments),this.type="html",this.renderInstance=Rr}readValueFromInstance(e,n){if(Nt.has(n))return this.projection?.isProjecting?ze(n):_a(e,n);{const s=Rc(e),i=(Bi(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Dr(e,n)}build(e,n,s){Ln(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return On(e,n,s)}}const Nr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function kc(t,e,n,s){Rr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Nr.has(i)?i:Un(i),e.attrs[i])}class Lc extends Er{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=O}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Nt.has(n)){const s=ir(n);return s&&s.default||0}return n=Nr.has(n)?n:Un(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Cr(e,n,s)}build(e,n,s){xr(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){kc(e,n,s,i)}mount(e){this.isSVGTag=br(e.tagName),super.mount(e)}}const Fc=(t,e)=>Bn(t)?new Lc(e):new Nc(e,{allowProjection:t!==T.Fragment});function jt(t,e,n){const s=t.getProps();return In(s,e,n!==void 0?n:s.custom,t)}const en=t=>Array.isArray(t);function Bc(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Vt(n))}function Ic(t){return en(t)?t[t.length-1]||0:t}function Oc(t,e){const n=jt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Ic(o[r]);Bc(t,r,a)}}function Uc(t){return!!(W(t)&&t.add)}function nn(t,e){const n=t.getValue("willChange");if(Uc(n))return n.add(e);if(!n&&ot.WillChange){const s=new ot.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function kr(t){return t.props[wr]}const $c=t=>t!==null;function Wc(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter($c),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const Kc={type:"spring",stiffness:500,damping:25,restSpeed:10},zc=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),_c={type:"keyframes",duration:.8},Hc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Gc=(t,{keyframes:e})=>e.length>2?_c:Nt.has(t)?t.startsWith("scale")?zc(e[1]):Kc:Hc;function Yc({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const $n=(t,e,n,s={},i,o)=>r=>{const a=Vn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-et(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Yc(a)||Object.assign(c,Gc(t,c)),c.duration&&(c.duration=et(c.duration)),c.repeatDelay&&(c.repeatDelay=et(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Xe(c),c.delay===0&&(h=!0)),(ot.instantAnimations||ot.skipAnimations)&&(h=!0,Xe(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const f=Wc(c.keyframes,a);if(f!==void 0){L.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new An(c):new ml(c)};function Xc({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Lr(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const h=t.getValue(c,t.latestValues[c]??null),f=a[c];if(f===void 0||u&&Xc(u,c))continue;const p={delay:n,...Vn(o||{},c)},y=h.get();if(y!==void 0&&!h.isAnimating&&!Array.isArray(f)&&f===y&&!p.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const x=kr(t);if(x){const C=window.MotionHandoffAnimation(x,c,L);C!==null&&(p.startTime=C,v=!0)}}nn(t,c),h.start($n(c,h,f,t.shouldReduceMotion&&er.has(c)?{type:!1}:p,t,v));const m=h.animation;m&&l.push(m)}return r&&Promise.all(l).then(()=>{L.update(()=>{r&&Oc(t,r)})}),l}function Fr(t,e,n,s=0,i=1){const o=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function sn(t,e,n={}){const s=jt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(Lr(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:h}=i;return qc(t,e,l,u,c,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function qc(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(sn(l,e,{...r,delay:n+(typeof s=="function"?0:s)+Fr(t.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Zc(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>sn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=sn(t,e,n);else{const i=typeof e=="function"?jt(t,e,n.custom):e;s=Promise.all(Lr(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function Br(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Jc=kn.length;function Ir(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Ir(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Jc;n++){const s=kn[n],i=t.props[s];(Ht(i)||i===!1)&&(e[s]=i)}return e}const Qc=[...Nn].reverse(),tu=Nn.length;function eu(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Zc(t,n,s)))}function nu(t){let e=eu(t),n=Vs(),s=!0;const i=l=>(u,c)=>{const h=jt(t,c,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:f,transitionEnd:p,...y}=h;u={...u,...y,...p}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=Ir(t.parent)||{},h=[],f=new Set;let p={},y=1/0;for(let m=0;m<tu;m++){const x=Qc[m],C=n[x],b=u[x]!==void 0?u[x]:c[x],j=Ht(b),P=x===l?C.isActive:null;P===!1&&(y=m);let V=b===c[x]&&b!==u[x]&&j;if(V&&s&&t.manuallyAnimateOnMount&&(V=!1),C.protectedKeys={...p},!C.isActive&&P===null||!b&&!C.prevProp||ve(b)||typeof b=="boolean")continue;const D=su(C.prevProp,b);let A=D||x===l&&C.isActive&&!V&&j||m>y&&j,N=!1;const R=Array.isArray(b)?b:[b];let H=R.reduce(i(x),{});P===!1&&(H={});const{prevResolvedValues:g={}}=C,w={...g,...H},k=E=>{A=!0,f.has(E)&&(N=!0,f.delete(E)),C.needsAnimating[E]=!0;const U=t.getValue(E);U&&(U.liveStyle=!1)};for(const E in w){const U=H[E],st=g[E];if(p.hasOwnProperty(E))continue;let bt=!1;en(U)&&en(st)?bt=!Br(U,st):bt=U!==st,bt?U!=null?k(E):f.add(E):U!==void 0&&f.has(E)?k(E):C.protectedKeys[E]=!0}C.prevProp=b,C.prevResolvedValues=H,C.isActive&&(p={...p,...H}),s&&t.blockInitialAnimation&&(A=!1);const z=V&&D;A&&(!z||N)&&h.push(...R.map(E=>{const U={type:x};if(typeof E=="string"&&s&&!z&&t.manuallyAnimateOnMount&&t.parent){const{parent:st}=t,bt=jt(st,E);if(st.enteringChildren&&bt){const{delayChildren:Qr}=bt.transition||{};U.delay=Fr(st.enteringChildren,t,Qr)}}return{animation:E,options:U}}))}if(f.size){const m={};if(typeof u.initial!="boolean"){const x=jt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(m.transition=x.transition)}f.forEach(x=>{const C=t.getBaseTarget(x),b=t.getValue(x);b&&(b.liveStyle=!0),m[x]=C??null}),h.push({animation:m})}let v=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(v=!1),s=!1,v?e(h):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,u)),n[l].isActive=u;const c=r(l);for(const h in n)n[h].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Vs()}}}function su(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Br(e,t):!1}function ft(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Vs(){return{animate:ft(!0),whileInView:ft(),whileHover:ft(),whileTap:ft(),whileDrag:ft(),whileFocus:ft(),exit:ft()}}class ht{constructor(e){this.isMounted=!1,this.node=e}update(){}}class iu extends ht{constructor(e){super(e),e.animationState||(e.animationState=nu(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ve(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let ru=0;class ou extends ht{constructor(){super(...arguments),this.id=ru++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const au={animation:{Feature:iu},exit:{Feature:ou}};function Gt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function Zt(t){return{point:{x:t.pageX,y:t.pageY}}}const lu=t=>e=>En(e)&&t(e,Zt(e));function $t(t,e,n,s){return Gt(t,e,lu(n),s)}const Or=1e-4,cu=1-Or,uu=1+Or,Ur=.01,du=0-Ur,hu=0+Ur;function K(t){return t.max-t.min}function fu(t,e,n){return Math.abs(t-e)<=n}function Ds(t,e,n,s=.5){t.origin=s,t.originPoint=F(e.min,e.max,t.origin),t.scale=K(n)/K(e),t.translate=F(n.min,n.max,t.origin)-t.originPoint,(t.scale>=cu&&t.scale<=uu||isNaN(t.scale))&&(t.scale=1),(t.translate>=du&&t.translate<=hu||isNaN(t.translate))&&(t.translate=0)}function Wt(t,e,n,s){Ds(t.x,e.x,n.x,s?s.originX:void 0),Ds(t.y,e.y,n.y,s?s.originY:void 0)}function Ms(t,e,n){t.min=n.min+e.min,t.max=t.min+K(e)}function mu(t,e,n){Ms(t.x,e.x,n.x),Ms(t.y,e.y,n.y)}function Es(t,e,n){t.min=e.min-n.min,t.max=t.min+K(e)}function ge(t,e,n){Es(t.x,e.x,n.x),Es(t.y,e.y,n.y)}function Y(t){return[t("x"),t("y")]}const $r=({current:t})=>t?t.ownerDocument.defaultView:null,Rs=(t,e)=>Math.abs(t-e);function pu(t,e){const n=Rs(t.x,e.x),s=Rs(t.y,e.y);return Math.sqrt(n**2+s**2)}class Wr{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Me(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,y=pu(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!y)return;const{point:v}=f,{timestamp:m}=$;this.history.push({...v,timestamp:m});const{onStart:x,onMove:C}=this.handlers;p||(x&&x(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=De(p,this.transformPagePoint),L.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:y,onSessionEnd:v,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Me(f.type==="pointercancel"?this.lastMoveEventInfo:De(p,this.transformPagePoint),this.history);this.startEvent&&y&&y(f,x),v&&v(f,x)},!En(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=Zt(e),l=De(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=$;this.history=[{...u,timestamp:c}];const{onSessionStart:h}=n;h&&h(e,Me(l,this.history)),this.removeListeners=Yt($t(this.contextWindow,"pointermove",this.handlePointerMove),$t(this.contextWindow,"pointerup",this.handlePointerUp),$t(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ut(this.updatePoint)}}function De(t,e){return e?{point:e(t.point)}:t}function Ns(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Me({point:t},e){return{point:t,delta:Ns(t,Kr(e)),offset:Ns(t,gu(e)),velocity:yu(e,.1)}}function gu(t){return t[0]}function Kr(t){return t[t.length-1]}function yu(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Kr(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>et(e)));)n--;if(!s)return{x:0,y:0};const o=X(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function xu(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?F(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?F(n,t,s.max):Math.min(t,n)),t}function ks(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function vu(t,{top:e,left:n,bottom:s,right:i}){return{x:ks(t.x,n,i),y:ks(t.y,e,s)}}function Ls(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function bu(t,e){return{x:Ls(t.x,e.x),y:Ls(t.y,e.y)}}function Tu(t,e){let n=.5;const s=K(t),i=K(e);return i>s?n=Kt(e.min,e.max-s,t.min):s>i&&(n=Kt(t.min,t.max-i,e.min)),rt(0,1,n)}function Cu(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const rn=.35;function wu(t=rn){return t===!1?t=0:t===!0&&(t=rn),{x:Fs(t,"left","right"),y:Fs(t,"top","bottom")}}function Fs(t,e,n){return{min:Bs(t,e),max:Bs(t,n)}}function Bs(t,e){return typeof t=="number"?t:t[e]||0}const Pu=new WeakMap;class Su{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=O(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=h=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Zt(h).point)},r=(h,f)=>{const{drag:p,dragPropagation:y,onDragStart:v}=this.getProps();if(p&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ml(p),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Y(x=>{let C=this.getAxisMotionValue(x).get()||0;if(nt.test(C)){const{projection:b}=this.visualElement;if(b&&b.layout){const j=b.layout.layoutBox[x];j&&(C=K(j)*(parseFloat(C)/100))}}this.originPoint[x]=C}),v&&L.postRender(()=>v(h,f)),nn(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:y,onDirectionLock:v,onDrag:m}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:x}=f;if(y&&this.currentDirection===null){this.currentDirection=Au(x),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,x),this.updateAxis("y",f.point,x),this.visualElement.render(),m&&m(h,f)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Y(h=>this.getAnimationState(h)==="paused"&&this.getAxisMotionValue(h).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Wr(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:$r(this.visualElement)})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&L.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!se(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=xu(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&Ct(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=vu(s.layoutBox,e):this.constraints=!1,this.elastic=wu(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Y(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Cu(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Ct(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=jc(s,i.root,this.visualElement.getTransformPagePoint());let r=bu(i.layout.layoutBox,o);if(n){const a=n(Pc(r));this.hasMutatedConstraints=!!a,a&&(r=Ar(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Y(c=>{if(!se(c,n,this.currentDirection))return;let h=l&&l[c]||{};r&&(h={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,y={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,y)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return nn(this.visualElement,e),s.start($n(e,s,0,n,this.visualElement,!1))}stopAnimation(){Y(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Y(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){Y(n=>{const{drag:s}=this.getProps();if(!se(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-F(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Ct(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Y(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Tu({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),Y(r=>{if(!se(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(F(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;Pu.set(this.visualElement,this);const e=this.visualElement.current,n=$t(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();Ct(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),L.read(s);const r=Gt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Y(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=rn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function se(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Au(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class ju extends ht{constructor(e){super(e),this.removeGroupControls=q,this.removeListeners=q,this.controls=new Su(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||q}unmount(){this.removeGroupControls(),this.removeListeners()}}const Is=t=>(e,n)=>{t&&L.postRender(()=>t(e,n))};class Vu extends ht{constructor(){super(...arguments),this.removePointerDownListener=q}onPointerDown(e){this.session=new Wr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$r(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Is(e),onStart:Is(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&L.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=$t(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const le={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Ee=!1;class Du extends T.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),Ee&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),le.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Ee=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||L.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Mn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Ee=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function zr(t){const[e,n]=hr(),s=T.useContext(cn);return d.jsx(Du,{...t,layoutGroup:s,switchLayoutGroup:T.useContext(Pr),isPresent:e,safeToRemove:n})}function Mu(t,e,n){const s=W(t)?t:Vt(t);return s.start($n("",s,e,n)),s.animation}const Eu=(t,e)=>t.depth-e.depth;class Ru{constructor(){this.children=[],this.isDirty=!1}add(e){hn(this.children,e),this.isDirty=!0}remove(e){fn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Eu),this.isDirty=!1,this.children.forEac
vendor: 5,079 bytes, line 9
9h(e)}}function Nu(t,e){const n=_.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(ut(s),t(o-e))};return L.setup(s,!0),()=>ut(s)}const _r=["TopLeft","TopRight","BottomLeft","BottomRight"],ku=_r.length,Os=t=>typeof t=="string"?parseFloat(t):t,Us=t=>typeof t=="number"||S.test(t);function Lu(t,e,n,s,i,o){i?(t.opacity=F(0,n.opacity??1,Fu(s)),t.opacityExit=F(e.opacity??1,0,Bu(s))):o&&(t.opacity=F(e.opacity??1,n.opacity??1,s));for(let r=0;r<ku;r++){const a=`border${_r[r]}Radius`;let l=$s(e,a),u=$s(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Us(l)===Us(u)?(t[a]=Math.max(F(Os(l),Os(u),s),0),(nt.test(u)||nt.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=F(e.rotate||0,n.rotate||0,s))}function $s(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Fu=Hr(0,.5,Ei),Bu=Hr(.5,.95,q);function Hr(t,e,n){return s=>s<t?0:s>e?1:n(Kt(t,e,s))}function Ws(t,e){t.min=e.min,t.max=e.max}function Z(t,e){Ws(t.x,e.x),Ws(t.y,e.y)}function Ks(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function zs(t,e,n,s,i){return t-=e,t=pe(t,1/n,s),i!==void 0&&(t=pe(t,1/i,s)),t}function Iu(t,e=0,n=1,s=.5,i,o=t,r=t){if(nt.test(e)&&(e=parseFloat(e),e=F(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=F(o.min,o.max,s);t===o&&(a-=e),t.min=zs(t.min,e,n,a,i),t.max=zs(t.max,e,n,a,i)}function _s(t,e,[n,s,i],o,r){Iu(t,e[n],e[s],e[i],e.scale,o,r)}const Ou=["x","scaleX","originX"],Uu=["y","scaleY","originY"];function Hs(t,e,n,s){_s(t.x,e,Ou,n?n.x:void 0,s?s.x:void 0),_s(t.y,e,Uu,n?n.y:void 0,s?s.y:void 0)}function Gs(t){return t.translate===0&&t.scale===1}function Gr(t){return Gs(t.x)&&Gs(t.y)}function Ys(t,e){return t.min===e.min&&t.max===e.max}function $u(t,e){return Ys(t.x,e.x)&&Ys(t.y,e.y)}function Xs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Yr(t,e){return Xs(t.x,e.x)&&Xs(t.y,e.y)}function qs(t){return K(t.x)/K(t.y)}function Zs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Wu{constructor(){this.members=[]}add(e){hn(this.members,e),e.scheduleRender()}remove(e){if(fn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ku(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:p,skewY:y}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),p&&(s+=`skewX(${p}deg) `),y&&(s+=`skewY(${y}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const Re=["","X","Y","Z"],zu=1e3;let _u=0;function Ne(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Xr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=kr(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",L,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Xr(s)}function qr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=_u++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>
vendor: 19,693 bytes, line 9
9{this.projectionUpdateScheduled=!1,this.nodes.forEach(Yu),this.nodes.forEach(Ju),this.nodes.forEach(Qu),this.nodes.forEach(Xu)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ru)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new gn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=dr(r)&&!Fl(r),this.instance=r;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;L.read(()=>{h=window.innerWidth}),t(r,()=>{const p=window.innerWidth;p!==h&&(h=p,this.root.updateBlockedByResize=!0,c&&c(),c=Nu(f,250),le.hasAnimatedSinceResize&&(le.hasAnimatedSinceResize=!1,this.nodes.forEach(ti)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||id,{onLayoutAnimationStart:v,onLayoutAnimationComplete:m}=u.getProps(),x=!this.targetLayout||!Yr(this.targetLayout,p),C=!h&&f;if(this.options.layoutRoot||this.resumeFrom||C||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...Vn(y,"layout"),onPlay:v,onComplete:m};(u.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(c,C)}else h||ti(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ut(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(td),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Xr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Js);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Qs);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Zu),this.nodes.forEach(Hu),this.nodes.forEach(Gu)):this.nodes.forEach(Qs),this.clearAllSnapshots();const a=_.now();$.delta=rt(0,1e3/60,a-$.timestamp),$.timestamp=a,$.isProcessing=!0,Te.update.process($),Te.preRender.process($),Te.render.process($),$.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Mn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(qu),this.sharedNodes.forEach(ed)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,L.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){L.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!K(this.snapshot.measuredBox.x)&&!K(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=O(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Gr(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||mt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),rd(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return O();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(od))){const{scroll:u}=this.root;u&&(wt(a.x,u.offset.x),wt(a.y,u.offset.y))}return a}removeElementScroll(r){const a=O();if(Z(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:h}=u;u!==this.root&&c&&h.layoutScroll&&(c.wasRoot&&Z(a,r),wt(a.x,c.offset.x),wt(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=O();Z(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Pt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),mt(c.latestValues)&&Pt(l,c.latestValues)}return mt(this.latestValues)&&Pt(l,this.latestValues),l}removeTransform(r){const a=O();Z(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!mt(u.latestValues))continue;Je(u.latestValues)&&u.updateSnapshot();const c=O(),h=u.measurePageBox();Z(c,h),Hs(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return mt(this.latestValues)&&Hs(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=$.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=O(),this.targetWithTransforms=O()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),mu(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Z(this.target,this.layout.layoutBox),Vr(this.target,this.targetDelta)):Z(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Je(this.parent.latestValues)||jr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,a,l){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=O(),this.relativeTargetOrigin=O(),ge(this.relativeTargetOrigin,a,l),Z(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===$.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;Z(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Ac(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=O());const{target:p}=r;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ks(this.prevProjectionDelta.x,this.projectionDelta.x),Ks(this.prevProjectionDelta.y,this.projectionDelta.y)),Wt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Zs(this.projectionDelta.x,this.prevProjectionDelta.x)||!Zs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=St(),this.projectionDelta=St(),this.projectionDeltaWithTransform=St()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=St();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=O(),p=l?l.source:void 0,y=this.layout?this.layout.source:void 0,v=p!==y,m=this.getStack(),x=!m||m.members.length<=1,C=!!(v&&!x&&this.options.crossfade===!0&&!this.path.some(sd));this.animationProgress=0;let b;this.mixTargetDelta=j=>{const P=j/1e3;ei(h.x,r.x,P),ei(h.y,r.y,P),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ge(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),nd(this.relativeTarget,this.relativeTargetOrigin,f,P),b&&$u(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=O()),Z(b,this.relativeTarget)),v&&(this.animationValues=c,Lu(c,u,this.latestValues,P,C,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ut(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=L.update(()=>{le.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Vt(0)),this.currentAnimation=Mu(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(zu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&Zr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||O();const h=K(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=K(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}Z(a,l),Pt(a,c),Wt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Wu),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Ne("z",r,u,this.animationValues);for(let c=0;c<Re.length;c++)Ne(`rotate${Re[c]}`,r,u,this.animationValues),Ne(`skew${Re[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=ae(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=ae(a?.pointerEvents)||""),this.hasProjected&&!mt(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=Ku(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),r.transform=h;const{x:f,y:p}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?r.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const y in Ze){if(c[y]===void 0)continue;const{correct:v,applyTo:m,isCSSVariable:x}=Ze[y],C=h==="none"?c[y]:v(c[y],u);if(m){const b=m.length;for(let j=0;j<b;j++)r[m[j]]=C}else x?this.options.visualElement.renderState.vars[y]=C:r[y]=C}this.options.layoutId&&(r.pointerEvents=u===this?ae(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Js),this.root.sharedNodes.clear()}}}function Hu(t){t.updateLayout()}function Gu(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;i==="size"?Y(c=>{const h=o?e.measuredBox[c]:e.layoutBox[c],f=K(h);h.min=n[c].min,h.max=h.min+f}):Zr(i,e.layoutBox,n)&&Y(c=>{const h=o?e.measuredBox[c]:e.layoutBox[c],f=K(n[c]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+f)});const r=St();Wt(r,n,e.layoutBox);const a=St();o?Wt(a,t.applyTransform(s,!0),e.measuredBox):Wt(a,n,e.layoutBox);const l=!Gr(r);let u=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:h,layout:f}=c;if(h&&f){const p=O();ge(p,e.layoutBox,h.layoutBox);const y=O();ge(y,n,f.layoutBox),Yr(p,y)||(u=!0),c.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=p,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Yu(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Xu(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function qu(t){t.clearSnapshot()}function Js(t){t.clearMeasurements()}function Qs(t){t.isLayoutDirty=!1}function Zu(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ti(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Ju(t){t.resolveTargetDelta()}function Qu(t){t.calcProjection()}
vendor: 4,446 bytes, line 9
9function td(t){t.resetSkewAndRotation()}function ed(t){t.removeLeadSnapshot()}function ei(t,e,n){t.translate=F(e.translate,0,n),t.scale=F(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ni(t,e,n,s){t.min=F(e.min,n.min,s),t.max=F(e.max,n.max,s)}function nd(t,e,n,s){ni(t.x,e.x,n.x,s),ni(t.y,e.y,n.y,s)}function sd(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const id={duration:.45,ease:[.4,0,.1,1]},si=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ii=si("applewebkit/")&&!si("chrome/")?Math.round:q;function ri(t){t.min=ii(t.min),t.max=ii(t.max)}function rd(t){ri(t.x),ri(t.y)}function Zr(t,e,n){return t==="position"||t==="preserve-aspect"&&!fu(qs(e),qs(n),.2)}function od(t){return t!==t.root&&t.scroll?.wasRoot}const ad=qr({attachResizeListener:(t,e)=>Gt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ke={current:void 0},Jr=qr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ke.current){const t=new ad({});t.mount(window),t.setOptions({layoutScroll:!0}),ke.current=t}return ke.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),ld={pan:{Feature:Vu},drag:{Feature:ju,ProjectionNode:Jr,MeasureLayout:zr}};function oi(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&L.postRender(()=>o(e,Zt(e)))}class cd extends ht{mount(){const{current:e}=this.node;e&&(this.unmount=El(e,(n,s)=>(oi(this.node,s,"Start"),i=>oi(this.node,i,"End"))))}unmount(){}}class ud extends ht{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Yt(Gt(this.node.current,"focus",()=>this.onFocus()),Gt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ai(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&L.postRender(()=>o(e,Zt(e)))}class dd extends ht{mount(){const{current:e}=this.node;e&&(this.unmount=Ll(e,(n,s)=>(ai(this.node,s,"Start"),(i,{success:o})=>ai(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const on=new WeakMap,Le=new WeakMap,hd=t=>{const e=on.get(t.target);e&&e(t)},fd=t=>{t.forEach(hd)};function md({root:t,...e}){const n=t||document;Le.has(n)||Le.set(n,{});const s=Le.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(fd,{root:t,...e})),s[i]}function pd(t,e,n){const s=md(e);return on.set(t,n),s.observe(t),()=>{on.delete(t),s.unobserve(t)}}const gd={some:0,all:1};class yd extends ht{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:gd[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return pd(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(xd(e,n))&&this.startObserver()}unmount(){}}function xd({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const vd={inView:{Feature:yd},tap:{Feature:dd},focus:{Feature:ud},hover:{Feature:cd}},bd={layout:{ProjectionNode:Jr,MeasureLayout:zr}},Td={...au,...vd,...ld,...bd},li=wc(Td,Fc);function Cd({isOpen:t,onClose:e,children:n,originRect:s}){return s?d.jsx(_l,{children:t&&d.jsxs(d.Fragment,{children:[d.jsx(li.div,{className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-40",onClick:e,initial:{opacity:0}
9,animate:{opacity:1},exit:{opacity:0}}),d.jsx(li.div,{className:"fixed bg-white rounded-xl shadow-xl z-50 p-6",initial:{width:s.width,height:s.height,top:s.top,left:s.left},animate:{width:"70vw",height:"70vh",top:"20vh",left:"20vw"},exit:{width:s.width,height:s.height,top:s.top,left:s.left},transition:{duration:.35,ease:"easeInOut"},children:d.jsx("div",{className:"w-full h-full overflow-auto",children:n})})]})}):null}const Ft=At.normal,ie=ue.normal,ci=[1,2,3,41,42,43,44],Fe=t=>t<3?`${["Первая","Вторая","Третья"][t]} оч.`:`Четвёртая оч. (${["4.1","4.2","4.3","4.4"][t-3]})`,ui=[{key:"mainDebt",label:"Основной долг"},{key:"fine",label:"Пеня"},{key:"percent",label:"Проценты"},{key:"other",label:"Иное"}],wd=["currencyExchangeRate","mainDebt","fine","percent","other"],Pd=({grounds:t,onChange:e})=>{const n=tt(ho),[s,i]=T.useState(null),[o,r]=T.useState(null),[a,l]=T.useState(!1),[u,c]=T.useState(null),h=tt(Mt),f=[...t].reverse(),p=Object.values(n).find(g=>g.curCode===0)??n[0],y=xi(h,"grounds"),v=(g,w)=>w!=null?yi(h,"grounds",w,g):void 0,m=(g,w)=>{c(w.getBoundingClientRect()),i(f.length-(g+1)),r(f[g]),document.body.classList.add("overflow-hidden"),l(!0)},x=()=>{document.body.classList.remove("overflow-hidden"),r(null),l(!1)},C=()=>{e(s,o),x()},b=g=>r(w=>w&&{...w,...g}),j=g=>{const w=n.find(k=>k.id===g);b({currency:w,...w.curCode===0?{currencyExchangeRate:1}:{}})},P=(g,w)=>{if(w===""){b({[g]:null});return}b({[g]:wd.includes(g)?w>=0?w:null:w})},V=(g,w)=>{const k=w===""?null:w,z=o.phases.map(at=>at.phase===g?{...at,amount:k}:at);z.some(at=>at.phase===g)||z.push({phase:g,amount:k}),b({phases:z})},D=()=>{M(fo({id:0,requirementsId:0,currencyId:0,currency:p,currencyExchangeRate:1,mainDebt:0,fine:0,percent:0,other:0,supportingDocuments:"",includeForeign:!1,decisionType:0,extraordinaryPayments:0,phases:[],submittedAfterExpiration:!1,foreignRequirementsSumBYN:0}))},A=g=>M(mo(f.length-(g+1))),N=T.useMemo(()=>{const g={mainDebt:0,fine:0,percent:0,other:0,total:0};return t?.forEach(w=>{const k=w.currencyExchangeRate/w.currency?.curScale;g.mainDebt+=(w.mainDebt||0)*k,g.fine+=(w.fine||0)*k,g.percent+=(w.percent||0)*k,g.other+=(w.other||0)*k}),g.total=g.mainDebt+g.fine+g.percent+g.other,g},[t]),R=g=>{if(g==null)return"0,00";const[w,k=""]=g.toFixed(2).split(".");return`${Number(w).toLocaleString("ru-RU")},${k.slice(0,2).padEnd(2,"0")}`},H=g=>{g=g.replace(/[^0-9.,]/g,""),g=g.replace(/,/g,".");const w=g.split(".");return w.length>2&&(g=w[0]+"."+w.slice(1).join("")),/^\d*\.?\d*$/.test(g)?g.endsWith(".")||g===""||g==="."?g:parseFloat(g):g};return d.jsxs(d.Fragment,{children:[d.jsx("div",{children:d.jsxs("h3",{className:`flex flex-wrap items-center gap-2 text-[1rem] font-semibold ${y?"text-[#e12d39]":"text-[color:var(--page-content-title)]"} !my-[15px]`,children:[d.jsx(Fo,{fontSize:"small",className:y?"text-[#e12d39]":"text-[#2aa3d0]"}),"Требования",d.jsxs("span",{className:"text-sm font-bold text-[#627d98]",children:["Всего заявлено(BYN) ",R(N.total),"  •  Осн. долг ",R(N.mainDebt),"  •  Пеня ",R(N.fine),"  •  Проценты ",R(N.percent),"  •  Иное ",R(N.other)]})]})}),d.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[d.jsxs("div",{onClick:D,className:"bg-white rounded-lg min-h-[250px] flex flex-col items-center justify-center border-2 border-dashed border-gray-300 text-gray-400 cursor-pointer transition-all duration-200 hover:border-[#2aa3d0] hover:text-[#2aa3d0] hover:bg-[#f0faff] hover:-translate-y-0.5 select-none",children:[d.jsx("span",{className:"text-5xl font-light leading-none mb-2",children:"+"}),d.jsx("span",{className:"text-sm font-medium",children:"Добавить требование"})]}),f.map((g,w)=>{const k=+g.mainDebt+ +g.fine+ +g.percent+ +g.other,z=g.phases.reduce((E,U)=>E+ +U.amount,0),at=v("supportingDocuments",t.length-w-1);return d.jsxs("div",{className:`
10                                        ground-card bg-white rounded-lg min-h-[250px] flex flex-col p-4 shadow-sm justify-between transition-all duration-200 
11                                        border-l-4 p-4 shadow-sm
12                                        ${at?"border-red-500 border-l-red-600 bg-red-50/50":"border-gray-200 border-l-emerald-500 hover:shadow-md hover:border-gray-300"}
13                                    `,children:[d.jsxs("div",{className:"flex justify-between items-start mb-3",children:[d.jsxs("h4",{className:"m-0 text-base font-semibold text-gray-900 line-clamp-2 mr-2",children:["Требование №",t.length-w]}),d.jsxs("div",{className:"flex gap-1 shrink-0",children:[d.jsx("button",{type:"button",title:"Редактировать",onClick:E=>m(w,E.currentTarget.closest(".ground-card")),className:"cr-icon-btn",children:d.jsx(Eo,{fontSize:"small"})}),d.jsx("button",{type:"button",title:"Удалить",onClick:()=>A(w),className:"cr-icon-btn cr-icon-btn--danger",children:d.jsx(gi,{fontSize:"small"})})]})]}),d.jsxs("div",{className:"text-[13px] text-gray-600 flex flex-col gap-1.5",children:[ui.map(({key:E,label:U})=>d.jsxs("div",{className:"flex justify-between",children:[d.jsx("span",{children:U}),d.jsx("span",{children:R(g[E])})]},E)),ci.map((E,U)=>d.jsxs("div",{className:"flex justify-between",children:[d.jsx("span",{children:Fe(U)}
13),d.jsx("span",{children:R(g.phases.find(st=>st.phase===E)?.amount??0)})]},E)),d.jsxs("div",{className:"mt-2 pt-2 border-t border-gray-100 flex justify-between font-bold text-gray-900",children:[d.jsx("span",{children:"Всего заявлено"}),d.jsxs("span",{children:[R(k)," (",g.currency?.curAbbreviation,")"]})]}),d.jsxs("div",{className:"pt-2 border-t border-gray-100 flex justify-between font-bold text-gray-900",children:[d.jsx("span",{children:"Всего разнесено"}),d.jsxs("span",{children:[R(z)," (",g.currency?.curAbbreviation,")"]})]})]})]},w)})]}),d.jsx(Cd,{isOpen:a,onClose:x,originRect:u,children:d.jsxs("div",{className:"p-6 flex flex-col gap-6",children:[d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[2.1fr_1fr_1fr] gap-6",children:[d.jsx(It,{options:Object.values(n).map(g=>({value:g.id,label:g.curName})),label:"Валюта",value:o?.currency?.id?{value:o.currency.id,label:o.currency.curName}:null,isClearable:!1,placeholder:"Выберите валюту...",noOptionsMessage:"Ничего не найдено",onChange:g=>g&&j(g.value)}),d.jsxs("div",{children:[d.jsx("label",{className:ie,children:"Курс"}),d.jsx("input",{type:"text",disabled:o?.currency.curCode===0,inputMode:"decimal",className:Ft,value:o?.currencyExchangeRate,onChange:g=>{let w=H(g.target.value);w!==void 0?P("currencyExchangeRate",w):g.target.value=""}})]}),d.jsxs("div",{children:[d.jsx("label",{className:ie,children:"Кол-во единиц"}),d.jsx("input",{type:"number",className:Ft,value:o?.currency.curScale??"",disabled:!0})]})]}),d.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6",children:ui.map(({key:g,label:w})=>d.jsxs("div",{children:[d.jsx("label",{className:ie,children:w}),d.jsx("input",{type:"text",inputMode:"decimal",className:Ft,value:o?.[g],onChange:k=>{let z=H(k.target.value);z!==void 0?P(g,z):k.target.value=""}})]},g))}),o?.currency.curCode!==0&&d.jsxs("div",{className:"grid grid-cols-[1.5fr_2fr] gap-6",children:[d.jsx(It,{options:[{label:"Да",value:!0},{label:"Нет",value:!1}],label:"Включение требования в реестр в иностранной валюте",value:o?.includeForeign?{value:!0,label:"Да"}:{value:!1,label:"Нет"},isClearable:!1,isSearchable:!1,onChange:g=>g&&b({includeForeign:g.value})}),d.jsxs("div",{children:[d.jsx("label",{className:ie,children:"Сумма требования по официальному курсу белорусского рубля к иностранной валюте"}),d.jsx("input",{type:"text",inputMode:"decimal",className:Ft,value:o?.foreignRequirementsSumBYN??"",onChange:g=>{let w=H(g.target.value);w!==void 0?P("foreignRequirementsSumBYN",w):g.target.value=""}})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:ct(v("supportingDocuments",s)),children:"Подтверждающие док
13ументы"}),d.jsx("textarea",{rows:2,className:it(v("supportingDocuments",s)),value:o?.supportingDocuments??"",onChange:g=>{s!=null&&v("supportingDocuments",s)&&M(di({arrayKey:"grounds",index:s,field:"supportingDocuments"})),b({supportingDocuments:g.target.value})}}),d.jsx(Q,{message:v("supportingDocuments",s)})]}),d.jsx(It,{options:Object.entries(Yn).map(([g,w])=>({value:Number(g),label:w.label})),label:"Решение",value:o?.decisionType?{value:o.decisionType,label:Yn[o.decisionType]?.label}:null,isClearable:!1,isSearchable:!1,placeholder:"Выберите решение...",onChange:g=>b({decisionType:g?.value})}),d.jsx("div",{className:"bg-[#fff9f0] border border-[#ffe0b2] border-l-4 border-l-[#f2994a] rounded-r-lg p-5",children:d.jsxs("div",{className:"flex gap-4",children:[d.jsx("div",{className:"text-[#f2994a] mt-1 shrink-0",children:d.jsx(pi,{fontSize:"medium"})}),d.jsxs("div",{className:"flex-1",children:[d.jsx("h4",{className:"text-sm font-bold text-[#d97706] mb-1 uppercase",children:"Разнесение по очередям"}),d.jsxs("p",{className:"text-xs text-[#334e68] mb-4",children:["Разнесение производится ",d.jsx("strong",{children:"в валюте требования"}),"."]}),d.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-7 gap-3",children:ci.map((g,w)=>d.jsxs("div",{children:[d.jsx("label",{className:"block text-[10px] font-bold text-[#627d98] mb-1 truncate uppercase",title:Fe(w),children:Fe(w)}),d.jsx("input",{type:"text",step:"0.01",inputMode:"decimal",className:`${Ft} border-[#ffe0b2] focus:border-[#f2994a] focus:ring-[#f2994a]/20`,value:o?.phases.find(k=>k.phase===g)?.amount,onChange:k=>{let z=H(k.target.value);z!==void 0?V(g,z):k.target.value=""}})]},g))})]})]})}),d.jsxs("div",{className:"flex gap-3 justify-end mt-2",children:[d.jsx(ce,{type:"button",className:"cr-button",value:"Отмена",onClick:x}),d.jsx(ce,{type:"button",className:"cr-button",value:"Подтвердить",onClick:C})]})]})}),d.jsx("div",{className:"h-px w-full bg-[#e0e9f1] my-8"})]})};function Sd(t){return{id:t.id,debtorId:t.debtor.id,creditorType:t.creditorType,receiptReclaimsDate:t.receiptClaimsDate,requirementNumber:t.requirementNumber,creditorName:t.creditorName,creditorCredentials:t.creditorCredentials,creditorAddress:t.creditorAddress,creditorPhoneNumbers:t.creditorTel,email:t.email,decisionDate:t.decisionDate,comment:t.comment,commentOnChange:t.commentOnChange,bankAccounts:t.bankAccounts.map(e=>({...e})),grounds:t.grounds.map(e=>({id:e.id,currencyId:e.currency?.id,currencyExchangeRate:e.currencyExchangeRate,mainDebt:e.mainDebt,fine:e.fine,percent:e.percent,other:e.other,supportingDocuments:e.supportingDocuments,includeForeign:e.includeForeign,decisionType:e.decisionType,queues:{firstPhase:e.phases.find(n=>n.phase===1)?.amount??0,secondPhase:e.phases.find(n=>n.phase===2)?.amount??0,thirdPhase:e.phases.find(n=>n.phase===3)?.amount??0,fourthPhase:{first:e.phases.find(n=>n.phase===41)?.amount??0,second:e.phases.find(n=>n.phase===42)?.amount??0,third:e.phases.find(n=>n.phase===43)?.amount??0,fourth:e.phases.find(n=>n.phase===44)?.amount??0}}}))}}const Be={anchorOrigin:{vertical:"top",horizontal:"right"}};function Jd(){const t=to(),{id:e}=eo(),n=e==="create",s=tt(po),i=tt(go),o=tt(Mt),{enqueueSnackbar:r}=hi(),a=m=>ln(o,m);T.useEffect(()=>{l()},[]),T.useEffect(()=>{const[m]=Object.keys(o??{});m&&document.getElementById(`field-container-${m}`)?.scrollIntoView({behavior:"smooth",block:"center"})},[o]);const l=()=>{M(yo()),M(Kn({})),M(Qt(!0));const m=[M(xo())];n||m.push(M(vo({id:e}))),Promise.all(m).finally(()=>M(Qt(!1)))},u=()=>{const{ok:m,errors:x}=ko(i,!n);return M(Kn(x)),m||r("Заполните обязательные поля",{variant:"warning",...Be}),m},c=async()=>{if(!u())return;M(Qt(!0));const m=Sd(i),x=b=>{r("Сохранено успешно",{variant:"success",...Be}),t(b)},C=()=>{M(Qt(!1)),r("Ошибка сохранения",{variant:"error",...Be})};try{if(n){const b=await M(To({requirement:m})).unwrap();x("/hub/creditor-requirements/")}else await M(Co({id:e,requirement:m})).unwrap(),x("/hub/creditor-requirements")}catch{C()}},h=m=>M(wo(m)),f=(m,x)=>M(Po({index:m,value:x})),p=()=>M(So({isResident:!1,requirementId:0,id:0,paymentAccount:"",bankName:"",bankBic:"",ownerId:0})),y=m=>M(Ao(m)),v=(m,x)=>M(jo({index:m,updatedItem:x}));return s?d.jsx(bo,{}):d.jsxs(no,{type:"section",className:"h-full grid grid-cols-1 xl:grid-cols-[20%_80%]",children:[d.jsx(so,{type:"div",toggle:null,className:"hidden xl:block h-full bg-white border-r border-[#e0e9f1] !z-20",children:d.jsx(ce,{className:"page-filters-button",type:"button",value:"Назад",onClick:()=>t(-1)})}),d.jsx("div",{className:"min-h-screen flex justify-center py-5 px-10 text-[#334e68] overflow-y-auto",children:d.jsxs("div",{className:"w-full bg-white rounded-xl shadow-[0_4px_20px_rgba(0,0,0,0.04)] border border-[#e0e9f1] p-10",children:[d.jsx("div",{className:"flex justify-between items-center border-b-2 border-[#f7fafd] mb-8",children:d.jsx("h2",{className:"text-[22px] font-bold uppercase text-[color:var(--page-content-title)] tracking-wide m-0",children:"ЗаявÐ
13»ÐµÐ½Ð½Ñ‹Ðµ требования"})}),d.jsxs("form",{onSubmit:m=>m.preventDefault(),className:"flex flex-col gap-2",children:[d.jsx(Bo,{receiptClaimsDate:i?.receiptClaimsDate,requirementNumber:i?.requirementNumber,debtor:i?.debtor,onChange:h}),d.jsx("div",{className:Hn.dividerClasses}),d.jsx(Oo,{defaultExpand:!0,creditorType:i?.creditorType,creditorName:i?.creditorName,creditorCredentials:i?.creditorCredentials,creditorAddress:i?.creditorAddress,creditorTel:i?.creditorTel,email:i?.email,onChange:h}),d.jsx(Uo,{bankAccounts:i?.bankAccounts??[],onChange:f,onAdd:p,onRemove:y}),d.jsx(Pd,{grounds:i?.grounds,onChange:v}),d.jsxs("div",{children:[d.jsxs("h3",{className:Hn.sectionTitleClasses,children:[d.jsx(zn,{fontSize:"small",className:"text-[#2aa3d0]"})," Комментарий"]}),d.jsx("textarea",{className:At.normal,rows:5,value:i.comment,onChange:m=>h({comment:m.target.value}),placeholder:"Дополнительная информация..."})]}),!n&&d.jsxs("div",{id:"field-container-commentOnChange",children:[d.jsxs("h3",{className:`flex items-center gap-2 text-[1rem] font-semibold !my-[15px] ${a("commentOnChange")?"text-[#e12d39]":"text-[color:var(--page-content-title)]"}`,children:[d.jsx(zn,{fontSize:"small",className:a("commentOnChange")?"text-[#e12d39]":"text-[#2aa3d0]"})," Причина изменений"]}),d.jsx("textarea",{className:a("commentOnChange")?At.error:At.normal,rows:5,value:i.commentOnChange,onChange:m=>{h({commentOnChange:m.target.value}),a("commentOnChange")&&M(yt("commentOnChange"))},placeholder:"Причина изменений..."}),d.jsx(Q,{message:a("commentOnChange")})]}),d.jsx("div",{className:"mt-8 flex justify-end",children:d.jsx(ce,{type:"button",className:"cr-button cr-button--form",value:"Сохранить",onClick:c})})]})]})})]})}export{Jd as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.