react-declarative
Version:
A React form builder which interacts with a JSON endpoint to generate nested 12-column grids with input fields and automatic state management in a declarative style. Endpoint is typed by TypeScript guards (IntelliSense available). This tool is based on ma
1 lines • 769 kB
JavaScript
import{__read as e,__awaiter as t,__generator as n,__spreadArray as r,__asyncGenerator as o,__await as i,__assign as a,__rest as l,__values as c,__extends as u,__makeTemplateObject as s,__asyncValues as d}from"tslib";import*as f from"react";import m,{createContext as p,useMemo as h,useContext as v,useState as g,useRef as b,useCallback as y,useEffect as w,useLayoutEffect as E,forwardRef as x,memo as C,Fragment as k,createElement as S,cloneElement as L,lazy as N,Suspense as I}from"react";import{useTheme as M,createTheme as R,ThemeProvider as P,alpha as A}from"@mui/material/styles";import{createMakeAndWithStyles as T,keyframes as D}from"tss-react";import j from"@mui/material/Box";import O from"@mui/material/CircularProgress";import F from"@mui/material/ListItemIcon";import _ from"@mui/material/Typography";import B from"@mui/material/MenuItem";import H from"@mui/material/Divider";import W from"@mui/material/Menu";import*as z from"react-dom";import{flushSync as V}from"react-dom";import{v4 as Y}from"uuid";import U from"@mui/material/Grid";import{Grid as q,alpha as $,Typography as X,Divider as G,useMediaQuery as K,Accordion as Q,AccordionSummary as J,AccordionDetails as Z,Paper as ee,Box as te,debounce as ne,useTheme as re,lighten as oe,Tooltip as ie,darken as ae,Button as le,List as ce,ListItem as ue,ListItemIcon as se,TextField as de,Avatar as fe,Grow as me,createTheme as pe,ThemeProvider as he}from"@mui/material";import ve from"@mui/material/Checkbox";import ge from"@mui/material/FormControlLabel";import be from"@mui/material/FormGroup";import ye from"@mui/material/Button";import we from"@mui/material/Stack";import Ee from"@mui/material/Autocomplete";import xe from"@mui/material/TextField";import Ce from"@mui/material/Radio";import ke from"@mui/material/Paper";import Se from"@mui/material/Modal";import Le from"@mui/material/InputAdornment";import Ne from"@mui/material/IconButton";import Ie from"@mui/material/List";import Me from"@mui/material/ListItemButton";import Re from"@mui/icons-material/ArrowDropUp";import Pe from"@mui/icons-material/ArrowDropDown";import Ae from"@mui/icons-material/MoreVert";import Te from"@mui/material/Fab";import De from"@mui/material/LinearProgress";import je from"@mui/material/Backdrop";import Oe from"@mui/material/ListItemText";import Fe from"@mui/icons-material/Close";import _e from"@mui/icons-material/RadioButtonChecked";import Be from"@mui/icons-material/RadioButtonUnchecked";import He from"@mui/material/Chip";import We from"@mui/icons-material/CheckBox";import ze from"@mui/icons-material/CheckBoxOutlineBlank";import Ve from"@mui/material/RadioGroup";import Ye from"@mui/material/Rating";import Ue from"dayjs";export{default as dayjs}from"dayjs";import qe from"@mui/material/Popover";import $e from"@mui/material/Toolbar";import Xe from"@mui/icons-material/KeyboardArrowLeft";import Ge from"@mui/icons-material/KeyboardArrowRight";import Ke from"@mui/icons-material/CalendarTodayOutlined";import Qe from"@mui/icons-material/ArrowForward";import Je from"@mui/icons-material/AlarmOutlined";import Ze from"@mui/material/Switch";import et from"@mui/material/Slider";import tt from"@mui/material/ListItem";import nt from"@mui/icons-material/Clear";import rt from"@mui/material/ListSubheader";import ot from"@mui/icons-material/Search";import it from"@mui/icons-material/ExpandMore";import at from"@mui/material/Tab";import lt from"@mui/material/Tabs";import{createMemoryHistory as ct,createBrowserHistory as ut}from"history";import st from"@mui/material/Dialog";import dt from"@mui/material/DialogContent";import ft from"@mui/material/DialogActions";import mt from"@mui/material/DialogTitle";import pt from"@mui/material/Badge";import ht from"@mui/icons-material/Fullscreen";import vt from"@mui/material/Table";import gt from"@mui/material/TableBody";import bt from"@mui/material/TableHead";import yt from"@mui/material/TableContainer";import wt from"@mui/material/TableRow";import Et from"@mui/material/TableCell";import xt from"@mui/material/TablePagination";import Ct from"@mui/material/PaginationItem";import kt from"@mui/material/Pagination";import St from"@mui/icons-material/ArrowUpward";import Lt from"@mui/icons-material/ArrowDownward";import Nt from"@mui/material/Tooltip";import It from"@mui/material/TableSortLabel";import Mt from"@mui/icons-material/Add";import Rt from"@mui/icons-material/CleaningServicesOutlined";import Pt from"@mui/icons-material/Refresh";import At from"@mui/icons-material/Sort";import Tt from"@mui/icons-material/Settings";import Dt from"@mui/material/Collapse";import jt from"@mui/icons-material/ExpandLess";import Ot from"@mui/icons-material/NotInterested";import Ft from"@mui/icons-material/FilterList";import{pathToRegexp as _t,compile as Bt,match as Ht}from"path-to-regexp";import{red as Wt}from"@mui/material/colors";import zt from"@mui/material/AppBar";import Vt from"@mui/material/CssBaseline";import Yt from"@mui/material/Drawer";import Ut from"@mui/icons-material/Menu";import qt from"@mui/material/ButtonBase";import $t from"@mui/icons-material/OutlinedFlag";import Xt from"@mui/material/SwipeableDrawer";import Gt from"@mui/material/InputBase";import Kt from"@mui/material/Breadcrumbs";import Qt from"@mui/material/Link";import Jt from"@mui/material/ButtonGroup";import Zt from"@mui/icons-material/Palette";import en from"@mui/icons-material/Remove";import tn from"@mui/material/Snackbar";import nn from"@mui/icons-material/KeyboardArrowUp";import rn from"@mui/material/Box/Box";import on from"@mui/material/Alert";import an from"@mui/icons-material/CloudUpload";import ln from"@mui/icons-material/Delete";import cn from"@mui/material/Step";import un from"@mui/material/StepLabel";import sn from"@mui/material/Stepper";import dn from"dayjs/plugin/isToday";import fn from"dayjs/plugin/localeData";import mn from"dayjs/locale/en-gb";import pn from"dayjs/plugin/utc";import hn from"@mui/icons-material/ArrowBackIos";import vn from"@mui/icons-material/ArrowForwardIos";import gn from"dayjs/plugin/timezone";import bn from"@mui/icons-material/Send";import yn from"@mui/icons-material/Stop";import wn from"@mui/icons-material/KeyboardVoice";import En from"@mui/icons-material/AttachFile";import xn from"@mui/icons-material/Folder";import Cn from"@mui/icons-material/ContentCopy";import kn from"@mui/icons-material/AccessTime";import{fileTypeFromBlob as Sn}from"file-type/core";import Ln from"@mui/material/Avatar";import Nn from"@mui/material/ListItemAvatar";import In from"@mui/icons-material/CloudSync";globalThis.window||(globalThis.window=globalThis);var Mn,Rn=p(null),Pn=function(e){var t=e.children,n=e.apiRef,r=void 0===n?null:n,o=e.reloadSubject,i=void 0===o?null:o,a=e.changeSubject,l=void 0===a?null:a,c=e.updateSubject,u=void 0===c?null:c,s=h(function(){return{apiRef:r,reloadSubject:i,changeSubject:l,updateSubject:u}},[r,i,l,u]);return f.createElement(Rn.Provider,{value:s},t)},An=T({useTheme:M}).makeStyles,Tn=function(e){var t=e.children,n=M(),r=h(function(){return R(n)},[n]);return f.createElement(P,{theme:r},t)};!function(e){e.Layout="custom-layout",e.Switch="switch-field",e.YesNo="yesno-field",e.Line="line-field",e.File="file-field",e.Group="group-layout",e.Paper="paper-layout",e.Outline="outline-layout",e.Expansion="expansion-layout",e.Radio="radio-field",e.Checkbox="checkbox-field",e.Text="text-field",e.Date="date-field",e.Time="time-field",e.Progress="progress-field",e.Component="component-field",e.Slider="slider-field",e.Combo="combo-field",e.Choose="choose-field",e.Tree="tree-field",e.Dict="dict-field",e.Init="init-field",e.Phony="phony-field",e.Button="button-field",e.Icon="icon-field",e.Complete="complete-field",e.Items="items-field",e.Rating="rating-field",e.Typography="typography-field",e.Fragment="fragment-layout",e.Div="div-layout",e.Box="box-layout",e.Tabs="tabs-layout",e.Hero="hero-layout",e.Center="center-layout",e.Stretch="stretch-layout",e.Condition="condition-layout"}(Mn||(Mn={})),Object.entries(Mn).forEach(function(t){var n=e(t,2),r=n[0],o=n[1];Mn[r]=Symbol.for(o)});var Dn=Mn,jn=new Set([Dn.Group,Dn.Box,Dn.Paper,Dn.Outline,Dn.Expansion,Dn.Div,Dn.Tabs,Dn.Hero,Dn.Fragment,Dn.Center,Dn.Stretch,Dn.Condition,Dn.Layout]),On=function(e){return jn.has(e)},Fn=function(e){var t=e.type;return e.name&&!jn.has(t)},_n=function(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.prototype},Bn=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(Array.isArray(e[n])?t[n]=e[n].slice(0):_n(e[n])?t[n]=Bn(e[n]):t[n]=e[n]);return t},Hn=function(t,n,r){var o=(Array.isArray(n)?n:n.split(".").filter(function(e){return e})).flatMap(function(e){return"string"==typeof e?e.split("."):e}),i=o.slice(0,o.length-1).reduce(function(e,t){return e&&e[t]},t),a=e(o.reverse(),1)[0];try{return i[a]=r,!0}catch(e){return!1}},Wn=function(e,t){return(Array.isArray(t)?t:t.split(".").filter(function(e){return e})).flatMap(function(e){return"string"==typeof e?e.split("."):e}).reduce(function(e,t){return e&&e[t]},e)},zn=function(e,t){if(e===t)return!0;if(_n(e)&&_n(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!zn(e[n],t[n]))return!1;return!0}return!1};var Vn,Yn=function(){function o(){var o=this;this._events={},this.getListeners=function(e){return o._events[e]||[]},this.subscribe=function(e,t){!o._events[e]&&(o._events[e]=[]),o._events[e].push(t)},this.unsubscribe=function(e,t){!o._events[e]&&(o._events[e]=[]),o._events[e]=o._events[e].filter(function(e){return t!==e})},this.unsubscribeAll=function(){o._events={}},this.once=function(i,a){var l=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return t(o,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,a.apply(void 0,r([],e(c),!1))];case 1:return t.sent(),this.unsubscribe(i,l),[2]}})})};return o.subscribe(i,l),function(){o.unsubscribe(i,l)}},this.emit=function(i){for(var a=[],l=1;l<arguments.length;l++)a[l-1]=arguments[l];return t(o,void 0,void 0,function(){var t,o;return n(this,function(n){switch(n.label){case 0:t=r([],e(this._events&&this._events[i]||[]),!1),o=0,n.label=1;case 1:return o===t.length?[3,4]:[4,t[o].apply(t,r([],e(a),!1))];case 2:n.sent(),n.label=3;case 3:return o++,[3,1];case 4:return[2]}})})}}return Object.defineProperty(o.prototype,"hasListeners",{get:function(){return e=this._events,!(0===Object.getOwnPropertySymbols(e).length&&0===Object.getOwnPropertyNames(e).length);var e},enumerable:!1,configurable:!0}),o}(),Un=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(t,n){return function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return t(n.apply(void 0,r([],e(o),!1)))}})},qn=function(e){return void 0===e&&(e=1e3),new Promise(function(t){return setTimeout(function(){return t()},e)})},$n=Symbol("cancelable-canceled"),Xn=function(t){var n,o=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return new Promise(function(i,a){var l=!1;n&&n(),n=function(){l=!0,i($n)};var c=t.apply(void 0,r([],e(o),!1));c.then(function(e){l||i(e)}),c.catch(function(e){l||a(e)})})};return o.cancel=function(){n&&n()},o},Gn=function(o){var i=Promise.resolve(),a=void 0,l=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];var s=!1,d=function(){s=!0};return a=a?Un(a,d):d,i=i.then(function(){return t(void 0,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return s?[3,2]:[4,o.apply(void 0,r([],e(c),!1))];case 1:return[2,t.sent()];case 2:return[2,$n]}})})}).finally(function(){l.clear(),a=void 0}),i};return l.clear=function(){i=Promise.resolve(),a=void 0},l.cancel=function(){i=Promise.resolve(),a&&a(),a=void 0},l},Kn=function(e){return requestAnimationFrame(e)},Qn=function(e){return cancelAnimationFrame(e)},Jn=function(t,n){var o;void 0===n&&(n=1e3);var i=null,a=n?setTimeout:Kn,l=n?clearTimeout:Qn,c=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];null!==o&&l(o);var s=function(){i=null,o=null,t.apply(void 0,r([],e(c),!1))};i=s,o=a(s,n)};return c.clear=function(){null!==o&&l(o),o=null,i=null},c.flush=function(){null!==o&&l(o),i&&i(),o=null,i=null},c.pending=function(){return!!i},c},Zn=Symbol("observer-subscribe"),er=Symbol("observer-connect"),tr=Symbol("observer-disconnect"),nr=Symbol("observer-connect-listen"),rr=Symbol("observer-disconnect-listen"),or=function(){function e(r){var a=this;this.dispose=r,this.broadcast=new Yn,this._isShared=!1,this._subscribe=function(e,t){a.broadcast.subscribe(Zn,t),e[nr](function(){a.broadcast.emit(er)}),e[rr](function(){a.hasListeners||a.broadcast.emit(tr)})},this._unsubscribe=function(e){a.broadcast.unsubscribe(Zn,e)},this.tryDispose=function(){a.hasListeners||a._isShared||(a.dispose(),a.broadcast.emit(tr))},this.map=function(t){var n,r=new e(Un(function(){return a.tryDispose()},function(){return n()})),o=function(e){var n=t(e);r.emit(n)};return a._subscribe(r,o),n=function(){return a._unsubscribe(o)},r},this.flatMap=function(t){var n,r=new e(Un(function(){return a.tryDispose()},function(){return n()})),o=function(e){var n=t(e);Array.isArray(n)?n.forEach(function(e){r.emit(e)}):r.emit(n)};return a._subscribe(r,o),n=function(){return a._unsubscribe(o)},r},this.operator=function(e){return e(a)},this.reduce=function(t,n){var r,o=n,i=new e(Un(function(){return a.tryDispose()},function(){return r()})),l=function(e){var n=t(o,e);o=n,i.emit(n)};return a._subscribe(i,l),r=function(){return a._unsubscribe(l)},i},this.split=function(){var t,n=new e(Un(function(){return a.tryDispose()},function(){return t()})),r=function(e){Array.isArray(e)?e.flat(Number.POSITIVE_INFINITY).forEach(function(e){n.emit(e)}):n.emit(e)};return a._subscribe(n,r),t=function(){return a._unsubscribe(r)},n},this.mapAsync=function(r,o){var i,l=new e(Un(function(){return a.tryDispose()},function(){return i()})),c=Gn(r),u=function(e){return t(a,void 0,void 0,function(){var t,r;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,c(e)];case 1:return(t=n.sent())!==$n&&l.emit(t),[3,3];case 2:if(r=n.sent(),!o)throw r;return o(r),[3,3];case 3:return[2]}})})};return a._subscribe(l,u),i=Un(function(){return a._unsubscribe(u)},function(){return c.clear()}),l},this.filter=function(t){var n,r=new e(Un(function(){return a.tryDispose()},function(){return n()})),o=function(e){t(e)&&r.emit(e)};return a._subscribe(r,o),n=function(){return a._unsubscribe(o)},r},this.tap=function(t){var n,r=new e(Un(function(){return a.tryDispose()},function(){return n()})),o=function(e){t(e),r.emit(e)};return a._subscribe(r,o),n=function(){return a._unsubscribe(o)},r},this.debounce=function(t){var n,r=new e(Un(function(){return a.tryDispose()},function(){return n()})),o=Jn(function(e){r.emit(e)},t);return a._subscribe(r,o),n=Un(function(){return o.clear()},function(){return a._unsubscribe(o)}),r},this.delay=function(r){var o,i=new e(Un(function(){return a.tryDispose()},function(){return o()})),l=!1,c=Gn(function(e){return t(a,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,qn(r)];case 1:return t.sent(),l?[3,3]:[4,i.emit(e)];case 2:t.sent(),t.label=3;case 3:return[2]}})})});return a._subscribe(i,c),o=Un(function(){return c.clear()},function(){return a._unsubscribe(c)},function(){l=!0}),i},this.emit=function(e){return t(a,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,this.broadcast.emit(Zn,e)];case 1:return t.sent(),[2]}})})},this.connect=function(e){return a.broadcast.subscribe(Zn,e),a.broadcast.emit(er),Un(function(){return a.tryDispose()},function(){return a._unsubscribe(e)})},this.once=function(e){var t;return t=a.connect(function(n){e(n),t()})},this.share=function(){return a._isShared=!0,a},this.repeat=function(t){var n,r;void 0===t&&(t=1e3);var o=new e(Un(function(){return a.tryDispose()},function(){return n()},function(){return void 0!==r&&clearTimeout(r)})),i=function(e){void 0!==r&&clearTimeout(r),o.emit(e),a.hasListeners&&(r=setTimeout(i,t,e))};return a._subscribe(o,i),n=function(){return a._unsubscribe(i)},o},this.merge=function(t){var n,r=new e(Un(function(){return a.tryDispose()},function(){return n()})),o=function(e){r.emit(e)};a._subscribe(r,o);var i=function(){};return r[nr](function(){i=t.connect(o)||function(){}}),n=Un(function(){return a._unsubscribe(o)},function(){return i()}),r},this.unsubscribe=function(){a.broadcast.unsubscribeAll(),a.broadcast.emit(tr),a.dispose()},this.toPromise=function(){return new Promise(function(e){a.once(function(t){return e(t)})})},this.toIteratorContext=function(){var e=a,t=!1;return{iterate:function(){return o(this,arguments,function(){var r;return n(this,function(n){switch(n.label){case 0:return t?[3,4]:[4,i(e.toPromise())];case 1:return r=n.sent(),[4,i(r)];case 2:return[4,n.sent()];case 3:return n.sent(),[3,0];case 4:return[2]}})})},done:function(){t=!0}}}}return Object.defineProperty(e.prototype,"isShared",{get:function(){return this._isShared},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasListeners",{get:function(){return!!this.broadcast.getListeners(Zn).length},enumerable:!1,configurable:!0}),e.prototype[nr]=function(e){this.broadcast.once(er,e)},e.prototype[rr]=function(e){this.broadcast.once(tr,e)},e}(),ir=Symbol("react-declarative-subject"),ar=function(){function e(){var e=this;this._emitter=new Yn,this.map=function(t){var n,r=new or(function(){return n()});return n=e.subscribe(r.emit),r.map(t)},this.flatMap=function(t){var n,r=new or(function(){return n()});return n=e.subscribe(r.emit),r.flatMap(t)},this.reduce=function(t,n){var r,o=new or(function(){return r()});return r=e.subscribe(o.emit),o.reduce(t,n)},this.mapAsync=function(t,n){var r,o=new or(function(){return r()});return r=e.subscribe(o.emit),o.mapAsync(t,n)},this.filter=function(t){var n,r=new or(function(){return n()});return n=e.subscribe(r.emit),r.filter(t)},this.tap=function(t){var n,r=new or(function(){return n()});return n=e.subscribe(r.emit),r.tap(t)},this.operator=function(t){var n,r=new or(function(){return n()});return n=e.subscribe(r.emit),r.operator(t)},this.split=function(){var t,n=new or(function(){return t()});return t=e.subscribe(n.emit),n.split()},this.debounce=function(t){var n,r=new or(function(){return n()});return n=e.subscribe(r.emit),r.debounce(t)},this.delay=function(t){var n,r=new or(function(){return n()});return n=e.subscribe(r.emit),r.delay(t)},this.repeat=function(t){var n,r=new or(function(){return n()});return n=e.subscribe(r.emit),r.repeat(t)},this.merge=function(t){var n,r=new or(function(){return n()});return n=e.subscribe(r.emit),r.merge(t)},this.subscribe=function(t){return e._emitter.subscribe(ir,t),function(){e._emitter.unsubscribe(ir,t)}},this.unsubscribeAll=function(){e._emitter.unsubscribeAll()},this.once=function(t){return e._emitter.once(ir,t)},this.toPromise=function(){return e.toObserver().toPromise()},this.toIteratorContext=function(){return e.toObserver().toIteratorContext()},this.next=this.next.bind(this),this.toObserver=this.toObserver.bind(this),this.toIteratorContext=this.toIteratorContext.bind(this)}return e.prototype.next=function(e){return t(this,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,this._emitter.emit(ir,e)];case 1:return t.sent(),[2]}})})},e.prototype.toObserver=function(){var e,t=new or(function(){return e()});return e=this.subscribe(t.emit),t},e}(),lr=function(e){var t,n=0,r=new or(function(){void 0!==t&&clearTimeout(t)}),o=function(){r.emit(n),n++,t=setTimeout(o,e)};return r[nr](function(){o()}),r},cr=function(e,r){var o=!1,i=new or(function(){o=!0});return i[nr](function(){t(void 0,void 0,void 0,function(){var t,a;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e()];case 1:return t=n.sent(),o||i.emit(t),[3,3];case 2:if(a=n.sent(),!r)throw a;return r(a),[3,3];case 3:return[2]}})})}),i},ur=function(e){var t,n=new or(function(){void 0!==t&&clearTimeout(t)}),r=function(){t=void 0,n.emit()};return n[nr](function(){setTimeout(r,e)}),n},sr=function(e){var t=new or(function(){});return t[nr](function(){Array.isArray(e)?e.flat(Number.POSITIVE_INFINITY).forEach(function(e){t.emit(e)}):t.emit(e)}),t},dr=function(e){var t=new or(function(){document.removeEventListener(e,t.emit)});if("document"in globalThis){t[nr](function(){document.addEventListener(e,t.emit)})}return t},fr=function(e){return{tap:function(t){return e().tap(t)},debounce:function(t){return e().debounce(t)},delay:function(t){return e().delay(t)},repeat:function(t){return e().repeat(t)},filter:function(t){return e().filter(t)},map:function(t){return e().map(t)},flatMap:function(t){return e().flatMap(t)},operator:function(t){return e().operator(t)},reduce:function(t,n){return e().reduce(t,n)},mapAsync:function(t,n){return e().mapAsync(t,n)},merge:function(t){return e().merge(t)},split:function(){return e().split()},connect:function(t){return e().connect(t)},once:function(t){return e().once(t)},unsubscribe:function(){return e().unsubscribe()},share:function(){return e().share()},toPromise:function(){return e().toPromise()},toIteratorContext:function(){return e().toIteratorContext()}}},mr=function(){function t(){}var n;return n=t,t.merge=function(e){var t=(new ar).toObserver();return e.forEach(function(e){e&&(t=t.merge(e))}),t},t.join=function(t,n){var o=void 0===n?{}:n,i=o.race,a=void 0!==i&&i,l=o.buffer,c=void 0===l?[]:l,u=function(){},s=new or(function(){return u()});t=t.filter(function(e){return!!e}),c=r([],e(new Array(t.length)),!1).map(function(e,t){return c[t]});var d=[],f=function(){c.every(function(e){return void 0!==e})&&(s.emit(r([],e(c),!1)),!a&&c.fill(void 0))};return s[nr](function(){t.forEach(function(e,t){if(e){var n=e.connect(function(e){c[t]=e,f()});d.push(function(){return n()})}}),u=Un.apply(void 0,r([],e(d),!1))}),s},t.unicast=function(e){return a(a({},fr(e)),{isUnicasted:!0})},t.multicast=function(e){var t;return a(a({},fr(function(){return t||(t=e())[rr](function(){t=void 0}),t})),{getRef:function(){return t},isMulticasted:!0})},t.createHot=function(e){var t,n=new or(function(){return t()});return t=e(n.emit)||function(){},n},t.createCold=function(e){var t=function(){},n=new or(function(){return t()});return n[nr](function(){t=e(n.emit)||function(){}}),n},t.create=n.createCold,t.pipe=function(e,t){var n=function(){},r=new or(function(){return n()});return r[nr](function(){var o=new ar,i=e.connect(o.next),a=t(o,r.emit)||function(){};n=Un(function(){return a()},function(){return i()})}),r},t.fromInterval=lr,t.fromPromise=cr,t.fromDelay=ur,t.fromArray=sr,t.fromEvent=dr,t.fromValue=function(e){var t=new or(function(){});return t[nr](function(){"function"==typeof e?t.emit(e()):t.emit(e)}),t},t.fromSubject=function(e){var t,n=new or(function(){return t()});return t=e.subscribe(n.emit),n},t.fromBehaviorSubject=function(e){var t,n=new or(function(){return t()});return n[nr](function(){e.data&&n.emit(e.data)}),t=e.subscribe(n.emit),n},t}(),pr=mr.create(function(e){return document.addEventListener("mousemove",e),function(){return document.removeEventListener("mousemove",e)}}),hr=mr.create(function(e){return document.addEventListener("touchmove",e),function(){return document.removeEventListener("touchmove",e)}}),vr=mr.create(function(e){return document.addEventListener("scroll",e),function(){return document.removeEventListener("scroll",e)}}),gr=mr.unicast(function(){var e=0;return mr.merge([pr,hr,vr]).filter(function(){return 20===e||(e+=1,!1)}).tap(function(){e=0}).share()}),br=function(e){return gr.connect(e)},yr=mr.unicast(function(){return mr.create(function(e){return mr.fromEvent("keydown").connect(function(t){"Tab"===t.code&&e()})}).share()}),wr=mr.unicast(function(){return mr.create(function(e){return document.addEventListener("touchstart",e,{passive:!1}),document.addEventListener("mousedown",e),function(){document.removeEventListener("touchstart",e),document.removeEventListener("mousedown",e)}}).share()}),Er=function(e){var t=p(e||null);return[function(e){var n=e.children,r=e.payload;return m.createElement(t.Provider,{value:r},n)},function(){return v(t)}]},xr=e(Er(),2),Cr=xr[0],kr=xr[1],Sr=p(null),Lr={},Nr=function(e){var t=e.children,n=e.payload,r=void 0===n?Lr:n;return f.createElement(Sr.Provider,{value:r},t)},Ir=function(){return v(Sr)},Mr=((Vn={})[Dn.Checkbox]=!1,Vn[Dn.Radio]=null,Vn[Dn.Text]="",Vn[Dn.Switch]=!1,Vn[Dn.Progress]=1,Vn[Dn.Slider]=0,Vn[Dn.Combo]=null,Vn[Dn.Items]=null,Vn[Dn.Rating]=3,Vn[Dn.Typography]="",Vn[Dn.Date]="",Vn[Dn.Time]="",Vn[Dn.File]=null,Vn[Dn.Choose]=null,Vn[Dn.Component]=null,Vn[Dn.Complete]="",Vn[Dn.Init]=null,Vn[Dn.YesNo]=null,Vn[Dn.Dict]=null,Vn[Dn.Tree]=null,Vn),Rr=function(e){var t=Mr[e];return void 0===t?void console.warn("react-declarative One initialValue unknown type ".concat(String(e))):t},Pr=function(t){void 0===t&&(t=[]);var n=[],o=function(t){return void 0===t&&(t=[]),null==t?void 0:t.forEach(function(t){var i=t.fields||[],a=t.child?[t.child]:[];o(r(r([],e(i),!1),e(a),!1)),n.push(t)})};return o(t),n},Ar=function(t){for(var n,o,i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];if(!i.length)return t;var l=i.shift();if(_n(t)&&_n(l))for(var c in l)Array.isArray(l[c])?t[c]=l[c].slice(0):_n(l[c])?(t[c]||Object.assign(t,((n={})[c]={},n)),Ar(t[c],l[c])):Object.assign(t,((o={})[c]=l[c],o));return Ar.apply(void 0,r([t],e(i),!1))},Tr=function(e,t){var n=(Array.isArray(t)?t:t.split(".").filter(function(e){return e})).flatMap(function(e){return"string"==typeof e?e.split("."):e});n.slice(0,n.length-1).reduce(function(e,t){return e[t]=e[t]?e[t]:{}},e)},Dr=function(t){var n=e(g(t),2),r=n[0],o=n[1],i=b(r),a=y(function(e){var t;t="function"==typeof e?e(i.current):e,i.current=t,o(t)},[]);return[i,a]},jr=Symbol("empty-value"),Or=function(e){var t=b(jr);return t.current===jr&&(t.current=function(e){return"function"==typeof e?e():e}(e)),t.current},Fr=function(e){var t=Or(function(){return new ar});return w(function(){var n=void 0;return e&&(n=e.subscribe(t.next)),n},[e]),t},_r="one-resolve",Br=function(e){return e},Hr=function(e,t,n){var r={};return e&&Pr(e).filter(function(e){return!n||!e.features||e.features.some(function(e){return n.includes(e)})}).filter(function(e){return e.type!==Dn.Phony}).filter(function(e){return e.type!==Dn.Button}).filter(function(e){return e.type!==Dn.Icon}).forEach(function(e){if(Fn(e)){if(Tr(r,e.name),"function"==typeof e.hidden?e.hidden(t):e.hidden)return;void 0===e.defaultValue?Hn(r,e.name,Wn(r,e.name)||Rr(e.type)):"function"==typeof e.defaultValue?Hn(r,e.name,e.defaultValue(t)):Hn(r,e.name,e.defaultValue)}}),r},Wr=function(r){var o=r.handler,i=r.fallback,l=r.fields,c=r.features,u=r.payload,s=r.change,d=r.loadStart,f=r.loadEnd,m=r.incomingTransform,p=void 0===m?Br:m,h=e(Dr(null),2),g=h[0],x=h[1],C=v(Rn),k=C.apiRef,S=C.changeSubject,L=C.reloadSubject,N=C.updateSubject,I=b(!0),M=b(!1),R=Fr(S),P=Fr(L),A=Fr(N);w(function(){var e,r=function(){return t(void 0,void 0,void 0,function(){var e,t,r,a,m,h,v;return n(this,function(n){switch(n.label){case 0:return M.current?[2]:[3,1];case 1:if("function"!=typeof o)return[3,9];e=!0,d&&d(_r),n.label=2;case 2:return n.trys.push([2,6,7,8]),(t=o(u))instanceof Promise?(r=Ar,a=[{},Hr(l,u,c)],m=Bn,[4,t]):[3,4];case 3:return v=r.apply(void 0,a.concat([m.apply(void 0,[n.sent()])])),s(v,!0),I.current&&x(p(v,u)),[3,5];case 4:v=Ar({},Hr(l,u,c),Bn(t)),s(v,!0),I.current&&x(p(v,u)),n.label=5;case 5:return[3,8];case 6:if(h=n.sent(),e=!1,!i)throw h;return i(h),[3,8];case 7:return f&&f(e,_r),M.current=!0,[7];case 8:return[3,10];case 9:o&&!zn(g.current,o)&&(v=Ar({},Hr(l,u,c),Bn(o)),I.current&&x(p(v,u))),n.label=10;case 10:return[2]}})})};r(),e={reload:r,change:function(e,t){void 0===t&&(t=!1),x(p(e,u)),s(e,t)},getData:function(){return a({},g.current||{})}},"function"==typeof k?k(e):k&&(k.current=e),P.unsubscribeAll(),P.subscribe(e.reload),R.unsubscribeAll(),R.subscribe(function(t){t&&t!==g.current&&e.change(t,!0)}),A.unsubscribeAll(),A.subscribe(function(t){t&&t!==g.current&&e.change(t,!1)})},[o]),E(function(){return function(){I.current=!1}},[]);var T=y(function(){return g.current},[]);return[g.current,x,T]},zr=function(e){var t=b(e);return t.current=e,t},Vr=p(null),Yr=function(t){var n=t.children,r=l(t,["children"]),o=b({}),i=b(!1),c=r.fields,u=void 0===c?[]:c,s=r.features,d=r.change,m=void 0===d?function(){return null}:d,p=r.fallback,v=void 0===p?function(){return null}:p,g=r.handler,w=void 0===g?function(){return{}}:g,E=r.payload,x=r.loadStart,C=r.loadEnd,k=r.incomingTransform,S=e(Wr({handler:w,fallback:v,fields:u,features:s,payload:E,change:m,loadStart:x,loadEnd:C,incomingTransform:k}),3),L=S[0],N=S[1],I=S[2],M=zr(L),R=y(function(t,n){var r=o.current,a=M.current;N(t),Object.entries(n).forEach(function(t){var n=e(t,2),o=n[0],i=n[1];r[o]=i}),Object.values(r).some(function(e){return e})?i.current=!0:(t!==a||i.current)&&(i.current=!1,m(t,!1))},[]),P=y(function(e){return R(Bn(a(a({},M.current),e)),{})},[]),A=h(function(){return{object:L,setObject:R,changeObject:P,getObjectRef:I}},[L]);return f.createElement(Vr.Provider,{value:A},!!L&&n)},Ur=function(){return v(Vr)},qr=function(){},$r=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=!1);var r=b(!0),o=b(n);return w(function(){return r.current?(r.current=!1,qr):o.current?qr:e()||qr},t),h(function(){return{resetWatcher:function(){r.current=!0},beginWatch:function(){r.current=!1,o.current=!1},stopWatch:function(){o.current=!0}}},[])},Xr=function(e){var t=Or(function(){return new ar});return $r(function(){t.next(e)},[e]),t},Gr=function(){return Y()},Kr=Gr(),Qr=function(t){void 0===t&&(t=0);var n=e(g(Kr),2),r=n[0],o=n[1],i=y(function(){return o(Gr())},[]);return w(function(){var e;return t&&(e=setTimeout(function(){e=void 0,i()},t)),function(){void 0!==e&&clearTimeout(e)}},[r,t,i]),{reloadTrigger:r,doReload:i}},Jr=function(o){var i=o.reloadSubject,a=o.loading,l=o.disabled,c=o.children,u=o.fallback,s=o.Loader,d=void 0===s?function(){return null}:s,m=o.Error,p=void 0===m?function(){return null}:m,h=o.onLoadStart,v=o.onLoadEnd,y=o.payload,x=o.deps,C=void 0===x?[]:x,k=o.throwError,S=void 0!==k&&k,L=e(g(""),2),N=L[0],I=L[1],M=e(g(l),2),R=M[0],P=M[1],A=Xr(l);w(function(){return A.subscribe(function(e){e||P(!1)})},[]);var T=Qr(),D=T.reloadTrigger,j=T.doReload,O=Fr(i);w(function(){return O.subscribe(function(){j()})},[]);var F=b(null),_=e(g(!1),2),B=_[0],H=_[1],W=e(g(!1),2),z=W[0],Y=W[1],U=b(!0),q=a||B;return E(function(){return function(){U.current=!1}},[]),w(function(){if(!R){F.current&&F.current.cancel();var e=Xn(function(){return t(void 0,void 0,void 0,function(){var e,t,r;return n(this,function(n){switch(n.label){case 0:e=!0,h&&h(),n.label=1;case 1:return n.trys.push([1,5,6,7]),(t=c(y))instanceof Promise?[4,t]:[3,3];case 2:return[2,n.sent()||null];case 3:return[2,t||null];case 4:return[3,7];case 5:throw r=n.sent(),e=!1,r;case 6:return v&&v(e),[7];case 7:return[2]}})})});F.current=e;t(void 0,void 0,void 0,function(){var t,r,o;return n(this,function(n){switch(n.label){case 0:t=!1,U.current&&H(!0),U.current&&Y(!1),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,e()];case 2:return(r=n.sent())===$n?(t=!0,[2]):(F.current=null,U.current&&queueMicrotask(function(){return V(function(){I(r)})}),[3,5]);case 3:if(o=n.sent(),U.current&&Y(!0),S)throw o;return u&&u(o),[3,5];case 4:return t||U.current&&H(!1),[7];case 5:return[2]}})})}},r(r([y,R],e(C),!1),[D],!1)),q?f.createElement(d,{payload:y}):z?f.createElement(p,{payload:y}):f.createElement(f.Fragment,null,N)},Zr=function(){function e(e){var t=this;this.target=e,this._status="pending",e.then(function(){return t._status="fulfilled"}),e.catch(function(){return t._status="rejected"})}return Object.defineProperty(e.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),e}(),eo=function(t){var n=void 0,o=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return"pending"!==(null==n?void 0:n.status)&&(n=new Zr(t.apply(void 0,r([],e(o),!1)))),null==n?void 0:n.target};return o.clear=function(){n=void 0},o.getStatus=function(){return(null==n?void 0:n.status)||"ready"},o},to=function(t,n){void 0===n&&(n=[]);var o=b(t);return o.current=t,y(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return o.current.apply(o,r([],e(t),!1))},n)},no=function(r,o){var i=void 0===o?{}:o,a=i.onLoadStart,l=i.onLoadEnd,c=i.fallback,u=i.throwError,s=e(g(!1),2),d=s[0],f=s[1],m=e(g(!1),2),p=m[0],v=m[1],y=b(!0),w=to(r);E(function(){return function(){y.current=!1}},[]);var x=h(function(){return eo(function(e){return t(void 0,void 0,void 0,function(){var r,o,i;return n(this,function(s){switch(s.label){case 0:r=function(){return t(void 0,void 0,void 0,function(){var t,r,o;return n(this,function(n){switch(n.label){case 0:t=!0,a&&a(),n.label=1;case 1:return n.trys.push([1,5,6,7]),(r=w(e))instanceof Promise?[4,r]:[3,3];case 2:return[2,n.sent()||null];case 3:return[2,r||null];case 4:return[3,7];case 5:throw o=n.sent(),t=!1,o;case 6:return l&&l(t),[7];case 7:return[2]}})})},y.current&&f(!0),y.current&&v(!1),o=!1,s.label=1;case 1:return s.trys.push([1,3,4,5]),[4,r()];case 2:return[2,s.sent()];case 3:if(i=s.sent(),y.current&&v(!0),u)throw i;return c&&c(i),[3,5];case 4:return o||y.current&&f(!1),[7];case 5:return[2,null]}})})})},[]);return{loading:d,error:p,execute:x}},ro=function(e){var t=Or(e),n=b(t),r=y(function(e){var t;t="function"==typeof e?e(n.current):e,n.current=t},[]);return[n,r]},oo={name:"",menu:function(){return null},menuItems:[],onValueChange:function(){return null}},io=An()({container:{position:"relative",display:"flex",alignItems:"stretch",justifyContent:"stretch",maxHeight:"45vh",overflowY:"auto",overflowX:"hidden"},content:{flex:1,display:"flex",flexDirection:"column",justifyContent:"stretch"},loader:{position:"absolute",top:0,left:0,right:0,bottom:0,height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center"}}),ao=function(r){var o=r.requestSubject,i=io().classes,c=e(g(null),2),u=c[0],s=c[1],d=e(g(0),2),m=d[0],p=d[1],v=e(ro(oo),2),b=v[0],E=v[1],x=e(ro(0),2),C=x[0],k=x[1],S=Ur(),L=S.object,N=S.changeObject,I=Ir(),M=y(function(){p(function(e){return e+1})},[]),R=y(function(){p(function(e){return Math.max(e-1,0)})},[]),P=no(function(e){return t(void 0,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,b.current.menu(b.current.name,e,A.current,I,b.current.onValueChange,N)];case 1:return t.sent(),s(null),[2]}})})},{onLoadStart:M,onLoadEnd:R}).execute,A=zr(L),T=h(function(){return b.current.menuItems.map(function(e){var t=e.isDisabled,n=void 0===t?function(){return!1}:t,r=e.isVisible,o=void 0===r?function(){return!0}:r,i=l(e,["isDisabled","isVisible"]);return a(a({},i),{isDisabled:function(){return n(A.current,I)},isVisible:function(){return o(A.current,I)}})})},[b.current.menuItems]),D=zr(T);return w(function(){return o.subscribe(Gn(function(e){return t(void 0,[e],void 0,function(e){var t,r=e.event,o=e.menuItems,i=e.menu,a=e.name,l=e.onValueChange;return n(this,function(e){switch(e.label){case 0:return[4,qn(350)];case 1:return e.sent(),k(function(e){return e+1}),E({name:a,menuItems:o,onValueChange:l,menu:i}),t=document.elementFromPoint(r.clientX,r.clientY),s(t||r.target),[2]}})})}))},[]),f.createElement(W,{key:C.current,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},anchorEl:u,open:!!u,onClose:function(){return s(null)},MenuListProps:{disablePadding:!0}},f.createElement("div",{className:i.container},0!==m&&f.createElement("div",{className:i.loader},f.createElement(O,{size:14})),f.createElement("div",{className:i.content},D.current.map(function(e,r){var o=e.label,i=void 0===o?"unknown-label":o,a=e.action,l=void 0===a?"unknown-action":a,c=e.divider,u=e.onClick,d=e.icon,m=e.isDisabled,p=void 0===m?function(){return!1}:m,h=e.isVisible,v=void 0===h?function(){return!0}:h;return f.createElement(Jr,{Loader:function(){return c?null:f.createElement(B,{sx:{visibility:"hidden",minWidth:225}},!!d&&f.createElement(F,null,f.createElement(d,null)),f.createElement(_,{variant:"inherit"},i))},onLoadStart:M,onLoadEnd:R,key:"".concat(C.current,"-").concat(r),payload:I},function(e){return t(void 0,void 0,void 0,function(){var t;return n(this,function(n){switch(n.label){case 0:return[4,qn(0)];case 1:return n.sent(),[4,p(e)];case 2:return t=n.sent(),[4,v(e)];case 3:return n.sent()?c?[2,f.createElement(H,{orientation:"horizontal"})]:[2,f.createElement(B,{disabled:t,onClick:function(){if(u)return u(A.current,e,b.current.onValueChange,N),void s(null);P(l)},sx:{minWidth:225}},!!d&&f.createElement(F,null,f.createElement(d,null)),f.createElement(_,{variant:"inherit"},i))]:[2,null]}})})})}))))},lo=p(null),co=function(e){var r=e.children,o=Fr(),i=h(function(){return{createContextMenu:function(e){var r=e.menuItems,i=void 0===r?[]:r,a=e.onValueChange,l=void 0===a?function(){return null}:a,c=e.menu,u=e.name;return function(e){return t(void 0,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return i?(e.preventDefault(),e.stopPropagation(),(null==i?void 0:i.length)?[4,o.next({name:u,menu:c,event:e,menuItems:i,onValueChange:l})]:[2]):[2];case 1:return[2,t.sent()]}})})}},requestSubject:o}},[]);return f.createElement(lo.Provider,{value:i},r,f.createElement(ao,{requestSubject:o}))},uo=function(){return v(lo)};var so=function(t){var n=!1,o=null,i=function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];return n||(n=!0,o=t.apply(void 0,r([],e(i),!1))),o};return i.clear=function(){n=!1},i},fo=function(){return!0},mo=function(e,t){var n=e.compute,r=e.type,o=e.readTransform,i=e.name,a=e.object,l=e.payload,c=e.config;if(n&&c.WITH_SYNC_COMPUTE){var u=t?n(a,l):Rr(r);return!(u instanceof Promise)&&u}return!(n||!i)&&(o(Wn(a,i),i,a,l)||Rr(r))},po=function(o,i){var a=void 0===i?{}:i,l=a.allowedErrors,u=a.fallback,s=a.defaultValue,d=void 0===s?null:s;return function(){for(var i,a,s=[],f=0;f<arguments.length;f++)s[f]=arguments[f];try{var m=o.apply(void 0,r([],e(s),!1));return m instanceof Promise?function(e,r){return t(void 0,[e,r],void 0,function(e,t){var r,o=t.fallback,i=t.defaultValue;return n(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e];case 1:return[2,t.sent()];case 2:return r=t.sent(),o&&o(r),[2,i];case 3:return[2]}})})}(m,{fallback:u,defaultValue:d}):m}catch(e){if(u&&u(e),l){try{for(var p=c(l),h=p.next();!h.done;h=p.next()){if(e instanceof h.value)return d}}catch(e){i={error:e}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}throw e}return d}}},ho=function(){return!1},vo=function(){return!0},go=function(){return null},bo=function(){return null},yo=function(){return!1},wo=function(e,t,n){var r="".concat(t,"(").concat(e||"unknown",")");return function(e){console.error("react-declarative ".concat(r," ").concat(n," exception"),e)}},Eo=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=[];return t.forEach(function(t){if(t)if("string"==typeof t)o.push(t);else if(Array.isArray(t)){if(t.length){var n=Eo.apply(void 0,r([],e(t),!1));n&&o.push(n)}}else"object"==typeof t&&(t.toString!==Object.prototype.toString?o.push(t.toString()):Object.entries(t).filter(function(t){var n=e(t,2);return n[0],!!n[1]}).forEach(function(t){var n=e(t,1)[0];return o.push(n)}))}),o.join(" ")},xo="12",Co=function(e){return Number(e)},ko=An()({root:{position:"relative",display:"flex",alignItems:"stretch",justifyContent:"stretch"},container:{flex:1,display:"flex",alignItems:"stretch",justifyContent:"stretch",width:"100%","& > *":{flex:1}}}),So=function(e,t){var n=e.className,r=e.style,o=e.sx,i=e.columns,c=void 0===i?"":i,u=e.phoneColumns,s=void 0===u?"":u,d=e.tabletColumns,m=void 0===d?"":d,p=e.desktopColumns,v=void 0===p?"":p,g=e.fieldRightMargin,b=void 0===g?"1":g,y=e.fieldBottomMargin,w=void 0===y?"2":y,E=e.children,x=e.onClick,C=e.onFocus,k=e.onContextMenu,S=l(e,["className","style","sx","columns","phoneColumns","tabletColumns","desktopColumns","fieldRightMargin","fieldBottomMargin","children","onClick","onFocus","onContextMenu"]),L=ko().classes,N=h(function(){return{xs:Co(s||c||xo),sm:Co(m||c||xo),md:Co(m||c||xo),lg:Co(v||c||xo),xl:Co(v||c||xo),mr:Co(b),mb:Co(w)}},[]),I=N.xs,M=N.sm,R=N.md,P=N.lg,A=N.xl,T=N.mr,D=N.mb;return f.createElement(U,a({},S,{ref:t,item:!0,className:Eo(n,L.root),style:r,onFocus:C,onClick:x,xs:I,sm:M,md:R,lg:P,xl:A,sx:o,onContextMenu:k}),f.createElement(j,{className:L.container,mr:T,mb:D},E))};So.displayName="Item";var Lo=x(So),No=function(e,t){var n=e.className,r=e.style,o=e.children,i=e.onFocus,c=e.onClick,u=e.isBaselineAlign,s=e.columnsOverride,d=e.sx,m=e.onContextMenu,p=l(e,["className","style","children","onFocus","onClick","isBaselineAlign","columnsOverride","sx","onContextMenu"]),v=h(function(){return s&&Number(s)},[]);return f.createElement(q,a({},p,{ref:t,container:!0,alignItems:u?"flex-end":"flex-start",className:n,style:r,onClick:c,onFocus:i,columns:v,onContextMenu:m,sx:d}),o)};No.displayName="Container";var Io=x(No),Mo=An()({root:{position:"relative","& > *":{width:"100%"}}}),Ro=function(e,t){var n=e.className,r=void 0===n?"":n,o=e.columns,i=void 0===o?"":o,c=e.phoneColumns,u=void 0===c?"":c,s=e.tabletColumns,d=void 0===s?"":s,m=e.desktopColumns,p=void 0===m?"":m,h=e.children,v=e.isItem,g=e.isBaselineAlign,b=e.style,y=e.columnsOverride,w=e.sx,E=e.fieldRightMargin,x=void 0===E?"1":E,C=e.fieldBottomMargin,k=void 0===C?"2":C,S=e.onClick,L=e.onFocus,N=e.onContextMenu,I=l(e,["className","columns","phoneColumns","tabletColumns","desktopColumns","children","isItem","isBaselineAlign","style","columnsOverride","sx","fieldRightMargin","fieldBottomMargin","onClick","onFocus","onContextMenu"]),M=Mo().classes;return v?f.createElement(Lo,a({},I,{ref:t,className:Eo(M.root,r),style:b,columns:i,phoneColumns:u,tabletColumns:d,desktopColumns:p,fieldRightMargin:x,fieldBottomMargin:k,onFocus:L,onClick:S,onContextMenu:N,sx:w}),h):f.createElement(Io,a({},I,{ref:t,className:Eo(M.root,r),isBaselineAlign:g,columnsOverride:y,style:b,onFocus:L,onContextMenu:N,onClick:S,sx:w}),h)};Ro.displayName="Group";var Po=x(Ro),Ao=function(t){if(t){if(t.includes(".")){var n=t.split(".");t=e(n.reverse(),1)[0]}var o=e(t.split("_")),i=o[0],a=o.slice(1);return r(["".concat(i.charAt(0).toUpperCase()).concat(i.slice(1))],e(a),!1).join(" ")}},To={WITH_DIRTY_CLICK_LISTENER:!0,WITH_MOBILE_READONLY_FALLBACK:!0,WITH_WAIT_FOR_MOVE_LISTENER:!0,WITH_WAIT_FOR_TAB_LISTENER:!0,WITH_WAIT_FOR_TOUCH_LISTENER:!0,WITH_DISMOUNT_LISTENER:!0,WITH_SYNC_COMPUTE:!1,CUSTOM_FIELD_DEBOUNCE:800,FIELD_BLUR_DEBOUNCE:100},Do=function(){var e=this;this._config=To,this.getRef=function(){return e._config},this.setValue=function(t){Object.assign(e._config,To,t)}},jo=Symbol("get-reference"),Oo=function(){function e(){}var t;return t=jo,e.instance=new Do,e[t]=e.instance.getRef,e.setValue=e.instance.setValue,e}(),Fo={display:"flex",alignItems:"stretch",justifyContent:"stretch"},_o=An()(function(e){var t,n,r;return{root:a(a({},Fo),{"& > *":a(a({},Fo),{flexGrow:1}),"& > * > *":{flexGrow:1},pointerEvents:"all"}),hidden:{display:"none !important"},fieldReadonly:{"& > *":{pointerEvents:"none !important"}},phoneHidden:(t={},t[e.breakpoints.only("xs")]={display:"none !important"},t),tabletHidden:(n={},n[e.breakpoints.between("sm","lg")]={display:"none !important"},n),desktopHidden:(r={},r[e.breakpoints.up("lg")]={display:"none !important"},r)}}),Bo=function(e){return console.log({v:e})},Ho=function(){return null},Wo=function(){return null},zo=function(e){return e},Vo=function(){},Yo=function(){return null},Uo=function(){return null},qo=function(e){return e},$o=function(e){return e};function Xo(o,i){var c=this;void 0===i&&(i={withApplyQueue:!1,skipDirtyClickListener:!1,skipClickListener:!1,skipFocusReadonly:!1,skipFocusBlurCall:!1,skipDebounce:!1,defaultProps:{}});var u=C(o),s=Oo[jo](),d=function(d){var m,p,v,b,x,C,k,S=d.className,L=void 0===S?"":S,N=d.sx,I=d.columns,M=void 0===I?"":I,R=d.phoneColumns,P=void 0===R?"":R,A=d.tabletColumns,T=void 0===A?"":A,D=d.desktopColumns,j=void 0===D?"":D,O=d.phoneHidden,F=void 0!==O&&O,_=d.tabletHidden,B=void 0!==_&&_,H=d.desktopHidden,W=void 0!==H&&H,z=d.isDisabled,V=d.isVisible,Y=d.isInvalid,U=d.isIncorrect,q=d.isReadonly,$=d.readTransform,X=void 0===$?qo:$,G=d.writeTransform,K=void 0===G?$o:G,Q=d.change,J=void 0===Q?Bo:Q,Z=d.fallback,ee=void 0===Z?Ho:Z,te=d.ready,ne=void 0===te?Wo:te,re=d.compute,oe=d.shouldRecompute,ie=d.click,ae=void 0===ie?Vo:ie,le=d.map,ce=void 0===le?zo:le,ue=d.object,se=d.name,de=void 0===se?"":se,fe=d.title,me=void 0===fe?Ao(de)||void 0:fe,pe=d.menu,he=void 0===pe?Uo:pe,ve=d.type,ge=d.debug,be=d.focus,ye=d.blur,we=d.invalidity,Ee=d.prefix,xe=d.dirty,Ce=void 0!==xe&&xe,ke=d.disabled,Se=void 0!==ke&&ke,Le=d.readonly,Ne=void 0!==Le&&Le,Ie=d.autoFocus,Me=d.style,Re=d.menuItems,Pe=d.groupRef,Ae=void 0===Pe?Yo:Pe,Te=d.fieldRightMargin,De=void 0===Te?null===(p=i.defaultProps)||void 0===p?void 0:p.fieldRightMargin:Te,je=d.fieldBottomMargin,Oe=void 0===je?null===(v=i.defaultProps)||void 0===v?void 0:v.fieldBottomMargin:je,Fe=d.outlinePaper,_e=void 0!==Fe&&Fe,Be=d.transparentPaper,He=void 0!==Be&&Be,We=d.testId,ze=void 0===We?de:We,Ve=l(d,["className","sx","columns","phoneColumns","tabletColumns","desktopColumns","phoneHidden","tabletHidden","desktopHidden","isDisabled","isVisible","isInvalid","isIncorrect","isReadonly","readTransform","writeTransform","change","fallback","ready","compute","shouldRecompute","click","map","object","name","title","menu","type","debug","focus","blur","invalidity","prefix","dirty","disabled","readonly","autoFocus","style","menuItems","groupRef","fieldRightMargin","fieldBottomMargin","outlinePaper","transparentPaper","testId"]),Ye=Ur(),Ue=Ye.object,qe=Ye.changeObject,$e=Ye.getObjectRef,Xe=Ir(),Ge=uo().createContextMenu,Ke=function(e){var t=e.prefix,n=e.name,r=e.isDisabled,o=void 0===r?ho:r,i=e.isVisible,a=void 0===i?vo:i,l=e.isInvalid,c=void 0===l?go:l,u=e.isIncorrect,s=void 0===u?bo:u,d=e.isReadonly,f=void 0===d?yo:d;return h(function(){return{isDisabled:po(o,{defaultValue:!1,fallback:wo(n,t,"isDisabled")}),isVisible:po(a,{defaultValue:!1,fallback:wo(n,t,"isVisible")}),isInvalid:po(c,{defaultValue:null,fallback:wo(n,t,"isInvalid")}),isIncorrect:po(s,{defaultValue:null,fallback:wo(n,t,"isIncorrect")}),isReadonly:po(f,{defaultValue:!1,fallback:wo(n,t,"isReadonly")})}},[])}({prefix:Ee,name:de,isDisabled:z,isVisible:V,isInvalid:Y,isIncorrect:U,isReadonly:q}),Qe=Ke.isDisabled,Je=Ke.isVisible,Ze=Ke.isInvalid,et=Ke.isIncorrect,tt=Ke.isReadonly,nt=Ue||ue,rt=_o().classes,ot=function(e){var t=e.compute,n=e.shouldRecompute,r=void 0===n?fo:n;return h(function(){var e=null;if(t){var n=so(t);return function(t,o){return e&&r(e,t,o)&&n.clear(),e=t,n(t,o)}}},[])}({compute:re,shouldRecompute:oe}),it=function(t,n){var r=e(g(function(){var e=function(e){var t=e.phoneHidden,n=e.tabletHidden,r=e.desktopHidden,o=e.isReadonly,i=e.isInvalid,a=e.isDisabled,l=e.isVisible,c=e.isIncorrect,u=e.object,s=e.payload;return{phoneHidden:"function"==typeof t?t(s):t,tabletHidden:"function"==typeof n?n(s):n,desktopHidden:"function"==typeof r?r(s):r,fieldReadonly:o(u,s),invalid:i(u,s),visible:l(u,s),incorrect:c(u,s),disabled:a(u,s)}}(n);return a(a(a({groupRef:null,focusReadonly:!0,loading:!1},e),{value:mo(n,e.visible)}),t)}),2),o=r[0],i=r[1];return{state:o,action:h(function(){return{setGroupRef:function(e){return i(function(t){return a(a({},t),{groupRef:e})})},setFocusReadonly:function(e){return i(function(t){return a(a({},t),{focusReadonly:e})})},setFieldReadonly:function(e){return i(function(t){return a(a({},t),{fieldReadonly:e})})},setDisabled:function(e){return i(function(t){return a(a({},t),{disabled:e})})},setInvalid:function(e){return i(function(t){return a(a({},t),{invalid:e})})},setIncorrect:function(e){return i(function(t){return a(a({},t),{incorrect:e})})},setVisible:function(e){return i(function(t){return a(a({},t),{visible:e})})},setLoading:function(e){return i(function(t){return a(a({},t),{loading:e})})},setDirty:function(e){return i(function(t){return a(a({},t),{dirty:e})})},setValue:function(e){return i(function(t){return a(a({},t),{value:e})})}}},[])}}({dirty:Ce},{compute:ot,type:ve,readTransform:X,config:s,name:de,object:nt,payload:Xe,isVisible:Je,isDisabled:Qe,isInvalid:Ze,isIncorrect:et,isReadonly:tt,phoneHidden:F,tabletHidden:B,desktopHidden:W}),at=it.state,lt=at.phoneHidden,ct=at.tabletHidden,ut=at.desktopHidden,st=at.dirty,dt=at.disabled,ft=at.fieldReadonly,mt=at.focusReadonly,pt=at.groupRef,ht=at.invalid,vt=at.incorrect,gt=at.loading,bt=at.value,yt=at.visible,wt=it.action,Et=wt.setDirty,xt=wt.setDisabled,Ct=wt.setFieldReadonly,kt=wt.setFocusReadonly,St=wt.setGroupRef,Lt=wt.setInvalid,Nt=wt.setIncorrect,It=wt.setLoading,Mt=wt.setValue,Rt=wt.setVisible,Pt=(x=s,C=kr(),k=x.CUSTOM_FIELD_DEBOUNCE,C||k),At=e(function(t,n){var r=e(g(function(){return{value:t}}),2),o=r[0],i=r[1],a=h(function(){return Jn(function(e){return i({value:e})},n)},[]);return w(function(){return function(){return a.clear()}},[]),[o,a,a]}(bt,i.skipDebounce?0:Pt),3),Tt=At[0],Dt=At[1],jt=At[2],Ot=jt.pending,Ft=jt.flush,_t=function(e){var t=e.prefix,n=e.name,r=e.clickDisabled,o=e.lastObject,i=e.debouncedValue$,a=e.fieldReadonly$,l=e.focusReadonly$,c=e.invalid$,u=e.upperReadonly$,s=e.value$,d=e.groupRef$,f=h(function(){return{inputUpdate:!1,objectUpdate:!1,initComplete:!1,fieldName:"".concat(t,"(").concat(n||"unknown",")"),lastObject:o,isMounted:!0,clickDisabled:!1,debouncedValue$:null,fieldReadonly$:null,focusReadonly$:null,invalid$:null,upperReadonly$:null,value$:null,groupRef$:null}},[]);return f.debouncedValue$=i,f.fieldReadonly$=a,f.focusReadonly$=l,f.invalid$=c,f.upperReadonly$=u,f.value$=s,f.groupRef$=d,f.clickDisabled=r,{memory:f}}({prefix:Ee,name:de,clickDisabled:Se||dt,lastObject:null,debouncedValue$:Tt.value,fieldReadonly$:ft,focusReadonly$:mt,invalid$:ht,upperReadonly$:Ne,groupRef$:pt,value$:bt}).memory,Bt=to(function(e){Mt(e),Dt(e),_t.initComplete=!0},[]);s.WITH_DISMOUNT_LISTENER&&E(function()