ui-czn 1.0.55 → 1.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui-czn.es.js +1 -1
- package/dist/ui-czn.umd.js +1 -1
- package/package.json +1 -1
package/dist/ui-czn.es.js
CHANGED
|
@@ -11645,7 +11645,7 @@ const nm = {
|
|
|
11645
11645
|
)
|
|
11646
11646
|
] })
|
|
11647
11647
|
] }),
|
|
11648
|
-
o && /* @__PURE__ */ v.jsx("div", {
|
|
11648
|
+
o && /* @__PURE__ */ v.jsx("div", { children: o({
|
|
11649
11649
|
control: c,
|
|
11650
11650
|
errors: h,
|
|
11651
11651
|
watch: p,
|
package/dist/ui-czn.umd.js
CHANGED
|
@@ -106,7 +106,7 @@ object-assign
|
|
|
106
106
|
(c) Sindre Sorhus
|
|
107
107
|
@license MIT
|
|
108
108
|
*/var _o,vA;function Rg(){if(vA)return _o;vA=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var A=Object.getOwnPropertyNames(i).map(function(c){return i[c]});if(A.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return _o=o()?Object.assign:function(s,i){for(var a,A=n(s),u,c=1;c<arguments.length;c++){a=Object(arguments[c]);for(var l in a)t.call(a,l)&&(A[l]=a[l]);if(e){u=e(a);for(var d=0;d<u.length;d++)r.call(a,u[d])&&(A[u[d]]=a[u[d]])}}return A},_o}var $o,gA;function es(){if(gA)return $o;gA=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return $o=e,$o}var ts,mA;function bA(){return mA||(mA=1,ts=Function.call.bind(Object.prototype.hasOwnProperty)),ts}var rs,wA;function Lg(){if(wA)return rs;wA=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=es(),r={},n=bA();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,A,u){if(process.env.NODE_ENV!=="production"){for(var c in s)if(n(s,c)){var l;try{if(typeof s[c]!="function"){var d=Error((A||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}l=s[c](i,c,A,a,null,t)}catch(C){l=C}if(l&&!(l instanceof Error)&&e((A||"React class")+": type specification of "+a+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof l+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),l instanceof Error&&!(l.message in r)){r[l.message]=!0;var h=u?u():"";e("Failed "+a+" type: "+l.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},rs=o,rs}var ns,yA;function Xg(){if(yA)return ns;yA=1;var e=hA(),t=Rg(),r=es(),n=bA(),o=Lg(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var A="Warning: "+a;typeof console<"u"&&console.error(A);try{throw new Error(A)}catch{}});function i(){return null}return ns=function(a,A){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function l(I){var F=I&&(u&&I[u]||I[c]);if(typeof F=="function")return F}var d="<<anonymous>>",h={array:P("array"),bigint:P("bigint"),bool:P("boolean"),func:P("function"),number:P("number"),object:P("object"),string:P("string"),symbol:P("symbol"),any:g(),arrayOf:x,element:E(),elementType:y(),instanceOf:R,node:se(),objectOf:B,oneOf:N,oneOfType:re,shape:V,exact:j};function C(I,F){return I===F?I!==0||1/I===1/F:I!==I&&F!==F}function p(I,F){this.message=I,this.data=F&&typeof F=="object"?F:{},this.stack=""}p.prototype=Error.prototype;function m(I){if(process.env.NODE_ENV!=="production")var F={},fe=0;function ee(de,_,M,Y,te,G,pe){if(Y=Y||d,G=G||M,pe!==r){if(A){var T=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw T.name="Invariant Violation",T}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ie=Y+":"+M;!F[Ie]&&fe<3&&(s("You are manually calling a React.PropTypes validation function for the `"+G+"` prop on `"+Y+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),F[Ie]=!0,fe++)}}return _[M]==null?de?_[M]===null?new p("The "+te+" `"+G+"` is marked as required "+("in `"+Y+"`, but its value is `null`.")):new p("The "+te+" `"+G+"` is marked as required in "+("`"+Y+"`, but its value is `undefined`.")):null:I(_,M,Y,te,G)}var W=ee.bind(null,!1);return W.isRequired=ee.bind(null,!0),W}function P(I){function F(fe,ee,W,de,_,M){var Y=fe[ee],te=Q(Y);if(te!==I){var G=q(Y);return new p("Invalid "+de+" `"+_+"` of type "+("`"+G+"` supplied to `"+W+"`, expected ")+("`"+I+"`."),{expectedType:I})}return null}return m(F)}function g(){return m(i)}function x(I){function F(fe,ee,W,de,_){if(typeof I!="function")return new p("Property `"+_+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var M=fe[ee];if(!Array.isArray(M)){var Y=Q(M);return new p("Invalid "+de+" `"+_+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected an array."))}for(var te=0;te<M.length;te++){var G=I(M,te,W,de,_+"["+te+"]",r);if(G instanceof Error)return G}return null}return m(F)}function E(){function I(F,fe,ee,W,de){var _=F[fe];if(!a(_)){var M=Q(_);return new p("Invalid "+W+" `"+de+"` of type "+("`"+M+"` supplied to `"+ee+"`, expected a single ReactElement."))}return null}return m(I)}function y(){function I(F,fe,ee,W,de){var _=F[fe];if(!e.isValidElementType(_)){var M=Q(_);return new p("Invalid "+W+" `"+de+"` of type "+("`"+M+"` supplied to `"+ee+"`, expected a single ReactElement type."))}return null}return m(I)}function R(I){function F(fe,ee,W,de,_){if(!(fe[ee]instanceof I)){var M=I.name||d,Y=he(fe[ee]);return new p("Invalid "+de+" `"+_+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected ")+("instance of `"+M+"`."))}return null}return m(F)}function N(I){if(!Array.isArray(I))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function F(fe,ee,W,de,_){for(var M=fe[ee],Y=0;Y<I.length;Y++)if(C(M,I[Y]))return null;var te=JSON.stringify(I,function(pe,T){var Ie=q(T);return Ie==="symbol"?String(T):T});return new p("Invalid "+de+" `"+_+"` of value `"+String(M)+"` "+("supplied to `"+W+"`, expected one of "+te+"."))}return m(F)}function B(I){function F(fe,ee,W,de,_){if(typeof I!="function")return new p("Property `"+_+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var M=fe[ee],Y=Q(M);if(Y!=="object")return new p("Invalid "+de+" `"+_+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected an object."));for(var te in M)if(n(M,te)){var G=I(M,te,W,de,_+"."+te,r);if(G instanceof Error)return G}return null}return m(F)}function re(I){if(!Array.isArray(I))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var F=0;F<I.length;F++){var fe=I[F];if(typeof fe!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+S(fe)+" at index "+F+"."),i}function ee(W,de,_,M,Y){for(var te=[],G=0;G<I.length;G++){var pe=I[G],T=pe(W,de,_,M,Y,r);if(T==null)return null;T.data&&n(T.data,"expectedType")&&te.push(T.data.expectedType)}var Ie=te.length>0?", expected one of type ["+te.join(", ")+"]":"";return new p("Invalid "+M+" `"+Y+"` supplied to "+("`"+_+"`"+Ie+"."))}return m(ee)}function se(){function I(F,fe,ee,W,de){return O(F[fe])?null:new p("Invalid "+W+" `"+de+"` supplied to "+("`"+ee+"`, expected a ReactNode."))}return m(I)}function ce(I,F,fe,ee,W){return new p((I||"React class")+": "+F+" type `"+fe+"."+ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function V(I){function F(fe,ee,W,de,_){var M=fe[ee],Y=Q(M);if(Y!=="object")return new p("Invalid "+de+" `"+_+"` of type `"+Y+"` "+("supplied to `"+W+"`, expected `object`."));for(var te in I){var G=I[te];if(typeof G!="function")return ce(W,de,_,te,q(G));var pe=G(M,te,W,de,_+"."+te,r);if(pe)return pe}return null}return m(F)}function j(I){function F(fe,ee,W,de,_){var M=fe[ee],Y=Q(M);if(Y!=="object")return new p("Invalid "+de+" `"+_+"` of type `"+Y+"` "+("supplied to `"+W+"`, expected `object`."));var te=t({},fe[ee],I);for(var G in te){var pe=I[G];if(n(I,G)&&typeof pe!="function")return ce(W,de,_,G,q(pe));if(!pe)return new p("Invalid "+de+" `"+_+"` key `"+G+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(fe[ee],null," ")+`
|
|
109
|
-
Valid keys: `+JSON.stringify(Object.keys(I),null," "));var T=pe(M,G,W,de,_+"."+G,r);if(T)return T}return null}return m(F)}function O(I){switch(typeof I){case"number":case"string":case"undefined":return!0;case"boolean":return!I;case"object":if(Array.isArray(I))return I.every(O);if(I===null||a(I))return!0;var F=l(I);if(F){var fe=F.call(I),ee;if(F!==I.entries){for(;!(ee=fe.next()).done;)if(!O(ee.value))return!1}else for(;!(ee=fe.next()).done;){var W=ee.value;if(W&&!O(W[1]))return!1}}else return!1;return!0;default:return!1}}function K(I,F){return I==="symbol"?!0:F?F["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&F instanceof Symbol:!1}function Q(I){var F=typeof I;return Array.isArray(I)?"array":I instanceof RegExp?"object":K(F,I)?"symbol":F}function q(I){if(typeof I>"u"||I===null)return""+I;var F=Q(I);if(F==="object"){if(I instanceof Date)return"date";if(I instanceof RegExp)return"regexp"}return F}function S(I){var F=q(I);switch(F){case"array":case"object":return"an "+F;case"boolean":case"date":case"regexp":return"a "+F;default:return F}}function he(I){return!I.constructor||!I.constructor.name?d:I.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},ns}var os,xA;function Qg(){if(xA)return os;xA=1;var e=es();function t(){}function r(){}return r.resetWarningCache=t,os=function(){function n(i,a,A,u,c,l){if(l!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}n.isRequired=n;function o(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return s.PropTypes=s,s},os}var CA;function Fg(){if(CA)return Xn.exports;if(CA=1,process.env.NODE_ENV!=="production"){var e=hA(),t=!0;Xn.exports=Xg()(e.isElement,t)}else Xn.exports=Qg()();return Xn.exports}var jg=Fg();const ie=Zs(jg),PA={mask:ie.oneOfType([ie.array,ie.func,ie.string,ie.instanceOf(RegExp),ie.oneOf([Date,Number,ve.Masked]),ie.instanceOf(ve.Masked)]),value:ie.any,unmask:ie.oneOfType([ie.bool,ie.oneOf(["typed"])]),prepare:ie.func,prepareChar:ie.func,validate:ie.func,commit:ie.func,overwrite:ie.oneOfType([ie.bool,ie.oneOf(["shift"])]),eager:ie.oneOfType([ie.bool,ie.oneOf(["append","remove"])]),skipInvalid:ie.bool,onAccept:ie.func,onComplete:ie.func,placeholderChar:ie.string,displayChar:ie.string,lazy:ie.bool,definitions:ie.object,blocks:ie.object,enum:ie.arrayOf(ie.string),maxLength:ie.number,from:ie.number,to:ie.number,pattern:ie.string,format:ie.func,parse:ie.func,autofix:ie.oneOfType([ie.bool,ie.oneOf(["pad"])]),radix:ie.string,thousandsSeparator:ie.string,mapToRadix:ie.arrayOf(ie.string),scale:ie.number,normalizeZeros:ie.bool,padFractionalZeros:ie.bool,min:ie.oneOfType([ie.number,ie.instanceOf(Date)]),max:ie.oneOfType([ie.number,ie.instanceOf(Date)]),dispatch:ie.func,inputRef:ie.oneOfType([ie.func,ie.shape({current:ie.object})])},EA=Object.keys(PA).filter(e=>e!=="value"),Hg=["value","unmask","onAccept","onComplete","inputRef"],Vg=EA.filter(e=>Hg.indexOf(e)<0);function Yg(e){var t;const r=(t=class extends Z.Component{constructor(s){super(s),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const s=this.props,i=this._extractMaskOptionsFromProps(s);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in s&&s.value!==void 0&&(this.maskValue=s.value)):this.initMask(i);else if(this.destroyMask(),"value"in s&&s.value!==void 0){var a;(a=this.element)!=null&&a.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=s.value:this.element.value=s.value}}componentWillUnmount(){this.destroyMask()}_inputRef(s){this.element=s,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=s:this.props.inputRef(s))}initMask(s){s===void 0&&(s=this._extractMaskOptionsFromProps(this.props)),this.maskRef=ve(this.element,s).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(s){const{...i}=s;return Object.keys(i).filter(a=>Vg.indexOf(a)<0).forEach(a=>{delete i[a]}),i}_extractNonMaskProps(s){const{...i}=s;return EA.forEach(a=>{a!=="maxLength"&&delete i[a]}),"defaultValue"in i||(i.defaultValue=s.mask?"":i.value),delete i.value,i}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(s){this.maskRef&&(s=s==null&&this.props.unmask!=="typed"?"":s,this.props.unmask==="typed"?this.maskRef.typedValue=s:this.props.unmask?this.maskRef.unmaskedValue=s:this.maskRef.value=s)}_onAccept(s){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,s)}_onComplete(s){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,s)}render(){return Z.createElement(e,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},t.displayName=void 0,t.propTypes=void 0,t),n=e.displayName||e.name||"Component";return r.displayName="IMask("+n+")",r.propTypes=PA,Z.forwardRef((o,s)=>Z.createElement(r,{...o,ref:s}))}const Ug=Yg(e=>{let{inputRef:t,...r}=e;return Z.createElement("input",{...r,ref:t})}),Gg=(e,t)=>Z.createElement(Ug,{...e,ref:t}),Zg=Z.forwardRef(Gg),Hr=f.forwardRef(({className:e,type:t,isInvalid:r,...n},o)=>{const s=r?"invalid:border-destructive invalid:focus:border-destructive invalid:focus:outline-destructive/30 invalid:hover:border-destructive invalid:hover:outline-destructive/30":"";if(t==="phone"){const{mask:i="+{7} (000) 000-00-00",...a}=n;return v.jsx(Zg,{...a,mask:i,inputRef:o,className:le("input-base",s,e)})}return v.jsx("input",{...n,ref:o,type:t,className:le("input-base",s,e)})});Hr.displayName="Input";const qg={fullname:Or().min(1,"Введите ФИО"),phone:Or().min(1,"Введите телефон").refine(e=>e.replace(/\D/g,"").length===11,"Введите корректный номер"),email:Or().email("Введите корректный email"),assent:wn().refine(e=>e===!0,"Необходимо согласие"),assent_email:wn().optional()},kA=({title:e,description:t,defaultValues:r={},img:n,className:o,extraFields:s,onSubmit:i,extraSchema:a})=>{const A=f.useMemo(()=>{const P=rv(a);let g=ko(qg).merge(P);return a&&(g=g.superRefine((x,E)=>{Object.entries(a).forEach(([y,R])=>{if(!R.requiredIf)return;const{field:N,equals:B}=R.requiredIf,re=x[N]===B,se=x[y];re&&(se==null||typeof se=="string"&&se.trim()===""||Array.isArray(se)&&se.length===0)&&E.addIssue({path:[y],code:ev.custom,message:R.errorMessage||"Обязательное поле"})})})),g},[a]),u=ag({resolver:lg(A),defaultValues:{fullname:"",phone:"",email:"",assent:!1,assent_email:!1,...r},mode:"onBlur",reValidateMode:"onChange"}),{control:c,handleSubmit:l,setValue:d,watch:h,reset:C,formState:{errors:p}}=u,m=P=>{i==null||i(P),C()};return v.jsxs(qt,{className:le("flex relative justify-between md:p-8 gap-5 lg:gap-3 flex-col w-full",n&&"flex-col lg:flex-row",o),children:[v.jsxs("div",{className:"lg:w-1/2 flex flex-col lg:gap-2",children:[v.jsxs(Sr,{children:[v.jsx(Mr,{className:"text-2xl lg:text-[32px] leading-none",children:e}),v.jsx(yn,{children:t})]}),n&&v.jsx("img",{src:n,alt:"",className:"absolute bottom-0 -left-0 object-cover rounded-bl-2xl w-fit hidden lg:flex "})]}),v.jsx(Wt,{className:le(n?"lg:w-1/2":"lg:w-full"),children:v.jsxs("form",{onSubmit:l(m),children:[v.jsxs(qo,{children:[v.jsx(Rr,{name:"fullname",control:c,render:({field:P,fieldState:g})=>{const x=g.invalid&&g.isTouched||p.fullname;return v.jsxs(_t,{"data-invalid":!!p.fullname,children:[v.jsx(Hr,{...P,placeholder:"Фамилия Имя Отчество",isInvalid:x,required:!0}),x&&v.jsx(Fr,{errors:[g.error]})]})}}),v.jsxs("div",{className:"flex flex-col lg:flex-row justify-between gap-4 w-full",children:[v.jsx(Rr,{name:"phone",control:c,render:({field:P,fieldState:g,formState:x})=>{const y=x.touchedFields.phone&&!!g.error;return v.jsxs(_t,{"data-invalid":y,className:"w-full lg:w-1/2",children:[v.jsx(Hr,{...P,type:"phone",placeholder:"Телефон",isInvalid:y,required:!0}),y&&v.jsx(Fr,{errors:[g.error]})]})}}),v.jsx(Rr,{name:"email",control:c,render:({field:P,fieldState:g})=>{const x=g.invalid&&g.isTouched||p.fullname;return v.jsxs(_t,{"data-invalid":!!p.email,className:"w-full lg:w-1/2",children:[v.jsx(Hr,{...P,type:"email",placeholder:"E-mail",isInvalid:x,required:!0}),x&&v.jsx(Fr,{errors:[g.error]})]})}})]})]}),s&&v.jsx("div",{className:"mt-5",children:s({control:c,errors:p,watch:h,setValue:d})}),v.jsxs(qo,{className:"mt-5",children:[v.jsx(Rr,{name:"assent",control:c,render:({field:P})=>v.jsxs(_t,{"data-invalid":!!p.assent,children:[v.jsx(kn,{checked:P.value,onCheckedChange:P.onChange,label:v.jsxs("div",{className:"!leading-[0.25rem]",children:[v.jsx("span",{className:"text-black",children:"Согласие на обработку"}),v.jsx("a",{href:"https://cznmos.ru/policyczn",target:"_blank",className:"ml-1 text-base text-primaryDark underline",children:"персональных данных"})]})}),p.assent&&v.jsx(Fr,{errors:[p.assent]})]})}),v.jsx(Rr,{name:"assent_email",control:c,render:({field:P})=>v.jsx(_t,{children:v.jsx(kn,{checked:P.value,onCheckedChange:P.onChange,label:"Я согласен(а) на получение email-рассылок"})})})]}),v.jsx(_t,{className:"mt-5",children:v.jsx(Bo,{type:"submit",className:"w-full",children:"Отправить заявку"})})]})})]})};kA.displayName="BaseForm";const Wg=ft("flex",{variants:{size:{sm:"w-[170px]",md:"w-[208px]",lg:"w-[250px]"}},defaultVariants:{size:"sm"}}),ss=f.forwardRef(({className:e,size:t,...r},n)=>v.jsx(xn,{...r,className:le(Wg({size:t}),"h-[100px] p-0 justify-center items-center",e)}));ss.displayName="CardPartner";function DA(e){const t=Jg(e),r=f.forwardRef((n,o)=>{const{children:s,...i}=n,a=f.Children.toArray(s),A=a.find(_g);if(A){const u=A.props.children,c=a.map(l=>l===A?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:l);return v.jsx(t,{...i,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,c):null})}return v.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function Jg(e){const t=f.forwardRef((r,n)=>{const{children:o,...s}=r;if(f.isValidElement(o)){const i=em(o),a=$g(s,o.props);return o.type!==f.Fragment&&(a.ref=n?Dr(n,i):i),f.cloneElement(o,a)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Kg=Symbol("radix.slottable");function _g(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Kg}function $g(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const A=s(...a);return o(...a),A}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function em(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function BA(e){const t=e+"CollectionProvider",[r,n]=Jt(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:m,children:P}=p,g=Z.useRef(null),x=Z.useRef(new Map).current;return v.jsx(o,{scope:m,itemMap:x,collectionRef:g,children:P})};i.displayName=t;const a=e+"CollectionSlot",A=DA(a),u=Z.forwardRef((p,m)=>{const{scope:P,children:g}=p,x=s(a,P),E=Te(m,x.collectionRef);return v.jsx(A,{ref:E,children:g})});u.displayName=a;const c=e+"CollectionItemSlot",l="data-radix-collection-item",d=DA(c),h=Z.forwardRef((p,m)=>{const{scope:P,children:g,...x}=p,E=Z.useRef(null),y=Te(m,E),R=s(c,P);return Z.useEffect(()=>(R.itemMap.set(E,{ref:E,...x}),()=>void R.itemMap.delete(E))),v.jsx(d,{[l]:"",ref:y,children:g})});h.displayName=c;function C(p){const m=s(e+"CollectionConsumer",p);return Z.useCallback(()=>{const g=m.collectionRef.current;if(!g)return[];const x=Array.from(g.querySelectorAll(`[${l}]`));return Array.from(m.itemMap.values()).sort((R,N)=>x.indexOf(R.ref.current)-x.indexOf(N.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},C,n]}var tm=f[" useId ".trim().toString()]||(()=>{}),rm=0;function Fn(e){const[t,r]=f.useState(tm());return Ze(()=>{r(n=>n??String(rm++))},[e]),e||(t?`radix-${t}`:"")}function Lt(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}var nm=f.createContext(void 0);function is(e){const t=f.useContext(nm);return e||t||"ltr"}var as="rovingFocusGroup.onEntryFocus",om={bubbles:!1,cancelable:!0},Vr="RovingFocusGroup",[As,zA,sm]=BA(Vr),[im,IA]=Jt(Vr,[sm]),[am,Am]=im(Vr),OA=f.forwardRef((e,t)=>v.jsx(As.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(As.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(um,{...e,ref:t})})}));OA.displayName=Vr;var um=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:A,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...l}=e,d=f.useRef(null),h=Te(t,d),C=is(s),[p,m]=Tr({prop:i,defaultProp:a??null,onChange:A,caller:Vr}),[P,g]=f.useState(!1),x=Lt(u),E=zA(r),y=f.useRef(!1),[R,N]=f.useState(0);return f.useEffect(()=>{const B=d.current;if(B)return B.addEventListener(as,x),()=>B.removeEventListener(as,x)},[x]),v.jsx(am,{scope:r,orientation:n,dir:C,loop:o,currentTabStopId:p,onItemFocus:f.useCallback(B=>m(B),[m]),onItemShiftTab:f.useCallback(()=>g(!0),[]),onFocusableItemAdd:f.useCallback(()=>N(B=>B+1),[]),onFocusableItemRemove:f.useCallback(()=>N(B=>B-1),[]),children:v.jsx(Ee.div,{tabIndex:P||R===0?-1:0,"data-orientation":n,...l,ref:h,style:{outline:"none",...e.style},onMouseDown:Pe(e.onMouseDown,()=>{y.current=!0}),onFocus:Pe(e.onFocus,B=>{const re=!y.current;if(B.target===B.currentTarget&&re&&!P){const se=new CustomEvent(as,om);if(B.currentTarget.dispatchEvent(se),!se.defaultPrevented){const ce=E().filter(Q=>Q.focusable),V=ce.find(Q=>Q.active),j=ce.find(Q=>Q.id===p),K=[V,j,...ce].filter(Boolean).map(Q=>Q.ref.current);TA(K,c)}}y.current=!1}),onBlur:Pe(e.onBlur,()=>g(!1))})})}),SA="RovingFocusGroupItem",MA=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:s,children:i,...a}=e,A=Fn(),u=s||A,c=Am(SA,r),l=c.currentTabStopId===u,d=zA(r),{onFocusableItemAdd:h,onFocusableItemRemove:C,currentTabStopId:p}=c;return f.useEffect(()=>{if(n)return h(),()=>C()},[n,h,C]),v.jsx(As.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:v.jsx(Ee.span,{tabIndex:l?0:-1,"data-orientation":c.orientation,...a,ref:t,onMouseDown:Pe(e.onMouseDown,m=>{n?c.onItemFocus(u):m.preventDefault()}),onFocus:Pe(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:Pe(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){c.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const P=fm(m,c.orientation,c.dir);if(P!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let x=d().filter(E=>E.focusable).map(E=>E.ref.current);if(P==="last")x.reverse();else if(P==="prev"||P==="next"){P==="prev"&&x.reverse();const E=x.indexOf(m.currentTarget);x=c.loop?dm(x,E+1):x.slice(E+1)}setTimeout(()=>TA(x))}}),children:typeof i=="function"?i({isCurrentTabStop:l,hasTabStop:p!=null}):i})})});MA.displayName=SA;var cm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function lm(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function fm(e,t,r){const n=lm(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return cm[n]}function TA(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function dm(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var pm=OA,hm=MA,us="Radio",[vm,NA]=Jt(us),[gm,mm]=vm(us),RA=f.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:s,disabled:i,value:a="on",onCheck:A,form:u,...c}=e,[l,d]=f.useState(null),h=Te(t,m=>d(m)),C=f.useRef(!1),p=l?u||!!l.closest("form"):!0;return v.jsxs(gm,{scope:r,checked:o,disabled:i,children:[v.jsx(Ee.button,{type:"button",role:"radio","aria-checked":o,"data-state":FA(o),"data-disabled":i?"":void 0,disabled:i,value:a,...c,ref:h,onClick:Pe(e.onClick,m=>{o||A==null||A(),p&&(C.current=m.isPropagationStopped(),C.current||m.stopPropagation())})}),p&&v.jsx(QA,{control:l,bubbles:!C.current,name:n,value:a,checked:o,required:s,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});RA.displayName=us;var LA="RadioIndicator",XA=f.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,s=mm(LA,r);return v.jsx(So,{present:n||s.checked,children:v.jsx(Ee.span,{"data-state":FA(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});XA.displayName=LA;var bm="RadioBubbleInput",QA=f.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},s)=>{const i=f.useRef(null),a=Te(i,s),A=Io(r),u=Oo(t);return f.useEffect(()=>{const c=i.current;if(!c)return;const l=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(l,"checked").set;if(A!==r&&h){const C=new Event("click",{bubbles:n});h.call(c,r),c.dispatchEvent(C)}},[A,r,n]),v.jsx(Ee.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:a,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});QA.displayName=bm;function FA(e){return e?"checked":"unchecked"}var wm=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],jn="RadioGroup",[ym]=Jt(jn,[IA,NA]),jA=IA(),HA=NA(),[xm,Cm]=ym(jn),VA=f.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:s,required:i=!1,disabled:a=!1,orientation:A,dir:u,loop:c=!0,onValueChange:l,...d}=e,h=jA(r),C=is(u),[p,m]=Tr({prop:s,defaultProp:o??null,onChange:l,caller:jn});return v.jsx(xm,{scope:r,name:n,required:i,disabled:a,value:p,onValueChange:m,children:v.jsx(pm,{asChild:!0,...h,orientation:A,dir:C,loop:c,children:v.jsx(Ee.div,{role:"radiogroup","aria-required":i,"aria-orientation":A,"data-disabled":a?"":void 0,dir:C,...d,ref:t})})})});VA.displayName=jn;var YA="RadioGroupItem",UA=f.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,s=Cm(YA,r),i=s.disabled||n,a=jA(r),A=HA(r),u=f.useRef(null),c=Te(t,u),l=s.value===o.value,d=f.useRef(!1);return f.useEffect(()=>{const h=p=>{wm.includes(p.key)&&(d.current=!0)},C=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",C),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",C)}},[]),v.jsx(hm,{asChild:!0,...a,focusable:!i,active:l,children:v.jsx(RA,{disabled:i,required:s.required,checked:l,...A,...o,name:s.name,ref:c,onCheck:()=>s.onValueChange(o.value),onKeyDown:Pe(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Pe(o.onFocus,()=>{var h;d.current&&((h=u.current)==null||h.click())})})})});UA.displayName=YA;var Pm="RadioGroupIndicator",GA=f.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=HA(r);return v.jsx(XA,{...o,...n,ref:t})});GA.displayName=Pm;var Em=VA,km=UA,Dm=GA;const Bm=ft("flex",{variants:{direction:{row:"flex-row gap-4 items-center",column:"flex-col gap-2"}},defaultVariants:{direction:"column"}}),ZA=f.forwardRef(({className:e,direction:t="column",options:r,itemClassName:n,labelClassName:o,...s},i)=>v.jsx(Em,{ref:i,className:le(Bm({direction:t})),...s,children:r?r.map(a=>{const A=f.useId();return v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(km,{id:A,value:a.value,disabled:a.disabled,className:le("aspect-square h-5 w-5 rounded-full border border-primary text-primary ring-offset-background","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",n),children:v.jsx(Dm,{className:"flex items-center justify-center",children:v.jsx("div",{className:"h-3 w-3 rounded-full bg-current"})})}),v.jsx(Zo,{htmlFor:A,className:le("cursor-pointer select-none",o),children:a.label})]},a.value)}):s.children}));ZA.displayName="RadioGroup";var Hn={},qA;function zm(){if(qA)return Hn;qA=1;function e(s){if(typeof window>"u")return;const i=document.createElement("style");return i.setAttribute("type","text/css"),i.innerHTML=s,document.head.appendChild(i),s}Object.defineProperty(Hn,"__esModule",{value:!0});var t=Z;function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var n=r(t);e(`.rfm-marquee-container {
|
|
109
|
+
Valid keys: `+JSON.stringify(Object.keys(I),null," "));var T=pe(M,G,W,de,_+"."+G,r);if(T)return T}return null}return m(F)}function O(I){switch(typeof I){case"number":case"string":case"undefined":return!0;case"boolean":return!I;case"object":if(Array.isArray(I))return I.every(O);if(I===null||a(I))return!0;var F=l(I);if(F){var fe=F.call(I),ee;if(F!==I.entries){for(;!(ee=fe.next()).done;)if(!O(ee.value))return!1}else for(;!(ee=fe.next()).done;){var W=ee.value;if(W&&!O(W[1]))return!1}}else return!1;return!0;default:return!1}}function K(I,F){return I==="symbol"?!0:F?F["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&F instanceof Symbol:!1}function Q(I){var F=typeof I;return Array.isArray(I)?"array":I instanceof RegExp?"object":K(F,I)?"symbol":F}function q(I){if(typeof I>"u"||I===null)return""+I;var F=Q(I);if(F==="object"){if(I instanceof Date)return"date";if(I instanceof RegExp)return"regexp"}return F}function S(I){var F=q(I);switch(F){case"array":case"object":return"an "+F;case"boolean":case"date":case"regexp":return"a "+F;default:return F}}function he(I){return!I.constructor||!I.constructor.name?d:I.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},ns}var os,xA;function Qg(){if(xA)return os;xA=1;var e=es();function t(){}function r(){}return r.resetWarningCache=t,os=function(){function n(i,a,A,u,c,l){if(l!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}n.isRequired=n;function o(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return s.PropTypes=s,s},os}var CA;function Fg(){if(CA)return Xn.exports;if(CA=1,process.env.NODE_ENV!=="production"){var e=hA(),t=!0;Xn.exports=Xg()(e.isElement,t)}else Xn.exports=Qg()();return Xn.exports}var jg=Fg();const ie=Zs(jg),PA={mask:ie.oneOfType([ie.array,ie.func,ie.string,ie.instanceOf(RegExp),ie.oneOf([Date,Number,ve.Masked]),ie.instanceOf(ve.Masked)]),value:ie.any,unmask:ie.oneOfType([ie.bool,ie.oneOf(["typed"])]),prepare:ie.func,prepareChar:ie.func,validate:ie.func,commit:ie.func,overwrite:ie.oneOfType([ie.bool,ie.oneOf(["shift"])]),eager:ie.oneOfType([ie.bool,ie.oneOf(["append","remove"])]),skipInvalid:ie.bool,onAccept:ie.func,onComplete:ie.func,placeholderChar:ie.string,displayChar:ie.string,lazy:ie.bool,definitions:ie.object,blocks:ie.object,enum:ie.arrayOf(ie.string),maxLength:ie.number,from:ie.number,to:ie.number,pattern:ie.string,format:ie.func,parse:ie.func,autofix:ie.oneOfType([ie.bool,ie.oneOf(["pad"])]),radix:ie.string,thousandsSeparator:ie.string,mapToRadix:ie.arrayOf(ie.string),scale:ie.number,normalizeZeros:ie.bool,padFractionalZeros:ie.bool,min:ie.oneOfType([ie.number,ie.instanceOf(Date)]),max:ie.oneOfType([ie.number,ie.instanceOf(Date)]),dispatch:ie.func,inputRef:ie.oneOfType([ie.func,ie.shape({current:ie.object})])},EA=Object.keys(PA).filter(e=>e!=="value"),Hg=["value","unmask","onAccept","onComplete","inputRef"],Vg=EA.filter(e=>Hg.indexOf(e)<0);function Yg(e){var t;const r=(t=class extends Z.Component{constructor(s){super(s),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const s=this.props,i=this._extractMaskOptionsFromProps(s);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in s&&s.value!==void 0&&(this.maskValue=s.value)):this.initMask(i);else if(this.destroyMask(),"value"in s&&s.value!==void 0){var a;(a=this.element)!=null&&a.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=s.value:this.element.value=s.value}}componentWillUnmount(){this.destroyMask()}_inputRef(s){this.element=s,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=s:this.props.inputRef(s))}initMask(s){s===void 0&&(s=this._extractMaskOptionsFromProps(this.props)),this.maskRef=ve(this.element,s).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(s){const{...i}=s;return Object.keys(i).filter(a=>Vg.indexOf(a)<0).forEach(a=>{delete i[a]}),i}_extractNonMaskProps(s){const{...i}=s;return EA.forEach(a=>{a!=="maxLength"&&delete i[a]}),"defaultValue"in i||(i.defaultValue=s.mask?"":i.value),delete i.value,i}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(s){this.maskRef&&(s=s==null&&this.props.unmask!=="typed"?"":s,this.props.unmask==="typed"?this.maskRef.typedValue=s:this.props.unmask?this.maskRef.unmaskedValue=s:this.maskRef.value=s)}_onAccept(s){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,s)}_onComplete(s){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,s)}render(){return Z.createElement(e,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},t.displayName=void 0,t.propTypes=void 0,t),n=e.displayName||e.name||"Component";return r.displayName="IMask("+n+")",r.propTypes=PA,Z.forwardRef((o,s)=>Z.createElement(r,{...o,ref:s}))}const Ug=Yg(e=>{let{inputRef:t,...r}=e;return Z.createElement("input",{...r,ref:t})}),Gg=(e,t)=>Z.createElement(Ug,{...e,ref:t}),Zg=Z.forwardRef(Gg),Hr=f.forwardRef(({className:e,type:t,isInvalid:r,...n},o)=>{const s=r?"invalid:border-destructive invalid:focus:border-destructive invalid:focus:outline-destructive/30 invalid:hover:border-destructive invalid:hover:outline-destructive/30":"";if(t==="phone"){const{mask:i="+{7} (000) 000-00-00",...a}=n;return v.jsx(Zg,{...a,mask:i,inputRef:o,className:le("input-base",s,e)})}return v.jsx("input",{...n,ref:o,type:t,className:le("input-base",s,e)})});Hr.displayName="Input";const qg={fullname:Or().min(1,"Введите ФИО"),phone:Or().min(1,"Введите телефон").refine(e=>e.replace(/\D/g,"").length===11,"Введите корректный номер"),email:Or().email("Введите корректный email"),assent:wn().refine(e=>e===!0,"Необходимо согласие"),assent_email:wn().optional()},kA=({title:e,description:t,defaultValues:r={},img:n,className:o,extraFields:s,onSubmit:i,extraSchema:a})=>{const A=f.useMemo(()=>{const P=rv(a);let g=ko(qg).merge(P);return a&&(g=g.superRefine((x,E)=>{Object.entries(a).forEach(([y,R])=>{if(!R.requiredIf)return;const{field:N,equals:B}=R.requiredIf,re=x[N]===B,se=x[y];re&&(se==null||typeof se=="string"&&se.trim()===""||Array.isArray(se)&&se.length===0)&&E.addIssue({path:[y],code:ev.custom,message:R.errorMessage||"Обязательное поле"})})})),g},[a]),u=ag({resolver:lg(A),defaultValues:{fullname:"",phone:"",email:"",assent:!1,assent_email:!1,...r},mode:"onBlur",reValidateMode:"onChange"}),{control:c,handleSubmit:l,setValue:d,watch:h,reset:C,formState:{errors:p}}=u,m=P=>{i==null||i(P),C()};return v.jsxs(qt,{className:le("flex relative justify-between md:p-8 gap-5 lg:gap-3 flex-col w-full",n&&"flex-col lg:flex-row",o),children:[v.jsxs("div",{className:"lg:w-1/2 flex flex-col lg:gap-2",children:[v.jsxs(Sr,{children:[v.jsx(Mr,{className:"text-2xl lg:text-[32px] leading-none",children:e}),v.jsx(yn,{children:t})]}),n&&v.jsx("img",{src:n,alt:"",className:"absolute bottom-0 -left-0 object-cover rounded-bl-2xl w-fit hidden lg:flex "})]}),v.jsx(Wt,{className:le(n?"lg:w-1/2":"lg:w-full"),children:v.jsxs("form",{onSubmit:l(m),children:[v.jsxs(qo,{children:[v.jsx(Rr,{name:"fullname",control:c,render:({field:P,fieldState:g})=>{const x=g.invalid&&g.isTouched||p.fullname;return v.jsxs(_t,{"data-invalid":!!p.fullname,children:[v.jsx(Hr,{...P,placeholder:"Фамилия Имя Отчество",isInvalid:x,required:!0}),x&&v.jsx(Fr,{errors:[g.error]})]})}}),v.jsxs("div",{className:"flex flex-col lg:flex-row justify-between gap-4 w-full",children:[v.jsx(Rr,{name:"phone",control:c,render:({field:P,fieldState:g,formState:x})=>{const y=x.touchedFields.phone&&!!g.error;return v.jsxs(_t,{"data-invalid":y,className:"w-full lg:w-1/2",children:[v.jsx(Hr,{...P,type:"phone",placeholder:"Телефон",isInvalid:y,required:!0}),y&&v.jsx(Fr,{errors:[g.error]})]})}}),v.jsx(Rr,{name:"email",control:c,render:({field:P,fieldState:g})=>{const x=g.invalid&&g.isTouched||p.fullname;return v.jsxs(_t,{"data-invalid":!!p.email,className:"w-full lg:w-1/2",children:[v.jsx(Hr,{...P,type:"email",placeholder:"E-mail",isInvalid:x,required:!0}),x&&v.jsx(Fr,{errors:[g.error]})]})}})]})]}),s&&v.jsx("div",{children:s({control:c,errors:p,watch:h,setValue:d})}),v.jsxs(qo,{className:"mt-5",children:[v.jsx(Rr,{name:"assent",control:c,render:({field:P})=>v.jsxs(_t,{"data-invalid":!!p.assent,children:[v.jsx(kn,{checked:P.value,onCheckedChange:P.onChange,label:v.jsxs("div",{className:"!leading-[0.25rem]",children:[v.jsx("span",{className:"text-black",children:"Согласие на обработку"}),v.jsx("a",{href:"https://cznmos.ru/policyczn",target:"_blank",className:"ml-1 text-base text-primaryDark underline",children:"персональных данных"})]})}),p.assent&&v.jsx(Fr,{errors:[p.assent]})]})}),v.jsx(Rr,{name:"assent_email",control:c,render:({field:P})=>v.jsx(_t,{children:v.jsx(kn,{checked:P.value,onCheckedChange:P.onChange,label:"Я согласен(а) на получение email-рассылок"})})})]}),v.jsx(_t,{className:"mt-5",children:v.jsx(Bo,{type:"submit",className:"w-full",children:"Отправить заявку"})})]})})]})};kA.displayName="BaseForm";const Wg=ft("flex",{variants:{size:{sm:"w-[170px]",md:"w-[208px]",lg:"w-[250px]"}},defaultVariants:{size:"sm"}}),ss=f.forwardRef(({className:e,size:t,...r},n)=>v.jsx(xn,{...r,className:le(Wg({size:t}),"h-[100px] p-0 justify-center items-center",e)}));ss.displayName="CardPartner";function DA(e){const t=Jg(e),r=f.forwardRef((n,o)=>{const{children:s,...i}=n,a=f.Children.toArray(s),A=a.find(_g);if(A){const u=A.props.children,c=a.map(l=>l===A?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:l);return v.jsx(t,{...i,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,c):null})}return v.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function Jg(e){const t=f.forwardRef((r,n)=>{const{children:o,...s}=r;if(f.isValidElement(o)){const i=em(o),a=$g(s,o.props);return o.type!==f.Fragment&&(a.ref=n?Dr(n,i):i),f.cloneElement(o,a)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Kg=Symbol("radix.slottable");function _g(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Kg}function $g(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const A=s(...a);return o(...a),A}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function em(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function BA(e){const t=e+"CollectionProvider",[r,n]=Jt(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:m,children:P}=p,g=Z.useRef(null),x=Z.useRef(new Map).current;return v.jsx(o,{scope:m,itemMap:x,collectionRef:g,children:P})};i.displayName=t;const a=e+"CollectionSlot",A=DA(a),u=Z.forwardRef((p,m)=>{const{scope:P,children:g}=p,x=s(a,P),E=Te(m,x.collectionRef);return v.jsx(A,{ref:E,children:g})});u.displayName=a;const c=e+"CollectionItemSlot",l="data-radix-collection-item",d=DA(c),h=Z.forwardRef((p,m)=>{const{scope:P,children:g,...x}=p,E=Z.useRef(null),y=Te(m,E),R=s(c,P);return Z.useEffect(()=>(R.itemMap.set(E,{ref:E,...x}),()=>void R.itemMap.delete(E))),v.jsx(d,{[l]:"",ref:y,children:g})});h.displayName=c;function C(p){const m=s(e+"CollectionConsumer",p);return Z.useCallback(()=>{const g=m.collectionRef.current;if(!g)return[];const x=Array.from(g.querySelectorAll(`[${l}]`));return Array.from(m.itemMap.values()).sort((R,N)=>x.indexOf(R.ref.current)-x.indexOf(N.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},C,n]}var tm=f[" useId ".trim().toString()]||(()=>{}),rm=0;function Fn(e){const[t,r]=f.useState(tm());return Ze(()=>{r(n=>n??String(rm++))},[e]),e||(t?`radix-${t}`:"")}function Lt(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}var nm=f.createContext(void 0);function is(e){const t=f.useContext(nm);return e||t||"ltr"}var as="rovingFocusGroup.onEntryFocus",om={bubbles:!1,cancelable:!0},Vr="RovingFocusGroup",[As,zA,sm]=BA(Vr),[im,IA]=Jt(Vr,[sm]),[am,Am]=im(Vr),OA=f.forwardRef((e,t)=>v.jsx(As.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(As.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(um,{...e,ref:t})})}));OA.displayName=Vr;var um=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:A,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...l}=e,d=f.useRef(null),h=Te(t,d),C=is(s),[p,m]=Tr({prop:i,defaultProp:a??null,onChange:A,caller:Vr}),[P,g]=f.useState(!1),x=Lt(u),E=zA(r),y=f.useRef(!1),[R,N]=f.useState(0);return f.useEffect(()=>{const B=d.current;if(B)return B.addEventListener(as,x),()=>B.removeEventListener(as,x)},[x]),v.jsx(am,{scope:r,orientation:n,dir:C,loop:o,currentTabStopId:p,onItemFocus:f.useCallback(B=>m(B),[m]),onItemShiftTab:f.useCallback(()=>g(!0),[]),onFocusableItemAdd:f.useCallback(()=>N(B=>B+1),[]),onFocusableItemRemove:f.useCallback(()=>N(B=>B-1),[]),children:v.jsx(Ee.div,{tabIndex:P||R===0?-1:0,"data-orientation":n,...l,ref:h,style:{outline:"none",...e.style},onMouseDown:Pe(e.onMouseDown,()=>{y.current=!0}),onFocus:Pe(e.onFocus,B=>{const re=!y.current;if(B.target===B.currentTarget&&re&&!P){const se=new CustomEvent(as,om);if(B.currentTarget.dispatchEvent(se),!se.defaultPrevented){const ce=E().filter(Q=>Q.focusable),V=ce.find(Q=>Q.active),j=ce.find(Q=>Q.id===p),K=[V,j,...ce].filter(Boolean).map(Q=>Q.ref.current);TA(K,c)}}y.current=!1}),onBlur:Pe(e.onBlur,()=>g(!1))})})}),SA="RovingFocusGroupItem",MA=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:s,children:i,...a}=e,A=Fn(),u=s||A,c=Am(SA,r),l=c.currentTabStopId===u,d=zA(r),{onFocusableItemAdd:h,onFocusableItemRemove:C,currentTabStopId:p}=c;return f.useEffect(()=>{if(n)return h(),()=>C()},[n,h,C]),v.jsx(As.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:v.jsx(Ee.span,{tabIndex:l?0:-1,"data-orientation":c.orientation,...a,ref:t,onMouseDown:Pe(e.onMouseDown,m=>{n?c.onItemFocus(u):m.preventDefault()}),onFocus:Pe(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:Pe(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){c.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const P=fm(m,c.orientation,c.dir);if(P!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let x=d().filter(E=>E.focusable).map(E=>E.ref.current);if(P==="last")x.reverse();else if(P==="prev"||P==="next"){P==="prev"&&x.reverse();const E=x.indexOf(m.currentTarget);x=c.loop?dm(x,E+1):x.slice(E+1)}setTimeout(()=>TA(x))}}),children:typeof i=="function"?i({isCurrentTabStop:l,hasTabStop:p!=null}):i})})});MA.displayName=SA;var cm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function lm(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function fm(e,t,r){const n=lm(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return cm[n]}function TA(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function dm(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var pm=OA,hm=MA,us="Radio",[vm,NA]=Jt(us),[gm,mm]=vm(us),RA=f.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:s,disabled:i,value:a="on",onCheck:A,form:u,...c}=e,[l,d]=f.useState(null),h=Te(t,m=>d(m)),C=f.useRef(!1),p=l?u||!!l.closest("form"):!0;return v.jsxs(gm,{scope:r,checked:o,disabled:i,children:[v.jsx(Ee.button,{type:"button",role:"radio","aria-checked":o,"data-state":FA(o),"data-disabled":i?"":void 0,disabled:i,value:a,...c,ref:h,onClick:Pe(e.onClick,m=>{o||A==null||A(),p&&(C.current=m.isPropagationStopped(),C.current||m.stopPropagation())})}),p&&v.jsx(QA,{control:l,bubbles:!C.current,name:n,value:a,checked:o,required:s,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});RA.displayName=us;var LA="RadioIndicator",XA=f.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,s=mm(LA,r);return v.jsx(So,{present:n||s.checked,children:v.jsx(Ee.span,{"data-state":FA(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});XA.displayName=LA;var bm="RadioBubbleInput",QA=f.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},s)=>{const i=f.useRef(null),a=Te(i,s),A=Io(r),u=Oo(t);return f.useEffect(()=>{const c=i.current;if(!c)return;const l=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(l,"checked").set;if(A!==r&&h){const C=new Event("click",{bubbles:n});h.call(c,r),c.dispatchEvent(C)}},[A,r,n]),v.jsx(Ee.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:a,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});QA.displayName=bm;function FA(e){return e?"checked":"unchecked"}var wm=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],jn="RadioGroup",[ym]=Jt(jn,[IA,NA]),jA=IA(),HA=NA(),[xm,Cm]=ym(jn),VA=f.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:s,required:i=!1,disabled:a=!1,orientation:A,dir:u,loop:c=!0,onValueChange:l,...d}=e,h=jA(r),C=is(u),[p,m]=Tr({prop:s,defaultProp:o??null,onChange:l,caller:jn});return v.jsx(xm,{scope:r,name:n,required:i,disabled:a,value:p,onValueChange:m,children:v.jsx(pm,{asChild:!0,...h,orientation:A,dir:C,loop:c,children:v.jsx(Ee.div,{role:"radiogroup","aria-required":i,"aria-orientation":A,"data-disabled":a?"":void 0,dir:C,...d,ref:t})})})});VA.displayName=jn;var YA="RadioGroupItem",UA=f.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,s=Cm(YA,r),i=s.disabled||n,a=jA(r),A=HA(r),u=f.useRef(null),c=Te(t,u),l=s.value===o.value,d=f.useRef(!1);return f.useEffect(()=>{const h=p=>{wm.includes(p.key)&&(d.current=!0)},C=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",C),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",C)}},[]),v.jsx(hm,{asChild:!0,...a,focusable:!i,active:l,children:v.jsx(RA,{disabled:i,required:s.required,checked:l,...A,...o,name:s.name,ref:c,onCheck:()=>s.onValueChange(o.value),onKeyDown:Pe(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Pe(o.onFocus,()=>{var h;d.current&&((h=u.current)==null||h.click())})})})});UA.displayName=YA;var Pm="RadioGroupIndicator",GA=f.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=HA(r);return v.jsx(XA,{...o,...n,ref:t})});GA.displayName=Pm;var Em=VA,km=UA,Dm=GA;const Bm=ft("flex",{variants:{direction:{row:"flex-row gap-4 items-center",column:"flex-col gap-2"}},defaultVariants:{direction:"column"}}),ZA=f.forwardRef(({className:e,direction:t="column",options:r,itemClassName:n,labelClassName:o,...s},i)=>v.jsx(Em,{ref:i,className:le(Bm({direction:t})),...s,children:r?r.map(a=>{const A=f.useId();return v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(km,{id:A,value:a.value,disabled:a.disabled,className:le("aspect-square h-5 w-5 rounded-full border border-primary text-primary ring-offset-background","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",n),children:v.jsx(Dm,{className:"flex items-center justify-center",children:v.jsx("div",{className:"h-3 w-3 rounded-full bg-current"})})}),v.jsx(Zo,{htmlFor:A,className:le("cursor-pointer select-none",o),children:a.label})]},a.value)}):s.children}));ZA.displayName="RadioGroup";var Hn={},qA;function zm(){if(qA)return Hn;qA=1;function e(s){if(typeof window>"u")return;const i=document.createElement("style");return i.setAttribute("type","text/css"),i.innerHTML=s,document.head.appendChild(i),s}Object.defineProperty(Hn,"__esModule",{value:!0});var t=Z;function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var n=r(t);e(`.rfm-marquee-container {
|
|
110
110
|
overflow-x: hidden;
|
|
111
111
|
display: flex;
|
|
112
112
|
flex-direction: row;
|