@livinglogic/livingapi 0.15.0 → 0.16.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.
- package/CHANGELOG.md +11 -0
- package/dist/esm-node/livingapi.js +1 -1
- package/dist/esm-node/livingapi.js.map +1 -1
- package/dist/esm-static/livingapi.js +1 -1
- package/dist/esm-static/livingapi.js.map +1 -1
- package/dist/umd/livingapi.js +1 -1
- package/dist/umd/livingapi.js.map +1 -1
- package/package.json +1 -1
- package/src/livingapi.js +62 -10
package/dist/umd/livingapi.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@livinglogic/ul4")):"function"==typeof define&&define.amd?define(["exports","@livinglogic/ul4"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).la={},e.ul4)}(this,(function(e,t){"use strict";function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(o){if("default"!==o){var l=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,l.get?l:{enumerable:!0,get:function(){return e[o]}})}})),t.default=e,Object.freeze(t)}var o=_interopNamespace(t);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 o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function _createClass(e,t,o){return t&&_defineProperties(e.prototype,t),o&&_defineProperties(e,o),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 o,l=_getPrototypeOf(e);if(t){var r=_getPrototypeOf(this).constructor;o=Reflect.construct(l,arguments,r)}else o=l.apply(this,arguments);return _possibleConstructorReturn(this,o)}}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(e,t,o){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function _get(e,t,o){var l=_superPropBase(e,t);if(l){var r=Object.getOwnPropertyDescriptor(l,t);return r.get?r.get.call(o):r.value}})(e,t,o||e)}function set(e,t,o,l){return(set="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function set(e,t,o,l){var r,n=_superPropBase(e,t);if(n){if((r=Object.getOwnPropertyDescriptor(n,t)).set)return r.set.call(l,o),!0;if(!r.writable)return!1}if(r=Object.getOwnPropertyDescriptor(l,t)){if(!r.writable)return!1;r.value=o,Object.defineProperty(l,t,r)}else!function _defineProperty(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}(l,t,o);return!0})(e,t,o,l)}function _set(e,t,o,l,r){if(!set(e,t,o,l||e)&&r)throw new Error("failed to set property");return o}function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==o)return;var l,r,n=[],a=!0,i=!1;try{for(o=o.call(e);!(a=(l=o.next()).done)&&(n.push(l.value),!t||n.length!==t);a=!0);}catch(e){i=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(i)throw r}}return n}(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 o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,l=new Array(t);o<t;o++)l[o]=e[o];return l}function _createForOfIteratorHelper(e,t){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){o&&(e=o);var l=0,F=function(){};return{s:F,n:function(){return l>=e.length?{done:!0}:{done:!1,value:e[l++]}},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 r,n=!0,a=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return n=e.done,e},e:function(e){a=!0,r=e},f:function(){try{n||null==o.return||o.return()}finally{if(a)throw r}}}}function element(e){for(var t=document.createElement(e),l=arguments.length,r=new Array(l>1?l-1:0),n=1;n<l;n++)r[n-1]=arguments[n];for(var a=0,i=r;a<i.length;a++){var u=i[a];"string"==typeof u&&t.appendChild(document.createTextNode(u));var s=u instanceof Map,p=o._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&&t.setAttribute(y,d)}}catch(e){_.e(e)}finally{_.f()}}}return t}function _append_param_to_url(e,t,l){if(o._islist(l)){var r,n=_createForOfIteratorHelper(l);try{for(n.s();!(r=n.n()).done;){_append_param_to_url(e,t,r.value)}}catch(e){n.e(e)}finally{n.f()}}else"string"==typeof l?e.append(t,l):null!==l&&e.append(t,o._str(l))}function url_with_params(e){for(var t=new URLSearchParams,l=arguments.length,r=new Array(l>1?l-1:0),n=1;n<l;n++)r[n-1]=arguments[n];for(var a=0,i=r;a<i.length;a++){var u=i[a];if(o._islist(u)&&2==u.length)_append_param_to_url.apply(void 0,[t].concat(_toConsumableArray(u)));else if("[object Object]"!==Object.prototype.toString.call(u)||u instanceof o.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(t,_,h)}}catch(e){p.e(e)}finally{p.f()}}}else for(var y in u)_append_param_to_url(t,y,u[y])}return(t=t.toString().replace("+","%20")).length>0&&(e+="?"+t),e}var l=function(e){_inherits(Base,e);var t=_createSuper(Base);function Base(e){var o;return _classCallCheck(this,Base),(o=t.call(this)).id=e,o}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,o=e.loadcontent();;++t){var l=o.next();if(l.done)break;t<this._ul4onattrs.length&&this._loadUL4ONAttr(this._ul4onattrs[t],l.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:o.symbols.getattr,value:function value(e){if(this._ul4attrs.has(e)){var value=this[e];if("function"==typeof value){var t=value.bind(this);return t._ul4_name=value._ul4_name||value.name,t._ul4_signature=value._ul4_signature,t._ul4_needsobject=value._ul4_needsobject,t._ul4_needscontext=value._ul4_needscontext,t}return value}if(e.startsWith("x_"))return this.hasOwnProperty(e)?this[e]:null;throw new o.AttributeError(this,e)}},{key:o.symbols.setattr,value:function value(e,t){if(!e.startsWith("x_"))throw new o.AttributeError(this,e);this[e]=t}},{key:o.symbols.repr,value:function value(){return"<"+this.constructor.name+">"}},{key:"toString",value:function toString(){return this[o.symbols.repr]()}}]),Base}(o.Proto),r=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(e){_inherits(GlobalsType,e);var t=_createSuper(GlobalsType);function GlobalsType(){return _classCallCheck(this,GlobalsType),t.apply(this,arguments)}return _createClass(GlobalsType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof a}}]),GlobalsType}(o.Type))("la","Globals","Global information"),a=function(e){_inherits(Globals,e);var t=_createSuper(Globals);function Globals(e){var o;return _classCallCheck(this,Globals),(o=t.call(this,e)).version=null,o.hostname=null,o.platform=null,o.user=null,o.lang=null,o.datasources=null,o.app=null,o.record=null,o.mode=null,o.maxdbactions=null,o.maxtemplateruntime=null,o.flashmessages=null,o.view_template_id=null,o.email_template_id=null,o.handler=new r,o._log_stack=[],o._current_geo=null,o}return _createClass(Globals,[{key:o.symbols.type,value:function value(){return n}},{key:"geo_dist",value:function geo_dist(e,t){var o=function sqsin(e){return(e=Math.sin(e))*e},l=function sqsos(e){return(e=Math.cos(e))*e},r=Math.PI/180,n=1/298.257223563,a=e.lat*r,i=e.long*r,u=t.lat*r,s=(a+u)/2,p=(a-u)/2,c=(i-t.long*r)/2,_=o(p)*l(c)+l(s)*o(c),h=l(p)*l(c)+o(s)*o(c),y=Math.atan(Math.sqrt(_/h)),d=2*y*6378.137,f=Math.sqrt(_*h)/y,k=(3*f+1)/(2*_);return d*(1+n*((3*f-1)/(2*h))*o(s)*l(p)-n*k*l(s)*o(p))}},{key:"scaled_url",value:function scaled_url(e,t,o){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"fill",r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=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 Vo&&(e="https://"+this.hostname+e.archive_url,(_=encodeURIComponent(e.filename))!=e.filename&&(_=null));var h="";return h+=c?"/imgproxycache/insecure":"/imgproxy/insecure","fit"!==l&&(h+="/rt:"+l),null!=t&&(h+="/w:"+t),null!=o&&(h+="/h:"+o),r&&(h+="/el:1"),null!=n&&(h+="/g:"+n),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:o.symbols.repr,value:function value(){return"<Globals version="+o._repr(this.version)+" mode="+o._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 Go(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(e){return e.map((function(e){return"string"!=typeof e?o._repr(e):e})).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 o=e.value;o.output||(console&&console.group&&console.group(o.header),o.output=!0)}}catch(e){t.e(e)}finally{t.f()}}},{key:"log_debug",value:function log_debug(){this._start_log_message();for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];console&&console.debug&&console.debug(this._make_log_message(t))}},{key:"log_info",value:function log_info(){this._start_log_message();for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];console&&console.info&&console.info(this._make_log_message(t))}},{key:"log_warning",value:function log_warning(){this._start_log_message();for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];console&&console.warn&&console.warn(this._make_log_message(t))}},{key:"log_error",value:function log_error(){this._start_log_message();for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];console&&console.error&&console.error(this._make_log_message(t))}}]),Globals}(l);a.prototype._ul4onattrs=["version","platform","user","maxdbactions","maxtemplateruntime","lang","datasources","hostname","app","record","mode","view_template_id","email_template_id","view_id"],a.prototype._ul4attrs=new Set(["version","hostname","platform","user","lang","datasources","app","record","maxdbactions","maxtemplateruntime","flashmessages","mode","scaled_url","geo_dist","current_geo","log_debug","log_info","log_warning","log_error"]),o.expose(a.prototype.log_debug,["message","*"]),o.expose(a.prototype.log_info,["message","*"]),o.expose(a.prototype.log_warning,["message","*"]),o.expose(a.prototype.log_error,["message","*"]),o.expose(a.prototype.geo_dist,["geo1","pk","geo2","pk"]),o.expose(a.prototype.current_geo,[]),o.expose(a.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 i=new(function(e){_inherits(FlashMessageType,e);var t=_createSuper(FlashMessageType);function FlashMessageType(){return _classCallCheck(this,FlashMessageType),t.apply(this,arguments)}return _createClass(FlashMessageType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof u}}]),FlashMessageType}(o.Type))("la","FlashMessage","A flash message in a web page"),u=function(e){_inherits(FlashMessage,e);var t=_createSuper(FlashMessage);function FlashMessage(){return _classCallCheck(this,FlashMessage),t.apply(this,arguments)}return _createClass(FlashMessage,[{key:o.symbols.type,value:function value(){return i}},{key:o.symbols.repr,value:function value(){return"<FlashMessage type="+o._repr(this.type)+" title="+o._repr(this.title)+">"}}]),FlashMessage}(l);u.prototype._ul4onattrs=["timestamp","type","title","message"],u.prototype._ul4attrs=new Set(["timestamp","type","title","message"]);var s=new(function(e){_inherits(AppType,e);var t=_createSuper(AppType);function AppType(){return _classCallCheck(this,AppType),t.apply(this,arguments)}return _createClass(AppType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof p}}]),AppType}(o.Type))("la","App","A LivingApps application"),p=function(e){_inherits(App,e);var t=_createSuper(App);function App(){return _classCallCheck(this,App),t.apply(this,arguments)}return _createClass(App,[{key:o.symbols.type,value:function value(){return s}},{key:o.symbols.repr,value:function value(){return"<App id="+o._repr(this.id)+" name="+o._repr(this.name)+">"}},{key:"insert",value:function insert(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this[o.symbols.call](e);return this.globals.handler.save(this),t}},{key:"template_url",value:function template_url(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2?arguments[2]:void 0,l="/gateway/apps/"+this.id;return null!==t&&(l+="/"+t.id),url_with_params(l,["template",e],o)}},{key:"new_embedded_url",value:function new_embedded_url(e){return url_with_params("/dateneingabe/"+this.id+"/new",e)}},{key:"new_standalone_url",value:function new_standalone_url(e){return url_with_params("/gateway/apps/"+this.id+"/new",e)}},{key:"layout_controls",get:function get(){return null===this.active_view?new Map:this.active_view.layout_controls}},{key:o.symbols.call,value:function value(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new f(null,this);if(o._ismap(e)){var l,r=_createForOfIteratorHelper(e.keys());try{for(r.s();!(l=r.n()).done;){var n=l.value;if(!t.fields.has(n))throw new o.ArgumentError(o._repr(this)+"() get an unexpected keyword argument "+o._repr(n))}}catch(e){r.e(e)}finally{r.f()}t._make_fields(!0,e,null,null)}else{if(!o._isobject(e))throw new o.TypeError("values must be an object or a Map");for(var a in e)if(!t.fields.has(a))throw new o.ArgumentError(o._repr(this)+"() get an unexpected keyword argument "+o._repr(a));t._make_fields(!0,new Map(o._list(o.dicttype.items(e))),null,null)}return t}},{key:o.symbols.getattr,value:function value(e){if(e.startsWith("c_")){if(!this.controls.has(e.substr(2)))throw new o.AttributeError(this,e);return this.controls.get(e.substr(2))}if(e.startsWith("lc_")){if(null===this.layout_controls||!this.layout_controls.has(e.substr(3)))throw new o.AttributeError(this,e);return this.layout_controls.get(e.substr(3))}if(e.startsWith("p_")&&null!==this.params){if(!this.params.has(e.substr(2)))throw new o.AttributeError(this,e);return this.params.get(e.substr(2))}if(e.startsWith("pv_")&&null!==this.params){if(!this.params.has(e.substr(3)))throw new o.AttributeError(this,e);return this.params.get(e.substr(3)).value}return _get(_getPrototypeOf(App.prototype),o.symbols.getattr,this).call(this,e)}},{key:"active_view",get:function get(){return this._active_view}},{key:"active_view",set:function set(e){if(null===e);else if("string"==typeof e){if(null===this.views||!this.views.has(e))throw new o.ValueError("View "+o._repr(e)+" not found!");e=this.views.get(e)}else{if(!(e instanceof _))throw new o.TypeError(o._repr(e)+" is not a view!");if(e.app!==this)throw new o.ValueError("View "+o._repr(e)+" belongs to the wrong app!")}this._active_view=e}},{key:"layout_controls",get:function get(){return null===this.active_views?new Map:this.active_view.layout_controls}}]),App}(l);p.prototype._ul4onattrs=["globals","name","description","lang","startlink","iconlarge","iconsmall","createdby","controls","records","recordcount","installation","categories","params","views","datamanagement_identifier","basetable","primarykey","insertprocedure","updateprocedure","deleteprocedure","templates","createdat","updatedat","updatedby","superid","favorite","_active_view"],p.prototype._ul4attrs=new Set(["id","globals","name","description","lang","startlink","iconlarge","iconsmall","createdat","createdby","updatedat","updatedby","controls","layout_controls","records","recordcount","installation","categories","params","views","datamanagement_identifier","insert","favorite","_active_view","template_url","new_embedded_url","new_standalone_url"]),o.expose(p.prototype[o.symbols.call],["values","**"],{needsobject:!0}),o.expose(p.prototype.insert,["values","**"],{needsobject:!0}),o.expose(p.prototype.template_url,["identifier","p","record","p=",null,"params","**"]),o.expose(p.prototype.new_embedded_url,["params","**"]),o.expose(p.prototype.new_standalone_url,["params","**"]);var c=new(function(e){_inherits(ViewType,e);var t=_createSuper(ViewType);function ViewType(){return _classCallCheck(this,ViewType),t.apply(this,arguments)}return _createClass(ViewType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof _}}]),ViewType}(o.Type))("la","View","An input form for a LivingViews application"),_=function(e){_inherits(View,e);var t=_createSuper(View);function View(){return _classCallCheck(this,View),t.apply(this,arguments)}return _createClass(View,[{key:o.symbols.type,value:function value(){return c}},{key:o.symbols.repr,value:function value(){return"<View id="+o._repr(this.id)+" name="+o._repr(this.name)+">"}}]),View}(l);_.prototype._ul4onattrs=["name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang","login_required","result_page","use_geo"],_.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 h=new(function(e){_inherits(DataSourceType,e);var t=_createSuper(DataSourceType);function DataSourceType(){return _classCallCheck(this,DataSourceType),t.apply(this,arguments)}return _createClass(DataSourceType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof y}}]),DataSourceType}(o.Type))("la","DataSource","The data resulting from a data source configuration"),y=function(e){_inherits(DataSource,e);var t=_createSuper(DataSource);function DataSource(){return _classCallCheck(this,DataSource),t.apply(this,arguments)}return _createClass(DataSource,[{key:o.symbols.type,value:function value(){return h}},{key:o.symbols.repr,value:function value(){return"<DataSource id="+o._repr(this.id)+" identifier="+o._repr(this.identifier)+">"}}]),DataSource}(l);y.prototype._ul4onattrs=["identifier","app","apps"],y.prototype._ul4attrs=new Set(["id","identifier","app","apps"]);var d=new(function(e){_inherits(RecordType,e);var t=_createSuper(RecordType);function RecordType(){return _classCallCheck(this,RecordType),t.apply(this,arguments)}return _createClass(RecordType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof f}}]),RecordType}(o.Type))("la","Record","A record of a LivingApp application"),f=function(e){_inherits(Record,e);var t=_createSuper(Record);function Record(e,o){var l;return _classCallCheck(this,Record),(l=t.call(this,e)).app=o,l.createdat=null,l.createdby=null,l.updatedat=null,l.updatedby=null,l.updatecount=0,l._sparsevalues=new Map,l._values=null,l._fields=null,l.children=new Map,l.attachments=null,l.errors=[],l._sparsefielderrors=null,l._sparsefieldlookupdata=null,l._is_deleted=!1,l._is_new=!0,l}return _createClass(Record,[{key:o.symbols.type,value:function value(){return d}},{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 o,l=[],r=_createForOfIteratorHelper(t||this.app.controls);try{for(r.s();!(o=r.n()).done;){var n=_slicedToArray(o.value,2),a=n[0],i=n[1];if(null!==t||i.priority){var u=this.fields.get(a).value_as_text(e-1);null!==u&&l.push([i.label,u])}}}catch(e){r.e(e)}finally{r.f()}if(0===l.length)return this.globals.msg_no_fields();if(1===l.length)return l[0][1];for(var s=[],p=0,c=l;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,o,l){var r,n=new Map,a=_createForOfIteratorHelper(this.app.controls.values());try{for(a.s();!(r=a.n()).done;){var i=r.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);n.set(u,p),null!==o&&o.has(u)&&(p.errors=o.get(u)),null!==l&&l.has(u)&&(p.lookupdata=l.get(u))}}catch(e){a.e(e)}finally{a.f()}this._fields=n,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:o.symbols.repr,value:function value(){var e,t=["<Record id=",o._repr(this.id)],l=_createForOfIteratorHelper(this.fields.values());try{for(l.s();!(e=l.n()).done;){var r=e.value;r.control.priority&&!r.is_empty()&&(t.push(" v_"),t.push(r.control.identifier),t.push("="),t.push(o._repr(r.value)))}}catch(e){l.e(e)}finally{l.f()}return t.push(" state="),t.push(o._repr(this.state)),t.push(">"),t.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 o=e.value;this._values.set(o.control.identifier,o.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:"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 e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o._ismap(e)){var t,l=_createForOfIteratorHelper(e.entries());try{for(l.s();!(t=l.n()).done;){var r=_slicedToArray(t.value,2),n=r[0],a=r[1];if(!this.fields.has(n))throw new o.ArgumentError("update() get an unexpected keyword argument "+o._repr(n));fields.get(n).value=a}}catch(e){l.e(e)}finally{l.f()}}else{if(!o._isobject(e))throw new o.TypeError("values must be an object or a Map");for(var i in e){if(!this.fields.has(i))throw new o.ArgumentError("update() get an unexpected keyword argument "+o._repr(i));record.fields.get(i).value=e[i]}}this.app.globals.handler.save(this)}},{key:"template_url",value:function template_url(e,t){return url_with_params("/gateway/apps/"+this.app.id+"/"+this.id,["template",e],t)}},{key:"edit_embedded_url",value:function edit_embedded_url(e){return url_with_params("/dateneingabe/"+this.app.id+"/"+this.id+"/edit",e)}},{key:"edit_standalone_url",value:function edit_standalone_url(e){return url_with_params("/gateway/apps/"+this.app.id+"/"+this.id+"/edit",e)}},{key:"search",value:function search(e){for(var t in e){var l=e[t];if(o._bool(l)&&!this.fields.get(t).search(l))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:o.symbols.getattr,value:function value(e){return e.startsWith("c_")?this.children.get(e.substr(2)):e.startsWith("f_")?this.fields.get(e.substr(2)):e.startsWith("v_")?this.fields.get(e.substr(2)).value:_get(_getPrototypeOf(Record.prototype),o.symbols.getattr,this).call(this,e)}},{key:o.symbols.setattr,value:function value(e,t){if(e.startsWith("c_"))this.children[e.substr(2)]=t;else{if(!e.startsWith("v_"))return _get(_getPrototypeOf(Record.prototype),o.symbols.setattr,this).call(this,e,t);this.fields.get(e.substr(2)).value=t}}}]),Record}(l);f.prototype._ul4onattrs=["app","createdat","createdby","updatedat","updatedby","updatecount","_sparsevalues","attachments","children","errors","_sparsefielderrors","_sparsefieldlookupdata"],f.prototype._ul4attrs=new Set(["id","app","createdat","createdby","updatedat","updatedby","updatecount","values","fields","attachments","children","errors","template_url","edit_embedded_url","edit_standalone_url"]),o.expose(f.prototype.is_dirty,[]),o.expose(f.prototype.has_errors,[]),o.expose(f.prototype.delete,[]),o.expose(f.prototype.save,[]),o.expose(f.prototype.update,["values","**"],{needsobject:!0}),o.expose(f.prototype.template_url,["identifier","p","params","**"]),o.expose(f.prototype.edit_embedded_url,["params","**"]),o.expose(f.prototype.edit_standalone_url,["params","**"]);var k=function(e){_inherits(FieldType,e);var t=_createSuper(FieldType);function FieldType(){return _classCallCheck(this,FieldType),t.apply(this,arguments)}return _createClass(FieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof C}}]),FieldType}(o.Type),v=new k("la","Field","Holds the value of a field of a record (and related information)"),C=function(e){_inherits(Field,e);var t=_createSuper(Field);function Field(e,o,l){var r;return _classCallCheck(this,Field),(r=t.call(this,null)).control=e,r.record=o,r._label=null,r._lookupdata=null,r.errors=[],r._value=null,r._in_form()||(r.value=l),r._dirty=!1,r._enabled=!0,r._writable=!0,r._visible=!0,r}return _createClass(Field,[{key:o.symbols.type,value:function value(){return v}},{key:"value",get:function get(){return this._in_form()?this._get_dom_value():this._value}},{key:"value",set:function set(e){var t=this._value,l={value:e,errors:[]};this._validate(l),o._ne(t,l.value)&&(null!==this.record._values&&this.record._values.set(this.control.identifier,l.value),this._value=l.value,this._dirty=!0),this.errors=l.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:"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:"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:"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(e){return'"'.concat(this.label,"\" doesn't support the type ").concat(o._type(e).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(e){return"The option ".concat(o._repr(e),' for "').concat(this.label,"\" doesn't belong to this lookup!")}},{key:"msg_lookup_unknownkey",value:function msg_lookup_unknownkey(e){return"The option ".concat(o._repr(e),' for "').concat(this.label,'" is unknown!')}},{key:"msg_applookup_wrongrecord",value:function msg_applookup_wrongrecord(e){return"The record ".concat(o._repr(e),' for "').concat(this.label,"\" doesn't belong to the correct app!")}},{key:"msg_applookup_unknownkey",value:function msg_applookup_unknownkey(e){return"The record ".concat(o._repr(e),' 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:"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,o=!e,l=_createForOfIteratorHelper(this._dom_controls);try{for(l.s();!(t=l.n()).done;){t.value.disabled=o}}catch(e){l.e(e)}finally{l.f()}this._dom_root.classList.toggle("llft-control-readonly",o)}this._enabled=e}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){this._writable=e}},{key:o.symbols.repr,value:function value(){var e="<"+this.constructor.name+" identifier=";return e+=o._repr(this.control.identifier),this._dirty&&(e+=" is_dirty()=True"),this.errors.length>0&&(e+=" has_errors()=True"),e+=">"}},{key:o.symbols.setattr,value:function value(e,t){if("value"===e)this.value=t;else if("visible"===e)this.visible=o._bool(t);else if("enabled"===e)this.enabled=o._bool(t);else{if("writable"!==e)return _get(_getPrototypeOf(Field.prototype),o.symbols.getattr,this).call(this,e);this.writable=o._bool(t)}}}]),Field}(l);C.prototype._ul4onattrs=["control","record","label","value","errors","_visible","_enabled","_writable"],C.prototype._ul4attrs=new Set(["control","record","label","value","errors","visible","enabled","writable"]),C.prototype._inputevent="input";var m=new(function(e){_inherits(BoolFieldType,e);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 g}}]),BoolFieldType}(k))("la","BoolField","Holds the value of a bool field of a record (and related information)"),g=function(e){_inherits(BoolField,e);var t=_createSuper(BoolField);function BoolField(){return _classCallCheck(this,BoolField),t.apply(this,arguments)}return _createClass(BoolField,[{key:o.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)):"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}(C),b=new(function(e){_inherits(IntFieldType,e);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 T}}]),IntFieldType}(k))("la","IntField","Holds the value of an int field of a record (and related information)"),T=function(e){_inherits(IntField,e);var t=_createSuper(IntField);function IntField(){return _classCallCheck(this,IntField),t.apply(this,arguments)}return _createClass(IntField,[{key:o.symbols.type,value:function value(){return b}},{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,o=!e,l=_createForOfIteratorHelper(this._dom_controls);try{for(l.s();!(t=l.n()).done;){t.value.readOnly=o}}catch(e){l.e(e)}finally{l.f()}}_set(_getPrototypeOf(IntField.prototype),"writable",e,this,!0)}}]),IntField}(C),L=new(function(e){_inherits(NumberFieldType,e);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 A}}]),NumberFieldType}(k))("la","NumberField","Holds the value of a number field of a record (and related information)"),A=function(e){_inherits(NumberField,e);var t=_createSuper(NumberField);function NumberField(){return _classCallCheck(this,NumberField),t.apply(this,arguments)}return _createClass(NumberField,[{key:o.symbols.type,value:function value(){return L}},{key:"_parse",value:function _parse(e){if(null===e)return null;for(var t=e,o="",l=0,r=0,n=0;n<e.length;++n){var a=e[n];","==a?(l++,o+=a):"."==a&&(r++,o+=a)}var i=null;if(0==l)r<=1||(i="de");else if(1==l)i=1==r?".,"==o?"de":"en":"de";else{if(!(r<=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(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._parse(e.value);null!==t?(t=this._bound_value(t),null!==this.control.precision&&(t=o._round(t,this.control.precision)),e.value=t):e.errors.push(this.msg_number_format(e.value))}else if("number"==typeof e.value){var l=this._bound_value(e.value);null!==this.control.precision&&(l=o._round(l,this.control.precision)),e.value=l}else e.errors.push(this.msg_field_wrong_type(e.value)),e.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 e=_get(_getPrototypeOf(NumberField.prototype),"_get_dom_value",this).call(this);if(e){if("string"==typeof e){var t=this._parse(e);null!==t&&(e=t)}"number"==typeof e&&(null!==this.control.precision&&(e=o._round(e,this.control.precision)),e=this._bound_value(e))}else e=null;return e}},{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,o=!e,l=_createForOfIteratorHelper(this._dom_controls);try{for(l.s();!(t=l.n()).done;){t.value.readOnly=o}}catch(e){l.e(e)}finally{l.f()}}_set(_getPrototypeOf(NumberField.prototype),"writable",e,this,!0)}}]),NumberField}(C),w=function(e){_inherits(StringFieldType,e);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 M}}]),StringFieldType}(k),S=new w("la","StringField","Holds the value of a string field of a record (and related information)"),M=function(e){_inherits(StringField,e);var t=_createSuper(StringField);function StringField(){return _classCallCheck(this,StringField),t.apply(this,arguments)}return _createClass(StringField,[{key:o.symbols.type,value:function value(){return S}},{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,o=this.control.maxlength;null!==t&&e.value.length<t&&e.errors.push(this.msg_string_tooshort(e.value)),null!==o&&e.value.length>o&&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,o=!e,l=_createForOfIteratorHelper(this._dom_controls);try{for(l.s();!(t=l.n()).done;){t.value.readOnly=o}}catch(e){l.e(e)}finally{l.f()}}_set(_getPrototypeOf(StringField.prototype),"writable",e,this,!0)}},{key:"value_as_text",value:function value_as_text(){return this.value}}]),StringField}(C),x=new(function(e){_inherits(PasswordFieldType,e);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 I}}]),PasswordFieldType}(w))("la","PasswordField","Holds the value of a string/password field of a record (and related information)"),I=function(e){_inherits(PasswordField,e);var t=_createSuper(PasswordField);function PasswordField(){return _classCallCheck(this,PasswordField),t.apply(this,arguments)}return _createClass(PasswordField,[{key:o.symbols.type,value:function value(){return x}}]),PasswordField}(M),H=new(function(e){_inherits(EmailFieldType,e);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 O}}]),EmailFieldType}(w))("la","EmailField","Holds the value of a string/email field of a record (and related information)"),O=function(e){_inherits(EmailField,e);var t=_createSuper(EmailField);function EmailField(){return _classCallCheck(this,EmailField),t.apply(this,arguments)}return _createClass(EmailField,[{key:o.symbols.type,value:function value(){return H}},{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}(M),R=new(function(e){_inherits(URLFieldType,e);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 D}}]),URLFieldType}(w))("la","URLField","Holds the value of a string/url field of a record (and related information)"),D=function(e){_inherits(URLField,e);var t=_createSuper(URLField);function URLField(){return _classCallCheck(this,URLField),t.apply(this,arguments)}return _createClass(URLField,[{key:o.symbols.type,value:function value(){return R}},{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}(M),B=new(function(e){_inherits(TelFieldType,e);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 P}}]),TelFieldType}(w))("la","TelField","Holds the value of a string/tel field of a record (and related information)"),P=function(e){_inherits(TelField,e);var t=_createSuper(TelField);function TelField(){return _classCallCheck(this,TelField),t.apply(this,arguments)}return _createClass(TelField,[{key:o.symbols.type,value:function value(){return B}},{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}(M),N=new(function(e){_inherits(TextAreaFieldType,e);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 U}}]),TextAreaFieldType}(w))("la","TextAreaField","Holds the value of a string/textarea field of a record (and related information)"),U=function(e){_inherits(TextAreaField,e);var t=_createSuper(TextAreaField);function TextAreaField(){return _classCallCheck(this,TextAreaField),t.apply(this,arguments)}return _createClass(TextAreaField,[{key:o.symbols.type,value:function value(){return N}}]),TextAreaField}(M),V=new(function(e){_inherits(HTMLFieldType,e);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 E}}]),HTMLFieldType}(w))("la","HTMLField","Holds the value of a string/html field of a record (and related information)"),E=function(e){_inherits(HTMLField,e);var t=_createSuper(HTMLField);function HTMLField(){return _classCallCheck(this,HTMLField),t.apply(this,arguments)}return _createClass(HTMLField,[{key:o.symbols.type,value:function value(){return V}}]),HTMLField}(M),G=new(function(e){_inherits(GeoFieldType,e);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 j}}]),GeoFieldType}(k))("la","GeoField","Holds the value of a geo field of a record (and related information)"),j=function(e){_inherits(GeoField,e);var t=_createSuper(GeoField);function GeoField(){return _classCallCheck(this,GeoField),t.apply(this,arguments)}return _createClass(GeoField,[{key:o.symbols.type,value:function value(){return G}},{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 o=e.value;if(o.id.endsWith("_geoinfo")){var l=o.value;if(l)return l=JSON.parse(l),new Go(l.geometry.coordinates[0],l.geometry.coordinates[1],l.properties.formatted_address)}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(e){if(null===e){var t,l=_createForOfIteratorHelper(this._dom_controls);try{for(l.s();!(t=l.n()).done;){t.value.value=null}}catch(e){l.e(e)}finally{l.f()}}else{var r,n=_createForOfIteratorHelper(this._dom_controls);try{for(n.s();!(r=n.n()).done;){var a=r.value;if(a.id.endsWith("_geoinfo")){var i={type:"Feature",geometry:{coordinates:[e.lat,e.long]},properties:{formatted_address:e.info}};a.value=o._asjson(i)}else a.value=e.info}}catch(e){n.e(e)}finally{n.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 Go||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}}]),GeoField}(C);j.prototype._inputevent="llgeo";var q=function(e){_inherits(FileFieldType,e);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 Y}}]),FileFieldType}(k),W=new q("la","FileField","Holds the value of a file field of a record (and related information)"),Y=function(e){_inherits(FileField,e);var t=_createSuper(FileField);function FileField(){return _classCallCheck(this,FileField),t.apply(this,arguments)}return _createClass(FileField,[{key:o.symbols.type,value:function value(){return W}},{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 Vo||(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}(C),z=new(function(e){_inherits(FileSignatureFieldType,e);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 J}}]),FileSignatureFieldType}(q))("la","FileSignatureField","Holds the value of a file/signature field of a record (and related information)"),J=function(e){_inherits(FileSignatureField,e);var t=_createSuper(FileSignatureField);function FileSignatureField(){return _classCallCheck(this,FileSignatureField),t.apply(this,arguments)}return _createClass(FileSignatureField,[{key:o.symbols.type,value:function value(){return z}},{key:"_validate",value:function _validate(e){_get(_getPrototypeOf(FileSignatureField.prototype),"_validate",this).call(this,e)}}]),FileSignatureField}(Y),K=function(e){_inherits(DateFieldBaseType,e);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 Z}}]),DateFieldBaseType}(k),$=new K("la","DateFieldBase","Holds the value of a date field of a record (and related information)"),Z=function(e){_inherits(DateFieldBase,e);var t=_createSuper(DateFieldBase);function DateFieldBase(){return _classCallCheck(this,DateFieldBase),t.apply(this,arguments)}return _createClass(DateFieldBase,[{key:o.symbols.type,value:function value(){return $}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e?null:"string"==typeof e?e:o._format(e,this.control.formatstring())}},{key:"_parse",value:function _parse(e,t){var o=null,l=null,r=null,n=0,a=0,i=0,u=null;function _int(e,t,o,l){return(e=e.substring(0,t)).length!=t?null:(e=parseInt(e,10),isNaN(e)||e<o||e>l?null:e)}for(;e;){if(!t)return null;if(t.startsWith("%Y")){if(null===(o=_int(e,4)))return null;e=e.substring(4),t=t.substring(2)}else if(t.startsWith("%y")){if(null===(o=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%m")){if(null===(l=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%d")){if(null===(r=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%H")){if(null===(n=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%I")){if(null===(n=_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===o)return null;if(null===l||l<1||l>12)return null;if(null===r||r<1||r>31)return null;if(null===u){if(n<0||n>23)return null}else{if(n<0||n>11)return null;u&&(n+=12)}return a<0||a>59||a<0||a>59||i<0||i>60?null:new Date(o,l-1,r,n,a,i)}},{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(e.value instanceof Date)e.value=this._convert(e.value);else if(e.value instanceof o.Date_)e.value=this._convert(e.value._date);else if("string"==typeof e.value){var t,l=null,r=_createForOfIteratorHelper(this.control.formatstrings_parse());try{for(r.s();!(t=r.n()).done;){var n=t.value;if(null!==(l=this._parse(e.value,n)))break}}catch(e){r.e(e)}finally{r.f()}null!==l?e.value=this._convert(l):e.errors.push(this.msg_date_format(e.value))}else 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(DateFieldBase.prototype),"_get_dom_value",this).call(this);if(!e)return null;var t,o=_createForOfIteratorHelper(this.control.formatstrings_parse());try{for(o.s();!(t=o.n()).done;){var l=t.value,r=this._parse(e,l);if(null!==r)return this._convert(r)}}catch(e){o.e(e)}finally{o.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(e){e=null!==e?o._format(e,this.control.formatstring(),this.globals.lang):"",_get(_getPrototypeOf(DateFieldBase.prototype),"_set_dom_value",this).call(this,e)}}]),DateFieldBase}(C),Q=new(function(e){_inherits(DateFieldType,e);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 X}}]),DateFieldType}(K))("la","DateField","Holds the value of a date/date field of a record (and related information)"),X=function(e){_inherits(DateField,e);var t=_createSuper(DateField);function DateField(){return _classCallCheck(this,DateField),t.apply(this,arguments)}return _createClass(DateField,[{key:o.symbols.type,value:function value(){return Q}},{key:"_convert",value:function _convert(e){return new o.Date_(e.getFullYear(),e.getMonth()+1,e.getDate())}}]),DateField}(Z),ee=new(function(e){_inherits(DatetimeMinuteFieldType,e);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 te}}]),DatetimeMinuteFieldType}(K))("la","DatetimeMinuteField","Holds the value of a date/datetimeminute field of a record (and related information)"),te=function(e){_inherits(DatetimeMinuteField,e);var t=_createSuper(DatetimeMinuteField);function DatetimeMinuteField(){return _classCallCheck(this,DatetimeMinuteField),t.apply(this,arguments)}return _createClass(DatetimeMinuteField,[{key:o.symbols.type,value:function value(){return ee}},{key:"_convert",value:function _convert(e){return e.setSeconds(0),e.setMilliseconds(0),e}}]),DatetimeMinuteField}(Z),oe=new(function(e){_inherits(DatetimeSecondFieldType,e);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 le}}]),DatetimeSecondFieldType}(K))("la","DatetimeSecondField","Holds the value of a date/datetimesecond field of a record (and related information)"),le=function(e){_inherits(DatetimeSecondField,e);var t=_createSuper(DatetimeSecondField);function DatetimeSecondField(){return _classCallCheck(this,DatetimeSecondField),t.apply(this,arguments)}return _createClass(DatetimeSecondField,[{key:o.symbols.type,value:function value(){return oe}},{key:"_convert",value:function _convert(e){return e.setMilliseconds(0),e}}]),DatetimeSecondField}(Z),re=function(e){_inherits(ChoiceFieldBase,e);var t=_createSuper(ChoiceFieldBase);function ChoiceFieldBase(){return _classCallCheck(this,ChoiceFieldBase),t.apply(this,arguments)}return _createClass(ChoiceFieldBase,[{key:"_make_option",value:function _make_option(e,t,o){return element("option",o,{value:t,class:t===this.control.nonekey?"la-none-option":null,selected:e?"selected":null})}},{key:"_set_dom_lookupdata_select",value:function _set_dom_lookupdata_select(e){var t;null===e&&(e=this.control.lookup_data),o._isobject(e)&&(e=new Map(Object.entries(e)));var l,r=!1,n=new Set,a=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option:checked"));try{for(a.s();!(l=a.n()).done;){var i=l.value.getAttribute("value");e.has(i)?n.add(i):i===this.control.nonekey&&(r=!0)}}catch(e){a.e(e)}finally{a.f()}var u=[];null!==this.control.nonekey&&u.push(this._make_option(r,this.control.nonekey,null!==this.control.nonelabel?this.control.nonelabel:this.globals.msg_nothing_selected()));var s,p=_createForOfIteratorHelper(e);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=c[1];u.push(this._make_option(n.has(_),_,this._make_label(h)))}}catch(e){p.e(e)}finally{p.f()}(t=this._dom_control).replaceChildren.apply(t,u)}},{key:"_set_dom_lookupdata_input",value:function _set_dom_lookupdata_input(e){null===e?e=this.control.lookupdata:o._isobject(e)&&(e=new Map(Object.entries(e)));var t,l=!1,r=new Set,n=_createForOfIteratorHelper(this._dom_controls);try{for(n.s();!(t=n.n()).done;){var a=t.value,i=a.getAttribute("value");a.checked&&(e.has(i)?r.add(i):i===this.control.nonekey&&(l=!0))}}catch(e){n.e(e)}finally{n.f()}var u=this._dom_root.querySelector("input[value="+this.control.nonekey+"]");null!==u&&(u.checked=l);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+"]");e.has(_)?(h.style.display="inline",y.style.display="inline",y.innerText=this._make_label(e.get(_))):(h.style.display="none",y.style.display="none",y.checked=!1)}}catch(e){p.e(e)}finally{p.f()}}}]),ChoiceFieldBase}(C),ne=function(e){_inherits(LookupFieldBaseType,e);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 ie}}]),LookupFieldBaseType}(k),ae=new ne("la","LookupFieldBase","Base type of LookupField and MultipleLookupField"),ie=function(e){_inherits(LookupFieldBase,e);var t=_createSuper(LookupFieldBase);function LookupFieldBase(){return _classCallCheck(this,LookupFieldBase),t.apply(this,arguments)}return _createClass(LookupFieldBase,[{key:o.symbols.type,value:function value(){return ae}},{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(e){return"string"==typeof e?e:e instanceof To?e.label:o._str(e)}},{key:"_find_lookupitem",value:function _find_lookupitem(e){var t=e.value;if("string"==typeof t){if(null===this.lookupdata)return;var o=this.control.lookupdata.get(t);if(void 0===o)if(this.control.autoexpandable){var l,r=_createForOfIteratorHelper(this.lookupdata.values());try{for(r.s();!(l=r.n()).done;){var n=l.value;if(t===n.label)return void(e.value=n)}}catch(e){r.e(e)}finally{r.f()}}else e.errors.push(this.msg_lookup_unknownkey(t)),e.value=null;else e.value=o}else if(t instanceof To){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}(re),ue=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 pe}}]),LookupFieldType}(ne),se=new ue("la","LookupField","Holds the value of a lookup field of a record (and related information)"),pe=function(e){_inherits(LookupField,e);var t=_createSuper(LookupField);function LookupField(){return _classCallCheck(this,LookupField),t.apply(this,arguments)}return _createClass(LookupField,[{key:o.symbols.type,value:function value(){return se}},{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.nonekey===t?(this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=null):this._find_lookupitem(e)}}]),LookupField}(ie),ce=new(function(e){_inherits(LookupRadioFieldType,e);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 _e}}]),LookupRadioFieldType}(ue))("la","LookupRadioField","Holds the value of a lookup/radio field of a record (and related information)"),_e=function(e){_inherits(LookupRadioField,e);var t=_createSuper(LookupRadioField);function LookupRadioField(){return _classCallCheck(this,LookupRadioField),t.apply(this,arguments)}return _createClass(LookupRadioField,[{key:o.symbols.type,value:function value(){return ce}},{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 o=e.value;if(o.checked){var l=o.getAttribute("value");return this.control.lookupdata.get(l)}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(e){e instanceof To&&(e=e.key),null===e&&(e=this.control.nonekey);var t,o=_createForOfIteratorHelper(this._dom_controls);try{for(o.s();!(t=o.n()).done;){var l=t.value;l.checked=l.getAttribute("value")===e}}catch(e){o.e(e)}finally{o.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_input(e)}}]),LookupRadioField}(pe),he=new(function(e){_inherits(LookupSelectFieldType,e);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 ye}}]),LookupSelectFieldType}(ue))("la","LookupSelectField","Holds the value of a lookup/select field of a record (and related information)"),ye=function(e){_inherits(LookupSelectField,e);var t=_createSuper(LookupSelectField);function LookupSelectField(){return _classCallCheck(this,LookupSelectField),t.apply(this,arguments)}return _createClass(LookupSelectField,[{key:o.symbols.type,value:function value(){return he}},{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.nonekey?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.nonekey)}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),LookupSelectField}(pe),de=new(function(e){_inherits(LookupChoiceFieldType,e);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 fe}}]),LookupChoiceFieldType}(ue))("la","LookupChoiceField","Holds the value of a lookup/choice field of a record (and related information)"),fe=function(e){_inherits(LookupChoiceField,e);var t=_createSuper(LookupChoiceField);function LookupChoiceField(){return _classCallCheck(this,LookupChoiceField),t.apply(this,arguments)}return _createClass(LookupChoiceField,[{key:o.symbols.type,value:function value(){return de}}]),LookupChoiceField}(pe),ke=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 Ce}}]),MultipleLookupFieldType}(ne),ve=new ke("la","MultipleLookupField","Holds the value of a multiple lookup field of a record (and related information)"),Ce=function(e){_inherits(MultipleLookupField,e);var t=_createSuper(MultipleLookupField);function MultipleLookupField(){return _classCallCheck(this,MultipleLookupField),t.apply(this,arguments)}return _createClass(MultipleLookupField,[{key:o.symbols.type,value:function value(){return ve}},{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,o="[object Array]"===Object.prototype.toString.call(t);if(null===t||""===t||this.control.nonekey===t||o&&0===t.length)this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=[];else if(o){var l,r=[],n=_createForOfIteratorHelper(t);try{for(n.s();!(l=n.n()).done;){var a={value:l.value,errors:[]};this._find_lookupitem(a),a.errors.length>0?e.errors=[].concat(_toConsumableArray(e.errors),_toConsumableArray(a.errors)):r.push(a.value)}}catch(e){n.e(e)}finally{n.f()}e.value=r}else this._find_lookupitem(e),e.errors.length>0?e.value=[]:e.value=[e.value]}}]),MultipleLookupField}(ie),me=new(function(e){_inherits(MultipleLookupCheckboxFieldType,e);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 ge}}]),MultipleLookupCheckboxFieldType}(ke))("la","MultipleLookupCheckboxField","Holds the value of a multiplelookup/radio field of a record (and related information)"),ge=function(e){_inherits(MultipleLookupCheckboxField,e);var t=_createSuper(MultipleLookupCheckboxField);function MultipleLookupCheckboxField(){return _classCallCheck(this,MultipleLookupCheckboxField),t.apply(this,arguments)}return _createClass(MultipleLookupCheckboxField,[{key:o.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=[],o=_createForOfIteratorHelper(this._dom_controls);try{for(o.s();!(e=o.n()).done;){var l=e.value;if(l.checked){var r=l.getAttribute("value");t.push(this.control.lookupdata.get(r))}}}catch(e){o.e(e)}finally{o.f()}return t}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t);var o,l=new Set,r=_createForOfIteratorHelper(t.value);try{for(r.s();!(o=r.n()).done;){var n=o.value;l.add(n.key)}}catch(e){r.e(e)}finally{r.f()}var a,i=_createForOfIteratorHelper(this._dom_controls);try{for(i.s();!(a=i.n()).done;){var u=a.value;u.checked=l.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}(Ce),be=new(function(e){_inherits(MultipleLookupSelectFieldType,e);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 Te}}]),MultipleLookupSelectFieldType}(ke))("la","MultipleLookupSelectField","Holds the value of a multiplelookup/select field of a record (and related information)"),Te=function(e){_inherits(MultipleLookupSelectField,e);var t=_createSuper(MultipleLookupSelectField);function MultipleLookupSelectField(){return _classCallCheck(this,MultipleLookupSelectField),t.apply(this,arguments)}return _createClass(MultipleLookupSelectField,[{key:o.symbols.type,value:function value(){return be}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=[],o=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option"));try{for(o.s();!(e=o.n()).done;){var l=e.value;l.selected&&t.push(this.control.lookupdata.get(l.getAttribute("value")))}}catch(e){o.e(e)}finally{o.f()}return t}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t);var o,l=new Set,r=_createForOfIteratorHelper(t.value);try{for(r.s();!(o=r.n()).done;){var n=o.value;l.add(n.key)}}catch(e){r.e(e)}finally{r.f()}var a,i=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option"));try{for(i.s();!(a=i.n()).done;){var u=a.value;u.selected=l.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}(Ce),Le=new(function(e){_inherits(MultipleLookupChoiceFieldType,e);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 Fe}}]),MultipleLookupChoiceFieldType}(ke))("la","MultipleLookupChoiceField","Holds the value of a multiplelookup/choice field of a record (and related information)"),Fe=function(e){_inherits(MultipleLookupChoiceField,e);var t=_createSuper(MultipleLookupChoiceField);function MultipleLookupChoiceField(){return _classCallCheck(this,MultipleLookupChoiceField),t.apply(this,arguments)}return _createClass(MultipleLookupChoiceField,[{key:o.symbols.type,value:function value(){return Le}}]),MultipleLookupChoiceField}(Ce),Ae=function(e){_inherits(AppLookupFieldBaseType,e);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 Se}}]),AppLookupFieldBaseType}(k),we=new Ae("la","AppLookupFieldBase","Base type of AppLookupField and MultipleAppLookupField"),Se=function(e){_inherits(AppLookupFieldBase,e);var t=_createSuper(AppLookupFieldBase);function AppLookupFieldBase(){return _classCallCheck(this,AppLookupFieldBase),t.apply(this,arguments)}return _createClass(AppLookupFieldBase,[{key:o.symbols.type,value:function value(){return we}},{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(e){return"string"==typeof e?e:e instanceof f?e.as_text(this.control.lookup_controls):o._str(e)}},{key:"_find_record",value:function _find_record(e){var t=e.value;if("string"==typeof t){var o=null!==this.control.lookup_app.records?this.control.lookup_app.records.get(t):void 0;void 0===o?(e.errors.push(this.msg_applookup_unknownkey(t)),e.value=null):e.value=o}else t instanceof f?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:o.symbols.setattr,value:function value(e,t){"lookupdata"===e?this.lookupdata=t:_get(_getPrototypeOf(AppLookupFieldBase.prototype),o.symbols.setattr,this).call(this,e,t)}}]),AppLookupFieldBase}(re);Se.prototype._ul4attrs=new Set([].concat(_toConsumableArray(C.prototype._ul4attrs),["lookupdata"]));var Me=function(e){_inherits(AppLookupFieldType,e);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 Ie}}]),AppLookupFieldType}(Ae),xe=new Me("la","AppLookupField","Holds the value of a applookup field of a record (and related information)"),Ie=function(e){_inherits(AppLookupField,e);var t=_createSuper(AppLookupField);function AppLookupField(){return _classCallCheck(this,AppLookupField),t.apply(this,arguments)}return _createClass(AppLookupField,[{key:o.symbols.type,value:function value(){return xe}},{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}(Se),He=new(function(e){_inherits(AppLookupSelectFieldType,e);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 Oe}}]),AppLookupSelectFieldType}(Me))("la","AppLookupSelectField","Holds the value of a `applookup`/`select` field of a record (and related information)"),Oe=function(e){_inherits(AppLookupSelectField,e);var t=_createSuper(AppLookupSelectField);function AppLookupSelectField(){return _classCallCheck(this,AppLookupSelectField),t.apply(this,arguments)}return _createClass(AppLookupSelectField,[{key:o.symbols.type,value:function value(){return He}},{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.nonekey)}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),AppLookupSelectField}(Ie),Re=new(function(e){_inherits(AppLookupRadioFieldType,e);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 De}}]),AppLookupRadioFieldType}(Me))("la","AppLookupRadioField","Holds the value of a `applookup`/`radio` field of a record (and related information)"),De=function(e){_inherits(AppLookupRadioField,e);var t=_createSuper(AppLookupRadioField);function AppLookupRadioField(){return _classCallCheck(this,AppLookupRadioField),t.apply(this,arguments)}return _createClass(AppLookupRadioField,[{key:o.symbols.type,value:function value(){return Re}}]),AppLookupRadioField}(Ie),Be=new(function(e){_inherits(AppLookupChoiceFieldType,e);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 Pe}}]),AppLookupChoiceFieldType}(Me))("la","AppLookupChoiceField","Holds the value of a `applookup`/`choice` field of a record (and related information)"),Pe=function(e){_inherits(AppLookupChoiceField,e);var t=_createSuper(AppLookupChoiceField);function AppLookupChoiceField(){return _classCallCheck(this,AppLookupChoiceField),t.apply(this,arguments)}return _createClass(AppLookupChoiceField,[{key:o.symbols.type,value:function value(){return Be}}]),AppLookupChoiceField}(Ie),Ne=function(e){_inherits(MultipleAppLookupFieldType,e);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 Ve}}]),MultipleAppLookupFieldType}(Ae),Ue=new Ne("la","MultipleAppLookupField","Holds the value of a multiple applookup field of a record (and related information)"),Ve=function(e){_inherits(MultipleAppLookupField,e);var t=_createSuper(MultipleAppLookupField);function MultipleAppLookupField(){return _classCallCheck(this,MultipleAppLookupField),t.apply(this,arguments)}return _createClass(MultipleAppLookupField,[{key:o.symbols.type,value:function value(){return Ue}},{key:"is_empty",value:function is_empty(){return 0===this._value.length}},{key:"_validate",value:function _validate(e){var t=e.value,o="[object Array]"===Object.prototype.toString.call(t);if(null===t||""===t||this.control.nonekey===t||o&&0===t.length)this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=[];else if(o){var l,r=[],n=_createForOfIteratorHelper(t);try{for(n.s();!(l=n.n()).done;){var a={value:l.value,errors:[]};this._find_record(a),a.errors.length>0?e.errors=[].concat(_toConsumableArray(e.errors),_toConsumableArray(a.errors)):r.push(a.value)}}catch(e){n.e(e)}finally{n.f()}e.value=r}else this._find_record(e),e.errors.length>0?e.value=[]:e.value=[e.value]}}]),MultipleAppLookupField}(Se),Ee=new(function(e){_inherits(MultipleAppLookupCheckboxFieldType,e);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 Ge}}]),MultipleAppLookupCheckboxFieldType}(Ne))("la","MultipleAppLookupCheckboxField","Holds the value of a `multipleapplookup`/`checkbox` field of a record (and related information)"),Ge=function(e){_inherits(MultipleAppLookupCheckboxField,e);var t=_createSuper(MultipleAppLookupCheckboxField);function MultipleAppLookupCheckboxField(){return _classCallCheck(this,MultipleAppLookupCheckboxField),t.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxField,[{key:o.symbols.type,value:function value(){return Ee}}]),MultipleAppLookupCheckboxField}(Ve),je=new(function(e){_inherits(MultipleAppLookupSelectFieldType,e);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}(Ne))("la","MultipleAppLookupSelectField","Holds the value of a `multipleapplookup`/`select` field of a record (and related information)"),qe=function(e){_inherits(MultipleAppLookupSelectField,e);var t=_createSuper(MultipleAppLookupSelectField);function MultipleAppLookupSelectField(){return _classCallCheck(this,MultipleAppLookupSelectField),t.apply(this,arguments)}return _createClass(MultipleAppLookupSelectField,[{key:o.symbols.type,value:function value(){return je}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),MultipleAppLookupSelectField}(Ve),We=new(function(e){_inherits(MultipleAppLookupChoiceFieldType,e);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 Ye}}]),MultipleAppLookupChoiceFieldType}(Ne))("la","MultipleAppLookupChoiceField","Holds the value of a `multipleapplookup`/`choice` field of a record (and related information)"),Ye=function(e){_inherits(MultipleAppLookupChoiceField,e);var t=_createSuper(MultipleAppLookupChoiceField);function MultipleAppLookupChoiceField(){return _classCallCheck(this,MultipleAppLookupChoiceField),t.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceField,[{key:o.symbols.type,value:function value(){return We}}]),MultipleAppLookupChoiceField}(Ve),ze=function(e){_inherits(ControlType,e);var t=_createSuper(ControlType);function ControlType(){return _classCallCheck(this,ControlType),t.apply(this,arguments)}return _createClass(ControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ke}}]),ControlType}(o.Type),Je=new ze("la","Control","Metainformation about a field in a LivingApps application"),Ke=function(e){_inherits(Control,e);var t=_createSuper(Control);function Control(){return _classCallCheck(this,Control),t.apply(this,arguments)}return _createClass(Control,[{key:o.symbols.type,value:function value(){return Je}},{key:o.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+o._repr(this.id)+" identifier="+o._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:"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:"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=this._view_control();return null!==e&&e.required}},{key:"mode",get:function get(){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:"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}(l);Ke.prototype.type=null,Ke.prototype.subtype=null,Ke.prototype._ul4onattrs=["identifier","fieldname","app","_label","priority","order","ininsertprocedure","inupdateprocedure"],Ke.prototype._ul4attrs=new Set(["id","identifier","fieldname","app","priority","order","ininsertprocedure","inupdateprocedure","fulltype","label","top","left","width","height","liveupdate","tabindex","required","mode","labelpos","autoalign","in_active_view"]),Ke.prototype._cssclass_root="llft-control",Ke.prototype._cssclass_control="input";var $e=new(function(e){_inherits(BoolControlType,e);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 Ze}}]),BoolControlType}(ze))("la","BoolControl","A LivingApps boolean field (type 'bool')"),Ze=function(e){_inherits(BoolControl,e);var t=_createSuper(BoolControl);function BoolControl(){return _classCallCheck(this,BoolControl),t.apply(this,arguments)}return _createClass(BoolControl,[{key:o.symbols.type,value:function value(){return $e}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator&&t.value===e}}]),BoolControl}(Ke);Ze.prototype.type="bool",Ze.prototype.fieldtype=g;var Qe=new(function(e){_inherits(IntControlType,e);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 Xe}}]),IntControlType}(ze))("la","IntControl","A LivingApps integer field (type 'int')"),Xe=function(e){_inherits(IntControl,e);var t=_createSuper(IntControl);function IntControl(){return _classCallCheck(this,IntControl),t.apply(this,arguments)}return _createClass(IntControl,[{key:o.symbols.type,value:function value(){return Qe}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator&&t.value===e}}]),IntControl}(Ke);Xe.prototype.type="int",Xe.prototype.fieldtype=T;var et=function(e){_inherits(PlaceholderControlType,e);var t=_createSuper(PlaceholderControlType);function PlaceholderControlType(){return _classCallCheck(this,PlaceholderControlType),t.apply(this,arguments)}return _createClass(PlaceholderControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof PlaceholderControld}}]),PlaceholderControlType}(ze),tt=new et("la","PlaceholderControl","A LivingApps field that has a placeholder"),ot=function(e){_inherits(PlaceholderControl,e);var t=_createSuper(PlaceholderControl);function PlaceholderControl(){return _classCallCheck(this,PlaceholderControl),t.apply(this,arguments)}return _createClass(PlaceholderControl,[{key:o.symbols.type,value:function value(){return tt}},{key:"placeholder",get:function get(){var e=this._view_control();return null===e?null:e.placeholder}}]),PlaceholderControl}(Ke);ot.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ke.prototype._ul4attrs),["placeholder"]));var lt=new(function(e){_inherits(NumberControlType,e);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 rt}}]),NumberControlType}(et))("la","NumberControl","A LivingApps number field (type 'number')"),rt=function(e){_inherits(NumberControl,e);var t=_createSuper(NumberControl);function NumberControl(){return _classCallCheck(this,NumberControl),t.apply(this,arguments)}return _createClass(NumberControl,[{key:o.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:"range"===t.operator&&(null!==e&&((null===t.minvalue||t.minvalue<=e)&&(null===t.maxvalue||e<t.maxvalue)))}}]),NumberControl}(ot);rt.prototype.type="number",rt.prototype.fieldtype=A,rt.prototype._ul4onattrs=[].concat(_toConsumableArray(Ke.prototype._ul4onattrs),["precision","minimum","maximum"]),rt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ke.prototype._ul4attrs),["precision","minimum","maximum"]));var nt=function(e){_inherits(StringControlType,e);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 it}}]),StringControlType}(et),at=new nt("la","StringControl","A LivingApps number field (type 'string')"),it=function(e){_inherits(StringControl,e);var t=_createSuper(StringControl);function StringControl(){return _classCallCheck(this,StringControl),t.apply(this,arguments)}return _createClass(StringControl,[{key:o.symbols.type,value:function value(){return at}},{key:"_user_placeholder",value:function _user_placeholder(e,t){if(null===t)return null;switch(t){case"{gender}":return null!==e?e.gender:null;case"{title}":return null!==e?e.title:null;case"{firstname}":return null!==e?e.firstname:null;case"{surname}":return null!==e?e.surname:null;case"{account}":return null!==e?e.email:null;case"{streetname}":return null!==e?e.streetname:null;case"{streetnumber}":return null!==e?e.streetnumber:null;case"{street}":return null===e?null:null===e.street?e.streetnumber:null===e.streetnumber?e.street:e.street+" "+e.streetnumber;case"{zip}":return null!==e?e.zip:null;case"{phone}":return null!==e?e.phone:null;case"{fax}":return null!==e?e.fax:null;case"{company}":return null!==e?e.company:null;case"{city}":return null!==e?e.city:null;case"{summary}":return null!==e?e.summary:null;case"{interests}":return null!==e?e.interests:null;case"{personal_website}":return null!==e?e.personal_website:null;case"{company_website}":return null!==e?e.company_website:null;case"{position}":return null!==e?e.position:null;case"{department}":return null!==e?e.department:null;case"{today}":return o.today();default:return t}}},{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}(ot);it.prototype.type="string";var ut=new(function(e){_inherits(TextControlType,e);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 st}}]),TextControlType}(nt))("la","TextControl","A LivingApps text field (type 'string/text')"),st=function(e){_inherits(TextControl,e);var t=_createSuper(TextControl);function TextControl(){return _classCallCheck(this,TextControl),t.apply(this,arguments)}return _createClass(TextControl,[{key:o.symbols.type,value:function value(){return ut}}]),TextControl}(it);st.prototype.subtype="text",st.prototype.fieldtype=M;var pt=new(function(e){_inherits(PasswordControlType,e);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 ct}}]),PasswordControlType}(nt))("la","PasswordControl","A LivingApps password field (type 'string/password')"),ct=function(e){_inherits(PasswordControl,e);var t=_createSuper(PasswordControl);function PasswordControl(){return _classCallCheck(this,PasswordControl),t.apply(this,arguments)}return _createClass(PasswordControl,[{key:o.symbols.type,value:function value(){return pt}}]),PasswordControl}(it);ct.prototype.subtype="password",ct.prototype.fieldtype=I;var _t=new(function(e){_inherits(EmailControlType,e);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 ht}}]),EmailControlType}(nt))("la","EmailControl","A LivingApps email field (type 'string/email')"),ht=function(e){_inherits(EmailControl,e);var t=_createSuper(EmailControl);function EmailControl(){return _classCallCheck(this,EmailControl),t.apply(this,arguments)}return _createClass(EmailControl,[{key:o.symbols.type,value:function value(){return _t}}]),EmailControl}(it);ht.prototype.subtype="email",ht.prototype.fieldtype=O;var yt=new(function(e){_inherits(URLControlType,e);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 dt}}]),URLControlType}(nt))("la","URLControl","A LivingApps URL field (type 'string/url')"),dt=function(e){_inherits(URLControl,e);var t=_createSuper(URLControl);function URLControl(){return _classCallCheck(this,URLControl),t.apply(this,arguments)}return _createClass(URLControl,[{key:o.symbols.type,value:function value(){return yt}}]),URLControl}(it);dt.prototype.subtype="url",dt.prototype.fieldtype=D;var ft=new(function(e){_inherits(TelControlType,e);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 kt}}]),TelControlType}(nt))("la","TelControl","A LivingApps phone number field (type 'string/tel')"),kt=function(e){_inherits(TelControl,e);var t=_createSuper(TelControl);function TelControl(){return _classCallCheck(this,TelControl),t.apply(this,arguments)}return _createClass(TelControl,[{key:o.symbols.type,value:function value(){return ft}}]),TelControl}(it);kt.prototype.subtype="tel",kt.prototype.fieldtype=P;var vt=new(function(e){_inherits(TextAreaControlType,e);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 Ct}}]),TextAreaControlType}(nt))("la","TextAreaControl","A LivingApps textarea field (type 'string/textarea')"),Ct=function(e){_inherits(TextAreaControl,e);var t=_createSuper(TextAreaControl);function TextAreaControl(){return _classCallCheck(this,TextAreaControl),t.apply(this,arguments)}return _createClass(TextAreaControl,[{key:o.symbols.type,value:function value(){return vt}},{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}(it);Ct.prototype.subtype="textarea",Ct.prototype.fieldtype=U,Ct.prototype._ul4onattrs=[].concat(_toConsumableArray(it.prototype._ul4onattrs),["encrypted"]),Ct.prototype._ul4attrs=new Set([].concat(_toConsumableArray(it.prototype._ul4attrs),["encrypted"])),Ct.prototype._cssclass_control="textarea";var mt=new(function(e){_inherits(HTMLControlType,e);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 gt}}]),HTMLControlType}(nt))("la","HTMLControl","A LivingApps HTML field (type 'string/html')"),gt=function(e){_inherits(HTMLControl,e);var t=_createSuper(HTMLControl);function HTMLControl(){return _classCallCheck(this,HTMLControl),t.apply(this,arguments)}return _createClass(HTMLControl,[{key:o.symbols.type,value:function value(){return mt}}]),HTMLControl}(it);gt.prototype.subtype="html",gt.prototype.fieldtype=E;var bt=function(e){_inherits(DateControlType,e);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 Lt}}]),DateControlType}(et),Tt=new bt("la","DateControl","A LivingApps date field (type 'date/date')"),Lt=function(e){_inherits(DateControl,e);var t=_createSuper(DateControl);function DateControl(){return _classCallCheck(this,DateControl),t.apply(this,arguments)}return _createClass(DateControl,[{key:o.symbols.type,value:function value(){return Tt}},{key:"default",get:function get(){var e=this._view_control();return null===e?null:"{today}"===e.default?o.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(e,t){this._logsearch(e,t);var l=t.value;return"[object Date]"==Object.prototype.toString.call(l)&&(l=o._format(l,this.formatstring(),this.app.language)),null!==e&&(e=o._format(e,this.formatstring(),this.app.language)),"equals"===t.operator?l===e:"contains"===t.operator&&(null===l||null===e?l===e:e.toLowerCase().indexOf(l.toLowerCase())>=0)}}]),DateControl}(ot);Lt.prototype.type="date",Lt.prototype.subtype="date",Lt.prototype.fieldtype=X,Lt.prototype._formatstrings={de:"%d.%m.%Y",fr:"%d.%m.%Y",it:"%d.%m.%Y",en:"%m/%d/%Y",intl:"%Y-%m-%d"};var Ft=[""," %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"];Lt.prototype._formatstrings_parse={en:Ft.map((function(e){return"%m/%d/%Y"+e})),de:Ft.map((function(e){return"%d.%m.%Y"+e})),fr:Ft.map((function(e){return"%d.%m.%Y"+e})),it:Ft.map((function(e){return"%d.%m.%Y"+e})),intl:Ft.map((function(e){return"%Y-%m-%d"+e}))};var At=new(function(e){_inherits(DatetimeMinuteControlType,e);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 wt}}]),DatetimeMinuteControlType}(bt))("la","DatetimeMinuteControl","A LivingApps date field (type 'date/datetimeminute')"),wt=function(e){_inherits(DatetimeMinuteControl,e);var t=_createSuper(DatetimeMinuteControl);function DatetimeMinuteControl(){return _classCallCheck(this,DatetimeMinuteControl),t.apply(this,arguments)}return _createClass(DatetimeMinuteControl,[{key:o.symbols.type,value:function value(){return At}},{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}(Lt);wt.prototype.subtype="datetimeminute",wt.prototype.fieldtype=te,wt.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 St=new(function(e){_inherits(DatetimeSecondControlType,e);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 Mt}}]),DatetimeSecondControlType}(bt))("la","DatetimeSecondControl","A LivingApps date field (type 'date/datetimesecond')"),Mt=function(e){_inherits(DatetimeSecondControl,e);var t=_createSuper(DatetimeSecondControl);function DatetimeSecondControl(){return _classCallCheck(this,DatetimeSecondControl),t.apply(this,arguments)}return _createClass(DatetimeSecondControl,[{key:o.symbols.type,value:function value(){return St}},{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}(Lt);Mt.prototype.subtype="datetimesecond",Mt.prototype.fieldtype=le,Mt.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 xt=function(e){_inherits(LookupControlType,e);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 Ht}}]),LookupControlType}(ze),It=new xt("la","LookupControl","A LivingApps date field (type 'lookup')"),Ht=function(e){_inherits(LookupControl,e);var t=_createSuper(LookupControl);function LookupControl(){return _classCallCheck(this,LookupControl),t.apply(this,arguments)}return _createClass(LookupControl,[{key:o.symbols.type,value:function value(){return It}},{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:"nonekey",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonekey}},{key:"nonelabel",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}(Ke);Ht.prototype.type="lookup",Ht.prototype.fieldtype=pe,Ht.prototype._ul4onattrs=[].concat(_toConsumableArray(Ke.prototype._ul4onattrs),["lookupdata"]),Ht.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ke.prototype._ul4attrs),["lookupdata"]));var Ot=new(function(e){_inherits(LookupSelectControlType,e);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 Rt}}]),LookupSelectControlType}(xt))("la","LookupSelectControl","A LivingApps lookup field (type 'lookup/select')"),Rt=function(e){_inherits(LookupSelectControl,e);var t=_createSuper(LookupSelectControl);function LookupSelectControl(){return _classCallCheck(this,LookupSelectControl),t.apply(this,arguments)}return _createClass(LookupSelectControl,[{key:o.symbols.type,value:function value(){return Ot}}]),LookupSelectControl}(Ht);Rt.prototype.subtype="select",Rt.prototype.fieldtype=ye,Rt.prototype._cssclass_control="select";var Dt=new(function(e){_inherits(LookupRadioControlType,e);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 Bt}}]),LookupRadioControlType}(xt))("la","LookupRadioControl","A LivingApps lookup field (type 'lookup/radio')"),Bt=function(e){_inherits(LookupRadioControl,e);var t=_createSuper(LookupRadioControl);function LookupRadioControl(){return _classCallCheck(this,LookupRadioControl),t.apply(this,arguments)}return _createClass(LookupRadioControl,[{key:o.symbols.type,value:function value(){return Dt}}]),LookupRadioControl}(Ht);Bt.prototype.subtype="radio",Bt.prototype.fieldtype=_e,Bt.prototype._cssclass_root="llft-element";var Pt=new(function(e){_inherits(LookupChoiceControlType,e);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 Nt}}]),LookupChoiceControlType}(xt))("la","LookupChoiceControl","A LivingApps lookup field (type 'lookup/choice')"),Nt=function(e){_inherits(LookupChoiceControl,e);var t=_createSuper(LookupChoiceControl);function LookupChoiceControl(){return _classCallCheck(this,LookupChoiceControl),t.apply(this,arguments)}return _createClass(LookupChoiceControl,[{key:o.symbols.type,value:function value(){return Pt}}]),LookupChoiceControl}(Ht);Nt.prototype.subtype="choice",Nt.prototype.fieldtype=fe;var Ut=function(e){_inherits(AppLookupControlType,e);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 Et}}]),AppLookupControlType}(ze),Vt=new Ut("la","AppLookupControl","A LivingApps lookup field (type 'applookup')"),Et=function(e){_inherits(AppLookupControl,e);var t=_createSuper(AppLookupControl);function AppLookupControl(){return _classCallCheck(this,AppLookupControl),t.apply(this,arguments)}return _createClass(AppLookupControl,[{key:o.symbols.type,value:function value(){return Vt}},{key:"lookupdata",get:function get(){return null!==this.lookup_app&&null!==this.lookup_app.records?this.lookup_app.records:new Map}},{key:"nonekey",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonekey}},{key:"nonelabel",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}(Ke);Et.prototype.type="applookup",Et.prototype.fieldtype=Ie,Et.prototype._ul4onattrs=[].concat(_toConsumableArray(Ke.prototype._ul4onattrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]),Et.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ke.prototype._ul4attrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]));var Gt=new(function(e){_inherits(AppLookupSelectControlType,e);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}(Ut))("la","AppLookupSelectControl","A LivingApps applookup field (type 'applookup/select')"),jt=function(e){_inherits(AppLookupSelectControl,e);var t=_createSuper(AppLookupSelectControl);function AppLookupSelectControl(){return _classCallCheck(this,AppLookupSelectControl),t.apply(this,arguments)}return _createClass(AppLookupSelectControl,[{key:o.symbols.type,value:function value(){return Gt}}]),AppLookupSelectControl}(Et);jt.prototype.subtype="select",jt.prototype.fieldtype=Oe,jt.prototype._cssclass_control="select";var qt=new(function(e){_inherits(AppLookupRadioControlType,e);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 Wt}}]),AppLookupRadioControlType}(Ut))("la","AppLookupRadioControl","A LivingApps applookup field (type 'applookup/radio')"),Wt=function(e){_inherits(AppLookupRadioControl,e);var t=_createSuper(AppLookupRadioControl);function AppLookupRadioControl(){return _classCallCheck(this,AppLookupRadioControl),t.apply(this,arguments)}return _createClass(AppLookupRadioControl,[{key:o.symbols.type,value:function value(){return qt}}]),AppLookupRadioControl}(Et);Wt.prototype.subtype="radio",Wt.prototype.fieldtype=De;var Yt=new(function(e){_inherits(AppLookupChoiceControlType,e);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}(Ut))("la","AppLookupChoiceControl","A LivingApps applookup field (type 'applookup/choice')"),zt=function(e){_inherits(AppLookupChoiceControl,e);var t=_createSuper(AppLookupChoiceControl);function AppLookupChoiceControl(){return _classCallCheck(this,AppLookupChoiceControl),t.apply(this,arguments)}return _createClass(AppLookupChoiceControl,[{key:o.symbols.type,value:function value(){return Yt}}]),AppLookupChoiceControl}(Et);zt.prototype.subtype="choice",zt.prototype.fieldtype=Pe;var Jt=function(e){_inherits(MultipleLookupControlType,e);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 $t}}]),MultipleLookupControlType}(xt),Kt=new Jt("la","MultipleLookupControl","A LivingApps multiple applookup field (type 'multipleapplookup')"),$t=function(e){_inherits(MultipleLookupControl,e);var t=_createSuper(MultipleLookupControl);function MultipleLookupControl(){return _classCallCheck(this,MultipleLookupControl),t.apply(this,arguments)}return _createClass(MultipleLookupControl,[{key:o.symbols.type,value:function value(){return Kt}},{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 o,l=_createForOfIteratorHelper(e);try{for(l.s();!(o=l.n()).done;){if(o.value.key===t.value)return!0}}catch(e){l.e(e)}finally{l.f()}return!1}return!1}}]),MultipleLookupControl}(Ht);$t.prototype.type="multiplelookup",$t.prototype.fieldtype=Ce;var Zt=new(function(e){_inherits(MultipleLookupCheckboxControlType,e);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 Qt}}]),MultipleLookupCheckboxControlType}(Jt))("la","MultipleLookupCheckboxControl","A LivingApps multiplelookup field (type 'multiplelookup/checkbox')"),Qt=function(e){_inherits(MultipleLookupCheckboxControl,e);var t=_createSuper(MultipleLookupCheckboxControl);function MultipleLookupCheckboxControl(){return _classCallCheck(this,MultipleLookupCheckboxControl),t.apply(this,arguments)}return _createClass(MultipleLookupCheckboxControl,[{key:o.symbols.type,value:function value(){return Zt}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}}]),MultipleLookupCheckboxControl}($t);Qt.prototype.subtype="checkbox",Qt.prototype.fieldtype=ge,Qt.prototype._cssclass_root="llft-element";var Xt=new(function(e){_inherits(MultipleLookupSelectControlType,e);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 eo}}]),MultipleLookupSelectControlType}(Jt))("la","MultipleLookupSelectControl","A LivingApps multiplelookup field (type 'multiplelookup/select')"),eo=function(e){_inherits(MultipleLookupSelectControl,e);var t=_createSuper(MultipleLookupSelectControl);function MultipleLookupSelectControl(){return _classCallCheck(this,MultipleLookupSelectControl),t.apply(this,arguments)}return _createClass(MultipleLookupSelectControl,[{key:o.symbols.type,value:function value(){return Xt}}]),MultipleLookupSelectControl}($t);eo.prototype.subtype="select",eo.prototype.fieldtype=Te,eo.prototype._cssclass_control="select";var to=new(function(e){_inherits(MultipleLookupChoiceControlType,e);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 oo}}]),MultipleLookupChoiceControlType}(Jt))("la","MultipleLookupChoiceControl","A LivingApps multiplelookup field (type 'multiplelookup/choice')"),oo=function(e){_inherits(MultipleLookupChoiceControl,e);var t=_createSuper(MultipleLookupChoiceControl);function MultipleLookupChoiceControl(){return _classCallCheck(this,MultipleLookupChoiceControl),t.apply(this,arguments)}return _createClass(MultipleLookupChoiceControl,[{key:o.symbols.type,value:function value(){return to}}]),MultipleLookupChoiceControl}($t);oo.prototype.subtype="choice",oo.prototype.fieldtype=Fe;var lo=function(e){_inherits(MultipleAppLookupControlType,e);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 no}}]),MultipleAppLookupControlType}(Ut),ro=new lo("la","MultipleAppLookupControl","A LivingApps multiple applookup field (type 'multipleapplookup')"),no=function(e){_inherits(MultipleAppLookupControl,e);var t=_createSuper(MultipleAppLookupControl);function MultipleAppLookupControl(){return _classCallCheck(this,MultipleAppLookupControl),t.apply(this,arguments)}return _createClass(MultipleAppLookupControl,[{key:o.symbols.type,value:function value(){return ro}},{key:"search",value:function search(e,t){if("equals"===t.operator){if(null===t.value)return 0===e.length;var o,l=_createForOfIteratorHelper(e);try{for(l.s();!(o=l.n()).done;){if(o.value.search(t.value))return!0}}catch(e){l.e(e)}finally{l.f()}return!1}return!1}}]),MultipleAppLookupControl}(Et);no.prototype.type="multipleapplookup",no.prototype.fieldtype=Ve;var ao=new(function(e){_inherits(MultipleAppLookupSelectControlType,e);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 io}}]),MultipleAppLookupSelectControlType}(lo))("la","MultipleAppLookupSelectControl","A LivingApps multiple applookup field (type 'multipleapplookup/select')"),io=function(e){_inherits(MultipleAppLookupSelectControl,e);var t=_createSuper(MultipleAppLookupSelectControl);function MultipleAppLookupSelectControl(){return _classCallCheck(this,MultipleAppLookupSelectControl),t.apply(this,arguments)}return _createClass(MultipleAppLookupSelectControl,[{key:o.symbols.type,value:function value(){return ao}}]),MultipleAppLookupSelectControl}(no);io.prototype.subtype="select",io.prototype.fieldtype=qe,io.prototype._cssclass_control="select";var uo=new(function(e){_inherits(MultipleAppLookupCheckboxControlType,e);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 so}}]),MultipleAppLookupCheckboxControlType}(lo))("la","MultipleAppLookupCheckboxControl","A LivingApps multiple applookup field (type 'multipleapplookup/checkbox')"),so=function(e){_inherits(MultipleAppLookupCheckboxControl,e);var t=_createSuper(MultipleAppLookupCheckboxControl);function MultipleAppLookupCheckboxControl(){return _classCallCheck(this,MultipleAppLookupCheckboxControl),t.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxControl,[{key:o.symbols.type,value:function value(){return uo}}]),MultipleAppLookupCheckboxControl}(no);so.prototype.subtype="checkbox",so.prototype.fieldtype=Ge;var po=new(function(e){_inherits(MultipleAppLookupChoiceControlType,e);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 co}}]),MultipleAppLookupChoiceControlType}(lo))("la","MultipleAppLookupChoiceControl","A LivingApps multiple applookup field (type 'multipleapplookup/choice')"),co=function(e){_inherits(MultipleAppLookupChoiceControl,e);var t=_createSuper(MultipleAppLookupChoiceControl);function MultipleAppLookupChoiceControl(){return _classCallCheck(this,MultipleAppLookupChoiceControl),t.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceControl,[{key:o.symbols.type,value:function value(){return po}}]),MultipleAppLookupChoiceControl}(no);co.prototype.subtype="choice",co.prototype.fieldtype=Ye;var _o=new(function(e){_inherits(GeoControlType,e);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 ho}}]),GeoControlType}(ze))("la","GeoControl","A LivingApps geo field (type 'geo')"),ho=function(e){_inherits(GeoControl,e);var t=_createSuper(GeoControl);function GeoControl(){return _classCallCheck(this,GeoControl),t.apply(this,arguments)}return _createClass(GeoControl,[{key:o.symbols.type,value:function value(){return _o}}]),GeoControl}(Ke);ho.prototype.type="geo",ho.prototype.fieldtype=j,ho.prototype._cssclass_root="llft-element";var yo=function(e){_inherits(FileControlType,e);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 ko}}]),FileControlType}(ze),fo=new yo("la","FileControl","A LivingApps upload field (type 'file')"),ko=function(e){_inherits(FileControl,e);var t=_createSuper(FileControl);function FileControl(){return _classCallCheck(this,FileControl),t.apply(this,arguments)}return _createClass(FileControl,[{key:o.symbols.type,value:function value(){return fo}}]),FileControl}(Ke);ko.prototype.type="file",ko.prototype.fieldtype=Y,ko.prototype._cssclass_root="llft-element";var vo=new(function(e){_inherits(FileSignatureControlType,e);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 Co}}]),FileSignatureControlType}(yo))("la","FileSignatureControl","A LivingApps signature image field (type 'file/signature')"),Co=function(e){_inherits(FileSignatureControl,e);var t=_createSuper(FileSignatureControl);function FileSignatureControl(){return _classCallCheck(this,FileSignatureControl),t.apply(this,arguments)}return _createClass(FileSignatureControl,[{key:o.symbols.type,value:function value(){return vo}}]),FileSignatureControl}(ko);Co.prototype.subtype="signature",Co.prototype.fieldtype=J;var mo=new(function(e){_inherits(ButtonControlType,e);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 go}}]),ButtonControlType}(ze))("la","ButtonControl","A submit button"),go=function(e){_inherits(ButtonControl,e);var t=_createSuper(ButtonControl);function ButtonControl(){return _classCallCheck(this,ButtonControl),t.apply(this,arguments)}return _createClass(ButtonControl,[{key:o.symbols.type,value:function value(){return mo}}]),ButtonControl}(Ke);go.prototype.type="button";var bo=new(function(e){_inherits(LookupItemType,e);var t=_createSuper(LookupItemType);function LookupItemType(){return _classCallCheck(this,LookupItemType),t.apply(this,arguments)}return _createClass(LookupItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof To}}]),LookupItemType}(o.Type))("la","LookupItem","An option in a lookup control/field"),To=function(e){_inherits(LookupItem,e);var t=_createSuper(LookupItem);function LookupItem(){return _classCallCheck(this,LookupItem),t.apply(this,arguments)}return _createClass(LookupItem,[{key:o.symbols.type,value:function value(){return bo}},{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 o=t.controls.get(e);if(void 0!==o&&void 0!==o.lookupdata&&null!==o.lookupdata){var l=o.lookupdata.get(this.key);if(void 0!==l)return l}}return null}},{key:o.symbols.repr,value:function value(){var e="<LookupItem key="+o._repr(this.key)+" label="+o._repr(this.label);return this.visible||(e+="visible=False"),e+">"}}]),LookupItem}(l);To.prototype._ul4onattrs=["control","key","_label"],To.prototype._ul4attrs=new Set(["id","control","key","label"]);var Lo=new(function(e){_inherits(ViewLookupItemType,e);var t=_createSuper(ViewLookupItemType);function ViewLookupItemType(){return _classCallCheck(this,ViewLookupItemType),t.apply(this,arguments)}return _createClass(ViewLookupItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Fo}}]),ViewLookupItemType}(o.Type))("la","ViewLookupItem","View specific information about a lookup item"),Fo=function(e){_inherits(ViewLookupItem,e);var t=_createSuper(ViewLookupItem);function ViewLookupItem(){return _classCallCheck(this,ViewLookupItem),t.apply(this,arguments)}return _createClass(ViewLookupItem,[{key:o.symbols.type,value:function value(){return Lo}},{key:o.symbols.repr,value:function value(){var e="<ViewLookupItem key="+o._repr(this.key)+" label="+o._repr(this.label);return this.visible||(e+=" visible=False"),e+">"}}]),ViewLookupItem}(l);Fo.prototype._ul4onattrs=["key","label","visible"],Fo.prototype._ul4attrs=new Set(["key","label","visible"]);var Ao=function(e){_inherits(LayoutControlType,e);var t=_createSuper(LayoutControlType);function LayoutControlType(){return _classCallCheck(this,LayoutControlType),t.apply(this,arguments)}return _createClass(LayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof So}}]),LayoutControlType}(o.Type),wo=new Ao("la","LayoutControl","A decoration in an input form"),So=function(e){_inherits(LayoutControl,e);var t=_createSuper(LayoutControl);function LayoutControl(){return _classCallCheck(this,LayoutControl),t.apply(this,arguments)}return _createClass(LayoutControl,[{key:o.symbols.type,value:function value(){return wo}},{key:o.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+o._repr(this.id)+" identifier="+o._repr(this.identifier)+">"}},{key:"globals",get:function get(){return this.view.app.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)}}]),LayoutControl}(l);So.prototype._ul4onattrs=["label","identifier","view","top","left","width","height"],So.prototype._ul4attrs=new Set(["id","label","identifier","view","top","left","width","height"]);var Mo=new(function(e){_inherits(HTMLLayoutControlType,e);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 xo}}]),HTMLLayoutControlType}(Ao))("la","HTMLLayoutControl","HTML decoration in an input form"),xo=function(e){_inherits(HTMLLayoutControl,e);var t=_createSuper(HTMLLayoutControl);function HTMLLayoutControl(){return _classCallCheck(this,HTMLLayoutControl),t.apply(this,arguments)}return _createClass(HTMLLayoutControl,[{key:o.symbols.type,value:function value(){return Mo}},{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:o.symbols.setattr,value:function value(e,t){if("value"!==e)return _get(_getPrototypeOf(HTMLLayoutControl.prototype),o.symbols.getattr,this).call(this,e);this.value=t}}]),HTMLLayoutControl}(So);xo.prototype._ul4onattrs=[].concat(_toConsumableArray(So.prototype._ul4onattrs),["_value"]),xo.prototype._ul4attrs=new Set([].concat(_toConsumableArray(So.prototype._ul4attrs),["value"]));var Io=new(function(e){_inherits(ImageLayoutControlType,e);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 Ho}}]),ImageLayoutControlType}(Ao))("la","ImageLayoutControl","An image decoration in an input form"),Ho=function(e){_inherits(ImageLayoutControl,e);var t=_createSuper(ImageLayoutControl);function ImageLayoutControl(){return _classCallCheck(this,ImageLayoutControl),t.apply(this,arguments)}return _createClass(ImageLayoutControl,[{key:o.symbols.type,value:function value(){return Io}}]),ImageLayoutControl}(So);Ho.prototype._ul4onattrs=[].concat(_toConsumableArray(So.prototype._ul4onattrs),["original","scaled"]),Ho.prototype._ul4attrs=new Set([].concat(_toConsumableArray(So.prototype._ul4attrs),["original","scaled"]));var Oo=new(function(e){_inherits(ButtonLayoutControlType,e);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 Ro}}]),ButtonLayoutControlType}(Ao))("la","ButtonLayoutControl","A submit button in an input form"),Ro=function(e){_inherits(ButtonLayoutControl,e);var t=_createSuper(ButtonLayoutControl);function ButtonLayoutControl(){return _classCallCheck(this,ButtonLayoutControl),t.apply(this,arguments)}return _createClass(ButtonLayoutControl,[{key:o.symbols.type,value:function value(){return Oo}}]),ButtonLayoutControl}(So),Do=new(function(e){_inherits(ViewControlType,e);var t=_createSuper(ViewControlType);function ViewControlType(){return _classCallCheck(this,ViewControlType),t.apply(this,arguments)}return _createClass(ViewControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Bo}}]),ViewControlType}(o.Type))("la","ViewControl","Contains view specific information about a control"),Bo=function(e){_inherits(ViewControl,e);var t=_createSuper(ViewControl);function ViewControl(){return _classCallCheck(this,ViewControl),t.apply(this,arguments)}return _createClass(ViewControl,[{key:o.symbols.type,value:function value(){return Do}},{key:"mode",get:function get(){return this._mode?"display":"edit"}}]),ViewControl}(l);Bo.prototype._ul4onattrs=["view","control","top","left","width","height","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","_mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"],Bo.prototype._ul4attrs=new Set(["id","view","control","top","left","width","height","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"]);var Po=new(function(e){_inherits(UserType,e);var t=_createSuper(UserType);function UserType(){return _classCallCheck(this,UserType),t.apply(this,arguments)}return _createClass(UserType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof No}}]),UserType}(o.Type))("la","User","A LivingApps user/account"),No=function(e){_inherits(User,e);var t=_createSuper(User);function User(){return _classCallCheck(this,User),t.apply(this,arguments)}return _createClass(User,[{key:o.symbols.type,value:function value(){return Po}},{key:o.symbols.repr,value:function value(){return"<User id="+o._repr(this.id)+" firstname="+o._repr(this.firstname)+" surname="+o._repr(this.surname)+" email="+o._repr(this.email)+">"}}]),User}(l);No.prototype._ul4onattrs=["_id","gender","title","firstname","surname","initials","email","streetname","streetnumber","zip","city","phone","fax","lang","avatarsmall","avatarlarge","summary","interests","personalwebsite","companywebsite","company","position","department","keyviews"],No.prototype._ul4attrs=new Set(["id","_id","gender","title","firstname","surname","initials","email","streetname","streetnumber","zip","city","phone","fax","lang","avatarsmall","avatarlarge","summary","interests","personalwebsite","companywebsite","company","position","department","keyviews"]);var Uo=new(function(e){_inherits(FileType,e);var t=_createSuper(FileType);function FileType(){return _classCallCheck(this,FileType),t.apply(this,arguments)}return _createClass(FileType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Vo}}]),FileType}(o.Type))("la","File","An uploaded file"),Vo=function(e){_inherits(File,e);var t=_createSuper(File);function File(){return _classCallCheck(this,File),t.apply(this,arguments)}return _createClass(File,[{key:o.symbols.type,value:function value(){return Uo}},{key:o.symbols.repr,value:function value(){return"<File id="+o._repr(this.id)+" url="+o._repr(this.url)+" filename="+o._repr(this.filename)+">"}},{key:"url",get:function get(){return"/gateway/files/"+this.id}},{key:"archive_url",get:function get(){return null===this.archive?this.url:this.archive.url+"/"+this.filename}}]),File}(l);Vo.prototype._ul4onattrs=["filename","mimetype","width","height","internalid","createdat","size","duration","geo","storagefilename","archive"],Vo.prototype._ul4attrs=new Set(["id","url","archive_url","filename","mimetype","width","height","size","duration","geo","archive","createdat"]);var Eo=new(function(e){_inherits(GeoType,e);var t=_createSuper(GeoType);function GeoType(){return _classCallCheck(this,GeoType),t.apply(this,arguments)}return _createClass(GeoType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Go}}]),GeoType}(o.Type))("la","Geo","Geographical coordinates and location information"),Go=function(e){_inherits(Geo,e);var t=_createSuper(Geo);function Geo(e,o){var l,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return _classCallCheck(this,Geo),(l=t.call(this,null)).lat=e,l.long=o,l.info=r,l}return _createClass(Geo,[{key:o.symbols.type,value:function value(){return Eo}},{key:o.symbols.repr,value:function value(){return"<Geo lat="+o._repr(this.lat)+" long="+o._repr(this.long)+" info="+o._repr(this.info)+">"}}]),Geo}(l);Go.prototype._ul4onattrs=["lat","long","info"],Go.prototype._ul4attrs=new Set(["lat","long","info"]);var jo=function(e){_inherits(AttachmentType,e);var t=_createSuper(AttachmentType);function AttachmentType(){return _classCallCheck(this,AttachmentType),t.apply(this,arguments)}return _createClass(AttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Wo}}]),AttachmentType}(o.Type),qo=new jo("la","Attachment","An attachment of a record"),Wo=function(e){_inherits(Attachment,e);var t=_createSuper(Attachment);function Attachment(){return _classCallCheck(this,Attachment),t.apply(this,arguments)}return _createClass(Attachment,[{key:o.symbols.type,value:function value(){return qo}},{key:o.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+o._repr(this.id)+" label="+o._repr(this.label)+">"}}]),Attachment}(l);Wo.prototype._ul4onattrs=["record","label","active"],Wo.prototype._ul4attrs=new Set(["id","record","label","active"]);var Yo=new(function(e){_inherits(NoteAttachmentType,e);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 zo}}]),NoteAttachmentType}(jo))("la","NoteAttachment","A note attachment of a record"),zo=function(e){_inherits(NoteAttachment,e);var t=_createSuper(NoteAttachment);function NoteAttachment(){return _classCallCheck(this,NoteAttachment),t.apply(this,arguments)}return _createClass(NoteAttachment,[{key:o.symbols.type,value:function value(){return Yo}}]),NoteAttachment}(Wo);zo.prototype.type="noteattachment",zo.prototype._ul4onattrs=[].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["value"]),zo.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["value"]));var Jo=new(function(e){_inherits(URLAttachmentType,e);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 Ko}}]),URLAttachmentType}(jo))("la","URLAttachment","A URL attachment of a record"),Ko=function(e){_inherits(URLAttachment,e);var t=_createSuper(URLAttachment);function URLAttachment(){return _classCallCheck(this,URLAttachment),t.apply(this,arguments)}return _createClass(URLAttachment,[{key:o.symbols.type,value:function value(){return Jo}}]),URLAttachment}(Wo);Ko.prototype.type="urlattachment",Ko.prototype._ul4onattrs=[].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["value"]),Ko.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["value"]));var $o=new(function(e){_inherits(FileAttachmentType,e);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 Zo}}]),FileAttachmentType}(jo))("la","FileAttachment","A file attachment of a record"),Zo=function(e){_inherits(FileAttachment,e);var t=_createSuper(FileAttachment);function FileAttachment(){return _classCallCheck(this,FileAttachment),t.apply(this,arguments)}return _createClass(FileAttachment,[{key:o.symbols.type,value:function value(){return $o}}]),FileAttachment}(Wo);Zo.prototype.type="fileattachment",Zo.prototype._ul4onattrs=[].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["value"]),Zo.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["value"]));var Qo=new(function(e){_inherits(ImageAttachmentType,e);var t=_createSuper(ImageAttachmentType);function ImageAttachmentType(){return _classCallCheck(this,ImageAttachmentType),t.apply(this,arguments)}return _createClass(ImageAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Xo}}]),ImageAttachmentType}(jo))("la","ImageAttachment","An image attachment of a record"),Xo=function(e){_inherits(ImageAttachment,e);var t=_createSuper(ImageAttachment);function ImageAttachment(){return _classCallCheck(this,ImageAttachment),t.apply(this,arguments)}return _createClass(ImageAttachment,[{key:o.symbols.type,value:function value(){return Qo}}]),ImageAttachment}(Wo);Xo.prototype.type="imageattachment",Xo.prototype._ul4onattrs=[].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["original","thumb","small","medium","large"]),Xo.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["original","thumb","small","medium","large"]));var el=new(function(e){_inherits(JSONAttachmentType,e);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 tl}}]),JSONAttachmentType}(jo))("la","JSONAttachment","A JSON attachment of a record"),tl=function(e){_inherits(JSONAttachment,e);var t=_createSuper(JSONAttachment);function JSONAttachment(){return _classCallCheck(this,JSONAttachment),t.apply(this,arguments)}return _createClass(JSONAttachment,[{key:o.symbols.type,value:function value(){return el}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return"value"===e?o._asjson(this.value):this[e]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){"value"===e?this.value=o._fromjson(t):this[e]=t}}]),JSONAttachment}(Wo);tl.prototype.type="jsonattachment",tl.prototype._ul4onattrs=[].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["value"]),tl.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["value"]));var ol=new(function(e){_inherits(InstallationType,e);var t=_createSuper(InstallationType);function InstallationType(){return _classCallCheck(this,InstallationType),t.apply(this,arguments)}return _createClass(InstallationType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ll}}]),InstallationType}(o.Type))("la","Installation","The installation that created an app"),ll=function(e){_inherits(Installation,e);var t=_createSuper(Installation);function Installation(){return _classCallCheck(this,Installation),t.apply(this,arguments)}return _createClass(Installation,[{key:o.symbols.type,value:function value(){return ol}},{key:o.symbols.repr,value:function value(){return"<Installation id="+o._repr(this.id)+" name="+o._repr(this.name)+">"}}]),Installation}(l);ll.prototype._ul4onattrs=["name"],ll.prototype._ul4attrs=new Set(["id","name"]);var rl=new(function(e){_inherits(CategoryType,e);var t=_createSuper(CategoryType);function CategoryType(){return _classCallCheck(this,CategoryType),t.apply(this,arguments)}return _createClass(CategoryType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof nl}}]),CategoryType}(o.Type))("la","Category","A navigation category"),nl=function(e){_inherits(Category,e);var t=_createSuper(Category);function Category(){return _classCallCheck(this,Category),t.apply(this,arguments)}return _createClass(Category,[{key:o.symbols.type,value:function value(){return rl}},{key:o.symbols.repr,value:function value(){for(var e=[],t=this;null!==t;)e.splice(0,0,t.identifier),t=t.parent;return"<Category id="+o._repr(this.id)+" identifierpath="+o._repr(e.join("/"))+NaN+o._repr(this.name)+">"}}]),Category}(l);nl.prototype._ul4onattrs=["identifier","name","order","parent","children","apps"],nl.prototype._ul4attrs=new Set(["id","identifier","name","order","parent","children","apps"]);var al=new(function(e){_inherits(KeyViewType,e);var t=_createSuper(KeyViewType);function KeyViewType(){return _classCallCheck(this,KeyViewType),t.apply(this,arguments)}return _createClass(KeyViewType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof il}}]),KeyViewType}(o.Type))("la","KeyView","Object granting access to a view template"),il=function(e){_inherits(KeyView,e);var t=_createSuper(KeyView);function KeyView(){return _classCallCheck(this,KeyView),t.apply(this,arguments)}return _createClass(KeyView,[{key:o.symbols.type,value:function value(){return al}},{key:o.symbols.repr,value:function value(){return"<KeyView id="+o._repr(this.id)+" identifier="+o._repr(this.identifier)+">"}}]),KeyView}(l);il.prototype._ul4onattrs=["identifier","name","key","user"],il.prototype._ul4attrs=new Set(["id","identifier","name","key","user"]);var ul=new(function(e){_inherits(AppParameterType,e);var t=_createSuper(AppParameterType);function AppParameterType(){return _classCallCheck(this,AppParameterType),t.apply(this,arguments)}return _createClass(AppParameterType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof sl}}]),AppParameterType}(o.Type))("la","AppParameter","A parameter of a LivingApps application"),sl=function(e){_inherits(AppParameter,e);var t=_createSuper(AppParameter);function AppParameter(){return _classCallCheck(this,AppParameter),t.apply(this,arguments)}return _createClass(AppParameter,[{key:o.symbols.type,value:function value(){return ul}},{key:o.symbols.repr,value:function value(){return"<AppParameter id="+o._repr(this.id)+" identifier="+o._repr(this.identifier)+">"}},{key:"app",get:function get(){return this.owner instanceof p?this.owner:null}}]),AppParameter}(l);sl.prototype._ul4onattrs=["owner","parent","type","order","identifier","description","value","createdat","createdby","updatedat","updatedby"],sl.prototype._ul4attrs=new Set(["id","owner","parent","app","type","order","identifier","description","value","createdat","createdby","updatedat","updatedby"]);var pl=new(function(e){_inherits(FormType,e);var t=_createSuper(FormType);function FormType(){return _classCallCheck(this,FormType),t.apply(this,arguments)}return _createClass(FormType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof cl}}]),FormType}(o.Type))("la","Form","The input form."),cl=function(e){_inherits(Form,e);var t=_createSuper(Form);function Form(e,o){var l;_classCallCheck(this,Form),(l=t.call(this)).globals=e,l.template=o,l._geo_wired=!1;var r,n=_createForOfIteratorHelper(e.record.fields.values());try{for(n.s();!(r=n.n()).done;){var a=r.value;l.wire_field(a)}}catch(e){n.e(e)}finally{n.f()}return l.render_template(null),l}return _createClass(Form,[{key:o.symbols.type,value:function value(){return pl}},{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:o.symbols.getattr,value:function value(e){if("enabled"===e)return this.enabled;throw new o.AttributeError(this,e)}},{key:o.symbols.setattr,value:function value(e,t){if("enabled"!==e)throw new o.AttributeError(this,e);this.enabled=o._bool(t)}},{key:o.symbols.repr,value:function value(){return"<"+this.constructor.name+" enabled="+o._repr(this.enabled)+">"}},{key:"toString",value:function toString(){return this[o.symbols.repr]()}},{key:"render_template",value:function render_template(e){var t=this,l={record:this.globals.record,app:this.globals.app,fields:this.globals.record.fields,identifier:e},r={globals:this.globals,form:this,la:dl},n="LivingApps update template: ";n+=null===e?"Initialization":"Value change in "+o._repr(e),this.globals.group_logging(n,(function(){try{t.template.renders(l,r)}catch(e){console&&console.error&&(t.globals._start_log_message(),console.group&&console.group("UL4 stacktrace"),o.report_exc(e),console.groupEnd&&console.groupEnd(),console.groupCollapsed&&console.groupCollapsed("Javascript stacktrace"),console.error(e),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,o=this,l=_createForOfIteratorHelper(e._dom_controls);try{for(l.s();!(t=l.n()).done;){t.value.addEventListener(e._inputevent,(function(t){o.wire_geo(),o.globals.mode=o.globals.mode.substring(0,o.globals.mode.lastIndexOf("/")+1)+"input",o.render_template(e.control.identifier)}))}}catch(e){l.e(e)}finally{l.f()}}}]),Form}(o.Proto);cl.prototype._ul4attrs=new Set(["enabled"]),cl.prototype._sel_form="#livingapps-form form",cl.prototype._sel_button="[type=submit]";for(var _l=0,hl=[a,u,p,_,y,f,Ze,Xe,rt,st,ht,dt,kt,Ct,Lt,wt,Mt,Ht,Rt,Bt,Nt,Et,jt,Wt,zt,$t,eo,Qt,oo,no,io,so,co,ho,ko,Co,go,C,g,M,O,D,P,U,E,T,A,j,Y,J,Z,X,te,le,ie,pe,Ce,Se,Ie,Ve,To,Fo,So,xo,Ho,Ro,Bo,No,Vo,Go,zo,Ko,Zo,Xo,tl,ll,nl,il,sl];_l<hl.length;_l++){var yl=hl[_l];o.register("de.livinglogic.livingapi."+yl.name.toLowerCase(),yl)}var dl=new o.Module("la","LivingAPI types",{FlashMessage:u,File:Vo,Geo:Go,User:No,KeyView:il,Globals:a,App:p,TextControl:st,URLControl:dt,EmailControl:ht,PasswordControl:ct,TelControl:kt,TextAreaControl:Ct,HTMLControl:gt,IntControl:Xe,NumberControl:rt,DateControl:Lt,DatetimeMinuteControl:wt,DatetimeSecondControl:Mt,BoolControl:Ze,LookupSelectControl:Rt,LookupRadioControl:Bt,LookupChoiceControl:Nt,AppLookupSelectControl:jt,AppLookupRadioControl:Wt,AppLookupChoiceControl:zt,MultipleLookupSelectControl:eo,MultipleLookupCheckboxControl:Qt,MultipleLookupChoiceControl:oo,MultipleAppLookupSelectControl:io,MultipleAppLookupCheckboxControl:so,MultipleAppLookupChoiceControl:co,FileControl:ko,FileSignatureControl:Co,GeoControl:ho,ViewControl:Bo,Record:f,ImageAttachment:Xo,FileAttachment:Zo,URLAttachment:Ko,NoteAttachment:zo,JSONAttachment:tl,Installation:ll,HTMLLayoutControl:xo,ImageLayoutControl:Ho,ButtonLayoutControl:Ro,View:_,DataSource:y,LookupItem:To,ViewLookupItem:Fo,Category:nl,AppParameter:sl});e.App=p,e.AppLookupChoiceControl=zt,e.AppLookupChoiceField=Pe,e.AppLookupControl=Et,e.AppLookupField=Ie,e.AppLookupFieldBase=Se,e.AppLookupRadioControl=Wt,e.AppLookupRadioField=De,e.AppLookupSelectControl=jt,e.AppLookupSelectField=Oe,e.AppParameter=sl,e.Attachment=Wo,e.Base=l,e.BoolControl=Ze,e.BoolField=g,e.ButtonControl=go,e.ButtonLayoutControl=Ro,e.Category=nl,e.ChoiceFieldBase=re,e.Control=Ke,e.DataSource=y,e.DateControl=Lt,e.DateField=X,e.DateFieldBase=Z,e.DatetimeMinuteControl=wt,e.DatetimeMinuteField=te,e.DatetimeSecondControl=Mt,e.DatetimeSecondField=le,e.EmailControl=ht,e.EmailField=O,e.Field=C,e.File=Vo,e.FileAttachment=Zo,e.FileControl=ko,e.FileField=Y,e.FileSignatureControl=Co,e.FileSignatureField=J,e.FlashMessage=u,e.Form=cl,e.Geo=Go,e.GeoControl=ho,e.GeoField=j,e.Globals=a,e.HTMLControl=gt,e.HTMLField=E,e.HTMLLayoutControl=xo,e.Handler=r,e.ImageAttachment=Xo,e.ImageLayoutControl=Ho,e.Installation=ll,e.IntControl=Xe,e.IntField=T,e.JSONAttachment=tl,e.KeyView=il,e.LayoutControl=So,e.LookupChoiceControl=Nt,e.LookupChoiceField=fe,e.LookupControl=Ht,e.LookupField=pe,e.LookupFieldBase=ie,e.LookupItem=To,e.LookupRadioControl=Bt,e.LookupRadioField=_e,e.LookupSelectControl=Rt,e.LookupSelectField=ye,e.MultipleAppLookupCheckboxControl=so,e.MultipleAppLookupCheckboxField=Ge,e.MultipleAppLookupChoiceControl=co,e.MultipleAppLookupChoiceField=Ye,e.MultipleAppLookupControl=no,e.MultipleAppLookupField=Ve,e.MultipleAppLookupSelectControl=io,e.MultipleAppLookupSelectField=qe,e.MultipleLookupCheckboxControl=Qt,e.MultipleLookupCheckboxField=ge,e.MultipleLookupChoiceControl=oo,e.MultipleLookupChoiceField=Fe,e.MultipleLookupControl=$t,e.MultipleLookupField=Ce,e.MultipleLookupSelectControl=eo,e.MultipleLookupSelectField=Te,e.NoteAttachment=zo,e.NumberControl=rt,e.NumberField=A,e.PasswordControl=ct,e.PasswordField=I,e.Record=f,e.StringControl=it,e.StringField=M,e.TelControl=kt,e.TelField=P,e.TextAreaControl=Ct,e.TextAreaField=U,e.TextControl=st,e.URLAttachment=Ko,e.URLControl=dt,e.URLField=D,e.User=No,e.View=_,e.ViewControl=Bo,e.ViewLookupItem=Fo,e.element=element,e.module=dl,e.url_with_params=url_with_params,e.version="0.15.0",Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@livinglogic/ul4")):"function"==typeof define&&define.amd?define(["exports","@livinglogic/ul4"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).la={},e.ul4)}(this,(function(e,t){"use strict";function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(o){if("default"!==o){var l=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,l.get?l:{enumerable:!0,get:function(){return e[o]}})}})),t.default=e,Object.freeze(t)}var o=_interopNamespace(t);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 o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function _createClass(e,t,o){return t&&_defineProperties(e.prototype,t),o&&_defineProperties(e,o),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 o,l=_getPrototypeOf(e);if(t){var r=_getPrototypeOf(this).constructor;o=Reflect.construct(l,arguments,r)}else o=l.apply(this,arguments);return _possibleConstructorReturn(this,o)}}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(e,t,o){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function _get(e,t,o){var l=_superPropBase(e,t);if(l){var r=Object.getOwnPropertyDescriptor(l,t);return r.get?r.get.call(o):r.value}})(e,t,o||e)}function set(e,t,o,l){return(set="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function set(e,t,o,l){var r,n=_superPropBase(e,t);if(n){if((r=Object.getOwnPropertyDescriptor(n,t)).set)return r.set.call(l,o),!0;if(!r.writable)return!1}if(r=Object.getOwnPropertyDescriptor(l,t)){if(!r.writable)return!1;r.value=o,Object.defineProperty(l,t,r)}else!function _defineProperty(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}(l,t,o);return!0})(e,t,o,l)}function _set(e,t,o,l,r){if(!set(e,t,o,l||e)&&r)throw new Error("failed to set property");return o}function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==o)return;var l,r,n=[],a=!0,i=!1;try{for(o=o.call(e);!(a=(l=o.next()).done)&&(n.push(l.value),!t||n.length!==t);a=!0);}catch(e){i=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(i)throw r}}return n}(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 o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,l=new Array(t);o<t;o++)l[o]=e[o];return l}function _createForOfIteratorHelper(e,t){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){o&&(e=o);var l=0,F=function(){};return{s:F,n:function(){return l>=e.length?{done:!0}:{done:!1,value:e[l++]}},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 r,n=!0,a=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return n=e.done,e},e:function(e){a=!0,r=e},f:function(){try{n||null==o.return||o.return()}finally{if(a)throw r}}}}function element(e){for(var t=document.createElement(e),l=arguments.length,r=new Array(l>1?l-1:0),n=1;n<l;n++)r[n-1]=arguments[n];for(var a=0,i=r;a<i.length;a++){var u=i[a];"string"==typeof u&&t.appendChild(document.createTextNode(u));var s=u instanceof Map,p=o._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&&t.setAttribute(y,d)}}catch(e){_.e(e)}finally{_.f()}}}return t}function _append_param_to_url(e,t,l){if(o._islist(l)){var r,n=_createForOfIteratorHelper(l);try{for(n.s();!(r=n.n()).done;){_append_param_to_url(e,t,r.value)}}catch(e){n.e(e)}finally{n.f()}}else"string"==typeof l?e.append(t,l):null!==l&&e.append(t,o._str(l))}function url_with_params(e){for(var t=new URLSearchParams,l=arguments.length,r=new Array(l>1?l-1:0),n=1;n<l;n++)r[n-1]=arguments[n];for(var a=0,i=r;a<i.length;a++){var u=i[a];if(o._islist(u)&&2==u.length)_append_param_to_url.apply(void 0,[t].concat(_toConsumableArray(u)));else if("[object Object]"!==Object.prototype.toString.call(u)||u instanceof o.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(t,_,h)}}catch(e){p.e(e)}finally{p.f()}}}else for(var y in u)_append_param_to_url(t,y,u[y])}return(t=t.toString().replace("+","%20")).length>0&&(e+="?"+t),e}var l=function(e){_inherits(Base,e);var t=_createSuper(Base);function Base(e){var o;return _classCallCheck(this,Base),(o=t.call(this)).id=e,o}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,o=e.loadcontent();;++t){var l=o.next();if(l.done)break;t<this._ul4onattrs.length&&this._loadUL4ONAttr(this._ul4onattrs[t],l.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:o.symbols.getattr,value:function value(e){if(this._ul4attrs.has(e)){var value=this[e];if("function"==typeof value){var t=value.bind(this);return t._ul4_name=value._ul4_name||value.name,t._ul4_signature=value._ul4_signature,t._ul4_needsobject=value._ul4_needsobject,t._ul4_needscontext=value._ul4_needscontext,t}return value}if(e.startsWith("x_"))return this.hasOwnProperty(e)?this[e]:null;throw new o.AttributeError(this,e)}},{key:o.symbols.setattr,value:function value(e,t){if(!e.startsWith("x_"))throw new o.AttributeError(this,e);this[e]=t}},{key:o.symbols.repr,value:function value(){return"<"+this.constructor.name+">"}},{key:"toString",value:function toString(){return this[o.symbols.repr]()}}]),Base}(o.Proto),r=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(e){_inherits(GlobalsType,e);var t=_createSuper(GlobalsType);function GlobalsType(){return _classCallCheck(this,GlobalsType),t.apply(this,arguments)}return _createClass(GlobalsType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof a}}]),GlobalsType}(o.Type))("la","Globals","Global information"),a=function(e){_inherits(Globals,e);var t=_createSuper(Globals);function Globals(e){var o;return _classCallCheck(this,Globals),(o=t.call(this,e)).version=null,o.hostname=null,o.platform=null,o.user=null,o.lang=null,o.datasources=null,o.app=null,o.record=null,o.mode=null,o.maxdbactions=null,o.maxtemplateruntime=null,o.flashmessages=null,o.view_template_id=null,o.email_template_id=null,o.handler=new r,o._log_stack=[],o._current_geo=null,o}return _createClass(Globals,[{key:o.symbols.type,value:function value(){return n}},{key:"geo_dist",value:function geo_dist(e,t){var o=function sqsin(e){return(e=Math.sin(e))*e},l=function sqsos(e){return(e=Math.cos(e))*e},r=Math.PI/180,n=1/298.257223563,a=e.lat*r,i=e.long*r,u=t.lat*r,s=(a+u)/2,p=(a-u)/2,c=(i-t.long*r)/2,_=o(p)*l(c)+l(s)*o(c),h=l(p)*l(c)+o(s)*o(c),y=Math.atan(Math.sqrt(_/h)),d=2*y*6378.137,f=Math.sqrt(_*h)/y,v=(3*f+1)/(2*_);return d*(1+n*((3*f-1)/(2*h))*o(s)*l(p)-n*v*l(s)*o(p))}},{key:"scaled_url",value:function scaled_url(e,t,o){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"fill",r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=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 Vo&&(e="https://"+this.hostname+e.archive_url,(_=encodeURIComponent(e.filename))!=e.filename&&(_=null));var h="";return h+=c?"/imgproxycache/insecure":"/imgproxy/insecure","fit"!==l&&(h+="/rt:"+l),null!=t&&(h+="/w:"+t),null!=o&&(h+="/h:"+o),r&&(h+="/el:1"),null!=n&&(h+="/g:"+n),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:o.symbols.repr,value:function value(){return"<Globals version="+o._repr(this.version)+" mode="+o._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 Go(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(e){return e.map((function(e){return"string"!=typeof e?o._repr(e):e})).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 o=e.value;o.output||(console&&console.group&&console.group(o.header),o.output=!0)}}catch(e){t.e(e)}finally{t.f()}}},{key:"log_debug",value:function log_debug(){this._start_log_message();for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];console&&console.debug&&console.debug(this._make_log_message(t))}},{key:"log_info",value:function log_info(){this._start_log_message();for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];console&&console.info&&console.info(this._make_log_message(t))}},{key:"log_warning",value:function log_warning(){this._start_log_message();for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];console&&console.warn&&console.warn(this._make_log_message(t))}},{key:"log_error",value:function log_error(){this._start_log_message();for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];console&&console.error&&console.error(this._make_log_message(t))}}]),Globals}(l);a.prototype._ul4onattrs=["version","platform","user","maxdbactions","maxtemplateruntime","lang","datasources","hostname","app","record","mode","view_template_id","email_template_id","view_id"],a.prototype._ul4attrs=new Set(["version","hostname","platform","user","lang","datasources","app","record","maxdbactions","maxtemplateruntime","flashmessages","mode","scaled_url","geo_dist","current_geo","log_debug","log_info","log_warning","log_error"]),o.expose(a.prototype.log_debug,["message","*"]),o.expose(a.prototype.log_info,["message","*"]),o.expose(a.prototype.log_warning,["message","*"]),o.expose(a.prototype.log_error,["message","*"]),o.expose(a.prototype.geo_dist,["geo1","pk","geo2","pk"]),o.expose(a.prototype.current_geo,[]),o.expose(a.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 i=new(function(e){_inherits(FlashMessageType,e);var t=_createSuper(FlashMessageType);function FlashMessageType(){return _classCallCheck(this,FlashMessageType),t.apply(this,arguments)}return _createClass(FlashMessageType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof u}}]),FlashMessageType}(o.Type))("la","FlashMessage","A flash message in a web page"),u=function(e){_inherits(FlashMessage,e);var t=_createSuper(FlashMessage);function FlashMessage(){return _classCallCheck(this,FlashMessage),t.apply(this,arguments)}return _createClass(FlashMessage,[{key:o.symbols.type,value:function value(){return i}},{key:o.symbols.repr,value:function value(){return"<FlashMessage type="+o._repr(this.type)+" title="+o._repr(this.title)+">"}}]),FlashMessage}(l);u.prototype._ul4onattrs=["timestamp","type","title","message"],u.prototype._ul4attrs=new Set(["timestamp","type","title","message"]);var s=new(function(e){_inherits(AppType,e);var t=_createSuper(AppType);function AppType(){return _classCallCheck(this,AppType),t.apply(this,arguments)}return _createClass(AppType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof p}}]),AppType}(o.Type))("la","App","A LivingApps application"),p=function(e){_inherits(App,e);var t=_createSuper(App);function App(){return _classCallCheck(this,App),t.apply(this,arguments)}return _createClass(App,[{key:o.symbols.type,value:function value(){return s}},{key:o.symbols.repr,value:function value(){return"<App id="+o._repr(this.id)+" name="+o._repr(this.name)+">"}},{key:"insert",value:function insert(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this[o.symbols.call](e);return this.globals.handler.save(this),t}},{key:"template_url",value:function template_url(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2?arguments[2]:void 0,l="/gateway/apps/"+this.id;return null!==t&&(l+="/"+t.id),url_with_params(l,["template",e],o)}},{key:"new_embedded_url",value:function new_embedded_url(e){return url_with_params("/dateneingabe/"+this.id+"/new",e)}},{key:"new_standalone_url",value:function new_standalone_url(e){return url_with_params("/gateway/apps/"+this.id+"/new",e)}},{key:"layout_controls",get:function get(){return null===this.active_view?new Map:this.active_view.layout_controls}},{key:o.symbols.call,value:function value(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new f(null,this);if(o._ismap(e)){var l,r=_createForOfIteratorHelper(e.keys());try{for(r.s();!(l=r.n()).done;){var n=l.value;if(!t.fields.has(n))throw new o.ArgumentError(o._repr(this)+"() get an unexpected keyword argument "+o._repr(n))}}catch(e){r.e(e)}finally{r.f()}t._make_fields(!0,e,null,null)}else{if(!o._isobject(e))throw new o.TypeError("values must be an object or a Map");for(var a in e)if(!t.fields.has(a))throw new o.ArgumentError(o._repr(this)+"() get an unexpected keyword argument "+o._repr(a));t._make_fields(!0,new Map(o._list(o.dicttype.items(e))),null,null)}return t}},{key:o.symbols.getattr,value:function value(e){if(e.startsWith("c_")){if(!this.controls.has(e.substr(2)))throw new o.AttributeError(this,e);return this.controls.get(e.substr(2))}if(e.startsWith("lc_")){if(null===this.layout_controls||!this.layout_controls.has(e.substr(3)))throw new o.AttributeError(this,e);return this.layout_controls.get(e.substr(3))}if(e.startsWith("p_")&&null!==this.params){if(!this.params.has(e.substr(2)))throw new o.AttributeError(this,e);return this.params.get(e.substr(2))}if(e.startsWith("pv_")&&null!==this.params){if(!this.params.has(e.substr(3)))throw new o.AttributeError(this,e);return this.params.get(e.substr(3)).value}return _get(_getPrototypeOf(App.prototype),o.symbols.getattr,this).call(this,e)}},{key:"active_view",get:function get(){return this._active_view}},{key:"active_view",set:function set(e){if(null===e);else if("string"==typeof e){if(null===this.views||!this.views.has(e))throw new o.ValueError("View "+o._repr(e)+" not found!");e=this.views.get(e)}else{if(!(e instanceof _))throw new o.TypeError(o._repr(e)+" is not a view!");if(e.app!==this)throw new o.ValueError("View "+o._repr(e)+" belongs to the wrong app!")}this._active_view=e}},{key:"layout_controls",get:function get(){return null===this.active_views?new Map:this.active_view.layout_controls}}]),App}(l);p.prototype._ul4onattrs=["globals","name","description","lang","startlink","iconlarge","iconsmall","createdby","controls","records","recordcount","installation","categories","params","views","datamanagement_identifier","basetable","primarykey","insertprocedure","updateprocedure","deleteprocedure","templates","createdat","updatedat","updatedby","superid","favorite","_active_view"],p.prototype._ul4attrs=new Set(["id","globals","name","description","lang","startlink","iconlarge","iconsmall","createdat","createdby","updatedat","updatedby","controls","layout_controls","records","recordcount","installation","categories","params","views","datamanagement_identifier","insert","favorite","_active_view","template_url","new_embedded_url","new_standalone_url"]),o.expose(p.prototype[o.symbols.call],["values","**"],{needsobject:!0}),o.expose(p.prototype.insert,["values","**"],{needsobject:!0}),o.expose(p.prototype.template_url,["identifier","p","record","p=",null,"params","**"]),o.expose(p.prototype.new_embedded_url,["params","**"]),o.expose(p.prototype.new_standalone_url,["params","**"]);var c=new(function(e){_inherits(ViewType,e);var t=_createSuper(ViewType);function ViewType(){return _classCallCheck(this,ViewType),t.apply(this,arguments)}return _createClass(ViewType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof _}}]),ViewType}(o.Type))("la","View","An input form for a LivingViews application"),_=function(e){_inherits(View,e);var t=_createSuper(View);function View(){return _classCallCheck(this,View),t.apply(this,arguments)}return _createClass(View,[{key:"globals",get:function get(){return this.app.globals}},{key:o.symbols.type,value:function value(){return c}},{key:o.symbols.repr,value:function value(){return"<View id="+o._repr(this.id)+" name="+o._repr(this.name)+">"}}]),View}(l);_.prototype._ul4onattrs=["name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang","login_required","result_page","use_geo"],_.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 h=new(function(e){_inherits(DataSourceType,e);var t=_createSuper(DataSourceType);function DataSourceType(){return _classCallCheck(this,DataSourceType),t.apply(this,arguments)}return _createClass(DataSourceType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof y}}]),DataSourceType}(o.Type))("la","DataSource","The data resulting from a data source configuration"),y=function(e){_inherits(DataSource,e);var t=_createSuper(DataSource);function DataSource(){return _classCallCheck(this,DataSource),t.apply(this,arguments)}return _createClass(DataSource,[{key:o.symbols.type,value:function value(){return h}},{key:o.symbols.repr,value:function value(){return"<DataSource id="+o._repr(this.id)+" identifier="+o._repr(this.identifier)+">"}}]),DataSource}(l);y.prototype._ul4onattrs=["identifier","app","apps"],y.prototype._ul4attrs=new Set(["id","identifier","app","apps"]);var d=new(function(e){_inherits(RecordType,e);var t=_createSuper(RecordType);function RecordType(){return _classCallCheck(this,RecordType),t.apply(this,arguments)}return _createClass(RecordType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof f}}]),RecordType}(o.Type))("la","Record","A record of a LivingApp application"),f=function(e){_inherits(Record,e);var t=_createSuper(Record);function Record(e,o){var l;return _classCallCheck(this,Record),(l=t.call(this,e)).app=o,l.createdat=null,l.createdby=null,l.updatedat=null,l.updatedby=null,l.updatecount=0,l._sparsevalues=new Map,l._values=null,l._fields=null,l.children=new Map,l.attachments=null,l.errors=[],l._sparsefielderrors=null,l._sparsefieldlookupdata=null,l._is_deleted=!1,l._is_new=!0,l}return _createClass(Record,[{key:o.symbols.type,value:function value(){return d}},{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 o,l=[],r=_createForOfIteratorHelper(t||this.app.controls);try{for(r.s();!(o=r.n()).done;){var n=_slicedToArray(o.value,2),a=n[0],i=n[1];if(null!==t||i.priority){var u=this.fields.get(a).value_as_text(e-1);null!==u&&l.push([i.label,u])}}}catch(e){r.e(e)}finally{r.f()}if(0===l.length)return this.globals.msg_no_fields();if(1===l.length)return l[0][1];for(var s=[],p=0,c=l;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,o,l){var r,n=new Map,a=_createForOfIteratorHelper(this.app.controls.values());try{for(a.s();!(r=a.n()).done;){var i=r.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);n.set(u,p),null!==o&&o.has(u)&&(p.errors=o.get(u)),null!==l&&l.has(u)&&(p.lookupdata=l.get(u))}}catch(e){a.e(e)}finally{a.f()}this._fields=n,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:o.symbols.repr,value:function value(){var e,t=["<Record id=",o._repr(this.id)],l=_createForOfIteratorHelper(this.fields.values());try{for(l.s();!(e=l.n()).done;){var r=e.value;r.control.priority&&!r.is_empty()&&(t.push(" v_"),t.push(r.control.identifier),t.push("="),t.push(o._repr(r.value)))}}catch(e){l.e(e)}finally{l.f()}return t.push(" state="),t.push(o._repr(this.state)),t.push(">"),t.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 o=e.value;this._values.set(o.control.identifier,o.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:"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 e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o._ismap(e)){var t,l=_createForOfIteratorHelper(e.entries());try{for(l.s();!(t=l.n()).done;){var r=_slicedToArray(t.value,2),n=r[0],a=r[1];if(!this.fields.has(n))throw new o.ArgumentError("update() get an unexpected keyword argument "+o._repr(n));fields.get(n).value=a}}catch(e){l.e(e)}finally{l.f()}}else{if(!o._isobject(e))throw new o.TypeError("values must be an object or a Map");for(var i in e){if(!this.fields.has(i))throw new o.ArgumentError("update() get an unexpected keyword argument "+o._repr(i));record.fields.get(i).value=e[i]}}this.app.globals.handler.save(this)}},{key:"template_url",value:function template_url(e,t){return url_with_params("/gateway/apps/"+this.app.id+"/"+this.id,["template",e],t)}},{key:"edit_embedded_url",value:function edit_embedded_url(e){return url_with_params("/dateneingabe/"+this.app.id+"/"+this.id+"/edit",e)}},{key:"edit_standalone_url",value:function edit_standalone_url(e){return url_with_params("/gateway/apps/"+this.app.id+"/"+this.id+"/edit",e)}},{key:"search",value:function search(e){for(var t in e){var l=e[t];if(o._bool(l)&&!this.fields.get(t).search(l))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:o.symbols.getattr,value:function value(e){return e.startsWith("c_")?this.children.get(e.substr(2)):e.startsWith("f_")?this.fields.get(e.substr(2)):e.startsWith("v_")?this.fields.get(e.substr(2)).value:_get(_getPrototypeOf(Record.prototype),o.symbols.getattr,this).call(this,e)}},{key:o.symbols.setattr,value:function value(e,t){e.startsWith("c_")?this.children[e.substr(2)]=t:e.startsWith("v_")?this.fields.get(e.substr(2)).value=t:_get(_getPrototypeOf(Record.prototype),o.symbols.setattr,this).call(this,e,t)}}]),Record}(l);f.prototype._ul4onattrs=["app","createdat","createdby","updatedat","updatedby","updatecount","_sparsevalues","attachments","children","errors","_sparsefielderrors","_sparsefieldlookupdata"],f.prototype._ul4attrs=new Set(["id","app","createdat","createdby","updatedat","updatedby","updatecount","values","fields","attachments","children","errors","template_url","edit_embedded_url","edit_standalone_url"]),o.expose(f.prototype.is_dirty,[]),o.expose(f.prototype.has_errors,[]),o.expose(f.prototype.delete,[]),o.expose(f.prototype.save,[]),o.expose(f.prototype.update,["values","**"],{needsobject:!0}),o.expose(f.prototype.template_url,["identifier","p","params","**"]),o.expose(f.prototype.edit_embedded_url,["params","**"]),o.expose(f.prototype.edit_standalone_url,["params","**"]);var v=function(e){_inherits(FieldType,e);var t=_createSuper(FieldType);function FieldType(){return _classCallCheck(this,FieldType),t.apply(this,arguments)}return _createClass(FieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof C}}]),FieldType}(o.Type),k=new v("la","Field","Holds the value of a field of a record (and related information)"),C=function(e){_inherits(Field,e);var t=_createSuper(Field);function Field(e,o,l){var r;return _classCallCheck(this,Field),(r=t.call(this,null)).control=e,r.record=o,r._label=null,r._lookupdata=null,r.errors=[],r._value=null,r._in_form()||(r.value=l),r._dirty=!1,r._enabled=!0,r._writable=!0,r._visible=!0,r}return _createClass(Field,[{key:o.symbols.type,value:function value(){return k}},{key:"value",get:function get(){return this._in_form()?this._get_dom_value():this._value}},{key:"value",set:function set(e){var t=this._value,l={value:e,errors:[]};this._validate(l),o._ne(t,l.value)&&(null!==this.record._values&&this.record._values.set(this.control.identifier,l.value),this._value=l.value,this._dirty=!0),this.errors=l.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:"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:"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:"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(e){return'"'.concat(this.label,"\" doesn't support the type ").concat(o._type(e).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(e){return"The option ".concat(o._repr(e),' for "').concat(this.label,"\" doesn't belong to this lookup!")}},{key:"msg_lookup_unknownkey",value:function msg_lookup_unknownkey(e){return"The option ".concat(o._repr(e),' for "').concat(this.label,'" is unknown!')}},{key:"msg_applookup_wrongrecord",value:function msg_applookup_wrongrecord(e){return"The record ".concat(o._repr(e),' for "').concat(this.label,"\" doesn't belong to the correct app!")}},{key:"msg_applookup_unknownkey",value:function msg_applookup_unknownkey(e){return"The record ".concat(o._repr(e),' 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:"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,o=!e,l=_createForOfIteratorHelper(this._dom_controls);try{for(l.s();!(t=l.n()).done;){t.value.disabled=o}}catch(e){l.e(e)}finally{l.f()}this._dom_root.classList.toggle("llft-control-readonly",o)}this._enabled=e}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){this._writable=e}},{key:o.symbols.repr,value:function value(){var e="<"+this.constructor.name+" identifier=";return e+=o._repr(this.control.identifier),this._dirty&&(e+=" is_dirty()=True"),this.errors.length>0&&(e+=" has_errors()=True"),e+=">"}},{key:o.symbols.setattr,value:function value(e,t){"value"===e?this.value=t:"visible"===e?this.visible=o._bool(t):"enabled"===e?this.enabled=o._bool(t):"writable"===e?this.writable=o._bool(t):_get(_getPrototypeOf(Field.prototype),o.symbols.setattr,this).call(this,e,t)}}]),Field}(l);C.prototype._ul4onattrs=["control","record","label","value","errors","_visible","_enabled","_writable"],C.prototype._ul4attrs=new Set(["control","record","label","value","errors","visible","enabled","writable"]),C.prototype._inputevent="input";var m=new(function(e){_inherits(BoolFieldType,e);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 g}}]),BoolFieldType}(v))("la","BoolField","Holds the value of a bool field of a record (and related information)"),g=function(e){_inherits(BoolField,e);var t=_createSuper(BoolField);function BoolField(){return _classCallCheck(this,BoolField),t.apply(this,arguments)}return _createClass(BoolField,[{key:o.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)):"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}(C),b=new(function(e){_inherits(IntFieldType,e);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 T}}]),IntFieldType}(v))("la","IntField","Holds the value of an int field of a record (and related information)"),T=function(e){_inherits(IntField,e);var t=_createSuper(IntField);function IntField(){return _classCallCheck(this,IntField),t.apply(this,arguments)}return _createClass(IntField,[{key:o.symbols.type,value:function value(){return b}},{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,o=!e,l=_createForOfIteratorHelper(this._dom_controls);try{for(l.s();!(t=l.n()).done;){t.value.readOnly=o}}catch(e){l.e(e)}finally{l.f()}}_set(_getPrototypeOf(IntField.prototype),"writable",e,this,!0)}}]),IntField}(C),L=new(function(e){_inherits(NumberFieldType,e);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 A}}]),NumberFieldType}(v))("la","NumberField","Holds the value of a number field of a record (and related information)"),A=function(e){_inherits(NumberField,e);var t=_createSuper(NumberField);function NumberField(){return _classCallCheck(this,NumberField),t.apply(this,arguments)}return _createClass(NumberField,[{key:o.symbols.type,value:function value(){return L}},{key:"_parse",value:function _parse(e){if(null===e)return null;for(var t=e,o="",l=0,r=0,n=0;n<e.length;++n){var a=e[n];","==a?(l++,o+=a):"."==a&&(r++,o+=a)}var i=null;if(0==l)r<=1||(i="de");else if(1==l)i=1==r?".,"==o?"de":"en":"de";else{if(!(r<=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(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._parse(e.value);null!==t?(t=this._bound_value(t),null!==this.control.precision&&(t=o._round(t,this.control.precision)),e.value=t):e.errors.push(this.msg_number_format(e.value))}else if("number"==typeof e.value){var l=this._bound_value(e.value);null!==this.control.precision&&(l=o._round(l,this.control.precision)),e.value=l}else e.errors.push(this.msg_field_wrong_type(e.value)),e.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 e=_get(_getPrototypeOf(NumberField.prototype),"_get_dom_value",this).call(this);if(e){if("string"==typeof e){var t=this._parse(e);null!==t&&(e=t)}"number"==typeof e&&(null!==this.control.precision&&(e=o._round(e,this.control.precision)),e=this._bound_value(e))}else e=null;return e}},{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,o=!e,l=_createForOfIteratorHelper(this._dom_controls);try{for(l.s();!(t=l.n()).done;){t.value.readOnly=o}}catch(e){l.e(e)}finally{l.f()}}_set(_getPrototypeOf(NumberField.prototype),"writable",e,this,!0)}}]),NumberField}(C),w=function(e){_inherits(StringFieldType,e);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 M}}]),StringFieldType}(v),S=new w("la","StringField","Holds the value of a string field of a record (and related information)"),M=function(e){_inherits(StringField,e);var t=_createSuper(StringField);function StringField(){return _classCallCheck(this,StringField),t.apply(this,arguments)}return _createClass(StringField,[{key:o.symbols.type,value:function value(){return S}},{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,o=this.control.maxlength;null!==t&&e.value.length<t&&e.errors.push(this.msg_string_tooshort(e.value)),null!==o&&e.value.length>o&&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,o=!e,l=_createForOfIteratorHelper(this._dom_controls);try{for(l.s();!(t=l.n()).done;){t.value.readOnly=o}}catch(e){l.e(e)}finally{l.f()}}_set(_getPrototypeOf(StringField.prototype),"writable",e,this,!0)}},{key:"value_as_text",value:function value_as_text(){return this.value}}]),StringField}(C),x=new(function(e){_inherits(PasswordFieldType,e);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 I}}]),PasswordFieldType}(w))("la","PasswordField","Holds the value of a string/password field of a record (and related information)"),I=function(e){_inherits(PasswordField,e);var t=_createSuper(PasswordField);function PasswordField(){return _classCallCheck(this,PasswordField),t.apply(this,arguments)}return _createClass(PasswordField,[{key:o.symbols.type,value:function value(){return x}}]),PasswordField}(M),H=new(function(e){_inherits(EmailFieldType,e);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 O}}]),EmailFieldType}(w))("la","EmailField","Holds the value of a string/email field of a record (and related information)"),O=function(e){_inherits(EmailField,e);var t=_createSuper(EmailField);function EmailField(){return _classCallCheck(this,EmailField),t.apply(this,arguments)}return _createClass(EmailField,[{key:o.symbols.type,value:function value(){return H}},{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}(M),R=new(function(e){_inherits(URLFieldType,e);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 D}}]),URLFieldType}(w))("la","URLField","Holds the value of a string/url field of a record (and related information)"),D=function(e){_inherits(URLField,e);var t=_createSuper(URLField);function URLField(){return _classCallCheck(this,URLField),t.apply(this,arguments)}return _createClass(URLField,[{key:o.symbols.type,value:function value(){return R}},{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}(M),P=new(function(e){_inherits(TelFieldType,e);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 B}}]),TelFieldType}(w))("la","TelField","Holds the value of a string/tel field of a record (and related information)"),B=function(e){_inherits(TelField,e);var t=_createSuper(TelField);function TelField(){return _classCallCheck(this,TelField),t.apply(this,arguments)}return _createClass(TelField,[{key:o.symbols.type,value:function value(){return P}},{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}(M),N=new(function(e){_inherits(TextAreaFieldType,e);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 U}}]),TextAreaFieldType}(w))("la","TextAreaField","Holds the value of a string/textarea field of a record (and related information)"),U=function(e){_inherits(TextAreaField,e);var t=_createSuper(TextAreaField);function TextAreaField(){return _classCallCheck(this,TextAreaField),t.apply(this,arguments)}return _createClass(TextAreaField,[{key:o.symbols.type,value:function value(){return N}}]),TextAreaField}(M),V=new(function(e){_inherits(HTMLFieldType,e);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 E}}]),HTMLFieldType}(w))("la","HTMLField","Holds the value of a string/html field of a record (and related information)"),E=function(e){_inherits(HTMLField,e);var t=_createSuper(HTMLField);function HTMLField(){return _classCallCheck(this,HTMLField),t.apply(this,arguments)}return _createClass(HTMLField,[{key:o.symbols.type,value:function value(){return V}}]),HTMLField}(M),G=new(function(e){_inherits(GeoFieldType,e);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 j}}]),GeoFieldType}(v))("la","GeoField","Holds the value of a geo field of a record (and related information)"),j=function(e){_inherits(GeoField,e);var t=_createSuper(GeoField);function GeoField(){return _classCallCheck(this,GeoField),t.apply(this,arguments)}return _createClass(GeoField,[{key:o.symbols.type,value:function value(){return G}},{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 o=e.value;if(o.id.endsWith("_geoinfo")){var l=o.value;if(l)return l=JSON.parse(l),new Go(l.geometry.coordinates[0],l.geometry.coordinates[1],l.properties.formatted_address)}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(e){if(null===e){var t,l=_createForOfIteratorHelper(this._dom_controls);try{for(l.s();!(t=l.n()).done;){t.value.value=null}}catch(e){l.e(e)}finally{l.f()}}else{var r,n=_createForOfIteratorHelper(this._dom_controls);try{for(n.s();!(r=n.n()).done;){var a=r.value;if(a.id.endsWith("_geoinfo")){var i={type:"Feature",geometry:{coordinates:[e.lat,e.long]},properties:{formatted_address:e.info}};a.value=o._asjson(i)}else a.value=e.info}}catch(e){n.e(e)}finally{n.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 Go||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}}]),GeoField}(C);j.prototype._inputevent="llgeo";var q=function(e){_inherits(FileFieldType,e);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 Y}}]),FileFieldType}(v),W=new q("la","FileField","Holds the value of a file field of a record (and related information)"),Y=function(e){_inherits(FileField,e);var t=_createSuper(FileField);function FileField(){return _classCallCheck(this,FileField),t.apply(this,arguments)}return _createClass(FileField,[{key:o.symbols.type,value:function value(){return W}},{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 Vo||(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}(C),z=new(function(e){_inherits(FileSignatureFieldType,e);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 J}}]),FileSignatureFieldType}(q))("la","FileSignatureField","Holds the value of a file/signature field of a record (and related information)"),J=function(e){_inherits(FileSignatureField,e);var t=_createSuper(FileSignatureField);function FileSignatureField(){return _classCallCheck(this,FileSignatureField),t.apply(this,arguments)}return _createClass(FileSignatureField,[{key:o.symbols.type,value:function value(){return z}},{key:"_validate",value:function _validate(e){_get(_getPrototypeOf(FileSignatureField.prototype),"_validate",this).call(this,e)}}]),FileSignatureField}(Y),K=function(e){_inherits(DateFieldBaseType,e);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 Z}}]),DateFieldBaseType}(v),$=new K("la","DateFieldBase","Holds the value of a date field of a record (and related information)"),Z=function(e){_inherits(DateFieldBase,e);var t=_createSuper(DateFieldBase);function DateFieldBase(){return _classCallCheck(this,DateFieldBase),t.apply(this,arguments)}return _createClass(DateFieldBase,[{key:o.symbols.type,value:function value(){return $}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e?null:"string"==typeof e?e:o._format(e,this.control.formatstring())}},{key:"_parse",value:function _parse(e,t){var o=null,l=null,r=null,n=0,a=0,i=0,u=null;function _int(e,t,o,l){return(e=e.substring(0,t)).length!=t?null:(e=parseInt(e,10),isNaN(e)||e<o||e>l?null:e)}for(;e;){if(!t)return null;if(t.startsWith("%Y")){if(null===(o=_int(e,4)))return null;e=e.substring(4),t=t.substring(2)}else if(t.startsWith("%y")){if(null===(o=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%m")){if(null===(l=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%d")){if(null===(r=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%H")){if(null===(n=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%I")){if(null===(n=_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===o)return null;if(null===l||l<1||l>12)return null;if(null===r||r<1||r>31)return null;if(null===u){if(n<0||n>23)return null}else{if(n<0||n>11)return null;u&&(n+=12)}return a<0||a>59||a<0||a>59||i<0||i>60?null:new Date(o,l-1,r,n,a,i)}},{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(e.value instanceof Date)e.value=this._convert(e.value);else if(e.value instanceof o.Date_)e.value=this._convert(e.value._date);else if("string"==typeof e.value){var t,l=null,r=_createForOfIteratorHelper(this.control.formatstrings_parse());try{for(r.s();!(t=r.n()).done;){var n=t.value;if(null!==(l=this._parse(e.value,n)))break}}catch(e){r.e(e)}finally{r.f()}null!==l?e.value=this._convert(l):e.errors.push(this.msg_date_format(e.value))}else 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(DateFieldBase.prototype),"_get_dom_value",this).call(this);if(!e)return null;var t,o=_createForOfIteratorHelper(this.control.formatstrings_parse());try{for(o.s();!(t=o.n()).done;){var l=t.value,r=this._parse(e,l);if(null!==r)return this._convert(r)}}catch(e){o.e(e)}finally{o.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(e){e=null!==e?o._format(e,this.control.formatstring(),this.globals.lang):"",_get(_getPrototypeOf(DateFieldBase.prototype),"_set_dom_value",this).call(this,e)}}]),DateFieldBase}(C),Q=new(function(e){_inherits(DateFieldType,e);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 X}}]),DateFieldType}(K))("la","DateField","Holds the value of a date/date field of a record (and related information)"),X=function(e){_inherits(DateField,e);var t=_createSuper(DateField);function DateField(){return _classCallCheck(this,DateField),t.apply(this,arguments)}return _createClass(DateField,[{key:o.symbols.type,value:function value(){return Q}},{key:"_convert",value:function _convert(e){return new o.Date_(e.getFullYear(),e.getMonth()+1,e.getDate())}}]),DateField}(Z),ee=new(function(e){_inherits(DatetimeMinuteFieldType,e);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 te}}]),DatetimeMinuteFieldType}(K))("la","DatetimeMinuteField","Holds the value of a date/datetimeminute field of a record (and related information)"),te=function(e){_inherits(DatetimeMinuteField,e);var t=_createSuper(DatetimeMinuteField);function DatetimeMinuteField(){return _classCallCheck(this,DatetimeMinuteField),t.apply(this,arguments)}return _createClass(DatetimeMinuteField,[{key:o.symbols.type,value:function value(){return ee}},{key:"_convert",value:function _convert(e){return e.setSeconds(0),e.setMilliseconds(0),e}}]),DatetimeMinuteField}(Z),oe=new(function(e){_inherits(DatetimeSecondFieldType,e);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 le}}]),DatetimeSecondFieldType}(K))("la","DatetimeSecondField","Holds the value of a date/datetimesecond field of a record (and related information)"),le=function(e){_inherits(DatetimeSecondField,e);var t=_createSuper(DatetimeSecondField);function DatetimeSecondField(){return _classCallCheck(this,DatetimeSecondField),t.apply(this,arguments)}return _createClass(DatetimeSecondField,[{key:o.symbols.type,value:function value(){return oe}},{key:"_convert",value:function _convert(e){return e.setMilliseconds(0),e}}]),DatetimeSecondField}(Z),re=function(e){_inherits(ChoiceFieldBase,e);var t=_createSuper(ChoiceFieldBase);function ChoiceFieldBase(){return _classCallCheck(this,ChoiceFieldBase),t.apply(this,arguments)}return _createClass(ChoiceFieldBase,[{key:"_make_option",value:function _make_option(e,t,o){return element("option",o,{value:t,class:t===this.control.nonekey?"la-none-option":null,selected:e?"selected":null})}},{key:"_set_dom_lookupdata_select",value:function _set_dom_lookupdata_select(e){var t;null===e&&(e=this.control.lookup_data),o._isobject(e)&&(e=new Map(Object.entries(e)));var l,r=!1,n=new Set,a=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option:checked"));try{for(a.s();!(l=a.n()).done;){var i=l.value.getAttribute("value");e.has(i)?n.add(i):i===this.control.nonekey&&(r=!0)}}catch(e){a.e(e)}finally{a.f()}var u=[];null!==this.control.nonekey&&u.push(this._make_option(r,this.control.nonekey,null!==this.control.nonelabel?this.control.nonelabel:this.globals.msg_nothing_selected()));var s,p=_createForOfIteratorHelper(e);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=c[1];u.push(this._make_option(n.has(_),_,this._make_label(h)))}}catch(e){p.e(e)}finally{p.f()}(t=this._dom_control).replaceChildren.apply(t,u)}},{key:"_set_dom_lookupdata_input",value:function _set_dom_lookupdata_input(e){null===e?e=this.control.lookupdata:o._isobject(e)&&(e=new Map(Object.entries(e)));var t,l=!1,r=new Set,n=_createForOfIteratorHelper(this._dom_controls);try{for(n.s();!(t=n.n()).done;){var a=t.value,i=a.getAttribute("value");a.checked&&(e.has(i)?r.add(i):i===this.control.nonekey&&(l=!0))}}catch(e){n.e(e)}finally{n.f()}var u=this._dom_root.querySelector("input[value="+this.control.nonekey+"]");null!==u&&(u.checked=l);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+"]");e.has(_)?(h.style.display="inline",y.style.display="inline",y.innerText=this._make_label(e.get(_))):(h.style.display="none",y.style.display="none",y.checked=!1)}}catch(e){p.e(e)}finally{p.f()}}}]),ChoiceFieldBase}(C),ne=function(e){_inherits(LookupFieldBaseType,e);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 ie}}]),LookupFieldBaseType}(v),ae=new ne("la","LookupFieldBase","Base type of LookupField and MultipleLookupField"),ie=function(e){_inherits(LookupFieldBase,e);var t=_createSuper(LookupFieldBase);function LookupFieldBase(){return _classCallCheck(this,LookupFieldBase),t.apply(this,arguments)}return _createClass(LookupFieldBase,[{key:o.symbols.type,value:function value(){return ae}},{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(e){return"string"==typeof e?e:e instanceof To?e.label:o._str(e)}},{key:"_find_lookupitem",value:function _find_lookupitem(e){var t=e.value;if("string"==typeof t){if(null===this.lookupdata)return;var o=this.control.lookupdata.get(t);if(void 0===o)if(this.control.autoexpandable){var l,r=_createForOfIteratorHelper(this.lookupdata.values());try{for(r.s();!(l=r.n()).done;){var n=l.value;if(t===n.label)return void(e.value=n)}}catch(e){r.e(e)}finally{r.f()}}else e.errors.push(this.msg_lookup_unknownkey(t)),e.value=null;else e.value=o}else if(t instanceof To){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}(re),ue=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 pe}}]),LookupFieldType}(ne),se=new ue("la","LookupField","Holds the value of a lookup field of a record (and related information)"),pe=function(e){_inherits(LookupField,e);var t=_createSuper(LookupField);function LookupField(){return _classCallCheck(this,LookupField),t.apply(this,arguments)}return _createClass(LookupField,[{key:o.symbols.type,value:function value(){return se}},{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.nonekey===t?(this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=null):this._find_lookupitem(e)}}]),LookupField}(ie),ce=new(function(e){_inherits(LookupRadioFieldType,e);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 _e}}]),LookupRadioFieldType}(ue))("la","LookupRadioField","Holds the value of a lookup/radio field of a record (and related information)"),_e=function(e){_inherits(LookupRadioField,e);var t=_createSuper(LookupRadioField);function LookupRadioField(){return _classCallCheck(this,LookupRadioField),t.apply(this,arguments)}return _createClass(LookupRadioField,[{key:o.symbols.type,value:function value(){return ce}},{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 o=e.value;if(o.checked){var l=o.getAttribute("value");return this.control.lookupdata.get(l)}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(e){e instanceof To&&(e=e.key),null===e&&(e=this.control.nonekey);var t,o=_createForOfIteratorHelper(this._dom_controls);try{for(o.s();!(t=o.n()).done;){var l=t.value;l.checked=l.getAttribute("value")===e}}catch(e){o.e(e)}finally{o.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_input(e)}}]),LookupRadioField}(pe),he=new(function(e){_inherits(LookupSelectFieldType,e);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 ye}}]),LookupSelectFieldType}(ue))("la","LookupSelectField","Holds the value of a lookup/select field of a record (and related information)"),ye=function(e){_inherits(LookupSelectField,e);var t=_createSuper(LookupSelectField);function LookupSelectField(){return _classCallCheck(this,LookupSelectField),t.apply(this,arguments)}return _createClass(LookupSelectField,[{key:o.symbols.type,value:function value(){return he}},{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.nonekey?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.nonekey)}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),LookupSelectField}(pe),de=new(function(e){_inherits(LookupChoiceFieldType,e);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 fe}}]),LookupChoiceFieldType}(ue))("la","LookupChoiceField","Holds the value of a lookup/choice field of a record (and related information)"),fe=function(e){_inherits(LookupChoiceField,e);var t=_createSuper(LookupChoiceField);function LookupChoiceField(){return _classCallCheck(this,LookupChoiceField),t.apply(this,arguments)}return _createClass(LookupChoiceField,[{key:o.symbols.type,value:function value(){return de}}]),LookupChoiceField}(pe),ve=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 Ce}}]),MultipleLookupFieldType}(ne),ke=new ve("la","MultipleLookupField","Holds the value of a multiple lookup field of a record (and related information)"),Ce=function(e){_inherits(MultipleLookupField,e);var t=_createSuper(MultipleLookupField);function MultipleLookupField(){return _classCallCheck(this,MultipleLookupField),t.apply(this,arguments)}return _createClass(MultipleLookupField,[{key:o.symbols.type,value:function value(){return ke}},{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,o="[object Array]"===Object.prototype.toString.call(t);if(null===t||""===t||this.control.nonekey===t||o&&0===t.length)this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=[];else if(o){var l,r=[],n=_createForOfIteratorHelper(t);try{for(n.s();!(l=n.n()).done;){var a={value:l.value,errors:[]};this._find_lookupitem(a),a.errors.length>0?e.errors=[].concat(_toConsumableArray(e.errors),_toConsumableArray(a.errors)):r.push(a.value)}}catch(e){n.e(e)}finally{n.f()}e.value=r}else this._find_lookupitem(e),e.errors.length>0?e.value=[]:e.value=[e.value]}}]),MultipleLookupField}(ie),me=new(function(e){_inherits(MultipleLookupCheckboxFieldType,e);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 ge}}]),MultipleLookupCheckboxFieldType}(ve))("la","MultipleLookupCheckboxField","Holds the value of a multiplelookup/radio field of a record (and related information)"),ge=function(e){_inherits(MultipleLookupCheckboxField,e);var t=_createSuper(MultipleLookupCheckboxField);function MultipleLookupCheckboxField(){return _classCallCheck(this,MultipleLookupCheckboxField),t.apply(this,arguments)}return _createClass(MultipleLookupCheckboxField,[{key:o.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=[],o=_createForOfIteratorHelper(this._dom_controls);try{for(o.s();!(e=o.n()).done;){var l=e.value;if(l.checked){var r=l.getAttribute("value");t.push(this.control.lookupdata.get(r))}}}catch(e){o.e(e)}finally{o.f()}return t}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t);var o,l=new Set,r=_createForOfIteratorHelper(t.value);try{for(r.s();!(o=r.n()).done;){var n=o.value;l.add(n.key)}}catch(e){r.e(e)}finally{r.f()}var a,i=_createForOfIteratorHelper(this._dom_controls);try{for(i.s();!(a=i.n()).done;){var u=a.value;u.checked=l.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}(Ce),be=new(function(e){_inherits(MultipleLookupSelectFieldType,e);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 Te}}]),MultipleLookupSelectFieldType}(ve))("la","MultipleLookupSelectField","Holds the value of a multiplelookup/select field of a record (and related information)"),Te=function(e){_inherits(MultipleLookupSelectField,e);var t=_createSuper(MultipleLookupSelectField);function MultipleLookupSelectField(){return _classCallCheck(this,MultipleLookupSelectField),t.apply(this,arguments)}return _createClass(MultipleLookupSelectField,[{key:o.symbols.type,value:function value(){return be}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=[],o=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option"));try{for(o.s();!(e=o.n()).done;){var l=e.value;l.selected&&t.push(this.control.lookupdata.get(l.getAttribute("value")))}}catch(e){o.e(e)}finally{o.f()}return t}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t);var o,l=new Set,r=_createForOfIteratorHelper(t.value);try{for(r.s();!(o=r.n()).done;){var n=o.value;l.add(n.key)}}catch(e){r.e(e)}finally{r.f()}var a,i=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option"));try{for(i.s();!(a=i.n()).done;){var u=a.value;u.selected=l.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}(Ce),Le=new(function(e){_inherits(MultipleLookupChoiceFieldType,e);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 Fe}}]),MultipleLookupChoiceFieldType}(ve))("la","MultipleLookupChoiceField","Holds the value of a multiplelookup/choice field of a record (and related information)"),Fe=function(e){_inherits(MultipleLookupChoiceField,e);var t=_createSuper(MultipleLookupChoiceField);function MultipleLookupChoiceField(){return _classCallCheck(this,MultipleLookupChoiceField),t.apply(this,arguments)}return _createClass(MultipleLookupChoiceField,[{key:o.symbols.type,value:function value(){return Le}}]),MultipleLookupChoiceField}(Ce),Ae=function(e){_inherits(AppLookupFieldBaseType,e);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 Se}}]),AppLookupFieldBaseType}(v),we=new Ae("la","AppLookupFieldBase","Base type of AppLookupField and MultipleAppLookupField"),Se=function(e){_inherits(AppLookupFieldBase,e);var t=_createSuper(AppLookupFieldBase);function AppLookupFieldBase(){return _classCallCheck(this,AppLookupFieldBase),t.apply(this,arguments)}return _createClass(AppLookupFieldBase,[{key:o.symbols.type,value:function value(){return we}},{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(e){return"string"==typeof e?e:e instanceof f?e.as_text(this.control.lookup_controls):o._str(e)}},{key:"_find_record",value:function _find_record(e){var t=e.value;if("string"==typeof t){var o=null!==this.control.lookup_app.records?this.control.lookup_app.records.get(t):void 0;void 0===o?(e.errors.push(this.msg_applookup_unknownkey(t)),e.value=null):e.value=o}else t instanceof f?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:o.symbols.setattr,value:function value(e,t){"lookupdata"===e?this.lookupdata=t:_get(_getPrototypeOf(AppLookupFieldBase.prototype),o.symbols.setattr,this).call(this,e,t)}}]),AppLookupFieldBase}(re);Se.prototype._ul4attrs=new Set([].concat(_toConsumableArray(C.prototype._ul4attrs),["lookupdata"]));var Me=function(e){_inherits(AppLookupFieldType,e);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 Ie}}]),AppLookupFieldType}(Ae),xe=new Me("la","AppLookupField","Holds the value of a applookup field of a record (and related information)"),Ie=function(e){_inherits(AppLookupField,e);var t=_createSuper(AppLookupField);function AppLookupField(){return _classCallCheck(this,AppLookupField),t.apply(this,arguments)}return _createClass(AppLookupField,[{key:o.symbols.type,value:function value(){return xe}},{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}(Se),He=new(function(e){_inherits(AppLookupSelectFieldType,e);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 Oe}}]),AppLookupSelectFieldType}(Me))("la","AppLookupSelectField","Holds the value of a `applookup`/`select` field of a record (and related information)"),Oe=function(e){_inherits(AppLookupSelectField,e);var t=_createSuper(AppLookupSelectField);function AppLookupSelectField(){return _classCallCheck(this,AppLookupSelectField),t.apply(this,arguments)}return _createClass(AppLookupSelectField,[{key:o.symbols.type,value:function value(){return He}},{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.nonekey)}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),AppLookupSelectField}(Ie),Re=new(function(e){_inherits(AppLookupRadioFieldType,e);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 De}}]),AppLookupRadioFieldType}(Me))("la","AppLookupRadioField","Holds the value of a `applookup`/`radio` field of a record (and related information)"),De=function(e){_inherits(AppLookupRadioField,e);var t=_createSuper(AppLookupRadioField);function AppLookupRadioField(){return _classCallCheck(this,AppLookupRadioField),t.apply(this,arguments)}return _createClass(AppLookupRadioField,[{key:o.symbols.type,value:function value(){return Re}}]),AppLookupRadioField}(Ie),Pe=new(function(e){_inherits(AppLookupChoiceFieldType,e);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 Be}}]),AppLookupChoiceFieldType}(Me))("la","AppLookupChoiceField","Holds the value of a `applookup`/`choice` field of a record (and related information)"),Be=function(e){_inherits(AppLookupChoiceField,e);var t=_createSuper(AppLookupChoiceField);function AppLookupChoiceField(){return _classCallCheck(this,AppLookupChoiceField),t.apply(this,arguments)}return _createClass(AppLookupChoiceField,[{key:o.symbols.type,value:function value(){return Pe}}]),AppLookupChoiceField}(Ie),Ne=function(e){_inherits(MultipleAppLookupFieldType,e);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 Ve}}]),MultipleAppLookupFieldType}(Ae),Ue=new Ne("la","MultipleAppLookupField","Holds the value of a multiple applookup field of a record (and related information)"),Ve=function(e){_inherits(MultipleAppLookupField,e);var t=_createSuper(MultipleAppLookupField);function MultipleAppLookupField(){return _classCallCheck(this,MultipleAppLookupField),t.apply(this,arguments)}return _createClass(MultipleAppLookupField,[{key:o.symbols.type,value:function value(){return Ue}},{key:"is_empty",value:function is_empty(){return 0===this._value.length}},{key:"_validate",value:function _validate(e){var t=e.value,o="[object Array]"===Object.prototype.toString.call(t);if(null===t||""===t||this.control.nonekey===t||o&&0===t.length)this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=[];else if(o){var l,r=[],n=_createForOfIteratorHelper(t);try{for(n.s();!(l=n.n()).done;){var a={value:l.value,errors:[]};this._find_record(a),a.errors.length>0?e.errors=[].concat(_toConsumableArray(e.errors),_toConsumableArray(a.errors)):r.push(a.value)}}catch(e){n.e(e)}finally{n.f()}e.value=r}else this._find_record(e),e.errors.length>0?e.value=[]:e.value=[e.value]}}]),MultipleAppLookupField}(Se),Ee=new(function(e){_inherits(MultipleAppLookupCheckboxFieldType,e);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 Ge}}]),MultipleAppLookupCheckboxFieldType}(Ne))("la","MultipleAppLookupCheckboxField","Holds the value of a `multipleapplookup`/`checkbox` field of a record (and related information)"),Ge=function(e){_inherits(MultipleAppLookupCheckboxField,e);var t=_createSuper(MultipleAppLookupCheckboxField);function MultipleAppLookupCheckboxField(){return _classCallCheck(this,MultipleAppLookupCheckboxField),t.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxField,[{key:o.symbols.type,value:function value(){return Ee}}]),MultipleAppLookupCheckboxField}(Ve),je=new(function(e){_inherits(MultipleAppLookupSelectFieldType,e);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}(Ne))("la","MultipleAppLookupSelectField","Holds the value of a `multipleapplookup`/`select` field of a record (and related information)"),qe=function(e){_inherits(MultipleAppLookupSelectField,e);var t=_createSuper(MultipleAppLookupSelectField);function MultipleAppLookupSelectField(){return _classCallCheck(this,MultipleAppLookupSelectField),t.apply(this,arguments)}return _createClass(MultipleAppLookupSelectField,[{key:o.symbols.type,value:function value(){return je}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),MultipleAppLookupSelectField}(Ve),We=new(function(e){_inherits(MultipleAppLookupChoiceFieldType,e);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 Ye}}]),MultipleAppLookupChoiceFieldType}(Ne))("la","MultipleAppLookupChoiceField","Holds the value of a `multipleapplookup`/`choice` field of a record (and related information)"),Ye=function(e){_inherits(MultipleAppLookupChoiceField,e);var t=_createSuper(MultipleAppLookupChoiceField);function MultipleAppLookupChoiceField(){return _classCallCheck(this,MultipleAppLookupChoiceField),t.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceField,[{key:o.symbols.type,value:function value(){return We}}]),MultipleAppLookupChoiceField}(Ve),ze=function(e){_inherits(ControlType,e);var t=_createSuper(ControlType);function ControlType(){return _classCallCheck(this,ControlType),t.apply(this,arguments)}return _createClass(ControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ke}}]),ControlType}(o.Type),Je=new ze("la","Control","Metainformation about a field in a LivingApps application"),Ke=function(e){_inherits(Control,e);var t=_createSuper(Control);function Control(){return _classCallCheck(this,Control),t.apply(this,arguments)}return _createClass(Control,[{key:o.symbols.type,value:function value(){return Je}},{key:o.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+o._repr(this.id)+" identifier="+o._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:"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:"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=this._view_control();return null!==e&&e.required}},{key:"mode",get:function get(){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:"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}(l);Ke.prototype.type=null,Ke.prototype.subtype=null,Ke.prototype._ul4onattrs=["identifier","fieldname","app","_label","priority","order","ininsertprocedure","inupdateprocedure"],Ke.prototype._ul4attrs=new Set(["id","identifier","fieldname","app","priority","order","ininsertprocedure","inupdateprocedure","fulltype","label","top","left","width","height","liveupdate","tabindex","required","mode","labelpos","autoalign","in_active_view"]),Ke.prototype._cssclass_root="llft-control",Ke.prototype._cssclass_control="input";var $e=new(function(e){_inherits(BoolControlType,e);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 Ze}}]),BoolControlType}(ze))("la","BoolControl","A LivingApps boolean field (type 'bool')"),Ze=function(e){_inherits(BoolControl,e);var t=_createSuper(BoolControl);function BoolControl(){return _classCallCheck(this,BoolControl),t.apply(this,arguments)}return _createClass(BoolControl,[{key:o.symbols.type,value:function value(){return $e}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator&&t.value===e}}]),BoolControl}(Ke);Ze.prototype.type="bool",Ze.prototype.fieldtype=g;var Qe=new(function(e){_inherits(IntControlType,e);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 Xe}}]),IntControlType}(ze))("la","IntControl","A LivingApps integer field (type 'int')"),Xe=function(e){_inherits(IntControl,e);var t=_createSuper(IntControl);function IntControl(){return _classCallCheck(this,IntControl),t.apply(this,arguments)}return _createClass(IntControl,[{key:o.symbols.type,value:function value(){return Qe}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator&&t.value===e}}]),IntControl}(Ke);Xe.prototype.type="int",Xe.prototype.fieldtype=T;var et=function(e){_inherits(PlaceholderControlType,e);var t=_createSuper(PlaceholderControlType);function PlaceholderControlType(){return _classCallCheck(this,PlaceholderControlType),t.apply(this,arguments)}return _createClass(PlaceholderControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof PlaceholderControld}}]),PlaceholderControlType}(ze),tt=new et("la","PlaceholderControl","A LivingApps field that has a placeholder"),ot=function(e){_inherits(PlaceholderControl,e);var t=_createSuper(PlaceholderControl);function PlaceholderControl(){return _classCallCheck(this,PlaceholderControl),t.apply(this,arguments)}return _createClass(PlaceholderControl,[{key:o.symbols.type,value:function value(){return tt}},{key:"placeholder",get:function get(){var e=this._view_control();return null===e?null:e.placeholder}}]),PlaceholderControl}(Ke);ot.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ke.prototype._ul4attrs),["placeholder"]));var lt=new(function(e){_inherits(NumberControlType,e);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 rt}}]),NumberControlType}(et))("la","NumberControl","A LivingApps number field (type 'number')"),rt=function(e){_inherits(NumberControl,e);var t=_createSuper(NumberControl);function NumberControl(){return _classCallCheck(this,NumberControl),t.apply(this,arguments)}return _createClass(NumberControl,[{key:o.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:"range"===t.operator&&(null!==e&&((null===t.minvalue||t.minvalue<=e)&&(null===t.maxvalue||e<t.maxvalue)))}}]),NumberControl}(ot);rt.prototype.type="number",rt.prototype.fieldtype=A,rt.prototype._ul4onattrs=[].concat(_toConsumableArray(Ke.prototype._ul4onattrs),["precision","minimum","maximum"]),rt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ke.prototype._ul4attrs),["precision","minimum","maximum"]));var nt=function(e){_inherits(StringControlType,e);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 it}}]),StringControlType}(et),at=new nt("la","StringControl","A LivingApps number field (type 'string')"),it=function(e){_inherits(StringControl,e);var t=_createSuper(StringControl);function StringControl(){return _classCallCheck(this,StringControl),t.apply(this,arguments)}return _createClass(StringControl,[{key:o.symbols.type,value:function value(){return at}},{key:"_user_placeholder",value:function _user_placeholder(e,t){if(null===t)return null;switch(t){case"{gender}":return null!==e?e.gender:null;case"{title}":return null!==e?e.title:null;case"{firstname}":return null!==e?e.firstname:null;case"{surname}":return null!==e?e.surname:null;case"{account}":return null!==e?e.email:null;case"{streetname}":return null!==e?e.streetname:null;case"{streetnumber}":return null!==e?e.streetnumber:null;case"{street}":return null===e?null:null===e.street?e.streetnumber:null===e.streetnumber?e.street:e.street+" "+e.streetnumber;case"{zip}":return null!==e?e.zip:null;case"{phone}":return null!==e?e.phone:null;case"{fax}":return null!==e?e.fax:null;case"{company}":return null!==e?e.company:null;case"{city}":return null!==e?e.city:null;case"{summary}":return null!==e?e.summary:null;case"{interests}":return null!==e?e.interests:null;case"{personal_website}":return null!==e?e.personal_website:null;case"{company_website}":return null!==e?e.company_website:null;case"{position}":return null!==e?e.position:null;case"{department}":return null!==e?e.department:null;case"{today}":return o.today();default:return t}}},{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}(ot);it.prototype.type="string";var ut=new(function(e){_inherits(TextControlType,e);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 st}}]),TextControlType}(nt))("la","TextControl","A LivingApps text field (type 'string/text')"),st=function(e){_inherits(TextControl,e);var t=_createSuper(TextControl);function TextControl(){return _classCallCheck(this,TextControl),t.apply(this,arguments)}return _createClass(TextControl,[{key:o.symbols.type,value:function value(){return ut}}]),TextControl}(it);st.prototype.subtype="text",st.prototype.fieldtype=M;var pt=new(function(e){_inherits(PasswordControlType,e);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 ct}}]),PasswordControlType}(nt))("la","PasswordControl","A LivingApps password field (type 'string/password')"),ct=function(e){_inherits(PasswordControl,e);var t=_createSuper(PasswordControl);function PasswordControl(){return _classCallCheck(this,PasswordControl),t.apply(this,arguments)}return _createClass(PasswordControl,[{key:o.symbols.type,value:function value(){return pt}}]),PasswordControl}(it);ct.prototype.subtype="password",ct.prototype.fieldtype=I;var _t=new(function(e){_inherits(EmailControlType,e);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 ht}}]),EmailControlType}(nt))("la","EmailControl","A LivingApps email field (type 'string/email')"),ht=function(e){_inherits(EmailControl,e);var t=_createSuper(EmailControl);function EmailControl(){return _classCallCheck(this,EmailControl),t.apply(this,arguments)}return _createClass(EmailControl,[{key:o.symbols.type,value:function value(){return _t}}]),EmailControl}(it);ht.prototype.subtype="email",ht.prototype.fieldtype=O;var yt=new(function(e){_inherits(URLControlType,e);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 dt}}]),URLControlType}(nt))("la","URLControl","A LivingApps URL field (type 'string/url')"),dt=function(e){_inherits(URLControl,e);var t=_createSuper(URLControl);function URLControl(){return _classCallCheck(this,URLControl),t.apply(this,arguments)}return _createClass(URLControl,[{key:o.symbols.type,value:function value(){return yt}}]),URLControl}(it);dt.prototype.subtype="url",dt.prototype.fieldtype=D;var ft=new(function(e){_inherits(TelControlType,e);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 vt}}]),TelControlType}(nt))("la","TelControl","A LivingApps phone number field (type 'string/tel')"),vt=function(e){_inherits(TelControl,e);var t=_createSuper(TelControl);function TelControl(){return _classCallCheck(this,TelControl),t.apply(this,arguments)}return _createClass(TelControl,[{key:o.symbols.type,value:function value(){return ft}}]),TelControl}(it);vt.prototype.subtype="tel",vt.prototype.fieldtype=B;var kt=new(function(e){_inherits(TextAreaControlType,e);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 Ct}}]),TextAreaControlType}(nt))("la","TextAreaControl","A LivingApps textarea field (type 'string/textarea')"),Ct=function(e){_inherits(TextAreaControl,e);var t=_createSuper(TextAreaControl);function TextAreaControl(){return _classCallCheck(this,TextAreaControl),t.apply(this,arguments)}return _createClass(TextAreaControl,[{key:o.symbols.type,value:function value(){return kt}},{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}(it);Ct.prototype.subtype="textarea",Ct.prototype.fieldtype=U,Ct.prototype._ul4onattrs=[].concat(_toConsumableArray(it.prototype._ul4onattrs),["encrypted"]),Ct.prototype._ul4attrs=new Set([].concat(_toConsumableArray(it.prototype._ul4attrs),["encrypted"])),Ct.prototype._cssclass_control="textarea";var mt=new(function(e){_inherits(HTMLControlType,e);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 gt}}]),HTMLControlType}(nt))("la","HTMLControl","A LivingApps HTML field (type 'string/html')"),gt=function(e){_inherits(HTMLControl,e);var t=_createSuper(HTMLControl);function HTMLControl(){return _classCallCheck(this,HTMLControl),t.apply(this,arguments)}return _createClass(HTMLControl,[{key:o.symbols.type,value:function value(){return mt}}]),HTMLControl}(it);gt.prototype.subtype="html",gt.prototype.fieldtype=E;var bt=function(e){_inherits(DateControlType,e);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 Lt}}]),DateControlType}(et),Tt=new bt("la","DateControl","A LivingApps date field (type 'date/date')"),Lt=function(e){_inherits(DateControl,e);var t=_createSuper(DateControl);function DateControl(){return _classCallCheck(this,DateControl),t.apply(this,arguments)}return _createClass(DateControl,[{key:o.symbols.type,value:function value(){return Tt}},{key:"default",get:function get(){var e=this._view_control();return null===e?null:"{today}"===e.default?o.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(e,t){this._logsearch(e,t);var l=t.value;return"[object Date]"==Object.prototype.toString.call(l)&&(l=o._format(l,this.formatstring(),this.app.language)),null!==e&&(e=o._format(e,this.formatstring(),this.app.language)),"equals"===t.operator?l===e:"contains"===t.operator&&(null===l||null===e?l===e:e.toLowerCase().indexOf(l.toLowerCase())>=0)}}]),DateControl}(ot);Lt.prototype.type="date",Lt.prototype.subtype="date",Lt.prototype.fieldtype=X,Lt.prototype._formatstrings={de:"%d.%m.%Y",fr:"%d.%m.%Y",it:"%d.%m.%Y",en:"%m/%d/%Y",intl:"%Y-%m-%d"};var Ft=[""," %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"];Lt.prototype._formatstrings_parse={en:Ft.map((function(e){return"%m/%d/%Y"+e})),de:Ft.map((function(e){return"%d.%m.%Y"+e})),fr:Ft.map((function(e){return"%d.%m.%Y"+e})),it:Ft.map((function(e){return"%d.%m.%Y"+e})),intl:Ft.map((function(e){return"%Y-%m-%d"+e}))};var At=new(function(e){_inherits(DatetimeMinuteControlType,e);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 wt}}]),DatetimeMinuteControlType}(bt))("la","DatetimeMinuteControl","A LivingApps date field (type 'date/datetimeminute')"),wt=function(e){_inherits(DatetimeMinuteControl,e);var t=_createSuper(DatetimeMinuteControl);function DatetimeMinuteControl(){return _classCallCheck(this,DatetimeMinuteControl),t.apply(this,arguments)}return _createClass(DatetimeMinuteControl,[{key:o.symbols.type,value:function value(){return At}},{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}(Lt);wt.prototype.subtype="datetimeminute",wt.prototype.fieldtype=te,wt.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 St=new(function(e){_inherits(DatetimeSecondControlType,e);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 Mt}}]),DatetimeSecondControlType}(bt))("la","DatetimeSecondControl","A LivingApps date field (type 'date/datetimesecond')"),Mt=function(e){_inherits(DatetimeSecondControl,e);var t=_createSuper(DatetimeSecondControl);function DatetimeSecondControl(){return _classCallCheck(this,DatetimeSecondControl),t.apply(this,arguments)}return _createClass(DatetimeSecondControl,[{key:o.symbols.type,value:function value(){return St}},{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}(Lt);Mt.prototype.subtype="datetimesecond",Mt.prototype.fieldtype=le,Mt.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 xt=function(e){_inherits(LookupControlType,e);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 Ht}}]),LookupControlType}(ze),It=new xt("la","LookupControl","A LivingApps date field (type 'lookup')"),Ht=function(e){_inherits(LookupControl,e);var t=_createSuper(LookupControl);function LookupControl(){return _classCallCheck(this,LookupControl),t.apply(this,arguments)}return _createClass(LookupControl,[{key:o.symbols.type,value:function value(){return It}},{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:"nonekey",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonekey}},{key:"nonelabel",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}(Ke);Ht.prototype.type="lookup",Ht.prototype.fieldtype=pe,Ht.prototype._ul4onattrs=[].concat(_toConsumableArray(Ke.prototype._ul4onattrs),["lookupdata"]),Ht.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ke.prototype._ul4attrs),["lookupdata"]));var Ot=new(function(e){_inherits(LookupSelectControlType,e);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 Rt}}]),LookupSelectControlType}(xt))("la","LookupSelectControl","A LivingApps lookup field (type 'lookup/select')"),Rt=function(e){_inherits(LookupSelectControl,e);var t=_createSuper(LookupSelectControl);function LookupSelectControl(){return _classCallCheck(this,LookupSelectControl),t.apply(this,arguments)}return _createClass(LookupSelectControl,[{key:o.symbols.type,value:function value(){return Ot}}]),LookupSelectControl}(Ht);Rt.prototype.subtype="select",Rt.prototype.fieldtype=ye,Rt.prototype._cssclass_control="select";var Dt=new(function(e){_inherits(LookupRadioControlType,e);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 Pt}}]),LookupRadioControlType}(xt))("la","LookupRadioControl","A LivingApps lookup field (type 'lookup/radio')"),Pt=function(e){_inherits(LookupRadioControl,e);var t=_createSuper(LookupRadioControl);function LookupRadioControl(){return _classCallCheck(this,LookupRadioControl),t.apply(this,arguments)}return _createClass(LookupRadioControl,[{key:o.symbols.type,value:function value(){return Dt}}]),LookupRadioControl}(Ht);Pt.prototype.subtype="radio",Pt.prototype.fieldtype=_e,Pt.prototype._cssclass_root="llft-element";var Bt=new(function(e){_inherits(LookupChoiceControlType,e);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 Nt}}]),LookupChoiceControlType}(xt))("la","LookupChoiceControl","A LivingApps lookup field (type 'lookup/choice')"),Nt=function(e){_inherits(LookupChoiceControl,e);var t=_createSuper(LookupChoiceControl);function LookupChoiceControl(){return _classCallCheck(this,LookupChoiceControl),t.apply(this,arguments)}return _createClass(LookupChoiceControl,[{key:o.symbols.type,value:function value(){return Bt}}]),LookupChoiceControl}(Ht);Nt.prototype.subtype="choice",Nt.prototype.fieldtype=fe;var Ut=function(e){_inherits(AppLookupControlType,e);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 Et}}]),AppLookupControlType}(ze),Vt=new Ut("la","AppLookupControl","A LivingApps lookup field (type 'applookup')"),Et=function(e){_inherits(AppLookupControl,e);var t=_createSuper(AppLookupControl);function AppLookupControl(){return _classCallCheck(this,AppLookupControl),t.apply(this,arguments)}return _createClass(AppLookupControl,[{key:o.symbols.type,value:function value(){return Vt}},{key:"lookupdata",get:function get(){return null!==this.lookup_app&&null!==this.lookup_app.records?this.lookup_app.records:new Map}},{key:"nonekey",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonekey}},{key:"nonelabel",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}(Ke);Et.prototype.type="applookup",Et.prototype.fieldtype=Ie,Et.prototype._ul4onattrs=[].concat(_toConsumableArray(Ke.prototype._ul4onattrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]),Et.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ke.prototype._ul4attrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]));var Gt=new(function(e){_inherits(AppLookupSelectControlType,e);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}(Ut))("la","AppLookupSelectControl","A LivingApps applookup field (type 'applookup/select')"),jt=function(e){_inherits(AppLookupSelectControl,e);var t=_createSuper(AppLookupSelectControl);function AppLookupSelectControl(){return _classCallCheck(this,AppLookupSelectControl),t.apply(this,arguments)}return _createClass(AppLookupSelectControl,[{key:o.symbols.type,value:function value(){return Gt}}]),AppLookupSelectControl}(Et);jt.prototype.subtype="select",jt.prototype.fieldtype=Oe,jt.prototype._cssclass_control="select";var qt=new(function(e){_inherits(AppLookupRadioControlType,e);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 Wt}}]),AppLookupRadioControlType}(Ut))("la","AppLookupRadioControl","A LivingApps applookup field (type 'applookup/radio')"),Wt=function(e){_inherits(AppLookupRadioControl,e);var t=_createSuper(AppLookupRadioControl);function AppLookupRadioControl(){return _classCallCheck(this,AppLookupRadioControl),t.apply(this,arguments)}return _createClass(AppLookupRadioControl,[{key:o.symbols.type,value:function value(){return qt}}]),AppLookupRadioControl}(Et);Wt.prototype.subtype="radio",Wt.prototype.fieldtype=De;var Yt=new(function(e){_inherits(AppLookupChoiceControlType,e);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}(Ut))("la","AppLookupChoiceControl","A LivingApps applookup field (type 'applookup/choice')"),zt=function(e){_inherits(AppLookupChoiceControl,e);var t=_createSuper(AppLookupChoiceControl);function AppLookupChoiceControl(){return _classCallCheck(this,AppLookupChoiceControl),t.apply(this,arguments)}return _createClass(AppLookupChoiceControl,[{key:o.symbols.type,value:function value(){return Yt}}]),AppLookupChoiceControl}(Et);zt.prototype.subtype="choice",zt.prototype.fieldtype=Be;var Jt=function(e){_inherits(MultipleLookupControlType,e);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 $t}}]),MultipleLookupControlType}(xt),Kt=new Jt("la","MultipleLookupControl","A LivingApps multiple applookup field (type 'multipleapplookup')"),$t=function(e){_inherits(MultipleLookupControl,e);var t=_createSuper(MultipleLookupControl);function MultipleLookupControl(){return _classCallCheck(this,MultipleLookupControl),t.apply(this,arguments)}return _createClass(MultipleLookupControl,[{key:o.symbols.type,value:function value(){return Kt}},{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 o,l=_createForOfIteratorHelper(e);try{for(l.s();!(o=l.n()).done;){if(o.value.key===t.value)return!0}}catch(e){l.e(e)}finally{l.f()}return!1}return!1}}]),MultipleLookupControl}(Ht);$t.prototype.type="multiplelookup",$t.prototype.fieldtype=Ce;var Zt=new(function(e){_inherits(MultipleLookupCheckboxControlType,e);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 Qt}}]),MultipleLookupCheckboxControlType}(Jt))("la","MultipleLookupCheckboxControl","A LivingApps multiplelookup field (type 'multiplelookup/checkbox')"),Qt=function(e){_inherits(MultipleLookupCheckboxControl,e);var t=_createSuper(MultipleLookupCheckboxControl);function MultipleLookupCheckboxControl(){return _classCallCheck(this,MultipleLookupCheckboxControl),t.apply(this,arguments)}return _createClass(MultipleLookupCheckboxControl,[{key:o.symbols.type,value:function value(){return Zt}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}}]),MultipleLookupCheckboxControl}($t);Qt.prototype.subtype="checkbox",Qt.prototype.fieldtype=ge,Qt.prototype._cssclass_root="llft-element";var Xt=new(function(e){_inherits(MultipleLookupSelectControlType,e);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 eo}}]),MultipleLookupSelectControlType}(Jt))("la","MultipleLookupSelectControl","A LivingApps multiplelookup field (type 'multiplelookup/select')"),eo=function(e){_inherits(MultipleLookupSelectControl,e);var t=_createSuper(MultipleLookupSelectControl);function MultipleLookupSelectControl(){return _classCallCheck(this,MultipleLookupSelectControl),t.apply(this,arguments)}return _createClass(MultipleLookupSelectControl,[{key:o.symbols.type,value:function value(){return Xt}}]),MultipleLookupSelectControl}($t);eo.prototype.subtype="select",eo.prototype.fieldtype=Te,eo.prototype._cssclass_control="select";var to=new(function(e){_inherits(MultipleLookupChoiceControlType,e);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 oo}}]),MultipleLookupChoiceControlType}(Jt))("la","MultipleLookupChoiceControl","A LivingApps multiplelookup field (type 'multiplelookup/choice')"),oo=function(e){_inherits(MultipleLookupChoiceControl,e);var t=_createSuper(MultipleLookupChoiceControl);function MultipleLookupChoiceControl(){return _classCallCheck(this,MultipleLookupChoiceControl),t.apply(this,arguments)}return _createClass(MultipleLookupChoiceControl,[{key:o.symbols.type,value:function value(){return to}}]),MultipleLookupChoiceControl}($t);oo.prototype.subtype="choice",oo.prototype.fieldtype=Fe;var lo=function(e){_inherits(MultipleAppLookupControlType,e);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 no}}]),MultipleAppLookupControlType}(Ut),ro=new lo("la","MultipleAppLookupControl","A LivingApps multiple applookup field (type 'multipleapplookup')"),no=function(e){_inherits(MultipleAppLookupControl,e);var t=_createSuper(MultipleAppLookupControl);function MultipleAppLookupControl(){return _classCallCheck(this,MultipleAppLookupControl),t.apply(this,arguments)}return _createClass(MultipleAppLookupControl,[{key:o.symbols.type,value:function value(){return ro}},{key:"search",value:function search(e,t){if("equals"===t.operator){if(null===t.value)return 0===e.length;var o,l=_createForOfIteratorHelper(e);try{for(l.s();!(o=l.n()).done;){if(o.value.search(t.value))return!0}}catch(e){l.e(e)}finally{l.f()}return!1}return!1}}]),MultipleAppLookupControl}(Et);no.prototype.type="multipleapplookup",no.prototype.fieldtype=Ve;var ao=new(function(e){_inherits(MultipleAppLookupSelectControlType,e);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 io}}]),MultipleAppLookupSelectControlType}(lo))("la","MultipleAppLookupSelectControl","A LivingApps multiple applookup field (type 'multipleapplookup/select')"),io=function(e){_inherits(MultipleAppLookupSelectControl,e);var t=_createSuper(MultipleAppLookupSelectControl);function MultipleAppLookupSelectControl(){return _classCallCheck(this,MultipleAppLookupSelectControl),t.apply(this,arguments)}return _createClass(MultipleAppLookupSelectControl,[{key:o.symbols.type,value:function value(){return ao}}]),MultipleAppLookupSelectControl}(no);io.prototype.subtype="select",io.prototype.fieldtype=qe,io.prototype._cssclass_control="select";var uo=new(function(e){_inherits(MultipleAppLookupCheckboxControlType,e);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 so}}]),MultipleAppLookupCheckboxControlType}(lo))("la","MultipleAppLookupCheckboxControl","A LivingApps multiple applookup field (type 'multipleapplookup/checkbox')"),so=function(e){_inherits(MultipleAppLookupCheckboxControl,e);var t=_createSuper(MultipleAppLookupCheckboxControl);function MultipleAppLookupCheckboxControl(){return _classCallCheck(this,MultipleAppLookupCheckboxControl),t.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxControl,[{key:o.symbols.type,value:function value(){return uo}}]),MultipleAppLookupCheckboxControl}(no);so.prototype.subtype="checkbox",so.prototype.fieldtype=Ge;var po=new(function(e){_inherits(MultipleAppLookupChoiceControlType,e);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 co}}]),MultipleAppLookupChoiceControlType}(lo))("la","MultipleAppLookupChoiceControl","A LivingApps multiple applookup field (type 'multipleapplookup/choice')"),co=function(e){_inherits(MultipleAppLookupChoiceControl,e);var t=_createSuper(MultipleAppLookupChoiceControl);function MultipleAppLookupChoiceControl(){return _classCallCheck(this,MultipleAppLookupChoiceControl),t.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceControl,[{key:o.symbols.type,value:function value(){return po}}]),MultipleAppLookupChoiceControl}(no);co.prototype.subtype="choice",co.prototype.fieldtype=Ye;var _o=new(function(e){_inherits(GeoControlType,e);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 ho}}]),GeoControlType}(ze))("la","GeoControl","A LivingApps geo field (type 'geo')"),ho=function(e){_inherits(GeoControl,e);var t=_createSuper(GeoControl);function GeoControl(){return _classCallCheck(this,GeoControl),t.apply(this,arguments)}return _createClass(GeoControl,[{key:o.symbols.type,value:function value(){return _o}}]),GeoControl}(Ke);ho.prototype.type="geo",ho.prototype.fieldtype=j,ho.prototype._cssclass_root="llft-element";var yo=function(e){_inherits(FileControlType,e);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 vo}}]),FileControlType}(ze),fo=new yo("la","FileControl","A LivingApps upload field (type 'file')"),vo=function(e){_inherits(FileControl,e);var t=_createSuper(FileControl);function FileControl(){return _classCallCheck(this,FileControl),t.apply(this,arguments)}return _createClass(FileControl,[{key:o.symbols.type,value:function value(){return fo}}]),FileControl}(Ke);vo.prototype.type="file",vo.prototype.fieldtype=Y,vo.prototype._cssclass_root="llft-element";var ko=new(function(e){_inherits(FileSignatureControlType,e);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 Co}}]),FileSignatureControlType}(yo))("la","FileSignatureControl","A LivingApps signature image field (type 'file/signature')"),Co=function(e){_inherits(FileSignatureControl,e);var t=_createSuper(FileSignatureControl);function FileSignatureControl(){return _classCallCheck(this,FileSignatureControl),t.apply(this,arguments)}return _createClass(FileSignatureControl,[{key:o.symbols.type,value:function value(){return ko}}]),FileSignatureControl}(vo);Co.prototype.subtype="signature",Co.prototype.fieldtype=J;var mo=new(function(e){_inherits(ButtonControlType,e);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 go}}]),ButtonControlType}(ze))("la","ButtonControl","A submit button"),go=function(e){_inherits(ButtonControl,e);var t=_createSuper(ButtonControl);function ButtonControl(){return _classCallCheck(this,ButtonControl),t.apply(this,arguments)}return _createClass(ButtonControl,[{key:o.symbols.type,value:function value(){return mo}}]),ButtonControl}(Ke);go.prototype.type="button";var bo=new(function(e){_inherits(LookupItemType,e);var t=_createSuper(LookupItemType);function LookupItemType(){return _classCallCheck(this,LookupItemType),t.apply(this,arguments)}return _createClass(LookupItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof To}}]),LookupItemType}(o.Type))("la","LookupItem","An option in a lookup control/field"),To=function(e){_inherits(LookupItem,e);var t=_createSuper(LookupItem);function LookupItem(){return _classCallCheck(this,LookupItem),t.apply(this,arguments)}return _createClass(LookupItem,[{key:o.symbols.type,value:function value(){return bo}},{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 o=t.controls.get(e);if(void 0!==o&&void 0!==o.lookupdata&&null!==o.lookupdata){var l=o.lookupdata.get(this.key);if(void 0!==l)return l}}return null}},{key:o.symbols.repr,value:function value(){var e="<LookupItem key="+o._repr(this.key)+" label="+o._repr(this.label);return this.visible||(e+="visible=False"),e+">"}}]),LookupItem}(l);To.prototype._ul4onattrs=["control","key","_label"],To.prototype._ul4attrs=new Set(["id","control","key","label"]);var Lo=new(function(e){_inherits(ViewLookupItemType,e);var t=_createSuper(ViewLookupItemType);function ViewLookupItemType(){return _classCallCheck(this,ViewLookupItemType),t.apply(this,arguments)}return _createClass(ViewLookupItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Fo}}]),ViewLookupItemType}(o.Type))("la","ViewLookupItem","View specific information about a lookup item"),Fo=function(e){_inherits(ViewLookupItem,e);var t=_createSuper(ViewLookupItem);function ViewLookupItem(){return _classCallCheck(this,ViewLookupItem),t.apply(this,arguments)}return _createClass(ViewLookupItem,[{key:o.symbols.type,value:function value(){return Lo}},{key:o.symbols.repr,value:function value(){var e="<ViewLookupItem key="+o._repr(this.key)+" label="+o._repr(this.label);return this.visible||(e+=" visible=False"),e+">"}}]),ViewLookupItem}(l);Fo.prototype._ul4onattrs=["key","label","visible"],Fo.prototype._ul4attrs=new Set(["key","label","visible"]);var Ao=function(e){_inherits(LayoutControlType,e);var t=_createSuper(LayoutControlType);function LayoutControlType(){return _classCallCheck(this,LayoutControlType),t.apply(this,arguments)}return _createClass(LayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof So}}]),LayoutControlType}(o.Type),wo=new Ao("la","LayoutControl","A decoration in an input form"),So=function(e){_inherits(LayoutControl,e);var t=_createSuper(LayoutControl);function LayoutControl(){return _classCallCheck(this,LayoutControl),t.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:o.symbols.type,value:function value(){return wo}},{key:o.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+o._repr(this.id)+" identifier="+o._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:o.symbols.setattr,value:function value(e,t){"visible"===e?this.visible=o._bool(t):_get(_getPrototypeOf(LayoutControl.prototype),o.symbols.setattr,this).call(this,e,t)}}]),LayoutControl}(l);So.prototype._ul4onattrs=["label","identifier","view","top","left","width","height"],So.prototype._ul4attrs=new Set(["id","label","identifier","view","top","left","width","height","visible"]);var Mo=new(function(e){_inherits(HTMLLayoutControlType,e);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 xo}}]),HTMLLayoutControlType}(Ao))("la","HTMLLayoutControl","HTML decoration in an input form"),xo=function(e){_inherits(HTMLLayoutControl,e);var t=_createSuper(HTMLLayoutControl);function HTMLLayoutControl(){return _classCallCheck(this,HTMLLayoutControl),t.apply(this,arguments)}return _createClass(HTMLLayoutControl,[{key:o.symbols.type,value:function value(){return Mo}},{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:o.symbols.setattr,value:function value(e,t){"value"===e?this.value=t:_get(_getPrototypeOf(HTMLLayoutControl.prototype),o.symbols.setattr,this).call(this,e,t)}}]),HTMLLayoutControl}(So);xo.prototype._ul4onattrs=[].concat(_toConsumableArray(So.prototype._ul4onattrs),["_value","_visible"]),xo.prototype._ul4attrs=new Set([].concat(_toConsumableArray(So.prototype._ul4attrs),["value"]));var Io=new(function(e){_inherits(ImageLayoutControlType,e);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 Ho}}]),ImageLayoutControlType}(Ao))("la","ImageLayoutControl","An image decoration in an input form"),Ho=function(e){_inherits(ImageLayoutControl,e);var t=_createSuper(ImageLayoutControl);function ImageLayoutControl(){return _classCallCheck(this,ImageLayoutControl),t.apply(this,arguments)}return _createClass(ImageLayoutControl,[{key:o.symbols.type,value:function value(){return Io}}]),ImageLayoutControl}(So);Ho.prototype._ul4onattrs=[].concat(_toConsumableArray(So.prototype._ul4onattrs),["original","scaled","_visible"]),Ho.prototype._ul4attrs=new Set([].concat(_toConsumableArray(So.prototype._ul4attrs),["original","scaled"]));var Oo=new(function(e){_inherits(ButtonLayoutControlType,e);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 Ro}}]),ButtonLayoutControlType}(Ao))("la","ButtonLayoutControl","A submit button in an input form"),Ro=function(e){_inherits(ButtonLayoutControl,e);var t=_createSuper(ButtonLayoutControl);function ButtonLayoutControl(){return _classCallCheck(this,ButtonLayoutControl),t.apply(this,arguments)}return _createClass(ButtonLayoutControl,[{key:o.symbols.type,value:function value(){return Oo}}]),ButtonLayoutControl}(So);Ro.prototype._ul4onattrs=[].concat(_toConsumableArray(So.prototype._ul4onattrs),["original","scaled","_visible"]);var Do=new(function(e){_inherits(ViewControlType,e);var t=_createSuper(ViewControlType);function ViewControlType(){return _classCallCheck(this,ViewControlType),t.apply(this,arguments)}return _createClass(ViewControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Po}}]),ViewControlType}(o.Type))("la","ViewControl","Contains view specific information about a control"),Po=function(e){_inherits(ViewControl,e);var t=_createSuper(ViewControl);function ViewControl(){return _classCallCheck(this,ViewControl),t.apply(this,arguments)}return _createClass(ViewControl,[{key:o.symbols.type,value:function value(){return Do}},{key:"mode",get:function get(){return this._mode?"display":"edit"}}]),ViewControl}(l);Po.prototype._ul4onattrs=["view","control","top","left","width","height","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","_mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"],Po.prototype._ul4attrs=new Set(["id","view","control","top","left","width","height","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"]);var Bo=new(function(e){_inherits(UserType,e);var t=_createSuper(UserType);function UserType(){return _classCallCheck(this,UserType),t.apply(this,arguments)}return _createClass(UserType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof No}}]),UserType}(o.Type))("la","User","A LivingApps user/account"),No=function(e){_inherits(User,e);var t=_createSuper(User);function User(){return _classCallCheck(this,User),t.apply(this,arguments)}return _createClass(User,[{key:o.symbols.type,value:function value(){return Bo}},{key:o.symbols.repr,value:function value(){return"<User id="+o._repr(this.id)+" firstname="+o._repr(this.firstname)+" surname="+o._repr(this.surname)+" email="+o._repr(this.email)+">"}}]),User}(l);No.prototype._ul4onattrs=["_id","gender","title","firstname","surname","initials","email","streetname","streetnumber","zip","city","phone","fax","lang","avatarsmall","avatarlarge","summary","interests","personalwebsite","companywebsite","company","position","department","keyviews"],No.prototype._ul4attrs=new Set(["id","_id","gender","title","firstname","surname","initials","email","streetname","streetnumber","zip","city","phone","fax","lang","avatarsmall","avatarlarge","summary","interests","personalwebsite","companywebsite","company","position","department","keyviews"]);var Uo=new(function(e){_inherits(FileType,e);var t=_createSuper(FileType);function FileType(){return _classCallCheck(this,FileType),t.apply(this,arguments)}return _createClass(FileType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Vo}}]),FileType}(o.Type))("la","File","An uploaded file"),Vo=function(e){_inherits(File,e);var t=_createSuper(File);function File(){return _classCallCheck(this,File),t.apply(this,arguments)}return _createClass(File,[{key:o.symbols.type,value:function value(){return Uo}},{key:o.symbols.repr,value:function value(){return"<File id="+o._repr(this.id)+" url="+o._repr(this.url)+" filename="+o._repr(this.filename)+">"}},{key:"url",get:function get(){return"/gateway/files/"+this.id}},{key:"archive_url",get:function get(){return null===this.archive?this.url:this.archive.url+"/"+this.filename}}]),File}(l);Vo.prototype._ul4onattrs=["filename","mimetype","width","height","internalid","createdat","size","duration","geo","storagefilename","archive"],Vo.prototype._ul4attrs=new Set(["id","url","archive_url","filename","mimetype","width","height","size","duration","geo","archive","createdat"]);var Eo=new(function(e){_inherits(GeoType,e);var t=_createSuper(GeoType);function GeoType(){return _classCallCheck(this,GeoType),t.apply(this,arguments)}return _createClass(GeoType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Go}}]),GeoType}(o.Type))("la","Geo","Geographical coordinates and location information"),Go=function(e){_inherits(Geo,e);var t=_createSuper(Geo);function Geo(e,o){var l,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return _classCallCheck(this,Geo),(l=t.call(this,null)).lat=e,l.long=o,l.info=r,l}return _createClass(Geo,[{key:o.symbols.type,value:function value(){return Eo}},{key:o.symbols.repr,value:function value(){return"<Geo lat="+o._repr(this.lat)+" long="+o._repr(this.long)+" info="+o._repr(this.info)+">"}}]),Geo}(l);Go.prototype._ul4onattrs=["lat","long","info"],Go.prototype._ul4attrs=new Set(["lat","long","info"]);var jo=function(e){_inherits(AttachmentType,e);var t=_createSuper(AttachmentType);function AttachmentType(){return _classCallCheck(this,AttachmentType),t.apply(this,arguments)}return _createClass(AttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Wo}}]),AttachmentType}(o.Type),qo=new jo("la","Attachment","An attachment of a record"),Wo=function(e){_inherits(Attachment,e);var t=_createSuper(Attachment);function Attachment(){return _classCallCheck(this,Attachment),t.apply(this,arguments)}return _createClass(Attachment,[{key:o.symbols.type,value:function value(){return qo}},{key:o.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+o._repr(this.id)+" label="+o._repr(this.label)+">"}}]),Attachment}(l);Wo.prototype._ul4onattrs=["record","label","active"],Wo.prototype._ul4attrs=new Set(["id","record","label","active"]);var Yo=new(function(e){_inherits(NoteAttachmentType,e);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 zo}}]),NoteAttachmentType}(jo))("la","NoteAttachment","A note attachment of a record"),zo=function(e){_inherits(NoteAttachment,e);var t=_createSuper(NoteAttachment);function NoteAttachment(){return _classCallCheck(this,NoteAttachment),t.apply(this,arguments)}return _createClass(NoteAttachment,[{key:o.symbols.type,value:function value(){return Yo}}]),NoteAttachment}(Wo);zo.prototype.type="noteattachment",zo.prototype._ul4onattrs=[].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["value"]),zo.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["value"]));var Jo=new(function(e){_inherits(URLAttachmentType,e);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 Ko}}]),URLAttachmentType}(jo))("la","URLAttachment","A URL attachment of a record"),Ko=function(e){_inherits(URLAttachment,e);var t=_createSuper(URLAttachment);function URLAttachment(){return _classCallCheck(this,URLAttachment),t.apply(this,arguments)}return _createClass(URLAttachment,[{key:o.symbols.type,value:function value(){return Jo}}]),URLAttachment}(Wo);Ko.prototype.type="urlattachment",Ko.prototype._ul4onattrs=[].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["value"]),Ko.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["value"]));var $o=new(function(e){_inherits(FileAttachmentType,e);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 Zo}}]),FileAttachmentType}(jo))("la","FileAttachment","A file attachment of a record"),Zo=function(e){_inherits(FileAttachment,e);var t=_createSuper(FileAttachment);function FileAttachment(){return _classCallCheck(this,FileAttachment),t.apply(this,arguments)}return _createClass(FileAttachment,[{key:o.symbols.type,value:function value(){return $o}}]),FileAttachment}(Wo);Zo.prototype.type="fileattachment",Zo.prototype._ul4onattrs=[].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["value"]),Zo.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["value"]));var Qo=new(function(e){_inherits(ImageAttachmentType,e);var t=_createSuper(ImageAttachmentType);function ImageAttachmentType(){return _classCallCheck(this,ImageAttachmentType),t.apply(this,arguments)}return _createClass(ImageAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Xo}}]),ImageAttachmentType}(jo))("la","ImageAttachment","An image attachment of a record"),Xo=function(e){_inherits(ImageAttachment,e);var t=_createSuper(ImageAttachment);function ImageAttachment(){return _classCallCheck(this,ImageAttachment),t.apply(this,arguments)}return _createClass(ImageAttachment,[{key:o.symbols.type,value:function value(){return Qo}}]),ImageAttachment}(Wo);Xo.prototype.type="imageattachment",Xo.prototype._ul4onattrs=[].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["original","thumb","small","medium","large"]),Xo.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["original","thumb","small","medium","large"]));var el=new(function(e){_inherits(JSONAttachmentType,e);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 tl}}]),JSONAttachmentType}(jo))("la","JSONAttachment","A JSON attachment of a record"),tl=function(e){_inherits(JSONAttachment,e);var t=_createSuper(JSONAttachment);function JSONAttachment(){return _classCallCheck(this,JSONAttachment),t.apply(this,arguments)}return _createClass(JSONAttachment,[{key:o.symbols.type,value:function value(){return el}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return"value"===e?o._asjson(this.value):this[e]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){"value"===e?this.value=o._fromjson(t):this[e]=t}}]),JSONAttachment}(Wo);tl.prototype.type="jsonattachment",tl.prototype._ul4onattrs=[].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["value"]),tl.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Wo.prototype._ul4onattrs),["value"]));var ol=new(function(e){_inherits(InstallationType,e);var t=_createSuper(InstallationType);function InstallationType(){return _classCallCheck(this,InstallationType),t.apply(this,arguments)}return _createClass(InstallationType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ll}}]),InstallationType}(o.Type))("la","Installation","The installation that created an app"),ll=function(e){_inherits(Installation,e);var t=_createSuper(Installation);function Installation(){return _classCallCheck(this,Installation),t.apply(this,arguments)}return _createClass(Installation,[{key:o.symbols.type,value:function value(){return ol}},{key:o.symbols.repr,value:function value(){return"<Installation id="+o._repr(this.id)+" name="+o._repr(this.name)+">"}}]),Installation}(l);ll.prototype._ul4onattrs=["name"],ll.prototype._ul4attrs=new Set(["id","name"]);var rl=new(function(e){_inherits(CategoryType,e);var t=_createSuper(CategoryType);function CategoryType(){return _classCallCheck(this,CategoryType),t.apply(this,arguments)}return _createClass(CategoryType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof nl}}]),CategoryType}(o.Type))("la","Category","A navigation category"),nl=function(e){_inherits(Category,e);var t=_createSuper(Category);function Category(){return _classCallCheck(this,Category),t.apply(this,arguments)}return _createClass(Category,[{key:o.symbols.type,value:function value(){return rl}},{key:o.symbols.repr,value:function value(){for(var e=[],t=this;null!==t;)e.splice(0,0,t.identifier),t=t.parent;return"<Category id="+o._repr(this.id)+" identifierpath="+o._repr(e.join("/"))+NaN+o._repr(this.name)+">"}}]),Category}(l);nl.prototype._ul4onattrs=["identifier","name","order","parent","children","apps"],nl.prototype._ul4attrs=new Set(["id","identifier","name","order","parent","children","apps"]);var al=new(function(e){_inherits(KeyViewType,e);var t=_createSuper(KeyViewType);function KeyViewType(){return _classCallCheck(this,KeyViewType),t.apply(this,arguments)}return _createClass(KeyViewType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof il}}]),KeyViewType}(o.Type))("la","KeyView","Object granting access to a view template"),il=function(e){_inherits(KeyView,e);var t=_createSuper(KeyView);function KeyView(){return _classCallCheck(this,KeyView),t.apply(this,arguments)}return _createClass(KeyView,[{key:o.symbols.type,value:function value(){return al}},{key:o.symbols.repr,value:function value(){return"<KeyView id="+o._repr(this.id)+" identifier="+o._repr(this.identifier)+">"}}]),KeyView}(l);il.prototype._ul4onattrs=["identifier","name","key","user"],il.prototype._ul4attrs=new Set(["id","identifier","name","key","user"]);var ul=new(function(e){_inherits(AppParameterType,e);var t=_createSuper(AppParameterType);function AppParameterType(){return _classCallCheck(this,AppParameterType),t.apply(this,arguments)}return _createClass(AppParameterType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof sl}}]),AppParameterType}(o.Type))("la","AppParameter","A parameter of a LivingApps application"),sl=function(e){_inherits(AppParameter,e);var t=_createSuper(AppParameter);function AppParameter(){return _classCallCheck(this,AppParameter),t.apply(this,arguments)}return _createClass(AppParameter,[{key:o.symbols.type,value:function value(){return ul}},{key:o.symbols.repr,value:function value(){return"<AppParameter id="+o._repr(this.id)+" identifier="+o._repr(this.identifier)+">"}},{key:"app",get:function get(){return this.owner instanceof p?this.owner:null}}]),AppParameter}(l);sl.prototype._ul4onattrs=["owner","parent","type","order","identifier","description","value","createdat","createdby","updatedat","updatedby"],sl.prototype._ul4attrs=new Set(["id","owner","parent","app","type","order","identifier","description","value","createdat","createdby","updatedat","updatedby"]);var pl=new(function(e){_inherits(FormType,e);var t=_createSuper(FormType);function FormType(){return _classCallCheck(this,FormType),t.apply(this,arguments)}return _createClass(FormType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof cl}}]),FormType}(o.Type))("la","Form","The input form."),cl=function(e){_inherits(Form,e);var t=_createSuper(Form);function Form(e,o){var l;_classCallCheck(this,Form),(l=t.call(this)).globals=e,l.template=o,l._geo_wired=!1;var r,n=_createForOfIteratorHelper(e.record.fields.values());try{for(n.s();!(r=n.n()).done;){var a=r.value;l.wire_field(a)}}catch(e){n.e(e)}finally{n.f()}return l.render_template(null),l}return _createClass(Form,[{key:o.symbols.type,value:function value(){return pl}},{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:o.symbols.getattr,value:function value(e){if("enabled"===e)return this.enabled;throw new o.AttributeError(this,e)}},{key:o.symbols.setattr,value:function value(e,t){if("enabled"!==e)throw new o.AttributeError(this,e);this.enabled=o._bool(t)}},{key:o.symbols.repr,value:function value(){return"<"+this.constructor.name+" enabled="+o._repr(this.enabled)+">"}},{key:"toString",value:function toString(){return this[o.symbols.repr]()}},{key:"render_template",value:function render_template(e){var t=this,l={record:this.globals.record,app:this.globals.app,fields:this.globals.record.fields,identifier:e},r={globals:this.globals,form:this,la:dl},n="LivingApps update template: ";n+=null===e?"Initialization":"Value change in "+o._repr(e),this.globals.group_logging(n,(function(){try{t.template.renders(l,r)}catch(e){console&&console.error&&(t.globals._start_log_message(),console.group&&console.group("UL4 stacktrace"),o.report_exc(e),console.groupEnd&&console.groupEnd(),console.groupCollapsed&&console.groupCollapsed("Javascript stacktrace"),console.error(e),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,o=this,l=_createForOfIteratorHelper(e._dom_controls);try{for(l.s();!(t=l.n()).done;){t.value.addEventListener(e._inputevent,(function(t){o.wire_geo(),o.globals.mode=o.globals.mode.substring(0,o.globals.mode.lastIndexOf("/")+1)+"input",o.render_template(e.control.identifier)}))}}catch(e){l.e(e)}finally{l.f()}}}]),Form}(o.Proto);cl.prototype._ul4attrs=new Set(["enabled"]),cl.prototype._sel_form="#livingapps-form form",cl.prototype._sel_button="[type=submit]";for(var _l=0,hl=[a,u,p,_,y,f,Ze,Xe,rt,st,ht,dt,vt,Ct,Lt,wt,Mt,Ht,Rt,Pt,Nt,Et,jt,Wt,zt,$t,eo,Qt,oo,no,io,so,co,ho,vo,Co,go,C,g,M,O,D,B,U,E,T,A,j,Y,J,Z,X,te,le,ie,pe,Ce,Se,Ie,Ve,To,Fo,So,xo,Ho,Ro,Po,No,Vo,Go,zo,Ko,Zo,Xo,tl,ll,nl,il,sl];_l<hl.length;_l++){var yl=hl[_l];o.register("de.livinglogic.livingapi."+yl.name.toLowerCase(),yl)}var dl=new o.Module("la","LivingAPI types",{FlashMessage:u,File:Vo,Geo:Go,User:No,KeyView:il,Globals:a,App:p,TextControl:st,URLControl:dt,EmailControl:ht,PasswordControl:ct,TelControl:vt,TextAreaControl:Ct,HTMLControl:gt,IntControl:Xe,NumberControl:rt,DateControl:Lt,DatetimeMinuteControl:wt,DatetimeSecondControl:Mt,BoolControl:Ze,LookupSelectControl:Rt,LookupRadioControl:Pt,LookupChoiceControl:Nt,AppLookupSelectControl:jt,AppLookupRadioControl:Wt,AppLookupChoiceControl:zt,MultipleLookupSelectControl:eo,MultipleLookupCheckboxControl:Qt,MultipleLookupChoiceControl:oo,MultipleAppLookupSelectControl:io,MultipleAppLookupCheckboxControl:so,MultipleAppLookupChoiceControl:co,FileControl:vo,FileSignatureControl:Co,GeoControl:ho,ViewControl:Po,Record:f,ImageAttachment:Xo,FileAttachment:Zo,URLAttachment:Ko,NoteAttachment:zo,JSONAttachment:tl,Installation:ll,HTMLLayoutControl:xo,ImageLayoutControl:Ho,ButtonLayoutControl:Ro,View:_,DataSource:y,LookupItem:To,ViewLookupItem:Fo,Category:nl,AppParameter:sl});e.App=p,e.AppLookupChoiceControl=zt,e.AppLookupChoiceField=Be,e.AppLookupControl=Et,e.AppLookupField=Ie,e.AppLookupFieldBase=Se,e.AppLookupRadioControl=Wt,e.AppLookupRadioField=De,e.AppLookupSelectControl=jt,e.AppLookupSelectField=Oe,e.AppParameter=sl,e.Attachment=Wo,e.Base=l,e.BoolControl=Ze,e.BoolField=g,e.ButtonControl=go,e.ButtonLayoutControl=Ro,e.Category=nl,e.ChoiceFieldBase=re,e.Control=Ke,e.DataSource=y,e.DateControl=Lt,e.DateField=X,e.DateFieldBase=Z,e.DatetimeMinuteControl=wt,e.DatetimeMinuteField=te,e.DatetimeSecondControl=Mt,e.DatetimeSecondField=le,e.EmailControl=ht,e.EmailField=O,e.Field=C,e.File=Vo,e.FileAttachment=Zo,e.FileControl=vo,e.FileField=Y,e.FileSignatureControl=Co,e.FileSignatureField=J,e.FlashMessage=u,e.Form=cl,e.Geo=Go,e.GeoControl=ho,e.GeoField=j,e.Globals=a,e.HTMLControl=gt,e.HTMLField=E,e.HTMLLayoutControl=xo,e.Handler=r,e.ImageAttachment=Xo,e.ImageLayoutControl=Ho,e.Installation=ll,e.IntControl=Xe,e.IntField=T,e.JSONAttachment=tl,e.KeyView=il,e.LayoutControl=So,e.LookupChoiceControl=Nt,e.LookupChoiceField=fe,e.LookupControl=Ht,e.LookupField=pe,e.LookupFieldBase=ie,e.LookupItem=To,e.LookupRadioControl=Pt,e.LookupRadioField=_e,e.LookupSelectControl=Rt,e.LookupSelectField=ye,e.MultipleAppLookupCheckboxControl=so,e.MultipleAppLookupCheckboxField=Ge,e.MultipleAppLookupChoiceControl=co,e.MultipleAppLookupChoiceField=Ye,e.MultipleAppLookupControl=no,e.MultipleAppLookupField=Ve,e.MultipleAppLookupSelectControl=io,e.MultipleAppLookupSelectField=qe,e.MultipleLookupCheckboxControl=Qt,e.MultipleLookupCheckboxField=ge,e.MultipleLookupChoiceControl=oo,e.MultipleLookupChoiceField=Fe,e.MultipleLookupControl=$t,e.MultipleLookupField=Ce,e.MultipleLookupSelectControl=eo,e.MultipleLookupSelectField=Te,e.NoteAttachment=zo,e.NumberControl=rt,e.NumberField=A,e.PasswordControl=ct,e.PasswordField=I,e.Record=f,e.StringControl=it,e.StringField=M,e.TelControl=vt,e.TelField=B,e.TextAreaControl=Ct,e.TextAreaField=U,e.TextControl=st,e.URLAttachment=Ko,e.URLControl=dt,e.URLField=D,e.User=No,e.View=_,e.ViewControl=Po,e.ViewLookupItem=Fo,e.element=element,e.module=dl,e.url_with_params=url_with_params,e.version="0.16.0",Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=livingapi.js.map
|