meraproject/content/merakomis/js/react/1762006373520/836.app.js
keboss-m 5c21d25d45 Initial commit: Merakomis portal, Docker stack and user-reader API.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 11:04:05 +03:00

1 line
2.7 KiB
JavaScript

"use strict";(self.webpackChunkmodule_bz=self.webpackChunkmodule_bz||[]).push([[836],{8836:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var n,i,o,a,u=r(1504);class l extends u.Component{constructor(e){super(e),this.state={loading:!0,form:{}}}}n=l,o=void 0,(i="symbol"==typeof(a=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i="defaultProps"))?a:String(a))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o,l.defaultProps={url:"",title:""};var s=r(7888),c=r(6591),f=r(392);function p(e,t,r){return t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class v extends u.Component{constructor(...e){super(...e),p(this,"wrap",void 0)}render(){var e=this;return u.createElement("div",{ref:function(t){return e.wrap=t},className:"center_content"},this.props.children)}}p(v,"defaultProps",void 0),v.defaultProps={};var m=r(500);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d.apply(this,arguments)}function b(e,t,r){return t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class h extends l{constructor(...e){var t;super(...e),t=this,b(this,"wrap",void 0),b(this,"refresh",(function(){t.setState({loading:!0},(function(){s.API.requestTheme(t.props.url,{},(function(e,r){t.setState({form:e,loading:!1})}))}))})),b(this,"save",(function(e){s.API.requestTheme("/savePortalOptions",{data:e.values},(function(){}))}))}componentDidMount(){this.refresh()}render(){var e=this;let{loading:t,form:r}=this.state;return u.createElement(m.Scrollbar,null,u.createElement("div",{ref:function(t){return e.wrap=t}},t?null:u.createElement(v,null,u.createElement(f.Sheet,null,u.createElement(f.Header,{title:this.props.title}),u.createElement(f.Body,null,u.createElement(f.Content,null,u.createElement(c.Form,d({},r,{onSubmit:this.save}))))))))}}}}]);