UNPKG

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 • 799 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@mui/material/styles"),n=require("tss-react"),r=require("@mui/material/Box"),o=require("@mui/material/CircularProgress"),a=require("@mui/material/ListItemIcon"),i=require("@mui/material/Typography"),l=require("@mui/material/MenuItem"),c=require("@mui/material/Divider"),u=require("@mui/material/Menu"),s=require("react-dom"),d=require("uuid"),f=require("@mui/material/Grid"),m=require("@mui/material"),p=require("@mui/material/Checkbox"),h=require("@mui/material/FormControlLabel"),v=require("@mui/material/FormGroup"),b=require("@mui/material/Button"),g=require("@mui/material/Stack"),y=require("@mui/material/Autocomplete"),E=require("@mui/material/TextField"),x=require("@mui/material/Radio"),w=require("@mui/material/Paper"),C=require("@mui/material/Modal"),k=require("@mui/material/InputAdornment"),S=require("@mui/material/IconButton"),L=require("@mui/material/List"),M=require("@mui/material/ListItemButton"),R=require("@mui/icons-material/ArrowDropUp"),N=require("@mui/icons-material/ArrowDropDown"),I=require("@mui/icons-material/MoreVert"),T=require("@mui/material/Fab"),P=require("@mui/material/LinearProgress"),A=require("@mui/material/Backdrop"),D=require("@mui/material/ListItemText"),O=require("@mui/icons-material/Close"),j=require("@mui/icons-material/RadioButtonChecked"),F=require("@mui/icons-material/RadioButtonUnchecked"),_=require("@mui/material/Chip"),B=require("@mui/icons-material/CheckBox"),H=require("@mui/icons-material/CheckBoxOutlineBlank"),W=require("@mui/material/RadioGroup"),z=require("@mui/material/Rating"),V=require("dayjs"),q=require("@mui/material/Popover"),Y=require("@mui/material/Toolbar"),U=require("@mui/icons-material/KeyboardArrowLeft"),$=require("@mui/icons-material/KeyboardArrowRight"),G=require("@mui/icons-material/CalendarTodayOutlined"),X=require("@mui/icons-material/ArrowForward"),K=require("@mui/icons-material/AlarmOutlined"),Q=require("@mui/material/Switch"),J=require("@mui/material/Slider"),Z=require("@mui/material/ListItem"),ee=require("@mui/icons-material/Clear"),te=require("@mui/material/ListSubheader"),ne=require("@mui/icons-material/Search"),re=require("@mui/icons-material/ExpandMore"),oe=require("@mui/material/Tab"),ae=require("@mui/material/Tabs"),ie=require("history"),le=require("@mui/material/Dialog"),ce=require("@mui/material/DialogContent"),ue=require("@mui/material/DialogActions"),se=require("@mui/material/DialogTitle"),de=require("@mui/material/Badge"),fe=require("@mui/icons-material/Fullscreen"),me=require("@mui/material/Table"),pe=require("@mui/material/TableBody"),he=require("@mui/material/TableHead"),ve=require("@mui/material/TableContainer"),be=require("@mui/material/TableRow"),ge=require("@mui/material/TableCell"),ye=require("@mui/material/TablePagination"),Ee=require("@mui/material/PaginationItem"),xe=require("@mui/material/Pagination"),we=require("@mui/icons-material/ArrowUpward"),Ce=require("@mui/icons-material/ArrowDownward"),ke=require("@mui/material/Tooltip"),Se=require("@mui/material/TableSortLabel"),Le=require("@mui/icons-material/Add"),Me=require("@mui/icons-material/CleaningServicesOutlined"),Re=require("@mui/icons-material/Refresh"),Ne=require("@mui/icons-material/Sort"),Ie=require("@mui/icons-material/Settings"),Te=require("@mui/material/Collapse"),Pe=require("@mui/icons-material/ExpandLess"),Ae=require("@mui/icons-material/NotInterested"),De=require("@mui/icons-material/FilterList"),Oe=require("path-to-regexp"),je=require("@mui/material/colors"),Fe=require("@mui/material/AppBar"),_e=require("@mui/material/CssBaseline"),Be=require("@mui/material/Drawer"),He=require("@mui/icons-material/Menu"),We=require("@mui/material/ButtonBase"),ze=require("@mui/icons-material/OutlinedFlag"),Ve=require("@mui/material/SwipeableDrawer"),qe=require("@mui/material/InputBase"),Ye=require("@mui/material/Breadcrumbs"),Ue=require("@mui/material/Link"),$e=require("@mui/material/ButtonGroup"),Ge=require("@mui/icons-material/Palette"),Xe=require("@mui/icons-material/Remove"),Ke=require("@mui/material/Snackbar"),Qe=require("@mui/icons-material/KeyboardArrowUp"),Je=require("@mui/material/Box/Box"),Ze=require("@mui/material/Alert"),et=require("@mui/icons-material/CloudUpload"),tt=require("@mui/icons-material/Delete"),nt=require("@mui/material/Step"),rt=require("@mui/material/StepLabel"),ot=require("@mui/material/Stepper"),at=require("xlsx"),it=require("dayjs/plugin/isToday"),lt=require("dayjs/plugin/localeData"),ct=require("dayjs/locale/en-gb"),ut=require("dayjs/plugin/utc"),st=require("@mui/icons-material/ArrowBackIos"),dt=require("@mui/icons-material/ArrowForwardIos"),ft=require("@mui/icons-material/ContentCopy"),mt=require("@mui/icons-material/AccessTime"),pt=require("file-type/core"),ht=require("@mui/material/Avatar"),vt=require("@mui/material/ListItemAvatar"),bt=require("@mui/icons-material/CloudSync");function gt(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function yt(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var Et=yt(e),xt=gt(e),wt=gt(r),Ct=gt(o),kt=gt(a),St=gt(i),Lt=gt(l),Mt=gt(c),Rt=gt(u),Nt=yt(s),It=gt(f),Tt=gt(p),Pt=gt(h),At=gt(v),Dt=gt(b),Ot=gt(g),jt=gt(y),Ft=gt(E),_t=gt(x),Bt=gt(w),Ht=gt(C),Wt=gt(k),zt=gt(S),Vt=gt(L),qt=gt(M),Yt=gt(R),Ut=gt(N),$t=gt(I),Gt=gt(T),Xt=gt(P),Kt=gt(A),Qt=gt(D),Jt=gt(O),Zt=gt(j),en=gt(F),tn=gt(_),nn=gt(B),rn=gt(H),on=gt(W),an=gt(z),ln=gt(V),cn=gt(q),un=gt(Y),sn=gt(U),dn=gt($),fn=gt(G),mn=gt(X),pn=gt(K),hn=gt(Q),vn=gt(J),bn=gt(Z),gn=gt(ee),yn=gt(te),En=gt(ne),xn=gt(re),wn=gt(oe),Cn=gt(ae),kn=gt(le),Sn=gt(ce),Ln=gt(ue),Mn=gt(se),Rn=gt(de),Nn=gt(fe),In=gt(me),Tn=gt(pe),Pn=gt(he),An=gt(ve),Dn=gt(be),On=gt(ge),jn=gt(ye),Fn=gt(Ee),_n=gt(xe),Bn=gt(we),Hn=gt(Ce),Wn=gt(ke),zn=gt(Se),Vn=gt(Le),qn=gt(Me),Yn=gt(Re),Un=gt(Ne),$n=gt(Ie),Gn=gt(Te),Xn=gt(Pe),Kn=gt(Ae),Qn=gt(De),Jn=gt(Fe),Zn=gt(_e),er=gt(Be),tr=gt(He),nr=gt(We),rr=gt(ze),or=gt(Ve),ar=gt(qe),ir=gt(Ye),lr=gt(Ue),cr=gt($e),ur=gt(Ge),sr=gt(Xe),dr=gt(Ke),fr=gt(Qe),mr=gt(Je),pr=gt(Ze),hr=gt(et),vr=gt(tt),br=gt(nt),gr=gt(rt),yr=gt(ot),Er=yt(at),xr=gt(it),wr=gt(lt),Cr=gt(ct),kr=gt(ut),Sr=gt(st),Lr=gt(dt),Mr=gt(ft),Rr=gt(mt),Nr=gt(ht),Ir=gt(vt),Tr=gt(bt),Pr=function(e,t){return Pr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Pr(e,t)};function Ar(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Pr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Dr=function(){return Dr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Dr.apply(this,arguments)};function Or(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function jr(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(e){a(e)}}function l(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}c((r=r.apply(e,t||[])).next())}))}function Fr(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function _r(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Br(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function Hr(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function Wr(e){return this instanceof Wr?(this.v=e,this):new Wr(e)}function zr(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),a=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||l(e,t)}))})}function l(e,t){try{(n=o[e](t)).value instanceof Wr?Promise.resolve(n.value.v).then(c,u):s(a[0][2],n)}catch(e){s(a[0][3],e)}var n}function c(e){l("next",e)}function u(e){l("throw",e)}function s(e,t){e(t),a.shift(),a.length&&l(a[0][0],a[0][1])}}function Vr(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=_r(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function qr(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}globalThis.window||(globalThis.window=globalThis);var Yr=e.createContext(null),Ur=function(t){var n=t.children,r=t.apiRef,o=void 0===r?null:r,a=t.reloadSubject,i=void 0===a?null:a,l=t.changeSubject,c=void 0===l?null:l,u=t.updateSubject,s=void 0===u?null:u,d=e.useMemo((function(){return{apiRef:o,reloadSubject:i,changeSubject:c,updateSubject:s}}),[o,i,c,s]);return Et.createElement(Yr.Provider,{value:d},n)},$r=n.createMakeAndWithStyles({useTheme:t.useTheme}).makeStyles,Gr=function(n){var r=n.children,o=t.useTheme(),a=e.useMemo((function(){return t.createTheme(o)}),[o]);return Et.createElement(t.ThemeProvider,{theme:a},r)};exports.FieldType=void 0,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"}(exports.FieldType||(exports.FieldType={})),Object.entries(exports.FieldType).forEach((function(e){var t=Br(e,2),n=t[0],r=t[1];exports.FieldType[n]=Symbol.for(r)}));var Xr=exports.FieldType,Kr=new Set([Xr.Group,Xr.Box,Xr.Paper,Xr.Outline,Xr.Expansion,Xr.Div,Xr.Tabs,Xr.Hero,Xr.Fragment,Xr.Center,Xr.Stretch,Xr.Condition,Xr.Layout]),Qr=function(e){return Kr.has(e)},Jr=function(e){var t=e.type;return e.name&&!Kr.has(t)},Zr=function(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.prototype},eo=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(Array.isArray(e[n])?t[n]=e[n].slice(0):Zr(e[n])?t[n]=eo(e[n]):t[n]=e[n]);return t},to=function(e,t,n){var r=(Array.isArray(t)?t:t.split(".").filter((function(e){return e}))).flatMap((function(e){return"string"==typeof e?e.split("."):e})),o=r.slice(0,r.length-1).reduce((function(e,t){return e&&e[t]}),e),a=Br(r.reverse(),1)[0];try{return o[a]=n,!0}catch(e){return!1}},no=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)},ro=function(e,t){if(e===t)return!0;if(Zr(e)&&Zr(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!ro(e[n],t[n]))return!1;return!0}return!1};var oo,ao=function(){function e(){var e=this;this._events={},this.getListeners=function(t){return e._events[t]||[]},this.subscribe=function(t,n){!e._events[t]&&(e._events[t]=[]),e._events[t].push(n)},this.unsubscribe=function(t,n){!e._events[t]&&(e._events[t]=[]),e._events[t]=e._events[t].filter((function(e){return n!==e}))},this.unsubscribeAll=function(){e._events={}},this.once=function(t,n){var r=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return jr(e,void 0,void 0,(function(){return Fr(this,(function(e){switch(e.label){case 0:return[4,n.apply(void 0,Hr([],Br(o),!1))];case 1:return e.sent(),this.unsubscribe(t,r),[2]}}))}))};return e.subscribe(t,r),function(){e.unsubscribe(t,r)}},this.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return jr(e,void 0,void 0,(function(){var e,r;return Fr(this,(function(o){switch(o.label){case 0:e=Hr([],Br(this._events&&this._events[t]||[]),!1),r=0,o.label=1;case 1:return r===e.length?[3,4]:[4,e[r].apply(e,Hr([],Br(n),!1))];case 2:o.sent(),o.label=3;case 3:return r++,[3,1];case 4:return[2]}}))}))}}return Object.defineProperty(e.prototype,"hasListeners",{get:function(){return e=this._events,!(0===Object.getOwnPropertySymbols(e).length&&0===Object.getOwnPropertyNames(e).length);var e},enumerable:!1,configurable:!0}),e}(),io=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return e}:1===e.length?e[0]:e.reduce((function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e(t.apply(void 0,Hr([],Br(n),!1)))}}))},lo=function(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout((function(){return t()}),e)}))},co=Symbol("cancelable-canceled"),uo=function(e){var t,n=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new Promise((function(r,o){var a=!1;t&&t(),t=function(){a=!0,r(co)};var i=e.apply(void 0,Hr([],Br(n),!1));i.then((function(e){a||r(e)})),i.catch((function(e){a||o(e)}))}))};return n.cancel=function(){t&&t()},n},so=function(e){var t=Promise.resolve(),n=void 0,r=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var i=!1,l=function(){i=!0};return n=n?io(n,l):l,t=t.then((function(){return jr(void 0,void 0,void 0,(function(){return Fr(this,(function(t){switch(t.label){case 0:return i?[3,2]:[4,e.apply(void 0,Hr([],Br(o),!1))];case 1:return[2,t.sent()];case 2:return[2,co]}}))}))})).finally((function(){r.clear(),n=void 0})),t};return r.clear=function(){t=Promise.resolve(),n=void 0},r.cancel=function(){t=Promise.resolve(),n&&n(),n=void 0},r},fo=function(e){return requestAnimationFrame(e)},mo=function(e){return cancelAnimationFrame(e)},po=function(e,t){var n;void 0===t&&(t=1e3);var r=null,o=t?setTimeout:fo,a=t?clearTimeout:mo,i=function(){for(var i=[],l=0;l<arguments.length;l++)i[l]=arguments[l];null!==n&&a(n);var c=function(){r=null,n=null,e.apply(void 0,Hr([],Br(i),!1))};r=c,n=o(c,t)};return i.clear=function(){null!==n&&a(n),n=null,r=null},i.flush=function(){null!==n&&a(n),r&&r(),n=null,r=null},i.pending=function(){return!!r},i},ho=Symbol("observer-subscribe"),vo=Symbol("observer-connect"),bo=Symbol("observer-disconnect"),go=Symbol("observer-connect-listen"),yo=Symbol("observer-disconnect-listen"),Eo=function(){function e(t){var n=this;this.dispose=t,this.broadcast=new ao,this._isShared=!1,this._subscribe=function(e,t){n.broadcast.subscribe(ho,t),e[go]((function(){n.broadcast.emit(vo)})),e[yo]((function(){n.hasListeners||n.broadcast.emit(bo)}))},this._unsubscribe=function(e){n.broadcast.unsubscribe(ho,e)},this.tryDispose=function(){n.hasListeners||n._isShared||(n.dispose(),n.broadcast.emit(bo))},this.map=function(t){var r,o=new e(io((function(){return n.tryDispose()}),(function(){return r()}))),a=function(e){var n=t(e);o.emit(n)};return n._subscribe(o,a),r=function(){return n._unsubscribe(a)},o},this.flatMap=function(t){var r,o=new e(io((function(){return n.tryDispose()}),(function(){return r()}))),a=function(e){var n=t(e);Array.isArray(n)?n.forEach((function(e){o.emit(e)})):o.emit(n)};return n._subscribe(o,a),r=function(){return n._unsubscribe(a)},o},this.operator=function(e){return e(n)},this.reduce=function(t,r){var o,a=r,i=new e(io((function(){return n.tryDispose()}),(function(){return o()}))),l=function(e){var n=t(a,e);a=n,i.emit(n)};return n._subscribe(i,l),o=function(){return n._unsubscribe(l)},i},this.split=function(){var t,r=new e(io((function(){return n.tryDispose()}),(function(){return t()}))),o=function(e){Array.isArray(e)?e.flat(Number.POSITIVE_INFINITY).forEach((function(e){r.emit(e)})):r.emit(e)};return n._subscribe(r,o),t=function(){return n._unsubscribe(o)},r},this.mapAsync=function(t,r){var o,a=new e(io((function(){return n.tryDispose()}),(function(){return o()}))),i=so(t),l=function(e){return jr(n,void 0,void 0,(function(){var t,n;return Fr(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,i(e)];case 1:return(t=o.sent())!==co&&a.emit(t),[3,3];case 2:if(n=o.sent(),!r)throw n;return r(n),[3,3];case 3:return[2]}}))}))};return n._subscribe(a,l),o=io((function(){return n._unsubscribe(l)}),(function(){return i.clear()})),a},this.filter=function(t){var r,o=new e(io((function(){return n.tryDispose()}),(function(){return r()}))),a=function(e){t(e)&&o.emit(e)};return n._subscribe(o,a),r=function(){return n._unsubscribe(a)},o},this.tap=function(t){var r,o=new e(io((function(){return n.tryDispose()}),(function(){return r()}))),a=function(e){t(e),o.emit(e)};return n._subscribe(o,a),r=function(){return n._unsubscribe(a)},o},this.debounce=function(t){var r,o=new e(io((function(){return n.tryDispose()}),(function(){return r()}))),a=po((function(e){o.emit(e)}),t);return n._subscribe(o,a),r=io((function(){return a.clear()}),(function(){return n._unsubscribe(a)})),o},this.delay=function(t){var r,o=new e(io((function(){return n.tryDispose()}),(function(){return r()}))),a=!1,i=so((function(e){return jr(n,void 0,void 0,(function(){return Fr(this,(function(n){switch(n.label){case 0:return[4,lo(t)];case 1:return n.sent(),a?[3,3]:[4,o.emit(e)];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))}));return n._subscribe(o,i),r=io((function(){return i.clear()}),(function(){return n._unsubscribe(i)}),(function(){a=!0})),o},this.emit=function(e){return jr(n,void 0,void 0,(function(){return Fr(this,(function(t){switch(t.label){case 0:return[4,this.broadcast.emit(ho,e)];case 1:return t.sent(),[2]}}))}))},this.connect=function(e){return n.broadcast.subscribe(ho,e),n.broadcast.emit(vo),io((function(){return n.tryDispose()}),(function(){return n._unsubscribe(e)}))},this.once=function(e){var t;return t=n.connect((function(n){e(n),t()}))},this.share=function(){return n._isShared=!0,n},this.repeat=function(t){var r,o;void 0===t&&(t=1e3);var a=new e(io((function(){return n.tryDispose()}),(function(){return r()}),(function(){return void 0!==o&&clearTimeout(o)}))),i=function(e){void 0!==o&&clearTimeout(o),a.emit(e),n.hasListeners&&(o=setTimeout(i,t,e))};return n._subscribe(a,i),r=function(){return n._unsubscribe(i)},a},this.merge=function(t){var r,o=new e(io((function(){return n.tryDispose()}),(function(){return r()}))),a=function(e){o.emit(e)};n._subscribe(o,a);var i=function(){};return o[go]((function(){i=t.connect(a)||function(){}})),r=io((function(){return n._unsubscribe(a)}),(function(){return i()})),o},this.unsubscribe=function(){n.broadcast.unsubscribeAll(),n.broadcast.emit(bo),n.dispose()},this.toPromise=function(){return new Promise((function(e){n.once((function(t){return e(t)}))}))},this.toIteratorContext=function(){var e=n,t=!1;return{iterate:function(){return zr(this,arguments,(function(){return Fr(this,(function(n){switch(n.label){case 0:return t?[3,4]:[4,Wr(e.toPromise())];case 1:return[4,Wr(n.sent())];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(ho).length},enumerable:!1,configurable:!0}),e.prototype[go]=function(e){this.broadcast.once(vo,e)},e.prototype[yo]=function(e){this.broadcast.once(bo,e)},e}(),xo=Symbol("react-declarative-subject"),wo=function(){function e(){var e=this;this._emitter=new ao,this.map=function(t){var n,r=new Eo((function(){return n()}));return n=e.subscribe(r.emit),r.map(t)},this.flatMap=function(t){var n,r=new Eo((function(){return n()}));return n=e.subscribe(r.emit),r.flatMap(t)},this.reduce=function(t,n){var r,o=new Eo((function(){return r()}));return r=e.subscribe(o.emit),o.reduce(t,n)},this.mapAsync=function(t,n){var r,o=new Eo((function(){return r()}));return r=e.subscribe(o.emit),o.mapAsync(t,n)},this.filter=function(t){var n,r=new Eo((function(){return n()}));return n=e.subscribe(r.emit),r.filter(t)},this.tap=function(t){var n,r=new Eo((function(){return n()}));return n=e.subscribe(r.emit),r.tap(t)},this.operator=function(t){var n,r=new Eo((function(){return n()}));return n=e.subscribe(r.emit),r.operator(t)},this.split=function(){var t,n=new Eo((function(){return t()}));return t=e.subscribe(n.emit),n.split()},this.debounce=function(t){var n,r=new Eo((function(){return n()}));return n=e.subscribe(r.emit),r.debounce(t)},this.delay=function(t){var n,r=new Eo((function(){return n()}));return n=e.subscribe(r.emit),r.delay(t)},this.repeat=function(t){var n,r=new Eo((function(){return n()}));return n=e.subscribe(r.emit),r.repeat(t)},this.merge=function(t){var n,r=new Eo((function(){return n()}));return n=e.subscribe(r.emit),r.merge(t)},this.subscribe=function(t){return e._emitter.subscribe(xo,t),function(){e._emitter.unsubscribe(xo,t)}},this.unsubscribeAll=function(){e._emitter.unsubscribeAll()},this.once=function(t){return e._emitter.once(xo,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 jr(this,void 0,void 0,(function(){return Fr(this,(function(t){switch(t.label){case 0:return[4,this._emitter.emit(xo,e)];case 1:return t.sent(),[2]}}))}))},e.prototype.toObserver=function(){var e,t=new Eo((function(){return e()}));return e=this.subscribe(t.emit),t},e}(),Co=function(e){var t,n=0,r=new Eo((function(){void 0!==t&&clearTimeout(t)})),o=function(){r.emit(n),n++,t=setTimeout(o,e)};return r[go]((function(){o()})),r},ko=function(e,t){var n=!1,r=new Eo((function(){n=!0}));return r[go]((function(){jr(void 0,void 0,void 0,(function(){var o,a;return Fr(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,e()];case 1:return o=i.sent(),n||r.emit(o),[3,3];case 2:if(a=i.sent(),!t)throw a;return t(a),[3,3];case 3:return[2]}}))}))})),r},So=function(e){var t,n=new Eo((function(){void 0!==t&&clearTimeout(t)})),r=function(){t=void 0,n.emit()};return n[go]((function(){setTimeout(r,e)})),n},Lo=function(e){var t=new Eo((function(){}));return t[go]((function(){Array.isArray(e)?e.flat(Number.POSITIVE_INFINITY).forEach((function(e){t.emit(e)})):t.emit(e)})),t},Mo=function(e){var t=new Eo((function(){document.removeEventListener(e,t.emit)}));if("document"in globalThis){t[go]((function(){document.addEventListener(e,t.emit)}))}return t},Ro=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()}}},No=function(){function e(){}var t;return t=e,e.merge=function(e){var t=(new wo).toObserver();return e.forEach((function(e){e&&(t=t.merge(e))})),t},e.join=function(e,t){var n=void 0===t?{}:t,r=n.race,o=void 0!==r&&r,a=n.buffer,i=void 0===a?[]:a,l=function(){},c=new Eo((function(){return l()}));e=e.filter((function(e){return!!e})),i=Hr([],Br(new Array(e.length)),!1).map((function(e,t){return i[t]}));var u=[],s=function(){i.every((function(e){return void 0!==e}))&&(c.emit(Hr([],Br(i),!1)),!o&&i.fill(void 0))};return c[go]((function(){e.forEach((function(e,t){if(e){var n=e.connect((function(e){i[t]=e,s()}));u.push((function(){return n()}))}})),l=io.apply(void 0,Hr([],Br(u),!1))})),c},e.unicast=function(e){return Dr(Dr({},Ro(e)),{isUnicasted:!0})},e.multicast=function(e){var t;return Dr(Dr({},Ro((function(){return t||(t=e())[yo]((function(){t=void 0})),t}))),{getRef:function(){return t},isMulticasted:!0})},e.createHot=function(e){var t,n=new Eo((function(){return t()}));return t=e(n.emit)||function(){},n},e.createCold=function(e){var t=function(){},n=new Eo((function(){return t()}));return n[go]((function(){t=e(n.emit)||function(){}})),n},e.create=t.createCold,e.pipe=function(e,t){var n=function(){},r=new Eo((function(){return n()}));return r[go]((function(){var o=new wo,a=e.connect(o.next),i=t(o,r.emit)||function(){};n=io((function(){return i()}),(function(){return a()}))})),r},e.fromInterval=Co,e.fromPromise=ko,e.fromDelay=So,e.fromArray=Lo,e.fromEvent=Mo,e.fromValue=function(e){var t=new Eo((function(){}));return t[go]((function(){"function"==typeof e?t.emit(e()):t.emit(e)})),t},e.fromSubject=function(e){var t,n=new Eo((function(){return t()}));return t=e.subscribe(n.emit),n},e.fromBehaviorSubject=function(e){var t,n=new Eo((function(){return t()}));return n[go]((function(){e.data&&n.emit(e.data)})),t=e.subscribe(n.emit),n},e}(),Io=No.create((function(e){return document.addEventListener("mousemove",e),function(){return document.removeEventListener("mousemove",e)}})),To=No.create((function(e){return document.addEventListener("touchmove",e),function(){return document.removeEventListener("touchmove",e)}})),Po=No.create((function(e){return document.addEventListener("scroll",e),function(){return document.removeEventListener("scroll",e)}})),Ao=No.unicast((function(){var e=0;return No.merge([Io,To,Po]).filter((function(){return 20===e||(e+=1,!1)})).tap((function(){e=0})).share()})),Do=function(e){return Ao.connect(e)},Oo=No.unicast((function(){return No.create((function(e){return No.fromEvent("keydown").connect((function(t){"Tab"===t.code&&e()}))})).share()})),jo=No.unicast((function(){return No.create((function(e){return document.addEventListener("touchstart",e,{passive:!1}),document.addEventListener("mousedown",e),function(){document.removeEventListener("touchstart",e),document.removeEventListener("mousedown",e)}})).share()})),Fo=function(t){var n=e.createContext(t||null);return[function(e){var t=e.children,r=e.payload;return xt.default.createElement(n.Provider,{value:r},t)},function(){return e.useContext(n)}]},_o=Br(Fo(),2),Bo=_o[0],Ho=_o[1],Wo=e.createContext(null),zo={},Vo=function(e){var t=e.children,n=e.payload,r=void 0===n?zo:n;return Et.createElement(Wo.Provider,{value:r},t)},qo=function(){return e.useContext(Wo)},Yo=((oo={})[Xr.Checkbox]=!1,oo[Xr.Radio]=null,oo[Xr.Text]="",oo[Xr.Switch]=!1,oo[Xr.Progress]=1,oo[Xr.Slider]=0,oo[Xr.Combo]=null,oo[Xr.Items]=null,oo[Xr.Rating]=3,oo[Xr.Typography]="",oo[Xr.Date]="",oo[Xr.Time]="",oo[Xr.File]=null,oo[Xr.Choose]=null,oo[Xr.Component]=null,oo[Xr.Complete]="",oo[Xr.Init]=null,oo[Xr.YesNo]=null,oo[Xr.Dict]=null,oo[Xr.Tree]=null,oo),Uo=function(e){var t=Yo[e];return void 0===t?void console.warn("react-declarative One initialValue unknown type ".concat(String(e))):t},$o=function(e){void 0===e&&(e=[]);var t=[],n=function(e){return void 0===e&&(e=[]),null==e?void 0:e.forEach((function(e){var r=e.fields||[],o=e.child?[e.child]:[];n(Hr(Hr([],Br(r),!1),Br(o),!1)),t.push(e)}))};return n(e),t},Go=function(e){for(var t,n,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];if(!r.length)return e;var a=r.shift();if(Zr(e)&&Zr(a))for(var i in a)Array.isArray(a[i])?e[i]=a[i].slice(0):Zr(a[i])?(e[i]||Object.assign(e,((t={})[i]={},t)),Go(e[i],a[i])):Object.assign(e,((n={})[i]=a[i],n));return Go.apply(void 0,Hr([e],Br(r),!1))},Xo=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)},Ko=function(t){var n=Br(e.useState(t),2),r=n[0],o=n[1],a=e.useRef(r),i=e.useCallback((function(e){var t;t="function"==typeof e?e(a.current):e,a.current=t,o(t)}),[]);return[a,i]},Qo=Symbol("empty-value"),Jo=function(t){var n=e.useRef(Qo);return n.current===Qo&&(n.current=function(e){return"function"==typeof e?e():e}(t)),n.current},Zo=function(t){var n=Jo((function(){return new wo}));return e.useEffect((function(){var e=void 0;return t&&(e=t.subscribe(n.next)),e}),[t]),n},ea="one-resolve",ta=function(e){return e},na=function(e,t,n){var r={};return e&&$o(e).filter((function(e){return!n||!e.features||e.features.some((function(e){return n.includes(e)}))})).filter((function(e){return e.type!==Xr.Phony})).filter((function(e){return e.type!==Xr.Button})).filter((function(e){return e.type!==Xr.Icon})).forEach((function(e){if(Jr(e)){if(Xo(r,e.name),"function"==typeof e.hidden?e.hidden(t):e.hidden)return;void 0===e.defaultValue?to(r,e.name,no(r,e.name)||Uo(e.type)):"function"==typeof e.defaultValue?to(r,e.name,e.defaultValue(t)):to(r,e.name,e.defaultValue)}})),r},ra=function(t){var n=t.handler,r=t.fallback,o=t.fields,a=t.features,i=t.payload,l=t.change,c=t.loadStart,u=t.loadEnd,s=t.incomingTransform,d=void 0===s?ta:s,f=Br(Ko(null),2),m=f[0],p=f[1],h=e.useContext(Yr),v=h.apiRef,b=h.changeSubject,g=h.reloadSubject,y=h.updateSubject,E=e.useRef(!0),x=e.useRef(!1),w=Zo(b),C=Zo(g),k=Zo(y);e.useEffect((function(){var e,t=function(){return jr(void 0,void 0,void 0,(function(){var e,t,s,f,h,v,b;return Fr(this,(function(g){switch(g.label){case 0:return x.current?[2]:[3,1];case 1:if("function"!=typeof n)return[3,9];e=!0,c&&c(ea),g.label=2;case 2:return g.trys.push([2,6,7,8]),(t=n(i))instanceof Promise?(s=Go,f=[{},na(o,i,a)],h=eo,[4,t]):[3,4];case 3:return b=s.apply(void 0,f.concat([h.apply(void 0,[g.sent()])])),l(b,!0),E.current&&p(d(b,i)),[3,5];case 4:b=Go({},na(o,i,a),eo(t)),l(b,!0),E.current&&p(d(b,i)),g.label=5;case 5:return[3,8];case 6:if(v=g.sent(),e=!1,!r)throw v;return r(v),[3,8];case 7:return u&&u(e,ea),x.current=!0,[7];case 8:return[3,10];case 9:n&&!ro(m.current,n)&&(b=Go({},na(o,i,a),eo(n)),E.current&&p(d(b,i))),g.label=10;case 10:return[2]}}))}))};t(),e={reload:t,change:function(e,t){void 0===t&&(t=!1),p(d(e,i)),l(e,t)},getData:function(){return Dr({},m.current||{})}},"function"==typeof v?v(e):v&&(v.current=e),C.unsubscribeAll(),C.subscribe(e.reload),w.unsubscribeAll(),w.subscribe((function(t){t&&t!==m.current&&e.change(t,!0)})),k.unsubscribeAll(),k.subscribe((function(t){t&&t!==m.current&&e.change(t,!1)}))}),[n]),e.useLayoutEffect((function(){return function(){E.current=!1}}),[]);var S=e.useCallback((function(){return m.current}),[]);return[m.current,p,S]},oa=function(t){var n=e.useRef(t);return n.current=t,n},aa=e.createContext(null),ia=function(t){var n=t.children,r=Or(t,["children"]),o=e.useRef({}),a=e.useRef(!1),i=r.fields,l=void 0===i?[]:i,c=r.features,u=r.change,s=void 0===u?function(){return null}:u,d=r.fallback,f=void 0===d?function(){return null}:d,m=r.handler,p=void 0===m?function(){return{}}:m,h=r.payload,v=r.loadStart,b=r.loadEnd,g=r.incomingTransform,y=Br(ra({handler:p,fallback:f,fields:l,features:c,payload:h,change:s,loadStart:v,loadEnd:b,incomingTransform:g}),3),E=y[0],x=y[1],w=y[2],C=oa(E),k=e.useCallback((function(e,t){var n=o.current,r=C.current;x(e),Object.entries(t).forEach((function(e){var t=Br(e,2),r=t[0],o=t[1];n[r]=o})),Object.values(n).some((function(e){return e}))?a.current=!0:(e!==r||a.current)&&(a.current=!1,s(e,!1))}),[]),S=e.useCallback((function(e){return k(eo(Dr(Dr({},C.current),e)),{})}),[]),L=e.useMemo((function(){return{object:E,setObject:k,changeObject:S,getObjectRef:w}}),[E]);return Et.createElement(aa.Provider,{value:L},!!E&&n)},la=function(){return e.useContext(aa)},ca=function(){},ua=function(t,n,r){void 0===n&&(n=[]),void 0===r&&(r=!1);var o=e.useRef(!0),a=e.useRef(r);return e.useEffect((function(){return o.current?(o.current=!1,ca):a.current?ca:t()||ca}),n),e.useMemo((function(){return{resetWatcher:function(){o.current=!0},beginWatch:function(){o.current=!1,a.current=!1},stopWatch:function(){a.current=!0}}}),[])},sa=function(e){var t=Jo((function(){return new wo}));return ua((function(){t.next(e)}),[e]),t},da=function(){return d.v4()},fa=da(),ma=function(t){void 0===t&&(t=0);var n=Br(e.useState(fa),2),r=n[0],o=n[1],a=e.useCallback((function(){return o(da())}),[]);return e.useEffect((function(){var e;return t&&(e=setTimeout((function(){e=void 0,a()}),t)),function(){void 0!==e&&clearTimeout(e)}}),[r,t,a]),{reloadTrigger:r,doReload:a}},pa=function(t){var n=t.reloadSubject,r=t.loading,o=t.disabled,a=t.children,i=t.fallback,l=t.Loader,c=void 0===l?function(){return null}:l,u=t.Error,d=void 0===u?function(){return null}:u,f=t.onLoadStart,m=t.onLoadEnd,p=t.payload,h=t.deps,v=void 0===h?[]:h,b=t.throwError,g=void 0!==b&&b,y=Br(e.useState(""),2),E=y[0],x=y[1],w=Br(e.useState(o),2),C=w[0],k=w[1],S=sa(o);e.useEffect((function(){return S.subscribe((function(e){e||k(!1)}))}),[]);var L=ma(),M=L.reloadTrigger,R=L.doReload,N=Zo(n);e.useEffect((function(){return N.subscribe((function(){R()}))}),[]);var I=e.useRef(null),T=Br(e.useState(!1),2),P=T[0],A=T[1],D=Br(e.useState(!1),2),O=D[0],j=D[1],F=e.useRef(!0),_=r||P;return e.useLayoutEffect((function(){return function(){F.current=!1}}),[]),e.useEffect((function(){if(!C){I.current&&I.current.cancel();var e=uo((function(){return jr(void 0,void 0,void 0,(function(){var e,t,n;return Fr(this,(function(r){switch(r.label){case 0:e=!0,f&&f(),r.label=1;case 1:return r.trys.push([1,5,6,7]),(t=a(p))instanceof Promise?[4,t]:[3,3];case 2:return[2,r.sent()||null];case 3:return[2,t||null];case 4:return[3,7];case 5:throw n=r.sent(),e=!1,n;case 6:return m&&m(e),[7];case 7:return[2]}}))}))}));I.current=e;jr(void 0,void 0,void 0,(function(){var t,n,r;return Fr(this,(function(o){switch(o.label){case 0:t=!1,F.current&&A(!0),F.current&&j(!1),o.label=1;case 1:return o.trys.push([1,3,4,5]),[4,e()];case 2:return(n=o.sent())===co?(t=!0,[2]):(I.current=null,F.current&&queueMicrotask((function(){return s.flushSync((function(){x(n)}))})),[3,5]);case 3:if(r=o.sent(),F.current&&j(!0),g)throw r;return i&&i(r),[3,5];case 4:return t||F.current&&A(!1),[7];case 5:return[2]}}))}))}}),Hr(Hr([p,C],Br(v),!1),[M],!1)),_?Et.createElement(c,{payload:p}):O?Et.createElement(d,{payload:p}):Et.createElement(Et.Fragment,null,E)},ha=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}(),va=function(e){var t=void 0,n=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return"pending"!==(null==t?void 0:t.status)&&(t=new ha(e.apply(void 0,Hr([],Br(n),!1)))),null==t?void 0:t.target};return n.clear=function(){t=void 0},n.getStatus=function(){return(null==t?void 0:t.status)||"ready"},n},ba=function(t,n){void 0===n&&(n=[]);var r=e.useRef(t);return r.current=t,e.useCallback((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.current.apply(r,Hr([],Br(e),!1))}),n)},ga=function(t,n){var r=void 0===n?{}:n,o=r.onLoadStart,a=r.onLoadEnd,i=r.fallback,l=r.throwError,c=Br(e.useState(!1),2),u=c[0],s=c[1],d=Br(e.useState(!1),2),f=d[0],m=d[1],p=e.useRef(!0),h=ba(t);e.useLayoutEffect((function(){return function(){p.current=!1}}),[]);var v=e.useMemo((function(){return va((function(e){return jr(void 0,void 0,void 0,(function(){var t,n,r;return Fr(this,(function(c){switch(c.label){case 0:t=function(){return jr(void 0,void 0,void 0,(function(){var t,n,r;return Fr(this,(function(i){switch(i.label){case 0:t=!0,o&&o(),i.label=1;case 1:return i.trys.push([1,5,6,7]),(n=h(e))instanceof Promise?[4,n]:[3,3];case 2:return[2,i.sent()||null];case 3:return[2,n||null];case 4:return[3,7];case 5:throw r=i.sent(),t=!1,r;case 6:return a&&a(t),[7];case 7:return[2]}}))}))},p.current&&s(!0),p.current&&m(!1),n=!1,c.label=1;case 1:return c.trys.push([1,3,4,5]),[4,t()];case 2:return[2,c.sent()];case 3:if(r=c.sent(),p.current&&m(!0),l)throw r;return i&&i(r),[3,5];case 4:return n||p.current&&s(!1),[7];case 5:return[2,null]}}))}))}))}),[]);return{loading:u,error:f,execute:v}},ya=function(t){var n=Jo(t),r=e.useRef(n),o=e.useCallback((function(e){var t;t="function"==typeof e?e(r.current):e,r.current=t}),[]);return[r,o]},Ea={name:"",menu:function(){return null},menuItems:[],onValueChange:function(){return null}},xa=$r()({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"}}),wa=function(t){var n=t.requestSubject,r=xa().classes,o=Br(e.useState(null),2),a=o[0],i=o[1],l=Br(e.useState(0),2),c=l[0],u=l[1],s=Br(ya(Ea),2),d=s[0],f=s[1],m=Br(ya(0),2),p=m[0],h=m[1],v=la(),b=v.object,g=v.changeObject,y=qo(),E=e.useCallback((function(){u((function(e){return e+1}))}),[]),x=e.useCallback((function(){u((function(e){return Math.max(e-1,0)}))}),[]),w=ga((function(e){return jr(void 0,void 0,void 0,(function(){return Fr(this,(function(t){switch(t.label){case 0:return[4,d.current.menu(d.current.name,e,C.current,y,d.current.onValueChange,g)];case 1:return t.sent(),i(null),[2]}}))}))}),{onLoadStart:E,onLoadEnd:x}).execute,C=oa(b),k=e.useMemo((function(){return d.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,a=Or(e,["isDisabled","isVisible"]);return Dr(Dr({},a),{isDisabled:function(){return n(C.current,y)},isVisible:function(){return o(C.current,y)}})}))}),[d.current.menuItems]),S=oa(k);return e.useEffect((function(){return n.subscribe(so((function(e){var t=e.event,n=e.menuItems,r=e.menu,o=e.name,a=e.onValueChange;return jr(void 0,void 0,void 0,(function(){var e;return Fr(this,(function(l){switch(l.label){case 0:return[4,lo(350)];case 1:return l.sent(),h((function(e){return e+1})),f({name:o,menuItems:n,onValueChange:a,menu:r}),e=document.elementFromPoint(t.clientX,t.clientY),i(e||t.target),[2]}}))}))})))}),[]),Et.createElement(Rt.default,{key:p.current,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},anchorEl:a,open:!!a,onClose:function(){return i(null)},MenuListProps:{disablePadding:!0}},Et.createElement("div",{className:r.container},0!==c&&Et.createElement("div",{className:r.loader},Et.createElement(Ct.default,{size:14})),Et.createElement("div",{className:r.content},S.current.map((function(e,t){var n=e.label,r=void 0===n?"unknown-label":n,o=e.action,a=void 0===o?"unknown-action":o,l=e.divider,c=e.onClick,u=e.icon,s=e.isDisabled,f=void 0===s?function(){return!1}:s,m=e.isVisible,h=void 0===m?function(){return!0}:m;return Et.createElement(pa,{Loader:function(){return l?null:Et.createElement(Lt.default,{sx:{visibility:"hidden",minWidth:225}},!!u&&Et.createElement(kt.default,null,Et.createElement(u,null)),Et.createElement(St.default,{variant:"inherit"},r))},onLoadStart:E,onLoadEnd:x,key:"".concat(p.current,"-").concat(t),payload:y},(function(e){return jr(void 0,void 0,void 0,(function(){var t;return Fr(this,(function(n){switch(n.label){case 0:return[4,lo(0)];case 1:return n.sent(),[4,f(e)];case 2:return t=n.sent(),[4,h(e)];case 3:return n.sent()?l?[2,Et.createElement(Mt.default,{orientation:"horizontal"})]:[2,Et.createElement(Lt.default,{disabled:t,onClick:function(){if(c)return c(C.current,e,d.current.onValueChange,g),void i(null);w(a)},sx:{minWidth:225}},!!u&&Et.createElement(kt.default,null,Et.createElement(u,null)),Et.createElement(St.default,{variant:"inherit"},r))]:[2,null]}}))}))}))})))))},Ca=e.createContext(null),ka=function(t){var n=t.children,r=Zo(),o=e.useMemo((function(){return{createContextMenu:function(e){var t=e.menuItems,n=void 0===t?[]:t,o=e.onValueChange,a=void 0===o?function(){return null}:o,i=e.menu,l=e.name;return function(e){return jr(void 0,void 0,void 0,(function(){return Fr(this,(function(t){switch(t.label){case 0:return n?(e.preventDefault(),e.stopPropagation(),(null==n?void 0:n.length)?[4,r.next({name:l,menu:i,event:e,menuItems:n,onValueChange:a})]:[2]):[2];case 1:return[2,t.sent()]}}))}))}},requestSubject:r}}),[]);return Et.createElement(Ca.Provider,{value:o},n,Et.createElement(wa,{requestSubject:r}))},Sa=function(){return e.useContext(Ca)};var La=function(e){var t=!1,n=null,r=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t||(t=!0,n=e.apply(void 0,Hr([],Br(r),!1))),n};return r.clear=function(){t=!1},r},Ma=function(){return!0},Ra=function(e,t){var n=e.compute,r=e.type,o=e.readTransform,a=e.name,i=e.object,l=e.payload,c=e.config;if(n&&c.WITH_SYNC_COMPUTE){var u=t?n(i,l):Uo(r);return!(u instanceof Promise)&&u}return!(n||!a)&&(o(no(i,a),a,i,l)||Uo(r))},Na=function(e,t){var n=void 0===t?{}:t,r=n.allowedErrors,o=n.fallback,a=n.defaultValue,i=void 0===a?null:a;return function(){for(var t,n,a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];try{var c=e.apply(void 0,Hr([],Br(a),!1));return c instanceof Promise?function(e,t){var n=t.fallback,r=t.defaultValue;return jr(void 0,void 0,void 0,(function(){var t;return Fr(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,e];case 1:return[2,o.sent()];case 2:return t=o.sent(),n&&n(t),[2,r];case 3:return[2]}}))}))}(c,{fallback:o,defaultValue:i}):c}catch(e){if(o&&o(e),r){try{for(var u=_r(r),s=u.next();!s.done;s=u.next()){if(e instanceof s.value)return i}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}throw e}return i}}},Ia=function(){return!1},Ta=function(){return!0},Pa=function(){return null},Aa=function(){return null},Da=function(){return!1},Oa=function(e,t,n){var r="".concat(t,"(").concat(e||"unknown",")");return function(e){console.error("react-declarative ".concat(r," ").concat(n," exception"),e)}},ja=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=[];return e.forEach((function(e){if(e)if("string"==typeof e)n.push(e);else if(Array.isArray(e)){if(e.length){var t=ja.apply(void 0,Hr([],Br(e),!1));t&&n.push(t)}}else"object"==typeof e&&(e.toString!==Object.prototype.toString?n.push(e.toString()):Object.entries(e).filter((function(e){var t=Br(e,2);return t[0],!!t[1]})).forEach((function(e){var t=Br(e,1)[0];return n.push(t)})))})),n.join(" ")},Fa="12",_a=function(e){return Number(e)},Ba=$r()({root:{position:"relative",display:"flex",alignItems:"stretch",justifyContent:"stretch"},container:{flex:1,display:"flex",alignItems:"stretch",justifyContent:"stretch",width:"100%","& > *":{flex:1}}}),Ha=function(t,n){var r=t.className,o=t.style,a=t.sx,i=t.columns,l=void 0===i?"":i,c=t.phoneColumns,u=void 0===c?"":c,s=t.tabletColumns,d=void 0===s?"":s,f=t.desktopColumns,m=void 0===f?"":f,p=t.fieldRightMargin,h=void 0===p?"1":p,v=t.fieldBottomMargin,b=void 0===v?"2":v,g=t.children,y=t.onClick,E=t.onFocus,x=t.onContextMenu,w=Or(t,["className","style","sx","columns","phoneColumns","tabletColumns","desktopColumns","fieldRightMargin","fieldBottomMargin","children","onClick","onFocus","onContextMenu"]),C=Ba().classes,k=e.useMemo((function(){return{xs:_a(u||l||Fa),sm:_a(d||l||Fa),md:_a(d||l||Fa),lg:_a(m||l||Fa),xl:_a(m||l||Fa),mr:_a(h),mb:_a(b)}}),[]),S=k.xs,L=k.sm,M=k.md,R=k.lg,N=k.xl,I=k.mr,T=k.mb;return Et.createElement(It.default,Dr({},w,{ref:n,item:!0,className:ja(r,C.root),style:o,onFocus:E,onClick:y,xs:S,sm:L,md:M,lg:R,xl:N,sx:a,onContextMenu:x}),Et.createElement(wt.default,{className:C.container,mr:I,mb:T},g))};Ha.displayName="Item";var Wa=e.forwardRef(Ha),za=function(t,n){var r=t.className,o=t.style,a=t.children,i=t.onFocus,l=t.onClick,c=t.isBaselineAlign,u=t.columnsOverride,s=t.sx,d=t.onContextMenu,f=Or(t,["className","style","children","onFocus","onClick","isBaselineAlign","columnsOverride","sx","onContextMenu"]),p=e.useMemo((function(){return u&&Number(u)}),[]);return Et.createElement(m.Grid,Dr({},f,{ref:n,container:!0,alignItems:c?"flex-end":"flex-start",className:r,style:o,onClick:l,onFocus:i,columns:p,onContextMenu:d,sx:s}),a)};za.displayName="Container";var Va=e.forwardRef(za),qa=$r()({root:{position:"relative","& > *":{width:"100%"}}}),Ya=function(e,t){var n=e.className,r=void 0===n?"":n,o=e.columns,a=void 0===o?"":o,i=e.phoneColumns,l=void 0===i?"":i,c=e.tabletColumns,u=void 0===c?"":c,s=e.desktopColumns,d=void 0===s?"":s,f=e.children,m=e.isItem,p=e.isBaselineAlign,h=e.style,v=e.columnsOverride,b=e.sx,g=e.fieldRightMargin,y=void 0===g?"1":g,E=e.fieldBottomMargin,x=void 0===E?"2":E,w=e.onClick,C=e.onFocus,k=e.onContextMenu,S=Or(e,["className","columns","phoneColumns","tabletColumns","desktopColumns","children","isItem","isBaselineAlign","style","columnsOverride","sx","fieldRightMargin","fieldBottomMargin","onClick","onFocus","onContextMenu"]),L=qa().classes;return m?Et.createElement(Wa,Dr({},S,{ref:t,className:ja(L.root,r),style:h,columns:a,phoneColumns:l,tabletColumns:u,desktopColumns:d,fieldRightMargin:y,fieldBottomMargin:x,onFocus:C,onClick:w,onContextMenu:k,sx:b}),f):Et.createElement(Va,Dr({},S,{ref:t,className:ja(L.root,r),isBaselineAlign:p,columnsOverride:v,style:h,onFocus:C,onContextMenu:k,onClick:w,sx:b}),f)};Ya.displayName="Group";var Ua=e.forwardRef(Ya),$a=function(e){if(e){if(e.includes(".")){var t=e.split(".");e=Br(t.reverse(),1)[0]}var n=Br(e.split("_")),r=n[0],o=n.slice(1);return Hr(["".concat(r.charAt(0).toUpperCase()).concat(r.slice(1))],Br(o),!1).join(" ")}},Ga={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},Xa=function(){var e=this;this._config=Ga,this.getRef=function(){return e._config},this.setValue=function(t){Object.assign(e._config,Ga,t)}},Ka=Symbol("get-reference"),Qa=function(){function e(){}var t;return t=Ka,e.instance=new Xa,e[t]=e.instance.getRef,e.setValue=e.instance.setValue,e}(),Ja={display:"flex",alignItems:"stretch",justifyContent:"stretch"},Za=$r()((function(e){var t,n,r;return{root:Dr(Dr({},Ja),{"& > *":Dr(Dr({},Ja),{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)}})),ei=function(e){return console.log({v:e})},ti=function(){return null},ni=function(){return null},ri=function(e){return e},oi=function(){},ai=function(){return null},ii=function(){return null},li=function(e){return e},ci=function(e){return e};function ui(t,n){var r=this;void 0===n&&(n={withApplyQueue:!1,skipDirtyClickListener:!1,skipClickListener:!1,skipFocusReadonly:!1,skipFocusBlurCall:!1,skipDebounce:!1,defaultProps:{}});var o=e.memo(t),a=Qa[Ka](),i=function(i){var l,c,u,s,d,f,m,p=i.className,h=void 0===p?"":p,v=i.sx,b=i.columns,g=void 0===b?"":b,y=i.phoneColumns,E=void 0===y?"":y,x=i.tabletColumns,w=void 0===x?"":x,C=i.desktopColumns,k=void 0===C?"":C,S=i.phoneHidden,L=void 0!==S&&S,M=i.tabletHidden,R=void 0!==M&&M,N=i.desktopHidden,I=void 0!==N&&N,T=i.isDisabled,P=i.isVisible,A=i.isInvalid,D=i.isIncorrect,O=i.isReadonly,j=i.read