test-stpr-ui-kit 0.4.43 → 0.4.44
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/test-stpr-ui-kit.js
CHANGED
|
@@ -3563,7 +3563,7 @@ const Ti = (e) => {
|
|
|
3563
3563
|
},
|
|
3564
3564
|
[p, d, s, r, t]
|
|
3565
3565
|
);
|
|
3566
|
-
return /* @__PURE__ */ m(et, { multiple: s, onDrop: c, maxSize: n, accept: a, children: ({ getRootProps: l, getInputProps: x }) => /* @__PURE__ */ U("div", { ...l({}), children: [
|
|
3566
|
+
return /* @__PURE__ */ m(et, { multiple: s, onDrop: c, maxSize: n, accept: a, children: ({ getRootProps: l, getInputProps: x }) => /* @__PURE__ */ U("div", { ...l({}), style: { height: "100%" }, children: [
|
|
3567
3567
|
/* @__PURE__ */ m("input", { ...x({}), disabled: i, name: r }),
|
|
3568
3568
|
o
|
|
3569
3569
|
] }) });
|
|
@@ -22,4 +22,4 @@ Valid keys: `+JSON.stringify(Object.keys(u),null," "));var g=ne(O,G,I,$,D+"."+G
|
|
|
22
22
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zn(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ln(e){if(Array.isArray(e))return ut(e)}function no(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,n)}return o}function ao(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?no(Object(o),!0).forEach(function(n){io(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):no(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function io(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Fe(e,t){return In(e)||Bn(e,t)||ro(e,t)||En()}function En(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
23
23
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ro(e,t){if(e){if(typeof e=="string")return ut(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return ut(e,t)}}function ut(e,t){(t==null||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function Bn(e,t){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var n=[],a=!0,i=!1,r,p;try{for(o=o.call(e);!(a=(r=o.next()).done)&&(n.push(r.value),!(t&&n.length===t));a=!0);}catch(_){i=!0,p=_}finally{try{!a&&o.return!=null&&o.return()}finally{if(i)throw p}}return n}}function In(e){if(Array.isArray(e))return e}var jn=typeof ft=="function"?ft:ft.default,Nn="file-invalid-type",Fn="file-too-large",Dn="file-too-small",Wn="too-many-files",Hn=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",o=t.split(","),n=o.length>1?"one of ".concat(o.join(", ")):o[0];return{code:Nn,message:"File type must be ".concat(n)}},so=function(t){return{code:Fn,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},po=function(t){return{code:Dn,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Mn={code:Wn,message:"Too many files"};function lo(e,t){var o=e.type==="application/x-moz-file"||jn(e,t);return[o,o?null:Hn(t)]}function co(e,t,o){if(Ce(e.size))if(Ce(t)&&Ce(o)){if(e.size>o)return[!1,so(o)];if(e.size<t)return[!1,po(t)]}else{if(Ce(t)&&e.size<t)return[!1,po(t)];if(Ce(o)&&e.size>o)return[!1,so(o)]}return[!0,null]}function Ce(e){return e!=null}function On(e){var t=e.files,o=e.accept,n=e.minSize,a=e.maxSize,i=e.multiple,r=e.maxFiles,p=e.validator;return!i&&t.length>1||i&&r>=1&&t.length>r?!1:t.every(function(_){var l=lo(_,o),d=Fe(l,1),c=d[0],v=co(_,n,a),k=Fe(v,1),S=k[0],h=p?p(_):null;return c&&S&&!h})}function $e(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Re(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function _o(e){e.preventDefault()}function Pn(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Gn(e){return e.indexOf("Edge/")!==-1}function Un(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Pn(e)||Gn(e)}function ye(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(n){for(var a=arguments.length,i=new Array(a>1?a-1:0),r=1;r<a;r++)i[r-1]=arguments[r];return t.some(function(p){return!$e(n)&&p&&p.apply(void 0,[n].concat(i)),$e(n)})}}function $n(){return"showOpenFilePicker"in window}function Rn(e){if(Ce(e)){var t=Object.entries(e).filter(function(o){var n=Fe(o,2),a=n[0],i=n[1],r=!0;return fo(a)||(console.warn('Skipped "'.concat(a,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),r=!1),(!Array.isArray(i)||!i.every(uo))&&(console.warn('Skipped "'.concat(a,'" because an invalid file extension was provided.')),r=!1),r}).reduce(function(o,n){var a=Fe(n,2),i=a[0],r=a[1];return ao(ao({},o),{},io({},i,r))},{});return[{description:"Files",accept:t}]}return e}function qn(e){if(Ce(e))return Object.entries(e).reduce(function(t,o){var n=Fe(o,2),a=n[0],i=n[1];return[].concat(oo(t),[a],oo(i))},[]).filter(function(t){return fo(t)||uo(t)}).join(",")}function Vn(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Yn(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function fo(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function uo(e){return/^.*\.[\w]+$/.test(e)}var Kn=["children"],Xn=["open"],Zn=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Qn=["refKey","onChange","onClick"];function Jn(e){return oa(e)||ta(e)||mo(e)||ea()}function ea(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
24
24
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ta(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oa(e){if(Array.isArray(e))return xt(e)}function mt(e,t){return ia(e)||aa(e,t)||mo(e,t)||na()}function na(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
25
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mo(e,t){if(e){if(typeof e=="string")return xt(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return xt(e,t)}}function xt(e,t){(t==null||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function aa(e,t){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var n=[],a=!0,i=!1,r,p;try{for(o=o.call(e);!(a=(r=o.next()).done)&&(n.push(r.value),!(t&&n.length===t));a=!0);}catch(_){i=!0,p=_}finally{try{!a&&o.return!=null&&o.return()}finally{if(i)throw p}}return n}}function ia(e){if(Array.isArray(e))return e}function xo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,n)}return o}function ee(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?xo(Object(o),!0).forEach(function(n){gt(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):xo(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function gt(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function qe(e,t){if(e==null)return{};var o=ra(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ra(e,t){if(e==null)return{};var o={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(o[a]=e[a]);return o}var Ve=x.forwardRef(function(e,t){var o=e.children,n=qe(e,Kn),a=sa(n),i=a.open,r=qe(a,Xn);return x.useImperativeHandle(t,function(){return{open:i}},[i]),x.createElement(x.Fragment,null,o(ee(ee({},r),{},{open:i})))});Ve.displayName="Dropzone";var go={disabled:!1,getFilesFromEvent:vn,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Ve.defaultProps=go,Ve.propTypes={children:C.func,accept:C.objectOf(C.arrayOf(C.string)),multiple:C.bool,preventDropOnDocument:C.bool,noClick:C.bool,noKeyboard:C.bool,noDrag:C.bool,noDragEventsBubbling:C.bool,minSize:C.number,maxSize:C.number,maxFiles:C.number,disabled:C.bool,getFilesFromEvent:C.func,onFileDialogCancel:C.func,onFileDialogOpen:C.func,useFsAccessApi:C.bool,autoFocus:C.bool,onDragEnter:C.func,onDragLeave:C.func,onDragOver:C.func,onDrop:C.func,onDropAccepted:C.func,onDropRejected:C.func,onError:C.func,validator:C.func};var vt={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function sa(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ee(ee({},go),e),o=t.accept,n=t.disabled,a=t.getFilesFromEvent,i=t.maxSize,r=t.minSize,p=t.multiple,_=t.maxFiles,l=t.onDragEnter,d=t.onDragLeave,c=t.onDragOver,v=t.onDrop,k=t.onDropAccepted,S=t.onDropRejected,h=t.onFileDialogCancel,T=t.onFileDialogOpen,j=t.useFsAccessApi,q=t.autoFocus,N=t.preventDropOnDocument,y=t.noClick,f=t.noKeyboard,L=t.noDrag,F=t.noDragEventsBubbling,E=t.onError,Q=t.validator,te=x.useMemo(function(){return qn(o)},[o]),fe=x.useMemo(function(){return Rn(o)},[o]),ue=x.useMemo(function(){return typeof T=="function"?T:vo},[T]),de=x.useMemo(function(){return typeof h=="function"?h:vo},[h]),Z=x.useRef(null),J=x.useRef(null),A=x.useReducer(pa,vt),U=mt(A,2),X=U[0],P=U[1],u=X.isFocused,w=X.isFileDialogActive,W=x.useRef(typeof window<"u"&&window.isSecureContext&&j&&$n()),M=function(){!W.current&&w&&setTimeout(function(){if(J.current){var B=J.current.files;B.length||(P({type:"closeDialog"}),de())}},300)};x.useEffect(function(){return window.addEventListener("focus",M,!1),function(){window.removeEventListener("focus",M,!1)}},[J,w,de,W]);var I=x.useRef([]),$=function(B){Z.current&&Z.current.contains(B.target)||(B.preventDefault(),I.current=[])};x.useEffect(function(){return N&&(document.addEventListener("dragover",_o,!1),document.addEventListener("drop",$,!1)),function(){N&&(document.removeEventListener("dragover",_o),document.removeEventListener("drop",$))}},[Z,N]),x.useEffect(function(){return!n&&q&&Z.current&&Z.current.focus(),function(){}},[Z,q,n]);var D=x.useCallback(function(b){E?E(b):console.error(b)},[E]),O=x.useCallback(function(b){b.preventDefault(),b.persist(),Ze(b),I.current=[].concat(Jn(I.current),[b.target]),Re(b)&&Promise.resolve(a(b)).then(function(B){if(!($e(b)&&!F)){var oe=B.length,ae=oe>0&&On({files:B,accept:te,minSize:r,maxSize:i,multiple:p,maxFiles:_,validator:Q}),xe=oe>0&&!ae;P({isDragAccept:ae,isDragReject:xe,isDragActive:!0,type:"setDraggedFiles"}),l&&l(b)}}).catch(function(B){return D(B)})},[a,l,D,F,te,r,i,p,_,Q]),R=x.useCallback(function(b){b.preventDefault(),b.persist(),Ze(b);var B=Re(b);if(B&&b.dataTransfer)try{b.dataTransfer.dropEffect="copy"}catch{}return B&&c&&c(b),!1},[c,F]),V=x.useCallback(function(b){b.preventDefault(),b.persist(),Ze(b);var B=I.current.filter(function(ae){return Z.current&&Z.current.contains(ae)}),oe=B.indexOf(b.target);oe!==-1&&B.splice(oe,1),I.current=B,!(B.length>0)&&(P({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Re(b)&&d&&d(b))},[Z,d,F]),G=x.useCallback(function(b,B){var oe=[],ae=[];b.forEach(function(xe){var He=lo(xe,te),Ie=mt(He,2),kt=Ie[0],St=Ie[1],At=co(xe,r,i),Qe=mt(At,2),Ct=Qe[0],Tt=Qe[1],zt=Q?Q(xe):null;if(kt&&Ct&&!zt)oe.push(xe);else{var Lt=[St,Tt];zt&&(Lt=Lt.concat(zt)),ae.push({file:xe,errors:Lt.filter(function(oi){return oi})})}}),(!p&&oe.length>1||p&&_>=1&&oe.length>_)&&(oe.forEach(function(xe){ae.push({file:xe,errors:[Mn]})}),oe.splice(0)),P({acceptedFiles:oe,fileRejections:ae,isDragReject:ae.length>0,type:"setFiles"}),v&&v(oe,ae,B),ae.length>0&&S&&S(ae,B),oe.length>0&&k&&k(oe,B)},[P,p,te,r,i,_,v,k,S,Q]),ne=x.useCallback(function(b){b.preventDefault(),b.persist(),Ze(b),I.current=[],Re(b)&&Promise.resolve(a(b)).then(function(B){$e(b)&&!F||G(B,b)}).catch(function(B){return D(B)}),P({type:"reset"})},[a,G,D,F]),g=x.useCallback(function(){if(W.current){P({type:"openDialog"}),ue();var b={multiple:p,types:fe};window.showOpenFilePicker(b).then(function(B){return a(B)}).then(function(B){G(B,null),P({type:"closeDialog"})}).catch(function(B){Vn(B)?(de(B),P({type:"closeDialog"})):Yn(B)?(W.current=!1,J.current?(J.current.value=null,J.current.click()):D(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):D(B)});return}J.current&&(P({type:"openDialog"}),ue(),J.current.value=null,J.current.click())},[P,ue,de,j,G,D,fe,p]),me=x.useCallback(function(b){!Z.current||!Z.current.isEqualNode(b.target)||(b.key===" "||b.key==="Enter"||b.keyCode===32||b.keyCode===13)&&(b.preventDefault(),g())},[Z,g]),Le=x.useCallback(function(){P({type:"focus"})},[]),We=x.useCallback(function(){P({type:"blur"})},[]),Fo=x.useCallback(function(){y||(Un()?setTimeout(g,0):g())},[y,g]),Be=function(B){return n?null:B},yt=function(B){return f?null:Be(B)},Xe=function(B){return L?null:Be(B)},Ze=function(B){F&&B.stopPropagation()},Ja=x.useMemo(function(){return function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},B=b.refKey,oe=B===void 0?"ref":B,ae=b.role,xe=b.onKeyDown,He=b.onFocus,Ie=b.onBlur,kt=b.onClick,St=b.onDragEnter,At=b.onDragOver,Qe=b.onDragLeave,Ct=b.onDrop,Tt=qe(b,Zn);return ee(ee(gt({onKeyDown:yt(ye(xe,me)),onFocus:yt(ye(He,Le)),onBlur:yt(ye(Ie,We)),onClick:Be(ye(kt,Fo)),onDragEnter:Xe(ye(St,O)),onDragOver:Xe(ye(At,R)),onDragLeave:Xe(ye(Qe,V)),onDrop:Xe(ye(Ct,ne)),role:typeof ae=="string"&&ae!==""?ae:"presentation"},oe,Z),!n&&!f?{tabIndex:0}:{}),Tt)}},[Z,me,Le,We,Fo,O,R,V,ne,f,L,n]),ei=x.useCallback(function(b){b.stopPropagation()},[]),ti=x.useMemo(function(){return function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},B=b.refKey,oe=B===void 0?"ref":B,ae=b.onChange,xe=b.onClick,He=qe(b,Qn),Ie=gt({accept:te,multiple:p,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Be(ye(ae,ne)),onClick:Be(ye(xe,ei)),tabIndex:-1},oe,J);return ee(ee({},Ie),He)}},[J,o,p,ne,n]);return ee(ee({},X),{},{isFocused:u&&!n,getRootProps:Ja,getInputProps:ti,rootRef:Z,inputRef:J,open:Be(g)})}function pa(e,t){switch(t.type){case"focus":return ee(ee({},e),{},{isFocused:!0});case"blur":return ee(ee({},e),{},{isFocused:!1});case"openDialog":return ee(ee({},vt),{},{isFileDialogActive:!0});case"closeDialog":return ee(ee({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ee(ee({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ee(ee({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return ee({},vt);default:return e}}function vo(){}const ho=e=>{const{onDropFiles:t,children:o,maxSize:n,accept:a,disabled:i,name:r,multiple:p,maxFiles:_,files:l=[]}=e,d=x.useCallback(c=>{if(!p){t(c,r);return}const v=[...l,...c];if(_&&v.length>_){console.log(`Максимальное возможное количество файлов для загрузки - ${_}`),t(v.slice(0,_),r);return}t(v,r)},[l,_,p,r,t]);return s.jsx(Ve,{multiple:p,onDrop:d,maxSize:n,accept:a,children:({getRootProps:c,getInputProps:v})=>s.jsxs("div",{...c({}),children:[s.jsx("input",{...v({}),disabled:i,name:r}),o]})})},Se={spDropdown:"_spDropdown_1f4lf_43",spDropdown__labelText:"_spDropdown__labelText_1f4lf_54",spDropdown__tooltipContainer:"_spDropdown__tooltipContainer_1f4lf_62",spDropdown__dropdownList:"_spDropdown__dropdownList_1f4lf_67",spDropdown__dropdownListHeader:"_spDropdown__dropdownListHeader_1f4lf_73",spDropdown__dopdownListItem:"_spDropdown__dopdownListItem_1f4lf_80",spDropdown__dopdownListItem_textCenter:"_spDropdown__dopdownListItem_textCenter_1f4lf_91",spDropdown__downloadListItemDescription:"_spDropdown__downloadListItemDescription_1f4lf_94"},la=e=>{const{labelText:t="Выпадающий список",listName:o,dropdownList:n=[],dropdownPosition:a=re.BottomRight,classNameRoot:i}=e,r=m({[Se.spDropdown]:!0,...i&&{[i]:!0}}),p=m({[Se.spDropdown__labelText]:!0}),_=m({[Se.spDropdown__tooltipContainer]:!0}),l=m({[Se.spDropdown__dropdownList]:!0}),d=m({[Se.spDropdown__dropdownListHeader]:!0}),c=m({[Se.spDropdown__downloadListItemDescription]:!0}),[v,k]=x.useState(!1),S=()=>s.jsxs("div",{className:l,children:[o&&s.jsx("div",{className:d,children:o}),n.map((h,T)=>s.jsxs("div",{className:m({[Se.spDropdown__dopdownListItem]:!0,[Se.spDropdown__dopdownListItem_textCenter]:h.textCenter}),onClick:h.onClick,children:[h.name,h.description&&s.jsx("span",{className:c,children:h.description})]},T))]});return s.jsx(Oe,{hover:!1,triggerAction:()=>k(!0),actionOnClose:()=>k(!1),text:S(),position:a,noPadding:!0,isToggleClick:!0,isStopPropagationClickOnTrigger:!0,trigger:s.jsxs("div",{className:r,children:[s.jsx("div",{className:p,children:t}),s.jsx("div",{className:_,children:s.jsx(ce,{name:ie.SelectChevronDown,rotate:v?180:void 0})})]})})},bo={ellipsisTextWithTooltip:"_ellipsisTextWithTooltip_1nhiw_43",ellipsisTextWithTooltip__tooltip:"_ellipsisTextWithTooltip__tooltip_1nhiw_46"},wo=e=>{const{text:t,classNameRoot:o,classNameTooltipRoot:n,classNameTriggerTooltipRoot:a,classNameBaseTooltipContentRoot:i,classNameBaseTooltipRoot:r,...p}=e,_=x.useRef(null),[l,d]=x.useState(!1);x.useEffect(()=>{_.current&&d(_.current.scrollWidth>_.current.clientWidth)},[t]);const c=m({[bo.ellipsisTextWithTooltip]:!0,...o&&{[o]:!0}}),v=m({[bo.ellipsisTextWithTooltip__tooltip]:!0,...n&&{[n]:!0}}),k=m({...a&&{[a]:!0}});return s.jsx(Oe,{classNameTooltip:v,classNameTriggerTooltip:k,classNameBaseTooltipContentRoot:i,classNameBaseTooltipRoot:r,isVisibleTooltip:l,text:t,trigger:s.jsx(we,{...p,classNameRoot:c,isEllipsis:!0,ref:_,children:t})})},De={spForm:"_spForm_zefbj_43",spForm_fullWidth:"_spForm_fullWidth_zefbj_46",spForm_withSeparator:"_spForm_withSeparator_zefbj_49","spForm_addMargin--size-lg":"_spForm_addMargin--size-lg_zefbj_67","spForm_addMargin--size-md":"_spForm_addMargin--size-md_zefbj_75"},ca=e=>{const{size:t="lg",children:o,onSubmit:n,addMargin:a=!1,withSeparator:i=!1,fullWidth:r=!0,classNameRoot:p,..._}=e,l=m({[De.spForm]:!0,[De.spForm_fullWidth]:r,[De.spForm_addMargin]:a,[De[`spForm_addMargin--size-${t}`]]:a&&t,[De.spForm_withSeparator]:i,...p&&{[p]:!0}}),d=c=>{c.preventDefault(),n&&n()};return s.jsx("form",{..._,onSubmit:d,className:l,children:o})},Ye={spLabel:"_spLabel_g0hfy_43",spLabel__text:"_spLabel__text_g0hfy_52",spLabel__tooltip:"_spLabel__tooltip_g0hfy_62",spLabel__required:"_spLabel__required_g0hfy_67"},Ke=e=>{const{required:t,label:o,infoTooltipText:n,tooltipPosition:a,classNameRoot:i,classNameBaseTooltipRoot:r}=e,p=m({[Ye.spLabel]:!0,...i&&{[i]:!0}}),_=m({[Ye.spLabel__text]:!0}),l=m({[Ye.spLabel__required]:t}),d=m({[Ye.spLabel__tooltip]:!0});return s.jsxs("div",{className:p,children:[s.jsx("label",{className:_,children:o}),t&&s.jsx("div",{className:l,children:"*"}),n&&s.jsx("div",{className:d,children:s.jsx(Ne,{position:a,text:n,classNameBaseTooltipRoot:r})})]})},ke={spInput:"_spInput_etrn0_43",spInput_error:"_spInput_error_etrn0_48",spInput__control:"_spInput__control_etrn0_48",spInput__container:"_spInput__container_etrn0_55",spInput__control_filled:"_spInput__control_filled_etrn0_74",spInput__control_outlined:"_spInput__control_outlined_etrn0_78",spInput__control_disabled:"_spInput__control_disabled_etrn0_82",spInput__control_clearable:"_spInput__control_clearable_etrn0_86",spInput__clear:"_spInput__clear_etrn0_113",spInput__error:"_spInput__error_etrn0_122"},yo=x.forwardRef((e,t)=>{const{value:o,onChange:n,label:a,variant:i="outlined",disabled:r=!1,error:p,required:_,name:l,isClearable:d,pattern:c,onMouseEnter:v,infoTooltipText:k,tooltipPosition:S,isVisibleDefaultTitle:h=!0,placeholder:T="Введите...",classNameRoot:j,classNameError:q,classNameLabel:N,classNameBaseTooltipRoot:y,...f}=e,L=m({[ke.spInput]:!0,[ke.spInput_error]:!!p,...j&&{[j]:!0}}),F=m({[ke.spInput__container]:!0}),E=m({[ke.spInput__control]:!0,[ke.spInput__control_disabled]:r,[ke[`spInput__control_${i}`]]:i,[ke.spInput__control_clearable]:d}),Q=m({[ke.spInput__clear]:!0}),te=m({[ke.spInput__error]:!0,...q&&{[q]:!0}}),fe=m({...N&&{[N]:!0}}),ue=J=>{n(J,{name:l,value:""})},de=J=>{const{value:A,name:U}=J.target;c&&A&&!new RegExp(c).test(A)||n(J,{value:A,name:U})},Z=()=>s.jsx("input",{...f,placeholder:T,disabled:r,onChange:de,title:h?o:void 0,value:o,name:l,className:E,ref:t});return s.jsxs("div",{className:L,children:[a&&s.jsx(Ke,{classNameRoot:fe,tooltipPosition:S,required:_,label:a,infoTooltipText:k,classNameBaseTooltipRoot:y}),s.jsxs("div",{className:F,onMouseEnter:v,children:[Z(),d&&o&&!r&&s.jsx(ce,{onClick:ue,className:Q,name:ie.Trash})]}),p&&s.jsx("div",{className:te,children:p})]})});yo.displayName="Input";const ko=x.createContext({device:{isDesktop:!1,isMobile:!1,isTablet:!1}});var ht={};ht.match=xa,ht.parse=So;var da=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,_a=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,fa=/^(?:(min|max)-)?(.+)/,ua=/(em|rem|px|cm|mm|in|pt|pc)?$/,ma=/(dpi|dpcm|dppx)?$/;function xa(e,t){return So(e).some(function(o){var n=o.inverse,a=o.type==="all"||t.type===o.type;if(a&&n||!(a||n))return!1;var i=o.expressions.every(function(r){var p=r.feature,_=r.modifier,l=r.value,d=t[p];if(!d)return!1;switch(p){case"orientation":case"scan":return d.toLowerCase()===l.toLowerCase();case"width":case"height":case"device-width":case"device-height":l=To(l),d=To(d);break;case"resolution":l=Co(l),d=Co(d);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":l=Ao(l),d=Ao(d);break;case"grid":case"color":case"color-index":case"monochrome":l=parseInt(l,10)||1,d=parseInt(d,10)||0;break}switch(_){case"min":return d>=l;case"max":return d<=l;default:return d===l}});return i&&!n||!i&&n})}function So(e){return e.split(",").map(function(t){t=t.trim();var o=t.match(da),n=o[1],a=o[2],i=o[3]||"",r={};return r.inverse=!!n&&n.toLowerCase()==="not",r.type=a?a.toLowerCase():"all",i=i.match(/\([^\)]+\)/g)||[],r.expressions=i.map(function(p){var _=p.match(_a),l=_[1].toLowerCase().match(fa);return{modifier:l[1],feature:l[2],value:_[2]}}),r})}function Ao(e){var t=Number(e),o;return t||(o=e.match(/^(\d+)\s*\/\s*(\d+)$/),t=o[1]/o[2]),t}function Co(e){var t=parseFloat(e),o=String(e).match(ma)[1];switch(o){case"dpcm":return t/2.54;case"dppx":return t*96;default:return t}}function To(e){var t=parseFloat(e),o=String(e).match(ua)[1];switch(o){case"em":return t*16;case"rem":return t*16;case"cm":return t*96/2.54;case"mm":return t*96/2.54/10;case"in":return t*96;case"pt":return t*72;case"pc":return t*72/12;default:return t}}var ga=ht.match,zo=typeof window<"u"?window.matchMedia:null;function va(e,t,o){var n=this,a;zo&&!o&&(a=zo.call(window,e)),a?(this.matches=a.matches,this.media=a.media,a.addListener(p)):(this.matches=ga(e,t),this.media=e),this.addListener=i,this.removeListener=r,this.dispose=_;function i(l){a&&a.addListener(l)}function r(l){a&&a.removeListener(l)}function p(l){n.matches=l.matches,n.media=l.media}function _(){a&&a.removeListener(p)}}function ha(e,t,o){return new va(e,t,o)}var ba=ha;const wa=Mt(ba);var ya=/[A-Z]/g,ka=/^ms-/,bt={};function Sa(e){return"-"+e.toLowerCase()}function Lo(e){if(bt.hasOwnProperty(e))return bt[e];var t=e.replace(ya,Sa);return bt[e]=ka.test(t)?"-"+t:t}function Aa(e,t){if(e===t)return!0;if(!e||!t)return!1;const o=Object.keys(e),n=Object.keys(t),a=o.length;if(n.length!==a)return!1;for(let i=0;i<a;i++){const r=o[i];if(e[r]!==t[r]||!Object.prototype.hasOwnProperty.call(t,r))return!1}return!0}const le=C.oneOfType([C.string,C.number]),Eo={all:C.bool,grid:C.bool,aural:C.bool,braille:C.bool,handheld:C.bool,print:C.bool,projection:C.bool,screen:C.bool,tty:C.bool,tv:C.bool,embossed:C.bool},Ca={orientation:C.oneOf(["portrait","landscape"]),scan:C.oneOf(["progressive","interlace"]),aspectRatio:C.string,deviceAspectRatio:C.string,height:le,deviceHeight:le,width:le,deviceWidth:le,color:C.bool,colorIndex:C.bool,monochrome:C.bool,resolution:le,type:Object.keys(Eo)},{type:Pr,...Ta}=Ca,za={minAspectRatio:C.string,maxAspectRatio:C.string,minDeviceAspectRatio:C.string,maxDeviceAspectRatio:C.string,minHeight:le,maxHeight:le,minDeviceHeight:le,maxDeviceHeight:le,minWidth:le,maxWidth:le,minDeviceWidth:le,maxDeviceWidth:le,minColor:C.number,maxColor:C.number,minColorIndex:C.number,maxColorIndex:C.number,minMonochrome:C.number,maxMonochrome:C.number,minResolution:le,maxResolution:le,...Ta};var La={all:{...Eo,...za}};const Ea=e=>`not ${e}`,Ba=(e,t)=>{const o=Lo(e);return typeof t=="number"&&(t=`${t}px`),t===!0?o:t===!1?Ea(o):`(${o}: ${t})`},Ia=e=>e.join(" and "),ja=e=>{const t=[];return Object.keys(La.all).forEach(o=>{const n=e[o];n!=null&&t.push(Ba(o,n))}),Ia(t)},Na=x.createContext(void 0),Fa=e=>e.query||ja(e),Bo=e=>e?Object.keys(e).reduce((o,n)=>(o[Lo(n)]=e[n],o),{}):void 0,Io=()=>{const e=x.useRef(!1);return x.useEffect(()=>{e.current=!0},[]),e.current},Da=e=>{const t=x.useContext(Na),o=()=>Bo(e)||Bo(t),[n,a]=x.useState(o);return x.useEffect(()=>{const i=o();Aa(n,i)||a(i)},[e,t]),n},Wa=e=>{const t=()=>Fa(e),[o,n]=x.useState(t);return x.useEffect(()=>{const a=t();o!==a&&n(a)},[e]),o},Ha=(e,t)=>{const o=()=>wa(e,t||{},!!t),[n,a]=x.useState(o),i=Io();return x.useEffect(()=>{if(i){const r=o();return a(r),()=>{r&&r.dispose()}}},[e,t]),n},Ma=e=>{const[t,o]=x.useState(e.matches);return x.useEffect(()=>{const n=a=>{o(a.matches)};return e.addListener(n),o(e.matches),()=>{e.removeListener(n)}},[e]),t},wt=(e,t,o)=>{const n=Da(t),a=Wa(e);if(!a)throw new Error("Invalid or missing MediaQuery!");const i=Ha(a,n),r=Ma(i);return Io(),x.useEffect(()=>{},[r]),x.useEffect(()=>()=>{i&&i.dispose()},[]),r},Oa=e=>{const{desktop:t,tablet:o,mobile:n}=e,a=wt(t),i=wt(o),r=wt(n);return{device:{isDesktop:a,isTablet:i,isMobile:r}}},Pa=e=>{const{breakpoints:t,children:o}=e,{device:n}=Oa(t);return s.jsx(ko.Provider,{value:{device:n},children:o})},jo=2e3,Ga=e=>{const{targetValue:t,duration:o=jo,doneValue:n}=e,[a,i]=x.useState(t),r=x.useRef(),p=x.useRef(0),_=x.useRef(),l=x.useRef(t);return x.useEffect(()=>{if(l.current=t,t===p.current)return;r.current&&cancelAnimationFrame(r.current),p.current=a,_.current=performance.now();const d=c=>{const v=t===n?jo:o,k=c-(_.current||c),S=Math.min(k/v,1),h=S<.5?4*S*S*S:1-Math.pow(-2*S+2,3)/2,T=p.current+(l.current-p.current)*h,j=Math.max(0,Math.floor(T));i(j),S<1&&(r.current=requestAnimationFrame(d))};return r.current=requestAnimationFrame(d),()=>{r.current&&cancelAnimationFrame(r.current)}},[t,o,n]),a},Te={progressWrapper:"_progressWrapper_xn9s0_44",progressWrapper_loading:"_progressWrapper_loading_xn9s0_47",progressWrapper__childrenWrapper:"_progressWrapper__childrenWrapper_xn9s0_52",progressWrapper__childrenWrapper_loading:"_progressWrapper__childrenWrapper_loading_xn9s0_58","progressWrapper__childrenWrapper--animated-pulse":"_progressWrapper__childrenWrapper--animated-pulse_xn9s0_58",pulse:"_pulse_xn9s0_1","progressWrapper__childrenWrapper--animated-backgroundProgress":"_progressWrapper__childrenWrapper--animated-backgroundProgress_xn9s0_61",progressWrapper__progressBadge:"_progressWrapper__progressBadge_xn9s0_64",progressWrapper__progressBadge_loading:"_progressWrapper__progressBadge_loading_xn9s0_75"},Ua=e=>{const{value:t,classNameRoot:o,classNameProgressBadgeRoot:n,duration:a=2e3,children:i,doneValue:r=100,animationVariant:p="backgroundProgress"}=e,[_,l]=x.useState(!1),d=x.useRef(),c=Ga({targetValue:t,duration:a,doneValue:r});x.useEffect(()=>(c===r?d.current=window.setTimeout(()=>{l(!1)},500):(l(!0),d.current&&window.clearTimeout(d.current)),()=>{d.current&&window.clearTimeout(d.current)}),[c,r]);const v=m({[Te.progressWrapper]:!0,[Te.progressWrapper_loading]:_,...o&&{[o]:!0}}),k=m({[Te.progressWrapper__progressBadge]:!0,[Te.progressWrapper__progressBadge_loading]:_,...n&&{[n]:!0}}),S=m({[Te.progressWrapper__childrenWrapper]:!0,[Te[`progressWrapper__childrenWrapper--animated-${p}`]]:p,[Te.progressWrapper__childrenWrapper_loading]:_}),h={"--progress":`${c/r*100}%`};return s.jsxs("div",{className:v,children:[s.jsx("div",{className:S,style:p==="backgroundProgress"?h:void 0,children:i}),_&&s.jsxs(we,{classNameRoot:k,children:[c,"%"]})]})},$a=180,_e={spSelect:"_spSelect_140u6_43",spSelect_error:"_spSelect_error_140u6_48",spSelect__control:"_spSelect__control_140u6_48",spSelect__value_empty:"_spSelect__value_empty_140u6_52",spSelect__icon:"_spSelect__icon_140u6_55",spSelect__container:"_spSelect__container_140u6_58",spSelect__control_filled:"_spSelect__control_filled_140u6_78",spSelect__control_outlined:"_spSelect__control_outlined_140u6_82",spSelect__control_disabled:"_spSelect__control_disabled_140u6_107",spSelect__value:"_spSelect__value_140u6_52",spSelect__list:"_spSelect__list_140u6_138",spSelect__list_scrollable:"_spSelect__list_scrollable_140u6_145",spSelect__option:"_spSelect__option_140u6_161",spSelect__error:"_spSelect__error_140u6_179"},Ra=e=>{const{options:t,placeholder:o="Выберите из списка...",value:n,name:a,variant:i="outlined",onChange:r,onMouseEnter:p,error:_,label:l,infoTooltipText:d,tooltipPosition:c,disabled:v,required:k,maxHeightList:S=$a,isVisibleDefaultTitle:h=!0,isScrollableList:T=!1,classNameRoot:j,classNameError:q,classNameLabel:N,classNameBaseTooltipRoot:y}=e,[f,L]=x.useState(!1),F=x.useRef(null);Nt([F],()=>{L(!1)},f);const E=t.find(u=>u.value===n),Q=(u,w)=>{r(u,{value:w,name:a}),L(!1)},te=()=>{v||L(!f)},fe=m({[_e.spSelect]:!0,[_e.spSelect_error]:!!_,...j&&{[j]:!0}}),ue=m({[_e.spSelect__container]:!0}),de=m({[_e.spSelect__control]:!0,[_e[`spSelect__control_${i}`]]:i,[_e.spSelect__control_disabled]:v}),Z=m({[_e.spSelect__value]:!0,[_e.spSelect__value_empty]:!E}),J=m({[_e.spSelect__icon]:!0}),A=m({[_e.spSelect__list]:!0,[_e.spSelect__list_scrollable]:T}),U=m({...N&&{[N]:!0}}),X=m({[_e.spSelect__error]:!0,...q&&{[q]:!0}}),P=()=>s.jsxs("div",{tabIndex:v?-1:0,title:h?n:void 0,className:de,onClick:te,children:[s.jsx("div",{className:Z,children:(E==null?void 0:E.label)||o}),s.jsx(ce,{name:ie.SelectChevronDown,rotate:f?180:void 0,className:J})]});return s.jsxs("div",{className:fe,ref:F,children:[l&&s.jsx(Ke,{classNameRoot:U,tooltipPosition:c,required:k,label:l,infoTooltipText:d,classNameBaseTooltipRoot:y}),s.jsxs("div",{className:ue,onMouseEnter:p,children:[P(),f&&s.jsx("div",{className:A,style:T?{maxHeight:`${S}px`}:{},children:t.map(u=>{const w=u.value===n;return s.jsxs("div",{className:m({[_e.spSelect__option]:!0}),onClick:W=>Q(W,u.value),children:[u.label,w&&s.jsx(ce,{name:ie.Check,className:J})]},u.value)})})]}),_&&s.jsx("div",{className:X,children:_})]})},qa={skeleton:"_skeleton_c18an_44"},Va=e=>{const{width:t="100%",height:o="1rem",circle:n=!1,classNameRoot:a="",style:i={}}=e,r={width:t,height:o,borderRadius:n?"50%":"0",...i};return s.jsx("div",{style:r,className:m(a,qa.skeleton)})},No=e=>e==null||e===""?!0:typeof e!="string"&&typeof e.toString!="function"?!1:e.toString().replace(/\s/g,"").length<1,ve={spTable:"_spTable_1vuaj_43",spTable__tdContentCopyIcon:"_spTable__tdContentCopyIcon_1vuaj_62",spTable__tdContent:"_spTable__tdContent_1vuaj_62",spTable__tdColorContent:"_spTable__tdColorContent_1vuaj_72",spTable__tdContentCopyIcon_copied:"_spTable__tdContentCopyIcon_copied_1vuaj_85",spTable__emptyPage:"_spTable__emptyPage_1vuaj_89",spStringsGroup:"_spStringsGroup_1vuaj_105",spStringsGroup__groupItem:"_spStringsGroup__groupItem_1vuaj_119",spStringsGroup__groupItemHeader:"_spStringsGroup__groupItemHeader_1vuaj_134",spStringsGroup__groupItemContent:"_spStringsGroup__groupItemContent_1vuaj_138",spStringsGroup__groupItemContentCopyIcon:"_spStringsGroup__groupItemContentCopyIcon_1vuaj_144",spStringsGroup__groupItemContentCopyIcon_copied:"_spStringsGroup__groupItemContentCopyIcon_copied_1vuaj_151"},Ya=e=>{const{columns:t,data:o,isNotTableOnNotDesktop:n=!1,isDesktop:a=!0,classNameRoot:i}=e,r=t.map(y=>o?{...y,isVisible:o.some(f=>!!f[y.key])}:y).filter(y=>y.isVisible),p=m({[ve.spTable]:!0,...i&&{[i]:!0}}),_=m({[ve.spTable__tdContent]:!0}),l=m({[ve.spTable__tdColorContent]:!0}),d=m({[ve.spTable__emptyPage]:!0}),[c,v]=x.useState(null),k=y=>{const{text:f,rowIndex:L,colIndex:F}=y;(c==null?void 0:c.rowIndex)===L&&(c==null?void 0:c.colIndex)===F||navigator.clipboard.writeText(f).then(()=>{v({rowIndex:L,colIndex:F})}).catch(E=>{console.error("Ошибка при копировании:",E)})},S=()=>{v(null)},h=()=>s.jsx("div",{className:d,children:"Данные отсутствуют"}),T=({row:y,col:f})=>{const L=y[f.key];if(!L)return null;const[F,E]=L.split(/\s*\{\{|}}\s*/).filter(Boolean);return s.jsxs("span",{children:[F,E&&s.jsx("span",{className:l,children:` ${E}`})]})},j=()=>o&&Array.isArray(o)&&o.length>0?s.jsxs("table",{className:p,children:[s.jsx("colgroup",{children:r.map((y,f,L)=>s.jsx("col",{style:{width:`calc(100%/${L.length})`}},f))}),s.jsx("thead",{children:s.jsx("tr",{children:r.map((y,f)=>s.jsx("th",{children:y.title},f))})}),s.jsx("tbody",{children:o.map((y,f)=>y?s.jsx("tr",{children:r.map((L,F)=>{const E=(c==null?void 0:c.rowIndex)===f&&(c==null?void 0:c.colIndex)===F;return s.jsx("td",{onMouseLeave:E?S:void 0,children:s.jsxs("div",{className:_,children:[s.jsx("span",{children:L.isColorContentsCurlyBrackets?T({row:y,col:L}):y[L.key]}),!No(y[L.key])&&L.isBeCopiedValue&&s.jsx(ce,{className:m({[ve.spTable__tdContentCopyIcon]:!0,[ve.spTable__tdContentCopyIcon_copied]:E}),name:E?ie.Check:ie.Copy,onClick:()=>{const Q=y[L.key];if(!Q)return null;k({text:Q,rowIndex:f,colIndex:F})}})]})},`${f}:${F}`)})},f):null)})]}):h(),q=()=>o&&Array.isArray(o)&&o.length>0?s.jsx("div",{className:m({[ve.spStringsGroup]:!0}),children:o.map((y,f)=>y?s.jsx("div",{children:r.map((L,F)=>{if(No(y[L.key]))return null;const E=(c==null?void 0:c.rowIndex)===f&&(c==null?void 0:c.colIndex)===F;return s.jsxs("div",{className:m({[ve.spStringsGroup__groupItem]:!0}),onMouseLeave:E?S:void 0,children:[s.jsx("div",{className:m({[ve.spStringsGroup__groupItemHeader]:!0}),children:L.title}),s.jsxs("div",{className:m({[ve.spStringsGroup__groupItemContent]:!0}),children:[s.jsx("span",{children:L.isColorContentsCurlyBrackets?T({row:y,col:L}):y[L.key]}),L.isBeCopiedValue&&s.jsx(ce,{className:m({[ve.spStringsGroup__groupItemContentCopyIcon]:!0,[ve.spStringsGroup__groupItemContentCopyIcon_copied]:E}),name:E?ie.Check:ie.Copy,onClick:()=>{const Q=y[L.key];if(!Q)return null;k({text:Q,rowIndex:f,colIndex:F})}})]})]},F)})},f):null)}):h();return n?a?j():q():j()},ze={spTabs:"_spTabs_1citb_43",spTabs_separated:"_spTabs_separated_1citb_48","spTabs--size-md":"_spTabs--size-md_1citb_48",spTabs__tabElement:"_spTabs__tabElement_1citb_48","spTabs--size-lg":"_spTabs--size-lg_1citb_51","spTabs--variant-contained":"_spTabs--variant-contained_1citb_54",spTabs__tabElement_active:"_spTabs__tabElement_active_1citb_83",spTabs__triggerTooltip:"_spTabs__triggerTooltip_1citb_90","spTabs--variant-filled":"_spTabs--variant-filled_1citb_93"},Ka=e=>{const{panes:t,isSeparated:o=!1,classNameRoot:n,classNameBaseTooltipRoot:a,variant:i="contained",size:r="md"}=e,p=m({[ze.spTabs]:!0,[ze.spTabs_separated]:o,[ze[`spTabs--variant-${i}`]]:i,[ze[`spTabs--size-${r}`]]:r,...n&&{[n]:!0}}),_=m({[ze.spTabs__triggerTooltip]:!0}),l=()=>{switch(r){case"md":return"p2";case"lg":return"p1"}};return s.jsx("div",{className:p,children:t.map((d,c)=>{const{name:v,active:k,onClick:S,infoTooltipText:h}=d;return s.jsxs("div",{className:m({[ze.spTabs__tabElement]:!0,[ze.spTabs__tabElement_active]:k}),onClick:S,children:[s.jsx(we,{type:l(),children:v}),!!h&&s.jsx(Ne,{classNameTriggerTooltip:_,text:h,classNameBaseTooltipRoot:a})]},d.key||c)})})},Xa={spTextWithLabel:"_spTextWithLabel_1dr7p_1"},Za=e=>{const{children:t,label:o,style:n,...a}=e;return s.jsxs("div",{className:Xa.spTextWithLabel,style:{...n},children:[s.jsx(Ke,{label:o}),s.jsx(we,{...a,children:t})]})},se={spUploadFiles:"_spUploadFiles_1il4x_43",spUploadFiles_error:"_spUploadFiles_error_1il4x_49",spUploadFiles__control:"_spUploadFiles__control_1il4x_49","spUploadFiles--variant-input":"_spUploadFiles--variant-input_1il4x_53",spUploadFiles__placeholder:"_spUploadFiles__placeholder_1il4x_57","spUploadFiles--variant-dropzone":"_spUploadFiles--variant-dropzone_1il4x_65",spUploadFiles_multiple:"_spUploadFiles_multiple_1il4x_65",spUploadFiles__fileName:"_spUploadFiles__fileName_1il4x_84",spUploadFiles_fileUploaded:"_spUploadFiles_fileUploaded_1il4x_116",spUploadFiles_disabled:"_spUploadFiles_disabled_1il4x_116",spUploadFiles__fileNamesList:"_spUploadFiles__fileNamesList_1il4x_127",spUploadFiles__fileNamesListItem:"_spUploadFiles__fileNamesListItem_1il4x_136",spUploadFiles__fileNamesListItem__triggerTooltip:"_spUploadFiles__fileNamesListItem__triggerTooltip_1il4x_155",spUploadFiles__fileNamesListItemDelete:"_spUploadFiles__fileNamesListItemDelete_1il4x_158",spUploadFiles__tooltipWrapper:"_spUploadFiles__tooltipWrapper_1il4x_173",spUploadFiles__tooltip:"_spUploadFiles__tooltip_1il4x_173",spUploadFiles__delete:"_spUploadFiles__delete_1il4x_179",spUploadFiles__error:"_spUploadFiles__error_1il4x_187"},Qa=e=>{const{placeholder:t="Загрузите файл",variant:o="input",name:n,onDropFiles:a,maxSize:i,accept:r,disabled:p,multiple:_,maxFiles:l,files:d=[],infoTooltipText:c,tooltipPosition:v=re.TopRight,classNameRoot:k,error:S}=e,h=d.map(F=>F.name),T=(h==null?void 0:h.length)>0,j=o==="input",q=m({[se.spUploadFiles]:!0,[se[`spUploadFiles--variant-${o}`]]:o,[se.spUploadFiles_error]:!!S,[se.spUploadFiles_disabled]:p,[se.spUploadFiles_multiple]:_,[se.spUploadFiles_fileUploaded]:T,...k&&{[k]:!0}}),N=F=>{const E=[...d],Q=E.findIndex(te=>te.name===F);E.splice(Q,1),a(E,n)},y=F=>{F.stopPropagation(),a([],n)},f=()=>_?s.jsx("ul",{className:se.spUploadFiles__fileNamesList,children:h.map((F,E)=>s.jsxs("li",{className:se.spUploadFiles__fileNamesListItem,onClick:Q=>{Q.stopPropagation(),N(F)},children:[s.jsx(wo,{type:"p2",text:F,classNameTriggerTooltipRoot:se.spUploadFiles__fileNamesListItem__triggerTooltip}),s.jsx("div",{className:se.spUploadFiles__fileNamesListItemDelete,children:s.jsx(ce,{name:ie.Trash})})]},E))}):s.jsx(we,{isEllipsis:!0,classNameRoot:se.spUploadFiles__fileName,children:h[0]}),L=()=>s.jsxs(s.Fragment,{children:[T?f():s.jsx(we,{classNameRoot:se.spUploadFiles__placeholder,children:t}),T&&(j||!_)?s.jsx("div",{className:se.spUploadFiles__delete,onClick:y,children:s.jsx(ce,{name:ie.Close})}):j&&c&&s.jsx(Ne,{classNameTooltip:se.spUploadFiles__tooltipWrapper,position:v,text:c,classNameTriggerTooltip:se.spUploadFiles__tooltip})]});return s.jsx(ho,{name:n,files:d,multiple:_,maxSize:i,maxFiles:l,accept:r,onDropFiles:a,disabled:p||T,children:s.jsxs("div",{className:q,children:[s.jsxs("div",{className:se.spUploadFiles__control,children:[j&&s.jsx(ce,{name:T?ie.Check:ie.Upload}),L()]}),S&&s.jsx("div",{className:se.spUploadFiles__error,children:S})]})})};H.Accordion=en,H.ApplyButtons=jt,H.BaseTooltip=tt,H.Button=Me,H.Checkbox=tn,H.Confirm=nn,H.ContextMenu=an,H.DefaultDropzone=ho,H.Dropdown=la,H.EIconName=ie,H.ETooltipPosition=re,H.EllipsisTextWithTooltip=wo,H.Form=ca,H.Icon=ce,H.InfoTooltip=Ne,H.Input=yo,H.Label=Ke,H.Layer=Wt,H.MediaContext=ko,H.MediaContextProvider=Pa,H.Modal=Ht,H.Portal=ot,H.ProgressWrapper=Ua,H.Select=Ra,H.Skeleton=Va,H.Spinner=It,H.Table=Ya,H.Tabs=Ka,H.Text=we,H.TextWithLabel=Za,H.Tooltip=Oe,H.UploadFiles=Qa,H.useModal=on,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})});
|
|
25
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mo(e,t){if(e){if(typeof e=="string")return xt(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return xt(e,t)}}function xt(e,t){(t==null||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function aa(e,t){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var n=[],a=!0,i=!1,r,p;try{for(o=o.call(e);!(a=(r=o.next()).done)&&(n.push(r.value),!(t&&n.length===t));a=!0);}catch(_){i=!0,p=_}finally{try{!a&&o.return!=null&&o.return()}finally{if(i)throw p}}return n}}function ia(e){if(Array.isArray(e))return e}function xo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,n)}return o}function ee(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?xo(Object(o),!0).forEach(function(n){gt(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):xo(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function gt(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function qe(e,t){if(e==null)return{};var o=ra(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ra(e,t){if(e==null)return{};var o={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(o[a]=e[a]);return o}var Ve=x.forwardRef(function(e,t){var o=e.children,n=qe(e,Kn),a=sa(n),i=a.open,r=qe(a,Xn);return x.useImperativeHandle(t,function(){return{open:i}},[i]),x.createElement(x.Fragment,null,o(ee(ee({},r),{},{open:i})))});Ve.displayName="Dropzone";var go={disabled:!1,getFilesFromEvent:vn,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Ve.defaultProps=go,Ve.propTypes={children:C.func,accept:C.objectOf(C.arrayOf(C.string)),multiple:C.bool,preventDropOnDocument:C.bool,noClick:C.bool,noKeyboard:C.bool,noDrag:C.bool,noDragEventsBubbling:C.bool,minSize:C.number,maxSize:C.number,maxFiles:C.number,disabled:C.bool,getFilesFromEvent:C.func,onFileDialogCancel:C.func,onFileDialogOpen:C.func,useFsAccessApi:C.bool,autoFocus:C.bool,onDragEnter:C.func,onDragLeave:C.func,onDragOver:C.func,onDrop:C.func,onDropAccepted:C.func,onDropRejected:C.func,onError:C.func,validator:C.func};var vt={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function sa(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ee(ee({},go),e),o=t.accept,n=t.disabled,a=t.getFilesFromEvent,i=t.maxSize,r=t.minSize,p=t.multiple,_=t.maxFiles,l=t.onDragEnter,d=t.onDragLeave,c=t.onDragOver,v=t.onDrop,k=t.onDropAccepted,S=t.onDropRejected,h=t.onFileDialogCancel,T=t.onFileDialogOpen,j=t.useFsAccessApi,q=t.autoFocus,N=t.preventDropOnDocument,y=t.noClick,f=t.noKeyboard,L=t.noDrag,F=t.noDragEventsBubbling,E=t.onError,Q=t.validator,te=x.useMemo(function(){return qn(o)},[o]),fe=x.useMemo(function(){return Rn(o)},[o]),ue=x.useMemo(function(){return typeof T=="function"?T:vo},[T]),de=x.useMemo(function(){return typeof h=="function"?h:vo},[h]),Z=x.useRef(null),J=x.useRef(null),A=x.useReducer(pa,vt),U=mt(A,2),X=U[0],P=U[1],u=X.isFocused,w=X.isFileDialogActive,W=x.useRef(typeof window<"u"&&window.isSecureContext&&j&&$n()),M=function(){!W.current&&w&&setTimeout(function(){if(J.current){var B=J.current.files;B.length||(P({type:"closeDialog"}),de())}},300)};x.useEffect(function(){return window.addEventListener("focus",M,!1),function(){window.removeEventListener("focus",M,!1)}},[J,w,de,W]);var I=x.useRef([]),$=function(B){Z.current&&Z.current.contains(B.target)||(B.preventDefault(),I.current=[])};x.useEffect(function(){return N&&(document.addEventListener("dragover",_o,!1),document.addEventListener("drop",$,!1)),function(){N&&(document.removeEventListener("dragover",_o),document.removeEventListener("drop",$))}},[Z,N]),x.useEffect(function(){return!n&&q&&Z.current&&Z.current.focus(),function(){}},[Z,q,n]);var D=x.useCallback(function(b){E?E(b):console.error(b)},[E]),O=x.useCallback(function(b){b.preventDefault(),b.persist(),Ze(b),I.current=[].concat(Jn(I.current),[b.target]),Re(b)&&Promise.resolve(a(b)).then(function(B){if(!($e(b)&&!F)){var oe=B.length,ae=oe>0&&On({files:B,accept:te,minSize:r,maxSize:i,multiple:p,maxFiles:_,validator:Q}),xe=oe>0&&!ae;P({isDragAccept:ae,isDragReject:xe,isDragActive:!0,type:"setDraggedFiles"}),l&&l(b)}}).catch(function(B){return D(B)})},[a,l,D,F,te,r,i,p,_,Q]),R=x.useCallback(function(b){b.preventDefault(),b.persist(),Ze(b);var B=Re(b);if(B&&b.dataTransfer)try{b.dataTransfer.dropEffect="copy"}catch{}return B&&c&&c(b),!1},[c,F]),V=x.useCallback(function(b){b.preventDefault(),b.persist(),Ze(b);var B=I.current.filter(function(ae){return Z.current&&Z.current.contains(ae)}),oe=B.indexOf(b.target);oe!==-1&&B.splice(oe,1),I.current=B,!(B.length>0)&&(P({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Re(b)&&d&&d(b))},[Z,d,F]),G=x.useCallback(function(b,B){var oe=[],ae=[];b.forEach(function(xe){var He=lo(xe,te),Ie=mt(He,2),kt=Ie[0],St=Ie[1],At=co(xe,r,i),Qe=mt(At,2),Ct=Qe[0],Tt=Qe[1],zt=Q?Q(xe):null;if(kt&&Ct&&!zt)oe.push(xe);else{var Lt=[St,Tt];zt&&(Lt=Lt.concat(zt)),ae.push({file:xe,errors:Lt.filter(function(oi){return oi})})}}),(!p&&oe.length>1||p&&_>=1&&oe.length>_)&&(oe.forEach(function(xe){ae.push({file:xe,errors:[Mn]})}),oe.splice(0)),P({acceptedFiles:oe,fileRejections:ae,isDragReject:ae.length>0,type:"setFiles"}),v&&v(oe,ae,B),ae.length>0&&S&&S(ae,B),oe.length>0&&k&&k(oe,B)},[P,p,te,r,i,_,v,k,S,Q]),ne=x.useCallback(function(b){b.preventDefault(),b.persist(),Ze(b),I.current=[],Re(b)&&Promise.resolve(a(b)).then(function(B){$e(b)&&!F||G(B,b)}).catch(function(B){return D(B)}),P({type:"reset"})},[a,G,D,F]),g=x.useCallback(function(){if(W.current){P({type:"openDialog"}),ue();var b={multiple:p,types:fe};window.showOpenFilePicker(b).then(function(B){return a(B)}).then(function(B){G(B,null),P({type:"closeDialog"})}).catch(function(B){Vn(B)?(de(B),P({type:"closeDialog"})):Yn(B)?(W.current=!1,J.current?(J.current.value=null,J.current.click()):D(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):D(B)});return}J.current&&(P({type:"openDialog"}),ue(),J.current.value=null,J.current.click())},[P,ue,de,j,G,D,fe,p]),me=x.useCallback(function(b){!Z.current||!Z.current.isEqualNode(b.target)||(b.key===" "||b.key==="Enter"||b.keyCode===32||b.keyCode===13)&&(b.preventDefault(),g())},[Z,g]),Le=x.useCallback(function(){P({type:"focus"})},[]),We=x.useCallback(function(){P({type:"blur"})},[]),Fo=x.useCallback(function(){y||(Un()?setTimeout(g,0):g())},[y,g]),Be=function(B){return n?null:B},yt=function(B){return f?null:Be(B)},Xe=function(B){return L?null:Be(B)},Ze=function(B){F&&B.stopPropagation()},Ja=x.useMemo(function(){return function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},B=b.refKey,oe=B===void 0?"ref":B,ae=b.role,xe=b.onKeyDown,He=b.onFocus,Ie=b.onBlur,kt=b.onClick,St=b.onDragEnter,At=b.onDragOver,Qe=b.onDragLeave,Ct=b.onDrop,Tt=qe(b,Zn);return ee(ee(gt({onKeyDown:yt(ye(xe,me)),onFocus:yt(ye(He,Le)),onBlur:yt(ye(Ie,We)),onClick:Be(ye(kt,Fo)),onDragEnter:Xe(ye(St,O)),onDragOver:Xe(ye(At,R)),onDragLeave:Xe(ye(Qe,V)),onDrop:Xe(ye(Ct,ne)),role:typeof ae=="string"&&ae!==""?ae:"presentation"},oe,Z),!n&&!f?{tabIndex:0}:{}),Tt)}},[Z,me,Le,We,Fo,O,R,V,ne,f,L,n]),ei=x.useCallback(function(b){b.stopPropagation()},[]),ti=x.useMemo(function(){return function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},B=b.refKey,oe=B===void 0?"ref":B,ae=b.onChange,xe=b.onClick,He=qe(b,Qn),Ie=gt({accept:te,multiple:p,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Be(ye(ae,ne)),onClick:Be(ye(xe,ei)),tabIndex:-1},oe,J);return ee(ee({},Ie),He)}},[J,o,p,ne,n]);return ee(ee({},X),{},{isFocused:u&&!n,getRootProps:Ja,getInputProps:ti,rootRef:Z,inputRef:J,open:Be(g)})}function pa(e,t){switch(t.type){case"focus":return ee(ee({},e),{},{isFocused:!0});case"blur":return ee(ee({},e),{},{isFocused:!1});case"openDialog":return ee(ee({},vt),{},{isFileDialogActive:!0});case"closeDialog":return ee(ee({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ee(ee({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ee(ee({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return ee({},vt);default:return e}}function vo(){}const ho=e=>{const{onDropFiles:t,children:o,maxSize:n,accept:a,disabled:i,name:r,multiple:p,maxFiles:_,files:l=[]}=e,d=x.useCallback(c=>{if(!p){t(c,r);return}const v=[...l,...c];if(_&&v.length>_){console.log(`Максимальное возможное количество файлов для загрузки - ${_}`),t(v.slice(0,_),r);return}t(v,r)},[l,_,p,r,t]);return s.jsx(Ve,{multiple:p,onDrop:d,maxSize:n,accept:a,children:({getRootProps:c,getInputProps:v})=>s.jsxs("div",{...c({}),style:{height:"100%"},children:[s.jsx("input",{...v({}),disabled:i,name:r}),o]})})},Se={spDropdown:"_spDropdown_1f4lf_43",spDropdown__labelText:"_spDropdown__labelText_1f4lf_54",spDropdown__tooltipContainer:"_spDropdown__tooltipContainer_1f4lf_62",spDropdown__dropdownList:"_spDropdown__dropdownList_1f4lf_67",spDropdown__dropdownListHeader:"_spDropdown__dropdownListHeader_1f4lf_73",spDropdown__dopdownListItem:"_spDropdown__dopdownListItem_1f4lf_80",spDropdown__dopdownListItem_textCenter:"_spDropdown__dopdownListItem_textCenter_1f4lf_91",spDropdown__downloadListItemDescription:"_spDropdown__downloadListItemDescription_1f4lf_94"},la=e=>{const{labelText:t="Выпадающий список",listName:o,dropdownList:n=[],dropdownPosition:a=re.BottomRight,classNameRoot:i}=e,r=m({[Se.spDropdown]:!0,...i&&{[i]:!0}}),p=m({[Se.spDropdown__labelText]:!0}),_=m({[Se.spDropdown__tooltipContainer]:!0}),l=m({[Se.spDropdown__dropdownList]:!0}),d=m({[Se.spDropdown__dropdownListHeader]:!0}),c=m({[Se.spDropdown__downloadListItemDescription]:!0}),[v,k]=x.useState(!1),S=()=>s.jsxs("div",{className:l,children:[o&&s.jsx("div",{className:d,children:o}),n.map((h,T)=>s.jsxs("div",{className:m({[Se.spDropdown__dopdownListItem]:!0,[Se.spDropdown__dopdownListItem_textCenter]:h.textCenter}),onClick:h.onClick,children:[h.name,h.description&&s.jsx("span",{className:c,children:h.description})]},T))]});return s.jsx(Oe,{hover:!1,triggerAction:()=>k(!0),actionOnClose:()=>k(!1),text:S(),position:a,noPadding:!0,isToggleClick:!0,isStopPropagationClickOnTrigger:!0,trigger:s.jsxs("div",{className:r,children:[s.jsx("div",{className:p,children:t}),s.jsx("div",{className:_,children:s.jsx(ce,{name:ie.SelectChevronDown,rotate:v?180:void 0})})]})})},bo={ellipsisTextWithTooltip:"_ellipsisTextWithTooltip_1nhiw_43",ellipsisTextWithTooltip__tooltip:"_ellipsisTextWithTooltip__tooltip_1nhiw_46"},wo=e=>{const{text:t,classNameRoot:o,classNameTooltipRoot:n,classNameTriggerTooltipRoot:a,classNameBaseTooltipContentRoot:i,classNameBaseTooltipRoot:r,...p}=e,_=x.useRef(null),[l,d]=x.useState(!1);x.useEffect(()=>{_.current&&d(_.current.scrollWidth>_.current.clientWidth)},[t]);const c=m({[bo.ellipsisTextWithTooltip]:!0,...o&&{[o]:!0}}),v=m({[bo.ellipsisTextWithTooltip__tooltip]:!0,...n&&{[n]:!0}}),k=m({...a&&{[a]:!0}});return s.jsx(Oe,{classNameTooltip:v,classNameTriggerTooltip:k,classNameBaseTooltipContentRoot:i,classNameBaseTooltipRoot:r,isVisibleTooltip:l,text:t,trigger:s.jsx(we,{...p,classNameRoot:c,isEllipsis:!0,ref:_,children:t})})},De={spForm:"_spForm_zefbj_43",spForm_fullWidth:"_spForm_fullWidth_zefbj_46",spForm_withSeparator:"_spForm_withSeparator_zefbj_49","spForm_addMargin--size-lg":"_spForm_addMargin--size-lg_zefbj_67","spForm_addMargin--size-md":"_spForm_addMargin--size-md_zefbj_75"},ca=e=>{const{size:t="lg",children:o,onSubmit:n,addMargin:a=!1,withSeparator:i=!1,fullWidth:r=!0,classNameRoot:p,..._}=e,l=m({[De.spForm]:!0,[De.spForm_fullWidth]:r,[De.spForm_addMargin]:a,[De[`spForm_addMargin--size-${t}`]]:a&&t,[De.spForm_withSeparator]:i,...p&&{[p]:!0}}),d=c=>{c.preventDefault(),n&&n()};return s.jsx("form",{..._,onSubmit:d,className:l,children:o})},Ye={spLabel:"_spLabel_g0hfy_43",spLabel__text:"_spLabel__text_g0hfy_52",spLabel__tooltip:"_spLabel__tooltip_g0hfy_62",spLabel__required:"_spLabel__required_g0hfy_67"},Ke=e=>{const{required:t,label:o,infoTooltipText:n,tooltipPosition:a,classNameRoot:i,classNameBaseTooltipRoot:r}=e,p=m({[Ye.spLabel]:!0,...i&&{[i]:!0}}),_=m({[Ye.spLabel__text]:!0}),l=m({[Ye.spLabel__required]:t}),d=m({[Ye.spLabel__tooltip]:!0});return s.jsxs("div",{className:p,children:[s.jsx("label",{className:_,children:o}),t&&s.jsx("div",{className:l,children:"*"}),n&&s.jsx("div",{className:d,children:s.jsx(Ne,{position:a,text:n,classNameBaseTooltipRoot:r})})]})},ke={spInput:"_spInput_etrn0_43",spInput_error:"_spInput_error_etrn0_48",spInput__control:"_spInput__control_etrn0_48",spInput__container:"_spInput__container_etrn0_55",spInput__control_filled:"_spInput__control_filled_etrn0_74",spInput__control_outlined:"_spInput__control_outlined_etrn0_78",spInput__control_disabled:"_spInput__control_disabled_etrn0_82",spInput__control_clearable:"_spInput__control_clearable_etrn0_86",spInput__clear:"_spInput__clear_etrn0_113",spInput__error:"_spInput__error_etrn0_122"},yo=x.forwardRef((e,t)=>{const{value:o,onChange:n,label:a,variant:i="outlined",disabled:r=!1,error:p,required:_,name:l,isClearable:d,pattern:c,onMouseEnter:v,infoTooltipText:k,tooltipPosition:S,isVisibleDefaultTitle:h=!0,placeholder:T="Введите...",classNameRoot:j,classNameError:q,classNameLabel:N,classNameBaseTooltipRoot:y,...f}=e,L=m({[ke.spInput]:!0,[ke.spInput_error]:!!p,...j&&{[j]:!0}}),F=m({[ke.spInput__container]:!0}),E=m({[ke.spInput__control]:!0,[ke.spInput__control_disabled]:r,[ke[`spInput__control_${i}`]]:i,[ke.spInput__control_clearable]:d}),Q=m({[ke.spInput__clear]:!0}),te=m({[ke.spInput__error]:!0,...q&&{[q]:!0}}),fe=m({...N&&{[N]:!0}}),ue=J=>{n(J,{name:l,value:""})},de=J=>{const{value:A,name:U}=J.target;c&&A&&!new RegExp(c).test(A)||n(J,{value:A,name:U})},Z=()=>s.jsx("input",{...f,placeholder:T,disabled:r,onChange:de,title:h?o:void 0,value:o,name:l,className:E,ref:t});return s.jsxs("div",{className:L,children:[a&&s.jsx(Ke,{classNameRoot:fe,tooltipPosition:S,required:_,label:a,infoTooltipText:k,classNameBaseTooltipRoot:y}),s.jsxs("div",{className:F,onMouseEnter:v,children:[Z(),d&&o&&!r&&s.jsx(ce,{onClick:ue,className:Q,name:ie.Trash})]}),p&&s.jsx("div",{className:te,children:p})]})});yo.displayName="Input";const ko=x.createContext({device:{isDesktop:!1,isMobile:!1,isTablet:!1}});var ht={};ht.match=xa,ht.parse=So;var da=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,_a=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,fa=/^(?:(min|max)-)?(.+)/,ua=/(em|rem|px|cm|mm|in|pt|pc)?$/,ma=/(dpi|dpcm|dppx)?$/;function xa(e,t){return So(e).some(function(o){var n=o.inverse,a=o.type==="all"||t.type===o.type;if(a&&n||!(a||n))return!1;var i=o.expressions.every(function(r){var p=r.feature,_=r.modifier,l=r.value,d=t[p];if(!d)return!1;switch(p){case"orientation":case"scan":return d.toLowerCase()===l.toLowerCase();case"width":case"height":case"device-width":case"device-height":l=To(l),d=To(d);break;case"resolution":l=Co(l),d=Co(d);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":l=Ao(l),d=Ao(d);break;case"grid":case"color":case"color-index":case"monochrome":l=parseInt(l,10)||1,d=parseInt(d,10)||0;break}switch(_){case"min":return d>=l;case"max":return d<=l;default:return d===l}});return i&&!n||!i&&n})}function So(e){return e.split(",").map(function(t){t=t.trim();var o=t.match(da),n=o[1],a=o[2],i=o[3]||"",r={};return r.inverse=!!n&&n.toLowerCase()==="not",r.type=a?a.toLowerCase():"all",i=i.match(/\([^\)]+\)/g)||[],r.expressions=i.map(function(p){var _=p.match(_a),l=_[1].toLowerCase().match(fa);return{modifier:l[1],feature:l[2],value:_[2]}}),r})}function Ao(e){var t=Number(e),o;return t||(o=e.match(/^(\d+)\s*\/\s*(\d+)$/),t=o[1]/o[2]),t}function Co(e){var t=parseFloat(e),o=String(e).match(ma)[1];switch(o){case"dpcm":return t/2.54;case"dppx":return t*96;default:return t}}function To(e){var t=parseFloat(e),o=String(e).match(ua)[1];switch(o){case"em":return t*16;case"rem":return t*16;case"cm":return t*96/2.54;case"mm":return t*96/2.54/10;case"in":return t*96;case"pt":return t*72;case"pc":return t*72/12;default:return t}}var ga=ht.match,zo=typeof window<"u"?window.matchMedia:null;function va(e,t,o){var n=this,a;zo&&!o&&(a=zo.call(window,e)),a?(this.matches=a.matches,this.media=a.media,a.addListener(p)):(this.matches=ga(e,t),this.media=e),this.addListener=i,this.removeListener=r,this.dispose=_;function i(l){a&&a.addListener(l)}function r(l){a&&a.removeListener(l)}function p(l){n.matches=l.matches,n.media=l.media}function _(){a&&a.removeListener(p)}}function ha(e,t,o){return new va(e,t,o)}var ba=ha;const wa=Mt(ba);var ya=/[A-Z]/g,ka=/^ms-/,bt={};function Sa(e){return"-"+e.toLowerCase()}function Lo(e){if(bt.hasOwnProperty(e))return bt[e];var t=e.replace(ya,Sa);return bt[e]=ka.test(t)?"-"+t:t}function Aa(e,t){if(e===t)return!0;if(!e||!t)return!1;const o=Object.keys(e),n=Object.keys(t),a=o.length;if(n.length!==a)return!1;for(let i=0;i<a;i++){const r=o[i];if(e[r]!==t[r]||!Object.prototype.hasOwnProperty.call(t,r))return!1}return!0}const le=C.oneOfType([C.string,C.number]),Eo={all:C.bool,grid:C.bool,aural:C.bool,braille:C.bool,handheld:C.bool,print:C.bool,projection:C.bool,screen:C.bool,tty:C.bool,tv:C.bool,embossed:C.bool},Ca={orientation:C.oneOf(["portrait","landscape"]),scan:C.oneOf(["progressive","interlace"]),aspectRatio:C.string,deviceAspectRatio:C.string,height:le,deviceHeight:le,width:le,deviceWidth:le,color:C.bool,colorIndex:C.bool,monochrome:C.bool,resolution:le,type:Object.keys(Eo)},{type:Pr,...Ta}=Ca,za={minAspectRatio:C.string,maxAspectRatio:C.string,minDeviceAspectRatio:C.string,maxDeviceAspectRatio:C.string,minHeight:le,maxHeight:le,minDeviceHeight:le,maxDeviceHeight:le,minWidth:le,maxWidth:le,minDeviceWidth:le,maxDeviceWidth:le,minColor:C.number,maxColor:C.number,minColorIndex:C.number,maxColorIndex:C.number,minMonochrome:C.number,maxMonochrome:C.number,minResolution:le,maxResolution:le,...Ta};var La={all:{...Eo,...za}};const Ea=e=>`not ${e}`,Ba=(e,t)=>{const o=Lo(e);return typeof t=="number"&&(t=`${t}px`),t===!0?o:t===!1?Ea(o):`(${o}: ${t})`},Ia=e=>e.join(" and "),ja=e=>{const t=[];return Object.keys(La.all).forEach(o=>{const n=e[o];n!=null&&t.push(Ba(o,n))}),Ia(t)},Na=x.createContext(void 0),Fa=e=>e.query||ja(e),Bo=e=>e?Object.keys(e).reduce((o,n)=>(o[Lo(n)]=e[n],o),{}):void 0,Io=()=>{const e=x.useRef(!1);return x.useEffect(()=>{e.current=!0},[]),e.current},Da=e=>{const t=x.useContext(Na),o=()=>Bo(e)||Bo(t),[n,a]=x.useState(o);return x.useEffect(()=>{const i=o();Aa(n,i)||a(i)},[e,t]),n},Wa=e=>{const t=()=>Fa(e),[o,n]=x.useState(t);return x.useEffect(()=>{const a=t();o!==a&&n(a)},[e]),o},Ha=(e,t)=>{const o=()=>wa(e,t||{},!!t),[n,a]=x.useState(o),i=Io();return x.useEffect(()=>{if(i){const r=o();return a(r),()=>{r&&r.dispose()}}},[e,t]),n},Ma=e=>{const[t,o]=x.useState(e.matches);return x.useEffect(()=>{const n=a=>{o(a.matches)};return e.addListener(n),o(e.matches),()=>{e.removeListener(n)}},[e]),t},wt=(e,t,o)=>{const n=Da(t),a=Wa(e);if(!a)throw new Error("Invalid or missing MediaQuery!");const i=Ha(a,n),r=Ma(i);return Io(),x.useEffect(()=>{},[r]),x.useEffect(()=>()=>{i&&i.dispose()},[]),r},Oa=e=>{const{desktop:t,tablet:o,mobile:n}=e,a=wt(t),i=wt(o),r=wt(n);return{device:{isDesktop:a,isTablet:i,isMobile:r}}},Pa=e=>{const{breakpoints:t,children:o}=e,{device:n}=Oa(t);return s.jsx(ko.Provider,{value:{device:n},children:o})},jo=2e3,Ga=e=>{const{targetValue:t,duration:o=jo,doneValue:n}=e,[a,i]=x.useState(t),r=x.useRef(),p=x.useRef(0),_=x.useRef(),l=x.useRef(t);return x.useEffect(()=>{if(l.current=t,t===p.current)return;r.current&&cancelAnimationFrame(r.current),p.current=a,_.current=performance.now();const d=c=>{const v=t===n?jo:o,k=c-(_.current||c),S=Math.min(k/v,1),h=S<.5?4*S*S*S:1-Math.pow(-2*S+2,3)/2,T=p.current+(l.current-p.current)*h,j=Math.max(0,Math.floor(T));i(j),S<1&&(r.current=requestAnimationFrame(d))};return r.current=requestAnimationFrame(d),()=>{r.current&&cancelAnimationFrame(r.current)}},[t,o,n]),a},Te={progressWrapper:"_progressWrapper_xn9s0_44",progressWrapper_loading:"_progressWrapper_loading_xn9s0_47",progressWrapper__childrenWrapper:"_progressWrapper__childrenWrapper_xn9s0_52",progressWrapper__childrenWrapper_loading:"_progressWrapper__childrenWrapper_loading_xn9s0_58","progressWrapper__childrenWrapper--animated-pulse":"_progressWrapper__childrenWrapper--animated-pulse_xn9s0_58",pulse:"_pulse_xn9s0_1","progressWrapper__childrenWrapper--animated-backgroundProgress":"_progressWrapper__childrenWrapper--animated-backgroundProgress_xn9s0_61",progressWrapper__progressBadge:"_progressWrapper__progressBadge_xn9s0_64",progressWrapper__progressBadge_loading:"_progressWrapper__progressBadge_loading_xn9s0_75"},Ua=e=>{const{value:t,classNameRoot:o,classNameProgressBadgeRoot:n,duration:a=2e3,children:i,doneValue:r=100,animationVariant:p="backgroundProgress"}=e,[_,l]=x.useState(!1),d=x.useRef(),c=Ga({targetValue:t,duration:a,doneValue:r});x.useEffect(()=>(c===r?d.current=window.setTimeout(()=>{l(!1)},500):(l(!0),d.current&&window.clearTimeout(d.current)),()=>{d.current&&window.clearTimeout(d.current)}),[c,r]);const v=m({[Te.progressWrapper]:!0,[Te.progressWrapper_loading]:_,...o&&{[o]:!0}}),k=m({[Te.progressWrapper__progressBadge]:!0,[Te.progressWrapper__progressBadge_loading]:_,...n&&{[n]:!0}}),S=m({[Te.progressWrapper__childrenWrapper]:!0,[Te[`progressWrapper__childrenWrapper--animated-${p}`]]:p,[Te.progressWrapper__childrenWrapper_loading]:_}),h={"--progress":`${c/r*100}%`};return s.jsxs("div",{className:v,children:[s.jsx("div",{className:S,style:p==="backgroundProgress"?h:void 0,children:i}),_&&s.jsxs(we,{classNameRoot:k,children:[c,"%"]})]})},$a=180,_e={spSelect:"_spSelect_140u6_43",spSelect_error:"_spSelect_error_140u6_48",spSelect__control:"_spSelect__control_140u6_48",spSelect__value_empty:"_spSelect__value_empty_140u6_52",spSelect__icon:"_spSelect__icon_140u6_55",spSelect__container:"_spSelect__container_140u6_58",spSelect__control_filled:"_spSelect__control_filled_140u6_78",spSelect__control_outlined:"_spSelect__control_outlined_140u6_82",spSelect__control_disabled:"_spSelect__control_disabled_140u6_107",spSelect__value:"_spSelect__value_140u6_52",spSelect__list:"_spSelect__list_140u6_138",spSelect__list_scrollable:"_spSelect__list_scrollable_140u6_145",spSelect__option:"_spSelect__option_140u6_161",spSelect__error:"_spSelect__error_140u6_179"},Ra=e=>{const{options:t,placeholder:o="Выберите из списка...",value:n,name:a,variant:i="outlined",onChange:r,onMouseEnter:p,error:_,label:l,infoTooltipText:d,tooltipPosition:c,disabled:v,required:k,maxHeightList:S=$a,isVisibleDefaultTitle:h=!0,isScrollableList:T=!1,classNameRoot:j,classNameError:q,classNameLabel:N,classNameBaseTooltipRoot:y}=e,[f,L]=x.useState(!1),F=x.useRef(null);Nt([F],()=>{L(!1)},f);const E=t.find(u=>u.value===n),Q=(u,w)=>{r(u,{value:w,name:a}),L(!1)},te=()=>{v||L(!f)},fe=m({[_e.spSelect]:!0,[_e.spSelect_error]:!!_,...j&&{[j]:!0}}),ue=m({[_e.spSelect__container]:!0}),de=m({[_e.spSelect__control]:!0,[_e[`spSelect__control_${i}`]]:i,[_e.spSelect__control_disabled]:v}),Z=m({[_e.spSelect__value]:!0,[_e.spSelect__value_empty]:!E}),J=m({[_e.spSelect__icon]:!0}),A=m({[_e.spSelect__list]:!0,[_e.spSelect__list_scrollable]:T}),U=m({...N&&{[N]:!0}}),X=m({[_e.spSelect__error]:!0,...q&&{[q]:!0}}),P=()=>s.jsxs("div",{tabIndex:v?-1:0,title:h?n:void 0,className:de,onClick:te,children:[s.jsx("div",{className:Z,children:(E==null?void 0:E.label)||o}),s.jsx(ce,{name:ie.SelectChevronDown,rotate:f?180:void 0,className:J})]});return s.jsxs("div",{className:fe,ref:F,children:[l&&s.jsx(Ke,{classNameRoot:U,tooltipPosition:c,required:k,label:l,infoTooltipText:d,classNameBaseTooltipRoot:y}),s.jsxs("div",{className:ue,onMouseEnter:p,children:[P(),f&&s.jsx("div",{className:A,style:T?{maxHeight:`${S}px`}:{},children:t.map(u=>{const w=u.value===n;return s.jsxs("div",{className:m({[_e.spSelect__option]:!0}),onClick:W=>Q(W,u.value),children:[u.label,w&&s.jsx(ce,{name:ie.Check,className:J})]},u.value)})})]}),_&&s.jsx("div",{className:X,children:_})]})},qa={skeleton:"_skeleton_c18an_44"},Va=e=>{const{width:t="100%",height:o="1rem",circle:n=!1,classNameRoot:a="",style:i={}}=e,r={width:t,height:o,borderRadius:n?"50%":"0",...i};return s.jsx("div",{style:r,className:m(a,qa.skeleton)})},No=e=>e==null||e===""?!0:typeof e!="string"&&typeof e.toString!="function"?!1:e.toString().replace(/\s/g,"").length<1,ve={spTable:"_spTable_1vuaj_43",spTable__tdContentCopyIcon:"_spTable__tdContentCopyIcon_1vuaj_62",spTable__tdContent:"_spTable__tdContent_1vuaj_62",spTable__tdColorContent:"_spTable__tdColorContent_1vuaj_72",spTable__tdContentCopyIcon_copied:"_spTable__tdContentCopyIcon_copied_1vuaj_85",spTable__emptyPage:"_spTable__emptyPage_1vuaj_89",spStringsGroup:"_spStringsGroup_1vuaj_105",spStringsGroup__groupItem:"_spStringsGroup__groupItem_1vuaj_119",spStringsGroup__groupItemHeader:"_spStringsGroup__groupItemHeader_1vuaj_134",spStringsGroup__groupItemContent:"_spStringsGroup__groupItemContent_1vuaj_138",spStringsGroup__groupItemContentCopyIcon:"_spStringsGroup__groupItemContentCopyIcon_1vuaj_144",spStringsGroup__groupItemContentCopyIcon_copied:"_spStringsGroup__groupItemContentCopyIcon_copied_1vuaj_151"},Ya=e=>{const{columns:t,data:o,isNotTableOnNotDesktop:n=!1,isDesktop:a=!0,classNameRoot:i}=e,r=t.map(y=>o?{...y,isVisible:o.some(f=>!!f[y.key])}:y).filter(y=>y.isVisible),p=m({[ve.spTable]:!0,...i&&{[i]:!0}}),_=m({[ve.spTable__tdContent]:!0}),l=m({[ve.spTable__tdColorContent]:!0}),d=m({[ve.spTable__emptyPage]:!0}),[c,v]=x.useState(null),k=y=>{const{text:f,rowIndex:L,colIndex:F}=y;(c==null?void 0:c.rowIndex)===L&&(c==null?void 0:c.colIndex)===F||navigator.clipboard.writeText(f).then(()=>{v({rowIndex:L,colIndex:F})}).catch(E=>{console.error("Ошибка при копировании:",E)})},S=()=>{v(null)},h=()=>s.jsx("div",{className:d,children:"Данные отсутствуют"}),T=({row:y,col:f})=>{const L=y[f.key];if(!L)return null;const[F,E]=L.split(/\s*\{\{|}}\s*/).filter(Boolean);return s.jsxs("span",{children:[F,E&&s.jsx("span",{className:l,children:` ${E}`})]})},j=()=>o&&Array.isArray(o)&&o.length>0?s.jsxs("table",{className:p,children:[s.jsx("colgroup",{children:r.map((y,f,L)=>s.jsx("col",{style:{width:`calc(100%/${L.length})`}},f))}),s.jsx("thead",{children:s.jsx("tr",{children:r.map((y,f)=>s.jsx("th",{children:y.title},f))})}),s.jsx("tbody",{children:o.map((y,f)=>y?s.jsx("tr",{children:r.map((L,F)=>{const E=(c==null?void 0:c.rowIndex)===f&&(c==null?void 0:c.colIndex)===F;return s.jsx("td",{onMouseLeave:E?S:void 0,children:s.jsxs("div",{className:_,children:[s.jsx("span",{children:L.isColorContentsCurlyBrackets?T({row:y,col:L}):y[L.key]}),!No(y[L.key])&&L.isBeCopiedValue&&s.jsx(ce,{className:m({[ve.spTable__tdContentCopyIcon]:!0,[ve.spTable__tdContentCopyIcon_copied]:E}),name:E?ie.Check:ie.Copy,onClick:()=>{const Q=y[L.key];if(!Q)return null;k({text:Q,rowIndex:f,colIndex:F})}})]})},`${f}:${F}`)})},f):null)})]}):h(),q=()=>o&&Array.isArray(o)&&o.length>0?s.jsx("div",{className:m({[ve.spStringsGroup]:!0}),children:o.map((y,f)=>y?s.jsx("div",{children:r.map((L,F)=>{if(No(y[L.key]))return null;const E=(c==null?void 0:c.rowIndex)===f&&(c==null?void 0:c.colIndex)===F;return s.jsxs("div",{className:m({[ve.spStringsGroup__groupItem]:!0}),onMouseLeave:E?S:void 0,children:[s.jsx("div",{className:m({[ve.spStringsGroup__groupItemHeader]:!0}),children:L.title}),s.jsxs("div",{className:m({[ve.spStringsGroup__groupItemContent]:!0}),children:[s.jsx("span",{children:L.isColorContentsCurlyBrackets?T({row:y,col:L}):y[L.key]}),L.isBeCopiedValue&&s.jsx(ce,{className:m({[ve.spStringsGroup__groupItemContentCopyIcon]:!0,[ve.spStringsGroup__groupItemContentCopyIcon_copied]:E}),name:E?ie.Check:ie.Copy,onClick:()=>{const Q=y[L.key];if(!Q)return null;k({text:Q,rowIndex:f,colIndex:F})}})]})]},F)})},f):null)}):h();return n?a?j():q():j()},ze={spTabs:"_spTabs_1citb_43",spTabs_separated:"_spTabs_separated_1citb_48","spTabs--size-md":"_spTabs--size-md_1citb_48",spTabs__tabElement:"_spTabs__tabElement_1citb_48","spTabs--size-lg":"_spTabs--size-lg_1citb_51","spTabs--variant-contained":"_spTabs--variant-contained_1citb_54",spTabs__tabElement_active:"_spTabs__tabElement_active_1citb_83",spTabs__triggerTooltip:"_spTabs__triggerTooltip_1citb_90","spTabs--variant-filled":"_spTabs--variant-filled_1citb_93"},Ka=e=>{const{panes:t,isSeparated:o=!1,classNameRoot:n,classNameBaseTooltipRoot:a,variant:i="contained",size:r="md"}=e,p=m({[ze.spTabs]:!0,[ze.spTabs_separated]:o,[ze[`spTabs--variant-${i}`]]:i,[ze[`spTabs--size-${r}`]]:r,...n&&{[n]:!0}}),_=m({[ze.spTabs__triggerTooltip]:!0}),l=()=>{switch(r){case"md":return"p2";case"lg":return"p1"}};return s.jsx("div",{className:p,children:t.map((d,c)=>{const{name:v,active:k,onClick:S,infoTooltipText:h}=d;return s.jsxs("div",{className:m({[ze.spTabs__tabElement]:!0,[ze.spTabs__tabElement_active]:k}),onClick:S,children:[s.jsx(we,{type:l(),children:v}),!!h&&s.jsx(Ne,{classNameTriggerTooltip:_,text:h,classNameBaseTooltipRoot:a})]},d.key||c)})})},Xa={spTextWithLabel:"_spTextWithLabel_1dr7p_1"},Za=e=>{const{children:t,label:o,style:n,...a}=e;return s.jsxs("div",{className:Xa.spTextWithLabel,style:{...n},children:[s.jsx(Ke,{label:o}),s.jsx(we,{...a,children:t})]})},se={spUploadFiles:"_spUploadFiles_1il4x_43",spUploadFiles_error:"_spUploadFiles_error_1il4x_49",spUploadFiles__control:"_spUploadFiles__control_1il4x_49","spUploadFiles--variant-input":"_spUploadFiles--variant-input_1il4x_53",spUploadFiles__placeholder:"_spUploadFiles__placeholder_1il4x_57","spUploadFiles--variant-dropzone":"_spUploadFiles--variant-dropzone_1il4x_65",spUploadFiles_multiple:"_spUploadFiles_multiple_1il4x_65",spUploadFiles__fileName:"_spUploadFiles__fileName_1il4x_84",spUploadFiles_fileUploaded:"_spUploadFiles_fileUploaded_1il4x_116",spUploadFiles_disabled:"_spUploadFiles_disabled_1il4x_116",spUploadFiles__fileNamesList:"_spUploadFiles__fileNamesList_1il4x_127",spUploadFiles__fileNamesListItem:"_spUploadFiles__fileNamesListItem_1il4x_136",spUploadFiles__fileNamesListItem__triggerTooltip:"_spUploadFiles__fileNamesListItem__triggerTooltip_1il4x_155",spUploadFiles__fileNamesListItemDelete:"_spUploadFiles__fileNamesListItemDelete_1il4x_158",spUploadFiles__tooltipWrapper:"_spUploadFiles__tooltipWrapper_1il4x_173",spUploadFiles__tooltip:"_spUploadFiles__tooltip_1il4x_173",spUploadFiles__delete:"_spUploadFiles__delete_1il4x_179",spUploadFiles__error:"_spUploadFiles__error_1il4x_187"},Qa=e=>{const{placeholder:t="Загрузите файл",variant:o="input",name:n,onDropFiles:a,maxSize:i,accept:r,disabled:p,multiple:_,maxFiles:l,files:d=[],infoTooltipText:c,tooltipPosition:v=re.TopRight,classNameRoot:k,error:S}=e,h=d.map(F=>F.name),T=(h==null?void 0:h.length)>0,j=o==="input",q=m({[se.spUploadFiles]:!0,[se[`spUploadFiles--variant-${o}`]]:o,[se.spUploadFiles_error]:!!S,[se.spUploadFiles_disabled]:p,[se.spUploadFiles_multiple]:_,[se.spUploadFiles_fileUploaded]:T,...k&&{[k]:!0}}),N=F=>{const E=[...d],Q=E.findIndex(te=>te.name===F);E.splice(Q,1),a(E,n)},y=F=>{F.stopPropagation(),a([],n)},f=()=>_?s.jsx("ul",{className:se.spUploadFiles__fileNamesList,children:h.map((F,E)=>s.jsxs("li",{className:se.spUploadFiles__fileNamesListItem,onClick:Q=>{Q.stopPropagation(),N(F)},children:[s.jsx(wo,{type:"p2",text:F,classNameTriggerTooltipRoot:se.spUploadFiles__fileNamesListItem__triggerTooltip}),s.jsx("div",{className:se.spUploadFiles__fileNamesListItemDelete,children:s.jsx(ce,{name:ie.Trash})})]},E))}):s.jsx(we,{isEllipsis:!0,classNameRoot:se.spUploadFiles__fileName,children:h[0]}),L=()=>s.jsxs(s.Fragment,{children:[T?f():s.jsx(we,{classNameRoot:se.spUploadFiles__placeholder,children:t}),T&&(j||!_)?s.jsx("div",{className:se.spUploadFiles__delete,onClick:y,children:s.jsx(ce,{name:ie.Close})}):j&&c&&s.jsx(Ne,{classNameTooltip:se.spUploadFiles__tooltipWrapper,position:v,text:c,classNameTriggerTooltip:se.spUploadFiles__tooltip})]});return s.jsx(ho,{name:n,files:d,multiple:_,maxSize:i,maxFiles:l,accept:r,onDropFiles:a,disabled:p||T,children:s.jsxs("div",{className:q,children:[s.jsxs("div",{className:se.spUploadFiles__control,children:[j&&s.jsx(ce,{name:T?ie.Check:ie.Upload}),L()]}),S&&s.jsx("div",{className:se.spUploadFiles__error,children:S})]})})};H.Accordion=en,H.ApplyButtons=jt,H.BaseTooltip=tt,H.Button=Me,H.Checkbox=tn,H.Confirm=nn,H.ContextMenu=an,H.DefaultDropzone=ho,H.Dropdown=la,H.EIconName=ie,H.ETooltipPosition=re,H.EllipsisTextWithTooltip=wo,H.Form=ca,H.Icon=ce,H.InfoTooltip=Ne,H.Input=yo,H.Label=Ke,H.Layer=Wt,H.MediaContext=ko,H.MediaContextProvider=Pa,H.Modal=Ht,H.Portal=ot,H.ProgressWrapper=Ua,H.Select=Ra,H.Skeleton=Va,H.Spinner=It,H.Table=Ya,H.Tabs=Ka,H.Text=we,H.TextWithLabel=Za,H.Tooltip=Oe,H.UploadFiles=Qa,H.useModal=on,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})});
|