@livinglogic/livingapi 1.30.0 → 1.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import*as e from"/static/ul4/1.16.1/dist/esm/ul4.js";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e})(e,t)}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var r,o=_getPrototypeOf(e);if(t){var n=_getPrototypeOf(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function _get(e,t,r){var o=_superPropBase(e,t);if(o){var n=Object.getOwnPropertyDescriptor(o,t);return n.get?n.get.call(r):n.value}})(e,t,r||e)}function set(e,t,r,o){return(set="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function set(e,t,r,o){var n,l=_superPropBase(e,t);if(l){if((n=Object.getOwnPropertyDescriptor(l,t)).set)return n.set.call(o,r),!0;if(!n.writable)return!1}if(n=Object.getOwnPropertyDescriptor(o,t)){if(!n.writable)return!1;n.value=r,Object.defineProperty(o,t,n)}else!function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(o,t,r);return!0})(e,t,r,o)}function _set(e,t,r,o,n){if(!set(e,t,r,o||e)&&n)throw new Error("failed to set property");return r}function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,l=[],a=!0,i=!1;try{for(r=r.call(e);!(a=(o=r.next()).done)&&(l.push(o.value),!t||l.length!==t);a=!0);}catch(e){i=!0,n=e}finally{try{a||null==r.return||r.return()}finally{if(i)throw n}}return l}(e,t)||_unsupportedIterableToArray(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_unsupportedIterableToArray(e)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,F=function(){};return{s:F,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,l=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){a=!0,n=e},f:function(){try{l||null==r.return||r.return()}finally{if(a)throw n}}}}var t="1.30.0";function element(t){for(var r=document.createElement(t),o=arguments.length,n=new Array(o>1?o-1:0),l=1;l<o;l++)n[l-1]=arguments[l];for(var a=0,i=n;a<i.length;a++){var u=i[a];"string"==typeof u&&r.appendChild(document.createTextNode(u));var s=u instanceof Map,p=e._isobject(u);if(s||p){p&&(u=Object.entries(u));var c,_=_createForOfIteratorHelper(u);try{for(_.s();!(c=_.n()).done;){var h=_slicedToArray(c.value,2),y=h[0],d=h[1];null!==d&&r.setAttribute(y,d)}}catch(e){_.e(e)}finally{_.f()}}}return r}function _append_param_to_url(t,r,o){if(e._islist(o)||e._isset(o)){var n,l=_createForOfIteratorHelper(o);try{for(l.s();!(n=l.n()).done;){_append_param_to_url(t,r,n.value)}}catch(e){l.e(e)}finally{l.f()}}else"string"==typeof o?t.append(r,o):null!==o&&t.append(r,e._str(o))}function url_with_params(t){for(var r=new URLSearchParams,o=arguments.length,n=new Array(o>1?o-1:0),l=1;l<o;l++)n[l-1]=arguments[l];for(var a=0,i=n;a<i.length;a++){var u=i[a];if(e._islist(u)&&2==u.length)_append_param_to_url.apply(void 0,[r].concat(_toConsumableArray(u)));else if("[object Object]"!==Object.prototype.toString.call(u)||u instanceof e.Proto){if(null!==u&&"object"===_typeof(u)&&"object"===_typeof(u.__proto__)&&u.__proto__===Map.prototype){var s,p=_createForOfIteratorHelper(u);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=c[1];_append_param_to_url(r,_,h)}}catch(e){p.e(e)}finally{p.f()}}}else for(var y in u)_append_param_to_url(r,y,u[y])}return(r=r.toString().replace("+","%20")).length>0&&(t+="?"+r),t}var r=function(t){_inherits(Base,e.Proto);var r=_createSuper(Base);function Base(e){var t;return _classCallCheck(this,Base),(t=r.call(this)).id=e,t}return _createClass(Base,[{key:"ul4onid",get:function get(){return this.id}},{key:"ul4ondump",value:function ul4ondump(e){for(var t=0;t<this._ul4onattrs.length;++t)e.dump(this._dumpUL4ONAttr(this._ul4onattrs[t]))}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return this[e]}},{key:"ul4onload",value:function ul4onload(e){for(var t=0,r=e.loadcontent();;++t){var o=r.next();if(o.done)break;t<this._ul4onattrs.length&&this._loadUL4ONAttr(this._ul4onattrs[t],o.value)}for(;t<this._ul4onattrs.length;++t)this._setDefaultUL4ONAttr(this._ul4onattrs[t])}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){this[e]=t}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){this[e]=null}},{key:e.symbols.getattr,value:function value(t){if(this._ul4attrs.has(t)){var value=this[t];if("function"==typeof value){var r=value.bind(this);return r._ul4_name=value._ul4_name||value.name,r._ul4_signature=value._ul4_signature,r._ul4_needsobject=value._ul4_needsobject,r._ul4_needscontext=value._ul4_needscontext,r}return value}if(t.startsWith("x_"))return this.hasOwnProperty(t)?this[t]:null;throw new e.AttributeError(this,t)}},{key:e.symbols.setattr,value:function value(t,r){if(!t.startsWith("x_"))throw new e.AttributeError(this,t);this[t]=r}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+">"}},{key:"toString",value:function toString(){return this[e.symbols.repr]()}}]),Base}(),o=function(){function Handler(){_classCallCheck(this,Handler)}return _createClass(Handler,[{key:"save",value:function save(e){}},{key:"delete",value:function _delete(e){}}]),Handler}(),n=new(function(t){_inherits(GlobalsType,e.Type);var r=_createSuper(GlobalsType);function GlobalsType(){return _classCallCheck(this,GlobalsType),r.apply(this,arguments)}return _createClass(GlobalsType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof l}}]),GlobalsType}())("la","Globals","Global information"),l=function(t){_inherits(Globals,r);var l=_createSuper(Globals);function Globals(e){var t;return _classCallCheck(this,Globals),(t=l.call(this,e)).version=null,t.hostname=null,t.free=!1,t.platform=null,t.user=null,t.lang=null,t.datasources=null,t.app=null,t.record=null,t.mode=null,t.groups=null,t.maxdbactions=null,t.maxtemplateruntime=null,t.flashmessages=null,t.view_template_id=null,t.email_template_id=null,t.handler=new o,t._log_stack=[],t._current_geo=null,t}return _createClass(Globals,[{key:e.symbols.type,value:function value(){return n}},{key:"dist",value:function dist(e,t){var r=function sqsin(e){return(e=Math.sin(e))*e},o=function sqsos(e){return(e=Math.cos(e))*e},n=Math.PI/180,l=1/298.257223563,a=e.lat*n,i=e.long*n,u=t.lat*n,s=(a+u)/2,p=(a-u)/2,c=(i-t.long*n)/2,_=r(p)*o(c)+o(s)*r(c),h=o(p)*o(c)+r(s)*r(c),y=Math.atan(Math.sqrt(_/h)),d=2*y*6378.137;if(0===d)return d;var f=Math.sqrt(_*h)/y,v=(3*f+1)/(2*_);return d*(1+l*((3*f-1)/(2*h))*r(s)*o(p)-l*v*o(s)*r(p))}},{key:"scaled_url",value:function scaled_url(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"fill",n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"sm",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,i=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,s=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null,p=arguments.length>10&&void 0!==arguments[10]?arguments[10]:null,c=!(arguments.length>11&&void 0!==arguments[11])||arguments[11],_=null;e instanceof jr&&(e=e.archive_url,(_=encodeURIComponent(e.filename))!=e.filename&&(_=null));var h="https://"+this.hostname;return h+=c?"/imgproxycache/insecure":"/imgproxy/insecure","fit"!==o&&(h+="/rt:"+o),null!=t&&(h+="/w:"+t),null!=r&&(h+="/h:"+r),n&&(h+="/el:1"),null!=l&&(h+="/g:"+l),null!=a&&(h+="/q:"+a),null!==i&&i%360!=0&&(h+="/rot:"+rotatet),null!=u&&(h+="/bl:"+u),null!=s&&(h+="/sh:"+s),null!=p&&(h+="/f:"+p),null!=_&&(h+="/fn:"+_),h+="/plain/"+encodeURIComponent(e)}},{key:"qrcode_url",value:function qrcode_url(e,t){return"https://"+this.hostname+"/qr/generate?data="+encodeURIComponent(e)+"&size="+encodeURIComponent(t)}},{key:e.symbols.repr,value:function value(){return"<Globals version="+e._repr(this.version)+" mode="+e._repr(this.mode)+">"}},{key:"current_geo",value:function current_geo(){return this._current_geo}},{key:"set_current_geo",value:function set_current_geo(e){this._current_geo=new zr(this,e.coords.latitude,e.coords.longitude)}},{key:"_in_form",value:function _in_form(){return null!==this.mode&&this.mode.startsWith("form/")}},{key:"msg_bool",value:function msg_bool(e){switch(e){case!0:return this.msg_bool_true();case!1:return this.msg_bool_false();default:return null}}},{key:"msg_bool_true",value:function msg_bool_true(e){switch(this.lang){case"de":return"Ja";default:return"Yes"}}},{key:"msg_bool_false",value:function msg_bool_false(e){switch(this.lang){case"de":return"Nein";default:return"No"}}},{key:"msg_no_fields",value:function msg_no_fields(){switch(this.lang){case"de":return"(Keine Felder gefunden)";default:return"(No fields found)"}}},{key:"msg_nothing_selected",value:function msg_nothing_selected(){switch(this.lang){case"de":return"(Nichts ausgewählt)";default:return"(Nothing selected)"}}},{key:"_make_log_message",value:function _make_log_message(t){return t.map((function(t){return"string"!=typeof t?e._repr(t):t})).join(" ")}},{key:"begin_logging",value:function begin_logging(e){this._log_stack.push({header:e,output:!1})}},{key:"end_logging",value:function end_logging(){this._log_stack&&(this._log_stack[this._log_stack.length-1].output&&console&&console.groupEnd&&console.groupEnd(),this._log_stack.pop())}},{key:"group_logging",value:function group_logging(e,t){this.begin_logging(e);try{t()}finally{this.end_logging()}}},{key:"_start_log_message",value:function _start_log_message(){var e,t=_createForOfIteratorHelper(this._log_stack);try{for(t.s();!(e=t.n()).done;){var r=e.value;r.output||(console&&console.group&&console.group(r.header),r.output=!0)}}catch(e){t.e(e)}finally{t.f()}}},{key:"log_debug",value:function log_debug(e){this._start_log_message(),console&&console.debug&&console.debug(this._make_log_message(e))}},{key:"log_info",value:function log_info(e){this._start_log_message(),console&&console.info&&console.info(this._make_log_message(e))}},{key:"log_warning",value:function log_warning(e){this._start_log_message(),console&&console.warn&&console.warn(this._make_log_message(e))}},{key:"log_error",value:function log_error(e){this._start_log_message(),console&&console.error&&console.error(this._make_log_message(e))}},{key:"my_apps_url",value:function my_apps_url(){return"https://"+this.hostname+"/apps.htm"}},{key:"my_tasks_url",value:function my_tasks_url(){return"https://"+this.hostname+"/xist4c/web/aufgaben_id_393_.htm"}},{key:"catalog_url",value:function catalog_url(){return"https://"+this.hostname+"/katalog/home.htm"}},{key:"chats_url",value:function chats_url(){return"https://"+this.hostname+"/chats.htm"}},{key:"profile_url",value:function profile_url(){return"https://"+this.hostname+"/profil/index.htm"}},{key:"account_url",value:function account_url(){return"https://"+this.hostname+"/account.htm"}},{key:"logout_url",value:function logout_url(){return"https://"+this.hostname+"/login.htm?logout=standardCug"}}]),Globals}();l.prototype._ul4onattrs=["version","platform","user","maxdbactions","maxtemplateruntime","lang","datasources","hostname","free","app","record","mode","view_template_id","email_template_id","view_id"],l.prototype._ul4attrs=new Set(["id","version","hostname","platform","free","mode","form","app","record","datasources","externaldatasources","groups","user","lang","templates","pparams","geo","dist","maxdbactions","maxtemplateruntime","flashmessages","scaled_url","qrcode_url","current_geo","log_debug","log_info","log_warning","log_error","my_apps_url","my_tasks_url","catalog_url","chats_url","profile_url","account_url","logout_url"]),e.expose(l.prototype.log_debug,["message","*"]),e.expose(l.prototype.log_info,["message","*"]),e.expose(l.prototype.log_warning,["message","*"]),e.expose(l.prototype.log_error,["message","*"]),e.expose(l.prototype.dist,["geo1","pk","geo2","pk"]),e.expose(l.prototype.current_geo,[]),e.expose(l.prototype.scaled_url,["image","p","width","p","height","p","type","k=","fill","enlarge","k=",!0,"gravity","k=","sm","quality","k=",null,"rotate","k=",null,"blur","k=",null,"sharpen","k=",null,"format","k=",null,"cache","k=",!0]);var a=new(function(t){_inherits(FlashMessageType,e.Type);var r=_createSuper(FlashMessageType);function FlashMessageType(){return _classCallCheck(this,FlashMessageType),r.apply(this,arguments)}return _createClass(FlashMessageType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof i}}]),FlashMessageType}())("la","FlashMessage","A flash message in a web page"),i=function(t){_inherits(FlashMessage,r);var o=_createSuper(FlashMessage);function FlashMessage(){return _classCallCheck(this,FlashMessage),o.apply(this,arguments)}return _createClass(FlashMessage,[{key:e.symbols.type,value:function value(){return a}},{key:e.symbols.repr,value:function value(){return"<FlashMessage type="+e._repr(this.type)+" title="+e._repr(this.title)+">"}}]),FlashMessage}();i.prototype._ul4onattrs=["timestamp","type","title","message"],i.prototype._ul4attrs=new Set(["timestamp","type","title","message"]);var u=new(function(t){_inherits(PermissionType,e.Type);var r=_createSuper(PermissionType);function PermissionType(){return _classCallCheck(this,PermissionType),r.apply(this,arguments)}return _createClass(PermissionType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof s}}]),PermissionType}())("la","Permission","Permission information"),s=function(t){_inherits(Permission,r);var o=_createSuper(Permission);function Permission(){return _classCallCheck(this,Permission),o.apply(this,arguments)}return _createClass(Permission,[{key:e.symbols.type,value:function value(){return u}},{key:e.symbols.repr,value:function value(){return"<Permission id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}},{key:"edit",get:function get(){return"1"==this.permissions.charAt(0)}},{key:"config",get:function get(){return"1"==this.permissions.charAt(1)}},{key:"delete",get:function get(){return"1"==this.permissions.charAt(2)}},{key:"task_manage",get:function get(){return"1"==this.permissions.charAt(3)}},{key:"data_edit",get:function get(){return"1"==this.permissions.charAt(4)}},{key:"data_view",get:function get(){return"1"==this.permissions.charAt(5)}},{key:"task_view",get:function get(){return"1"==this.permissions.charAt(6)}},{key:"frontend",get:function get(){return"1"==this.permissions.charAt(7)}},{key:"data_connect_external",get:function get(){return"1"==this.permissions.charAt(8)}},{key:"perform_evaluation",get:function get(){return"1"==this.permissions.charAt(9)}},{key:"to_catalog",get:function get(){return"1"==this.permissions.charAt(10)}},{key:"data_import_export",get:function get(){return"1"==this.permissions.charAt(11)}},{key:"mydata_view",get:function get(){return"1"==this.permissions.charAt(12)}},{key:"mydata_edit",get:function get(){return"1"==this.permissions.charAt(13)}},{key:"user_admin",get:function get(){return"1"==this.permissions.charAt(14)}}]),Permission}();s.prototype._ul4onattrs=["permissions"],s.prototype._ul4attrs=new Set(["permissions","edit","config","delete","task_manage","data_edit","data_view","task_view","frontend","data_connect_external","perform_evaluation","to_catalog","data_import_export","mydata_view","mydata_edit","user_admin"]);var p=function(t){_inherits(AppType,e.Type);var r=_createSuper(AppType);function AppType(){return _classCallCheck(this,AppType),r.apply(this,arguments)}return _createClass(AppType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof _}}]),AppType}(),c=new p("la","App","A LivingApps application"),_=function(t){_inherits(App,r);var o=_createSuper(App);function App(){return _classCallCheck(this,App),o.apply(this,arguments)}return _createClass(App,[{key:e.symbols.type,value:function value(){return c}},{key:e.symbols.repr,value:function value(){return"<App id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}},{key:"group",get:function get(){return this.appgroup}},{key:"insert",value:function insert(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this[e.symbols.call](t);return this.globals.handler.save(this),r}},{key:"template_url",value:function template_url(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0,o="https://"+this.globals.hostname+"/gateway/apps/"+this.id;return null!==t&&(o+="/"+t.id),url_with_params(o,["template",e],r)}},{key:"new_embedded_url",value:function new_embedded_url(e){return url_with_params("https://"+this.globals.hostname+"/dateneingabe/"+this.id+"/new",e)}},{key:"new_standalone_url",value:function new_standalone_url(e){return url_with_params("https://"+this.globals.hostname+"/gateway/apps/"+this.id+"/new",e)}},{key:"home_url",value:function home_url(){return"https://"+this.globals.hostname+"/apps/"+this.id+".htm"}},{key:"datamanagement_url",value:function datamanagement_url(){return"https://"+this.globals.hostname+"/_id_36_.htm?uuid="+this.id+"&dId="+this.id+"&resetInfo=true&templateIdentifier=created_"+this.id}},{key:"import_url",value:function import_url(){return"https://"+this.globals.hostname+"/import-export/"+this.id+".htm"}},{key:"tasks_url",value:function tasks_url(){return"https://"+this.globals.hostname+"/_id_1073_.htm?uuid="+this.id+"&dId="+this.id+"&p_tpl_uuid="+this.id+"&resetInfo=true&templateIdentifier=created_task_"+this.id}},{key:"datamanagement_config_url",value:function datamanagement_config_url(){return"https://"+this.globals.hostname+"/datenmanagement-konfigurieren/"+this.id+".htm"}},{key:"permissions_url",value:function permissions_url(){return"https://"+this.globals.hostname+"/_id_833_.htm?uuid="+this.id+"&dId="+this.id+"&resetInfo=true"}},{key:"datamanageview_url",value:function datamanageview_url(e){return"https://"+this.globals.hostname+"/_id_36_.htm?uuid="+this.id+"&dId="+this.id+"&resetInfo=true&templateIdentifier=created_"+this.id+"_datamanage_master_"+e}},{key:"layout_controls",get:function get(){return null===this.active_view?new Map:this.active_view.layout_controls}},{key:e.symbols.call,value:function value(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=new T(null,this);if(e._ismap(t)){var o,n=_createForOfIteratorHelper(t.keys());try{for(n.s();!(o=n.n()).done;){var l=o.value;if(!r.fields.has(l))throw new e.ArgumentError(e._repr(this)+"() get an unexpected keyword argument "+e._repr(l))}}catch(e){n.e(e)}finally{n.f()}r._make_fields(!0,t,null,null)}else{if(!e._isobject(t))throw new e.TypeError("values must be an object or a Map");for(var a in t)if(!r.fields.has(a))throw new e.ArgumentError(e._repr(this)+"() get an unexpected keyword argument "+e._repr(a));r._make_fields(!0,new Map(e._list(e.dicttype.items(t))),null,null)}return r}},{key:e.symbols.getattr,value:function value(t){if(t.startsWith("c_")){if(!this.controls.has(t.substr(2)))throw new e.AttributeError(this,t);return this.controls.get(t.substr(2))}if(t.startsWith("lc_")){if(null===this.layout_controls||!this.layout_controls.has(t.substr(3)))throw new e.AttributeError(this,t);return this.layout_controls.get(t.substr(3))}if(t.startsWith("p_")){var r=t.substr(2);if(null!==this.params&&this.params.has(r))return this.params.get(r);if(null!==this.appgroup&&null!==this.appgroup.params&&this.appgroup.params.has(r))return this.appgroup.params.get(r);throw new e.AttributeError(this,t)}if(t.startsWith("pv_")){var o=t.substr(3);if(null!==this.params&&this.params.has(o))return this.params.get(o).value;if(null!==this.appgroup&&null!==this.appgroup.params&&this.appgroup.params.has(o))return this.appgroup.params.get(o).value;throw new e.AttributeError(this,t)}return _get(_getPrototypeOf(App.prototype),e.symbols.getattr,this).call(this,t)}},{key:"active_view",get:function get(){return this._active_view}},{key:"active_view",set:function set(t){if(null===t);else if("string"==typeof t){if(null===this.views||!this.views.has(t))throw new e.ValueError("View "+e._repr(t)+" not found!");t=this.views.get(t)}else{if(!(t instanceof f))throw new e.TypeError(e._repr(t)+" is not a view!");if(t.app!==this)throw new e.ValueError("View "+e._repr(t)+" belongs to the wrong app!")}this._active_view=t}},{key:"layout_controls",get:function get(){return null===this.active_views?new Map:this.active_view.layout_controls}},{key:"permissions",get:function get(){if("string"==typeof this._permissions){var e=this._permissions;this._permissions=new s,this._permissions.permissions=e}return this._permissions}}]),App}();_.prototype._ul4onattrs=["globals","internal_id","name","description","lang","appgroup","typename_grammatical_gender","typename_nominative_singular","typename_genitive_singular","typename_dative_singular","typename_accusative_singular","typename_nominative_plural","typename_genitive_plural","typename_dative_plural","typename_accusative_plural","startlink","image","createdby","controls","records","record_start","record_count","record_total","installation","categories","params","views","datamanagement_identifier","basetable","primarykey","insertprocedure","updateprocedure","deleteprocedure","templates","createdat","updatedat","updatedby","superid","favorite","_active_view","datasource","main","ai_generated","viewtemplates","filter_default","sort_default","filter_owndata","_permissions","data_actions"],_.prototype._ul4attrs=new Set(["id","globals","name","description","lang","appgroup","group","main","ai_generated","typename_grammatical_gender","typename_nominative_singular","typename_genitive_singular","typename_dative_singular","typename_accusative_singular","typename_nominative_plural","typename_genitive_plural","typename_dative_plural","typename_accusative_plural","startlink","image","createdat","createdby","updatedat","updatedby","controls","layout_controls","records","record_start","record_count","record_total","installation","categories","params","views","menus","panels","datasource","datamanagement_identifier","insert","favorite","_active_view","filter_default","sort_default","filter_owndata","permissions","data_actions","template_url","new_embedded_url","new_standalone_url","home_url","datamanagement_url","import_url","tasks_url","datamanagement_config_url","permissions_url","datamanageview_url"]),e.expose(_.prototype[e.symbols.call],["values","**"],{needsobject:!0}),e.expose(_.prototype.insert,["values","**"],{needsobject:!0}),e.expose(_.prototype.template_url,["identifier","p","record","p=",null,"params","**"]),e.expose(_.prototype.new_embedded_url,["params","**"]),e.expose(_.prototype.new_standalone_url,["params","**"]);var h=new p("la","AppGroup","A group of LivingApps"),y=function(t){_inherits(AppGroup,r);var o=_createSuper(AppGroup);function AppGroup(){return _classCallCheck(this,AppGroup),o.apply(this,arguments)}return _createClass(AppGroup,[{key:e.symbols.type,value:function value(){return h}},{key:e.symbols.repr,value:function value(){return"<AppGroup id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),AppGroup}();y.prototype._ul4onattrs=["globals","name","description","image","apps","main_app","params"],y.prototype._ul4attrs=new Set(["globals","id","name","description","image","apps","main_app","params"]);var d=new(function(t){_inherits(ViewType,e.Type);var r=_createSuper(ViewType);function ViewType(){return _classCallCheck(this,ViewType),r.apply(this,arguments)}return _createClass(ViewType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof f}}]),ViewType}())("la","View","An input form for a LivingViews application"),f=function(t){_inherits(View,r);var o=_createSuper(View);function View(){return _classCallCheck(this,View),o.apply(this,arguments)}return _createClass(View,[{key:"globals",get:function get(){return this.app.globals}},{key:e.symbols.type,value:function value(){return d}},{key:e.symbols.repr,value:function value(){return"<View id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),View}();f.prototype._ul4onattrs=["name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang","login_required","result_page","use_geo"],f.prototype._ul4attrs=new Set(["id","name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang","login_required","result_page","use_geo"]);var v=new(function(t){_inherits(DataSourceType,e.Type);var r=_createSuper(DataSourceType);function DataSourceType(){return _classCallCheck(this,DataSourceType),r.apply(this,arguments)}return _createClass(DataSourceType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof k}}]),DataSourceType}())("la","DataSource","The data resulting from a data source configuration"),k=function(t){_inherits(DataSource,r);var o=_createSuper(DataSource);function DataSource(){return _classCallCheck(this,DataSource),o.apply(this,arguments)}return _createClass(DataSource,[{key:e.symbols.type,value:function value(){return v}},{key:e.symbols.repr,value:function value(){return"<DataSource id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataSource}();k.prototype._ul4onattrs=["identifier","app","apps","filter","sort"],k.prototype._ul4attrs=new Set(["id","identifier","app","apps","filter","sort"]),new(function(t){_inherits(DataSourceChildrenType,e.Type);var r=_createSuper(DataSourceChildrenType);function DataSourceChildrenType(){return _classCallCheck(this,DataSourceChildrenType),r.apply(this,arguments)}return _createClass(DataSourceChildrenType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof m}}]),DataSourceChildrenType}())("la","DataSourceChildren","A master/detail specification in a data source");var m=function(t){_inherits(DataSourceChildren,r);var o=_createSuper(DataSourceChildren);function DataSourceChildren(){return _classCallCheck(this,DataSourceChildren),o.apply(this,arguments)}return _createClass(DataSourceChildren,[{key:e.symbols.type,value:function value(){return datasourcetypechildren}},{key:e.symbols.repr,value:function value(){return"<DataSourceChildren id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataSourceChildren}();m.prototype._ul4onattrs=["datasource","identifier","control","filter","sort"],m.prototype._ul4attrs=new Set(["id","identifier","datasource","control","filter","sort"]);var C=new(function(t){_inherits(RecordChildrenType,e.Type);var r=_createSuper(RecordChildrenType);function RecordChildrenType(){return _classCallCheck(this,RecordChildrenType),r.apply(this,arguments)}return _createClass(RecordChildrenType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof g}}]),RecordChildrenType}())("la","RecordChildren","The child records of a master record"),g=function(t){_inherits(RecordChildren,r);var o=_createSuper(RecordChildren);function RecordChildren(){return _classCallCheck(this,RecordChildren),o.apply(this,arguments)}return _createClass(RecordChildren,[{key:e.symbols.type,value:function value(){return C}},{key:e.symbols.repr,value:function value(){return"<RecordChildren id="+e._repr(this.id)+">"}}]),RecordChildren}();g.prototype._ul4onattrs=["record","datasourcechildren","records","record_start","record_count","record_total"],g.prototype._ul4attrs=new Set(["id","record","datasourcechildren","records","record_start","record_count","record_total"]);var b=new(function(t){_inherits(RecordType,e.Type);var r=_createSuper(RecordType);function RecordType(){return _classCallCheck(this,RecordType),r.apply(this,arguments)}return _createClass(RecordType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof T}}]),RecordType}())("la","Record","A record of a LivingApp application"),T=function(t){_inherits(Record,r);var o=_createSuper(Record);function Record(e,t){var r;return _classCallCheck(this,Record),(r=o.call(this,e)).app=t,r.createdat=null,r.createdby=null,r.updatedat=null,r.updatedby=null,r.updatecount=0,r._sparsevalues=new Map,r._values=null,r._fields=null,r.details=new Map,r._children=null,r.attachments=null,r.errors=[],r._sparsefielderrors=null,r._sparsefieldlookupdata=null,r._is_deleted=!1,r._is_new=!0,r}return _createClass(Record,[{key:e.symbols.type,value:function value(){return b}},{key:"as_text",value:function as_text(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(0==e)return"...";var r,o=[],n=_createForOfIteratorHelper(t||this.app.controls);try{for(n.s();!(r=n.n()).done;){var l=_slicedToArray(r.value,2),a=l[0],i=l[1];if(null!==t||i.priority){var u=this.fields.get(a).value_as_text(e-1);null!==u&&o.push([i.label,u])}}}catch(e){n.e(e)}finally{n.f()}if(0===o.length)return this.globals.msg_no_fields();if(1===o.length)return o[0][1];for(var s=[],p=0,c=o;p<c.length;p++){var _=_slicedToArray(c[p],2),h=_[0],y=_[1];s.push(h+": "+y)}return s.join(", ")}},{key:"_make_fields",value:function _make_fields(e,t,r,o){var n,l=new Map,a=_createForOfIteratorHelper(this.app.controls.values());try{for(a.s();!(n=a.n()).done;){var i=n.value,u=i.identifier,s=null;null!==t&&(e&&!t.has(u)?s=i.default:t.has(u)&&(s=t.get(u)));var p=new i.fieldtype(i,this,s);l.set(u,p),null!==r&&r.has(u)&&(p.errors=r.get(u)),null!==o&&o.has(u)&&(p.lookupdata=o.get(u))}}catch(e){a.e(e)}finally{a.f()}this._fields=l,this._sparsevalues=null,this._sparsefielderrors=null,this._sparselookupdata=null}},{key:"_in_form",value:function _in_form(){var e=this.app.globals;return e._in_form()&&this===e.record}},{key:e.symbols.repr,value:function value(){var t,r=["<Record id=",e._repr(this.id)],o=_createForOfIteratorHelper(this.fields.values());try{for(o.s();!(t=o.n()).done;){var n=t.value;n.control.priority&&!n.is_empty()&&(r.push(" v_"),r.push(n.control.identifier),r.push("="),r.push(e._repr(n.value)))}}catch(e){o.e(e)}finally{o.f()}return r.push(" state="),r.push(e._repr(this.state)),r.push(">"),r.join("")}},{key:"state",get:function get(){return this._is_deleted?"deleted":this._is_new?"new":this.is_dirty()?"dirty":"saved"}},{key:"values",get:function get(){if(null===this._values){this._values=new Map;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){var r=e.value;this._values.set(r.control.identifier,r.value)}}catch(e){t.e(e)}finally{t.f()}}return this._values}},{key:"fields",get:function get(){return null===this._fields&&this._make_fields(!1,this._sparsevalues,this._sparsefielderrors,this._sparsefieldlookupdata),this._fields}},{key:"children",get:function get(){if(null===this._children){this._children=new Map;var e,t=_createForOfIteratorHelper(this.details.values());try{for(t.s();!(e=t.n()).done;){var r=e.value;this._children.set(r.datasourcechildren.identifier,r.records)}}catch(e){t.e(e)}finally{t.f()}}return this._children}},{key:"is_dirty",value:function is_dirty(){if(null===this.id)return!0;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){if(e.value.is_dirty())return!0}}catch(e){t.e(e)}finally{t.f()}return!1}},{key:"has_errors",value:function has_errors(){if(0!==this.errors.length)return!0;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){if(e.value.has_errors())return!0}}catch(e){t.e(e)}finally{t.f()}return!1}},{key:"delete",value:function _delete(){var e=this.app.globals.handler.delete(this);return this._is_deleted=!0,e}},{key:"save",value:function save(){this.app.globals.handler.save(this)}},{key:"update",value:function update(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e._ismap(t)){var r,o=_createForOfIteratorHelper(t.entries());try{for(o.s();!(r=o.n()).done;){var n=_slicedToArray(r.value,2),l=n[0],a=n[1];if(!this.fields.has(l))throw new e.ArgumentError("update() get an unexpected keyword argument "+e._repr(l));fields.get(l).value=a}}catch(e){o.e(e)}finally{o.f()}}else{if(!e._isobject(t))throw new e.TypeError("values must be an object or a Map");for(var i in t){if(!this.fields.has(i))throw new e.ArgumentError("update() get an unexpected keyword argument "+e._repr(i));record.fields.get(i).value=t[i]}}this.app.globals.handler.save(this)}},{key:"template_url",value:function template_url(e,t){return url_with_params("https://"+this.app.globals.hostname+"/gateway/apps/"+this.app.id+"/"+this.id,["template",e],t)}},{key:"edit_embedded_url",value:function edit_embedded_url(e){return url_with_params("https://"+this.app.globals.hostname+"/dateneingabe/"+this.app.id+"/"+this.id+"/edit",e)}},{key:"edit_standalone_url",value:function edit_standalone_url(e){return url_with_params("https://"+this.app.globals.hostname+"/gateway/apps/"+this.app.id+"/"+this.id+"/edit",e)}},{key:"edit_url",value:function edit_url(t){return"standalone"===this.app[e.symbols.getattr]("pv_la_default_form_variant")?this.edit_standalone_url(t):this.edit_embedded_url(t)}},{key:"display_embedded_url",value:function display_embedded_url(e){return url_with_params("https://"+this.app.globals.hostname+"/dateneingabe/"+this.app.id+"/"+this.id+"/display",e)}},{key:"display_standalone_url",value:function display_standalone_url(e){return url_with_params("https://"+this.app.globals.hostname+"/gateway/apps/"+this.app.id+"/"+this.id+"/display",e)}},{key:"display_url",value:function display_url(t){return"standalone"===this.app[e.symbols.getattr]("pv_la_default_form_variant")?this.display_standalone_url(t):this.display_embedded_url(t)}},{key:"search",value:function search(t){for(var r in t){var o=t[r];if(e._bool(o)&&!this.fields.get(r).search(o))return!1}return!0}},{key:"ul4onload",value:function ul4onload(e){_get(_getPrototypeOf(Record.prototype),"ul4onload",this).call(this,e),this._is_new=!1}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return"values"===e?this._sparsevalues:this[e]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){"values"===e?(this._sparsevalues=t,this._values=null,this._fields=null):this[e]=t}},{key:e.symbols.getattr,value:function value(t){return t.startsWith("c_")?this.children.get(t.substr(2)):t.startsWith("d_")?this.details.get(t.substr(2)):t.startsWith("f_")?this.fields.get(t.substr(2)):t.startsWith("v_")?this.fields.get(t.substr(2)).value:_get(_getPrototypeOf(Record.prototype),e.symbols.getattr,this).call(this,t)}},{key:e.symbols.setattr,value:function value(t,r){t.startsWith("c_")?this.children[t.substr(2)]=r:t.startsWith("v_")?this.fields.get(t.substr(2)).value=r:_get(_getPrototypeOf(Record.prototype),e.symbols.setattr,this).call(this,t,r)}}]),Record}();T.prototype._ul4onattrs=["app","createdat","createdby","updatedat","updatedby","updatecount","_sparsevalues","attachments","details","errors","_sparsefielderrors","_sparsefieldlookupdata"],T.prototype._ul4attrs=new Set(["id","app","createdat","createdby","updatedat","updatedby","updatecount","values","fields","attachments","details","children","errors","template_url","edit_embedded_url","edit_standalone_url"]),e.expose(T.prototype.is_dirty,[]),e.expose(T.prototype.has_errors,[]),e.expose(T.prototype.delete,[]),e.expose(T.prototype.save,[]),e.expose(T.prototype.update,["values","**"],{needsobject:!0}),e.expose(T.prototype.template_url,["identifier","p","params","**"]),e.expose(T.prototype.edit_embedded_url,["params","**"]),e.expose(T.prototype.edit_standalone_url,["params","**"]);var L=function(t){_inherits(FieldType,e.Type);var r=_createSuper(FieldType);function FieldType(){return _classCallCheck(this,FieldType),r.apply(this,arguments)}return _createClass(FieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof w}}]),FieldType}(),A=new L("la","Field","Holds the value of a field of a record (and related information)"),w=function(t){_inherits(Field,r);var o=_createSuper(Field);function Field(e,t,r){var n;return _classCallCheck(this,Field),(n=o.call(this,null)).control=e,n.record=t,n._label=null,n._description=null,n._lookupdata=null,n.errors=[],n._value=null,n._in_form()||(n.value=r),n._dirty=!1,n._enabled=!0,n._writable=!0,n._visible=!0,n._required=null,n._in_text=null,n._top=null,n._left=null,n}return _createClass(Field,[{key:e.symbols.type,value:function value(){return A}},{key:"value",get:function get(){return this._in_form()?this._get_dom_value():this._value}},{key:"value",set:function set(t){var r=this._value,o={value:t,errors:[]};this._validate(o),e._ne(r,o.value)&&(null!==this.record._values&&this.record._values.set(this.control.identifier,o.value),this._value=o.value,this._dirty=!0),this.errors=o.errors,this._in_form()&&this._set_dom_value(this._value)}},{key:"value_as_text",value:function value_as_text(){return null}},{key:"_validate",value:function _validate(e){}},{key:"_set_dom_label",value:function _set_dom_label(){this._in_form()&&(this._dom_label.textContent=this.label)}},{key:"mode",get:function get(){var e;return null!==(e=this._mode)&&void 0!==e?e:this.control.mode}},{key:"mode",set:function set(e){this._mode=e}},{key:"label",get:function get(){var e;return null!==(e=this._label)&&void 0!==e?e:this.control.label}},{key:"label",set:function set(e){this._label=e,this._set_dom_label()}},{key:"description",get:function get(){var e;return null!==(e=this._description)&&void 0!==e?e:this.control.description}},{key:"description",set:function set(e){this._description=e}},{key:"globals",get:function get(){return this.control.globals}},{key:"is_empty",value:function is_empty(){return null===this._value}},{key:"is_dirty",value:function is_dirty(){return this._dirty}},{key:"has_errors",value:function has_errors(){return 0!==this.errors.length}},{key:"add_error",value:function add_error(e){this.errors.push(e)}},{key:"set_error",value:function set_error(e){this.errors=null!==e?[e]:[]}},{key:"top",get:function get(){var e;return null!==(e=this._top)&&void 0!==e?e:this.control.top}},{key:"top",set:function set(e){this._top=e,this._in_form()&&(this._dom_root.style.top=this.top+"px")}},{key:"left",get:function get(){var e;return null!==(e=this._left)&&void 0!==e?e:this.control.left}},{key:"left",set:function set(e){this._left=e,this._in_form()&&(this._dom_root.style.left=this.left+"px")}},{key:"width",get:function get(){return this.control.width}},{key:"height",get:function get(){return this.control.width}},{key:"search",value:function search(e){return this.control.search(this.value,e)}},{key:"msg_field_required",value:function msg_field_required(e){switch(this.globals.lang){case"de":return'"'.concat(this.label,'" wird benötigt!');default:return'"'.concat(this.label,'" is required!')}}},{key:"msg_field_wrong_type",value:function msg_field_wrong_type(t){return'"'.concat(this.label,"\" doesn't support the type ").concat(e._type(t).name,"!")}},{key:"msg_bool_truerequired",value:function msg_bool_truerequired(e){return'"'.concat(this.label,'" only accepts "Yes"!')}},{key:"msg_string_tooshort",value:function msg_string_tooshort(e){return'"'.concat(this.label,'" is too short. You must use at least ').concat(this.control.minlength," characters!")}},{key:"msg_string_toolong",value:function msg_string_toolong(e){return'"'.concat(this.label,'" is too long. You may use at most ').concat(this.control.maxlength," characters!")}},{key:"msg_email_format",value:function msg_email_format(e){return'"'.concat(this.label,'" must be a valid email address!')}},{key:"msg_url_format",value:function msg_url_format(e){return'"'.concat(this.label,'" must be a valid URL!')}},{key:"msg_tel_format",value:function msg_tel_format(e){return'"'.concat(this.label,'" must be a valid phone number!')}},{key:"msg_date_format",value:function msg_date_format(e){return'"'.concat(this.label,"\" doesn't support this date format!")}},{key:"msg_number_format",value:function msg_number_format(e){return'"'.concat(this.label,"\" doesn't support this number format!")}},{key:"msg_lookup_wrongitem",value:function msg_lookup_wrongitem(t){return"The option ".concat(e._repr(t),' for "').concat(this.label,"\" doesn't belong to this lookup!")}},{key:"msg_lookup_unknownkey",value:function msg_lookup_unknownkey(t){return"The option ".concat(e._repr(t),' for "').concat(this.label,'" is unknown!')}},{key:"msg_applookup_wrongrecord",value:function msg_applookup_wrongrecord(t){return"The record ".concat(e._repr(t),' for "').concat(this.label,"\" doesn't belong to the correct app!")}},{key:"msg_applookup_unknownkey",value:function msg_applookup_unknownkey(t){return"The record ".concat(e._repr(t),' for "').concat(this.label,"\" can't be found!")}},{key:"_in_form",value:function _in_form(){return this.record._in_form()}},{key:"_sel_root",get:function get(){return"#livingapps-form ."+this.control._cssclass_root+".llft-id-"+this.control.identifier}},{key:"_sel_label",get:function get(){return this._sel_root+" label span"}},{key:"_sel_control",get:function get(){return this._sel_root+" "+this.control._cssclass_control}},{key:"_dom_root",get:function get(){return document.querySelector(this._sel_root)}},{key:"_dom_label",get:function get(){return document.querySelector(this._sel_label)}},{key:"_dom_control",get:function get(){return document.querySelector(this._sel_control)}},{key:"_dom_controls",get:function get(){return document.querySelectorAll(this._sel_control)}},{key:"_get_dom_value",value:function _get_dom_value(){return this._dom_control.value}},{key:"_set_dom_value",value:function _set_dom_value(e){this._dom_control.value=null!==e?e:""}},{key:"visible",get:function get(){return this._visible}},{key:"visible",set:function set(e){this._in_form()&&(this._dom_root.hidden=!e),this._visible=e}},{key:"required",get:function get(){var e;return null!==(e=this._required)&&void 0!==e?e:this.control.required}},{key:"required",set:function set(e){this._required=e}},{key:"in_list",get:function get(){return this.control.in_list}},{key:"in_mobile_list",get:function get(){return this.control.in_mobile_list}},{key:"in_text",get:function get(){var e;return null!==(e=this._in_text)&&void 0!==e?e:this.control.in_text}},{key:"in_text",set:function set(e){this._in_text=e}},{key:"enabled",get:function get(){return this._in_form()?!this._dom_root.classList.contains("llft-control-readonly"):this._enabled}},{key:"enabled",set:function set(e){if(this._in_form()){var t,r=!e,o=_createForOfIteratorHelper(this._dom_controls);try{for(o.s();!(t=o.n()).done;){t.value.disabled=r}}catch(e){o.e(e)}finally{o.f()}this._dom_root.classList.toggle("llft-control-readonly",r)}this._enabled=e}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){this._writable=e}},{key:e.symbols.repr,value:function value(){var t="<"+this.constructor.name+" identifier=";return t+=e._repr(this.control.identifier),this._dirty&&(t+=" is_dirty()=True"),this.errors.length>0&&(t+=" has_errors()=True"),t+=">"}},{key:e.symbols.setattr,value:function value(t,r){if("value"===t)this.value=r;else if("visible"===t)this.visible=e._bool(r);else if("enabled"===t)this.enabled=e._bool(r);else if("writable"===t)this.writable=e._bool(r);else if("required"===t)this.required=e._bool(r);else if("top"===t){if(null!==r&&"number"!=typeof r)throw new e.ArgumentError("top must be None or an int");this.top=r}else if("left"===t){if(null!==r&&"number"!=typeof r)throw new e.ArgumentError("left must be None or an int");this.left=r}else _get(_getPrototypeOf(Field.prototype),e.symbols.setattr,this).call(this,t,r)}}]),Field}();w.prototype._ul4onattrs=["control","record","label","value","errors","_visible","_enabled","_writable","_required"],w.prototype._ul4attrs=new Set(["control","record","label","description","value","mode","errors","visible","enabled","writable","required","in_text","top","left","width","height"]),w.prototype._inputevent="input";var S=new(function(e){_inherits(BoolFieldType,L);var t=_createSuper(BoolFieldType);function BoolFieldType(){return _classCallCheck(this,BoolFieldType),t.apply(this,arguments)}return _createClass(BoolFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof M}}]),BoolFieldType}())("la","BoolField","Holds the value of a bool field of a record (and related information)"),M=function(t){_inherits(BoolField,w);var r=_createSuper(BoolField);function BoolField(){return _classCallCheck(this,BoolField),r.apply(this,arguments)}return _createClass(BoolField,[{key:e.symbols.type,value:function value(){return S}},{key:"_validate",value:function _validate(e){null===e.value?this.control.required&&e.errors.push(this.msg_field_required(e.value)):"string"==typeof e.value?0===e.value.length?(this.control.required&&e.errors.push(this.msg_bool_truerequired(e.value)),e.value=null):["false","no","0","off"].includes(e.value.toLowerCase())?e.value=!1:e.value=!0:"boolean"==typeof e.value?this.control.required&&!e.value&&e.errors.push(this.msg_bool_truerequired(e.value)):(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}},{key:"_get_dom_value",value:function _get_dom_value(){return this._dom_control.checked}},{key:"_set_dom_value",value:function _set_dom_value(e){this._dom_control.checked=e}},{key:"value_as_text",value:function value_as_text(){return this.globals.msg_bool(this.value)}}]),BoolField}(),x=new(function(e){_inherits(IntFieldType,L);var t=_createSuper(IntFieldType);function IntFieldType(){return _classCallCheck(this,IntFieldType),t.apply(this,arguments)}return _createClass(IntFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof I}}]),IntFieldType}())("la","IntField","Holds the value of an int field of a record (and related information)"),I=function(t){_inherits(IntField,w);var r=_createSuper(IntField);function IntField(){return _classCallCheck(this,IntField),r.apply(this,arguments)}return _createClass(IntField,[{key:e.symbols.type,value:function value(){return x}},{key:"_parse",value:function _parse(e){return/^\s*[-+]?\d+\s*$/.test(e)?parseInt(e):null}},{key:"_validate",value:function _validate(e){if(null===e.value)this.control.required&&e.errors.push(this.msg_field_required(e.value));else if("string"==typeof e.value){var t=this._parse(e.value);null!==t?e.value=t:e.errors.push(this.msg_number_format(e.value))}else"number"==typeof e.value?Math.round(e.value)!==e.value&&e.errors.push(this.msg_field_wrong_type(e.value)):(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(IntField.prototype),"_get_dom_value",this).call(this);if(e){var t=this._parse(e);null!==t&&(e=t)}return e}},{key:"_set_dom_value",value:function _set_dom_value(e){_get(_getPrototypeOf(IntField.prototype),"_set_dom_value",this).call(this,null!==e?e+"":"")}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null!=e?e+"":null}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){if(this._in_form()){var t,r=!e,o=_createForOfIteratorHelper(this._dom_controls);try{for(o.s();!(t=o.n()).done;){t.value.readOnly=r}}catch(e){o.e(e)}finally{o.f()}}_set(_getPrototypeOf(IntField.prototype),"writable",e,this,!0)}}]),IntField}(),H=new(function(e){_inherits(NumberFieldType,L);var t=_createSuper(NumberFieldType);function NumberFieldType(){return _classCallCheck(this,NumberFieldType),t.apply(this,arguments)}return _createClass(NumberFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof R}}]),NumberFieldType}())("la","NumberField","Holds the value of a number field of a record (and related information)"),R=function(t){_inherits(NumberField,w);var r=_createSuper(NumberField);function NumberField(){return _classCallCheck(this,NumberField),r.apply(this,arguments)}return _createClass(NumberField,[{key:e.symbols.type,value:function value(){return H}},{key:"_parse",value:function _parse(e){if(null===e)return null;for(var t=e,r="",o=0,n=0,l=0;l<e.length;++l){var a=e[l];","==a?(o++,r+=a):"."==a&&(n++,r+=a)}var i=null;if(0==o)n<=1||(i="de");else if(1==o)i=1==n?".,"==r?"de":"en":"de";else{if(!(n<=1))return null;i="en"}"de"===i?t=t.replace(/\./g,"").replace(/,/g,"."):"en"===i&&(t=t.replace(/,/g,""));var u=parseFloat(t);return isNaN(u)?e:u}},{key:"_validate",value:function _validate(t){if(null===t.value||""===t.value)this.control.required&&t.errors.push(this.msg_field_required(t.value)),t.value=null;else if("string"==typeof t.value){var r=this._parse(t.value);null!==r?(r=this._bound_value(r),null!==this.control.precision&&(r=e._round(r,this.control.precision)),t.value=r):t.errors.push(this.msg_number_format(t.value))}else if("number"==typeof t.value){var o=this._bound_value(t.value);null!==this.control.precision&&(o=e._round(o,this.control.precision)),t.value=o}else t.errors.push(this.msg_field_wrong_type(t.value)),t.value=null}},{key:"_bound_value",value:function _bound_value(e){return null!==this.control.minimum&&e<this.control.minimum&&(e=this.control.minimum),null!==this.control.maximum&&e>this.control.maximum&&(e=this.control.maximum),e}},{key:"_get_dom_value",value:function _get_dom_value(){var t=_get(_getPrototypeOf(NumberField.prototype),"_get_dom_value",this).call(this);if(t){if("string"==typeof t){var r=this._parse(t);null!==r&&(t=r)}"number"==typeof t&&(null!==this.control.precision&&(t=e._round(t,this.control.precision)),t=this._bound_value(t))}else t=null;return t}},{key:"_set_dom_value",value:function _set_dom_value(e){"number"==typeof e?(e=this._bound_value(e),null!==this.control.precision&&(e=e.toFixed(this.control.precision))):null===e&&(e=""),e+="","de"==this.globals.lang&&null===this.control.precision&&(e=e.replace(".",",")),_get(_getPrototypeOf(NumberField.prototype),"_set_dom_value",this).call(this,e)}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e?null:null!==this.control.precision?e.toFixed(this.control.precision):e.toString()}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){if(this._in_form()){var t,r=!e,o=_createForOfIteratorHelper(this._dom_controls);try{for(o.s();!(t=o.n()).done;){t.value.readOnly=r}}catch(e){o.e(e)}finally{o.f()}}_set(_getPrototypeOf(NumberField.prototype),"writable",e,this,!0)}}]),NumberField}(),D=function(e){_inherits(StringFieldType,L);var t=_createSuper(StringFieldType);function StringFieldType(){return _classCallCheck(this,StringFieldType),t.apply(this,arguments)}return _createClass(StringFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof P}}]),StringFieldType}(),O=new D("la","StringField","Holds the value of a string field of a record (and related information)"),P=function(t){_inherits(StringField,w);var r=_createSuper(StringField);function StringField(e,t,o){var n;return _classCallCheck(this,StringField),(n=r.call(this,e,t,o))._placeholder=null,n}return _createClass(StringField,[{key:e.symbols.type,value:function value(){return O}},{key:"placeholder",get:function get(){return null!==this._placeholder?this._placeholder:this.control.placeholder}},{key:"placeholder",set:function set(e){var t;this._placeholder=e,this._in_form()&&(this._dom_control.placeholder=null!==(t=this.placeholder)&&void 0!==t?t:"")}},{key:"_validate",value:function _validate(e){if(null===e.value||""===e.value)this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null;else if("string"==typeof e.value){var t=this.control.minlength,r=this.control.maxlength;null!==t&&e.value.length<t&&e.errors.push(this.msg_string_tooshort(e.value)),null!==r&&e.value.length>r&&e.errors.push(this.msg_string_toolong(e.value))}else e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){if(this._in_form()){var t,r=!e,o=_createForOfIteratorHelper(this._dom_controls);try{for(o.s();!(t=o.n()).done;){t.value.readOnly=r}}catch(e){o.e(e)}finally{o.f()}}_set(_getPrototypeOf(StringField.prototype),"writable",e,this,!0)}},{key:"value_as_text",value:function value_as_text(){return this.value}}]),StringField}();P.prototype._ul4onattrs=[].concat(_toConsumableArray(w.prototype._ul4onattrs),["_placeholder"]),P.prototype._ul4attrs=new Set([].concat(_toConsumableArray(w.prototype._ul4attrs),["placeholder"]));var B=new(function(e){_inherits(PasswordFieldType,D);var t=_createSuper(PasswordFieldType);function PasswordFieldType(){return _classCallCheck(this,PasswordFieldType),t.apply(this,arguments)}return _createClass(PasswordFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof N}}]),PasswordFieldType}())("la","PasswordField","Holds the value of a string/password field of a record (and related information)"),N=function(t){_inherits(PasswordField,P);var r=_createSuper(PasswordField);function PasswordField(){return _classCallCheck(this,PasswordField),r.apply(this,arguments)}return _createClass(PasswordField,[{key:e.symbols.type,value:function value(){return B}}]),PasswordField}(),U=new(function(e){_inherits(EmailFieldType,D);var t=_createSuper(EmailFieldType);function EmailFieldType(){return _classCallCheck(this,EmailFieldType),t.apply(this,arguments)}return _createClass(EmailFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof q}}]),EmailFieldType}())("la","EmailField","Holds the value of a string/email field of a record (and related information)"),q=function(t){_inherits(EmailField,P);var r=_createSuper(EmailField);function EmailField(){return _classCallCheck(this,EmailField),r.apply(this,arguments)}return _createClass(EmailField,[{key:e.symbols.type,value:function value(){return U}},{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i.test(e.value)||e.errors.push(this.msg_email_format(e.value))}_get(_getPrototypeOf(EmailField.prototype),"_validate",this).call(this,e)}}]),EmailField}(),V=new(function(e){_inherits(URLFieldType,D);var t=_createSuper(URLFieldType);function URLFieldType(){return _classCallCheck(this,URLFieldType),t.apply(this,arguments)}return _createClass(URLFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof G}}]),URLFieldType}())("la","URLField","Holds the value of a string/url field of a record (and related information)"),G=function(t){_inherits(URLField,P);var r=_createSuper(URLField);function URLField(){return _classCallCheck(this,URLField),r.apply(this,arguments)}return _createClass(URLField,[{key:e.symbols.type,value:function value(){return V}},{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){var t=null;try{t=new URL(e.value)}catch(t){e.errors.push(this.msg_url_format(e.value))}null!==t&&"http:"!==t.protocol&&"https:"!==t.protocol&&e.errors.push(this.msg_url_format(e.value))}_get(_getPrototypeOf(URLField.prototype),"_validate",this).call(this,e)}}]),URLField}(),E=new(function(e){_inherits(TelFieldType,D);var t=_createSuper(TelFieldType);function TelFieldType(){return _classCallCheck(this,TelFieldType),t.apply(this,arguments)}return _createClass(TelFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof j}}]),TelFieldType}())("la","TelField","Holds the value of a string/tel field of a record (and related information)"),j=function(t){_inherits(TelField,P);var r=_createSuper(TelField);function TelField(){return _classCallCheck(this,TelField),r.apply(this,arguments)}return _createClass(TelField,[{key:e.symbols.type,value:function value(){return E}},{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){/^\\+?[0-9 /()-]+$/.test(e.value)||e.errors.push(this.msg_tel_format(e.value))}_get(_getPrototypeOf(TelField.prototype),"_validate",this).call(this,e)}}]),TelField}(),W=new(function(e){_inherits(TextAreaFieldType,D);var t=_createSuper(TextAreaFieldType);function TextAreaFieldType(){return _classCallCheck(this,TextAreaFieldType),t.apply(this,arguments)}return _createClass(TextAreaFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof z}}]),TextAreaFieldType}())("la","TextAreaField","Holds the value of a string/textarea field of a record (and related information)"),z=function(t){_inherits(TextAreaField,P);var r=_createSuper(TextAreaField);function TextAreaField(){return _classCallCheck(this,TextAreaField),r.apply(this,arguments)}return _createClass(TextAreaField,[{key:e.symbols.type,value:function value(){return W}}]),TextAreaField}(),Y=new(function(e){_inherits(HTMLFieldType,D);var t=_createSuper(HTMLFieldType);function HTMLFieldType(){return _classCallCheck(this,HTMLFieldType),t.apply(this,arguments)}return _createClass(HTMLFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof J}}]),HTMLFieldType}())("la","HTMLField","Holds the value of a string/html field of a record (and related information)"),J=function(t){_inherits(HTMLField,P);var r=_createSuper(HTMLField);function HTMLField(){return _classCallCheck(this,HTMLField),r.apply(this,arguments)}return _createClass(HTMLField,[{key:e.symbols.type,value:function value(){return Y}}]),HTMLField}(),K=new(function(e){_inherits(GeoFieldType,L);var t=_createSuper(GeoFieldType);function GeoFieldType(){return _classCallCheck(this,GeoFieldType),t.apply(this,arguments)}return _createClass(GeoFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof $}}]),GeoFieldType}())("la","GeoField","Holds the value of a geo field of a record (and related information)"),$=function(t){_inherits(GeoField,w);var r=_createSuper(GeoField);function GeoField(){return _classCallCheck(this,GeoField),r.apply(this,arguments)}return _createClass(GeoField,[{key:e.symbols.type,value:function value(){return K}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=_createForOfIteratorHelper(this._dom_controls);try{for(t.s();!(e=t.n()).done;){var r=e.value;if(r.id.endsWith("_geoinfo")){var o=r.value;if(o)return o=JSON.parse(o),new zr(this.globals,o.geometry.coordinates[0],o.geometry.coordinates[1],o.properties.formatted_address)}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(t){if(null===t){var r,o=_createForOfIteratorHelper(this._dom_controls);try{for(o.s();!(r=o.n()).done;){r.value.value=null}}catch(e){o.e(e)}finally{o.f()}}else{var n,l=_createForOfIteratorHelper(this._dom_controls);try{for(l.s();!(n=l.n()).done;){var a=n.value;if(a.id.endsWith("_geoinfo")){var i={type:"Feature",geometry:{coordinates:[t.lat,t.long]},properties:{formatted_address:t.info}};a.value=e._asjson(i)}else a.value=t.info}}catch(e){l.e(e)}finally{l.f()}}}},{key:"value_as_text",value:function value_as_text(){var e=this.value;if(null===this.value)return null;var t=e.lat.toFixed(5)+", "+e.long.toFixed(5);return null!==e.info&&(t+=" ("+e.info+")"),t}},{key:"_validate",value:function _validate(e){null===e.value||""===e.value?(this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null):e.value instanceof zr||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}}]),GeoField}();$.prototype._inputevent="llgeo";var Z=function(e){_inherits(FileFieldType,L);var t=_createSuper(FileFieldType);function FileFieldType(){return _classCallCheck(this,FileFieldType),t.apply(this,arguments)}return _createClass(FileFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof X}}]),FileFieldType}(),Q=new Z("la","FileField","Holds the value of a file field of a record (and related information)"),X=function(t){_inherits(FileField,w);var r=_createSuper(FileField);function FileField(){return _classCallCheck(this,FileField),r.apply(this,arguments)}return _createClass(FileField,[{key:e.symbols.type,value:function value(){return Q}},{key:"_validate",value:function _validate(e){null===e.value||""===e.value?(this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null):e.value instanceof jr||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}},{key:"_get_dom_value",value:function _get_dom_value(){return null}},{key:"_set_dom_value",value:function _set_dom_value(){}}]),FileField}(),ee=new(function(e){_inherits(FileSignatureFieldType,Z);var t=_createSuper(FileSignatureFieldType);function FileSignatureFieldType(){return _classCallCheck(this,FileSignatureFieldType),t.apply(this,arguments)}return _createClass(FileSignatureFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof te}}]),FileSignatureFieldType}())("la","FileSignatureField","Holds the value of a file/signature field of a record (and related information)"),te=function(t){_inherits(FileSignatureField,X);var r=_createSuper(FileSignatureField);function FileSignatureField(){return _classCallCheck(this,FileSignatureField),r.apply(this,arguments)}return _createClass(FileSignatureField,[{key:e.symbols.type,value:function value(){return ee}},{key:"_validate",value:function _validate(e){_get(_getPrototypeOf(FileSignatureField.prototype),"_validate",this).call(this,e)}}]),FileSignatureField}(),re=function(e){_inherits(DateFieldBaseType,L);var t=_createSuper(DateFieldBaseType);function DateFieldBaseType(){return _classCallCheck(this,DateFieldBaseType),t.apply(this,arguments)}return _createClass(DateFieldBaseType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ne}}]),DateFieldBaseType}(),oe=new re("la","DateFieldBase","Holds the value of a date field of a record (and related information)"),ne=function(t){_inherits(DateFieldBase,w);var r=_createSuper(DateFieldBase);function DateFieldBase(){return _classCallCheck(this,DateFieldBase),r.apply(this,arguments)}return _createClass(DateFieldBase,[{key:e.symbols.type,value:function value(){return oe}},{key:"value_as_text",value:function value_as_text(){var t=this.value;return null===t?null:"string"==typeof t?t:e._format(t,this.control.formatstring())}},{key:"_parse",value:function _parse(e,t){var r=null,o=null,n=null,l=0,a=0,i=0,u=null;function _int(e,t,r,o){return(e=e.substring(0,t)).length!=t?null:(e=parseInt(e,10),isNaN(e)||e<r||e>o?null:e)}for(;e;){if(!t)return null;if(t.startsWith("%Y")){if(null===(r=_int(e,4)))return null;e=e.substring(4),t=t.substring(2)}else if(t.startsWith("%y")){if(null===(r=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%m")){if(null===(o=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%d")){if(null===(n=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%H")){if(null===(l=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%I")){if(null===(l=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%M")){if(null===(a=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%S")){if(null===(i=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%p")){if(e.toLowerCase().startsWith("pm"))u=!0;else{if(!e.toLowerCase().startsWith("am"))return null;u=!1}e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%%")){if(!e.startsWith("%"))return null;e=e.substring(1),t=t.substring(2)}else if(t.startsWith("%z")){if(!e.startsWith("-")&&!e.startsWith("+"))return null;if(null===_int(e=e.substring(1),2))return null;if(!(e=e.substring(2)).startsWith(":"))return null;if(null===_int(e=e.substring(1),2))return null;e=e.substring(2),t=t.substring(2)}else{if(!e.startsWith(t.substring(0,1)))return null;e=e.substring(1),t=t.substring(1)}}if(t)return null;if(null===r)return null;if(null===o||o<1||o>12)return null;if(null===n||n<1||n>31)return null;if(null===u){if(l<0||l>23)return null}else{if(l<0||l>11)return null;u&&(l+=12)}return a<0||a>59||a<0||a>59||i<0||i>60?null:new Date(r,o-1,n,l,a,i)}},{key:"_validate",value:function _validate(t){if(null===t.value||""===t.value)this.control.required&&t.errors.push(this.msg_field_required(t.value)),t.value=null;else if(t.value instanceof Date)t.value=this._convert(t.value);else if(t.value instanceof e.Date_)t.value=this._convert(t.value._date);else if("string"==typeof t.value){var r,o=null,n=_createForOfIteratorHelper(this.control.formatstrings_parse());try{for(n.s();!(r=n.n()).done;){var l=r.value;if(null!==(o=this._parse(t.value,l)))break}}catch(e){n.e(e)}finally{n.f()}null!==o?t.value=this._convert(o):t.errors.push(this.msg_date_format(t.value))}else t.errors.push(this.msg_field_wrong_type(t.value)),t.value=null}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(DateFieldBase.prototype),"_get_dom_value",this).call(this);if(!e)return null;var t,r=_createForOfIteratorHelper(this.control.formatstrings_parse());try{for(r.s();!(t=r.n()).done;){var o=t.value,n=this._parse(e,o);if(null!==n)return this._convert(n)}}catch(e){r.e(e)}finally{r.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(t){t=null!==t?e._format(t,this.control.formatstring(),this.globals.lang):"",_get(_getPrototypeOf(DateFieldBase.prototype),"_set_dom_value",this).call(this,t)}}]),DateFieldBase}(),le=new(function(e){_inherits(DateFieldType,re);var t=_createSuper(DateFieldType);function DateFieldType(){return _classCallCheck(this,DateFieldType),t.apply(this,arguments)}return _createClass(DateFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ae}}]),DateFieldType}())("la","DateField","Holds the value of a date/date field of a record (and related information)"),ae=function(t){_inherits(DateField,ne);var r=_createSuper(DateField);function DateField(){return _classCallCheck(this,DateField),r.apply(this,arguments)}return _createClass(DateField,[{key:e.symbols.type,value:function value(){return le}},{key:"_convert",value:function _convert(t){return new e.Date_(t.getFullYear(),t.getMonth()+1,t.getDate())}}]),DateField}(),ie=new(function(e){_inherits(DatetimeMinuteFieldType,re);var t=_createSuper(DatetimeMinuteFieldType);function DatetimeMinuteFieldType(){return _classCallCheck(this,DatetimeMinuteFieldType),t.apply(this,arguments)}return _createClass(DatetimeMinuteFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ue}}]),DatetimeMinuteFieldType}())("la","DatetimeMinuteField","Holds the value of a date/datetimeminute field of a record (and related information)"),ue=function(t){_inherits(DatetimeMinuteField,ne);var r=_createSuper(DatetimeMinuteField);function DatetimeMinuteField(){return _classCallCheck(this,DatetimeMinuteField),r.apply(this,arguments)}return _createClass(DatetimeMinuteField,[{key:e.symbols.type,value:function value(){return ie}},{key:"_convert",value:function _convert(e){return e.setSeconds(0),e.setMilliseconds(0),e}}]),DatetimeMinuteField}(),se=new(function(e){_inherits(DatetimeSecondFieldType,re);var t=_createSuper(DatetimeSecondFieldType);function DatetimeSecondFieldType(){return _classCallCheck(this,DatetimeSecondFieldType),t.apply(this,arguments)}return _createClass(DatetimeSecondFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof pe}}]),DatetimeSecondFieldType}())("la","DatetimeSecondField","Holds the value of a date/datetimesecond field of a record (and related information)"),pe=function(t){_inherits(DatetimeSecondField,ne);var r=_createSuper(DatetimeSecondField);function DatetimeSecondField(){return _classCallCheck(this,DatetimeSecondField),r.apply(this,arguments)}return _createClass(DatetimeSecondField,[{key:e.symbols.type,value:function value(){return se}},{key:"_convert",value:function _convert(e){return e.setMilliseconds(0),e}}]),DatetimeSecondField}(),ce=function(t){_inherits(ChoiceFieldBase,w);var r=_createSuper(ChoiceFieldBase);function ChoiceFieldBase(){return _classCallCheck(this,ChoiceFieldBase),r.apply(this,arguments)}return _createClass(ChoiceFieldBase,[{key:"_make_option",value:function _make_option(e,t,r){return element("option",r,{value:t,class:t===this.control.none_key?"la-none-option":null,selected:e?"selected":null})}},{key:"_set_dom_lookupdata_select",value:function _set_dom_lookupdata_select(t){var r;null===t&&(t=this.control.lookup_data),e._isobject(t)&&(t=new Map(Object.entries(t)));var o,n=!1,l=new Set,a=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option:checked"));try{for(a.s();!(o=a.n()).done;){var i=o.value.getAttribute("value");t.has(i)?l.add(i):i===this.control.none_key&&(n=!0)}}catch(e){a.e(e)}finally{a.f()}var u=[];null!==this.control.none_key&&u.push(this._make_option(n,this.control.none_key,null!==this.control.none_label?this.control.none_label:this.globals.msg_nothing_selected()));var s,p=_createForOfIteratorHelper(t);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=c[1];u.push(this._make_option(l.has(_),_,this._make_label(h)))}}catch(e){p.e(e)}finally{p.f()}(r=this._dom_control).replaceChildren.apply(r,u)}},{key:"_set_dom_lookupdata_input",value:function _set_dom_lookupdata_input(t){null===t?t=this.control.lookupdata:e._isobject(t)&&(t=new Map(Object.entries(t)));var r,o=!1,n=new Set,l=_createForOfIteratorHelper(this._dom_controls);try{for(l.s();!(r=l.n()).done;){var a=r.value,i=a.getAttribute("value");a.checked&&(t.has(i)?n.add(i):i===this.control.none_key&&(o=!0))}}catch(e){l.e(e)}finally{l.f()}var u=this._dom_root.querySelector("input[value="+this.control.none_key+"]");null!==u&&(u.checked=o);var s,p=_createForOfIteratorHelper(this.control.lookupdata);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=(c[1],this._dom_root.querySelector("input[value="+_+"]")),y=this._dom_root.querySelector("label[for="+h.id+"]");t.has(_)?(h.style.display="inline",y.style.display="inline",y.innerText=this._make_label(t.get(_))):(h.style.display="none",y.style.display="none",y.checked=!1)}}catch(e){p.e(e)}finally{p.f()}}}]),ChoiceFieldBase}(),_e=function(e){_inherits(LookupFieldBaseType,L);var t=_createSuper(LookupFieldBaseType);function LookupFieldBaseType(){return _classCallCheck(this,LookupFieldBaseType),t.apply(this,arguments)}return _createClass(LookupFieldBaseType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ye}}]),LookupFieldBaseType}(),he=new _e("la","LookupFieldBase","Base type of LookupField and MultipleLookupField"),ye=function(t){_inherits(LookupFieldBase,ce);var r=_createSuper(LookupFieldBase);function LookupFieldBase(){return _classCallCheck(this,LookupFieldBase),r.apply(this,arguments)}return _createClass(LookupFieldBase,[{key:e.symbols.type,value:function value(){return he}},{key:"lookupdata",get:function get(){return null!==this._lookupdata?this._lookupdata:this.control.lookupdata}},{key:"lookupdata",set:function set(e){this._in_form()&&this._set_dom_lookupdata(e),this._lookupdata=e}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){}},{key:"_make_label",value:function _make_label(t){return"string"==typeof t?t:t instanceof Ar?t.label:e._str(t)}},{key:"_find_lookupitem",value:function _find_lookupitem(e){var t=e.value;if("string"==typeof t){if(null===this.lookupdata)return;var r=this.control.lookupdata.get(t);if(void 0===r)if(this.control.autoexpandable){var o,n=_createForOfIteratorHelper(this.lookupdata.values());try{for(n.s();!(o=n.n()).done;){var l=o.value;if(t===l.label)return void(e.value=l)}}catch(e){n.e(e)}finally{n.f()}}else e.errors.push(this.msg_lookup_unknownkey(t)),e.value=null;else e.value=r}else if(t instanceof Ar){this.control.lookupdata.get(t.key)!==t&&(e.errors.push(this.msg_lookup_wrongitem(t)),e.value=null)}else e.errors.push(this.msg_field_wrong_type(t)),e.value=null}}]),LookupFieldBase}(),de=function(e){_inherits(LookupFieldType,_e);var t=_createSuper(LookupFieldType);function LookupFieldType(){return _classCallCheck(this,LookupFieldType),t.apply(this,arguments)}return _createClass(LookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ve}}]),LookupFieldType}(),fe=new de("la","LookupField","Holds the value of a lookup field of a record (and related information)"),ve=function(t){_inherits(LookupField,ye);var r=_createSuper(LookupField);function LookupField(){return _classCallCheck(this,LookupField),r.apply(this,arguments)}return _createClass(LookupField,[{key:e.symbols.type,value:function value(){return fe}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e?null:e.label}},{key:"_validate",value:function _validate(e){var t=e.value;null===t||""===t||this.control.none_key===t?(this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=null):this._find_lookupitem(e)}}]),LookupField}(),ke=new(function(e){_inherits(LookupRadioFieldType,de);var t=_createSuper(LookupRadioFieldType);function LookupRadioFieldType(){return _classCallCheck(this,LookupRadioFieldType),t.apply(this,arguments)}return _createClass(LookupRadioFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof me}}]),LookupRadioFieldType}())("la","LookupRadioField","Holds the value of a lookup/radio field of a record (and related information)"),me=function(t){_inherits(LookupRadioField,ve);var r=_createSuper(LookupRadioField);function LookupRadioField(){return _classCallCheck(this,LookupRadioField),r.apply(this,arguments)}return _createClass(LookupRadioField,[{key:e.symbols.type,value:function value(){return ke}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=_createForOfIteratorHelper(this._dom_controls);try{for(t.s();!(e=t.n()).done;){var r=e.value;if(r.checked){var o=r.getAttribute("value");return this.control.lookupdata.get(o)}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(e){e instanceof Ar&&(e=e.key),null===e&&(e=this.control.none_key);var t,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(t=r.n()).done;){var o=t.value;o.checked=o.getAttribute("value")===e}}catch(e){r.e(e)}finally{r.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_input(e)}}]),LookupRadioField}(),Ce=new(function(e){_inherits(LookupSelectFieldType,de);var t=_createSuper(LookupSelectFieldType);function LookupSelectFieldType(){return _classCallCheck(this,LookupSelectFieldType),t.apply(this,arguments)}return _createClass(LookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ge}}]),LookupSelectFieldType}())("la","LookupSelectField","Holds the value of a lookup/select field of a record (and related information)"),ge=function(t){_inherits(LookupSelectField,ve);var r=_createSuper(LookupSelectField);function LookupSelectField(){return _classCallCheck(this,LookupSelectField),r.apply(this,arguments)}return _createClass(LookupSelectField,[{key:e.symbols.type,value:function value(){return Ce}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(LookupSelectField.prototype),"_get_dom_value",this).call(this);return e&&(e=e===this.control.none_key?null:this.control.lookupdata.get(e)),e}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t),_get(_getPrototypeOf(LookupSelectField.prototype),"_set_dom_value",this).call(this,null!=t.value?t.value.key:this.control.none_key)}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),LookupSelectField}(),be=new(function(e){_inherits(LookupChoiceFieldType,de);var t=_createSuper(LookupChoiceFieldType);function LookupChoiceFieldType(){return _classCallCheck(this,LookupChoiceFieldType),t.apply(this,arguments)}return _createClass(LookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Te}}]),LookupChoiceFieldType}())("la","LookupChoiceField","Holds the value of a lookup/choice field of a record (and related information)"),Te=function(t){_inherits(LookupChoiceField,ve);var r=_createSuper(LookupChoiceField);function LookupChoiceField(){return _classCallCheck(this,LookupChoiceField),r.apply(this,arguments)}return _createClass(LookupChoiceField,[{key:e.symbols.type,value:function value(){return be}}]),LookupChoiceField}();Te.prototype._inputevent="llchoice";var Le=function(e){_inherits(MultipleLookupFieldType,_e);var t=_createSuper(MultipleLookupFieldType);function MultipleLookupFieldType(){return _classCallCheck(this,MultipleLookupFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ae}}]),MultipleLookupFieldType}(),Fe=new Le("la","MultipleLookupField","Holds the value of a multiple lookup field of a record (and related information)"),Ae=function(t){_inherits(MultipleLookupField,ye);var r=_createSuper(MultipleLookupField);function MultipleLookupField(){return _classCallCheck(this,MultipleLookupField),r.apply(this,arguments)}return _createClass(MultipleLookupField,[{key:e.symbols.type,value:function value(){return Fe}},{key:"is_empty",value:function is_empty(){return 0===this._value.length}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e||0===e.length?null:e.map((function(e){return e.label})).join(", ")}},{key:"_validate",value:function _validate(e){var t=e.value,r="[object Array]"===Object.prototype.toString.call(t);if(null===t||""===t||this.control.none_key===t||r&&0===t.length)this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=[];else if(r){var o,n=[],l=_createForOfIteratorHelper(t);try{for(l.s();!(o=l.n()).done;){var a={value:o.value,errors:[]};this._find_lookupitem(a),a.errors.length>0?e.errors=[].concat(_toConsumableArray(e.errors),_toConsumableArray(a.errors)):n.push(a.value)}}catch(e){l.e(e)}finally{l.f()}e.value=n}else this._find_lookupitem(e),e.errors.length>0?e.value=[]:e.value=[e.value]}}]),MultipleLookupField}(),we=new(function(e){_inherits(MultipleLookupCheckboxFieldType,Le);var t=_createSuper(MultipleLookupCheckboxFieldType);function MultipleLookupCheckboxFieldType(){return _classCallCheck(this,MultipleLookupCheckboxFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupCheckboxFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Se}}]),MultipleLookupCheckboxFieldType}())("la","MultipleLookupCheckboxField","Holds the value of a multiplelookup/radio field of a record (and related information)"),Se=function(t){_inherits(MultipleLookupCheckboxField,Ae);var r=_createSuper(MultipleLookupCheckboxField);function MultipleLookupCheckboxField(){return _classCallCheck(this,MultipleLookupCheckboxField),r.apply(this,arguments)}return _createClass(MultipleLookupCheckboxField,[{key:e.symbols.type,value:function value(){return we}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=[],r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o.checked){var n=o.getAttribute("value");t.push(this.control.lookupdata.get(n))}}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t);var r,o=new Set,n=_createForOfIteratorHelper(t.value);try{for(n.s();!(r=n.n()).done;){var l=r.value;o.add(l.key)}}catch(e){n.e(e)}finally{n.f()}var a,i=_createForOfIteratorHelper(this._dom_controls);try{for(i.s();!(a=i.n()).done;){var u=a.value;u.checked=o.has(u.getAttribute("value"))}}catch(e){i.e(e)}finally{i.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_input(e)}}]),MultipleLookupCheckboxField}(),Me=new(function(e){_inherits(MultipleLookupSelectFieldType,Le);var t=_createSuper(MultipleLookupSelectFieldType);function MultipleLookupSelectFieldType(){return _classCallCheck(this,MultipleLookupSelectFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof xe}}]),MultipleLookupSelectFieldType}())("la","MultipleLookupSelectField","Holds the value of a multiplelookup/select field of a record (and related information)"),xe=function(t){_inherits(MultipleLookupSelectField,Ae);var r=_createSuper(MultipleLookupSelectField);function MultipleLookupSelectField(){return _classCallCheck(this,MultipleLookupSelectField),r.apply(this,arguments)}return _createClass(MultipleLookupSelectField,[{key:e.symbols.type,value:function value(){return Me}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=[],r=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option"));try{for(r.s();!(e=r.n()).done;){var o=e.value;o.selected&&t.push(this.control.lookupdata.get(o.getAttribute("value")))}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t);var r,o=new Set,n=_createForOfIteratorHelper(t.value);try{for(n.s();!(r=n.n()).done;){var l=r.value;o.add(l.key)}}catch(e){n.e(e)}finally{n.f()}var a,i=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option"));try{for(i.s();!(a=i.n()).done;){var u=a.value;u.selected=o.has(u.getAttribute("value"))}}catch(e){i.e(e)}finally{i.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),MultipleLookupSelectField}(),Ie=new(function(e){_inherits(MultipleLookupChoiceFieldType,Le);var t=_createSuper(MultipleLookupChoiceFieldType);function MultipleLookupChoiceFieldType(){return _classCallCheck(this,MultipleLookupChoiceFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof He}}]),MultipleLookupChoiceFieldType}())("la","MultipleLookupChoiceField","Holds the value of a multiplelookup/choice field of a record (and related information)"),He=function(t){_inherits(MultipleLookupChoiceField,Ae);var r=_createSuper(MultipleLookupChoiceField);function MultipleLookupChoiceField(){return _classCallCheck(this,MultipleLookupChoiceField),r.apply(this,arguments)}return _createClass(MultipleLookupChoiceField,[{key:e.symbols.type,value:function value(){return Ie}}]),MultipleLookupChoiceField}();He.prototype._inputevent="llchoice";var Re=function(e){_inherits(AppLookupFieldBaseType,L);var t=_createSuper(AppLookupFieldBaseType);function AppLookupFieldBaseType(){return _classCallCheck(this,AppLookupFieldBaseType),t.apply(this,arguments)}return _createClass(AppLookupFieldBaseType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Oe}}]),AppLookupFieldBaseType}(),De=new Re("la","AppLookupFieldBase","Base type of AppLookupField and MultipleAppLookupField"),Oe=function(t){_inherits(AppLookupFieldBase,ce);var r=_createSuper(AppLookupFieldBase);function AppLookupFieldBase(){return _classCallCheck(this,AppLookupFieldBase),r.apply(this,arguments)}return _createClass(AppLookupFieldBase,[{key:e.symbols.type,value:function value(){return De}},{key:"lookupdata",get:function get(){return null!==this._lookupdata?this._lookupdata:null!==this.control.lookup_app.records?this.control.lookup_app.records:new Map}},{key:"lookupdata",set:function set(e){this._in_form()&&this._set_dom_lookupdata(e),this._lookupdata=e}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){}},{key:"_make_label",value:function _make_label(t){return"string"==typeof t?t:t instanceof T?t.as_text(this.control.lookup_controls):e._str(t)}},{key:"_find_record",value:function _find_record(e){var t=e.value;if("string"==typeof t){var r=null!==this.control.lookup_app.records?this.control.lookup_app.records.get(t):void 0;void 0===r?(e.errors.push(this.msg_applookup_unknownkey(t)),e.value=null):e.value=r}else t instanceof T?t.app!==this.control.lookup_app&&(e.errors.push(this.msg_applookup_wrongrecord(t)),e.value=null):(e.errors.push(this.msg_field_wrong_type(t)),e.value=null)}},{key:e.symbols.setattr,value:function value(t,r){"lookupdata"===t?this.lookupdata=r:_get(_getPrototypeOf(AppLookupFieldBase.prototype),e.symbols.setattr,this).call(this,t,r)}}]),AppLookupFieldBase}();Oe.prototype._ul4attrs=new Set([].concat(_toConsumableArray(w.prototype._ul4attrs),["lookupdata"]));var Pe=function(e){_inherits(AppLookupFieldType,Re);var t=_createSuper(AppLookupFieldType);function AppLookupFieldType(){return _classCallCheck(this,AppLookupFieldType),t.apply(this,arguments)}return _createClass(AppLookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ne}}]),AppLookupFieldType}(),Be=new Pe("la","AppLookupField","Holds the value of a applookup field of a record (and related information)"),Ne=function(t){_inherits(AppLookupField,Oe);var r=_createSuper(AppLookupField);function AppLookupField(){return _classCallCheck(this,AppLookupField),r.apply(this,arguments)}return _createClass(AppLookupField,[{key:e.symbols.type,value:function value(){return Be}},{key:"value_as_text",value:function value_as_text(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=this.value;return null===t?null:"("+this.value.as_text(e)+")"}},{key:"_validate",value:function _validate(e){this._find_record(e)}}]),AppLookupField}(),Ue=new(function(e){_inherits(AppLookupSelectFieldType,Pe);var t=_createSuper(AppLookupSelectFieldType);function AppLookupSelectFieldType(){return _classCallCheck(this,AppLookupSelectFieldType),t.apply(this,arguments)}return _createClass(AppLookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof qe}}]),AppLookupSelectFieldType}())("la","AppLookupSelectField","Holds the value of a `applookup`/`select` field of a record (and related information)"),qe=function(t){_inherits(AppLookupSelectField,Ne);var r=_createSuper(AppLookupSelectField);function AppLookupSelectField(){return _classCallCheck(this,AppLookupSelectField),r.apply(this,arguments)}return _createClass(AppLookupSelectField,[{key:e.symbols.type,value:function value(){return Ue}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(AppLookupSelectField.prototype),"_get_dom_value",this).call(this);return null!==this.control.lookup_app.records?void 0===(e=this.control.lookup_app.records.get(e))&&(e=null):e=null,e}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t),_get(_getPrototypeOf(AppLookupSelectField.prototype),"_set_dom_value",this).call(this,null!=t.value?t.value.id:this.control.none_key)}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),AppLookupSelectField}(),Ve=new(function(e){_inherits(AppLookupRadioFieldType,Pe);var t=_createSuper(AppLookupRadioFieldType);function AppLookupRadioFieldType(){return _classCallCheck(this,AppLookupRadioFieldType),t.apply(this,arguments)}return _createClass(AppLookupRadioFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ge}}]),AppLookupRadioFieldType}())("la","AppLookupRadioField","Holds the value of a `applookup`/`radio` field of a record (and related information)"),Ge=function(t){_inherits(AppLookupRadioField,Ne);var r=_createSuper(AppLookupRadioField);function AppLookupRadioField(){return _classCallCheck(this,AppLookupRadioField),r.apply(this,arguments)}return _createClass(AppLookupRadioField,[{key:e.symbols.type,value:function value(){return Ve}}]),AppLookupRadioField}(),Ee=new(function(e){_inherits(AppLookupChoiceFieldType,Pe);var t=_createSuper(AppLookupChoiceFieldType);function AppLookupChoiceFieldType(){return _classCallCheck(this,AppLookupChoiceFieldType),t.apply(this,arguments)}return _createClass(AppLookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof je}}]),AppLookupChoiceFieldType}())("la","AppLookupChoiceField","Holds the value of a `applookup`/`choice` field of a record (and related information)"),je=function(t){_inherits(AppLookupChoiceField,Ne);var r=_createSuper(AppLookupChoiceField);function AppLookupChoiceField(e,t,o){var n;return _classCallCheck(this,AppLookupChoiceField),(n=r.call(this,e,t,o))._search_url=null,n._search_param_name=null,n._target_param_name=null,n}return _createClass(AppLookupChoiceField,[{key:e.symbols.type,value:function value(){return Ee}},{key:"search_url",get:function get(){var e;return null!==(e=this._search_url)&&void 0!==e?e:this.control.search_url}},{key:"search_url",set:function set(e){this._search_url=e}},{key:"search_param_name",get:function get(){var e;return null!==(e=this._search_param_name)&&void 0!==e?e:this.control.search_param_name}},{key:"search_param_name",set:function set(e){this._search_param_name=e}},{key:"target_param_name",get:function get(){var e;return null!==(e=this._target_param_name)&&void 0!==e?e:this.control.target_param_name}},{key:"target_param_name",set:function set(e){this._target_param_name=e}}]),AppLookupChoiceField}();je.prototype._inputevent="llchoice",je.prototype._ul4attrs=new Set([].concat(_toConsumableArray(w.prototype._ul4attrs),["search_url","search_param_name","target_param_name"]));var We=function(e){_inherits(MultipleAppLookupFieldType,Re);var t=_createSuper(MultipleAppLookupFieldType);function MultipleAppLookupFieldType(){return _classCallCheck(this,MultipleAppLookupFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ye}}]),MultipleAppLookupFieldType}(),ze=new We("la","MultipleAppLookupField","Holds the value of a multiple applookup field of a record (and related information)"),Ye=function(t){_inherits(MultipleAppLookupField,Oe);var r=_createSuper(MultipleAppLookupField);function MultipleAppLookupField(){return _classCallCheck(this,MultipleAppLookupField),r.apply(this,arguments)}return _createClass(MultipleAppLookupField,[{key:e.symbols.type,value:function value(){return ze}},{key:"is_empty",value:function is_empty(){return 0===this._value.length}},{key:"_validate",value:function _validate(e){var t=e.value,r="[object Array]"===Object.prototype.toString.call(t);if(null===t||""===t||this.control.none_key===t||r&&0===t.length)this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=[];else if(r){var o,n=[],l=_createForOfIteratorHelper(t);try{for(l.s();!(o=l.n()).done;){var a={value:o.value,errors:[]};this._find_record(a),a.errors.length>0?e.errors=[].concat(_toConsumableArray(e.errors),_toConsumableArray(a.errors)):n.push(a.value)}}catch(e){l.e(e)}finally{l.f()}e.value=n}else this._find_record(e),e.errors.length>0?e.value=[]:e.value=[e.value]}}]),MultipleAppLookupField}(),Je=new(function(e){_inherits(MultipleAppLookupCheckboxFieldType,We);var t=_createSuper(MultipleAppLookupCheckboxFieldType);function MultipleAppLookupCheckboxFieldType(){return _classCallCheck(this,MultipleAppLookupCheckboxFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ke}}]),MultipleAppLookupCheckboxFieldType}())("la","MultipleAppLookupCheckboxField","Holds the value of a `multipleapplookup`/`checkbox` field of a record (and related information)"),Ke=function(t){_inherits(MultipleAppLookupCheckboxField,Ye);var r=_createSuper(MultipleAppLookupCheckboxField);function MultipleAppLookupCheckboxField(){return _classCallCheck(this,MultipleAppLookupCheckboxField),r.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxField,[{key:e.symbols.type,value:function value(){return Je}}]),MultipleAppLookupCheckboxField}(),$e=new(function(e){_inherits(MultipleAppLookupSelectFieldType,We);var t=_createSuper(MultipleAppLookupSelectFieldType);function MultipleAppLookupSelectFieldType(){return _classCallCheck(this,MultipleAppLookupSelectFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ze}}]),MultipleAppLookupSelectFieldType}())("la","MultipleAppLookupSelectField","Holds the value of a `multipleapplookup`/`select` field of a record (and related information)"),Ze=function(t){_inherits(MultipleAppLookupSelectField,Ye);var r=_createSuper(MultipleAppLookupSelectField);function MultipleAppLookupSelectField(){return _classCallCheck(this,MultipleAppLookupSelectField),r.apply(this,arguments)}return _createClass(MultipleAppLookupSelectField,[{key:e.symbols.type,value:function value(){return $e}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),MultipleAppLookupSelectField}(),Qe=new(function(e){_inherits(MultipleAppLookupChoiceFieldType,We);var t=_createSuper(MultipleAppLookupChoiceFieldType);function MultipleAppLookupChoiceFieldType(){return _classCallCheck(this,MultipleAppLookupChoiceFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Xe}}]),MultipleAppLookupChoiceFieldType}())("la","MultipleAppLookupChoiceField","Holds the value of a `multipleapplookup`/`choice` field of a record (and related information)"),Xe=function(t){_inherits(MultipleAppLookupChoiceField,Ye);var r=_createSuper(MultipleAppLookupChoiceField);function MultipleAppLookupChoiceField(){return _classCallCheck(this,MultipleAppLookupChoiceField),r.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceField,[{key:e.symbols.type,value:function value(){return Qe}}]),MultipleAppLookupChoiceField}();Xe.prototype._inputevent="llchoice";var et=function(t){_inherits(ControlType,e.Type);var r=_createSuper(ControlType);function ControlType(){return _classCallCheck(this,ControlType),r.apply(this,arguments)}return _createClass(ControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof rt}}]),ControlType}(),tt=new et("la","Control","Metainformation about a field in a LivingApps application"),rt=function(t){_inherits(Control,r);var o=_createSuper(Control);function Control(e){var t;return _classCallCheck(this,Control),(t=o.call(this,e))._mode=null,t}return _createClass(Control,[{key:e.symbols.type,value:function value(){return tt}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"globals",get:function get(){return this.app.globals}},{key:"fulltype",get:function get(){return this.subtype?this.type+"/"+this.subtype:this.type}},{key:"label",get:function get(){var e=this._view_control();if(null===e)return this._label;var t=e.label;return null===t?this._label:t}},{key:"label",set:function set(e){this._label=e}},{key:"description",get:function get(){return this._description}},{key:"description",set:function set(e){this._description=e}},{key:"priority",get:function get(){return this._priority}},{key:"priority",set:function set(e){this._priority=e}},{key:"in_list",get:function get(){return this._priority}},{key:"in_list",set:function set(e){this._priority=e}},{key:"in_mobile_list",get:function get(){return this._in_mobile_list}},{key:"in_mobile_list",set:function set(e){this._in_mobile_list=e}},{key:"in_text",get:function get(){return this._in_text}},{key:"in_text",set:function set(e){this._in_text=e}},{key:"in_structured_search",get:function get(){return this._in_structured_search}},{key:"in_structured_search",set:function set(e){this._in_structured_search=e}},{key:"in_fulltext_search",get:function get(){return this._in_fulltext_search}},{key:"in_fulltext_search",set:function set(e){this._in_fulltext_search=e}},{key:"in_expert_search",get:function get(){return this._in_expert_search}},{key:"in_expert_search",set:function set(e){this._in_expert_search=e}},{key:"default",get:function get(){return null}},{key:"top",get:function get(){var e=this._view_control();return null!==e?e.top:null}},{key:"left",get:function get(){var e=this._view_control();return null!==e?e.left:null}},{key:"width",get:function get(){var e=this._view_control();return null!==e?e.width:null}},{key:"height",get:function get(){var e=this._view_control();return null!==e?e.height:null}},{key:"z_index",get:function get(){var e=this._view_control();return null!==e?e.z_index:null}},{key:"liveupdate",get:function get(){var e=this._view_control();return null!==e&&e.liveupdate}},{key:"tabindex",get:function get(){var e=this._view_control();return null!==e?e.tabindex:null}},{key:"required",get:function get(){var e;if(null===this.app._active_view)return null!==(e=this._required)&&void 0!==e?e:this._required_in_view;var t=this._view_control();return null!==t&&t.required}},{key:"required",set:function set(e){this._required=e}},{key:"mode",get:function get(){if(null!==this._mode)return this._mode;var e=this._view_control();return null!==this.app._active_view&&null===e?null:null===this.app.globals.mode?"display":null!==e?e.mode:"edit"}},{key:"mode",set:function set(e){this._mode=e}},{key:"labelpos",get:function get(){var e=this._view_control();return null!==e?e.labelpos:"left"}},{key:"labelwidth",get:function get(){var e=this._view_control();return null!==e?e.labelwidth:null}},{key:"autoalign",get:function get(){var e=this._view_control();return null===e||e.autoalign}},{key:"in_active_view",get:function get(){return null!==this._view_control()}},{key:"_view_control",value:function _view_control(){if(null===this.app._active_view)return null;var e=this.app._active_view.controls.get(this.identifier);return null!=e?e:null}},{key:"_logsearch",value:function _logsearch(e,t){}},{key:"search",value:function search(e,t){return!1}}]),Control}();rt.prototype.type=null,rt.prototype.subtype=null,rt.prototype._ul4onattrs=["identifier","fieldname","app","_label","_description","base_mode","in_sum","_priority","_in_mobile_list","_in_text","_in_structured_search","_in_fulltext_search","_in_expert_search","_required","_required_in_view","order","ininsertprocedure","inupdateprocedure"],rt.prototype._ul4attrs=new Set(["id","identifier","fieldname","app","base_mode","in_sum","priority","in_list","in_mobile_list","in_text","in_structured_search","in_fulltext_search","in_expert_search","order","ininsertprocedure","inupdateprocedure","fulltype","label","description","top","left","width","height","z_index","liveupdate","tabindex","required","mode","labelpos","autoalign","in_active_view"]),rt.prototype._cssclass_root="llft-control",rt.prototype._cssclass_control="input";var ot=new(function(e){_inherits(BoolControlType,et);var t=_createSuper(BoolControlType);function BoolControlType(){return _classCallCheck(this,BoolControlType),t.apply(this,arguments)}return _createClass(BoolControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof nt}}]),BoolControlType}())("la","BoolControl","A LivingApps boolean field (type 'bool')"),nt=function(t){_inherits(BoolControl,rt);var r=_createSuper(BoolControl);function BoolControl(){return _classCallCheck(this,BoolControl),r.apply(this,arguments)}return _createClass(BoolControl,[{key:e.symbols.type,value:function value(){return ot}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator&&t.value===e}}]),BoolControl}();nt.prototype.type="bool",nt.prototype.fieldtype=M;var lt=new(function(e){_inherits(IntControlType,et);var t=_createSuper(IntControlType);function IntControlType(){return _classCallCheck(this,IntControlType),t.apply(this,arguments)}return _createClass(IntControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof at}}]),IntControlType}())("la","IntControl","A LivingApps integer field (type 'int')"),at=function(t){_inherits(IntControl,rt);var r=_createSuper(IntControl);function IntControl(){return _classCallCheck(this,IntControl),r.apply(this,arguments)}return _createClass(IntControl,[{key:e.symbols.type,value:function value(){return lt}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator&&t.value===e}}]),IntControl}();at.prototype.type="int",at.prototype.fieldtype=I;var it=new(function(e){_inherits(NumberControlType,et);var t=_createSuper(NumberControlType);function NumberControlType(){return _classCallCheck(this,NumberControlType),t.apply(this,arguments)}return _createClass(NumberControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ut}}]),NumberControlType}())("la","NumberControl","A LivingApps number field (type 'number')"),ut=function(t){_inherits(NumberControl,rt);var r=_createSuper(NumberControl);function NumberControl(){return _classCallCheck(this,NumberControl),r.apply(this,arguments)}return _createClass(NumberControl,[{key:e.symbols.type,value:function value(){return it}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator?t.value===e:"range"===t.operator&&(null!==e&&((null===t.minvalue||t.minvalue<=e)&&(null===t.maxvalue||e<t.maxvalue)))}}]),NumberControl}();ut.prototype.type="number",ut.prototype.fieldtype=R,ut.prototype._ul4onattrs=[].concat(_toConsumableArray(rt.prototype._ul4onattrs),["precision","minimum","maximum"]),ut.prototype._ul4attrs=new Set([].concat(_toConsumableArray(rt.prototype._ul4attrs),["precision","minimum","maximum"]));var st=function(e){_inherits(StringControlType,et);var t=_createSuper(StringControlType);function StringControlType(){return _classCallCheck(this,StringControlType),t.apply(this,arguments)}return _createClass(StringControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ct}}]),StringControlType}(),pt=new st("la","StringControl","A LivingApps number field (type 'string')"),ct=function(t){_inherits(StringControl,rt);var r=_createSuper(StringControl);function StringControl(){return _classCallCheck(this,StringControl),r.apply(this,arguments)}return _createClass(StringControl,[{key:e.symbols.type,value:function value(){return pt}},{key:"placeholder",get:function get(){var e=this._view_control();return null!==e?e.placeholder:this._placeholder}},{key:"placeholder",set:function set(e){this._placeholder=e;var t=this.app.globals;if(t._in_form()&&this.app===t.record.app){var r=t.record.fields.get(this.identifier);r._dom_control.placeholder=r.placeholder}}},{key:"_user_placeholder",value:function _user_placeholder(t,r){if(null===r)return null;switch(r){case"{gender}":return null!==t?t.gender:null;case"{title}":return null!==t?t.title:null;case"{firstname}":return null!==t?t.firstname:null;case"{surname}":return null!==t?t.surname:null;case"{account}":return null!==t?t.email:null;case"{streetname}":return null!==t?t.streetname:null;case"{streetnumber}":return null!==t?t.streetnumber:null;case"{street}":return null===t?null:null===t.street?t.streetnumber:null===t.streetnumber?t.street:t.street+" "+t.streetnumber;case"{zip}":return null!==t?t.zip:null;case"{phone}":return null!==t?t.phone:null;case"{fax}":return null!==t?t.fax:null;case"{company}":return null!==t?t.company:null;case"{city}":return null!==t?t.city:null;case"{summary}":return null!==t?t.summary:null;case"{interests}":return null!==t?t.interests:null;case"{personal_website}":return null!==t?t.personal_website:null;case"{company_website}":return null!==t?t.company_website:null;case"{position}":return null!==t?t.position:null;case"{department}":return null!==t?t.department:null;case"{today}":return e.today();default:return r}}},{key:"default",get:function get(){var e=this._view_control();return null===e?null:this._user_placeholder(this.app.globals.user,e.default)}},{key:"minlength",get:function get(){var e=this._view_control();if(null===e)return 0;var t=e.minlength;return null===t||t<0?0:t}},{key:"maxlength",get:function get(){var e=this._view_control();if(null===e)return 4e3;var t=e.maxlength;return null===t||t<0||t>4e3?4e3:t}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator?t.value===e:"contains"===t.operator?null===t.value||null===e?t.value===e:e.toLowerCase().indexOf(t.value.toLowerCase())>=0:void 0}}]),StringControl}();ct.prototype.type="string",ct.prototype._ul4attrs=new Set([].concat(_toConsumableArray(rt.prototype._ul4attrs),["minlength","maxlength","placeholder"]));var _t=new(function(e){_inherits(TextControlType,st);var t=_createSuper(TextControlType);function TextControlType(){return _classCallCheck(this,TextControlType),t.apply(this,arguments)}return _createClass(TextControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ht}}]),TextControlType}())("la","TextControl","A LivingApps text field (type 'string/text')"),ht=function(t){_inherits(TextControl,ct);var r=_createSuper(TextControl);function TextControl(){return _classCallCheck(this,TextControl),r.apply(this,arguments)}return _createClass(TextControl,[{key:e.symbols.type,value:function value(){return _t}}]),TextControl}();ht.prototype.subtype="text",ht.prototype.fieldtype=P;var yt=new(function(e){_inherits(PasswordControlType,st);var t=_createSuper(PasswordControlType);function PasswordControlType(){return _classCallCheck(this,PasswordControlType),t.apply(this,arguments)}return _createClass(PasswordControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof dt}}]),PasswordControlType}())("la","PasswordControl","A LivingApps password field (type 'string/password')"),dt=function(t){_inherits(PasswordControl,ct);var r=_createSuper(PasswordControl);function PasswordControl(){return _classCallCheck(this,PasswordControl),r.apply(this,arguments)}return _createClass(PasswordControl,[{key:e.symbols.type,value:function value(){return yt}}]),PasswordControl}();dt.prototype.subtype="password",dt.prototype.fieldtype=N;var ft=new(function(e){_inherits(EmailControlType,st);var t=_createSuper(EmailControlType);function EmailControlType(){return _classCallCheck(this,EmailControlType),t.apply(this,arguments)}return _createClass(EmailControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof vt}}]),EmailControlType}())("la","EmailControl","A LivingApps email field (type 'string/email')"),vt=function(t){_inherits(EmailControl,ct);var r=_createSuper(EmailControl);function EmailControl(){return _classCallCheck(this,EmailControl),r.apply(this,arguments)}return _createClass(EmailControl,[{key:e.symbols.type,value:function value(){return ft}}]),EmailControl}();vt.prototype.subtype="email",vt.prototype.fieldtype=q;var kt=new(function(e){_inherits(URLControlType,st);var t=_createSuper(URLControlType);function URLControlType(){return _classCallCheck(this,URLControlType),t.apply(this,arguments)}return _createClass(URLControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof mt}}]),URLControlType}())("la","URLControl","A LivingApps URL field (type 'string/url')"),mt=function(t){_inherits(URLControl,ct);var r=_createSuper(URLControl);function URLControl(){return _classCallCheck(this,URLControl),r.apply(this,arguments)}return _createClass(URLControl,[{key:e.symbols.type,value:function value(){return kt}}]),URLControl}();mt.prototype.subtype="url",mt.prototype.fieldtype=G;var Ct=new(function(e){_inherits(TelControlType,st);var t=_createSuper(TelControlType);function TelControlType(){return _classCallCheck(this,TelControlType),t.apply(this,arguments)}return _createClass(TelControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof gt}}]),TelControlType}())("la","TelControl","A LivingApps phone number field (type 'string/tel')"),gt=function(t){_inherits(TelControl,ct);var r=_createSuper(TelControl);function TelControl(){return _classCallCheck(this,TelControl),r.apply(this,arguments)}return _createClass(TelControl,[{key:e.symbols.type,value:function value(){return Ct}}]),TelControl}();gt.prototype.subtype="tel",gt.prototype.fieldtype=j;var bt=new(function(e){_inherits(TextAreaControlType,st);var t=_createSuper(TextAreaControlType);function TextAreaControlType(){return _classCallCheck(this,TextAreaControlType),t.apply(this,arguments)}return _createClass(TextAreaControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Tt}}]),TextAreaControlType}())("la","TextAreaControl","A LivingApps textarea field (type 'string/textarea')"),Tt=function(t){_inherits(TextAreaControl,ct);var r=_createSuper(TextAreaControl);function TextAreaControl(){return _classCallCheck(this,TextAreaControl),r.apply(this,arguments)}return _createClass(TextAreaControl,[{key:e.symbols.type,value:function value(){return bt}},{key:"maxlength",get:function get(){var e=this._view_control();if(null===e)return null;if(null!==this.encrypted)return null;var t=e.maxlength;return t<0?null:t}}]),TextAreaControl}();Tt.prototype.subtype="textarea",Tt.prototype.fieldtype=z,Tt.prototype._ul4onattrs=[].concat(_toConsumableArray(ct.prototype._ul4onattrs),["encrypted"]),Tt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(ct.prototype._ul4attrs),["encrypted"])),Tt.prototype._cssclass_control="textarea";var Lt=new(function(e){_inherits(HTMLControlType,st);var t=_createSuper(HTMLControlType);function HTMLControlType(){return _classCallCheck(this,HTMLControlType),t.apply(this,arguments)}return _createClass(HTMLControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ft}}]),HTMLControlType}())("la","HTMLControl","A LivingApps HTML field (type 'string/html')"),Ft=function(t){_inherits(HTMLControl,ct);var r=_createSuper(HTMLControl);function HTMLControl(){return _classCallCheck(this,HTMLControl),r.apply(this,arguments)}return _createClass(HTMLControl,[{key:e.symbols.type,value:function value(){return Lt}}]),HTMLControl}();Ft.prototype.subtype="html",Ft.prototype.fieldtype=J;var At=function(e){_inherits(DateControlType,et);var t=_createSuper(DateControlType);function DateControlType(){return _classCallCheck(this,DateControlType),t.apply(this,arguments)}return _createClass(DateControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof St}}]),DateControlType}(),wt=new At("la","DateControl","A LivingApps date field (type 'date/date')"),St=function(t){_inherits(DateControl,rt);var r=_createSuper(DateControl);function DateControl(){return _classCallCheck(this,DateControl),r.apply(this,arguments)}return _createClass(DateControl,[{key:e.symbols.type,value:function value(){return wt}},{key:"default",get:function get(){var t=this._view_control();return null===t?null:"{today}"===t.default?e.today():null}},{key:"formatstring",value:function formatstring(e){return"de"!==(e=e||this.globals.lang)&&"fr"!==e&&"it"!==e&&(e="en"),this._formatstrings[e]}},{key:"formatstrings_parse",value:function formatstrings_parse(e){return"de"!==(e=e||this.globals.lang)&&"fr"!==e&&"it"!==e&&(e="en"),[].concat(_toConsumableArray(this._formatstrings_parse[e]),_toConsumableArray(this._formatstrings_parse.intl))}},{key:"search",value:function search(t,r){this._logsearch(t,r);var o=r.value;return"[object Date]"==Object.prototype.toString.call(o)&&(o=e._format(o,this.formatstring(),this.app.language)),null!==t&&(t=e._format(t,this.formatstring(),this.app.language)),"equals"===r.operator?o===t:"contains"===r.operator&&(null===o||null===t?o===t:t.toLowerCase().indexOf(o.toLowerCase())>=0)}}]),DateControl}();St.prototype.type="date",St.prototype.subtype="date",St.prototype.fieldtype=ae,St.prototype._formatstrings={de:"%d.%m.%Y",fr:"%d.%m.%Y",it:"%d.%m.%Y",en:"%m/%d/%Y",intl:"%Y-%m-%d"};var Mt=[""," %H:%M","T%H:%M"," %H:%M:%S","T%H:%M:%S"," %H:%M:%S.%f","T%H:%M:%S.%f"," %H:%M%z","T%H:%M%z"," %H:%M:%S%z","T%H:%M:%S%z"," %H:%M:%S.%f%z","T%H:%M:%S.%f%z"," %H:%M %z","T%H:%M %z"," %H:%M:%S %z","T%H:%M:%S %z"," %H:%M:%S.%f %z","T%H:%M:%S.%f %z"];St.prototype._formatstrings_parse={en:Mt.map((function(e){return"%m/%d/%Y"+e})),de:Mt.map((function(e){return"%d.%m.%Y"+e})),fr:Mt.map((function(e){return"%d.%m.%Y"+e})),it:Mt.map((function(e){return"%d.%m.%Y"+e})),intl:Mt.map((function(e){return"%Y-%m-%d"+e}))};var xt=new(function(e){_inherits(DatetimeMinuteControlType,At);var t=_createSuper(DatetimeMinuteControlType);function DatetimeMinuteControlType(){return _classCallCheck(this,DatetimeMinuteControlType),t.apply(this,arguments)}return _createClass(DatetimeMinuteControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof It}}]),DatetimeMinuteControlType}())("la","DatetimeMinuteControl","A LivingApps date field (type 'date/datetimeminute')"),It=function(t){_inherits(DatetimeMinuteControl,St);var r=_createSuper(DatetimeMinuteControl);function DatetimeMinuteControl(){return _classCallCheck(this,DatetimeMinuteControl),r.apply(this,arguments)}return _createClass(DatetimeMinuteControl,[{key:e.symbols.type,value:function value(){return xt}},{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;if("{today}"===e.default){var t=new Date;return t.setSeconds(0),t.setMilliseconds(0),t}return null}}]),DatetimeMinuteControl}();It.prototype.subtype="datetimeminute",It.prototype.fieldtype=ue,It.prototype._formatstrings={de:"%d.%m.%Y %H:%M",fr:"%d.%m.%Y %H:%M",it:"%d.%m.%Y %H:%M",en:"%m/%d/%Y %H:%M",intl:"%Y-%m-%d %H:%M"};var Ht=new(function(e){_inherits(DatetimeSecondControlType,At);var t=_createSuper(DatetimeSecondControlType);function DatetimeSecondControlType(){return _classCallCheck(this,DatetimeSecondControlType),t.apply(this,arguments)}return _createClass(DatetimeSecondControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Rt}}]),DatetimeSecondControlType}())("la","DatetimeSecondControl","A LivingApps date field (type 'date/datetimesecond')"),Rt=function(t){_inherits(DatetimeSecondControl,St);var r=_createSuper(DatetimeSecondControl);function DatetimeSecondControl(){return _classCallCheck(this,DatetimeSecondControl),r.apply(this,arguments)}return _createClass(DatetimeSecondControl,[{key:e.symbols.type,value:function value(){return Ht}},{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;if("{today}"===e.default){var t=new Date;return t.setMilliseconds(0),t}return null}}]),DatetimeSecondControl}();Rt.prototype.subtype="datetimesecond",Rt.prototype.fieldtype=pe,Rt.prototype._formatstrings={de:"%d.%m.%Y %H:%M:%S",fr:"%d.%m.%Y %H:%M:%S",it:"%d.%m.%Y %H:%M:%S",en:"%m/%d/%Y %H:%M:%S",intl:"%Y-%m-%d %H:%M:%S"};var Dt=function(e){_inherits(LookupControlType,et);var t=_createSuper(LookupControlType);function LookupControlType(){return _classCallCheck(this,LookupControlType),t.apply(this,arguments)}return _createClass(LookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Pt}}]),LookupControlType}(),Ot=new Dt("la","LookupControl","A LivingApps date field (type 'lookup')"),Pt=function(t){_inherits(LookupControl,rt);var r=_createSuper(LookupControl);function LookupControl(){return _classCallCheck(this,LookupControl),r.apply(this,arguments)}return _createClass(LookupControl,[{key:e.symbols.type,value:function value(){return Ot}},{key:"default",get:function get(){var e,t=this._view_control();return null===t?null:null!==(e=this.lookupdata.get(t))&&void 0!==e?e:null}},{key:"autoexpandable",get:function get(){var e=this._view_control();return null!==e&&e.autoexpandable}},{key:"none_key",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonekey}},{key:"none_label",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonelabel}},{key:"search",value:function search(e,t){return"equals"===t.operator&&(null===e?null===t.value:e.key===t.value)}}]),LookupControl}();Pt.prototype.type="lookup",Pt.prototype.fieldtype=ve,Pt.prototype._ul4onattrs=[].concat(_toConsumableArray(rt.prototype._ul4onattrs),["lookupdata"]),Pt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(rt.prototype._ul4attrs),["lookupdata"]));var Bt=new(function(e){_inherits(LookupSelectControlType,Dt);var t=_createSuper(LookupSelectControlType);function LookupSelectControlType(){return _classCallCheck(this,LookupSelectControlType),t.apply(this,arguments)}return _createClass(LookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Nt}}]),LookupSelectControlType}())("la","LookupSelectControl","A LivingApps lookup field (type 'lookup/select')"),Nt=function(t){_inherits(LookupSelectControl,Pt);var r=_createSuper(LookupSelectControl);function LookupSelectControl(){return _classCallCheck(this,LookupSelectControl),r.apply(this,arguments)}return _createClass(LookupSelectControl,[{key:e.symbols.type,value:function value(){return Bt}}]),LookupSelectControl}();Nt.prototype.subtype="select",Nt.prototype.fieldtype=ge,Nt.prototype._cssclass_control="select";var Ut=new(function(e){_inherits(LookupRadioControlType,Dt);var t=_createSuper(LookupRadioControlType);function LookupRadioControlType(){return _classCallCheck(this,LookupRadioControlType),t.apply(this,arguments)}return _createClass(LookupRadioControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof qt}}]),LookupRadioControlType}())("la","LookupRadioControl","A LivingApps lookup field (type 'lookup/radio')"),qt=function(t){_inherits(LookupRadioControl,Pt);var r=_createSuper(LookupRadioControl);function LookupRadioControl(){return _classCallCheck(this,LookupRadioControl),r.apply(this,arguments)}return _createClass(LookupRadioControl,[{key:e.symbols.type,value:function value(){return Ut}}]),LookupRadioControl}();qt.prototype.subtype="radio",qt.prototype.fieldtype=me,qt.prototype._cssclass_root="llft-element";var Vt=new(function(e){_inherits(LookupChoiceControlType,Dt);var t=_createSuper(LookupChoiceControlType);function LookupChoiceControlType(){return _classCallCheck(this,LookupChoiceControlType),t.apply(this,arguments)}return _createClass(LookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Gt}}]),LookupChoiceControlType}())("la","LookupChoiceControl","A LivingApps lookup field (type 'lookup/choice')"),Gt=function(t){_inherits(LookupChoiceControl,Pt);var r=_createSuper(LookupChoiceControl);function LookupChoiceControl(){return _classCallCheck(this,LookupChoiceControl),r.apply(this,arguments)}return _createClass(LookupChoiceControl,[{key:e.symbols.type,value:function value(){return Vt}}]),LookupChoiceControl}();Gt.prototype.subtype="choice",Gt.prototype.fieldtype=Te,Gt.prototype._cssclass_control="select";var Et=function(e){_inherits(AppLookupControlType,et);var t=_createSuper(AppLookupControlType);function AppLookupControlType(){return _classCallCheck(this,AppLookupControlType),t.apply(this,arguments)}return _createClass(AppLookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Wt}}]),AppLookupControlType}(),jt=new Et("la","AppLookupControl","A LivingApps lookup field (type 'applookup')"),Wt=function(t){_inherits(AppLookupControl,rt);var r=_createSuper(AppLookupControl);function AppLookupControl(){return _classCallCheck(this,AppLookupControl),r.apply(this,arguments)}return _createClass(AppLookupControl,[{key:e.symbols.type,value:function value(){return jt}},{key:"lookupdata",get:function get(){return null!==this.lookup_app&&null!==this.lookup_app.records?this.lookup_app.records:new Map}},{key:"none_key",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonekey}},{key:"none_label",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonelabel}},{key:"search",value:function search(e,t){return null===e||null===t.value?e===t.value:e.search(t)}}]),AppLookupControl}();Wt.prototype.type="applookup",Wt.prototype.fieldtype=Ne,Wt.prototype._ul4onattrs=[].concat(_toConsumableArray(rt.prototype._ul4onattrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]),Wt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(rt.prototype._ul4attrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]));var zt=new(function(e){_inherits(AppLookupSelectControlType,Et);var t=_createSuper(AppLookupSelectControlType);function AppLookupSelectControlType(){return _classCallCheck(this,AppLookupSelectControlType),t.apply(this,arguments)}return _createClass(AppLookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Yt}}]),AppLookupSelectControlType}())("la","AppLookupSelectControl","A LivingApps applookup field (type 'applookup/select')"),Yt=function(t){_inherits(AppLookupSelectControl,Wt);var r=_createSuper(AppLookupSelectControl);function AppLookupSelectControl(){return _classCallCheck(this,AppLookupSelectControl),r.apply(this,arguments)}return _createClass(AppLookupSelectControl,[{key:e.symbols.type,value:function value(){return zt}}]),AppLookupSelectControl}();Yt.prototype.subtype="select",Yt.prototype.fieldtype=qe,Yt.prototype._cssclass_control="select";var Jt=new(function(e){_inherits(AppLookupRadioControlType,Et);var t=_createSuper(AppLookupRadioControlType);function AppLookupRadioControlType(){return _classCallCheck(this,AppLookupRadioControlType),t.apply(this,arguments)}return _createClass(AppLookupRadioControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Kt}}]),AppLookupRadioControlType}())("la","AppLookupRadioControl","A LivingApps applookup field (type 'applookup/radio')"),Kt=function(t){_inherits(AppLookupRadioControl,Wt);var r=_createSuper(AppLookupRadioControl);function AppLookupRadioControl(){return _classCallCheck(this,AppLookupRadioControl),r.apply(this,arguments)}return _createClass(AppLookupRadioControl,[{key:e.symbols.type,value:function value(){return Jt}}]),AppLookupRadioControl}();Kt.prototype.subtype="radio",Kt.prototype.fieldtype=Ge;var $t=new(function(e){_inherits(AppLookupChoiceControlType,Et);var t=_createSuper(AppLookupChoiceControlType);function AppLookupChoiceControlType(){return _classCallCheck(this,AppLookupChoiceControlType),t.apply(this,arguments)}return _createClass(AppLookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Zt}}]),AppLookupChoiceControlType}())("la","AppLookupChoiceControl","A LivingApps applookup field (type 'applookup/choice')"),Zt=function(t){_inherits(AppLookupChoiceControl,Wt);var r=_createSuper(AppLookupChoiceControl);function AppLookupChoiceControl(){return _classCallCheck(this,AppLookupChoiceControl),r.apply(this,arguments)}return _createClass(AppLookupChoiceControl,[{key:e.symbols.type,value:function value(){return $t}},{key:"search_url",get:function get(){return"field_"+this.identifier+"_search"}},{key:"search_param_name",get:function get(){return"q"}},{key:"target_param_name",get:function get(){return"target"}}]),AppLookupChoiceControl}();Zt.prototype.subtype="choice",Zt.prototype.fieldtype=je,Zt.prototype._cssclass_control="select",Zt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Wt.prototype._ul4attrs),["search_url","search_param_name","target_param_name"]));var Qt=function(e){_inherits(MultipleLookupControlType,Dt);var t=_createSuper(MultipleLookupControlType);function MultipleLookupControlType(){return _classCallCheck(this,MultipleLookupControlType),t.apply(this,arguments)}return _createClass(MultipleLookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof er}}]),MultipleLookupControlType}(),Xt=new Qt("la","MultipleLookupControl","A LivingApps multiple applookup field (type 'multipleapplookup')"),er=function(t){_inherits(MultipleLookupControl,Pt);var r=_createSuper(MultipleLookupControl);function MultipleLookupControl(){return _classCallCheck(this,MultipleLookupControl),r.apply(this,arguments)}return _createClass(MultipleLookupControl,[{key:e.symbols.type,value:function value(){return Xt}},{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;var t=this.lookupdata.get(e);return void 0!==t?[t]:[]}},{key:"search",value:function search(e,t){if("equals"===t.operator){var r,o=_createForOfIteratorHelper(e);try{for(o.s();!(r=o.n()).done;){if(r.value.key===t.value)return!0}}catch(e){o.e(e)}finally{o.f()}return!1}return!1}}]),MultipleLookupControl}();er.prototype.type="multiplelookup",er.prototype.fieldtype=Ae;var tr=new(function(e){_inherits(MultipleLookupCheckboxControlType,Qt);var t=_createSuper(MultipleLookupCheckboxControlType);function MultipleLookupCheckboxControlType(){return _classCallCheck(this,MultipleLookupCheckboxControlType),t.apply(this,arguments)}return _createClass(MultipleLookupCheckboxControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof rr}}]),MultipleLookupCheckboxControlType}())("la","MultipleLookupCheckboxControl","A LivingApps multiplelookup field (type 'multiplelookup/checkbox')"),rr=function(t){_inherits(MultipleLookupCheckboxControl,er);var r=_createSuper(MultipleLookupCheckboxControl);function MultipleLookupCheckboxControl(){return _classCallCheck(this,MultipleLookupCheckboxControl),r.apply(this,arguments)}return _createClass(MultipleLookupCheckboxControl,[{key:e.symbols.type,value:function value(){return tr}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}}]),MultipleLookupCheckboxControl}();rr.prototype.subtype="checkbox",rr.prototype.fieldtype=Se,rr.prototype._cssclass_root="llft-element";var or=new(function(e){_inherits(MultipleLookupSelectControlType,Qt);var t=_createSuper(MultipleLookupSelectControlType);function MultipleLookupSelectControlType(){return _classCallCheck(this,MultipleLookupSelectControlType),t.apply(this,arguments)}return _createClass(MultipleLookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof nr}}]),MultipleLookupSelectControlType}())("la","MultipleLookupSelectControl","A LivingApps multiplelookup field (type 'multiplelookup/select')"),nr=function(t){_inherits(MultipleLookupSelectControl,er);var r=_createSuper(MultipleLookupSelectControl);function MultipleLookupSelectControl(){return _classCallCheck(this,MultipleLookupSelectControl),r.apply(this,arguments)}return _createClass(MultipleLookupSelectControl,[{key:e.symbols.type,value:function value(){return or}}]),MultipleLookupSelectControl}();nr.prototype.subtype="select",nr.prototype.fieldtype=xe,nr.prototype._cssclass_control="select";var lr=new(function(e){_inherits(MultipleLookupChoiceControlType,Qt);var t=_createSuper(MultipleLookupChoiceControlType);function MultipleLookupChoiceControlType(){return _classCallCheck(this,MultipleLookupChoiceControlType),t.apply(this,arguments)}return _createClass(MultipleLookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ar}}]),MultipleLookupChoiceControlType}())("la","MultipleLookupChoiceControl","A LivingApps multiplelookup field (type 'multiplelookup/choice')"),ar=function(t){_inherits(MultipleLookupChoiceControl,er);var r=_createSuper(MultipleLookupChoiceControl);function MultipleLookupChoiceControl(){return _classCallCheck(this,MultipleLookupChoiceControl),r.apply(this,arguments)}return _createClass(MultipleLookupChoiceControl,[{key:e.symbols.type,value:function value(){return lr}}]),MultipleLookupChoiceControl}();ar.prototype.subtype="choice",ar.prototype.fieldtype=He,ar.prototype._cssclass_control="select";var ir=function(e){_inherits(MultipleAppLookupControlType,Et);var t=_createSuper(MultipleAppLookupControlType);function MultipleAppLookupControlType(){return _classCallCheck(this,MultipleAppLookupControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof sr}}]),MultipleAppLookupControlType}(),ur=new ir("la","MultipleAppLookupControl","A LivingApps multiple applookup field (type 'multipleapplookup')"),sr=function(t){_inherits(MultipleAppLookupControl,Wt);var r=_createSuper(MultipleAppLookupControl);function MultipleAppLookupControl(){return _classCallCheck(this,MultipleAppLookupControl),r.apply(this,arguments)}return _createClass(MultipleAppLookupControl,[{key:e.symbols.type,value:function value(){return ur}},{key:"search",value:function search(e,t){if("equals"===t.operator){if(null===t.value)return 0===e.length;var r,o=_createForOfIteratorHelper(e);try{for(o.s();!(r=o.n()).done;){if(r.value.search(t.value))return!0}}catch(e){o.e(e)}finally{o.f()}return!1}return!1}}]),MultipleAppLookupControl}();sr.prototype.type="multipleapplookup",sr.prototype.fieldtype=Ye;var pr=new(function(e){_inherits(MultipleAppLookupSelectControlType,ir);var t=_createSuper(MultipleAppLookupSelectControlType);function MultipleAppLookupSelectControlType(){return _classCallCheck(this,MultipleAppLookupSelectControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof cr}}]),MultipleAppLookupSelectControlType}())("la","MultipleAppLookupSelectControl","A LivingApps multiple applookup field (type 'multipleapplookup/select')"),cr=function(t){_inherits(MultipleAppLookupSelectControl,sr);var r=_createSuper(MultipleAppLookupSelectControl);function MultipleAppLookupSelectControl(){return _classCallCheck(this,MultipleAppLookupSelectControl),r.apply(this,arguments)}return _createClass(MultipleAppLookupSelectControl,[{key:e.symbols.type,value:function value(){return pr}}]),MultipleAppLookupSelectControl}();cr.prototype.subtype="select",cr.prototype.fieldtype=Ze,cr.prototype._cssclass_control="select";var _r=new(function(e){_inherits(MultipleAppLookupCheckboxControlType,ir);var t=_createSuper(MultipleAppLookupCheckboxControlType);function MultipleAppLookupCheckboxControlType(){return _classCallCheck(this,MultipleAppLookupCheckboxControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof hr}}]),MultipleAppLookupCheckboxControlType}())("la","MultipleAppLookupCheckboxControl","A LivingApps multiple applookup field (type 'multipleapplookup/checkbox')"),hr=function(t){_inherits(MultipleAppLookupCheckboxControl,sr);var r=_createSuper(MultipleAppLookupCheckboxControl);function MultipleAppLookupCheckboxControl(){return _classCallCheck(this,MultipleAppLookupCheckboxControl),r.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxControl,[{key:e.symbols.type,value:function value(){return _r}}]),MultipleAppLookupCheckboxControl}();hr.prototype.subtype="checkbox",hr.prototype.fieldtype=Ke;var yr=new(function(e){_inherits(MultipleAppLookupChoiceControlType,ir);var t=_createSuper(MultipleAppLookupChoiceControlType);function MultipleAppLookupChoiceControlType(){return _classCallCheck(this,MultipleAppLookupChoiceControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof dr}}]),MultipleAppLookupChoiceControlType}())("la","MultipleAppLookupChoiceControl","A LivingApps multiple applookup field (type 'multipleapplookup/choice')"),dr=function(t){_inherits(MultipleAppLookupChoiceControl,sr);var r=_createSuper(MultipleAppLookupChoiceControl);function MultipleAppLookupChoiceControl(){return _classCallCheck(this,MultipleAppLookupChoiceControl),r.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceControl,[{key:e.symbols.type,value:function value(){return yr}}]),MultipleAppLookupChoiceControl}();dr.prototype.subtype="choice",dr.prototype.fieldtype=Xe,dr.prototype._cssclass_control="select";var fr=new(function(e){_inherits(GeoControlType,et);var t=_createSuper(GeoControlType);function GeoControlType(){return _classCallCheck(this,GeoControlType),t.apply(this,arguments)}return _createClass(GeoControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof vr}}]),GeoControlType}())("la","GeoControl","A LivingApps geo field (type 'geo')"),vr=function(t){_inherits(GeoControl,rt);var r=_createSuper(GeoControl);function GeoControl(){return _classCallCheck(this,GeoControl),r.apply(this,arguments)}return _createClass(GeoControl,[{key:e.symbols.type,value:function value(){return fr}}]),GeoControl}();vr.prototype.type="geo",vr.prototype.fieldtype=$,vr.prototype._cssclass_root="llft-element";var kr=function(e){_inherits(FileControlType,et);var t=_createSuper(FileControlType);function FileControlType(){return _classCallCheck(this,FileControlType),t.apply(this,arguments)}return _createClass(FileControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Cr}}]),FileControlType}(),mr=new kr("la","FileControl","A LivingApps upload field (type 'file')"),Cr=function(t){_inherits(FileControl,rt);var r=_createSuper(FileControl);function FileControl(){return _classCallCheck(this,FileControl),r.apply(this,arguments)}return _createClass(FileControl,[{key:e.symbols.type,value:function value(){return mr}}]),FileControl}();Cr.prototype.type="file",Cr.prototype.fieldtype=X,Cr.prototype._cssclass_root="llft-element";var gr=new(function(e){_inherits(FileSignatureControlType,kr);var t=_createSuper(FileSignatureControlType);function FileSignatureControlType(){return _classCallCheck(this,FileSignatureControlType),t.apply(this,arguments)}return _createClass(FileSignatureControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof br}}]),FileSignatureControlType}())("la","FileSignatureControl","A LivingApps signature image field (type 'file/signature')"),br=function(t){_inherits(FileSignatureControl,Cr);var r=_createSuper(FileSignatureControl);function FileSignatureControl(){return _classCallCheck(this,FileSignatureControl),r.apply(this,arguments)}return _createClass(FileSignatureControl,[{key:e.symbols.type,value:function value(){return gr}}]),FileSignatureControl}();br.prototype.subtype="signature",br.prototype.fieldtype=te;var Tr=new(function(e){_inherits(ButtonControlType,et);var t=_createSuper(ButtonControlType);function ButtonControlType(){return _classCallCheck(this,ButtonControlType),t.apply(this,arguments)}return _createClass(ButtonControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Lr}}]),ButtonControlType}())("la","ButtonControl","A submit button"),Lr=function(t){_inherits(ButtonControl,rt);var r=_createSuper(ButtonControl);function ButtonControl(){return _classCallCheck(this,ButtonControl),r.apply(this,arguments)}return _createClass(ButtonControl,[{key:e.symbols.type,value:function value(){return Tr}}]),ButtonControl}();Lr.prototype.type="button";var Fr=new(function(t){_inherits(LookupItemType,e.Type);var r=_createSuper(LookupItemType);function LookupItemType(){return _classCallCheck(this,LookupItemType),r.apply(this,arguments)}return _createClass(LookupItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ar}}]),LookupItemType}())("la","LookupItem","An option in a lookup control/field"),Ar=function(t){_inherits(LookupItem,r);var o=_createSuper(LookupItem);function LookupItem(){return _classCallCheck(this,LookupItem),o.apply(this,arguments)}return _createClass(LookupItem,[{key:e.symbols.type,value:function value(){return Fr}},{key:"label",get:function get(){if(null===this.control)return this._label;var e=this._view_lookupitem();if(null===e)return this._label;var t=e.label;return null===t?this._label:t}},{key:"visible",get:function get(){if(null===this.control)return!0;var e=this._view_lookupitem();return null===e||e.visible}},{key:"_view_lookupitem",value:function _view_lookupitem(){var e=this.control.identifier,t=this.control.app.active_view;if(null!==t&&null!==t.controls){var r=t.controls.get(e);if(void 0!==r&&void 0!==r.lookupdata&&null!==r.lookupdata){var o=r.lookupdata.get(this.key);if(void 0!==o)return o}}return null}},{key:e.symbols.repr,value:function value(){var t="<LookupItem key="+e._repr(this.key)+" label="+e._repr(this.label);return this.visible||(t+="visible=False"),t+">"}}]),LookupItem}();Ar.prototype._ul4onattrs=["control","key","_label"],Ar.prototype._ul4attrs=new Set(["id","control","key","label"]);var wr=new(function(t){_inherits(ViewLookupItemType,e.Type);var r=_createSuper(ViewLookupItemType);function ViewLookupItemType(){return _classCallCheck(this,ViewLookupItemType),r.apply(this,arguments)}return _createClass(ViewLookupItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Sr}}]),ViewLookupItemType}())("la","ViewLookupItem","View specific information about a lookup item"),Sr=function(t){_inherits(ViewLookupItem,r);var o=_createSuper(ViewLookupItem);function ViewLookupItem(){return _classCallCheck(this,ViewLookupItem),o.apply(this,arguments)}return _createClass(ViewLookupItem,[{key:e.symbols.type,value:function value(){return wr}},{key:e.symbols.repr,value:function value(){var t="<ViewLookupItem key="+e._repr(this.key)+" label="+e._repr(this.label);return this.visible||(t+=" visible=False"),t+">"}}]),ViewLookupItem}();Sr.prototype._ul4onattrs=["key","label","visible"],Sr.prototype._ul4attrs=new Set(["key","label","visible"]);var Mr=function(t){_inherits(LayoutControlType,e.Type);var r=_createSuper(LayoutControlType);function LayoutControlType(){return _classCallCheck(this,LayoutControlType),r.apply(this,arguments)}return _createClass(LayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ir}}]),LayoutControlType}(),xr=new Mr("la","LayoutControl","A decoration in an input form"),Ir=function(t){_inherits(LayoutControl,r);var o=_createSuper(LayoutControl);function LayoutControl(){return _classCallCheck(this,LayoutControl),o.apply(this,arguments)}return _createClass(LayoutControl,[{key:"LayoutControl",value:function LayoutControl(){this.label=null,this.identifier=null,this.view=null,this.top=null,this.left=null,this.width=null,this.height=null,this._visible=!0}},{key:e.symbols.type,value:function value(){return xr}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"globals",get:function get(){return this.view.globals}},{key:"_sel_root",get:function get(){return"#livingapps-form .llft-element.llft-id-"+this.identifier}},{key:"_dom_root",get:function get(){return document.querySelector(this._sel_root)}},{key:"visible",get:function get(){var e;return null===(e=this._visible)||void 0===e||e}},{key:"visible",set:function set(e){this.globals._in_form()&&(this._dom_root.hidden=!e),this._visible=e}},{key:e.symbols.setattr,value:function value(t,r){"visible"===t?this.visible=e._bool(r):_get(_getPrototypeOf(LayoutControl.prototype),e.symbols.setattr,this).call(this,t,r)}}]),LayoutControl}();Ir.prototype._ul4onattrs=["label","identifier","view","top","left","width","height"],Ir.prototype._ul4attrs=new Set(["id","label","identifier","view","top","left","width","height","visible"]);var Hr=new(function(e){_inherits(HTMLLayoutControlType,Mr);var t=_createSuper(HTMLLayoutControlType);function HTMLLayoutControlType(){return _classCallCheck(this,HTMLLayoutControlType),t.apply(this,arguments)}return _createClass(HTMLLayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Rr}}]),HTMLLayoutControlType}())("la","HTMLLayoutControl","HTML decoration in an input form"),Rr=function(t){_inherits(HTMLLayoutControl,Ir);var r=_createSuper(HTMLLayoutControl);function HTMLLayoutControl(){return _classCallCheck(this,HTMLLayoutControl),r.apply(this,arguments)}return _createClass(HTMLLayoutControl,[{key:e.symbols.type,value:function value(){return Hr}},{key:"value",get:function get(){return this._value}},{key:"value",set:function set(e){this._value=e,this.globals._in_form()&&this._set_dom_value(this._value)}},{key:"_set_dom_value",value:function _set_dom_value(e){this._dom_root.innerHTML=e}},{key:e.symbols.setattr,value:function value(t,r){"value"===t?this.value=r:_get(_getPrototypeOf(HTMLLayoutControl.prototype),e.symbols.setattr,this).call(this,t,r)}}]),HTMLLayoutControl}();Rr.prototype._ul4onattrs=[].concat(_toConsumableArray(Ir.prototype._ul4onattrs),["_value","_visible"]),Rr.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ir.prototype._ul4attrs),["value"]));var Dr=new(function(e){_inherits(ImageLayoutControlType,Mr);var t=_createSuper(ImageLayoutControlType);function ImageLayoutControlType(){return _classCallCheck(this,ImageLayoutControlType),t.apply(this,arguments)}return _createClass(ImageLayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Or}}]),ImageLayoutControlType}())("la","ImageLayoutControl","An image decoration in an input form"),Or=function(t){_inherits(ImageLayoutControl,Ir);var r=_createSuper(ImageLayoutControl);function ImageLayoutControl(){return _classCallCheck(this,ImageLayoutControl),r.apply(this,arguments)}return _createClass(ImageLayoutControl,[{key:e.symbols.type,value:function value(){return Dr}},{key:"image",get:function get(){return this._image}},{key:"image",set:function set(e){this._image=e,this.globals._in_form()&&this._set_dom_value(this._image)}},{key:"original",get:function get(){return this.image}},{key:"original",set:function set(e){this.image=image}},{key:"_set_dom_value",value:function _set_dom_value(e){var t=this._dom_root.querySelector("img");if(null!==t){var r=null===e?"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==":this.globals.scaled_url(e,this.width,this.height);t.setAttribute("src",r)}}},{key:e.symbols.setattr,value:function value(t,r){"original"===t?this.original=r:"image"===t?this.image=r:_get(_getPrototypeOf(ImageLayoutControl.prototype),e.symbols.setattr,this).call(this,t,r)}}]),ImageLayoutControl}();Or.prototype._ul4onattrs=[].concat(_toConsumableArray(Ir.prototype._ul4onattrs),["_image","_visible"]),Or.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ir.prototype._ul4attrs),["image","original"]));var Pr=new(function(e){_inherits(ButtonLayoutControlType,Mr);var t=_createSuper(ButtonLayoutControlType);function ButtonLayoutControlType(){return _classCallCheck(this,ButtonLayoutControlType),t.apply(this,arguments)}return _createClass(ButtonLayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Br}}]),ButtonLayoutControlType}())("la","ButtonLayoutControl","A submit button in an input form"),Br=function(t){_inherits(ButtonLayoutControl,Ir);var r=_createSuper(ButtonLayoutControl);function ButtonLayoutControl(){return _classCallCheck(this,ButtonLayoutControl),r.apply(this,arguments)}return _createClass(ButtonLayoutControl,[{key:e.symbols.type,value:function value(){return Pr}}]),ButtonLayoutControl}();Br.prototype._ul4onattrs=[].concat(_toConsumableArray(Ir.prototype._ul4onattrs),["original","scaled","_visible"]);var Nr=new(function(t){_inherits(ViewControlType,e.Type);var r=_createSuper(ViewControlType);function ViewControlType(){return _classCallCheck(this,ViewControlType),r.apply(this,arguments)}return _createClass(ViewControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ur}}]),ViewControlType}())("la","ViewControl","Contains view specific information about a control"),Ur=function(t){_inherits(ViewControl,r);var o=_createSuper(ViewControl);function ViewControl(){return _classCallCheck(this,ViewControl),o.apply(this,arguments)}return _createClass(ViewControl,[{key:e.symbols.type,value:function value(){return Nr}},{key:"mode",get:function get(){return this._mode?"display":"edit"}}]),ViewControl}();Ur.prototype._ul4onattrs=["view","control","top","left","width","height","z_index","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","_mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"],Ur.prototype._ul4attrs=new Set(["id","view","control","top","left","width","height","z_index","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"]);var qr=function(t){_inherits(UserType,e.Type);var r=_createSuper(UserType);function UserType(){return _classCallCheck(this,UserType),r.apply(this,arguments)}return _createClass(UserType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Gr}}]),UserType}(),Vr=new qr("la","User","A LivingApps user/account"),Gr=function(t){_inherits(User,r);var o=_createSuper(User);function User(){return _classCallCheck(this,User),o.apply(this,arguments)}return _createClass(User,[{key:e.symbols.type,value:function value(){return Vr}},{key:e.symbols.repr,value:function value(){return"<User id="+e._repr(this.id)+" firstname="+e._repr(this.firstname)+" surname="+e._repr(this.surname)+" email="+e._repr(this.email)+">"}}]),User}();Gr.prototype._ul4onattrs=["_id","gender","title","firstname","surname","initials","email","streetname","streetnumber","zip","city","phone","fax","lang","image","summary","interests","personalwebsite","companywebsite","company","position","department","keyviews","globals"],Gr.prototype._ul4attrs=new Set(["id","globals","_id","gender","title","firstname","surname","initials","email","streetname","streetnumber","zip","city","phone","fax","lang","image","summary","interests","personalwebsite","companywebsite","company","position","department","keyviews"]);var Er=new(function(t){_inherits(FileType,e.Type);var r=_createSuper(FileType);function FileType(){return _classCallCheck(this,FileType),r.apply(this,arguments)}return _createClass(FileType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof jr}}]),FileType}())("la","File","An uploaded file"),jr=function(t){_inherits(File,r);var o=_createSuper(File);function File(){return _classCallCheck(this,File),o.apply(this,arguments)}return _createClass(File,[{key:e.symbols.type,value:function value(){return Er}},{key:e.symbols.repr,value:function value(){return"<File url="+e._repr(this.url)+" filename="+e._repr(this.filename)+">"}},{key:"url",get:function get(){return"https://"+this.globals.hostname+"/files/"+this.contextid+"/"+this.id}},{key:"archive_url",get:function get(){return null===this.archive?this.url:this.archive.url+"/"+this.filename}}]),File}();jr.prototype._ul4onattrs=["globals","filename","mimetype","width","height","internal_id","createdat","size","duration","geo","recordedat","storagefilename","archive","context_id"],jr.prototype._ul4attrs=new Set(["globals","id","internal_id","url","archive_url","filename","mimetype","width","height","size","duration","geo","recordedat","archive","createdat","context_id"]);var Wr=new(function(t){_inherits(GeoType,e.Type);var r=_createSuper(GeoType);function GeoType(){return _classCallCheck(this,GeoType),r.apply(this,arguments)}return _createClass(GeoType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof zr}}]),GeoType}())("la","Geo","Geographical coordinates and location information"),zr=function(t){_inherits(Geo,r);var o=_createSuper(Geo);function Geo(e,t,r){var n,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return _classCallCheck(this,Geo),(n=o.call(this,null)).globals=e,n.lat=t,n.long=r,n.info=l,n}return _createClass(Geo,[{key:e.symbols.type,value:function value(){return Wr}},{key:e.symbols.repr,value:function value(){return"<Geo lat="+e._repr(this.lat)+" long="+e._repr(this.long)+" info="+e._repr(this.info)+">"}}]),Geo}();zr.prototype._ul4onattrs=["globals","lat","long","info"],zr.prototype._ul4attrs=new Set(["globals","lat","long","info"]);var Yr=function(t){_inherits(AttachmentType,e.Type);var r=_createSuper(AttachmentType);function AttachmentType(){return _classCallCheck(this,AttachmentType),r.apply(this,arguments)}return _createClass(AttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Kr}}]),AttachmentType}(),Jr=new Yr("la","Attachment","An attachment of a record"),Kr=function(t){_inherits(Attachment,r);var o=_createSuper(Attachment);function Attachment(){return _classCallCheck(this,Attachment),o.apply(this,arguments)}return _createClass(Attachment,[{key:e.symbols.type,value:function value(){return Jr}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" label="+e._repr(this.label)+">"}}]),Attachment}();Kr.prototype._ul4onattrs=["record","label","active"],Kr.prototype._ul4attrs=new Set(["id","record","label","active"]);var $r=new(function(e){_inherits(NoteAttachmentType,Yr);var t=_createSuper(NoteAttachmentType);function NoteAttachmentType(){return _classCallCheck(this,NoteAttachmentType),t.apply(this,arguments)}return _createClass(NoteAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Zr}}]),NoteAttachmentType}())("la","NoteAttachment","A note attachment of a record"),Zr=function(t){_inherits(NoteAttachment,Kr);var r=_createSuper(NoteAttachment);function NoteAttachment(){return _classCallCheck(this,NoteAttachment),r.apply(this,arguments)}return _createClass(NoteAttachment,[{key:e.symbols.type,value:function value(){return $r}}]),NoteAttachment}();Zr.prototype.type="noteattachment",Zr.prototype._ul4onattrs=[].concat(_toConsumableArray(Kr.prototype._ul4onattrs),["value"]),Zr.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Kr.prototype._ul4onattrs),["value"]));var Qr=new(function(e){_inherits(URLAttachmentType,Yr);var t=_createSuper(URLAttachmentType);function URLAttachmentType(){return _classCallCheck(this,URLAttachmentType),t.apply(this,arguments)}return _createClass(URLAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Xr}}]),URLAttachmentType}())("la","URLAttachment","A URL attachment of a record"),Xr=function(t){_inherits(URLAttachment,Kr);var r=_createSuper(URLAttachment);function URLAttachment(){return _classCallCheck(this,URLAttachment),r.apply(this,arguments)}return _createClass(URLAttachment,[{key:e.symbols.type,value:function value(){return Qr}}]),URLAttachment}();Xr.prototype.type="urlattachment",Xr.prototype._ul4onattrs=[].concat(_toConsumableArray(Kr.prototype._ul4onattrs),["value"]),Xr.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Kr.prototype._ul4onattrs),["value"]));var eo=new(function(e){_inherits(FileAttachmentType,Yr);var t=_createSuper(FileAttachmentType);function FileAttachmentType(){return _classCallCheck(this,FileAttachmentType),t.apply(this,arguments)}return _createClass(FileAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof to}}]),FileAttachmentType}())("la","FileAttachment","A file attachment of a record"),to=function(t){_inherits(FileAttachment,Kr);var r=_createSuper(FileAttachment);function FileAttachment(){return _classCallCheck(this,FileAttachment),r.apply(this,arguments)}return _createClass(FileAttachment,[{key:e.symbols.type,value:function value(){return eo}}]),FileAttachment}();to.prototype.type="fileattachment",to.prototype._ul4onattrs=[].concat(_toConsumableArray(Kr.prototype._ul4onattrs),["value"]),to.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Kr.prototype._ul4onattrs),["value"]));var ro=new(function(e){_inherits(JSONAttachmentType,Yr);var t=_createSuper(JSONAttachmentType);function JSONAttachmentType(){return _classCallCheck(this,JSONAttachmentType),t.apply(this,arguments)}return _createClass(JSONAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof oo}}]),JSONAttachmentType}())("la","JSONAttachment","A JSON attachment of a record"),oo=function(t){_inherits(JSONAttachment,Kr);var r=_createSuper(JSONAttachment);function JSONAttachment(){return _classCallCheck(this,JSONAttachment),r.apply(this,arguments)}return _createClass(JSONAttachment,[{key:e.symbols.type,value:function value(){return ro}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(t){return"value"===t?e._asjson(this.value):this[t]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(t,r){"value"===t?this.value=e._fromjson(r):this[t]=r}}]),JSONAttachment}();oo.prototype.type="jsonattachment",oo.prototype._ul4onattrs=[].concat(_toConsumableArray(Kr.prototype._ul4onattrs),["value"]),oo.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Kr.prototype._ul4onattrs),["value"]));var no=new(function(t){_inherits(DataActionType,e.Type);var r=_createSuper(DataActionType);function DataActionType(){return _classCallCheck(this,DataActionType),r.apply(this,arguments)}return _createClass(DataActionType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof lo}}]),DataActionType}())("la","DataAction","A data action configured for an app."),lo=function(t){_inherits(DataAction,r);var o=_createSuper(DataAction);function DataAction(){return _classCallCheck(this,DataAction),o.apply(this,arguments)}return _createClass(DataAction,[{key:e.symbols.type,value:function value(){return no}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataAction}();lo.prototype._ul4onattrs=["app","identifier","label","order","permission","active","icon","description","message","filter","as_multiple_action","as_single_action","as_mail_link","on_edit_form_show","on_record_edit","on_record_new","on_record_delete"],lo.prototype._ul4attrs=new Set(["app","id","identifier","label","order","permission","active","icon","description","message","filter","as_multiple_action","as_single_action","as_link","on_edit_form_show","on_record_new","on_record_edit","on_record_delete"]);var ao=new(function(t){_inherits(InstallationType,e.Type);var r=_createSuper(InstallationType);function InstallationType(){return _classCallCheck(this,InstallationType),r.apply(this,arguments)}return _createClass(InstallationType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof io}}]),InstallationType}())("la","Installation","The installation that created an app"),io=function(t){_inherits(Installation,r);var o=_createSuper(Installation);function Installation(){return _classCallCheck(this,Installation),o.apply(this,arguments)}return _createClass(Installation,[{key:e.symbols.type,value:function value(){return ao}},{key:e.symbols.repr,value:function value(){return"<Installation id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),Installation}();io.prototype._ul4onattrs=["name"],io.prototype._ul4attrs=new Set(["id","name"]);var uo=new(function(t){_inherits(CategoryType,e.Type);var r=_createSuper(CategoryType);function CategoryType(){return _classCallCheck(this,CategoryType),r.apply(this,arguments)}return _createClass(CategoryType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof so}}]),CategoryType}())("la","Category","A navigation category"),so=function(t){_inherits(Category,r);var o=_createSuper(Category);function Category(){return _classCallCheck(this,Category),o.apply(this,arguments)}return _createClass(Category,[{key:e.symbols.type,value:function value(){return uo}},{key:e.symbols.repr,value:function value(){for(var t=[],r=this;null!==r;)t.splice(0,0,r.identifier),r=r.parent;return"<Category id="+e._repr(this.id)+" identifierpath="+e._repr(t.join("/"))+NaN+e._repr(this.name)+">"}}]),Category}();so.prototype._ul4onattrs=["identifier","name","order","parent","children","apps"],so.prototype._ul4attrs=new Set(["id","identifier","name","order","parent","children","apps"]);var po=new(function(t){_inherits(KeyViewType,e.Type);var r=_createSuper(KeyViewType);function KeyViewType(){return _classCallCheck(this,KeyViewType),r.apply(this,arguments)}return _createClass(KeyViewType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof co}}]),KeyViewType}())("la","KeyView","Object granting access to a view template"),co=function(t){_inherits(KeyView,r);var o=_createSuper(KeyView);function KeyView(){return _classCallCheck(this,KeyView),o.apply(this,arguments)}return _createClass(KeyView,[{key:e.symbols.type,value:function value(){return po}},{key:e.symbols.repr,value:function value(){return"<KeyView id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),KeyView}();co.prototype._ul4onattrs=["identifier","name","key","user"],co.prototype._ul4attrs=new Set(["id","identifier","name","key","user"]);var _o=function(t){_inherits(AppParameterType,e.Type);var r=_createSuper(AppParameterType);function AppParameterType(){return _classCallCheck(this,AppParameterType),r.apply(this,arguments)}return _createClass(AppParameterType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof yo}}]),AppParameterType}(),ho=new _o("la","AppParameter","A parameter of a LivingApps application"),yo=function(t){_inherits(AppParameter,r);var o=_createSuper(AppParameter);function AppParameter(){return _classCallCheck(this,AppParameter),o.apply(this,arguments)}return _createClass(AppParameter,[{key:e.symbols.type,value:function value(){return ho}},{key:e.symbols.repr,value:function value(){return"<AppParameter id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"full_identifier",get:function get(){return null===this.namespace?this.identifier:"".concat(this.namespace,".").concat(this.identifier)}}]),AppParameter}();yo.prototype._ul4onattrs=["app","appgroup","parent","type","order","identifier","description","value","createdat","createdby","updatedat","updatedby","namespace"],yo.prototype._ul4attrs=new Set(["id","app","appgroup","parent","app","type","order","identifier","namespace","full_identifier","description","value","createdat","createdby","updatedat","updatedby"]);var fo=new(function(e){_inherits(MutableAppParameterType,_o);var t=_createSuper(MutableAppParameterType);function MutableAppParameterType(){return _classCallCheck(this,MutableAppParameterType),t.apply(this,arguments)}return _createClass(MutableAppParameterType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof vo}}]),MutableAppParameterType}())("la","MutableAppParameter","A mutable parameter of a LivingApps application"),vo=function(t){_inherits(MutableAppParameter,yo);var r=_createSuper(MutableAppParameter);function MutableAppParameter(){return _classCallCheck(this,MutableAppParameter),r.apply(this,arguments)}return _createClass(MutableAppParameter,[{key:e.symbols.type,value:function value(){return fo}},{key:e.symbols.repr,value:function value(){return"<MutableAppParameter id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),MutableAppParameter}(),ko=function(t){_inherits(MenuItemType,e.Type);var r=_createSuper(MenuItemType);function MenuItemType(){return _classCallCheck(this,MenuItemType),r.apply(this,arguments)}return _createClass(MenuItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Co}}]),MenuItemType}(),mo=new ko("la","MenuItem","An additional menu item in an app that links to a target page."),Co=function(t){_inherits(MenuItem,r);var o=_createSuper(MenuItem);function MenuItem(){return _classCallCheck(this,MenuItem),o.apply(this,arguments)}return _createClass(MenuItem,[{key:e.symbols.type,value:function value(){return mo}},{key:e.symbols.repr,value:function value(){return"<MenuItem id="+e._repr(this.id)+"identifier="+e._repr(this.identifier)+" label="+e._repr(this.label)+" type="+e._repr(this.type)+">"}}]),MenuItem}();Co.prototype._ul4onattrs=["app","identifier","label","type","icon","title","target","cssclass","url","order","start_time","end_time","on_app_overview_page","on_app_detail_page","on_form_page","on_iframe_page","on_view_template","on_custom_overview_page","accessible","children","createdat","createdby","updatedat","updatedby"],Co.prototype._ul4attrs=new Set(["id","app","identifier","label","type","icon","title","target","cssclass","url","order","start_time","end_time","on_app_overview_page","on_app_detail_page","on_form_page","on_iframe_page","on_view_template","on_custom_overview_page","accessible","children","createdat","createdby","updatedat","updatedby"]);var go=new ko("la","Panel","An additional panel in an app that is displayed on various LivingApps pages and links to a target page."),bo=function(t){_inherits(Panel,Co);var r=_createSuper(Panel);function Panel(){return _classCallCheck(this,Panel),r.apply(this,arguments)}return _createClass(Panel,[{key:e.symbols.type,value:function value(){return go}},{key:e.symbols.repr,value:function value(){return"<Panel id="+e._repr(this.id)+"identifier="+e._repr(this.identifier)+" label="+e._repr(this.label)+" type="+e._repr(this.type)+">"}}]),Panel}();bo.prototype._ul4onattrs=[].concat(_toConsumableArray(Co.prototype._ul4onattrs),["description","description_url","image","row","column","width","height","header_type","header_background","text_color","background_color1","background_color2"]),bo.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Co.prototype._ul4attrs),["description","description_url","image","row","column","width","height"]));var To=new qr("la","ViewTemplateInfo","basic information about a view template"),Lo=function(t){_inherits(ViewTemplateInfo,r);var o=_createSuper(ViewTemplateInfo);function ViewTemplateInfo(){return _classCallCheck(this,ViewTemplateInfo),o.apply(this,arguments)}return _createClass(ViewTemplateInfo,[{key:e.symbols.type,value:function value(){return To}},{key:e.symbols.repr,value:function value(){return"<ViewTemplateInfo id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+" name="+e._repr(this.name)+">"}}]),ViewTemplateInfo}();Lo.prototype._ul4onattrs=["app","identifier","name","icon","type","mimetype","permission_level"],Lo.prototype._ul4attrs=new Set(["app","id","identifier","name","icon","type","mimetype","permission_level"]);var Fo=new(function(t){_inherits(FormType,e.Type);var r=_createSuper(FormType);function FormType(){return _classCallCheck(this,FormType),r.apply(this,arguments)}return _createClass(FormType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ao}}]),FormType}())("la","Form","The input form."),Ao=function(t){_inherits(Form,e.Proto);var r=_createSuper(Form);function Form(e,t){var o;_classCallCheck(this,Form),(o=r.call(this)).globals=e,o.template=t,o._geo_wired=!1;var n,l=_createForOfIteratorHelper(e.record.fields.values());try{for(l.s();!(n=l.n()).done;){var a=n.value;o.wire_field(a)}}catch(e){l.e(e)}finally{l.f()}return o.render_template(null),o}return _createClass(Form,[{key:e.symbols.type,value:function value(){return Fo}},{key:"_dom_button",get:function get(){return document.querySelector(this._sel_form+" "+this._sel_button)}},{key:"enabled",get:function get(){return!this._dom_button.disabled}},{key:"enabled",set:function set(e){this._dom_button.disabled=!e}},{key:e.symbols.getattr,value:function value(t){if("enabled"===t)return this.enabled;throw new e.AttributeError(this,t)}},{key:e.symbols.setattr,value:function value(t,r){if("enabled"!==t)throw new e.AttributeError(this,t);this.enabled=e._bool(r)}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" enabled="+e._repr(this.enabled)+">"}},{key:"toString",value:function toString(){return this[e.symbols.repr]()}},{key:"render_template",value:function render_template(t){var r=this,o={datasources:this.globals.datasources,record:this.globals.record,app:this.globals.app,fields:this.globals.record.fields,identifier:t},n={globals:this.globals,form:this,la:xo},l="LivingApps update template: ";l+=null===t?"Initialization":"Value change in "+e._repr(t),this.globals.group_logging(l,(function(){try{r.template.renders(o,n)}catch(t){console&&console.error&&(r.globals._start_log_message(),console.group&&console.group("UL4 stacktrace"),e.report_exc(t),console.groupEnd&&console.groupEnd(),console.groupCollapsed&&console.groupCollapsed("Javascript stacktrace"),console.error(t),console.groupEnd&&console.groupEnd())}}))}},{key:"wire_geo",value:function wire_geo(){var e=this;if(!this._geo_wired){if(null!==this.globals.app.active_view&&navigator.geolocation){var t=this.globals.app.active_view.use_geo;"once"!==t&&"watch"!==t||navigator.geolocation.getCurrentPosition((function(t){e.globals.mode=e.globals.mode.substring(0,e.globals.mode.lastIndexOf("/")+1)+"geo",e.globals.set_current_geo(t),e.render_template(null)})),"watch"===t&&navigator.geolocation.watchPosition((function(t){e.globals.mode=e.globals.mode.substring(0,e.globals.mode.lastIndexOf("/")+1)+"geo",e.globals.set_current_geo(t),e.render_template(null)}))}this._geo_wired=!0}}},{key:"wire_field",value:function wire_field(e){var t,r=this,o=_createForOfIteratorHelper(e._dom_controls);try{for(o.s();!(t=o.n()).done;){t.value.addEventListener(e._inputevent,(function(t){r.wire_geo(),r.globals.mode=r.globals.mode.substring(0,r.globals.mode.lastIndexOf("/")+1)+"input",r.render_template(e.control.identifier)}))}}catch(e){o.e(e)}finally{o.f()}}}]),Form}();Ao.prototype._ul4attrs=new Set(["enabled"]),Ao.prototype._sel_form="#livingapps-form form",Ao.prototype._sel_button="[type=submit]";for(var wo=0,So=[l,i,_,y,f,Co,bo,k,m,g,T,nt,at,ut,ht,vt,mt,gt,Tt,St,It,Rt,Pt,Nt,qt,Gt,Wt,Yt,Kt,Zt,er,nr,rr,ar,sr,cr,hr,dr,vr,Cr,br,Lr,w,M,P,q,G,j,z,J,I,R,$,X,te,ne,ae,ue,pe,ye,ve,Ae,Oe,Ne,Ye,Ar,Sr,Ir,Rr,Or,Br,Ur,Gr,jr,zr,Zr,Xr,to,oo,lo,io,so,co,yo,vo,Lo];wo<So.length;wo++){var Mo=So[wo];e.register("de.livinglogic.livingapi."+Mo.name.toLowerCase(),Mo)}var xo=new e.Module("la","LivingAPI types",{FlashMessage:i,File:jr,Geo:zr,User:Gr,KeyView:co,Globals:l,App:_,AppGroup:y,TextControl:ht,URLControl:mt,EmailControl:vt,PasswordControl:dt,TelControl:gt,TextAreaControl:Tt,HTMLControl:Ft,IntControl:at,NumberControl:ut,DateControl:St,DatetimeMinuteControl:It,DatetimeSecondControl:Rt,BoolControl:nt,LookupSelectControl:Nt,LookupRadioControl:qt,LookupChoiceControl:Gt,AppLookupSelectControl:Yt,AppLookupRadioControl:Kt,AppLookupChoiceControl:Zt,MultipleLookupSelectControl:nr,MultipleLookupCheckboxControl:rr,MultipleLookupChoiceControl:ar,MultipleAppLookupSelectControl:cr,MultipleAppLookupCheckboxControl:hr,MultipleAppLookupChoiceControl:dr,FileControl:Cr,FileSignatureControl:br,GeoControl:vr,ViewControl:Ur,RecordChildren:g,Record:T,FileAttachment:to,URLAttachment:Xr,NoteAttachment:Zr,JSONAttachment:oo,DataAction:lo,Installation:io,HTMLLayoutControl:Rr,ImageLayoutControl:Or,ButtonLayoutControl:Br,View:f,DataSource:k,DataSourceChildren:m,LookupItem:Ar,ViewLookupItem:Sr,Category:so,AppParameter:yo,MutableAppParameter:vo,MenuItem:Co,Panel:bo,ViewTemplateInfo:Lo});export{_ as App,y as AppGroup,Zt as AppLookupChoiceControl,je as AppLookupChoiceField,Wt as AppLookupControl,Ne as AppLookupField,Oe as AppLookupFieldBase,Kt as AppLookupRadioControl,Ge as AppLookupRadioField,Yt as AppLookupSelectControl,qe as AppLookupSelectField,yo as AppParameter,Kr as Attachment,r as Base,nt as BoolControl,M as BoolField,Lr as ButtonControl,Br as ButtonLayoutControl,so as Category,ce as ChoiceFieldBase,rt as Control,lo as DataAction,k as DataSource,m as DataSourceChildren,St as DateControl,ae as DateField,ne as DateFieldBase,It as DatetimeMinuteControl,ue as DatetimeMinuteField,Rt as DatetimeSecondControl,pe as DatetimeSecondField,vt as EmailControl,q as EmailField,w as Field,jr as File,to as FileAttachment,Cr as FileControl,X as FileField,br as FileSignatureControl,te as FileSignatureField,i as FlashMessage,Ao as Form,zr as Geo,vr as GeoControl,$ as GeoField,l as Globals,Ft as HTMLControl,J as HTMLField,Rr as HTMLLayoutControl,o as Handler,Or as ImageLayoutControl,io as Installation,at as IntControl,I as IntField,oo as JSONAttachment,co as KeyView,Ir as LayoutControl,Gt as LookupChoiceControl,Te as LookupChoiceField,Pt as LookupControl,ve as LookupField,ye as LookupFieldBase,Ar as LookupItem,qt as LookupRadioControl,me as LookupRadioField,Nt as LookupSelectControl,ge as LookupSelectField,Co as MenuItem,hr as MultipleAppLookupCheckboxControl,Ke as MultipleAppLookupCheckboxField,dr as MultipleAppLookupChoiceControl,Xe as MultipleAppLookupChoiceField,sr as MultipleAppLookupControl,Ye as MultipleAppLookupField,cr as MultipleAppLookupSelectControl,Ze as MultipleAppLookupSelectField,rr as MultipleLookupCheckboxControl,Se as MultipleLookupCheckboxField,ar as MultipleLookupChoiceControl,He as MultipleLookupChoiceField,er as MultipleLookupControl,Ae as MultipleLookupField,nr as MultipleLookupSelectControl,xe as MultipleLookupSelectField,vo as MutableAppParameter,Zr as NoteAttachment,ut as NumberControl,R as NumberField,bo as Panel,dt as PasswordControl,N as PasswordField,s as Permission,T as Record,g as RecordChildren,ct as StringControl,P as StringField,gt as TelControl,j as TelField,Tt as TextAreaControl,z as TextAreaField,ht as TextControl,Xr as URLAttachment,mt as URLControl,G as URLField,Gr as User,f as View,Ur as ViewControl,Sr as ViewLookupItem,Lo as ViewTemplateInfo,element,xo as module,url_with_params,t as version};
1
+ import*as e from"/static/ul4/1.16.1/dist/esm/ul4.js";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e})(e,t)}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var r,o=_getPrototypeOf(e);if(t){var n=_getPrototypeOf(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function _get(e,t,r){var o=_superPropBase(e,t);if(o){var n=Object.getOwnPropertyDescriptor(o,t);return n.get?n.get.call(r):n.value}})(e,t,r||e)}function set(e,t,r,o){return(set="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function set(e,t,r,o){var n,l=_superPropBase(e,t);if(l){if((n=Object.getOwnPropertyDescriptor(l,t)).set)return n.set.call(o,r),!0;if(!n.writable)return!1}if(n=Object.getOwnPropertyDescriptor(o,t)){if(!n.writable)return!1;n.value=r,Object.defineProperty(o,t,n)}else!function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(o,t,r);return!0})(e,t,r,o)}function _set(e,t,r,o,n){if(!set(e,t,r,o||e)&&n)throw new Error("failed to set property");return r}function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,l=[],a=!0,i=!1;try{for(r=r.call(e);!(a=(o=r.next()).done)&&(l.push(o.value),!t||l.length!==t);a=!0);}catch(e){i=!0,n=e}finally{try{a||null==r.return||r.return()}finally{if(i)throw n}}return l}(e,t)||_unsupportedIterableToArray(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_unsupportedIterableToArray(e)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,F=function(){};return{s:F,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,l=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){a=!0,n=e},f:function(){try{l||null==r.return||r.return()}finally{if(a)throw n}}}}var t="1.31.0";function element(t){for(var r=document.createElement(t),o=arguments.length,n=new Array(o>1?o-1:0),l=1;l<o;l++)n[l-1]=arguments[l];for(var a=0,i=n;a<i.length;a++){var u=i[a];"string"==typeof u&&r.appendChild(document.createTextNode(u));var s=u instanceof Map,p=e._isobject(u);if(s||p){p&&(u=Object.entries(u));var c,_=_createForOfIteratorHelper(u);try{for(_.s();!(c=_.n()).done;){var h=_slicedToArray(c.value,2),y=h[0],d=h[1];null!==d&&r.setAttribute(y,d)}}catch(e){_.e(e)}finally{_.f()}}}return r}function _append_param_to_url(t,r,o){if(e._islist(o)||e._isset(o)){var n,l=_createForOfIteratorHelper(o);try{for(l.s();!(n=l.n()).done;){_append_param_to_url(t,r,n.value)}}catch(e){l.e(e)}finally{l.f()}}else"string"==typeof o?t.append(r,o):null!==o&&t.append(r,e._str(o))}function url_with_params(t){for(var r=new URLSearchParams,o=arguments.length,n=new Array(o>1?o-1:0),l=1;l<o;l++)n[l-1]=arguments[l];for(var a=0,i=n;a<i.length;a++){var u=i[a];if(e._islist(u)&&2==u.length)_append_param_to_url.apply(void 0,[r].concat(_toConsumableArray(u)));else if("[object Object]"!==Object.prototype.toString.call(u)||u instanceof e.Proto){if(null!==u&&"object"===_typeof(u)&&"object"===_typeof(u.__proto__)&&u.__proto__===Map.prototype){var s,p=_createForOfIteratorHelper(u);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=c[1];_append_param_to_url(r,_,h)}}catch(e){p.e(e)}finally{p.f()}}}else for(var y in u)_append_param_to_url(r,y,u[y])}return(r=r.toString().replace("+","%20")).length>0&&(t+="?"+r),t}var r=function(t){_inherits(Base,e.Proto);var r=_createSuper(Base);function Base(e){var t;return _classCallCheck(this,Base),(t=r.call(this)).id=e,t}return _createClass(Base,[{key:"ul4onid",get:function get(){return this.id}},{key:"ul4ondump",value:function ul4ondump(e){for(var t=0;t<this._ul4onattrs.length;++t)e.dump(this._dumpUL4ONAttr(this._ul4onattrs[t]))}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return this[e]}},{key:"ul4onload",value:function ul4onload(e){for(var t=0,r=e.loadcontent();;++t){var o=r.next();if(o.done)break;t<this._ul4onattrs.length&&this._loadUL4ONAttr(this._ul4onattrs[t],o.value)}for(;t<this._ul4onattrs.length;++t)this._setDefaultUL4ONAttr(this._ul4onattrs[t])}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){this[e]=t}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){this[e]=null}},{key:e.symbols.getattr,value:function value(t){if(this._ul4attrs.has(t)){var value=this[t];if("function"==typeof value){var r=value.bind(this);return r._ul4_name=value._ul4_name||value.name,r._ul4_signature=value._ul4_signature,r._ul4_needsobject=value._ul4_needsobject,r._ul4_needscontext=value._ul4_needscontext,r}return value}if(t.startsWith("x_"))return this.hasOwnProperty(t)?this[t]:null;throw new e.AttributeError(this,t)}},{key:e.symbols.setattr,value:function value(t,r){if(!t.startsWith("x_"))throw new e.AttributeError(this,t);this[t]=r}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+">"}},{key:"toString",value:function toString(){return this[e.symbols.repr]()}}]),Base}(),o=function(){function Handler(){_classCallCheck(this,Handler)}return _createClass(Handler,[{key:"save",value:function save(e){}},{key:"delete",value:function _delete(e){}}]),Handler}(),n=new(function(t){_inherits(GlobalsType,e.Type);var r=_createSuper(GlobalsType);function GlobalsType(){return _classCallCheck(this,GlobalsType),r.apply(this,arguments)}return _createClass(GlobalsType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof l}}]),GlobalsType}())("la","Globals","Global information"),l=function(t){_inherits(Globals,r);var l=_createSuper(Globals);function Globals(e){var t;return _classCallCheck(this,Globals),(t=l.call(this,e)).version=null,t.hostname=null,t.free=!1,t.platform=null,t.user=null,t.lang=null,t.datasources=null,t.app=null,t.record=null,t.mode=null,t.groups=null,t.maxdbactions=null,t.maxtemplateruntime=null,t.flashmessages=null,t.view_template_id=null,t.email_template_id=null,t.handler=new o,t._log_stack=[],t._current_geo=null,t._next_attachment_id=0,t}return _createClass(Globals,[{key:e.symbols.type,value:function value(){return n}},{key:"dist",value:function dist(e,t){var r=function sqsin(e){return(e=Math.sin(e))*e},o=function sqsos(e){return(e=Math.cos(e))*e},n=Math.PI/180,l=1/298.257223563,a=e.lat*n,i=e.long*n,u=t.lat*n,s=(a+u)/2,p=(a-u)/2,c=(i-t.long*n)/2,_=r(p)*o(c)+o(s)*r(c),h=o(p)*o(c)+r(s)*r(c),y=Math.atan(Math.sqrt(_/h)),d=2*y*6378.137;if(0===d)return d;var f=Math.sqrt(_*h)/y,v=(3*f+1)/(2*_);return d*(1+l*((3*f-1)/(2*h))*r(s)*o(p)-l*v*o(s)*r(p))}},{key:"scaled_url",value:function scaled_url(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"fill",n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"sm",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,i=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,s=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null,p=arguments.length>10&&void 0!==arguments[10]?arguments[10]:null,c=!(arguments.length>11&&void 0!==arguments[11])||arguments[11],_=null;e instanceof Wr&&(e=e.archive_url,(_=encodeURIComponent(e.filename))!=e.filename&&(_=null));var h="https://"+this.hostname;return h+=c?"/imgproxycache/insecure":"/imgproxy/insecure","fit"!==o&&(h+="/rt:"+o),null!=t&&(h+="/w:"+t),null!=r&&(h+="/h:"+r),n&&(h+="/el:1"),null!=l&&(h+="/g:"+l),null!=a&&(h+="/q:"+a),null!==i&&i%360!=0&&(h+="/rot:"+rotatet),null!=u&&(h+="/bl:"+u),null!=s&&(h+="/sh:"+s),null!=p&&(h+="/f:"+p),null!=_&&(h+="/fn:"+_),h+="/plain/"+encodeURIComponent(e)}},{key:"qrcode_url",value:function qrcode_url(e,t){return"https://"+this.hostname+"/qr/generate?data="+encodeURIComponent(e)+"&size="+encodeURIComponent(t)}},{key:e.symbols.repr,value:function value(){return"<Globals version="+e._repr(this.version)+" mode="+e._repr(this.mode)+">"}},{key:"current_geo",value:function current_geo(){return this._current_geo}},{key:"set_current_geo",value:function set_current_geo(e){this._current_geo=new Yr(this,e.coords.latitude,e.coords.longitude)}},{key:"_in_form",value:function _in_form(){return null!==this.mode&&this.mode.startsWith("form/")}},{key:"msg_bool",value:function msg_bool(e){switch(e){case!0:return this.msg_bool_true();case!1:return this.msg_bool_false();default:return null}}},{key:"msg_bool_true",value:function msg_bool_true(e){switch(this.lang){case"de":return"Ja";default:return"Yes"}}},{key:"msg_bool_false",value:function msg_bool_false(e){switch(this.lang){case"de":return"Nein";default:return"No"}}},{key:"msg_no_fields",value:function msg_no_fields(){switch(this.lang){case"de":return"(Keine Felder gefunden)";default:return"(No fields found)"}}},{key:"msg_nothing_selected",value:function msg_nothing_selected(){switch(this.lang){case"de":return"(Nichts ausgewählt)";default:return"(Nothing selected)"}}},{key:"_make_log_message",value:function _make_log_message(t){return t.map((function(t){return"string"!=typeof t?e._repr(t):t})).join(" ")}},{key:"begin_logging",value:function begin_logging(e){this._log_stack.push({header:e,output:!1})}},{key:"end_logging",value:function end_logging(){this._log_stack&&(this._log_stack[this._log_stack.length-1].output&&console&&console.groupEnd&&console.groupEnd(),this._log_stack.pop())}},{key:"group_logging",value:function group_logging(e,t){this.begin_logging(e);try{t()}finally{this.end_logging()}}},{key:"_start_log_message",value:function _start_log_message(){var e,t=_createForOfIteratorHelper(this._log_stack);try{for(t.s();!(e=t.n()).done;){var r=e.value;r.output||(console&&console.group&&console.group(r.header),r.output=!0)}}catch(e){t.e(e)}finally{t.f()}}},{key:"log_debug",value:function log_debug(e){this._start_log_message(),console&&console.debug&&console.debug(this._make_log_message(e))}},{key:"log_info",value:function log_info(e){this._start_log_message(),console&&console.info&&console.info(this._make_log_message(e))}},{key:"log_warning",value:function log_warning(e){this._start_log_message(),console&&console.warn&&console.warn(this._make_log_message(e))}},{key:"log_error",value:function log_error(e){this._start_log_message(),console&&console.error&&console.error(this._make_log_message(e))}},{key:"my_apps_url",value:function my_apps_url(){return"https://"+this.hostname+"/apps.htm"}},{key:"my_tasks_url",value:function my_tasks_url(){return"https://"+this.hostname+"/xist4c/web/aufgaben_id_393_.htm"}},{key:"catalog_url",value:function catalog_url(){return"https://"+this.hostname+"/katalog/home.htm"}},{key:"chats_url",value:function chats_url(){return"https://"+this.hostname+"/chats.htm"}},{key:"profile_url",value:function profile_url(){return"https://"+this.hostname+"/profil/index.htm"}},{key:"account_url",value:function account_url(){return"https://"+this.hostname+"/account.htm"}},{key:"logout_url",value:function logout_url(){return"https://"+this.hostname+"/login.htm?logout=standardCug"}}]),Globals}();l.prototype._ul4onattrs=["version","platform","user","maxdbactions","maxtemplateruntime","lang","datasources","hostname","free","app","record","mode","view_template_id","email_template_id","view_id"],l.prototype._ul4attrs=new Set(["id","version","hostname","platform","free","mode","form","app","record","datasources","externaldatasources","groups","user","lang","templates","pparams","geo","dist","maxdbactions","maxtemplateruntime","flashmessages","scaled_url","qrcode_url","current_geo","log_debug","log_info","log_warning","log_error","my_apps_url","my_tasks_url","catalog_url","chats_url","profile_url","account_url","logout_url"]),e.expose(l.prototype.log_debug,["message","*"]),e.expose(l.prototype.log_info,["message","*"]),e.expose(l.prototype.log_warning,["message","*"]),e.expose(l.prototype.log_error,["message","*"]),e.expose(l.prototype.dist,["geo1","pk","geo2","pk"]),e.expose(l.prototype.current_geo,[]),e.expose(l.prototype.scaled_url,["image","p","width","p","height","p","type","k=","fill","enlarge","k=",!0,"gravity","k=","sm","quality","k=",null,"rotate","k=",null,"blur","k=",null,"sharpen","k=",null,"format","k=",null,"cache","k=",!0]);var a=new(function(t){_inherits(FlashMessageType,e.Type);var r=_createSuper(FlashMessageType);function FlashMessageType(){return _classCallCheck(this,FlashMessageType),r.apply(this,arguments)}return _createClass(FlashMessageType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof i}}]),FlashMessageType}())("la","FlashMessage","A flash message in a web page"),i=function(t){_inherits(FlashMessage,r);var o=_createSuper(FlashMessage);function FlashMessage(){return _classCallCheck(this,FlashMessage),o.apply(this,arguments)}return _createClass(FlashMessage,[{key:e.symbols.type,value:function value(){return a}},{key:e.symbols.repr,value:function value(){return"<FlashMessage type="+e._repr(this.type)+" title="+e._repr(this.title)+">"}}]),FlashMessage}();i.prototype._ul4onattrs=["timestamp","type","title","message"],i.prototype._ul4attrs=new Set(["timestamp","type","title","message"]);var u=new(function(t){_inherits(PermissionType,e.Type);var r=_createSuper(PermissionType);function PermissionType(){return _classCallCheck(this,PermissionType),r.apply(this,arguments)}return _createClass(PermissionType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof s}}]),PermissionType}())("la","Permission","Permission information"),s=function(t){_inherits(Permission,r);var o=_createSuper(Permission);function Permission(){return _classCallCheck(this,Permission),o.apply(this,arguments)}return _createClass(Permission,[{key:e.symbols.type,value:function value(){return u}},{key:e.symbols.repr,value:function value(){return"<Permission id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}},{key:"edit",get:function get(){return"1"==this.permissions.charAt(0)}},{key:"config",get:function get(){return"1"==this.permissions.charAt(1)}},{key:"delete",get:function get(){return"1"==this.permissions.charAt(2)}},{key:"task_manage",get:function get(){return"1"==this.permissions.charAt(3)}},{key:"data_edit",get:function get(){return"1"==this.permissions.charAt(4)}},{key:"data_view",get:function get(){return"1"==this.permissions.charAt(5)}},{key:"task_view",get:function get(){return"1"==this.permissions.charAt(6)}},{key:"frontend",get:function get(){return"1"==this.permissions.charAt(7)}},{key:"data_connect_external",get:function get(){return"1"==this.permissions.charAt(8)}},{key:"perform_evaluation",get:function get(){return"1"==this.permissions.charAt(9)}},{key:"to_catalog",get:function get(){return"1"==this.permissions.charAt(10)}},{key:"data_import_export",get:function get(){return"1"==this.permissions.charAt(11)}},{key:"mydata_view",get:function get(){return"1"==this.permissions.charAt(12)}},{key:"mydata_edit",get:function get(){return"1"==this.permissions.charAt(13)}},{key:"user_admin",get:function get(){return"1"==this.permissions.charAt(14)}}]),Permission}();s.prototype._ul4onattrs=["permissions"],s.prototype._ul4attrs=new Set(["permissions","edit","config","delete","task_manage","data_edit","data_view","task_view","frontend","data_connect_external","perform_evaluation","to_catalog","data_import_export","mydata_view","mydata_edit","user_admin"]);var p=function(e){_inherits(WithAttachments,r);var t=_createSuper(WithAttachments);function WithAttachments(){return _classCallCheck(this,WithAttachments),t.apply(this,arguments)}return _createClass(WithAttachments,[{key:"_add_attachment",value:function _add_attachment(e,t,r,o,n){null===this.attachments&&(this.attachments=new Map);var l=new e(null,this,t,r,o,n);return this.attachments["attachment_".concat(this.globals._next_attachment_id+=1)]=l,l}},{key:"add_note_attachment",value:function add_note_attachment(e,t,r,o){return this._add_attachment(Qr,e,t,r,o)}},{key:"add_url_attachment",value:function add_url_attachment(e,t,r,o){return this._add_attachment(eo,e,t,r,o)}},{key:"add_json_attachment",value:function add_json_attachment(e,t,r,o){return this._add_attachment(no,e,t,r,o)}},{key:"add_file_attachment",value:function add_file_attachment(e,t,r,o){return this._add_attachment(fileAttachment,e,t,r,o)}}]),WithAttachments}(),c=function(t){_inherits(AppType,e.Type);var r=_createSuper(AppType);function AppType(){return _classCallCheck(this,AppType),r.apply(this,arguments)}return _createClass(AppType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof h}}]),AppType}(),_=new c("la","App","A LivingApps application"),h=function(t){_inherits(App,p);var r=_createSuper(App);function App(){return _classCallCheck(this,App),r.apply(this,arguments)}return _createClass(App,[{key:e.symbols.type,value:function value(){return _}},{key:e.symbols.repr,value:function value(){return"<App id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}},{key:"group",get:function get(){return this.appgroup}},{key:"insert",value:function insert(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this[e.symbols.call](t);return this.globals.handler.save(this),r}},{key:"template_url",value:function template_url(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0,o="https://"+this.globals.hostname+"/gateway/apps/"+this.id;return null!==t&&(o+="/"+t.id),url_with_params(o,["template",e],r)}},{key:"new_embedded_url",value:function new_embedded_url(e){return url_with_params("https://"+this.globals.hostname+"/dateneingabe/"+this.id+"/new",e)}},{key:"new_standalone_url",value:function new_standalone_url(e){return url_with_params("https://"+this.globals.hostname+"/gateway/apps/"+this.id+"/new",e)}},{key:"home_url",value:function home_url(){return"https://"+this.globals.hostname+"/apps/"+this.id+".htm"}},{key:"datamanagement_url",value:function datamanagement_url(){return"https://"+this.globals.hostname+"/_id_36_.htm?uuid="+this.id+"&dId="+this.id+"&resetInfo=true&templateIdentifier=created_"+this.id}},{key:"import_url",value:function import_url(){return"https://"+this.globals.hostname+"/import-export/"+this.id+".htm"}},{key:"tasks_url",value:function tasks_url(){return"https://"+this.globals.hostname+"/_id_1073_.htm?uuid="+this.id+"&dId="+this.id+"&p_tpl_uuid="+this.id+"&resetInfo=true&templateIdentifier=created_task_"+this.id}},{key:"datamanagement_config_url",value:function datamanagement_config_url(){return"https://"+this.globals.hostname+"/datenmanagement-konfigurieren/"+this.id+".htm"}},{key:"permissions_url",value:function permissions_url(){return"https://"+this.globals.hostname+"/_id_833_.htm?uuid="+this.id+"&dId="+this.id+"&resetInfo=true"}},{key:"datamanageview_url",value:function datamanageview_url(e){return"https://"+this.globals.hostname+"/_id_36_.htm?uuid="+this.id+"&dId="+this.id+"&resetInfo=true&templateIdentifier=created_"+this.id+"_datamanage_master_"+e}},{key:"layout_controls",get:function get(){return null===this.active_view?new Map:this.active_view.layout_controls}},{key:e.symbols.call,value:function value(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=new L(null,this);if(e._ismap(t)){var o,n=_createForOfIteratorHelper(t.keys());try{for(n.s();!(o=n.n()).done;){var l=o.value;if(!r.fields.has(l))throw new e.ArgumentError(e._repr(this)+"() get an unexpected keyword argument "+e._repr(l))}}catch(e){n.e(e)}finally{n.f()}r._make_fields(!0,t,null,null)}else{if(!e._isobject(t))throw new e.TypeError("values must be an object or a Map");for(var a in t)if(!r.fields.has(a))throw new e.ArgumentError(e._repr(this)+"() get an unexpected keyword argument "+e._repr(a));r._make_fields(!0,new Map(e._list(e.dicttype.items(t))),null,null)}return r}},{key:e.symbols.getattr,value:function value(t){if(t.startsWith("c_")){if(!this.controls.has(t.substr(2)))throw new e.AttributeError(this,t);return this.controls.get(t.substr(2))}if(t.startsWith("lc_")){if(null===this.layout_controls||!this.layout_controls.has(t.substr(3)))throw new e.AttributeError(this,t);return this.layout_controls.get(t.substr(3))}if(t.startsWith("p_")){var r=t.substr(2);if(null!==this.params&&this.params.has(r))return this.params.get(r);if(null!==this.appgroup&&null!==this.appgroup.params&&this.appgroup.params.has(r))return this.appgroup.params.get(r);throw new e.AttributeError(this,t)}if(t.startsWith("pv_")){var o=t.substr(3);if(null!==this.params&&this.params.has(o))return this.params.get(o).value;if(null!==this.appgroup&&null!==this.appgroup.params&&this.appgroup.params.has(o))return this.appgroup.params.get(o).value;throw new e.AttributeError(this,t)}return _get(_getPrototypeOf(App.prototype),e.symbols.getattr,this).call(this,t)}},{key:"active_view",get:function get(){return this._active_view}},{key:"active_view",set:function set(t){if(null===t);else if("string"==typeof t){if(null===this.views||!this.views.has(t))throw new e.ValueError("View "+e._repr(t)+" not found!");t=this.views.get(t)}else{if(!(t instanceof v))throw new e.TypeError(e._repr(t)+" is not a view!");if(t.app!==this)throw new e.ValueError("View "+e._repr(t)+" belongs to the wrong app!")}this._active_view=t}},{key:"layout_controls",get:function get(){return null===this.active_views?new Map:this.active_view.layout_controls}},{key:"permissions",get:function get(){if("string"==typeof this._permissions){var e=this._permissions;this._permissions=new s,this._permissions.permissions=e}return this._permissions}}]),App}();h.prototype._ul4onattrs=["globals","internal_id","name","description","lang","appgroup","typename_grammatical_gender","typename_nominative_singular","typename_genitive_singular","typename_dative_singular","typename_accusative_singular","typename_nominative_plural","typename_genitive_plural","typename_dative_plural","typename_accusative_plural","startlink","image","createdby","controls","records","record_start","record_count","record_total","installation","categories","params","views","datamanagement_identifier","basetable","primarykey","insertprocedure","updateprocedure","deleteprocedure","templates","createdat","updatedat","updatedby","superid","favorite","_active_view","datasource","main","ai_generated","viewtemplates","filter_default","sort_default","filter_owndata","_permissions","data_actions","attachments"],h.prototype._ul4attrs=new Set(["id","globals","name","description","lang","appgroup","group","main","ai_generated","typename_grammatical_gender","typename_nominative_singular","typename_genitive_singular","typename_dative_singular","typename_accusative_singular","typename_nominative_plural","typename_genitive_plural","typename_dative_plural","typename_accusative_plural","startlink","image","createdat","createdby","updatedat","updatedby","controls","layout_controls","records","record_start","record_count","record_total","installation","categories","params","views","menus","panels","datasource","datamanagement_identifier","insert","favorite","_active_view","filter_default","sort_default","filter_owndata","permissions","data_actions","attachments","template_url","new_embedded_url","new_standalone_url","home_url","datamanagement_url","import_url","tasks_url","datamanagement_config_url","permissions_url","datamanageview_url"]),e.expose(h.prototype[e.symbols.call],["values","**"],{needsobject:!0}),e.expose(h.prototype.insert,["values","**"],{needsobject:!0}),e.expose(h.prototype.template_url,["identifier","p","record","p=",null,"params","**"]),e.expose(h.prototype.new_embedded_url,["params","**"]),e.expose(h.prototype.new_standalone_url,["params","**"]);var y=new c("la","AppGroup","A group of LivingApps"),d=function(t){_inherits(AppGroup,p);var r=_createSuper(AppGroup);function AppGroup(){return _classCallCheck(this,AppGroup),r.apply(this,arguments)}return _createClass(AppGroup,[{key:e.symbols.type,value:function value(){return y}},{key:e.symbols.repr,value:function value(){return"<AppGroup id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),AppGroup}();d.prototype._ul4onattrs=["globals","name","description","image","apps","main_app","params","attachments"],d.prototype._ul4attrs=new Set(["globals","id","name","description","image","apps","main_app","params","attachments"]);var f=new(function(t){_inherits(ViewType,e.Type);var r=_createSuper(ViewType);function ViewType(){return _classCallCheck(this,ViewType),r.apply(this,arguments)}return _createClass(ViewType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof v}}]),ViewType}())("la","View","An input form for a LivingViews application"),v=function(t){_inherits(View,r);var o=_createSuper(View);function View(){return _classCallCheck(this,View),o.apply(this,arguments)}return _createClass(View,[{key:"globals",get:function get(){return this.app.globals}},{key:e.symbols.type,value:function value(){return f}},{key:e.symbols.repr,value:function value(){return"<View id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),View}();v.prototype._ul4onattrs=["name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang","login_required","result_page","use_geo"],v.prototype._ul4attrs=new Set(["id","name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang","login_required","result_page","use_geo"]);var k=new(function(t){_inherits(DataSourceType,e.Type);var r=_createSuper(DataSourceType);function DataSourceType(){return _classCallCheck(this,DataSourceType),r.apply(this,arguments)}return _createClass(DataSourceType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof m}}]),DataSourceType}())("la","DataSource","The data resulting from a data source configuration"),m=function(t){_inherits(DataSource,r);var o=_createSuper(DataSource);function DataSource(){return _classCallCheck(this,DataSource),o.apply(this,arguments)}return _createClass(DataSource,[{key:e.symbols.type,value:function value(){return k}},{key:e.symbols.repr,value:function value(){return"<DataSource id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataSource}();m.prototype._ul4onattrs=["identifier","app","apps","filter","sort"],m.prototype._ul4attrs=new Set(["id","identifier","app","apps","filter","sort"]),new(function(t){_inherits(DataSourceChildrenType,e.Type);var r=_createSuper(DataSourceChildrenType);function DataSourceChildrenType(){return _classCallCheck(this,DataSourceChildrenType),r.apply(this,arguments)}return _createClass(DataSourceChildrenType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof C}}]),DataSourceChildrenType}())("la","DataSourceChildren","A master/detail specification in a data source");var C=function(t){_inherits(DataSourceChildren,r);var o=_createSuper(DataSourceChildren);function DataSourceChildren(){return _classCallCheck(this,DataSourceChildren),o.apply(this,arguments)}return _createClass(DataSourceChildren,[{key:e.symbols.type,value:function value(){return datasourcetypechildren}},{key:e.symbols.repr,value:function value(){return"<DataSourceChildren id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataSourceChildren}();C.prototype._ul4onattrs=["datasource","identifier","control","filter","sort"],C.prototype._ul4attrs=new Set(["id","identifier","datasource","control","filter","sort"]);var g=new(function(t){_inherits(RecordChildrenType,e.Type);var r=_createSuper(RecordChildrenType);function RecordChildrenType(){return _classCallCheck(this,RecordChildrenType),r.apply(this,arguments)}return _createClass(RecordChildrenType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof b}}]),RecordChildrenType}())("la","RecordChildren","The child records of a master record"),b=function(t){_inherits(RecordChildren,r);var o=_createSuper(RecordChildren);function RecordChildren(){return _classCallCheck(this,RecordChildren),o.apply(this,arguments)}return _createClass(RecordChildren,[{key:e.symbols.type,value:function value(){return g}},{key:e.symbols.repr,value:function value(){return"<RecordChildren id="+e._repr(this.id)+">"}}]),RecordChildren}();b.prototype._ul4onattrs=["record","datasourcechildren","records","record_start","record_count","record_total"],b.prototype._ul4attrs=new Set(["id","record","datasourcechildren","records","record_start","record_count","record_total"]);var T=new(function(t){_inherits(RecordType,e.Type);var r=_createSuper(RecordType);function RecordType(){return _classCallCheck(this,RecordType),r.apply(this,arguments)}return _createClass(RecordType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof L}}]),RecordType}())("la","Record","A record of a LivingApp application"),L=function(t){_inherits(Record,p);var r=_createSuper(Record);function Record(e,t){var o;return _classCallCheck(this,Record),(o=r.call(this,e)).app=t,o.createdat=null,o.createdby=null,o.updatedat=null,o.updatedby=null,o.updatecount=0,o._sparsevalues=new Map,o._values=null,o._fields=null,o.details=new Map,o._children=null,o.attachments=null,o.errors=[],o._sparsefielderrors=null,o._sparsefieldlookupdata=null,o._is_deleted=!1,o._is_new=!0,o}return _createClass(Record,[{key:e.symbols.type,value:function value(){return T}},{key:"globals",get:function get(){return this.app.globals}},{key:"as_text",value:function as_text(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(0==e)return"...";var r,o=[],n=_createForOfIteratorHelper(t||this.app.controls);try{for(n.s();!(r=n.n()).done;){var l=_slicedToArray(r.value,2),a=l[0],i=l[1];if(null!==t||i.priority){var u=this.fields.get(a).value_as_text(e-1);null!==u&&o.push([i.label,u])}}}catch(e){n.e(e)}finally{n.f()}if(0===o.length)return this.globals.msg_no_fields();if(1===o.length)return o[0][1];for(var s=[],p=0,c=o;p<c.length;p++){var _=_slicedToArray(c[p],2),h=_[0],y=_[1];s.push(h+": "+y)}return s.join(", ")}},{key:"_make_fields",value:function _make_fields(e,t,r,o){var n,l=new Map,a=_createForOfIteratorHelper(this.app.controls.values());try{for(a.s();!(n=a.n()).done;){var i=n.value,u=i.identifier,s=null;null!==t&&(e&&!t.has(u)?s=i.default:t.has(u)&&(s=t.get(u)));var p=new i.fieldtype(i,this,s);l.set(u,p),null!==r&&r.has(u)&&(p.errors=r.get(u)),null!==o&&o.has(u)&&(p.lookupdata=o.get(u))}}catch(e){a.e(e)}finally{a.f()}this._fields=l,this._sparsevalues=null,this._sparsefielderrors=null,this._sparselookupdata=null}},{key:"_in_form",value:function _in_form(){var e=this.app.globals;return e._in_form()&&this===e.record}},{key:e.symbols.repr,value:function value(){var t,r=["<Record id=",e._repr(this.id)],o=_createForOfIteratorHelper(this.fields.values());try{for(o.s();!(t=o.n()).done;){var n=t.value;n.control.priority&&!n.is_empty()&&(r.push(" v_"),r.push(n.control.identifier),r.push("="),r.push(e._repr(n.value)))}}catch(e){o.e(e)}finally{o.f()}return r.push(" state="),r.push(e._repr(this.state)),r.push(">"),r.join("")}},{key:"state",get:function get(){return this._is_deleted?"deleted":this._is_new?"new":this.is_dirty()?"dirty":"saved"}},{key:"values",get:function get(){if(null===this._values){this._values=new Map;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){var r=e.value;this._values.set(r.control.identifier,r.value)}}catch(e){t.e(e)}finally{t.f()}}return this._values}},{key:"fields",get:function get(){return null===this._fields&&this._make_fields(!1,this._sparsevalues,this._sparsefielderrors,this._sparsefieldlookupdata),this._fields}},{key:"children",get:function get(){if(null===this._children){this._children=new Map;var e,t=_createForOfIteratorHelper(this.details.values());try{for(t.s();!(e=t.n()).done;){var r=e.value;this._children.set(r.datasourcechildren.identifier,r.records)}}catch(e){t.e(e)}finally{t.f()}}return this._children}},{key:"is_dirty",value:function is_dirty(){if(null===this.id)return!0;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){if(e.value.is_dirty())return!0}}catch(e){t.e(e)}finally{t.f()}return!1}},{key:"has_errors",value:function has_errors(){if(0!==this.errors.length)return!0;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){if(e.value.has_errors())return!0}}catch(e){t.e(e)}finally{t.f()}return!1}},{key:"delete",value:function _delete(){var e=this.app.globals.handler.delete(this);return this._is_deleted=!0,e}},{key:"save",value:function save(){this.app.globals.handler.save(this)}},{key:"update",value:function update(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e._ismap(t)){var r,o=_createForOfIteratorHelper(t.entries());try{for(o.s();!(r=o.n()).done;){var n=_slicedToArray(r.value,2),l=n[0],a=n[1];if(!this.fields.has(l))throw new e.ArgumentError("update() get an unexpected keyword argument "+e._repr(l));fields.get(l).value=a}}catch(e){o.e(e)}finally{o.f()}}else{if(!e._isobject(t))throw new e.TypeError("values must be an object or a Map");for(var i in t){if(!this.fields.has(i))throw new e.ArgumentError("update() get an unexpected keyword argument "+e._repr(i));record.fields.get(i).value=t[i]}}this.app.globals.handler.save(this)}},{key:"template_url",value:function template_url(e,t){return url_with_params("https://"+this.app.globals.hostname+"/gateway/apps/"+this.app.id+"/"+this.id,["template",e],t)}},{key:"edit_embedded_url",value:function edit_embedded_url(e){return url_with_params("https://"+this.app.globals.hostname+"/dateneingabe/"+this.app.id+"/"+this.id+"/edit",e)}},{key:"edit_standalone_url",value:function edit_standalone_url(e){return url_with_params("https://"+this.app.globals.hostname+"/gateway/apps/"+this.app.id+"/"+this.id+"/edit",e)}},{key:"edit_url",value:function edit_url(t){return"standalone"===this.app[e.symbols.getattr]("pv_la_default_form_variant")?this.edit_standalone_url(t):this.edit_embedded_url(t)}},{key:"display_embedded_url",value:function display_embedded_url(e){return url_with_params("https://"+this.app.globals.hostname+"/dateneingabe/"+this.app.id+"/"+this.id+"/display",e)}},{key:"display_standalone_url",value:function display_standalone_url(e){return url_with_params("https://"+this.app.globals.hostname+"/gateway/apps/"+this.app.id+"/"+this.id+"/display",e)}},{key:"display_url",value:function display_url(t){return"standalone"===this.app[e.symbols.getattr]("pv_la_default_form_variant")?this.display_standalone_url(t):this.display_embedded_url(t)}},{key:"search",value:function search(t){for(var r in t){var o=t[r];if(e._bool(o)&&!this.fields.get(r).search(o))return!1}return!0}},{key:"ul4onload",value:function ul4onload(e){_get(_getPrototypeOf(Record.prototype),"ul4onload",this).call(this,e),this._is_new=!1}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return"values"===e?this._sparsevalues:this[e]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){"values"===e?(this._sparsevalues=t,this._values=null,this._fields=null):this[e]=t}},{key:e.symbols.getattr,value:function value(t){return t.startsWith("c_")?this.children.get(t.substr(2)):t.startsWith("d_")?this.details.get(t.substr(2)):t.startsWith("f_")?this.fields.get(t.substr(2)):t.startsWith("v_")?this.fields.get(t.substr(2)).value:_get(_getPrototypeOf(Record.prototype),e.symbols.getattr,this).call(this,t)}},{key:e.symbols.setattr,value:function value(t,r){t.startsWith("c_")?this.children[t.substr(2)]=r:t.startsWith("v_")?this.fields.get(t.substr(2)).value=r:_get(_getPrototypeOf(Record.prototype),e.symbols.setattr,this).call(this,t,r)}}]),Record}();L.prototype._ul4onattrs=["app","createdat","createdby","updatedat","updatedby","updatecount","_sparsevalues","attachments","details","errors","_sparsefielderrors","_sparsefieldlookupdata"],L.prototype._ul4attrs=new Set(["id","app","createdat","createdby","updatedat","updatedby","updatecount","values","fields","attachments","details","children","errors","template_url","edit_embedded_url","edit_standalone_url"]),e.expose(L.prototype.is_dirty,[]),e.expose(L.prototype.has_errors,[]),e.expose(L.prototype.delete,[]),e.expose(L.prototype.save,[]),e.expose(L.prototype.update,["values","**"],{needsobject:!0}),e.expose(L.prototype.template_url,["identifier","p","params","**"]),e.expose(L.prototype.edit_embedded_url,["params","**"]),e.expose(L.prototype.edit_standalone_url,["params","**"]);var A=function(t){_inherits(FieldType,e.Type);var r=_createSuper(FieldType);function FieldType(){return _classCallCheck(this,FieldType),r.apply(this,arguments)}return _createClass(FieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof S}}]),FieldType}(),w=new A("la","Field","Holds the value of a field of a record (and related information)"),S=function(t){_inherits(Field,r);var o=_createSuper(Field);function Field(e,t,r){var n;return _classCallCheck(this,Field),(n=o.call(this,null)).control=e,n.record=t,n._label=null,n._description=null,n._lookupdata=null,n.errors=[],n._value=null,n._in_form()||(n.value=r),n._dirty=!1,n._enabled=!0,n._writable=!0,n._visible=!0,n._required=null,n._in_text=null,n._top=null,n._left=null,n}return _createClass(Field,[{key:e.symbols.type,value:function value(){return w}},{key:"value",get:function get(){return this._in_form()?this._get_dom_value():this._value}},{key:"value",set:function set(t){var r=this._value,o={value:t,errors:[]};this._validate(o),e._ne(r,o.value)&&(null!==this.record._values&&this.record._values.set(this.control.identifier,o.value),this._value=o.value,this._dirty=!0),this.errors=o.errors,this._in_form()&&this._set_dom_value(this._value)}},{key:"value_as_text",value:function value_as_text(){return null}},{key:"_validate",value:function _validate(e){}},{key:"_set_dom_label",value:function _set_dom_label(){this._in_form()&&(this._dom_label.textContent=this.label)}},{key:"mode",get:function get(){var e;return null!==(e=this._mode)&&void 0!==e?e:this.control.mode}},{key:"mode",set:function set(e){this._mode=e}},{key:"label",get:function get(){var e;return null!==(e=this._label)&&void 0!==e?e:this.control.label}},{key:"label",set:function set(e){this._label=e,this._set_dom_label()}},{key:"description",get:function get(){var e;return null!==(e=this._description)&&void 0!==e?e:this.control.description}},{key:"description",set:function set(e){this._description=e}},{key:"globals",get:function get(){return this.control.globals}},{key:"is_empty",value:function is_empty(){return null===this._value}},{key:"is_dirty",value:function is_dirty(){return this._dirty}},{key:"has_errors",value:function has_errors(){return 0!==this.errors.length}},{key:"add_error",value:function add_error(e){this.errors.push(e)}},{key:"set_error",value:function set_error(e){this.errors=null!==e?[e]:[]}},{key:"top",get:function get(){var e;return null!==(e=this._top)&&void 0!==e?e:this.control.top}},{key:"top",set:function set(e){this._top=e,this._in_form()&&(this._dom_root.style.top=this.top+"px")}},{key:"left",get:function get(){var e;return null!==(e=this._left)&&void 0!==e?e:this.control.left}},{key:"left",set:function set(e){this._left=e,this._in_form()&&(this._dom_root.style.left=this.left+"px")}},{key:"width",get:function get(){return this.control.width}},{key:"height",get:function get(){return this.control.width}},{key:"search",value:function search(e){return this.control.search(this.value,e)}},{key:"msg_field_required",value:function msg_field_required(e){switch(this.globals.lang){case"de":return'"'.concat(this.label,'" wird benötigt!');default:return'"'.concat(this.label,'" is required!')}}},{key:"msg_field_wrong_type",value:function msg_field_wrong_type(t){return'"'.concat(this.label,"\" doesn't support the type ").concat(e._type(t).name,"!")}},{key:"msg_bool_truerequired",value:function msg_bool_truerequired(e){return'"'.concat(this.label,'" only accepts "Yes"!')}},{key:"msg_string_tooshort",value:function msg_string_tooshort(e){return'"'.concat(this.label,'" is too short. You must use at least ').concat(this.control.minlength," characters!")}},{key:"msg_string_toolong",value:function msg_string_toolong(e){return'"'.concat(this.label,'" is too long. You may use at most ').concat(this.control.maxlength," characters!")}},{key:"msg_email_format",value:function msg_email_format(e){return'"'.concat(this.label,'" must be a valid email address!')}},{key:"msg_url_format",value:function msg_url_format(e){return'"'.concat(this.label,'" must be a valid URL!')}},{key:"msg_tel_format",value:function msg_tel_format(e){return'"'.concat(this.label,'" must be a valid phone number!')}},{key:"msg_date_format",value:function msg_date_format(e){return'"'.concat(this.label,"\" doesn't support this date format!")}},{key:"msg_number_format",value:function msg_number_format(e){return'"'.concat(this.label,"\" doesn't support this number format!")}},{key:"msg_lookup_wrongitem",value:function msg_lookup_wrongitem(t){return"The option ".concat(e._repr(t),' for "').concat(this.label,"\" doesn't belong to this lookup!")}},{key:"msg_lookup_unknownkey",value:function msg_lookup_unknownkey(t){return"The option ".concat(e._repr(t),' for "').concat(this.label,'" is unknown!')}},{key:"msg_applookup_wrongrecord",value:function msg_applookup_wrongrecord(t){return"The record ".concat(e._repr(t),' for "').concat(this.label,"\" doesn't belong to the correct app!")}},{key:"msg_applookup_unknownkey",value:function msg_applookup_unknownkey(t){return"The record ".concat(e._repr(t),' for "').concat(this.label,"\" can't be found!")}},{key:"_in_form",value:function _in_form(){return this.record._in_form()}},{key:"_sel_root",get:function get(){return"#livingapps-form ."+this.control._cssclass_root+".llft-id-"+this.control.identifier}},{key:"_sel_label",get:function get(){return this._sel_root+" label span"}},{key:"_sel_control",get:function get(){return this._sel_root+" "+this.control._cssclass_control}},{key:"_dom_root",get:function get(){return document.querySelector(this._sel_root)}},{key:"_dom_label",get:function get(){return document.querySelector(this._sel_label)}},{key:"_dom_control",get:function get(){return document.querySelector(this._sel_control)}},{key:"_dom_controls",get:function get(){return document.querySelectorAll(this._sel_control)}},{key:"_get_dom_value",value:function _get_dom_value(){return this._dom_control.value}},{key:"_set_dom_value",value:function _set_dom_value(e){this._dom_control.value=null!==e?e:""}},{key:"visible",get:function get(){return this._visible}},{key:"visible",set:function set(e){this._in_form()&&(this._dom_root.hidden=!e),this._visible=e}},{key:"required",get:function get(){var e;return null!==(e=this._required)&&void 0!==e?e:this.control.required}},{key:"required",set:function set(e){this._required=e}},{key:"in_list",get:function get(){return this.control.in_list}},{key:"in_mobile_list",get:function get(){return this.control.in_mobile_list}},{key:"in_text",get:function get(){var e;return null!==(e=this._in_text)&&void 0!==e?e:this.control.in_text}},{key:"in_text",set:function set(e){this._in_text=e}},{key:"enabled",get:function get(){return this._in_form()?!this._dom_root.classList.contains("llft-control-readonly"):this._enabled}},{key:"enabled",set:function set(e){if(this._in_form()){var t,r=!e,o=_createForOfIteratorHelper(this._dom_controls);try{for(o.s();!(t=o.n()).done;){t.value.disabled=r}}catch(e){o.e(e)}finally{o.f()}this._dom_root.classList.toggle("llft-control-readonly",r)}this._enabled=e}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){this._writable=e}},{key:e.symbols.repr,value:function value(){var t="<"+this.constructor.name+" identifier=";return t+=e._repr(this.control.identifier),this._dirty&&(t+=" is_dirty()=True"),this.errors.length>0&&(t+=" has_errors()=True"),t+=">"}},{key:e.symbols.setattr,value:function value(t,r){if("value"===t)this.value=r;else if("visible"===t)this.visible=e._bool(r);else if("enabled"===t)this.enabled=e._bool(r);else if("writable"===t)this.writable=e._bool(r);else if("required"===t)this.required=e._bool(r);else if("top"===t){if(null!==r&&"number"!=typeof r)throw new e.ArgumentError("top must be None or an int");this.top=r}else if("left"===t){if(null!==r&&"number"!=typeof r)throw new e.ArgumentError("left must be None or an int");this.left=r}else _get(_getPrototypeOf(Field.prototype),e.symbols.setattr,this).call(this,t,r)}}]),Field}();S.prototype._ul4onattrs=["control","record","label","value","errors","_visible","_enabled","_writable","_required"],S.prototype._ul4attrs=new Set(["control","record","label","description","value","mode","errors","visible","enabled","writable","required","in_text","top","left","width","height"]),S.prototype._inputevent="input";var M=new(function(e){_inherits(BoolFieldType,A);var t=_createSuper(BoolFieldType);function BoolFieldType(){return _classCallCheck(this,BoolFieldType),t.apply(this,arguments)}return _createClass(BoolFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof x}}]),BoolFieldType}())("la","BoolField","Holds the value of a bool field of a record (and related information)"),x=function(t){_inherits(BoolField,S);var r=_createSuper(BoolField);function BoolField(){return _classCallCheck(this,BoolField),r.apply(this,arguments)}return _createClass(BoolField,[{key:e.symbols.type,value:function value(){return M}},{key:"_validate",value:function _validate(e){null===e.value?this.control.required&&e.errors.push(this.msg_field_required(e.value)):"string"==typeof e.value?0===e.value.length?(this.control.required&&e.errors.push(this.msg_bool_truerequired(e.value)),e.value=null):["false","no","0","off"].includes(e.value.toLowerCase())?e.value=!1:e.value=!0:"boolean"==typeof e.value?this.control.required&&!e.value&&e.errors.push(this.msg_bool_truerequired(e.value)):(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}},{key:"_get_dom_value",value:function _get_dom_value(){return this._dom_control.checked}},{key:"_set_dom_value",value:function _set_dom_value(e){this._dom_control.checked=e}},{key:"value_as_text",value:function value_as_text(){return this.globals.msg_bool(this.value)}}]),BoolField}(),I=new(function(e){_inherits(IntFieldType,A);var t=_createSuper(IntFieldType);function IntFieldType(){return _classCallCheck(this,IntFieldType),t.apply(this,arguments)}return _createClass(IntFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof H}}]),IntFieldType}())("la","IntField","Holds the value of an int field of a record (and related information)"),H=function(t){_inherits(IntField,S);var r=_createSuper(IntField);function IntField(){return _classCallCheck(this,IntField),r.apply(this,arguments)}return _createClass(IntField,[{key:e.symbols.type,value:function value(){return I}},{key:"_parse",value:function _parse(e){return/^\s*[-+]?\d+\s*$/.test(e)?parseInt(e):null}},{key:"_validate",value:function _validate(e){if(null===e.value)this.control.required&&e.errors.push(this.msg_field_required(e.value));else if("string"==typeof e.value){var t=this._parse(e.value);null!==t?e.value=t:e.errors.push(this.msg_number_format(e.value))}else"number"==typeof e.value?Math.round(e.value)!==e.value&&e.errors.push(this.msg_field_wrong_type(e.value)):(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(IntField.prototype),"_get_dom_value",this).call(this);if(e){var t=this._parse(e);null!==t&&(e=t)}return e}},{key:"_set_dom_value",value:function _set_dom_value(e){_get(_getPrototypeOf(IntField.prototype),"_set_dom_value",this).call(this,null!==e?e+"":"")}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null!=e?e+"":null}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){if(this._in_form()){var t,r=!e,o=_createForOfIteratorHelper(this._dom_controls);try{for(o.s();!(t=o.n()).done;){t.value.readOnly=r}}catch(e){o.e(e)}finally{o.f()}}_set(_getPrototypeOf(IntField.prototype),"writable",e,this,!0)}}]),IntField}(),R=new(function(e){_inherits(NumberFieldType,A);var t=_createSuper(NumberFieldType);function NumberFieldType(){return _classCallCheck(this,NumberFieldType),t.apply(this,arguments)}return _createClass(NumberFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof D}}]),NumberFieldType}())("la","NumberField","Holds the value of a number field of a record (and related information)"),D=function(t){_inherits(NumberField,S);var r=_createSuper(NumberField);function NumberField(){return _classCallCheck(this,NumberField),r.apply(this,arguments)}return _createClass(NumberField,[{key:e.symbols.type,value:function value(){return R}},{key:"_parse",value:function _parse(e){if(null===e)return null;for(var t=e,r="",o=0,n=0,l=0;l<e.length;++l){var a=e[l];","==a?(o++,r+=a):"."==a&&(n++,r+=a)}var i=null;if(0==o)n<=1||(i="de");else if(1==o)i=1==n?".,"==r?"de":"en":"de";else{if(!(n<=1))return null;i="en"}"de"===i?t=t.replace(/\./g,"").replace(/,/g,"."):"en"===i&&(t=t.replace(/,/g,""));var u=parseFloat(t);return isNaN(u)?e:u}},{key:"_validate",value:function _validate(t){if(null===t.value||""===t.value)this.control.required&&t.errors.push(this.msg_field_required(t.value)),t.value=null;else if("string"==typeof t.value){var r=this._parse(t.value);null!==r?(r=this._bound_value(r),null!==this.control.precision&&(r=e._round(r,this.control.precision)),t.value=r):t.errors.push(this.msg_number_format(t.value))}else if("number"==typeof t.value){var o=this._bound_value(t.value);null!==this.control.precision&&(o=e._round(o,this.control.precision)),t.value=o}else t.errors.push(this.msg_field_wrong_type(t.value)),t.value=null}},{key:"_bound_value",value:function _bound_value(e){return null!==this.control.minimum&&e<this.control.minimum&&(e=this.control.minimum),null!==this.control.maximum&&e>this.control.maximum&&(e=this.control.maximum),e}},{key:"_get_dom_value",value:function _get_dom_value(){var t=_get(_getPrototypeOf(NumberField.prototype),"_get_dom_value",this).call(this);if(t){if("string"==typeof t){var r=this._parse(t);null!==r&&(t=r)}"number"==typeof t&&(null!==this.control.precision&&(t=e._round(t,this.control.precision)),t=this._bound_value(t))}else t=null;return t}},{key:"_set_dom_value",value:function _set_dom_value(e){"number"==typeof e?(e=this._bound_value(e),null!==this.control.precision&&(e=e.toFixed(this.control.precision))):null===e&&(e=""),e+="","de"==this.globals.lang&&null===this.control.precision&&(e=e.replace(".",",")),_get(_getPrototypeOf(NumberField.prototype),"_set_dom_value",this).call(this,e)}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e?null:null!==this.control.precision?e.toFixed(this.control.precision):e.toString()}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){if(this._in_form()){var t,r=!e,o=_createForOfIteratorHelper(this._dom_controls);try{for(o.s();!(t=o.n()).done;){t.value.readOnly=r}}catch(e){o.e(e)}finally{o.f()}}_set(_getPrototypeOf(NumberField.prototype),"writable",e,this,!0)}}]),NumberField}(),O=function(e){_inherits(StringFieldType,A);var t=_createSuper(StringFieldType);function StringFieldType(){return _classCallCheck(this,StringFieldType),t.apply(this,arguments)}return _createClass(StringFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof B}}]),StringFieldType}(),P=new O("la","StringField","Holds the value of a string field of a record (and related information)"),B=function(t){_inherits(StringField,S);var r=_createSuper(StringField);function StringField(e,t,o){var n;return _classCallCheck(this,StringField),(n=r.call(this,e,t,o))._placeholder=null,n}return _createClass(StringField,[{key:e.symbols.type,value:function value(){return P}},{key:"placeholder",get:function get(){return null!==this._placeholder?this._placeholder:this.control.placeholder}},{key:"placeholder",set:function set(e){var t;this._placeholder=e,this._in_form()&&(this._dom_control.placeholder=null!==(t=this.placeholder)&&void 0!==t?t:"")}},{key:"_validate",value:function _validate(e){if(null===e.value||""===e.value)this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null;else if("string"==typeof e.value){var t=this.control.minlength,r=this.control.maxlength;null!==t&&e.value.length<t&&e.errors.push(this.msg_string_tooshort(e.value)),null!==r&&e.value.length>r&&e.errors.push(this.msg_string_toolong(e.value))}else e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){if(this._in_form()){var t,r=!e,o=_createForOfIteratorHelper(this._dom_controls);try{for(o.s();!(t=o.n()).done;){t.value.readOnly=r}}catch(e){o.e(e)}finally{o.f()}}_set(_getPrototypeOf(StringField.prototype),"writable",e,this,!0)}},{key:"value_as_text",value:function value_as_text(){return this.value}}]),StringField}();B.prototype._ul4onattrs=[].concat(_toConsumableArray(S.prototype._ul4onattrs),["_placeholder"]),B.prototype._ul4attrs=new Set([].concat(_toConsumableArray(S.prototype._ul4attrs),["placeholder"]));var N=new(function(e){_inherits(PasswordFieldType,O);var t=_createSuper(PasswordFieldType);function PasswordFieldType(){return _classCallCheck(this,PasswordFieldType),t.apply(this,arguments)}return _createClass(PasswordFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof U}}]),PasswordFieldType}())("la","PasswordField","Holds the value of a string/password field of a record (and related information)"),U=function(t){_inherits(PasswordField,B);var r=_createSuper(PasswordField);function PasswordField(){return _classCallCheck(this,PasswordField),r.apply(this,arguments)}return _createClass(PasswordField,[{key:e.symbols.type,value:function value(){return N}}]),PasswordField}(),q=new(function(e){_inherits(EmailFieldType,O);var t=_createSuper(EmailFieldType);function EmailFieldType(){return _classCallCheck(this,EmailFieldType),t.apply(this,arguments)}return _createClass(EmailFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof V}}]),EmailFieldType}())("la","EmailField","Holds the value of a string/email field of a record (and related information)"),V=function(t){_inherits(EmailField,B);var r=_createSuper(EmailField);function EmailField(){return _classCallCheck(this,EmailField),r.apply(this,arguments)}return _createClass(EmailField,[{key:e.symbols.type,value:function value(){return q}},{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i.test(e.value)||e.errors.push(this.msg_email_format(e.value))}_get(_getPrototypeOf(EmailField.prototype),"_validate",this).call(this,e)}}]),EmailField}(),G=new(function(e){_inherits(URLFieldType,O);var t=_createSuper(URLFieldType);function URLFieldType(){return _classCallCheck(this,URLFieldType),t.apply(this,arguments)}return _createClass(URLFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof E}}]),URLFieldType}())("la","URLField","Holds the value of a string/url field of a record (and related information)"),E=function(t){_inherits(URLField,B);var r=_createSuper(URLField);function URLField(){return _classCallCheck(this,URLField),r.apply(this,arguments)}return _createClass(URLField,[{key:e.symbols.type,value:function value(){return G}},{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){var t=null;try{t=new URL(e.value)}catch(t){e.errors.push(this.msg_url_format(e.value))}null!==t&&"http:"!==t.protocol&&"https:"!==t.protocol&&e.errors.push(this.msg_url_format(e.value))}_get(_getPrototypeOf(URLField.prototype),"_validate",this).call(this,e)}}]),URLField}(),j=new(function(e){_inherits(TelFieldType,O);var t=_createSuper(TelFieldType);function TelFieldType(){return _classCallCheck(this,TelFieldType),t.apply(this,arguments)}return _createClass(TelFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof W}}]),TelFieldType}())("la","TelField","Holds the value of a string/tel field of a record (and related information)"),W=function(t){_inherits(TelField,B);var r=_createSuper(TelField);function TelField(){return _classCallCheck(this,TelField),r.apply(this,arguments)}return _createClass(TelField,[{key:e.symbols.type,value:function value(){return j}},{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){/^\\+?[0-9 /()-]+$/.test(e.value)||e.errors.push(this.msg_tel_format(e.value))}_get(_getPrototypeOf(TelField.prototype),"_validate",this).call(this,e)}}]),TelField}(),z=new(function(e){_inherits(TextAreaFieldType,O);var t=_createSuper(TextAreaFieldType);function TextAreaFieldType(){return _classCallCheck(this,TextAreaFieldType),t.apply(this,arguments)}return _createClass(TextAreaFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Y}}]),TextAreaFieldType}())("la","TextAreaField","Holds the value of a string/textarea field of a record (and related information)"),Y=function(t){_inherits(TextAreaField,B);var r=_createSuper(TextAreaField);function TextAreaField(){return _classCallCheck(this,TextAreaField),r.apply(this,arguments)}return _createClass(TextAreaField,[{key:e.symbols.type,value:function value(){return z}}]),TextAreaField}(),J=new(function(e){_inherits(HTMLFieldType,O);var t=_createSuper(HTMLFieldType);function HTMLFieldType(){return _classCallCheck(this,HTMLFieldType),t.apply(this,arguments)}return _createClass(HTMLFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof K}}]),HTMLFieldType}())("la","HTMLField","Holds the value of a string/html field of a record (and related information)"),K=function(t){_inherits(HTMLField,B);var r=_createSuper(HTMLField);function HTMLField(){return _classCallCheck(this,HTMLField),r.apply(this,arguments)}return _createClass(HTMLField,[{key:e.symbols.type,value:function value(){return J}}]),HTMLField}(),$=new(function(e){_inherits(GeoFieldType,A);var t=_createSuper(GeoFieldType);function GeoFieldType(){return _classCallCheck(this,GeoFieldType),t.apply(this,arguments)}return _createClass(GeoFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Z}}]),GeoFieldType}())("la","GeoField","Holds the value of a geo field of a record (and related information)"),Z=function(t){_inherits(GeoField,S);var r=_createSuper(GeoField);function GeoField(){return _classCallCheck(this,GeoField),r.apply(this,arguments)}return _createClass(GeoField,[{key:e.symbols.type,value:function value(){return $}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=_createForOfIteratorHelper(this._dom_controls);try{for(t.s();!(e=t.n()).done;){var r=e.value;if(r.id.endsWith("_geoinfo")){var o=r.value;if(o)return o=JSON.parse(o),new Yr(this.globals,o.geometry.coordinates[0],o.geometry.coordinates[1],o.properties.formatted_address)}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(t){if(null===t){var r,o=_createForOfIteratorHelper(this._dom_controls);try{for(o.s();!(r=o.n()).done;){r.value.value=null}}catch(e){o.e(e)}finally{o.f()}}else{var n,l=_createForOfIteratorHelper(this._dom_controls);try{for(l.s();!(n=l.n()).done;){var a=n.value;if(a.id.endsWith("_geoinfo")){var i={type:"Feature",geometry:{coordinates:[t.lat,t.long]},properties:{formatted_address:t.info}};a.value=e._asjson(i)}else a.value=t.info}}catch(e){l.e(e)}finally{l.f()}}}},{key:"value_as_text",value:function value_as_text(){var e=this.value;if(null===this.value)return null;var t=e.lat.toFixed(5)+", "+e.long.toFixed(5);return null!==e.info&&(t+=" ("+e.info+")"),t}},{key:"_validate",value:function _validate(e){null===e.value||""===e.value?(this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null):e.value instanceof Yr||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}}]),GeoField}();Z.prototype._inputevent="llgeo";var Q=function(e){_inherits(FileFieldType,A);var t=_createSuper(FileFieldType);function FileFieldType(){return _classCallCheck(this,FileFieldType),t.apply(this,arguments)}return _createClass(FileFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ee}}]),FileFieldType}(),X=new Q("la","FileField","Holds the value of a file field of a record (and related information)"),ee=function(t){_inherits(FileField,S);var r=_createSuper(FileField);function FileField(){return _classCallCheck(this,FileField),r.apply(this,arguments)}return _createClass(FileField,[{key:e.symbols.type,value:function value(){return X}},{key:"_validate",value:function _validate(e){null===e.value||""===e.value?(this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null):e.value instanceof Wr||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}},{key:"_get_dom_value",value:function _get_dom_value(){return null}},{key:"_set_dom_value",value:function _set_dom_value(){}}]),FileField}(),te=new(function(e){_inherits(FileSignatureFieldType,Q);var t=_createSuper(FileSignatureFieldType);function FileSignatureFieldType(){return _classCallCheck(this,FileSignatureFieldType),t.apply(this,arguments)}return _createClass(FileSignatureFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof re}}]),FileSignatureFieldType}())("la","FileSignatureField","Holds the value of a file/signature field of a record (and related information)"),re=function(t){_inherits(FileSignatureField,ee);var r=_createSuper(FileSignatureField);function FileSignatureField(){return _classCallCheck(this,FileSignatureField),r.apply(this,arguments)}return _createClass(FileSignatureField,[{key:e.symbols.type,value:function value(){return te}},{key:"_validate",value:function _validate(e){_get(_getPrototypeOf(FileSignatureField.prototype),"_validate",this).call(this,e)}}]),FileSignatureField}(),oe=function(e){_inherits(DateFieldBaseType,A);var t=_createSuper(DateFieldBaseType);function DateFieldBaseType(){return _classCallCheck(this,DateFieldBaseType),t.apply(this,arguments)}return _createClass(DateFieldBaseType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof le}}]),DateFieldBaseType}(),ne=new oe("la","DateFieldBase","Holds the value of a date field of a record (and related information)"),le=function(t){_inherits(DateFieldBase,S);var r=_createSuper(DateFieldBase);function DateFieldBase(){return _classCallCheck(this,DateFieldBase),r.apply(this,arguments)}return _createClass(DateFieldBase,[{key:e.symbols.type,value:function value(){return ne}},{key:"value_as_text",value:function value_as_text(){var t=this.value;return null===t?null:"string"==typeof t?t:e._format(t,this.control.formatstring())}},{key:"_parse",value:function _parse(e,t){var r=null,o=null,n=null,l=0,a=0,i=0,u=null;function _int(e,t,r,o){return(e=e.substring(0,t)).length!=t?null:(e=parseInt(e,10),isNaN(e)||e<r||e>o?null:e)}for(;e;){if(!t)return null;if(t.startsWith("%Y")){if(null===(r=_int(e,4)))return null;e=e.substring(4),t=t.substring(2)}else if(t.startsWith("%y")){if(null===(r=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%m")){if(null===(o=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%d")){if(null===(n=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%H")){if(null===(l=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%I")){if(null===(l=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%M")){if(null===(a=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%S")){if(null===(i=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%p")){if(e.toLowerCase().startsWith("pm"))u=!0;else{if(!e.toLowerCase().startsWith("am"))return null;u=!1}e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%%")){if(!e.startsWith("%"))return null;e=e.substring(1),t=t.substring(2)}else if(t.startsWith("%z")){if(!e.startsWith("-")&&!e.startsWith("+"))return null;if(null===_int(e=e.substring(1),2))return null;if(!(e=e.substring(2)).startsWith(":"))return null;if(null===_int(e=e.substring(1),2))return null;e=e.substring(2),t=t.substring(2)}else{if(!e.startsWith(t.substring(0,1)))return null;e=e.substring(1),t=t.substring(1)}}if(t)return null;if(null===r)return null;if(null===o||o<1||o>12)return null;if(null===n||n<1||n>31)return null;if(null===u){if(l<0||l>23)return null}else{if(l<0||l>11)return null;u&&(l+=12)}return a<0||a>59||a<0||a>59||i<0||i>60?null:new Date(r,o-1,n,l,a,i)}},{key:"_validate",value:function _validate(t){if(null===t.value||""===t.value)this.control.required&&t.errors.push(this.msg_field_required(t.value)),t.value=null;else if(t.value instanceof Date)t.value=this._convert(t.value);else if(t.value instanceof e.Date_)t.value=this._convert(t.value._date);else if("string"==typeof t.value){var r,o=null,n=_createForOfIteratorHelper(this.control.formatstrings_parse());try{for(n.s();!(r=n.n()).done;){var l=r.value;if(null!==(o=this._parse(t.value,l)))break}}catch(e){n.e(e)}finally{n.f()}null!==o?t.value=this._convert(o):t.errors.push(this.msg_date_format(t.value))}else t.errors.push(this.msg_field_wrong_type(t.value)),t.value=null}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(DateFieldBase.prototype),"_get_dom_value",this).call(this);if(!e)return null;var t,r=_createForOfIteratorHelper(this.control.formatstrings_parse());try{for(r.s();!(t=r.n()).done;){var o=t.value,n=this._parse(e,o);if(null!==n)return this._convert(n)}}catch(e){r.e(e)}finally{r.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(t){t=null!==t?e._format(t,this.control.formatstring(),this.globals.lang):"",_get(_getPrototypeOf(DateFieldBase.prototype),"_set_dom_value",this).call(this,t)}}]),DateFieldBase}(),ae=new(function(e){_inherits(DateFieldType,oe);var t=_createSuper(DateFieldType);function DateFieldType(){return _classCallCheck(this,DateFieldType),t.apply(this,arguments)}return _createClass(DateFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ie}}]),DateFieldType}())("la","DateField","Holds the value of a date/date field of a record (and related information)"),ie=function(t){_inherits(DateField,le);var r=_createSuper(DateField);function DateField(){return _classCallCheck(this,DateField),r.apply(this,arguments)}return _createClass(DateField,[{key:e.symbols.type,value:function value(){return ae}},{key:"_convert",value:function _convert(t){return new e.Date_(t.getFullYear(),t.getMonth()+1,t.getDate())}}]),DateField}(),ue=new(function(e){_inherits(DatetimeMinuteFieldType,oe);var t=_createSuper(DatetimeMinuteFieldType);function DatetimeMinuteFieldType(){return _classCallCheck(this,DatetimeMinuteFieldType),t.apply(this,arguments)}return _createClass(DatetimeMinuteFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof se}}]),DatetimeMinuteFieldType}())("la","DatetimeMinuteField","Holds the value of a date/datetimeminute field of a record (and related information)"),se=function(t){_inherits(DatetimeMinuteField,le);var r=_createSuper(DatetimeMinuteField);function DatetimeMinuteField(){return _classCallCheck(this,DatetimeMinuteField),r.apply(this,arguments)}return _createClass(DatetimeMinuteField,[{key:e.symbols.type,value:function value(){return ue}},{key:"_convert",value:function _convert(e){return e.setSeconds(0),e.setMilliseconds(0),e}}]),DatetimeMinuteField}(),pe=new(function(e){_inherits(DatetimeSecondFieldType,oe);var t=_createSuper(DatetimeSecondFieldType);function DatetimeSecondFieldType(){return _classCallCheck(this,DatetimeSecondFieldType),t.apply(this,arguments)}return _createClass(DatetimeSecondFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ce}}]),DatetimeSecondFieldType}())("la","DatetimeSecondField","Holds the value of a date/datetimesecond field of a record (and related information)"),ce=function(t){_inherits(DatetimeSecondField,le);var r=_createSuper(DatetimeSecondField);function DatetimeSecondField(){return _classCallCheck(this,DatetimeSecondField),r.apply(this,arguments)}return _createClass(DatetimeSecondField,[{key:e.symbols.type,value:function value(){return pe}},{key:"_convert",value:function _convert(e){return e.setMilliseconds(0),e}}]),DatetimeSecondField}(),_e=function(t){_inherits(ChoiceFieldBase,S);var r=_createSuper(ChoiceFieldBase);function ChoiceFieldBase(){return _classCallCheck(this,ChoiceFieldBase),r.apply(this,arguments)}return _createClass(ChoiceFieldBase,[{key:"_make_option",value:function _make_option(e,t,r){return element("option",r,{value:t,class:t===this.control.none_key?"la-none-option":null,selected:e?"selected":null})}},{key:"_set_dom_lookupdata_select",value:function _set_dom_lookupdata_select(t){var r;null===t&&(t=this.control.lookup_data),e._isobject(t)&&(t=new Map(Object.entries(t)));var o,n=!1,l=new Set,a=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option:checked"));try{for(a.s();!(o=a.n()).done;){var i=o.value.getAttribute("value");t.has(i)?l.add(i):i===this.control.none_key&&(n=!0)}}catch(e){a.e(e)}finally{a.f()}var u=[];null!==this.control.none_key&&u.push(this._make_option(n,this.control.none_key,null!==this.control.none_label?this.control.none_label:this.globals.msg_nothing_selected()));var s,p=_createForOfIteratorHelper(t);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=c[1];u.push(this._make_option(l.has(_),_,this._make_label(h)))}}catch(e){p.e(e)}finally{p.f()}(r=this._dom_control).replaceChildren.apply(r,u)}},{key:"_set_dom_lookupdata_input",value:function _set_dom_lookupdata_input(t){null===t?t=this.control.lookupdata:e._isobject(t)&&(t=new Map(Object.entries(t)));var r,o=!1,n=new Set,l=_createForOfIteratorHelper(this._dom_controls);try{for(l.s();!(r=l.n()).done;){var a=r.value,i=a.getAttribute("value");a.checked&&(t.has(i)?n.add(i):i===this.control.none_key&&(o=!0))}}catch(e){l.e(e)}finally{l.f()}var u=this._dom_root.querySelector("input[value="+this.control.none_key+"]");null!==u&&(u.checked=o);var s,p=_createForOfIteratorHelper(this.control.lookupdata);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=(c[1],this._dom_root.querySelector("input[value="+_+"]")),y=this._dom_root.querySelector("label[for="+h.id+"]");t.has(_)?(h.style.display="inline",y.style.display="inline",y.innerText=this._make_label(t.get(_))):(h.style.display="none",y.style.display="none",y.checked=!1)}}catch(e){p.e(e)}finally{p.f()}}}]),ChoiceFieldBase}(),he=function(e){_inherits(LookupFieldBaseType,A);var t=_createSuper(LookupFieldBaseType);function LookupFieldBaseType(){return _classCallCheck(this,LookupFieldBaseType),t.apply(this,arguments)}return _createClass(LookupFieldBaseType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof de}}]),LookupFieldBaseType}(),ye=new he("la","LookupFieldBase","Base type of LookupField and MultipleLookupField"),de=function(t){_inherits(LookupFieldBase,_e);var r=_createSuper(LookupFieldBase);function LookupFieldBase(){return _classCallCheck(this,LookupFieldBase),r.apply(this,arguments)}return _createClass(LookupFieldBase,[{key:e.symbols.type,value:function value(){return ye}},{key:"lookupdata",get:function get(){return null!==this._lookupdata?this._lookupdata:this.control.lookupdata}},{key:"lookupdata",set:function set(e){this._in_form()&&this._set_dom_lookupdata(e),this._lookupdata=e}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){}},{key:"_make_label",value:function _make_label(t){return"string"==typeof t?t:t instanceof wr?t.label:e._str(t)}},{key:"_find_lookupitem",value:function _find_lookupitem(e){var t=e.value;if("string"==typeof t){if(null===this.lookupdata)return;var r=this.control.lookupdata.get(t);if(void 0===r)if(this.control.autoexpandable){var o,n=_createForOfIteratorHelper(this.lookupdata.values());try{for(n.s();!(o=n.n()).done;){var l=o.value;if(t===l.label)return void(e.value=l)}}catch(e){n.e(e)}finally{n.f()}}else e.errors.push(this.msg_lookup_unknownkey(t)),e.value=null;else e.value=r}else if(t instanceof wr){this.control.lookupdata.get(t.key)!==t&&(e.errors.push(this.msg_lookup_wrongitem(t)),e.value=null)}else e.errors.push(this.msg_field_wrong_type(t)),e.value=null}}]),LookupFieldBase}(),fe=function(e){_inherits(LookupFieldType,he);var t=_createSuper(LookupFieldType);function LookupFieldType(){return _classCallCheck(this,LookupFieldType),t.apply(this,arguments)}return _createClass(LookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ke}}]),LookupFieldType}(),ve=new fe("la","LookupField","Holds the value of a lookup field of a record (and related information)"),ke=function(t){_inherits(LookupField,de);var r=_createSuper(LookupField);function LookupField(){return _classCallCheck(this,LookupField),r.apply(this,arguments)}return _createClass(LookupField,[{key:e.symbols.type,value:function value(){return ve}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e?null:e.label}},{key:"_validate",value:function _validate(e){var t=e.value;null===t||""===t||this.control.none_key===t?(this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=null):this._find_lookupitem(e)}}]),LookupField}(),me=new(function(e){_inherits(LookupRadioFieldType,fe);var t=_createSuper(LookupRadioFieldType);function LookupRadioFieldType(){return _classCallCheck(this,LookupRadioFieldType),t.apply(this,arguments)}return _createClass(LookupRadioFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ce}}]),LookupRadioFieldType}())("la","LookupRadioField","Holds the value of a lookup/radio field of a record (and related information)"),Ce=function(t){_inherits(LookupRadioField,ke);var r=_createSuper(LookupRadioField);function LookupRadioField(){return _classCallCheck(this,LookupRadioField),r.apply(this,arguments)}return _createClass(LookupRadioField,[{key:e.symbols.type,value:function value(){return me}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=_createForOfIteratorHelper(this._dom_controls);try{for(t.s();!(e=t.n()).done;){var r=e.value;if(r.checked){var o=r.getAttribute("value");return this.control.lookupdata.get(o)}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(e){e instanceof wr&&(e=e.key),null===e&&(e=this.control.none_key);var t,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(t=r.n()).done;){var o=t.value;o.checked=o.getAttribute("value")===e}}catch(e){r.e(e)}finally{r.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_input(e)}}]),LookupRadioField}(),ge=new(function(e){_inherits(LookupSelectFieldType,fe);var t=_createSuper(LookupSelectFieldType);function LookupSelectFieldType(){return _classCallCheck(this,LookupSelectFieldType),t.apply(this,arguments)}return _createClass(LookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof be}}]),LookupSelectFieldType}())("la","LookupSelectField","Holds the value of a lookup/select field of a record (and related information)"),be=function(t){_inherits(LookupSelectField,ke);var r=_createSuper(LookupSelectField);function LookupSelectField(){return _classCallCheck(this,LookupSelectField),r.apply(this,arguments)}return _createClass(LookupSelectField,[{key:e.symbols.type,value:function value(){return ge}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(LookupSelectField.prototype),"_get_dom_value",this).call(this);return e&&(e=e===this.control.none_key?null:this.control.lookupdata.get(e)),e}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t),_get(_getPrototypeOf(LookupSelectField.prototype),"_set_dom_value",this).call(this,null!=t.value?t.value.key:this.control.none_key)}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),LookupSelectField}(),Te=new(function(e){_inherits(LookupChoiceFieldType,fe);var t=_createSuper(LookupChoiceFieldType);function LookupChoiceFieldType(){return _classCallCheck(this,LookupChoiceFieldType),t.apply(this,arguments)}return _createClass(LookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Le}}]),LookupChoiceFieldType}())("la","LookupChoiceField","Holds the value of a lookup/choice field of a record (and related information)"),Le=function(t){_inherits(LookupChoiceField,ke);var r=_createSuper(LookupChoiceField);function LookupChoiceField(){return _classCallCheck(this,LookupChoiceField),r.apply(this,arguments)}return _createClass(LookupChoiceField,[{key:e.symbols.type,value:function value(){return Te}}]),LookupChoiceField}();Le.prototype._inputevent="llchoice";var Ae=function(e){_inherits(MultipleLookupFieldType,he);var t=_createSuper(MultipleLookupFieldType);function MultipleLookupFieldType(){return _classCallCheck(this,MultipleLookupFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof we}}]),MultipleLookupFieldType}(),Fe=new Ae("la","MultipleLookupField","Holds the value of a multiple lookup field of a record (and related information)"),we=function(t){_inherits(MultipleLookupField,de);var r=_createSuper(MultipleLookupField);function MultipleLookupField(){return _classCallCheck(this,MultipleLookupField),r.apply(this,arguments)}return _createClass(MultipleLookupField,[{key:e.symbols.type,value:function value(){return Fe}},{key:"is_empty",value:function is_empty(){return 0===this._value.length}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e||0===e.length?null:e.map((function(e){return e.label})).join(", ")}},{key:"_validate",value:function _validate(e){var t=e.value,r="[object Array]"===Object.prototype.toString.call(t);if(null===t||""===t||this.control.none_key===t||r&&0===t.length)this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=[];else if(r){var o,n=[],l=_createForOfIteratorHelper(t);try{for(l.s();!(o=l.n()).done;){var a={value:o.value,errors:[]};this._find_lookupitem(a),a.errors.length>0?e.errors=[].concat(_toConsumableArray(e.errors),_toConsumableArray(a.errors)):n.push(a.value)}}catch(e){l.e(e)}finally{l.f()}e.value=n}else this._find_lookupitem(e),e.errors.length>0?e.value=[]:e.value=[e.value]}}]),MultipleLookupField}(),Se=new(function(e){_inherits(MultipleLookupCheckboxFieldType,Ae);var t=_createSuper(MultipleLookupCheckboxFieldType);function MultipleLookupCheckboxFieldType(){return _classCallCheck(this,MultipleLookupCheckboxFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupCheckboxFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Me}}]),MultipleLookupCheckboxFieldType}())("la","MultipleLookupCheckboxField","Holds the value of a multiplelookup/radio field of a record (and related information)"),Me=function(t){_inherits(MultipleLookupCheckboxField,we);var r=_createSuper(MultipleLookupCheckboxField);function MultipleLookupCheckboxField(){return _classCallCheck(this,MultipleLookupCheckboxField),r.apply(this,arguments)}return _createClass(MultipleLookupCheckboxField,[{key:e.symbols.type,value:function value(){return Se}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=[],r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o.checked){var n=o.getAttribute("value");t.push(this.control.lookupdata.get(n))}}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t);var r,o=new Set,n=_createForOfIteratorHelper(t.value);try{for(n.s();!(r=n.n()).done;){var l=r.value;o.add(l.key)}}catch(e){n.e(e)}finally{n.f()}var a,i=_createForOfIteratorHelper(this._dom_controls);try{for(i.s();!(a=i.n()).done;){var u=a.value;u.checked=o.has(u.getAttribute("value"))}}catch(e){i.e(e)}finally{i.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_input(e)}}]),MultipleLookupCheckboxField}(),xe=new(function(e){_inherits(MultipleLookupSelectFieldType,Ae);var t=_createSuper(MultipleLookupSelectFieldType);function MultipleLookupSelectFieldType(){return _classCallCheck(this,MultipleLookupSelectFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ie}}]),MultipleLookupSelectFieldType}())("la","MultipleLookupSelectField","Holds the value of a multiplelookup/select field of a record (and related information)"),Ie=function(t){_inherits(MultipleLookupSelectField,we);var r=_createSuper(MultipleLookupSelectField);function MultipleLookupSelectField(){return _classCallCheck(this,MultipleLookupSelectField),r.apply(this,arguments)}return _createClass(MultipleLookupSelectField,[{key:e.symbols.type,value:function value(){return xe}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=[],r=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option"));try{for(r.s();!(e=r.n()).done;){var o=e.value;o.selected&&t.push(this.control.lookupdata.get(o.getAttribute("value")))}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t);var r,o=new Set,n=_createForOfIteratorHelper(t.value);try{for(n.s();!(r=n.n()).done;){var l=r.value;o.add(l.key)}}catch(e){n.e(e)}finally{n.f()}var a,i=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option"));try{for(i.s();!(a=i.n()).done;){var u=a.value;u.selected=o.has(u.getAttribute("value"))}}catch(e){i.e(e)}finally{i.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),MultipleLookupSelectField}(),He=new(function(e){_inherits(MultipleLookupChoiceFieldType,Ae);var t=_createSuper(MultipleLookupChoiceFieldType);function MultipleLookupChoiceFieldType(){return _classCallCheck(this,MultipleLookupChoiceFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Re}}]),MultipleLookupChoiceFieldType}())("la","MultipleLookupChoiceField","Holds the value of a multiplelookup/choice field of a record (and related information)"),Re=function(t){_inherits(MultipleLookupChoiceField,we);var r=_createSuper(MultipleLookupChoiceField);function MultipleLookupChoiceField(){return _classCallCheck(this,MultipleLookupChoiceField),r.apply(this,arguments)}return _createClass(MultipleLookupChoiceField,[{key:e.symbols.type,value:function value(){return He}}]),MultipleLookupChoiceField}();Re.prototype._inputevent="llchoice";var De=function(e){_inherits(AppLookupFieldBaseType,A);var t=_createSuper(AppLookupFieldBaseType);function AppLookupFieldBaseType(){return _classCallCheck(this,AppLookupFieldBaseType),t.apply(this,arguments)}return _createClass(AppLookupFieldBaseType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Pe}}]),AppLookupFieldBaseType}(),Oe=new De("la","AppLookupFieldBase","Base type of AppLookupField and MultipleAppLookupField"),Pe=function(t){_inherits(AppLookupFieldBase,_e);var r=_createSuper(AppLookupFieldBase);function AppLookupFieldBase(){return _classCallCheck(this,AppLookupFieldBase),r.apply(this,arguments)}return _createClass(AppLookupFieldBase,[{key:e.symbols.type,value:function value(){return Oe}},{key:"lookupdata",get:function get(){return null!==this._lookupdata?this._lookupdata:null!==this.control.lookup_app.records?this.control.lookup_app.records:new Map}},{key:"lookupdata",set:function set(e){this._in_form()&&this._set_dom_lookupdata(e),this._lookupdata=e}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){}},{key:"_make_label",value:function _make_label(t){return"string"==typeof t?t:t instanceof L?t.as_text(this.control.lookup_controls):e._str(t)}},{key:"_find_record",value:function _find_record(e){var t=e.value;if("string"==typeof t){var r=null!==this.control.lookup_app.records?this.control.lookup_app.records.get(t):void 0;void 0===r?(e.errors.push(this.msg_applookup_unknownkey(t)),e.value=null):e.value=r}else t instanceof L?t.app!==this.control.lookup_app&&(e.errors.push(this.msg_applookup_wrongrecord(t)),e.value=null):(e.errors.push(this.msg_field_wrong_type(t)),e.value=null)}},{key:e.symbols.setattr,value:function value(t,r){"lookupdata"===t?this.lookupdata=r:_get(_getPrototypeOf(AppLookupFieldBase.prototype),e.symbols.setattr,this).call(this,t,r)}}]),AppLookupFieldBase}();Pe.prototype._ul4attrs=new Set([].concat(_toConsumableArray(S.prototype._ul4attrs),["lookupdata"]));var Be=function(e){_inherits(AppLookupFieldType,De);var t=_createSuper(AppLookupFieldType);function AppLookupFieldType(){return _classCallCheck(this,AppLookupFieldType),t.apply(this,arguments)}return _createClass(AppLookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ue}}]),AppLookupFieldType}(),Ne=new Be("la","AppLookupField","Holds the value of a applookup field of a record (and related information)"),Ue=function(t){_inherits(AppLookupField,Pe);var r=_createSuper(AppLookupField);function AppLookupField(){return _classCallCheck(this,AppLookupField),r.apply(this,arguments)}return _createClass(AppLookupField,[{key:e.symbols.type,value:function value(){return Ne}},{key:"value_as_text",value:function value_as_text(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=this.value;return null===t?null:"("+this.value.as_text(e)+")"}},{key:"_validate",value:function _validate(e){this._find_record(e)}}]),AppLookupField}(),qe=new(function(e){_inherits(AppLookupSelectFieldType,Be);var t=_createSuper(AppLookupSelectFieldType);function AppLookupSelectFieldType(){return _classCallCheck(this,AppLookupSelectFieldType),t.apply(this,arguments)}return _createClass(AppLookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ve}}]),AppLookupSelectFieldType}())("la","AppLookupSelectField","Holds the value of a `applookup`/`select` field of a record (and related information)"),Ve=function(t){_inherits(AppLookupSelectField,Ue);var r=_createSuper(AppLookupSelectField);function AppLookupSelectField(){return _classCallCheck(this,AppLookupSelectField),r.apply(this,arguments)}return _createClass(AppLookupSelectField,[{key:e.symbols.type,value:function value(){return qe}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(AppLookupSelectField.prototype),"_get_dom_value",this).call(this);return null!==this.control.lookup_app.records?void 0===(e=this.control.lookup_app.records.get(e))&&(e=null):e=null,e}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t),_get(_getPrototypeOf(AppLookupSelectField.prototype),"_set_dom_value",this).call(this,null!=t.value?t.value.id:this.control.none_key)}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),AppLookupSelectField}(),Ge=new(function(e){_inherits(AppLookupRadioFieldType,Be);var t=_createSuper(AppLookupRadioFieldType);function AppLookupRadioFieldType(){return _classCallCheck(this,AppLookupRadioFieldType),t.apply(this,arguments)}return _createClass(AppLookupRadioFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ee}}]),AppLookupRadioFieldType}())("la","AppLookupRadioField","Holds the value of a `applookup`/`radio` field of a record (and related information)"),Ee=function(t){_inherits(AppLookupRadioField,Ue);var r=_createSuper(AppLookupRadioField);function AppLookupRadioField(){return _classCallCheck(this,AppLookupRadioField),r.apply(this,arguments)}return _createClass(AppLookupRadioField,[{key:e.symbols.type,value:function value(){return Ge}}]),AppLookupRadioField}(),je=new(function(e){_inherits(AppLookupChoiceFieldType,Be);var t=_createSuper(AppLookupChoiceFieldType);function AppLookupChoiceFieldType(){return _classCallCheck(this,AppLookupChoiceFieldType),t.apply(this,arguments)}return _createClass(AppLookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof We}}]),AppLookupChoiceFieldType}())("la","AppLookupChoiceField","Holds the value of a `applookup`/`choice` field of a record (and related information)"),We=function(t){_inherits(AppLookupChoiceField,Ue);var r=_createSuper(AppLookupChoiceField);function AppLookupChoiceField(e,t,o){var n;return _classCallCheck(this,AppLookupChoiceField),(n=r.call(this,e,t,o))._search_url=null,n._search_param_name=null,n._target_param_name=null,n}return _createClass(AppLookupChoiceField,[{key:e.symbols.type,value:function value(){return je}},{key:"search_url",get:function get(){var e;return null!==(e=this._search_url)&&void 0!==e?e:this.control.search_url}},{key:"search_url",set:function set(e){this._search_url=e}},{key:"search_param_name",get:function get(){var e;return null!==(e=this._search_param_name)&&void 0!==e?e:this.control.search_param_name}},{key:"search_param_name",set:function set(e){this._search_param_name=e}},{key:"target_param_name",get:function get(){var e;return null!==(e=this._target_param_name)&&void 0!==e?e:this.control.target_param_name}},{key:"target_param_name",set:function set(e){this._target_param_name=e}}]),AppLookupChoiceField}();We.prototype._inputevent="llchoice",We.prototype._ul4attrs=new Set([].concat(_toConsumableArray(S.prototype._ul4attrs),["search_url","search_param_name","target_param_name"]));var ze=function(e){_inherits(MultipleAppLookupFieldType,De);var t=_createSuper(MultipleAppLookupFieldType);function MultipleAppLookupFieldType(){return _classCallCheck(this,MultipleAppLookupFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Je}}]),MultipleAppLookupFieldType}(),Ye=new ze("la","MultipleAppLookupField","Holds the value of a multiple applookup field of a record (and related information)"),Je=function(t){_inherits(MultipleAppLookupField,Pe);var r=_createSuper(MultipleAppLookupField);function MultipleAppLookupField(){return _classCallCheck(this,MultipleAppLookupField),r.apply(this,arguments)}return _createClass(MultipleAppLookupField,[{key:e.symbols.type,value:function value(){return Ye}},{key:"is_empty",value:function is_empty(){return 0===this._value.length}},{key:"_validate",value:function _validate(e){var t=e.value,r="[object Array]"===Object.prototype.toString.call(t);if(null===t||""===t||this.control.none_key===t||r&&0===t.length)this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=[];else if(r){var o,n=[],l=_createForOfIteratorHelper(t);try{for(l.s();!(o=l.n()).done;){var a={value:o.value,errors:[]};this._find_record(a),a.errors.length>0?e.errors=[].concat(_toConsumableArray(e.errors),_toConsumableArray(a.errors)):n.push(a.value)}}catch(e){l.e(e)}finally{l.f()}e.value=n}else this._find_record(e),e.errors.length>0?e.value=[]:e.value=[e.value]}}]),MultipleAppLookupField}(),Ke=new(function(e){_inherits(MultipleAppLookupCheckboxFieldType,ze);var t=_createSuper(MultipleAppLookupCheckboxFieldType);function MultipleAppLookupCheckboxFieldType(){return _classCallCheck(this,MultipleAppLookupCheckboxFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof $e}}]),MultipleAppLookupCheckboxFieldType}())("la","MultipleAppLookupCheckboxField","Holds the value of a `multipleapplookup`/`checkbox` field of a record (and related information)"),$e=function(t){_inherits(MultipleAppLookupCheckboxField,Je);var r=_createSuper(MultipleAppLookupCheckboxField);function MultipleAppLookupCheckboxField(){return _classCallCheck(this,MultipleAppLookupCheckboxField),r.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxField,[{key:e.symbols.type,value:function value(){return Ke}}]),MultipleAppLookupCheckboxField}(),Ze=new(function(e){_inherits(MultipleAppLookupSelectFieldType,ze);var t=_createSuper(MultipleAppLookupSelectFieldType);function MultipleAppLookupSelectFieldType(){return _classCallCheck(this,MultipleAppLookupSelectFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Qe}}]),MultipleAppLookupSelectFieldType}())("la","MultipleAppLookupSelectField","Holds the value of a `multipleapplookup`/`select` field of a record (and related information)"),Qe=function(t){_inherits(MultipleAppLookupSelectField,Je);var r=_createSuper(MultipleAppLookupSelectField);function MultipleAppLookupSelectField(){return _classCallCheck(this,MultipleAppLookupSelectField),r.apply(this,arguments)}return _createClass(MultipleAppLookupSelectField,[{key:e.symbols.type,value:function value(){return Ze}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),MultipleAppLookupSelectField}(),Xe=new(function(e){_inherits(MultipleAppLookupChoiceFieldType,ze);var t=_createSuper(MultipleAppLookupChoiceFieldType);function MultipleAppLookupChoiceFieldType(){return _classCallCheck(this,MultipleAppLookupChoiceFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof et}}]),MultipleAppLookupChoiceFieldType}())("la","MultipleAppLookupChoiceField","Holds the value of a `multipleapplookup`/`choice` field of a record (and related information)"),et=function(t){_inherits(MultipleAppLookupChoiceField,Je);var r=_createSuper(MultipleAppLookupChoiceField);function MultipleAppLookupChoiceField(){return _classCallCheck(this,MultipleAppLookupChoiceField),r.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceField,[{key:e.symbols.type,value:function value(){return Xe}}]),MultipleAppLookupChoiceField}();et.prototype._inputevent="llchoice";var tt=function(t){_inherits(ControlType,e.Type);var r=_createSuper(ControlType);function ControlType(){return _classCallCheck(this,ControlType),r.apply(this,arguments)}return _createClass(ControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ot}}]),ControlType}(),rt=new tt("la","Control","Metainformation about a field in a LivingApps application"),ot=function(t){_inherits(Control,r);var o=_createSuper(Control);function Control(e){var t;return _classCallCheck(this,Control),(t=o.call(this,e))._mode=null,t}return _createClass(Control,[{key:e.symbols.type,value:function value(){return rt}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"globals",get:function get(){return this.app.globals}},{key:"fulltype",get:function get(){return this.subtype?this.type+"/"+this.subtype:this.type}},{key:"label",get:function get(){var e=this._view_control();if(null===e)return this._label;var t=e.label;return null===t?this._label:t}},{key:"label",set:function set(e){this._label=e}},{key:"description",get:function get(){return this._description}},{key:"description",set:function set(e){this._description=e}},{key:"priority",get:function get(){return this._priority}},{key:"priority",set:function set(e){this._priority=e}},{key:"in_list",get:function get(){return this._priority}},{key:"in_list",set:function set(e){this._priority=e}},{key:"in_mobile_list",get:function get(){return this._in_mobile_list}},{key:"in_mobile_list",set:function set(e){this._in_mobile_list=e}},{key:"in_text",get:function get(){return this._in_text}},{key:"in_text",set:function set(e){this._in_text=e}},{key:"in_structured_search",get:function get(){return this._in_structured_search}},{key:"in_structured_search",set:function set(e){this._in_structured_search=e}},{key:"in_fulltext_search",get:function get(){return this._in_fulltext_search}},{key:"in_fulltext_search",set:function set(e){this._in_fulltext_search=e}},{key:"in_expert_search",get:function get(){return this._in_expert_search}},{key:"in_expert_search",set:function set(e){this._in_expert_search=e}},{key:"default",get:function get(){return null}},{key:"top",get:function get(){var e=this._view_control();return null!==e?e.top:null}},{key:"left",get:function get(){var e=this._view_control();return null!==e?e.left:null}},{key:"width",get:function get(){var e=this._view_control();return null!==e?e.width:null}},{key:"height",get:function get(){var e=this._view_control();return null!==e?e.height:null}},{key:"z_index",get:function get(){var e=this._view_control();return null!==e?e.z_index:null}},{key:"liveupdate",get:function get(){var e=this._view_control();return null!==e&&e.liveupdate}},{key:"tabindex",get:function get(){var e=this._view_control();return null!==e?e.tabindex:null}},{key:"required",get:function get(){var e;if(null===this.app._active_view)return null!==(e=this._required)&&void 0!==e?e:this._required_in_view;var t=this._view_control();return null!==t&&t.required}},{key:"required",set:function set(e){this._required=e}},{key:"mode",get:function get(){if(null!==this._mode)return this._mode;var e=this._view_control();return null!==this.app._active_view&&null===e?null:null===this.app.globals.mode?"display":null!==e?e.mode:"edit"}},{key:"mode",set:function set(e){this._mode=e}},{key:"labelpos",get:function get(){var e=this._view_control();return null!==e?e.labelpos:"left"}},{key:"labelwidth",get:function get(){var e=this._view_control();return null!==e?e.labelwidth:null}},{key:"autoalign",get:function get(){var e=this._view_control();return null===e||e.autoalign}},{key:"in_active_view",get:function get(){return null!==this._view_control()}},{key:"_view_control",value:function _view_control(){if(null===this.app._active_view)return null;var e=this.app._active_view.controls.get(this.identifier);return null!=e?e:null}},{key:"_logsearch",value:function _logsearch(e,t){}},{key:"search",value:function search(e,t){return!1}}]),Control}();ot.prototype.type=null,ot.prototype.subtype=null,ot.prototype._ul4onattrs=["identifier","fieldname","app","_label","_description","base_mode","in_sum","_priority","_in_mobile_list","_in_text","_in_structured_search","_in_fulltext_search","_in_expert_search","_required","_required_in_view","order","ininsertprocedure","inupdateprocedure"],ot.prototype._ul4attrs=new Set(["id","identifier","fieldname","app","base_mode","in_sum","priority","in_list","in_mobile_list","in_text","in_structured_search","in_fulltext_search","in_expert_search","order","ininsertprocedure","inupdateprocedure","fulltype","label","description","top","left","width","height","z_index","liveupdate","tabindex","required","mode","labelpos","autoalign","in_active_view"]),ot.prototype._cssclass_root="llft-control",ot.prototype._cssclass_control="input";var nt=new(function(e){_inherits(BoolControlType,tt);var t=_createSuper(BoolControlType);function BoolControlType(){return _classCallCheck(this,BoolControlType),t.apply(this,arguments)}return _createClass(BoolControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof lt}}]),BoolControlType}())("la","BoolControl","A LivingApps boolean field (type 'bool')"),lt=function(t){_inherits(BoolControl,ot);var r=_createSuper(BoolControl);function BoolControl(){return _classCallCheck(this,BoolControl),r.apply(this,arguments)}return _createClass(BoolControl,[{key:e.symbols.type,value:function value(){return nt}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator&&t.value===e}}]),BoolControl}();lt.prototype.type="bool",lt.prototype.fieldtype=x;var at=new(function(e){_inherits(IntControlType,tt);var t=_createSuper(IntControlType);function IntControlType(){return _classCallCheck(this,IntControlType),t.apply(this,arguments)}return _createClass(IntControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof it}}]),IntControlType}())("la","IntControl","A LivingApps integer field (type 'int')"),it=function(t){_inherits(IntControl,ot);var r=_createSuper(IntControl);function IntControl(){return _classCallCheck(this,IntControl),r.apply(this,arguments)}return _createClass(IntControl,[{key:e.symbols.type,value:function value(){return at}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator&&t.value===e}}]),IntControl}();it.prototype.type="int",it.prototype.fieldtype=H;var ut=new(function(e){_inherits(NumberControlType,tt);var t=_createSuper(NumberControlType);function NumberControlType(){return _classCallCheck(this,NumberControlType),t.apply(this,arguments)}return _createClass(NumberControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof st}}]),NumberControlType}())("la","NumberControl","A LivingApps number field (type 'number')"),st=function(t){_inherits(NumberControl,ot);var r=_createSuper(NumberControl);function NumberControl(){return _classCallCheck(this,NumberControl),r.apply(this,arguments)}return _createClass(NumberControl,[{key:e.symbols.type,value:function value(){return ut}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator?t.value===e:"range"===t.operator&&(null!==e&&((null===t.minvalue||t.minvalue<=e)&&(null===t.maxvalue||e<t.maxvalue)))}}]),NumberControl}();st.prototype.type="number",st.prototype.fieldtype=D,st.prototype._ul4onattrs=[].concat(_toConsumableArray(ot.prototype._ul4onattrs),["precision","minimum","maximum"]),st.prototype._ul4attrs=new Set([].concat(_toConsumableArray(ot.prototype._ul4attrs),["precision","minimum","maximum"]));var pt=function(e){_inherits(StringControlType,tt);var t=_createSuper(StringControlType);function StringControlType(){return _classCallCheck(this,StringControlType),t.apply(this,arguments)}return _createClass(StringControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof _t}}]),StringControlType}(),ct=new pt("la","StringControl","A LivingApps number field (type 'string')"),_t=function(t){_inherits(StringControl,ot);var r=_createSuper(StringControl);function StringControl(){return _classCallCheck(this,StringControl),r.apply(this,arguments)}return _createClass(StringControl,[{key:e.symbols.type,value:function value(){return ct}},{key:"placeholder",get:function get(){var e=this._view_control();return null!==e?e.placeholder:this._placeholder}},{key:"placeholder",set:function set(e){this._placeholder=e;var t=this.app.globals;if(t._in_form()&&this.app===t.record.app){var r=t.record.fields.get(this.identifier);r._dom_control.placeholder=r.placeholder}}},{key:"_user_placeholder",value:function _user_placeholder(t,r){if(null===r)return null;switch(r){case"{gender}":return null!==t?t.gender:null;case"{title}":return null!==t?t.title:null;case"{firstname}":return null!==t?t.firstname:null;case"{surname}":return null!==t?t.surname:null;case"{account}":return null!==t?t.email:null;case"{streetname}":return null!==t?t.streetname:null;case"{streetnumber}":return null!==t?t.streetnumber:null;case"{street}":return null===t?null:null===t.street?t.streetnumber:null===t.streetnumber?t.street:t.street+" "+t.streetnumber;case"{zip}":return null!==t?t.zip:null;case"{phone}":return null!==t?t.phone:null;case"{fax}":return null!==t?t.fax:null;case"{company}":return null!==t?t.company:null;case"{city}":return null!==t?t.city:null;case"{summary}":return null!==t?t.summary:null;case"{interests}":return null!==t?t.interests:null;case"{personal_website}":return null!==t?t.personal_website:null;case"{company_website}":return null!==t?t.company_website:null;case"{position}":return null!==t?t.position:null;case"{department}":return null!==t?t.department:null;case"{today}":return e.today();default:return r}}},{key:"default",get:function get(){var e=this._view_control();return null===e?null:this._user_placeholder(this.app.globals.user,e.default)}},{key:"minlength",get:function get(){var e=this._view_control();if(null===e)return 0;var t=e.minlength;return null===t||t<0?0:t}},{key:"maxlength",get:function get(){var e=this._view_control();if(null===e)return 4e3;var t=e.maxlength;return null===t||t<0||t>4e3?4e3:t}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator?t.value===e:"contains"===t.operator?null===t.value||null===e?t.value===e:e.toLowerCase().indexOf(t.value.toLowerCase())>=0:void 0}}]),StringControl}();_t.prototype.type="string",_t.prototype._ul4attrs=new Set([].concat(_toConsumableArray(ot.prototype._ul4attrs),["minlength","maxlength","placeholder"]));var ht=new(function(e){_inherits(TextControlType,pt);var t=_createSuper(TextControlType);function TextControlType(){return _classCallCheck(this,TextControlType),t.apply(this,arguments)}return _createClass(TextControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof yt}}]),TextControlType}())("la","TextControl","A LivingApps text field (type 'string/text')"),yt=function(t){_inherits(TextControl,_t);var r=_createSuper(TextControl);function TextControl(){return _classCallCheck(this,TextControl),r.apply(this,arguments)}return _createClass(TextControl,[{key:e.symbols.type,value:function value(){return ht}}]),TextControl}();yt.prototype.subtype="text",yt.prototype.fieldtype=B;var dt=new(function(e){_inherits(PasswordControlType,pt);var t=_createSuper(PasswordControlType);function PasswordControlType(){return _classCallCheck(this,PasswordControlType),t.apply(this,arguments)}return _createClass(PasswordControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ft}}]),PasswordControlType}())("la","PasswordControl","A LivingApps password field (type 'string/password')"),ft=function(t){_inherits(PasswordControl,_t);var r=_createSuper(PasswordControl);function PasswordControl(){return _classCallCheck(this,PasswordControl),r.apply(this,arguments)}return _createClass(PasswordControl,[{key:e.symbols.type,value:function value(){return dt}}]),PasswordControl}();ft.prototype.subtype="password",ft.prototype.fieldtype=U;var vt=new(function(e){_inherits(EmailControlType,pt);var t=_createSuper(EmailControlType);function EmailControlType(){return _classCallCheck(this,EmailControlType),t.apply(this,arguments)}return _createClass(EmailControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof kt}}]),EmailControlType}())("la","EmailControl","A LivingApps email field (type 'string/email')"),kt=function(t){_inherits(EmailControl,_t);var r=_createSuper(EmailControl);function EmailControl(){return _classCallCheck(this,EmailControl),r.apply(this,arguments)}return _createClass(EmailControl,[{key:e.symbols.type,value:function value(){return vt}}]),EmailControl}();kt.prototype.subtype="email",kt.prototype.fieldtype=V;var mt=new(function(e){_inherits(URLControlType,pt);var t=_createSuper(URLControlType);function URLControlType(){return _classCallCheck(this,URLControlType),t.apply(this,arguments)}return _createClass(URLControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ct}}]),URLControlType}())("la","URLControl","A LivingApps URL field (type 'string/url')"),Ct=function(t){_inherits(URLControl,_t);var r=_createSuper(URLControl);function URLControl(){return _classCallCheck(this,URLControl),r.apply(this,arguments)}return _createClass(URLControl,[{key:e.symbols.type,value:function value(){return mt}}]),URLControl}();Ct.prototype.subtype="url",Ct.prototype.fieldtype=E;var gt=new(function(e){_inherits(TelControlType,pt);var t=_createSuper(TelControlType);function TelControlType(){return _classCallCheck(this,TelControlType),t.apply(this,arguments)}return _createClass(TelControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof bt}}]),TelControlType}())("la","TelControl","A LivingApps phone number field (type 'string/tel')"),bt=function(t){_inherits(TelControl,_t);var r=_createSuper(TelControl);function TelControl(){return _classCallCheck(this,TelControl),r.apply(this,arguments)}return _createClass(TelControl,[{key:e.symbols.type,value:function value(){return gt}}]),TelControl}();bt.prototype.subtype="tel",bt.prototype.fieldtype=W;var Tt=new(function(e){_inherits(TextAreaControlType,pt);var t=_createSuper(TextAreaControlType);function TextAreaControlType(){return _classCallCheck(this,TextAreaControlType),t.apply(this,arguments)}return _createClass(TextAreaControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Lt}}]),TextAreaControlType}())("la","TextAreaControl","A LivingApps textarea field (type 'string/textarea')"),Lt=function(t){_inherits(TextAreaControl,_t);var r=_createSuper(TextAreaControl);function TextAreaControl(){return _classCallCheck(this,TextAreaControl),r.apply(this,arguments)}return _createClass(TextAreaControl,[{key:e.symbols.type,value:function value(){return Tt}},{key:"maxlength",get:function get(){var e=this._view_control();if(null===e)return null;if(null!==this.encrypted)return null;var t=e.maxlength;return t<0?null:t}}]),TextAreaControl}();Lt.prototype.subtype="textarea",Lt.prototype.fieldtype=Y,Lt.prototype._ul4onattrs=[].concat(_toConsumableArray(_t.prototype._ul4onattrs),["encrypted"]),Lt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(_t.prototype._ul4attrs),["encrypted"])),Lt.prototype._cssclass_control="textarea";var At=new(function(e){_inherits(HTMLControlType,pt);var t=_createSuper(HTMLControlType);function HTMLControlType(){return _classCallCheck(this,HTMLControlType),t.apply(this,arguments)}return _createClass(HTMLControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ft}}]),HTMLControlType}())("la","HTMLControl","A LivingApps HTML field (type 'string/html')"),Ft=function(t){_inherits(HTMLControl,_t);var r=_createSuper(HTMLControl);function HTMLControl(){return _classCallCheck(this,HTMLControl),r.apply(this,arguments)}return _createClass(HTMLControl,[{key:e.symbols.type,value:function value(){return At}}]),HTMLControl}();Ft.prototype.subtype="html",Ft.prototype.fieldtype=K;var wt=function(e){_inherits(DateControlType,tt);var t=_createSuper(DateControlType);function DateControlType(){return _classCallCheck(this,DateControlType),t.apply(this,arguments)}return _createClass(DateControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Mt}}]),DateControlType}(),St=new wt("la","DateControl","A LivingApps date field (type 'date/date')"),Mt=function(t){_inherits(DateControl,ot);var r=_createSuper(DateControl);function DateControl(){return _classCallCheck(this,DateControl),r.apply(this,arguments)}return _createClass(DateControl,[{key:e.symbols.type,value:function value(){return St}},{key:"default",get:function get(){var t=this._view_control();return null===t?null:"{today}"===t.default?e.today():null}},{key:"formatstring",value:function formatstring(e){return"de"!==(e=e||this.globals.lang)&&"fr"!==e&&"it"!==e&&(e="en"),this._formatstrings[e]}},{key:"formatstrings_parse",value:function formatstrings_parse(e){return"de"!==(e=e||this.globals.lang)&&"fr"!==e&&"it"!==e&&(e="en"),[].concat(_toConsumableArray(this._formatstrings_parse[e]),_toConsumableArray(this._formatstrings_parse.intl))}},{key:"search",value:function search(t,r){this._logsearch(t,r);var o=r.value;return"[object Date]"==Object.prototype.toString.call(o)&&(o=e._format(o,this.formatstring(),this.app.language)),null!==t&&(t=e._format(t,this.formatstring(),this.app.language)),"equals"===r.operator?o===t:"contains"===r.operator&&(null===o||null===t?o===t:t.toLowerCase().indexOf(o.toLowerCase())>=0)}}]),DateControl}();Mt.prototype.type="date",Mt.prototype.subtype="date",Mt.prototype.fieldtype=ie,Mt.prototype._formatstrings={de:"%d.%m.%Y",fr:"%d.%m.%Y",it:"%d.%m.%Y",en:"%m/%d/%Y",intl:"%Y-%m-%d"};var xt=[""," %H:%M","T%H:%M"," %H:%M:%S","T%H:%M:%S"," %H:%M:%S.%f","T%H:%M:%S.%f"," %H:%M%z","T%H:%M%z"," %H:%M:%S%z","T%H:%M:%S%z"," %H:%M:%S.%f%z","T%H:%M:%S.%f%z"," %H:%M %z","T%H:%M %z"," %H:%M:%S %z","T%H:%M:%S %z"," %H:%M:%S.%f %z","T%H:%M:%S.%f %z"];Mt.prototype._formatstrings_parse={en:xt.map((function(e){return"%m/%d/%Y"+e})),de:xt.map((function(e){return"%d.%m.%Y"+e})),fr:xt.map((function(e){return"%d.%m.%Y"+e})),it:xt.map((function(e){return"%d.%m.%Y"+e})),intl:xt.map((function(e){return"%Y-%m-%d"+e}))};var It=new(function(e){_inherits(DatetimeMinuteControlType,wt);var t=_createSuper(DatetimeMinuteControlType);function DatetimeMinuteControlType(){return _classCallCheck(this,DatetimeMinuteControlType),t.apply(this,arguments)}return _createClass(DatetimeMinuteControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ht}}]),DatetimeMinuteControlType}())("la","DatetimeMinuteControl","A LivingApps date field (type 'date/datetimeminute')"),Ht=function(t){_inherits(DatetimeMinuteControl,Mt);var r=_createSuper(DatetimeMinuteControl);function DatetimeMinuteControl(){return _classCallCheck(this,DatetimeMinuteControl),r.apply(this,arguments)}return _createClass(DatetimeMinuteControl,[{key:e.symbols.type,value:function value(){return It}},{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;if("{today}"===e.default){var t=new Date;return t.setSeconds(0),t.setMilliseconds(0),t}return null}}]),DatetimeMinuteControl}();Ht.prototype.subtype="datetimeminute",Ht.prototype.fieldtype=se,Ht.prototype._formatstrings={de:"%d.%m.%Y %H:%M",fr:"%d.%m.%Y %H:%M",it:"%d.%m.%Y %H:%M",en:"%m/%d/%Y %H:%M",intl:"%Y-%m-%d %H:%M"};var Rt=new(function(e){_inherits(DatetimeSecondControlType,wt);var t=_createSuper(DatetimeSecondControlType);function DatetimeSecondControlType(){return _classCallCheck(this,DatetimeSecondControlType),t.apply(this,arguments)}return _createClass(DatetimeSecondControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Dt}}]),DatetimeSecondControlType}())("la","DatetimeSecondControl","A LivingApps date field (type 'date/datetimesecond')"),Dt=function(t){_inherits(DatetimeSecondControl,Mt);var r=_createSuper(DatetimeSecondControl);function DatetimeSecondControl(){return _classCallCheck(this,DatetimeSecondControl),r.apply(this,arguments)}return _createClass(DatetimeSecondControl,[{key:e.symbols.type,value:function value(){return Rt}},{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;if("{today}"===e.default){var t=new Date;return t.setMilliseconds(0),t}return null}}]),DatetimeSecondControl}();Dt.prototype.subtype="datetimesecond",Dt.prototype.fieldtype=ce,Dt.prototype._formatstrings={de:"%d.%m.%Y %H:%M:%S",fr:"%d.%m.%Y %H:%M:%S",it:"%d.%m.%Y %H:%M:%S",en:"%m/%d/%Y %H:%M:%S",intl:"%Y-%m-%d %H:%M:%S"};var Ot=function(e){_inherits(LookupControlType,tt);var t=_createSuper(LookupControlType);function LookupControlType(){return _classCallCheck(this,LookupControlType),t.apply(this,arguments)}return _createClass(LookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Bt}}]),LookupControlType}(),Pt=new Ot("la","LookupControl","A LivingApps date field (type 'lookup')"),Bt=function(t){_inherits(LookupControl,ot);var r=_createSuper(LookupControl);function LookupControl(){return _classCallCheck(this,LookupControl),r.apply(this,arguments)}return _createClass(LookupControl,[{key:e.symbols.type,value:function value(){return Pt}},{key:"default",get:function get(){var e,t=this._view_control();return null===t?null:null!==(e=this.lookupdata.get(t))&&void 0!==e?e:null}},{key:"autoexpandable",get:function get(){var e=this._view_control();return null!==e&&e.autoexpandable}},{key:"none_key",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonekey}},{key:"none_label",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonelabel}},{key:"search",value:function search(e,t){return"equals"===t.operator&&(null===e?null===t.value:e.key===t.value)}}]),LookupControl}();Bt.prototype.type="lookup",Bt.prototype.fieldtype=ke,Bt.prototype._ul4onattrs=[].concat(_toConsumableArray(ot.prototype._ul4onattrs),["lookupdata"]),Bt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(ot.prototype._ul4attrs),["lookupdata"]));var Nt=new(function(e){_inherits(LookupSelectControlType,Ot);var t=_createSuper(LookupSelectControlType);function LookupSelectControlType(){return _classCallCheck(this,LookupSelectControlType),t.apply(this,arguments)}return _createClass(LookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ut}}]),LookupSelectControlType}())("la","LookupSelectControl","A LivingApps lookup field (type 'lookup/select')"),Ut=function(t){_inherits(LookupSelectControl,Bt);var r=_createSuper(LookupSelectControl);function LookupSelectControl(){return _classCallCheck(this,LookupSelectControl),r.apply(this,arguments)}return _createClass(LookupSelectControl,[{key:e.symbols.type,value:function value(){return Nt}}]),LookupSelectControl}();Ut.prototype.subtype="select",Ut.prototype.fieldtype=be,Ut.prototype._cssclass_control="select";var qt=new(function(e){_inherits(LookupRadioControlType,Ot);var t=_createSuper(LookupRadioControlType);function LookupRadioControlType(){return _classCallCheck(this,LookupRadioControlType),t.apply(this,arguments)}return _createClass(LookupRadioControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Vt}}]),LookupRadioControlType}())("la","LookupRadioControl","A LivingApps lookup field (type 'lookup/radio')"),Vt=function(t){_inherits(LookupRadioControl,Bt);var r=_createSuper(LookupRadioControl);function LookupRadioControl(){return _classCallCheck(this,LookupRadioControl),r.apply(this,arguments)}return _createClass(LookupRadioControl,[{key:e.symbols.type,value:function value(){return qt}}]),LookupRadioControl}();Vt.prototype.subtype="radio",Vt.prototype.fieldtype=Ce,Vt.prototype._cssclass_root="llft-element";var Gt=new(function(e){_inherits(LookupChoiceControlType,Ot);var t=_createSuper(LookupChoiceControlType);function LookupChoiceControlType(){return _classCallCheck(this,LookupChoiceControlType),t.apply(this,arguments)}return _createClass(LookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Et}}]),LookupChoiceControlType}())("la","LookupChoiceControl","A LivingApps lookup field (type 'lookup/choice')"),Et=function(t){_inherits(LookupChoiceControl,Bt);var r=_createSuper(LookupChoiceControl);function LookupChoiceControl(){return _classCallCheck(this,LookupChoiceControl),r.apply(this,arguments)}return _createClass(LookupChoiceControl,[{key:e.symbols.type,value:function value(){return Gt}}]),LookupChoiceControl}();Et.prototype.subtype="choice",Et.prototype.fieldtype=Le,Et.prototype._cssclass_control="select";var jt=function(e){_inherits(AppLookupControlType,tt);var t=_createSuper(AppLookupControlType);function AppLookupControlType(){return _classCallCheck(this,AppLookupControlType),t.apply(this,arguments)}return _createClass(AppLookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof zt}}]),AppLookupControlType}(),Wt=new jt("la","AppLookupControl","A LivingApps lookup field (type 'applookup')"),zt=function(t){_inherits(AppLookupControl,ot);var r=_createSuper(AppLookupControl);function AppLookupControl(){return _classCallCheck(this,AppLookupControl),r.apply(this,arguments)}return _createClass(AppLookupControl,[{key:e.symbols.type,value:function value(){return Wt}},{key:"lookupdata",get:function get(){return null!==this.lookup_app&&null!==this.lookup_app.records?this.lookup_app.records:new Map}},{key:"none_key",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonekey}},{key:"none_label",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonelabel}},{key:"search",value:function search(e,t){return null===e||null===t.value?e===t.value:e.search(t)}}]),AppLookupControl}();zt.prototype.type="applookup",zt.prototype.fieldtype=Ue,zt.prototype._ul4onattrs=[].concat(_toConsumableArray(ot.prototype._ul4onattrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]),zt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(ot.prototype._ul4attrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]));var Yt=new(function(e){_inherits(AppLookupSelectControlType,jt);var t=_createSuper(AppLookupSelectControlType);function AppLookupSelectControlType(){return _classCallCheck(this,AppLookupSelectControlType),t.apply(this,arguments)}return _createClass(AppLookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Jt}}]),AppLookupSelectControlType}())("la","AppLookupSelectControl","A LivingApps applookup field (type 'applookup/select')"),Jt=function(t){_inherits(AppLookupSelectControl,zt);var r=_createSuper(AppLookupSelectControl);function AppLookupSelectControl(){return _classCallCheck(this,AppLookupSelectControl),r.apply(this,arguments)}return _createClass(AppLookupSelectControl,[{key:e.symbols.type,value:function value(){return Yt}}]),AppLookupSelectControl}();Jt.prototype.subtype="select",Jt.prototype.fieldtype=Ve,Jt.prototype._cssclass_control="select";var Kt=new(function(e){_inherits(AppLookupRadioControlType,jt);var t=_createSuper(AppLookupRadioControlType);function AppLookupRadioControlType(){return _classCallCheck(this,AppLookupRadioControlType),t.apply(this,arguments)}return _createClass(AppLookupRadioControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof $t}}]),AppLookupRadioControlType}())("la","AppLookupRadioControl","A LivingApps applookup field (type 'applookup/radio')"),$t=function(t){_inherits(AppLookupRadioControl,zt);var r=_createSuper(AppLookupRadioControl);function AppLookupRadioControl(){return _classCallCheck(this,AppLookupRadioControl),r.apply(this,arguments)}return _createClass(AppLookupRadioControl,[{key:e.symbols.type,value:function value(){return Kt}}]),AppLookupRadioControl}();$t.prototype.subtype="radio",$t.prototype.fieldtype=Ee;var Zt=new(function(e){_inherits(AppLookupChoiceControlType,jt);var t=_createSuper(AppLookupChoiceControlType);function AppLookupChoiceControlType(){return _classCallCheck(this,AppLookupChoiceControlType),t.apply(this,arguments)}return _createClass(AppLookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Qt}}]),AppLookupChoiceControlType}())("la","AppLookupChoiceControl","A LivingApps applookup field (type 'applookup/choice')"),Qt=function(t){_inherits(AppLookupChoiceControl,zt);var r=_createSuper(AppLookupChoiceControl);function AppLookupChoiceControl(){return _classCallCheck(this,AppLookupChoiceControl),r.apply(this,arguments)}return _createClass(AppLookupChoiceControl,[{key:e.symbols.type,value:function value(){return Zt}},{key:"search_url",get:function get(){return"field_"+this.identifier+"_search"}},{key:"search_param_name",get:function get(){return"q"}},{key:"target_param_name",get:function get(){return"target"}}]),AppLookupChoiceControl}();Qt.prototype.subtype="choice",Qt.prototype.fieldtype=We,Qt.prototype._cssclass_control="select",Qt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(zt.prototype._ul4attrs),["search_url","search_param_name","target_param_name"]));var Xt=function(e){_inherits(MultipleLookupControlType,Ot);var t=_createSuper(MultipleLookupControlType);function MultipleLookupControlType(){return _classCallCheck(this,MultipleLookupControlType),t.apply(this,arguments)}return _createClass(MultipleLookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof tr}}]),MultipleLookupControlType}(),er=new Xt("la","MultipleLookupControl","A LivingApps multiple applookup field (type 'multipleapplookup')"),tr=function(t){_inherits(MultipleLookupControl,Bt);var r=_createSuper(MultipleLookupControl);function MultipleLookupControl(){return _classCallCheck(this,MultipleLookupControl),r.apply(this,arguments)}return _createClass(MultipleLookupControl,[{key:e.symbols.type,value:function value(){return er}},{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;var t=this.lookupdata.get(e);return void 0!==t?[t]:[]}},{key:"search",value:function search(e,t){if("equals"===t.operator){var r,o=_createForOfIteratorHelper(e);try{for(o.s();!(r=o.n()).done;){if(r.value.key===t.value)return!0}}catch(e){o.e(e)}finally{o.f()}return!1}return!1}}]),MultipleLookupControl}();tr.prototype.type="multiplelookup",tr.prototype.fieldtype=we;var rr=new(function(e){_inherits(MultipleLookupCheckboxControlType,Xt);var t=_createSuper(MultipleLookupCheckboxControlType);function MultipleLookupCheckboxControlType(){return _classCallCheck(this,MultipleLookupCheckboxControlType),t.apply(this,arguments)}return _createClass(MultipleLookupCheckboxControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof or}}]),MultipleLookupCheckboxControlType}())("la","MultipleLookupCheckboxControl","A LivingApps multiplelookup field (type 'multiplelookup/checkbox')"),or=function(t){_inherits(MultipleLookupCheckboxControl,tr);var r=_createSuper(MultipleLookupCheckboxControl);function MultipleLookupCheckboxControl(){return _classCallCheck(this,MultipleLookupCheckboxControl),r.apply(this,arguments)}return _createClass(MultipleLookupCheckboxControl,[{key:e.symbols.type,value:function value(){return rr}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}}]),MultipleLookupCheckboxControl}();or.prototype.subtype="checkbox",or.prototype.fieldtype=Me,or.prototype._cssclass_root="llft-element";var nr=new(function(e){_inherits(MultipleLookupSelectControlType,Xt);var t=_createSuper(MultipleLookupSelectControlType);function MultipleLookupSelectControlType(){return _classCallCheck(this,MultipleLookupSelectControlType),t.apply(this,arguments)}return _createClass(MultipleLookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof lr}}]),MultipleLookupSelectControlType}())("la","MultipleLookupSelectControl","A LivingApps multiplelookup field (type 'multiplelookup/select')"),lr=function(t){_inherits(MultipleLookupSelectControl,tr);var r=_createSuper(MultipleLookupSelectControl);function MultipleLookupSelectControl(){return _classCallCheck(this,MultipleLookupSelectControl),r.apply(this,arguments)}return _createClass(MultipleLookupSelectControl,[{key:e.symbols.type,value:function value(){return nr}}]),MultipleLookupSelectControl}();lr.prototype.subtype="select",lr.prototype.fieldtype=Ie,lr.prototype._cssclass_control="select";var ar=new(function(e){_inherits(MultipleLookupChoiceControlType,Xt);var t=_createSuper(MultipleLookupChoiceControlType);function MultipleLookupChoiceControlType(){return _classCallCheck(this,MultipleLookupChoiceControlType),t.apply(this,arguments)}return _createClass(MultipleLookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ir}}]),MultipleLookupChoiceControlType}())("la","MultipleLookupChoiceControl","A LivingApps multiplelookup field (type 'multiplelookup/choice')"),ir=function(t){_inherits(MultipleLookupChoiceControl,tr);var r=_createSuper(MultipleLookupChoiceControl);function MultipleLookupChoiceControl(){return _classCallCheck(this,MultipleLookupChoiceControl),r.apply(this,arguments)}return _createClass(MultipleLookupChoiceControl,[{key:e.symbols.type,value:function value(){return ar}}]),MultipleLookupChoiceControl}();ir.prototype.subtype="choice",ir.prototype.fieldtype=Re,ir.prototype._cssclass_control="select";var ur=function(e){_inherits(MultipleAppLookupControlType,jt);var t=_createSuper(MultipleAppLookupControlType);function MultipleAppLookupControlType(){return _classCallCheck(this,MultipleAppLookupControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof pr}}]),MultipleAppLookupControlType}(),sr=new ur("la","MultipleAppLookupControl","A LivingApps multiple applookup field (type 'multipleapplookup')"),pr=function(t){_inherits(MultipleAppLookupControl,zt);var r=_createSuper(MultipleAppLookupControl);function MultipleAppLookupControl(){return _classCallCheck(this,MultipleAppLookupControl),r.apply(this,arguments)}return _createClass(MultipleAppLookupControl,[{key:e.symbols.type,value:function value(){return sr}},{key:"search",value:function search(e,t){if("equals"===t.operator){if(null===t.value)return 0===e.length;var r,o=_createForOfIteratorHelper(e);try{for(o.s();!(r=o.n()).done;){if(r.value.search(t.value))return!0}}catch(e){o.e(e)}finally{o.f()}return!1}return!1}}]),MultipleAppLookupControl}();pr.prototype.type="multipleapplookup",pr.prototype.fieldtype=Je;var cr=new(function(e){_inherits(MultipleAppLookupSelectControlType,ur);var t=_createSuper(MultipleAppLookupSelectControlType);function MultipleAppLookupSelectControlType(){return _classCallCheck(this,MultipleAppLookupSelectControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof _r}}]),MultipleAppLookupSelectControlType}())("la","MultipleAppLookupSelectControl","A LivingApps multiple applookup field (type 'multipleapplookup/select')"),_r=function(t){_inherits(MultipleAppLookupSelectControl,pr);var r=_createSuper(MultipleAppLookupSelectControl);function MultipleAppLookupSelectControl(){return _classCallCheck(this,MultipleAppLookupSelectControl),r.apply(this,arguments)}return _createClass(MultipleAppLookupSelectControl,[{key:e.symbols.type,value:function value(){return cr}}]),MultipleAppLookupSelectControl}();_r.prototype.subtype="select",_r.prototype.fieldtype=Qe,_r.prototype._cssclass_control="select";var hr=new(function(e){_inherits(MultipleAppLookupCheckboxControlType,ur);var t=_createSuper(MultipleAppLookupCheckboxControlType);function MultipleAppLookupCheckboxControlType(){return _classCallCheck(this,MultipleAppLookupCheckboxControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof yr}}]),MultipleAppLookupCheckboxControlType}())("la","MultipleAppLookupCheckboxControl","A LivingApps multiple applookup field (type 'multipleapplookup/checkbox')"),yr=function(t){_inherits(MultipleAppLookupCheckboxControl,pr);var r=_createSuper(MultipleAppLookupCheckboxControl);function MultipleAppLookupCheckboxControl(){return _classCallCheck(this,MultipleAppLookupCheckboxControl),r.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxControl,[{key:e.symbols.type,value:function value(){return hr}}]),MultipleAppLookupCheckboxControl}();yr.prototype.subtype="checkbox",yr.prototype.fieldtype=$e;var dr=new(function(e){_inherits(MultipleAppLookupChoiceControlType,ur);var t=_createSuper(MultipleAppLookupChoiceControlType);function MultipleAppLookupChoiceControlType(){return _classCallCheck(this,MultipleAppLookupChoiceControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof fr}}]),MultipleAppLookupChoiceControlType}())("la","MultipleAppLookupChoiceControl","A LivingApps multiple applookup field (type 'multipleapplookup/choice')"),fr=function(t){_inherits(MultipleAppLookupChoiceControl,pr);var r=_createSuper(MultipleAppLookupChoiceControl);function MultipleAppLookupChoiceControl(){return _classCallCheck(this,MultipleAppLookupChoiceControl),r.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceControl,[{key:e.symbols.type,value:function value(){return dr}}]),MultipleAppLookupChoiceControl}();fr.prototype.subtype="choice",fr.prototype.fieldtype=et,fr.prototype._cssclass_control="select";var vr=new(function(e){_inherits(GeoControlType,tt);var t=_createSuper(GeoControlType);function GeoControlType(){return _classCallCheck(this,GeoControlType),t.apply(this,arguments)}return _createClass(GeoControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof kr}}]),GeoControlType}())("la","GeoControl","A LivingApps geo field (type 'geo')"),kr=function(t){_inherits(GeoControl,ot);var r=_createSuper(GeoControl);function GeoControl(){return _classCallCheck(this,GeoControl),r.apply(this,arguments)}return _createClass(GeoControl,[{key:e.symbols.type,value:function value(){return vr}}]),GeoControl}();kr.prototype.type="geo",kr.prototype.fieldtype=Z,kr.prototype._cssclass_root="llft-element";var mr=function(e){_inherits(FileControlType,tt);var t=_createSuper(FileControlType);function FileControlType(){return _classCallCheck(this,FileControlType),t.apply(this,arguments)}return _createClass(FileControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof gr}}]),FileControlType}(),Cr=new mr("la","FileControl","A LivingApps upload field (type 'file')"),gr=function(t){_inherits(FileControl,ot);var r=_createSuper(FileControl);function FileControl(){return _classCallCheck(this,FileControl),r.apply(this,arguments)}return _createClass(FileControl,[{key:e.symbols.type,value:function value(){return Cr}}]),FileControl}();gr.prototype.type="file",gr.prototype.fieldtype=ee,gr.prototype._cssclass_root="llft-element";var br=new(function(e){_inherits(FileSignatureControlType,mr);var t=_createSuper(FileSignatureControlType);function FileSignatureControlType(){return _classCallCheck(this,FileSignatureControlType),t.apply(this,arguments)}return _createClass(FileSignatureControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Tr}}]),FileSignatureControlType}())("la","FileSignatureControl","A LivingApps signature image field (type 'file/signature')"),Tr=function(t){_inherits(FileSignatureControl,gr);var r=_createSuper(FileSignatureControl);function FileSignatureControl(){return _classCallCheck(this,FileSignatureControl),r.apply(this,arguments)}return _createClass(FileSignatureControl,[{key:e.symbols.type,value:function value(){return br}}]),FileSignatureControl}();Tr.prototype.subtype="signature",Tr.prototype.fieldtype=re;var Lr=new(function(e){_inherits(ButtonControlType,tt);var t=_createSuper(ButtonControlType);function ButtonControlType(){return _classCallCheck(this,ButtonControlType),t.apply(this,arguments)}return _createClass(ButtonControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ar}}]),ButtonControlType}())("la","ButtonControl","A submit button"),Ar=function(t){_inherits(ButtonControl,ot);var r=_createSuper(ButtonControl);function ButtonControl(){return _classCallCheck(this,ButtonControl),r.apply(this,arguments)}return _createClass(ButtonControl,[{key:e.symbols.type,value:function value(){return Lr}}]),ButtonControl}();Ar.prototype.type="button";var Fr=new(function(t){_inherits(LookupItemType,e.Type);var r=_createSuper(LookupItemType);function LookupItemType(){return _classCallCheck(this,LookupItemType),r.apply(this,arguments)}return _createClass(LookupItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof wr}}]),LookupItemType}())("la","LookupItem","An option in a lookup control/field"),wr=function(t){_inherits(LookupItem,r);var o=_createSuper(LookupItem);function LookupItem(){return _classCallCheck(this,LookupItem),o.apply(this,arguments)}return _createClass(LookupItem,[{key:e.symbols.type,value:function value(){return Fr}},{key:"label",get:function get(){if(null===this.control)return this._label;var e=this._view_lookupitem();if(null===e)return this._label;var t=e.label;return null===t?this._label:t}},{key:"visible",get:function get(){if(null===this.control)return!0;var e=this._view_lookupitem();return null===e||e.visible}},{key:"_view_lookupitem",value:function _view_lookupitem(){var e=this.control.identifier,t=this.control.app.active_view;if(null!==t&&null!==t.controls){var r=t.controls.get(e);if(void 0!==r&&void 0!==r.lookupdata&&null!==r.lookupdata){var o=r.lookupdata.get(this.key);if(void 0!==o)return o}}return null}},{key:e.symbols.repr,value:function value(){var t="<LookupItem key="+e._repr(this.key)+" label="+e._repr(this.label);return this.visible||(t+="visible=False"),t+">"}}]),LookupItem}();wr.prototype._ul4onattrs=["control","key","_label"],wr.prototype._ul4attrs=new Set(["id","control","key","label"]);var Sr=new(function(t){_inherits(ViewLookupItemType,e.Type);var r=_createSuper(ViewLookupItemType);function ViewLookupItemType(){return _classCallCheck(this,ViewLookupItemType),r.apply(this,arguments)}return _createClass(ViewLookupItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Mr}}]),ViewLookupItemType}())("la","ViewLookupItem","View specific information about a lookup item"),Mr=function(t){_inherits(ViewLookupItem,r);var o=_createSuper(ViewLookupItem);function ViewLookupItem(){return _classCallCheck(this,ViewLookupItem),o.apply(this,arguments)}return _createClass(ViewLookupItem,[{key:e.symbols.type,value:function value(){return Sr}},{key:e.symbols.repr,value:function value(){var t="<ViewLookupItem key="+e._repr(this.key)+" label="+e._repr(this.label);return this.visible||(t+=" visible=False"),t+">"}}]),ViewLookupItem}();Mr.prototype._ul4onattrs=["key","label","visible"],Mr.prototype._ul4attrs=new Set(["key","label","visible"]);var xr=function(t){_inherits(LayoutControlType,e.Type);var r=_createSuper(LayoutControlType);function LayoutControlType(){return _classCallCheck(this,LayoutControlType),r.apply(this,arguments)}return _createClass(LayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Hr}}]),LayoutControlType}(),Ir=new xr("la","LayoutControl","A decoration in an input form"),Hr=function(t){_inherits(LayoutControl,r);var o=_createSuper(LayoutControl);function LayoutControl(){return _classCallCheck(this,LayoutControl),o.apply(this,arguments)}return _createClass(LayoutControl,[{key:"LayoutControl",value:function LayoutControl(){this.label=null,this.identifier=null,this.view=null,this.top=null,this.left=null,this.width=null,this.height=null,this._visible=!0}},{key:e.symbols.type,value:function value(){return Ir}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"globals",get:function get(){return this.view.globals}},{key:"_sel_root",get:function get(){return"#livingapps-form .llft-element.llft-id-"+this.identifier}},{key:"_dom_root",get:function get(){return document.querySelector(this._sel_root)}},{key:"visible",get:function get(){var e;return null===(e=this._visible)||void 0===e||e}},{key:"visible",set:function set(e){this.globals._in_form()&&(this._dom_root.hidden=!e),this._visible=e}},{key:e.symbols.setattr,value:function value(t,r){"visible"===t?this.visible=e._bool(r):_get(_getPrototypeOf(LayoutControl.prototype),e.symbols.setattr,this).call(this,t,r)}}]),LayoutControl}();Hr.prototype._ul4onattrs=["label","identifier","view","top","left","width","height"],Hr.prototype._ul4attrs=new Set(["id","label","identifier","view","top","left","width","height","visible"]);var Rr=new(function(e){_inherits(HTMLLayoutControlType,xr);var t=_createSuper(HTMLLayoutControlType);function HTMLLayoutControlType(){return _classCallCheck(this,HTMLLayoutControlType),t.apply(this,arguments)}return _createClass(HTMLLayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Dr}}]),HTMLLayoutControlType}())("la","HTMLLayoutControl","HTML decoration in an input form"),Dr=function(t){_inherits(HTMLLayoutControl,Hr);var r=_createSuper(HTMLLayoutControl);function HTMLLayoutControl(){return _classCallCheck(this,HTMLLayoutControl),r.apply(this,arguments)}return _createClass(HTMLLayoutControl,[{key:e.symbols.type,value:function value(){return Rr}},{key:"value",get:function get(){return this._value}},{key:"value",set:function set(e){this._value=e,this.globals._in_form()&&this._set_dom_value(this._value)}},{key:"_set_dom_value",value:function _set_dom_value(e){this._dom_root.innerHTML=e}},{key:e.symbols.setattr,value:function value(t,r){"value"===t?this.value=r:_get(_getPrototypeOf(HTMLLayoutControl.prototype),e.symbols.setattr,this).call(this,t,r)}}]),HTMLLayoutControl}();Dr.prototype._ul4onattrs=[].concat(_toConsumableArray(Hr.prototype._ul4onattrs),["_value","_visible"]),Dr.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Hr.prototype._ul4attrs),["value"]));var Or=new(function(e){_inherits(ImageLayoutControlType,xr);var t=_createSuper(ImageLayoutControlType);function ImageLayoutControlType(){return _classCallCheck(this,ImageLayoutControlType),t.apply(this,arguments)}return _createClass(ImageLayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Pr}}]),ImageLayoutControlType}())("la","ImageLayoutControl","An image decoration in an input form"),Pr=function(t){_inherits(ImageLayoutControl,Hr);var r=_createSuper(ImageLayoutControl);function ImageLayoutControl(){return _classCallCheck(this,ImageLayoutControl),r.apply(this,arguments)}return _createClass(ImageLayoutControl,[{key:e.symbols.type,value:function value(){return Or}},{key:"image",get:function get(){return this._image}},{key:"image",set:function set(e){this._image=e,this.globals._in_form()&&this._set_dom_value(this._image)}},{key:"original",get:function get(){return this.image}},{key:"original",set:function set(e){this.image=image}},{key:"_set_dom_value",value:function _set_dom_value(e){var t=this._dom_root.querySelector("img");if(null!==t){var r=null===e?"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==":this.globals.scaled_url(e,this.width,this.height);t.setAttribute("src",r)}}},{key:e.symbols.setattr,value:function value(t,r){"original"===t?this.original=r:"image"===t?this.image=r:_get(_getPrototypeOf(ImageLayoutControl.prototype),e.symbols.setattr,this).call(this,t,r)}}]),ImageLayoutControl}();Pr.prototype._ul4onattrs=[].concat(_toConsumableArray(Hr.prototype._ul4onattrs),["_image","_visible"]),Pr.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Hr.prototype._ul4attrs),["image","original"]));var Br=new(function(e){_inherits(ButtonLayoutControlType,xr);var t=_createSuper(ButtonLayoutControlType);function ButtonLayoutControlType(){return _classCallCheck(this,ButtonLayoutControlType),t.apply(this,arguments)}return _createClass(ButtonLayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Nr}}]),ButtonLayoutControlType}())("la","ButtonLayoutControl","A submit button in an input form"),Nr=function(t){_inherits(ButtonLayoutControl,Hr);var r=_createSuper(ButtonLayoutControl);function ButtonLayoutControl(){return _classCallCheck(this,ButtonLayoutControl),r.apply(this,arguments)}return _createClass(ButtonLayoutControl,[{key:e.symbols.type,value:function value(){return Br}}]),ButtonLayoutControl}();Nr.prototype._ul4onattrs=[].concat(_toConsumableArray(Hr.prototype._ul4onattrs),["original","scaled","_visible"]);var Ur=new(function(t){_inherits(ViewControlType,e.Type);var r=_createSuper(ViewControlType);function ViewControlType(){return _classCallCheck(this,ViewControlType),r.apply(this,arguments)}return _createClass(ViewControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof qr}}]),ViewControlType}())("la","ViewControl","Contains view specific information about a control"),qr=function(t){_inherits(ViewControl,r);var o=_createSuper(ViewControl);function ViewControl(){return _classCallCheck(this,ViewControl),o.apply(this,arguments)}return _createClass(ViewControl,[{key:e.symbols.type,value:function value(){return Ur}},{key:"mode",get:function get(){return this._mode?"display":"edit"}}]),ViewControl}();qr.prototype._ul4onattrs=["view","control","top","left","width","height","z_index","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","_mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"],qr.prototype._ul4attrs=new Set(["id","view","control","top","left","width","height","z_index","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"]);var Vr=function(t){_inherits(UserType,e.Type);var r=_createSuper(UserType);function UserType(){return _classCallCheck(this,UserType),r.apply(this,arguments)}return _createClass(UserType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Er}}]),UserType}(),Gr=new Vr("la","User","A LivingApps user/account"),Er=function(t){_inherits(User,r);var o=_createSuper(User);function User(){return _classCallCheck(this,User),o.apply(this,arguments)}return _createClass(User,[{key:e.symbols.type,value:function value(){return Gr}},{key:e.symbols.repr,value:function value(){return"<User id="+e._repr(this.id)+" firstname="+e._repr(this.firstname)+" surname="+e._repr(this.surname)+" email="+e._repr(this.email)+">"}}]),User}();Er.prototype._ul4onattrs=["_id","gender","title","firstname","surname","initials","email","streetname","streetnumber","zip","city","phone","fax","lang","image","summary","interests","personalwebsite","companywebsite","company","position","department","keyviews","globals"],Er.prototype._ul4attrs=new Set(["id","globals","_id","gender","title","firstname","surname","initials","email","streetname","streetnumber","zip","city","phone","fax","lang","image","summary","interests","personalwebsite","companywebsite","company","position","department","keyviews"]);var jr=new(function(t){_inherits(FileType,e.Type);var r=_createSuper(FileType);function FileType(){return _classCallCheck(this,FileType),r.apply(this,arguments)}return _createClass(FileType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Wr}}]),FileType}())("la","File","An uploaded file"),Wr=function(t){_inherits(File,r);var o=_createSuper(File);function File(){return _classCallCheck(this,File),o.apply(this,arguments)}return _createClass(File,[{key:e.symbols.type,value:function value(){return jr}},{key:e.symbols.repr,value:function value(){return"<File url="+e._repr(this.url)+" filename="+e._repr(this.filename)+">"}},{key:"url",get:function get(){return"https://"+this.globals.hostname+"/files/"+this.contextid+"/"+this.id}},{key:"archive_url",get:function get(){return null===this.archive?this.url:this.archive.url+"/"+this.filename}}]),File}();Wr.prototype._ul4onattrs=["globals","filename","mimetype","width","height","internal_id","createdat","size","duration","geo","recordedat","storagefilename","archive","context_id"],Wr.prototype._ul4attrs=new Set(["globals","id","internal_id","url","archive_url","filename","mimetype","width","height","size","duration","geo","recordedat","archive","createdat","context_id"]);var zr=new(function(t){_inherits(GeoType,e.Type);var r=_createSuper(GeoType);function GeoType(){return _classCallCheck(this,GeoType),r.apply(this,arguments)}return _createClass(GeoType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Yr}}]),GeoType}())("la","Geo","Geographical coordinates and location information"),Yr=function(t){_inherits(Geo,r);var o=_createSuper(Geo);function Geo(e,t,r){var n,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return _classCallCheck(this,Geo),(n=o.call(this,null)).globals=e,n.lat=t,n.long=r,n.info=l,n}return _createClass(Geo,[{key:e.symbols.type,value:function value(){return zr}},{key:e.symbols.repr,value:function value(){return"<Geo lat="+e._repr(this.lat)+" long="+e._repr(this.long)+" info="+e._repr(this.info)+">"}}]),Geo}();Yr.prototype._ul4onattrs=["globals","lat","long","info"],Yr.prototype._ul4attrs=new Set(["globals","lat","long","info"]);var Jr=function(t){_inherits(AttachmentType,e.Type);var r=_createSuper(AttachmentType);function AttachmentType(){return _classCallCheck(this,AttachmentType),r.apply(this,arguments)}return _createClass(AttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof $r}}]),AttachmentType}(),Kr=new Jr("la","Attachment","An attachment of a record"),$r=function(t){_inherits(Attachment,r);var o=_createSuper(Attachment);function Attachment(e,t,r,n,l,a){var i;return _classCallCheck(this,Attachment),(i=o.call(this,e)).owner=t,i.label=r,i.namespace=n,i.active=l,i.value=a,i}return _createClass(Attachment,[{key:e.symbols.type,value:function value(){return Kr}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" label="+e._repr(this.label)+">"}},{key:"app",get:function get(){return this.owner instanceof h?this.owner:null}},{key:"appgroup",get:function get(){return this.owner instanceof d?this.owner:null}},{key:"record",get:function get(){return this.owner instanceof L?this.owner:null}}]),Attachment}();$r.prototype._ul4onattrs=["owner","label","namespace","active"],$r.prototype._ul4attrs=new Set(["id","owner","label","namespace","active"]);var Zr=new(function(e){_inherits(NoteAttachmentType,Jr);var t=_createSuper(NoteAttachmentType);function NoteAttachmentType(){return _classCallCheck(this,NoteAttachmentType),t.apply(this,arguments)}return _createClass(NoteAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Qr}}]),NoteAttachmentType}())("la","NoteAttachment","A note attachment of a record"),Qr=function(t){_inherits(NoteAttachment,$r);var r=_createSuper(NoteAttachment);function NoteAttachment(){return _classCallCheck(this,NoteAttachment),r.apply(this,arguments)}return _createClass(NoteAttachment,[{key:e.symbols.type,value:function value(){return Zr}}]),NoteAttachment}();Qr.prototype.type="noteattachment",Qr.prototype._ul4onattrs=[].concat(_toConsumableArray($r.prototype._ul4onattrs),["value"]),Qr.prototype._ul4attrs=new Set([].concat(_toConsumableArray($r.prototype._ul4onattrs),["value"]));var Xr=new(function(e){_inherits(URLAttachmentType,Jr);var t=_createSuper(URLAttachmentType);function URLAttachmentType(){return _classCallCheck(this,URLAttachmentType),t.apply(this,arguments)}return _createClass(URLAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof eo}}]),URLAttachmentType}())("la","URLAttachment","A URL attachment of a record"),eo=function(t){_inherits(URLAttachment,$r);var r=_createSuper(URLAttachment);function URLAttachment(){return _classCallCheck(this,URLAttachment),r.apply(this,arguments)}return _createClass(URLAttachment,[{key:e.symbols.type,value:function value(){return Xr}}]),URLAttachment}();eo.prototype.type="urlattachment",eo.prototype._ul4onattrs=[].concat(_toConsumableArray($r.prototype._ul4onattrs),["value"]),eo.prototype._ul4attrs=new Set([].concat(_toConsumableArray($r.prototype._ul4onattrs),["value"]));var to=new(function(e){_inherits(FileAttachmentType,Jr);var t=_createSuper(FileAttachmentType);function FileAttachmentType(){return _classCallCheck(this,FileAttachmentType),t.apply(this,arguments)}return _createClass(FileAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ro}}]),FileAttachmentType}())("la","FileAttachment","A file attachment of a record"),ro=function(t){_inherits(FileAttachment,$r);var r=_createSuper(FileAttachment);function FileAttachment(){return _classCallCheck(this,FileAttachment),r.apply(this,arguments)}return _createClass(FileAttachment,[{key:e.symbols.type,value:function value(){return to}}]),FileAttachment}();ro.prototype.type="fileattachment",ro.prototype._ul4onattrs=[].concat(_toConsumableArray($r.prototype._ul4onattrs),["value"]),ro.prototype._ul4attrs=new Set([].concat(_toConsumableArray($r.prototype._ul4onattrs),["value"]));var oo=new(function(e){_inherits(JSONAttachmentType,Jr);var t=_createSuper(JSONAttachmentType);function JSONAttachmentType(){return _classCallCheck(this,JSONAttachmentType),t.apply(this,arguments)}return _createClass(JSONAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof no}}]),JSONAttachmentType}())("la","JSONAttachment","A JSON attachment of a record"),no=function(t){_inherits(JSONAttachment,$r);var r=_createSuper(JSONAttachment);function JSONAttachment(){return _classCallCheck(this,JSONAttachment),r.apply(this,arguments)}return _createClass(JSONAttachment,[{key:e.symbols.type,value:function value(){return oo}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(t){return"value"===t?e._asjson(this.value):this[t]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(t,r){"value"===t?this.value=e._fromjson(r):this[t]=r}}]),JSONAttachment}();no.prototype.type="jsonattachment",no.prototype._ul4onattrs=[].concat(_toConsumableArray($r.prototype._ul4onattrs),["value"]),no.prototype._ul4attrs=new Set([].concat(_toConsumableArray($r.prototype._ul4onattrs),["value"]));var lo=new(function(t){_inherits(DataActionType,e.Type);var r=_createSuper(DataActionType);function DataActionType(){return _classCallCheck(this,DataActionType),r.apply(this,arguments)}return _createClass(DataActionType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ao}}]),DataActionType}())("la","DataAction","A data action configured for an app."),ao=function(t){_inherits(DataAction,r);var o=_createSuper(DataAction);function DataAction(){return _classCallCheck(this,DataAction),o.apply(this,arguments)}return _createClass(DataAction,[{key:e.symbols.type,value:function value(){return lo}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataAction}();ao.prototype._ul4onattrs=["app","identifier","label","order","permission","active","icon","description","message","filter","as_multiple_action","as_single_action","as_mail_link","before_record_update_form","after_record_update","after_record_insert","before_record_delete"],ao.prototype._ul4attrs=new Set(["app","id","identifier","label","order","permission","active","icon","description","message","filter","as_multiple_action","as_single_action","as_link","before_record_update_form","after_record_update","after_record_insert","before_record_delete"]);var io=new(function(t){_inherits(InstallationType,e.Type);var r=_createSuper(InstallationType);function InstallationType(){return _classCallCheck(this,InstallationType),r.apply(this,arguments)}return _createClass(InstallationType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof uo}}]),InstallationType}())("la","Installation","The installation that created an app"),uo=function(t){_inherits(Installation,r);var o=_createSuper(Installation);function Installation(){return _classCallCheck(this,Installation),o.apply(this,arguments)}return _createClass(Installation,[{key:e.symbols.type,value:function value(){return io}},{key:e.symbols.repr,value:function value(){return"<Installation id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),Installation}();uo.prototype._ul4onattrs=["name"],uo.prototype._ul4attrs=new Set(["id","name"]);var so=new(function(t){_inherits(CategoryType,e.Type);var r=_createSuper(CategoryType);function CategoryType(){return _classCallCheck(this,CategoryType),r.apply(this,arguments)}return _createClass(CategoryType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof po}}]),CategoryType}())("la","Category","A navigation category"),po=function(t){_inherits(Category,r);var o=_createSuper(Category);function Category(){return _classCallCheck(this,Category),o.apply(this,arguments)}return _createClass(Category,[{key:e.symbols.type,value:function value(){return so}},{key:e.symbols.repr,value:function value(){for(var t=[],r=this;null!==r;)t.splice(0,0,r.identifier),r=r.parent;return"<Category id="+e._repr(this.id)+" identifierpath="+e._repr(t.join("/"))+NaN+e._repr(this.name)+">"}}]),Category}();po.prototype._ul4onattrs=["identifier","name","order","parent","children","apps"],po.prototype._ul4attrs=new Set(["id","identifier","name","order","parent","children","apps"]);var co=new(function(t){_inherits(KeyViewType,e.Type);var r=_createSuper(KeyViewType);function KeyViewType(){return _classCallCheck(this,KeyViewType),r.apply(this,arguments)}return _createClass(KeyViewType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof _o}}]),KeyViewType}())("la","KeyView","Object granting access to a view template"),_o=function(t){_inherits(KeyView,r);var o=_createSuper(KeyView);function KeyView(){return _classCallCheck(this,KeyView),o.apply(this,arguments)}return _createClass(KeyView,[{key:e.symbols.type,value:function value(){return co}},{key:e.symbols.repr,value:function value(){return"<KeyView id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),KeyView}();_o.prototype._ul4onattrs=["identifier","name","key","user"],_o.prototype._ul4attrs=new Set(["id","identifier","name","key","user"]);var ho=function(t){_inherits(AppParameterType,e.Type);var r=_createSuper(AppParameterType);function AppParameterType(){return _classCallCheck(this,AppParameterType),r.apply(this,arguments)}return _createClass(AppParameterType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof fo}}]),AppParameterType}(),yo=new ho("la","AppParameter","A parameter of a LivingApps application"),fo=function(t){_inherits(AppParameter,r);var o=_createSuper(AppParameter);function AppParameter(){return _classCallCheck(this,AppParameter),o.apply(this,arguments)}return _createClass(AppParameter,[{key:e.symbols.type,value:function value(){return yo}},{key:e.symbols.repr,value:function value(){return"<AppParameter id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"app",get:function get(){return this.owner instanceof h?this.owner:null}},{key:"appgroup",get:function get(){return this.owner instanceof d?this.owner:null}},{key:"full_identifier",get:function get(){return null===this.namespace||null===this.identifier?this.identifier:"".concat(this.namespace,".").concat(this.identifier)}}]),AppParameter}();fo.prototype._ul4onattrs=["owner","parent","type","order","identifier","namespace","description","value","createdat","createdby","updatedat","updatedby"],fo.prototype._ul4attrs=new Set(["id","owner","parent","app","type","order","identifier","namespace","full_identifier","description","value","createdat","createdby","updatedat","updatedby"]);var vo=new(function(e){_inherits(MutableAppParameterType,ho);var t=_createSuper(MutableAppParameterType);function MutableAppParameterType(){return _classCallCheck(this,MutableAppParameterType),t.apply(this,arguments)}return _createClass(MutableAppParameterType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ko}}]),MutableAppParameterType}())("la","MutableAppParameter","A mutable parameter of a LivingApps application"),ko=function(t){_inherits(MutableAppParameter,fo);var r=_createSuper(MutableAppParameter);function MutableAppParameter(){return _classCallCheck(this,MutableAppParameter),r.apply(this,arguments)}return _createClass(MutableAppParameter,[{key:e.symbols.type,value:function value(){return vo}},{key:e.symbols.repr,value:function value(){return"<MutableAppParameter id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),MutableAppParameter}(),mo=function(t){_inherits(MenuItemType,e.Type);var r=_createSuper(MenuItemType);function MenuItemType(){return _classCallCheck(this,MenuItemType),r.apply(this,arguments)}return _createClass(MenuItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof go}}]),MenuItemType}(),Co=new mo("la","MenuItem","An additional menu item in an app that links to a target page."),go=function(t){_inherits(MenuItem,r);var o=_createSuper(MenuItem);function MenuItem(){return _classCallCheck(this,MenuItem),o.apply(this,arguments)}return _createClass(MenuItem,[{key:e.symbols.type,value:function value(){return Co}},{key:e.symbols.repr,value:function value(){return"<MenuItem id="+e._repr(this.id)+"identifier="+e._repr(this.identifier)+" label="+e._repr(this.label)+" type="+e._repr(this.type)+">"}}]),MenuItem}();go.prototype._ul4onattrs=["app","identifier","label","type","icon","title","target","cssclass","url","order","start_time","end_time","on_app_overview_page","on_app_detail_page","on_form_page","on_iframe_page","on_view_template","on_custom_overview_page","accessible","children","createdat","createdby","updatedat","updatedby"],go.prototype._ul4attrs=new Set(["id","app","identifier","label","type","icon","title","target","cssclass","url","order","start_time","end_time","on_app_overview_page","on_app_detail_page","on_form_page","on_iframe_page","on_view_template","on_custom_overview_page","accessible","children","createdat","createdby","updatedat","updatedby"]);var bo=new mo("la","Panel","An additional panel in an app that is displayed on various LivingApps pages and links to a target page."),To=function(t){_inherits(Panel,go);var r=_createSuper(Panel);function Panel(){return _classCallCheck(this,Panel),r.apply(this,arguments)}return _createClass(Panel,[{key:e.symbols.type,value:function value(){return bo}},{key:e.symbols.repr,value:function value(){return"<Panel id="+e._repr(this.id)+"identifier="+e._repr(this.identifier)+" label="+e._repr(this.label)+" type="+e._repr(this.type)+">"}}]),Panel}();To.prototype._ul4onattrs=[].concat(_toConsumableArray(go.prototype._ul4onattrs),["description","description_url","image","row","column","width","height","header_type","header_background","text_color","background_color1","background_color2"]),To.prototype._ul4attrs=new Set([].concat(_toConsumableArray(go.prototype._ul4attrs),["description","description_url","image","row","column","width","height"]));var Lo=new Vr("la","ViewTemplateInfo","basic information about a view template"),Ao=function(t){_inherits(ViewTemplateInfo,r);var o=_createSuper(ViewTemplateInfo);function ViewTemplateInfo(){return _classCallCheck(this,ViewTemplateInfo),o.apply(this,arguments)}return _createClass(ViewTemplateInfo,[{key:e.symbols.type,value:function value(){return Lo}},{key:e.symbols.repr,value:function value(){return"<ViewTemplateInfo id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+" name="+e._repr(this.name)+">"}}]),ViewTemplateInfo}();Ao.prototype._ul4onattrs=["app","identifier","name","icon","type","mimetype","permission_level"],Ao.prototype._ul4attrs=new Set(["app","id","identifier","name","icon","type","mimetype","permission_level"]);var Fo=new(function(t){_inherits(FormType,e.Type);var r=_createSuper(FormType);function FormType(){return _classCallCheck(this,FormType),r.apply(this,arguments)}return _createClass(FormType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof wo}}]),FormType}())("la","Form","The input form."),wo=function(t){_inherits(Form,e.Proto);var r=_createSuper(Form);function Form(e,t){var o;_classCallCheck(this,Form),(o=r.call(this)).globals=e,o.template=t,o._geo_wired=!1;var n,l=_createForOfIteratorHelper(e.record.fields.values());try{for(l.s();!(n=l.n()).done;){var a=n.value;o.wire_field(a)}}catch(e){l.e(e)}finally{l.f()}return o.render_template(null),o}return _createClass(Form,[{key:e.symbols.type,value:function value(){return Fo}},{key:"_dom_button",get:function get(){return document.querySelector(this._sel_form+" "+this._sel_button)}},{key:"enabled",get:function get(){return!this._dom_button.disabled}},{key:"enabled",set:function set(e){this._dom_button.disabled=!e}},{key:e.symbols.getattr,value:function value(t){if("enabled"===t)return this.enabled;throw new e.AttributeError(this,t)}},{key:e.symbols.setattr,value:function value(t,r){if("enabled"!==t)throw new e.AttributeError(this,t);this.enabled=e._bool(r)}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" enabled="+e._repr(this.enabled)+">"}},{key:"toString",value:function toString(){return this[e.symbols.repr]()}},{key:"render_template",value:function render_template(t){var r=this,o={datasources:this.globals.datasources,record:this.globals.record,app:this.globals.app,fields:this.globals.record.fields,identifier:t},n={globals:this.globals,form:this,la:Io},l="LivingApps update template: ";l+=null===t?"Initialization":"Value change in "+e._repr(t),this.globals.group_logging(l,(function(){try{r.template.renders(o,n)}catch(t){console&&console.error&&(r.globals._start_log_message(),console.group&&console.group("UL4 stacktrace"),e.report_exc(t),console.groupEnd&&console.groupEnd(),console.groupCollapsed&&console.groupCollapsed("Javascript stacktrace"),console.error(t),console.groupEnd&&console.groupEnd())}}))}},{key:"wire_geo",value:function wire_geo(){var e=this;if(!this._geo_wired){if(null!==this.globals.app.active_view&&navigator.geolocation){var t=this.globals.app.active_view.use_geo;"once"!==t&&"watch"!==t||navigator.geolocation.getCurrentPosition((function(t){e.globals.mode=e.globals.mode.substring(0,e.globals.mode.lastIndexOf("/")+1)+"geo",e.globals.set_current_geo(t),e.render_template(null)})),"watch"===t&&navigator.geolocation.watchPosition((function(t){e.globals.mode=e.globals.mode.substring(0,e.globals.mode.lastIndexOf("/")+1)+"geo",e.globals.set_current_geo(t),e.render_template(null)}))}this._geo_wired=!0}}},{key:"wire_field",value:function wire_field(e){var t,r=this,o=_createForOfIteratorHelper(e._dom_controls);try{for(o.s();!(t=o.n()).done;){t.value.addEventListener(e._inputevent,(function(t){r.wire_geo(),r.globals.mode=r.globals.mode.substring(0,r.globals.mode.lastIndexOf("/")+1)+"input",r.render_template(e.control.identifier)}))}}catch(e){o.e(e)}finally{o.f()}}}]),Form}();wo.prototype._ul4attrs=new Set(["enabled"]),wo.prototype._sel_form="#livingapps-form form",wo.prototype._sel_button="[type=submit]";for(var So=0,Mo=[l,i,h,d,v,go,To,m,C,b,L,lt,it,st,yt,kt,Ct,bt,Lt,Mt,Ht,Dt,Bt,Ut,Vt,Et,zt,Jt,$t,Qt,tr,lr,or,ir,pr,_r,yr,fr,kr,gr,Tr,Ar,S,x,B,V,E,W,Y,K,H,D,Z,ee,re,le,ie,se,ce,de,ke,we,Pe,Ue,Je,wr,Mr,Hr,Dr,Pr,Nr,qr,Er,Wr,Yr,Qr,eo,ro,no,ao,uo,po,_o,fo,ko,Ao];So<Mo.length;So++){var xo=Mo[So];e.register("de.livinglogic.livingapi."+xo.name.toLowerCase(),xo)}var Io=new e.Module("la","LivingAPI types",{FlashMessage:i,File:Wr,Geo:Yr,User:Er,KeyView:_o,Globals:l,App:h,AppGroup:d,TextControl:yt,URLControl:Ct,EmailControl:kt,PasswordControl:ft,TelControl:bt,TextAreaControl:Lt,HTMLControl:Ft,IntControl:it,NumberControl:st,DateControl:Mt,DatetimeMinuteControl:Ht,DatetimeSecondControl:Dt,BoolControl:lt,LookupSelectControl:Ut,LookupRadioControl:Vt,LookupChoiceControl:Et,AppLookupSelectControl:Jt,AppLookupRadioControl:$t,AppLookupChoiceControl:Qt,MultipleLookupSelectControl:lr,MultipleLookupCheckboxControl:or,MultipleLookupChoiceControl:ir,MultipleAppLookupSelectControl:_r,MultipleAppLookupCheckboxControl:yr,MultipleAppLookupChoiceControl:fr,FileControl:gr,FileSignatureControl:Tr,GeoControl:kr,ViewControl:qr,RecordChildren:b,Record:L,FileAttachment:ro,URLAttachment:eo,NoteAttachment:Qr,JSONAttachment:no,DataAction:ao,Installation:uo,HTMLLayoutControl:Dr,ImageLayoutControl:Pr,ButtonLayoutControl:Nr,View:v,DataSource:m,DataSourceChildren:C,LookupItem:wr,ViewLookupItem:Mr,Category:po,AppParameter:fo,MutableAppParameter:ko,MenuItem:go,Panel:To,ViewTemplateInfo:Ao});export{h as App,d as AppGroup,Qt as AppLookupChoiceControl,We as AppLookupChoiceField,zt as AppLookupControl,Ue as AppLookupField,Pe as AppLookupFieldBase,$t as AppLookupRadioControl,Ee as AppLookupRadioField,Jt as AppLookupSelectControl,Ve as AppLookupSelectField,fo as AppParameter,$r as Attachment,r as Base,lt as BoolControl,x as BoolField,Ar as ButtonControl,Nr as ButtonLayoutControl,po as Category,_e as ChoiceFieldBase,ot as Control,ao as DataAction,m as DataSource,C as DataSourceChildren,Mt as DateControl,ie as DateField,le as DateFieldBase,Ht as DatetimeMinuteControl,se as DatetimeMinuteField,Dt as DatetimeSecondControl,ce as DatetimeSecondField,kt as EmailControl,V as EmailField,S as Field,Wr as File,ro as FileAttachment,gr as FileControl,ee as FileField,Tr as FileSignatureControl,re as FileSignatureField,i as FlashMessage,wo as Form,Yr as Geo,kr as GeoControl,Z as GeoField,l as Globals,Ft as HTMLControl,K as HTMLField,Dr as HTMLLayoutControl,o as Handler,Pr as ImageLayoutControl,uo as Installation,it as IntControl,H as IntField,no as JSONAttachment,_o as KeyView,Hr as LayoutControl,Et as LookupChoiceControl,Le as LookupChoiceField,Bt as LookupControl,ke as LookupField,de as LookupFieldBase,wr as LookupItem,Vt as LookupRadioControl,Ce as LookupRadioField,Ut as LookupSelectControl,be as LookupSelectField,go as MenuItem,yr as MultipleAppLookupCheckboxControl,$e as MultipleAppLookupCheckboxField,fr as MultipleAppLookupChoiceControl,et as MultipleAppLookupChoiceField,pr as MultipleAppLookupControl,Je as MultipleAppLookupField,_r as MultipleAppLookupSelectControl,Qe as MultipleAppLookupSelectField,or as MultipleLookupCheckboxControl,Me as MultipleLookupCheckboxField,ir as MultipleLookupChoiceControl,Re as MultipleLookupChoiceField,tr as MultipleLookupControl,we as MultipleLookupField,lr as MultipleLookupSelectControl,Ie as MultipleLookupSelectField,ko as MutableAppParameter,Qr as NoteAttachment,st as NumberControl,D as NumberField,To as Panel,ft as PasswordControl,U as PasswordField,s as Permission,L as Record,b as RecordChildren,_t as StringControl,B as StringField,bt as TelControl,W as TelField,Lt as TextAreaControl,Y as TextAreaField,yt as TextControl,eo as URLAttachment,Ct as URLControl,E as URLField,Er as User,v as View,qr as ViewControl,Mr as ViewLookupItem,Ao as ViewTemplateInfo,element,Io as module,url_with_params,t as version};
2
2
  //# sourceMappingURL=livingapi.js.map